From d8ef5f69915c2941a88f58dbe0a0b6eb53d67346 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 5 Nov 2019 12:57:34 -0700 Subject: [PATCH 001/577] added internal fix dummy command to enable more control of fix ordering --- src/GRANULAR/pair_gran_hooke_history.cpp | 25 +++++++-- src/GRANULAR/pair_gran_hooke_history.h | 1 + src/GRANULAR/pair_granular.cpp | 41 ++++++++++----- src/GRANULAR/pair_granular.h | 3 +- src/USER-BOCS/fix_bocs.cpp | 4 +- src/USER-MISC/fix_srp.cpp | 17 ++++--- src/USER-MISC/pair_srp.cpp | 13 +++-- src/fix.cpp | 1 + src/fix.h | 1 + src/fix_balance.cpp | 1 + src/fix_deform.cpp | 1 + src/fix_dummy.cpp | 65 ++++++++++++++++++++++++ src/fix_dummy.h | 53 +++++++++++++++++++ src/fix_neigh_history.cpp | 14 +++++ src/fix_nh.cpp | 4 +- src/modify.cpp | 40 +++++++++++++++ src/modify.h | 1 + 17 files changed, 253 insertions(+), 32 deletions(-) create mode 100644 src/fix_dummy.cpp create mode 100644 src/fix_dummy.h diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index de205dce91..3375d9a7a3 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -24,6 +24,7 @@ #include "update.h" #include "modify.h" #include "fix.h" +#include "fix_dummy.h" #include "fix_neigh_history.h" #include "comm.h" #include "neighbor.h" @@ -43,7 +44,6 @@ PairGranHookeHistory::PairGranHookeHistory(LAMMPS *lmp) : Pair(lmp) no_virial_fdotr_compute = 1; history = 1; size_history = 3; - fix_history = NULL; single_extra = 10; svector = new double[10]; @@ -60,6 +60,19 @@ PairGranHookeHistory::PairGranHookeHistory(LAMMPS *lmp) : Pair(lmp) // keep default behavior of history[i][j] = -history[j][i] nondefault_history_transfer = 0; + + // create dummy fix as placeholder for FixNeighHistory + // this is so final order of Modify:fix will conform to input script + + fix_history = NULL; + + char **fixarg = new char*[3]; + fixarg[0] = (char *) "NEIGH_HISTORY_DUMMY"; + fixarg[1] = (char *) "all"; + fixarg[2] = (char *) "DUMMY"; + modify->add_fix(3,fixarg,1); + delete [] fixarg; + fix_dummy = (FixDummy *) modify->fix[modify->nfix-1]; } /* ---------------------------------------------------------------------- */ @@ -69,7 +82,9 @@ PairGranHookeHistory::~PairGranHookeHistory() if (copymode) return; delete [] svector; - if (fix_history) modify->delete_fix("NEIGH_HISTORY"); + + if (!fix_history) modify->delete_fix("NEIGH_HISTORY_DUMMY"); + else modify->delete_fix("NEIGH_HISTORY"); if (allocated) { memory->destroy(setflag); @@ -412,7 +427,9 @@ void PairGranHookeHistory::init_style() dt = update->dt; - // if first init, create Fix needed for storing shear history + // if history is stored and first init, create Fix to store history + // it replaces FixDummy, created in the constructor + // this is so its order in the fix list is preserved if (history && fix_history == NULL) { char dnumstr[16]; @@ -422,7 +439,7 @@ void PairGranHookeHistory::init_style() fixarg[1] = (char *) "all"; fixarg[2] = (char *) "NEIGH_HISTORY"; fixarg[3] = dnumstr; - modify->add_fix(4,fixarg,1); + modify->replace_fix("NEIGH_HISTORY_DUMMY",4,fixarg,1); delete [] fixarg; fix_history = (FixNeighHistory *) modify->fix[modify->nfix-1]; fix_history->pair = this; diff --git a/src/GRANULAR/pair_gran_hooke_history.h b/src/GRANULAR/pair_gran_hooke_history.h index 81f2d8fd4a..309af54ee6 100644 --- a/src/GRANULAR/pair_gran_hooke_history.h +++ b/src/GRANULAR/pair_gran_hooke_history.h @@ -56,6 +56,7 @@ class PairGranHookeHistory : public Pair { int size_history; + class FixDummy *fix_dummy; class FixNeighHistory *fix_history; // storage of rigid body masses for use in granular interactions diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 85eab1fb9e..d37ae8c00c 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -1,13 +1,14 @@ /* ---------------------------------------------------------------------- -http://lammps.sandia.gov, Sandia National Laboratories -Steve Plimpton, sjplimp@sandia.gov + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov -Copyright (2003) Sandia Corporation. Under the terms of Contract -DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains -certain rights in this software. This software is distributed under -the GNU General Public License. + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. -See the README file in the top-level LAMMPS directory. + See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- @@ -25,6 +26,7 @@ See the README file in the top-level LAMMPS directory. #include "update.h" #include "modify.h" #include "fix.h" +#include "fix_dummy.h" #include "fix_neigh_history.h" #include "comm.h" #include "neighbor.h" @@ -62,7 +64,6 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) { single_enable = 1; no_virial_fdotr_compute = 1; - fix_history = NULL; single_extra = 12; svector = new double[single_extra]; @@ -90,6 +91,19 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) nondefault_history_transfer = 0; tangential_history_index = 0; roll_history_index = twist_history_index = 0; + + // create dummy fix as placeholder for FixNeighHistory + // this is so final order of Modify:fix will conform to input script + + fix_history = NULL; + + char **fixarg = new char*[3]; + fixarg[0] = (char *) "NEIGH_HISTORY_DUMMY"; + fixarg[1] = (char *) "all"; + fixarg[2] = (char *) "DUMMY"; + modify->add_fix(3,fixarg,1); + delete [] fixarg; + fix_dummy = (FixDummy *) modify->fix[modify->nfix-1]; } /* ---------------------------------------------------------------------- */ @@ -97,7 +111,9 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) PairGranular::~PairGranular() { delete [] svector; - if (fix_history) modify->delete_fix("NEIGH_HISTORY"); + + if (!fix_history) modify->delete_fix("NEIGH_HISTORY_DUMMY"); + else modify->delete_fix("NEIGH_HISTORY"); if (allocated) { memory->destroy(setflag); @@ -1021,8 +1037,9 @@ void PairGranular::init_style() dt = update->dt; - // if history is stored: - // if first init, create Fix needed for storing history + // if history is stored and first init, create Fix to store history + // it replaces FixDummy, created in the constructor + // this is so its order in the fix list is preserved if (use_history && fix_history == NULL) { char dnumstr[16]; @@ -1032,7 +1049,7 @@ void PairGranular::init_style() fixarg[1] = (char *) "all"; fixarg[2] = (char *) "NEIGH_HISTORY"; fixarg[3] = dnumstr; - modify->add_fix(4,fixarg,1); + modify->replace_fix("NEIGH_HISTORY_DUMMY",4,fixarg,1); delete [] fixarg; fix_history = (FixNeighHistory *) modify->fix[modify->nfix-1]; fix_history->pair = this; diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index d799acb733..e9ba629b49 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -51,6 +51,7 @@ class PairGranular : public Pair { double *maxrad_dynamic,*maxrad_frozen; double **cut; + class FixDummy *fix_dummy; class FixNeighHistory *fix_history; // storage of rigid body masses for use in granular interactions @@ -111,4 +112,4 @@ Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. - */ +*/ diff --git a/src/USER-BOCS/fix_bocs.cpp b/src/USER-BOCS/fix_bocs.cpp index adce231bf1..0c5ebb7df4 100644 --- a/src/USER-BOCS/fix_bocs.cpp +++ b/src/USER-BOCS/fix_bocs.cpp @@ -302,10 +302,10 @@ FixBocs::FixBocs(LAMMPS *lmp, int narg, char **arg) : // pre_exchange only required if flips can occur due to shape changes if (flipflag && (p_flag[3] || p_flag[4] || p_flag[5])) - pre_exchange_flag = 1; + pre_exchange_flag = pre_exchange_migrate = 1; if (flipflag && (domain->yz != 0.0 || domain->xz != 0.0 || domain->xy != 0.0)) - pre_exchange_flag = 1; + pre_exchange_flag = pre_exchange_migrate = 1; } // convert input periods to frequencies diff --git a/src/USER-MISC/fix_srp.cpp b/src/USER-MISC/fix_srp.cpp index c0db252db4..2a96555fd7 100644 --- a/src/USER-MISC/fix_srp.cpp +++ b/src/USER-MISC/fix_srp.cpp @@ -22,6 +22,7 @@ #include "atom.h" #include "force.h" #include "domain.h" +#include "modify.h" #include "comm.h" #include "memory.h" #include "error.h" @@ -112,19 +113,21 @@ void FixSRP::init() if ((bptype < 1) || (bptype > atom->ntypes)) error->all(FLERR,"Illegal bond particle type"); - // fix SRP should be the first fix running at the PRE_EXCHANGE step. - // Otherwise it might conflict with, e.g. fix deform + // this fix must come before any fix which migrates atoms in its pre_exchange() + // b/c this fix's pre_exchange() creates per-atom data structure + // that data must be current for atom migration to carry it along - if (modify->n_pre_exchange > 1) { - char *first = modify->fix[modify->list_pre_exchange[0]]->id; - if ((comm->me == 0) && (strcmp(id,first) != 0)) - error->warning(FLERR,"Internal fix for pair srp defined too late." - " May lead to incorrect behavior."); + for (int i = 0; i < modify->nfix; i++) { + if (modify->fix[i] == this) break; + if (modify->fix[i]->pre_exchange_migrate) + error->all(FLERR,"Fix SRP comes after a fix which " + "migrates atoms in pre_exchange"); } // setup neigh exclusions for diff atom types // bond particles do not interact with other types // type bptype only interacts with itself + char* arg1[4]; arg1[0] = (char *) "exclude"; arg1[1] = (char *) "type"; diff --git a/src/USER-MISC/pair_srp.cpp b/src/USER-MISC/pair_srp.cpp index 606fdc9fc5..d0e73b265d 100644 --- a/src/USER-MISC/pair_srp.cpp +++ b/src/USER-MISC/pair_srp.cpp @@ -79,13 +79,18 @@ PairSRP::PairSRP(LAMMPS *lmp) : Pair(lmp) segment = NULL; // generate unique fix-id for this pair style instance + fix_id = strdup("XX_FIX_SRP"); fix_id[0] = '0' + srp_instance / 10; fix_id[1] = '0' + srp_instance % 10; ++srp_instance; - // create fix SRP instance here, as it has to - // be executed before all other fixes + // create fix SRP instance here + // similar to granular pair styles with history, + // this should be early enough that FixSRP::pre_exchange() + // will be invoked before other fixes that migrate atoms + // this is checked for in FixSRP + char **fixarg = new char*[3]; fixarg[0] = fix_id; fixarg[1] = (char *) "all"; @@ -143,7 +148,6 @@ PairSRP::~PairSRP() ------------------------------------------------------------------------- */ void PairSRP::compute(int eflag, int vflag) - { // setup energy and virial ev_init(eflag, vflag); @@ -458,6 +462,7 @@ void PairSRP::init_style() error->all(FLERR,"PairSRP: Pair srp requires newton pair on"); // verify that fix SRP is still defined and has not been changed. + int ifix = modify->find_fix(fix_id); if (f_srp != (FixSRP *)modify->fix[ifix]) error->all(FLERR,"Fix SRP has been changed unexpectedly"); @@ -471,6 +476,7 @@ void PairSRP::init_style() // bonds of this type will be represented by bond particles // if bond type is 0, then all bonds have bond particles // btype = bond type + char c0[20]; char* arg0[2]; sprintf(c0, "%d", btype); @@ -506,7 +512,6 @@ void PairSRP::init_style() double PairSRP::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"PairSRP: All pair coeffs are not set"); cut[j][i] = cut[i][j]; diff --git a/src/fix.cpp b/src/fix.cpp index d86acf0ae4..024d44e5bd 100644 --- a/src/fix.cpp +++ b/src/fix.cpp @@ -79,6 +79,7 @@ Fix::Fix(LAMMPS *lmp, int /*narg*/, char **arg) : respa_level = -1; maxexchange = 0; maxexchange_dynamic = 0; + pre_exchange_migrate = 0; scalar_flag = vector_flag = array_flag = 0; peratom_flag = local_flag = 0; diff --git a/src/fix.h b/src/fix.h index bcab6f289e..fa016232f0 100644 --- a/src/fix.h +++ b/src/fix.h @@ -58,6 +58,7 @@ class Fix : protected Pointers { int respa_level; // which respa level to apply fix (1-Nrespa) int maxexchange; // max # of per-atom values for Comm::exchange() int maxexchange_dynamic; // 1 if fix sets maxexchange dynamically + int pre_exchange_migrate; // 1 if fix migrates atoms in pre_exchange() int scalar_flag; // 0/1 if compute_scalar() function exists int vector_flag; // 0/1 if compute_vector() function exists diff --git a/src/fix_balance.cpp b/src/fix_balance.cpp index 5ca1ec124a..46525796a7 100644 --- a/src/fix_balance.cpp +++ b/src/fix_balance.cpp @@ -40,6 +40,7 @@ FixBalance::FixBalance(LAMMPS *lmp, int narg, char **arg) : if (narg < 6) error->all(FLERR,"Illegal fix balance command"); box_change_domain = 1; + pre_exchange_migrate = 1; scalar_flag = 1; extscalar = 0; vector_flag = 1; diff --git a/src/fix_deform.cpp b/src/fix_deform.cpp index 9d84c4bb62..7b3239f1af 100644 --- a/src/fix_deform.cpp +++ b/src/fix_deform.cpp @@ -48,6 +48,7 @@ rfix(NULL), irregular(NULL), set(NULL) no_change_box = 1; restart_global = 1; + pre_exchange_migrate = 1; nevery = force->inumeric(FLERR,arg[3]); if (nevery <= 0) error->all(FLERR,"Illegal fix deform command"); diff --git a/src/fix_dummy.cpp b/src/fix_dummy.cpp new file mode 100644 index 0000000000..fd9d0cf062 --- /dev/null +++ b/src/fix_dummy.cpp @@ -0,0 +1,65 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "fix_dummy.h" +#include +#include "error.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +FixDummy::FixDummy(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + // process optional args + // customize here and in setmask() by adding a new keyword from fix.h + // only necessary if both of these are true: + // (a) the real fix you are placeholding for defines the method + // (b) the real fix will be defined so late in run initialization + // that the dummy fix will have already been processed by Modify::init() + // to add its index to its lists of fixes to invoke during timestepping + + initial_integrate_flag = final_integrate_flag = 0; + pre_exchange_flag = pre_neighbor_flag = 0; + pre_force_flag = post_force_flag = 0; + end_of_step_flag = 0; + + int iarg = 3; + while (iarg < narg) { + if (strcmp(arg[iarg],"initial_integrate") == 0) initial_integrate_flag = 1; + else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1; + else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1; + else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1; + else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1; + else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1; + else error->all(FLERR,"Illegal fix DUMMY command"); + iarg++; + } +} + +/* ---------------------------------------------------------------------- */ + +int FixDummy::setmask() +{ + int mask = 0; + if (initial_integrate_flag) mask |= INITIAL_INTEGRATE; + if (final_integrate_flag) mask |= FINAL_INTEGRATE; + if (pre_exchange_flag) mask |= PRE_EXCHANGE; + if (pre_neighbor_flag) mask |= PRE_NEIGHBOR; + if (pre_force_flag) mask |= PRE_FORCE; + if (post_force_flag) mask |= POST_FORCE; + if (end_of_step_flag) mask |= END_OF_STEP; + return mask; +} diff --git a/src/fix_dummy.h b/src/fix_dummy.h new file mode 100644 index 0000000000..ea8ce97c3a --- /dev/null +++ b/src/fix_dummy.h @@ -0,0 +1,53 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(DUMMY,FixDummy) + +#else + +#ifndef LMP_FIX_DUMMY_H +#define LMP_FIX_DUMMY_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixDummy : public Fix { + public: + FixDummy(class LAMMPS *, int, char **); + virtual ~FixDummy() {} + int setmask(); + + protected: + int initial_integrate_flag,final_integrate_flag; + int pre_exchange_flag,pre_neighbor_flag; + int pre_force_flag,post_force_flag; + int end_of_step_flag; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +*/ diff --git a/src/fix_neigh_history.cpp b/src/fix_neigh_history.cpp index 673e2b1c06..1967e43336 100644 --- a/src/fix_neigh_history.cpp +++ b/src/fix_neigh_history.cpp @@ -19,6 +19,7 @@ #include "comm.h" #include "neighbor.h" #include "neigh_list.h" +#include "modify.h" #include "force.h" #include "pair.h" #include "memory.h" @@ -147,6 +148,19 @@ void FixNeighHistory::init() if (atom->tag_enable == 0) error->all(FLERR,"Neighbor history requires atoms have IDs"); + // this fix must come before any fix which migrates atoms in its pre_exchange() + // b/c this fix's pre_exchange() creates per-atom data structure + // that data must be current for atom migration to carry it along + + for (int i = 0; i < modify->nfix; i++) { + if (modify->fix[i] == this) break; + if (modify->fix[i]->pre_exchange_migrate) + error->all(FLERR,"Fix neigh_history comes after a fix which " + "migrates atoms in pre_exchange"); + } + + // setup data struct + allocate_pages(); } diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index bb3fe7559c..3098a8c72c 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -492,10 +492,10 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : // pre_exchange only required if flips can occur due to shape changes if (flipflag && (p_flag[3] || p_flag[4] || p_flag[5])) - pre_exchange_flag = 1; + pre_exchange_flag = pre_exchange_migrate = 1; if (flipflag && (domain->yz != 0.0 || domain->xz != 0.0 || domain->xy != 0.0)) - pre_exchange_flag = 1; + pre_exchange_flag = pre_exchange_migrate = 1; } // convert input periods to frequencies diff --git a/src/modify.cpp b/src/modify.cpp index 101540f786..732770f34e 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -953,6 +953,46 @@ void Modify::add_fix(int narg, char **arg, int trysuffix) fix[ifix]->post_constructor(); } +/* ---------------------------------------------------------------------- + replace replaceID fix with a new fix + this is used by callers to preserve ordering of fixes + e.g. create replaceID as a FixDummy instance early in the input script + replace it later with the desired Fix instance +------------------------------------------------------------------------- */ + +void Modify::replace_fix(const char *replaceID, + int narg, char **arg, int trysuffix) +{ + int ifix = find_fix(replaceID); + if (ifix < 0) error->all(FLERR,"Modify replace_fix ID could not be found"); + + // change ID, igroup, style of fix being replaced to match new fix + // requires some error checking on arguments for new fix + + if (narg < 3) error->all(FLERR,"Illegal replace_fix invocation"); + int jfix = find_fix(arg[0]); + if (jfix >= 0) error->all(FLERR,"Replace_fix ID is already in use"); + + delete [] fix[ifix]->id; + int n = strlen(arg[0]) + 1; + fix[ifix]->id = new char[n]; + strcpy(fix[ifix]->id,arg[0]); + + int jgroup = group->find(arg[1]); + if (jgroup == -1) error->all(FLERR,"Could not find replace_fix group ID"); + fix[ifix]->igroup = jgroup; + + delete [] fix[ifix]->style; + n = strlen(arg[2]) + 1; + fix[ifix]->style = new char[n]; + strcpy(fix[ifix]->style,arg[2]); + + // invoke add_fix + // it will find and overwrite the replaceID fix + + add_fix(narg,arg,trysuffix); +} + /* ---------------------------------------------------------------------- one instance per fix in style_fix.h ------------------------------------------------------------------------- */ diff --git a/src/modify.h b/src/modify.h index b736485196..0b809d4d6a 100644 --- a/src/modify.h +++ b/src/modify.h @@ -96,6 +96,7 @@ class Modify : protected Pointers { virtual int min_reset_ref(); void add_fix(int, char **, int trysuffix=1); + void replace_fix(const char *, int, char **, int trysuffix=1); void modify_fix(int, char **); void delete_fix(const char *); void delete_fix(int); From ca0cf23a4b56e62965c9eec8858b60d88578d7ef Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 5 Nov 2019 16:59:44 -0700 Subject: [PATCH 002/577] fix a bug with indexing the replaced fix and optional args --- src/GRANULAR/pair_gran_hooke_history.cpp | 3 ++- src/GRANULAR/pair_granular.cpp | 3 ++- src/fix_dummy.cpp | 11 ++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 3375d9a7a3..3c27b9f423 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -441,7 +441,8 @@ void PairGranHookeHistory::init_style() fixarg[3] = dnumstr; modify->replace_fix("NEIGH_HISTORY_DUMMY",4,fixarg,1); delete [] fixarg; - fix_history = (FixNeighHistory *) modify->fix[modify->nfix-1]; + int ifix = modify->find_fix("NEIGH_HISTORY"); + fix_history = (FixNeighHistory *) modify->fix[modify->ifix]; fix_history->pair = this; } diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index d37ae8c00c..27547fff91 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -1051,7 +1051,8 @@ void PairGranular::init_style() fixarg[3] = dnumstr; modify->replace_fix("NEIGH_HISTORY_DUMMY",4,fixarg,1); delete [] fixarg; - fix_history = (FixNeighHistory *) modify->fix[modify->nfix-1]; + int ifix = modify->find_fix("NEIGH_HISTORY"); + fix_history = (FixNeighHistory *) modify->fix[modify->ifix]; fix_history->pair = this; } diff --git a/src/fix_dummy.cpp b/src/fix_dummy.cpp index fd9d0cf062..a08ac187ba 100644 --- a/src/fix_dummy.cpp +++ b/src/fix_dummy.cpp @@ -29,7 +29,7 @@ FixDummy::FixDummy(LAMMPS *lmp, int narg, char **arg) : // (a) the real fix you are placeholding for defines the method // (b) the real fix will be defined so late in run initialization // that the dummy fix will have already been processed by Modify::init() - // to add its index to its lists of fixes to invoke during timestepping + // so its index needs to be added to lists of fixes invoked during a run initial_integrate_flag = final_integrate_flag = 0; pre_exchange_flag = pre_neighbor_flag = 0; @@ -40,10 +40,11 @@ FixDummy::FixDummy(LAMMPS *lmp, int narg, char **arg) : while (iarg < narg) { if (strcmp(arg[iarg],"initial_integrate") == 0) initial_integrate_flag = 1; else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1; - else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1; - else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1; - else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1; - else if (strcmp(arg[iarg],"final_integrate") == 0) final_integrate_flag = 1; + else if (strcmp(arg[iarg],"pre_exchange") == 0) pre_exchange_flag = 1; + else if (strcmp(arg[iarg],"pre_neighbor") == 0) pre_neighbor_flag = 1; + else if (strcmp(arg[iarg],"pre_force") == 0) pre_force_flag = 1; + else if (strcmp(arg[iarg],"post_force") == 0) post_force_flag = 1; + else if (strcmp(arg[iarg],"end_of_step") == 0) end_of_step_flag = 1; else error->all(FLERR,"Illegal fix DUMMY command"); iarg++; } From 09e539cce198db21068db9a0023316b11b18dae6 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 6 Nov 2019 08:35:31 -0700 Subject: [PATCH 003/577] make IDs of 2 fix neigh history instances unique --- src/GRANULAR/pair_gran_hooke_history.cpp | 14 +++++++------- src/GRANULAR/pair_granular.cpp | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 3c27b9f423..87bc49e332 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -67,7 +67,7 @@ PairGranHookeHistory::PairGranHookeHistory(LAMMPS *lmp) : Pair(lmp) fix_history = NULL; char **fixarg = new char*[3]; - fixarg[0] = (char *) "NEIGH_HISTORY_DUMMY"; + fixarg[0] = (char *) "NEIGH_HISTORY_HOOKE_HERTZ_DUMMY"; fixarg[1] = (char *) "all"; fixarg[2] = (char *) "DUMMY"; modify->add_fix(3,fixarg,1); @@ -83,8 +83,8 @@ PairGranHookeHistory::~PairGranHookeHistory() delete [] svector; - if (!fix_history) modify->delete_fix("NEIGH_HISTORY_DUMMY"); - else modify->delete_fix("NEIGH_HISTORY"); + if (!fix_history) modify->delete_fix("NEIGH_HISTORY_HOOKE_HERTZ_DUMMY"); + else modify->delete_fix("NEIGH_HISTORY_HOOKE_HERTZ"); if (allocated) { memory->destroy(setflag); @@ -435,13 +435,13 @@ void PairGranHookeHistory::init_style() char dnumstr[16]; sprintf(dnumstr,"%d",size_history); char **fixarg = new char*[4]; - fixarg[0] = (char *) "NEIGH_HISTORY"; + fixarg[0] = (char *) "NEIGH_HISTORY_HOOKE_HERTZ"; fixarg[1] = (char *) "all"; fixarg[2] = (char *) "NEIGH_HISTORY"; fixarg[3] = dnumstr; - modify->replace_fix("NEIGH_HISTORY_DUMMY",4,fixarg,1); + modify->replace_fix("NEIGH_HISTORY_HOOKE_HERTZ_DUMMY",4,fixarg,1); delete [] fixarg; - int ifix = modify->find_fix("NEIGH_HISTORY"); + int ifix = modify->find_fix("NEIGH_HISTORY_HOOKE_HERTZ"); fix_history = (FixNeighHistory *) modify->fix[modify->ifix]; fix_history->pair = this; } @@ -509,7 +509,7 @@ void PairGranHookeHistory::init_style() // set fix which stores history info if (history) { - int ifix = modify->find_fix("NEIGH_HISTORY"); + int ifix = modify->find_fix("NEIGH_HISTORY_HOOKE_HERTZ"); if (ifix < 0) error->all(FLERR,"Could not find pair fix neigh history ID"); fix_history = (FixNeighHistory *) modify->fix[ifix]; } diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 27547fff91..1fe0950986 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -98,7 +98,7 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) fix_history = NULL; char **fixarg = new char*[3]; - fixarg[0] = (char *) "NEIGH_HISTORY_DUMMY"; + fixarg[0] = (char *) "NEIGH_HISTORY_GRANULAR_DUMMY"; fixarg[1] = (char *) "all"; fixarg[2] = (char *) "DUMMY"; modify->add_fix(3,fixarg,1); @@ -112,8 +112,8 @@ PairGranular::~PairGranular() { delete [] svector; - if (!fix_history) modify->delete_fix("NEIGH_HISTORY_DUMMY"); - else modify->delete_fix("NEIGH_HISTORY"); + if (!fix_history) modify->delete_fix("NEIGH_HISTORY_GRANULAR_DUMMY"); + else modify->delete_fix("NEIGH_HISTORY_GRANULAR"); if (allocated) { memory->destroy(setflag); @@ -1045,13 +1045,13 @@ void PairGranular::init_style() char dnumstr[16]; sprintf(dnumstr,"%d",size_history); char **fixarg = new char*[4]; - fixarg[0] = (char *) "NEIGH_HISTORY"; + fixarg[0] = (char *) "NEIGH_HISTORY_GRANULAR"; fixarg[1] = (char *) "all"; fixarg[2] = (char *) "NEIGH_HISTORY"; fixarg[3] = dnumstr; - modify->replace_fix("NEIGH_HISTORY_DUMMY",4,fixarg,1); + modify->replace_fix("NEIGH_HISTORY_GRANULAR_DUMMY",4,fixarg,1); delete [] fixarg; - int ifix = modify->find_fix("NEIGH_HISTORY"); + int ifix = modify->find_fix("NEIGH_HISTORY_GRANULAR"); fix_history = (FixNeighHistory *) modify->fix[modify->ifix]; fix_history->pair = this; } @@ -1122,7 +1122,7 @@ void PairGranular::init_style() // set fix which stores history info if (size_history > 0) { - int ifix = modify->find_fix("NEIGH_HISTORY"); + int ifix = modify->find_fix("NEIGH_HISTORY_GRANULAR"); if (ifix < 0) error->all(FLERR,"Could not find pair fix neigh history ID"); fix_history = (FixNeighHistory *) modify->fix[ifix]; } From d34502669c69992ebaccff5ab427db93d6b334cd Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 6 Nov 2019 09:38:38 -0700 Subject: [PATCH 004/577] fixed a typo --- src/GRANULAR/pair_gran_hooke_history.cpp | 18 +++++++++--------- src/GRANULAR/pair_granular.cpp | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 87bc49e332..0c88dd8eed 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -67,12 +67,12 @@ PairGranHookeHistory::PairGranHookeHistory(LAMMPS *lmp) : Pair(lmp) fix_history = NULL; char **fixarg = new char*[3]; - fixarg[0] = (char *) "NEIGH_HISTORY_HOOKE_HERTZ_DUMMY"; + fixarg[0] = (char *) "NEIGH_HISTORY_HH_DUMMY"; fixarg[1] = (char *) "all"; fixarg[2] = (char *) "DUMMY"; modify->add_fix(3,fixarg,1); delete [] fixarg; - fix_dummy = (FixDummy *) modify->fix[modify->nfix-1]; + fix_dummy = (FixDummy *) modify->fix[nfix-1]; } /* ---------------------------------------------------------------------- */ @@ -83,8 +83,8 @@ PairGranHookeHistory::~PairGranHookeHistory() delete [] svector; - if (!fix_history) modify->delete_fix("NEIGH_HISTORY_HOOKE_HERTZ_DUMMY"); - else modify->delete_fix("NEIGH_HISTORY_HOOKE_HERTZ"); + if (!fix_history) modify->delete_fix("NEIGH_HISTORY_HH_DUMMY"); + else modify->delete_fix("NEIGH_HISTORY_HH"); if (allocated) { memory->destroy(setflag); @@ -435,14 +435,14 @@ void PairGranHookeHistory::init_style() char dnumstr[16]; sprintf(dnumstr,"%d",size_history); char **fixarg = new char*[4]; - fixarg[0] = (char *) "NEIGH_HISTORY_HOOKE_HERTZ"; + fixarg[0] = (char *) "NEIGH_HISTORY_HH"; fixarg[1] = (char *) "all"; fixarg[2] = (char *) "NEIGH_HISTORY"; fixarg[3] = dnumstr; - modify->replace_fix("NEIGH_HISTORY_HOOKE_HERTZ_DUMMY",4,fixarg,1); + modify->replace_fix("NEIGH_HISTORY_HH_DUMMY",4,fixarg,1); delete [] fixarg; - int ifix = modify->find_fix("NEIGH_HISTORY_HOOKE_HERTZ"); - fix_history = (FixNeighHistory *) modify->fix[modify->ifix]; + int ifix = modify->find_fix("NEIGH_HISTORY_HH"); + fix_history = (FixNeighHistory *) modify->fix[ifix]; fix_history->pair = this; } @@ -509,7 +509,7 @@ void PairGranHookeHistory::init_style() // set fix which stores history info if (history) { - int ifix = modify->find_fix("NEIGH_HISTORY_HOOKE_HERTZ"); + int ifix = modify->find_fix("NEIGH_HISTORY_HH"); if (ifix < 0) error->all(FLERR,"Could not find pair fix neigh history ID"); fix_history = (FixNeighHistory *) modify->fix[ifix]; } diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 1fe0950986..ba7a3bce50 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -103,7 +103,7 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) fixarg[2] = (char *) "DUMMY"; modify->add_fix(3,fixarg,1); delete [] fixarg; - fix_dummy = (FixDummy *) modify->fix[modify->nfix-1]; + fix_dummy = (FixDummy *) modify->fix[nfix-1]; } /* ---------------------------------------------------------------------- */ @@ -1052,7 +1052,7 @@ void PairGranular::init_style() modify->replace_fix("NEIGH_HISTORY_GRANULAR_DUMMY",4,fixarg,1); delete [] fixarg; int ifix = modify->find_fix("NEIGH_HISTORY_GRANULAR"); - fix_history = (FixNeighHistory *) modify->fix[modify->ifix]; + fix_history = (FixNeighHistory *) modify->fix[ifix]; fix_history->pair = this; } From 6af726e58968ae2bd9baca795d868a17ad4b9543 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 6 Nov 2019 10:26:13 -0700 Subject: [PATCH 005/577] undo a re-bug change - sigh --- src/GRANULAR/pair_gran_hooke_history.cpp | 2 +- src/GRANULAR/pair_granular.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 0c88dd8eed..29ca53d361 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -72,7 +72,7 @@ PairGranHookeHistory::PairGranHookeHistory(LAMMPS *lmp) : Pair(lmp) fixarg[2] = (char *) "DUMMY"; modify->add_fix(3,fixarg,1); delete [] fixarg; - fix_dummy = (FixDummy *) modify->fix[nfix-1]; + fix_dummy = (FixDummy *) modify->fix[modify->nfix-1]; } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index ba7a3bce50..fef8ded5f7 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -103,7 +103,7 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) fixarg[2] = (char *) "DUMMY"; modify->add_fix(3,fixarg,1); delete [] fixarg; - fix_dummy = (FixDummy *) modify->fix[nfix-1]; + fix_dummy = (FixDummy *) modify->fix[modify->nfix-1]; } /* ---------------------------------------------------------------------- */ From 3736af0aaf5f1522e1e48ceb5fceeaada30cb3e2 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 26 Nov 2019 13:42:32 -0700 Subject: [PATCH 006/577] initial refactoring on AtomVec class --- src/DIPOLE/atom_vec_dipole.cpp | 888 +---------- src/DIPOLE/atom_vec_dipole.h | 45 - src/MOLECULE/atom_vec_angle.cpp | 956 ++---------- src/MOLECULE/atom_vec_angle.h | 53 +- src/MOLECULE/atom_vec_bond.cpp | 865 +---------- src/MOLECULE/atom_vec_bond.h | 47 +- src/MOLECULE/atom_vec_full.cpp | 1191 ++------------- src/MOLECULE/atom_vec_full.h | 60 +- src/MOLECULE/atom_vec_molecular.cpp | 1171 ++------------- src/MOLECULE/atom_vec_molecular.h | 56 +- src/MOLECULE/atom_vec_template.cpp | 804 +--------- src/MOLECULE/atom_vec_template.h | 50 +- src/PERI/atom_vec_peri.cpp | 905 +----------- src/PERI/atom_vec_peri.h | 48 - src/SPIN/atom_vec_spin.cpp | 928 +----------- src/SPIN/atom_vec_spin.h | 54 - src/atom.cpp | 220 ++- src/atom.h | 160 +- src/atom_vec.cpp | 2112 ++++++++++++++++++++++++++- src/atom_vec.h | 143 +- src/atom_vec_atomic.cpp | 677 +-------- src/atom_vec_atomic.h | 40 +- src/atom_vec_charge.cpp | 764 +--------- src/atom_vec_charge.h | 45 - src/atom_vec_sphere.cpp | 1153 +-------------- src/atom_vec_sphere.h | 52 - 26 files changed, 3191 insertions(+), 10296 deletions(-) diff --git a/src/DIPOLE/atom_vec_dipole.cpp b/src/DIPOLE/atom_vec_dipole.cpp index 0b6a27888f..dc3279227d 100644 --- a/src/DIPOLE/atom_vec_dipole.cpp +++ b/src/DIPOLE/atom_vec_dipole.cpp @@ -31,880 +31,40 @@ AtomVecDipole::AtomVecDipole(LAMMPS *lmp) : AtomVec(lmp) molecular = 0; mass_type = 1; - comm_x_only = 0; - comm_f_only = 1; - size_forward = 6; - size_reverse = 3; - size_border = 11; - size_velocity = 3; - size_data_atom = 9; - size_data_vel = 4; - xcol_data = 4; - atom->q_flag = atom->mu_flag = 1; -} -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecDipole::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - q = memory->grow(atom->q,nmax,"atom:q"); - mu = memory->grow(atom->mu,nmax,4,"atom:mu"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecDipole::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - q = atom->q; mu = atom->mu; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecDipole::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - q[j] = q[i]; - mu[j][0] = mu[i][0]; - mu[j][1] = mu[i][1]; - mu[j][2] = mu[i][2]; - mu[j][3] = mu[i][3]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDipole::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDipole::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDipole::pack_comm_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecDipole::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - mu[i][0] = buf[m++]; - mu[i][1] = buf[m++]; - mu[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecDipole::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - mu[i][0] = buf[m++]; - mu[i][1] = buf[m++]; - mu[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDipole::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - mu[i][0] = buf[m++]; - mu[i][1] = buf[m++]; - mu[i][2] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDipole::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecDipole::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDipole::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - buf[m++] = mu[j][3]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - buf[m++] = mu[j][3]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDipole::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - buf[m++] = mu[j][3]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - buf[m++] = mu[j][3]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - buf[m++] = mu[j][3]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDipole::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = q[j]; - buf[m++] = mu[j][0]; - buf[m++] = mu[j][1]; - buf[m++] = mu[j][2]; - buf[m++] = mu[j][3]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecDipole::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - q[i] = buf[m++]; - mu[i][0] = buf[m++]; - mu[i][1] = buf[m++]; - mu[i][2] = buf[m++]; - mu[i][3] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecDipole::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - q[i] = buf[m++]; - mu[i][0] = buf[m++]; - mu[i][1] = buf[m++]; - mu[i][2] = buf[m++]; - mu[i][3] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDipole::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - q[i] = buf[m++]; - mu[i][0] = buf[m++]; - mu[i][1] = buf[m++]; - mu[i][2] = buf[m++]; - mu[i][3] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- - pack all atom quantities for shipping to another proc - xyz must be 1st 3 values, so that comm::exchange can test on them -------------------------------------------------------------------------- */ - -int AtomVecDipole::pack_exchange(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = q[i]; - buf[m++] = mu[i][0]; - buf[m++] = mu[i][1]; - buf[m++] = mu[i][2]; - buf[m++] = mu[i][3]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDipole::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - q[nlocal] = buf[m++]; - mu[nlocal][0] = buf[m++]; - mu[nlocal][1] = buf[m++]; - mu[nlocal][2] = buf[m++]; - mu[nlocal][3] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecDipole::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 16 * nlocal; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecDipole::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = q[i]; - buf[m++] = mu[i][0]; - buf[m++] = mu[i][1]; - buf[m++] = mu[i][2]; - buf[m++] = mu[i][3]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecDipole::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - q[nlocal] = buf[m++]; - mu[nlocal][0] = buf[m++]; - mu[nlocal][1] = buf[m++]; - mu[nlocal][2] = buf[m++]; - mu[nlocal][3] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecDipole::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - q[nlocal] = 0.0; - mu[nlocal][0] = 0.0; - mu[nlocal][1] = 0.0; - mu[nlocal][2] = 0.0; - mu[nlocal][3] = 0.0; - - atom->nlocal++; + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "q mu"; + fields_copy = (char *) "q mu"; + fields_comm = (char *) "mu3"; + fields_comm_vel = (char *) "mu3"; + fields_reverse = NULL; + fields_border = (char *) "q mu"; + fields_border_vel = (char *) "q mu"; + fields_exchange = (char *) "q mu"; + fields_restart = (char *) "q mu"; + fields_create = (char *) "q mu"; + fields_data_atom = (char *) "id type q x mu3"; + fields_data_vel = NULL; + + setup_fields(); } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file - initialize other atom quantities + modify what the default AtomVec::data_atom() just initialized ------------------------------------------------------------------------- */ void AtomVecDipole::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::data_atom(coord,imagetmp,values); - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - q[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - mu[nlocal][0] = utils::numeric(FLERR,values[6],true,lmp); - mu[nlocal][1] = utils::numeric(FLERR,values[7],true,lmp); - mu[nlocal][2] = utils::numeric(FLERR,values[8],true,lmp); - mu[nlocal][3] = sqrt(mu[nlocal][0]*mu[nlocal][0] + - mu[nlocal][1]*mu[nlocal][1] + - mu[nlocal][2]*mu[nlocal][2]); - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - atom->nlocal++; + int ilocal = atom->nlocal-1; + double mu = atom->mu[ilocal]; + mu[3] = sqrt(mu[0]*mu[0] + mu[1]*mu[1] + mu[2]*mu[2]); } -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecDipole::data_atom_hybrid(int nlocal, char **values) -{ - q[nlocal] = utils::numeric(FLERR,values[0],true,lmp); - mu[nlocal][0] = utils::numeric(FLERR,values[1],true,lmp); - mu[nlocal][1] = utils::numeric(FLERR,values[2],true,lmp); - mu[nlocal][2] = utils::numeric(FLERR,values[3],true,lmp); - mu[nlocal][3] = sqrt(mu[nlocal][0]*mu[nlocal][0] + - mu[nlocal][1]*mu[nlocal][1] + - mu[nlocal][2]*mu[nlocal][2]); - return 4; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecDipole::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = q[i]; - buf[i][3] = x[i][0]; - buf[i][4] = x[i][1]; - buf[i][5] = x[i][2]; - buf[i][6] = mu[i][0]; - buf[i][7] = mu[i][1]; - buf[i][8] = mu[i][2]; - buf[i][9] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][10] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][11] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecDipole::pack_data_hybrid(int i, double *buf) -{ - buf[0] = q[i]; - buf[1] = mu[i][0]; - buf[2] = mu[i][1]; - buf[3] = mu[i][2]; - return 4; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecDipole::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT \ - " %d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e " - "%-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4], - buf[i][5],buf[i][6],buf[i][7],buf[i][8], - (int) ubuf(buf[i][9]).i,(int) ubuf(buf[i][10]).i, - (int) ubuf(buf[i][11]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecDipole::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %-1.16e %-1.16e %-1.16e",buf[0],buf[1],buf[2],buf[3]); - return 4; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecDipole::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("q")) bytes += memory->usage(q,nmax); - if (atom->memcheck("mu")) bytes += memory->usage(mu,nmax,4); - - return bytes; -} diff --git a/src/DIPOLE/atom_vec_dipole.h b/src/DIPOLE/atom_vec_dipole.h index c6ee23def1..6abcb4e2ea 100644 --- a/src/DIPOLE/atom_vec_dipole.h +++ b/src/DIPOLE/atom_vec_dipole.h @@ -27,43 +27,7 @@ namespace LAMMPS_NS { class AtomVecDipole : public AtomVec { public: AtomVecDipole(class LAMMPS *); - void grow(int); - void grow_reset(); - void copy(int, int, int); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - bigint memory_usage(); - - private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double *q,**mu; }; } @@ -73,13 +37,4 @@ class AtomVecDipole : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - */ diff --git a/src/MOLECULE/atom_vec_angle.cpp b/src/MOLECULE/atom_vec_angle.cpp index 4eba471b8f..79f5a7853e 100644 --- a/src/MOLECULE/atom_vec_angle.cpp +++ b/src/MOLECULE/atom_vec_angle.cpp @@ -13,13 +13,6 @@ #include "atom_vec_angle.h" #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" -#include "memory.h" -#include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -31,895 +24,140 @@ AtomVecAngle::AtomVecAngle(LAMMPS *lmp) : AtomVec(lmp) bonds_allow = angles_allow = 1; mass_type = 1; - comm_x_only = comm_f_only = 1; - size_forward = 3; - size_reverse = 3; - size_border = 7; - size_velocity = 3; - size_data_atom = 6; - size_data_vel = 4; - xcol_data = 4; - atom->molecule_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) + "molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 nspecial special"; + fields_copy = (char *) + "molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 nspecial special"; + fields_comm = NULL; + fields_comm_vel = NULL; + fields_reverse = NULL; + fields_border = (char *) "molecule"; + fields_border_vel = (char *) "molecule"; + fields_exchange = (char *) + "molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 nspecial special"; + fields_restart = (char *) + "molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3"; + fields_create = (char *) "molecule num_bond num_angle nspecial"; + fields_data_atom = (char *) "id molecule type x"; + fields_data_vel = NULL; + + setup_fields(); + + bond_per_atom = angle_per_atom = 0; + bond_negative = angle_negative = NULL; +} + +/* ---------------------------------------------------------------------- */ + +AtomVecAngle::~AtomVecAngle() +{ + delete [] bond_negative; + delete [] angle_negative; } /* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n + pack atom I's data for restart file + modify/unmodify values for default AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -void AtomVecAngle::grow(int n) +int AtomVecAngle::pack_restart(int i, double *buf) { - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); + // insure negative vectors are needed length - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); - - nspecial = memory->grow(atom->nspecial,nmax,3,"atom:nspecial"); - special = memory->grow(atom->special,nmax,atom->maxspecial,"atom:special"); - - num_bond = memory->grow(atom->num_bond,nmax,"atom:num_bond"); - bond_type = memory->grow(atom->bond_type,nmax,atom->bond_per_atom, - "atom:bond_type"); - bond_atom = memory->grow(atom->bond_atom,nmax,atom->bond_per_atom, - "atom:bond_atom"); - - num_angle = memory->grow(atom->num_angle,nmax,"atom:num_angle"); - angle_type = memory->grow(atom->angle_type,nmax,atom->angle_per_atom, - "atom:angle_type"); - angle_atom1 = memory->grow(atom->angle_atom1,nmax,atom->angle_per_atom, - "atom:angle_atom1"); - angle_atom2 = memory->grow(atom->angle_atom2,nmax,atom->angle_per_atom, - "atom:angle_atom2"); - angle_atom3 = memory->grow(atom->angle_atom3,nmax,atom->angle_per_atom, - "atom:angle_atom3"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecAngle::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - molecule = atom->molecule; - nspecial = atom->nspecial; special = atom->special; - num_bond = atom->num_bond; bond_type = atom->bond_type; - bond_atom = atom->bond_atom; - num_angle = atom->num_angle; angle_type = atom->angle_type; - angle_atom1 = atom->angle_atom1; angle_atom2 = atom->angle_atom2; - angle_atom3 = atom->angle_atom3; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecAngle::copy(int i, int j, int delflag) -{ - int k; - - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - molecule[j] = molecule[i]; - - num_bond[j] = num_bond[i]; - for (k = 0; k < num_bond[j]; k++) { - bond_type[j][k] = bond_type[i][k]; - bond_atom[j][k] = bond_atom[i][k]; + if (bond_per_atom < atom->bond_per_atom) { + delete [] bond_negative; + bond_per_atom = atom->bond_per_atom; + bond_negative = new int[bond_per_atom]; + } + if (angle_per_atom < atom->angle_per_atom) { + delete [] angle_negative; + angle_per_atom = atom->angle_per_atom; + angle_negative = new int[angle_per_atom]; } - num_angle[j] = num_angle[i]; - for (k = 0; k < num_angle[j]; k++) { - angle_type[j][k] = angle_type[i][k]; - angle_atom1[j][k] = angle_atom1[i][k]; - angle_atom2[j][k] = angle_atom2[i][k]; - angle_atom3[j][k] = angle_atom3[i][k]; + // flip any negative types to positive and flag which ones + + int *num_bond = atom->num_bond; + int **bond_type = atom->bond_type; + int *num_angle = atom->num_angle; + int **angle_type = atom->angle_type; + + int any_bond_negative = 0; + for (int m = 0; m < num_bond[i]; m++) { + if (bond_type[i][m] < 0) { + bond_negative[m] = 1; + bond_type[i][m] = -bond_type[i][m]; + any_bond_negative = 1; + } else bond_negative[m] = 0; } - nspecial[j][0] = nspecial[i][0]; - nspecial[j][1] = nspecial[i][1]; - nspecial[j][2] = nspecial[i][2]; - for (k = 0; k < nspecial[j][2]; k++) special[j][k] = special[i][k]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAngle::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAngle::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecAngle::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecAngle::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAngle::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecAngle::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAngle::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - } + int any_angle_negative = 0; + for (int m = 0; m < num_angle[i]; m++) { + if (angle_type[i][m] < 0) { + angle_negative[m] = 1; + angle_type[i][m] = -angle_type[i][m]; + any_angle_negative = 1; + } else angle_negative[m] = 0; } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); + // perform the pack with adjusted values - return m; -} + int n = AtomVec::pack_restart(i,buf); -/* ---------------------------------------------------------------------- */ + // restore the flagged types to their negative values -int AtomVecAngle::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } + if (any_bond_negative) { + for (int m = 0; m < num_bond[i]; m++) + if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAngle::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = ubuf(molecule[j]).d; + if (any_angle_negative) { + for (int m = 0; m < num_angle[i]; m++) + if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecAngle::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecAngle::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAngle::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) - molecule[i] = (tagint) ubuf(buf[m++]).i; - return m; -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them -------------------------------------------------------------------------- */ - -int AtomVecAngle::pack_exchange(int i, double *buf) -{ - int k; - - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = ubuf(molecule[i]).d; - - buf[m++] = ubuf(num_bond[i]).d; - for (k = 0; k < num_bond[i]; k++) { - buf[m++] = ubuf(bond_type[i][k]).d; - buf[m++] = ubuf(bond_atom[i][k]).d; - } - - buf[m++] = ubuf(num_angle[i]).d; - for (k = 0; k < num_angle[i]; k++) { - buf[m++] = ubuf(angle_type[i][k]).d; - buf[m++] = ubuf(angle_atom1[i][k]).d; - buf[m++] = ubuf(angle_atom2[i][k]).d; - buf[m++] = ubuf(angle_atom3[i][k]).d; - } - - buf[m++] = ubuf(nspecial[i][0]).d; - buf[m++] = ubuf(nspecial[i][1]).d; - buf[m++] = ubuf(nspecial[i][2]).d; - for (k = 0; k < nspecial[i][2]; k++) buf[m++] = ubuf(special[i][k]).d; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAngle::unpack_exchange(double *buf) -{ - int k; - - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - - num_bond[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_bond[nlocal]; k++) { - bond_type[nlocal][k] = (int) ubuf(buf[m++]).i; - bond_atom[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_angle[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_angle[nlocal]; k++) { - angle_type[nlocal][k] = (int) ubuf(buf[m++]).i; - angle_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - nspecial[nlocal][0] = (int) ubuf(buf[m++]).i; - nspecial[nlocal][1] = (int) ubuf(buf[m++]).i; - nspecial[nlocal][2] = (int) ubuf(buf[m++]).i; - for (k = 0; k < nspecial[nlocal][2]; k++) - special[nlocal][k] = (tagint) ubuf(buf[m++]).i; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecAngle::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 0; - for (i = 0; i < nlocal; i++) - n += 14 + 2*num_bond[i] + 4*num_angle[i]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); return n; } -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecAngle::pack_restart(int i, double *buf) -{ - int k; - - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = ubuf(molecule[i]).d; - - buf[m++] = ubuf(num_bond[i]).d; - for (k = 0; k < num_bond[i]; k++) { - buf[m++] = ubuf(MAX(bond_type[i][k],-bond_type[i][k])).d; - buf[m++] = ubuf(bond_atom[i][k]).d; - } - - buf[m++] = ubuf(num_angle[i]).d; - for (k = 0; k < num_angle[i]; k++) { - buf[m++] = ubuf(MAX(angle_type[i][k],-angle_type[i][k])).d; - buf[m++] = ubuf(angle_atom1[i][k]).d; - buf[m++] = ubuf(angle_atom2[i][k]).d; - buf[m++] = ubuf(angle_atom3[i][k]).d; - } - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - /* ---------------------------------------------------------------------- unpack data for one atom from restart file including extra quantities + initialize other atom quantities ------------------------------------------------------------------------- */ int AtomVecAngle::unpack_restart(double *buf) { - int k; + AtomVec::unpack_restart(buf); + int ilocal = atom->nlocal-1; - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - - num_bond[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_bond[nlocal]; k++) { - bond_type[nlocal][k] = (int) ubuf(buf[m++]).i; - bond_atom[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_angle[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_angle[nlocal]; k++) { - angle_type[nlocal][k] = (int) ubuf(buf[m++]).i; - angle_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - nspecial[nlocal][0] = nspecial[nlocal][1] = nspecial[nlocal][2] = 0; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecAngle::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - molecule[nlocal] = 0; - num_bond[nlocal] = 0; - num_angle[nlocal] = 0; - nspecial[nlocal][0] = nspecial[nlocal][1] = nspecial[nlocal][2] = 0; - - atom->nlocal++; + atom->nspecial[ilocal][0] = 0; + atom->nspecial[ilocal][1] = 0; + atom->nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file - initialize other atom quantities + modify what default AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ void AtomVecAngle::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::data_atom(coord,imagetmp,values); + int ilocal = atom->nlocal-1; - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - num_bond[nlocal] = 0; - num_angle[nlocal] = 0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecAngle::data_atom_hybrid(int nlocal, char **values) -{ - molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - - num_bond[nlocal] = 0; - num_angle[nlocal] = 0; - - return 1; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecAngle::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(molecule[i]).d; - buf[i][2] = ubuf(type[i]).d; - buf[i][3] = x[i][0]; - buf[i][4] = x[i][1]; - buf[i][5] = x[i][2]; - buf[i][6] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][7] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecAngle::pack_data_hybrid(int i, double *buf) -{ - buf[0] = ubuf(molecule[i]).d; - return 1; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecAngle::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " " TAGINT_FORMAT - " %d %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(tagint) ubuf(buf[i][1]).i, - (int) ubuf(buf[i][2]).i, - buf[i][3],buf[i][4],buf[i][5], - (int) ubuf(buf[i][6]).i,(int) ubuf(buf[i][7]).i, - (int) ubuf(buf[i][8]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecAngle::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," " TAGINT_FORMAT,(tagint) ubuf(buf[0]).i); - return 1; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecAngle::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); - if (atom->memcheck("nspecial")) bytes += memory->usage(nspecial,nmax,3); - if (atom->memcheck("special")) - bytes += memory->usage(special,nmax,atom->maxspecial); - - if (atom->memcheck("num_bond")) bytes += memory->usage(num_bond,nmax); - if (atom->memcheck("bond_type")) - bytes += memory->usage(bond_type,nmax,atom->bond_per_atom); - if (atom->memcheck("bond_atom")) - bytes += memory->usage(bond_atom,nmax,atom->bond_per_atom); - - if (atom->memcheck("num_angle")) bytes += memory->usage(num_angle,nmax); - if (atom->memcheck("angle_type")) - bytes += memory->usage(angle_type,nmax,atom->angle_per_atom); - if (atom->memcheck("angle_atom1")) - bytes += memory->usage(angle_atom1,nmax,atom->angle_per_atom); - if (atom->memcheck("angle_atom2")) - bytes += memory->usage(angle_atom2,nmax,atom->angle_per_atom); - if (atom->memcheck("angle_atom3")) - bytes += memory->usage(angle_atom3,nmax,atom->angle_per_atom); - - return bytes; + atom->num_bond[ilocal] = 0; + atom->num_angle[ilocal] = 0; + atom->nspecial[ilocal][0] = 0; + atom->nspecial[ilocal][1] = 0; + atom->nspecial[ilocal][2] = 0; } diff --git a/src/MOLECULE/atom_vec_angle.h b/src/MOLECULE/atom_vec_angle.h index 9030cce0d8..6511b517ee 100644 --- a/src/MOLECULE/atom_vec_angle.h +++ b/src/MOLECULE/atom_vec_angle.h @@ -27,50 +27,14 @@ namespace LAMMPS_NS { class AtomVecAngle : public AtomVec { public: AtomVecAngle(class LAMMPS *); - virtual ~AtomVecAngle() {} - void grow(int); - void grow_reset(); - void copy(int, int, int); - virtual int pack_comm(int, int *, double *, int, int *); - virtual int pack_comm_vel(int, int *, double *, int, int *); - virtual void unpack_comm(int, int, double *); - virtual void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - virtual int pack_border(int, int *, double *, int, int *); - virtual int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - virtual void unpack_border(int, int, double *); - virtual void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - virtual int pack_exchange(int, double *); - virtual int unpack_exchange(double *); - int size_restart(); + ~AtomVecAngle(); int pack_restart(int, double *); int unpack_restart(double *); - void create_atom(int, double *); void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - bigint memory_usage(); - protected: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - tagint *molecule; - int **nspecial; - tagint **special; - int *num_bond; - int **bond_type; - tagint **bond_atom; - int *num_angle; - int **angle_type; - tagint **angle_atom1,**angle_atom2,**angle_atom3; + private: + int bond_per_atom,angle_per_atom; + int *bond_negative,*angle_negative; }; } @@ -80,13 +44,4 @@ class AtomVecAngle : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - */ diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index 0bcd614f94..20cdfdd65a 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -13,13 +13,6 @@ #include "atom_vec_bond.h" #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" -#include "memory.h" -#include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -31,829 +24,113 @@ AtomVecBond::AtomVecBond(LAMMPS *lmp) : AtomVec(lmp) bonds_allow = 1; mass_type = 1; - comm_x_only = comm_f_only = 1; - size_forward = 3; - size_reverse = 3; - size_border = 7; - size_velocity = 3; - size_data_atom = 6; - size_data_vel = 4; - xcol_data = 4; - atom->molecule_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) + "molecule num_bond bond_type bond_atom nspecial special"; + fields_copy = (char *) + "molecule num_bond bond_type bond_atom nspecial special"; + fields_comm = NULL; + fields_comm_vel = NULL; + fields_reverse = NULL; + fields_border = (char *) "molecule"; + fields_border_vel = (char *) "molecule"; + fields_exchange = (char *) + "molecule num_bond bond_type bond_atom nspecial special"; + fields_restart = (char *) "molecule num_bond bond_type bond_atom"; + fields_create = (char *) "molecule num_bond nspecial"; + fields_data_atom = (char *) "id molecule type x"; + fields_data_vel = NULL; + + setup_fields(); + + bond_per_atom = 0; + bond_negative = NULL; +} + +/* ---------------------------------------------------------------------- */ + +AtomVecBond::~AtomVecBond() +{ + delete [] bond_negative; } /* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n + pack atom I's data for restart file + modify/unmodify values for default AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -void AtomVecBond::grow(int n) +int AtomVecBond::pack_restart(int i, double *buf) { - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); + // insure bond_negative vector is needed length - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); - - nspecial = memory->grow(atom->nspecial,nmax,3,"atom:nspecial"); - special = memory->grow(atom->special,nmax,atom->maxspecial,"atom:special"); - - num_bond = memory->grow(atom->num_bond,nmax,"atom:num_bond"); - bond_type = memory->grow(atom->bond_type,nmax,atom->bond_per_atom, - "atom:bond_type"); - bond_atom = memory->grow(atom->bond_atom,nmax,atom->bond_per_atom, - "atom:bond_atom"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecBond::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - molecule = atom->molecule; - nspecial = atom->nspecial; special = atom->special; - num_bond = atom->num_bond; bond_type = atom->bond_type; - bond_atom = atom->bond_atom; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecBond::copy(int i, int j, int delflag) -{ - int k; - - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - molecule[j] = molecule[i]; - - num_bond[j] = num_bond[i]; - for (k = 0; k < num_bond[j]; k++) { - bond_type[j][k] = bond_type[i][k]; - bond_atom[j][k] = bond_atom[i][k]; + if (bond_per_atom < atom->bond_per_atom) { + delete [] bond_negative; + bond_per_atom = atom->bond_per_atom; + bond_negative = new int[bond_per_atom]; } - nspecial[j][0] = nspecial[i][0]; - nspecial[j][1] = nspecial[i][1]; - nspecial[j][2] = nspecial[i][2]; - for (k = 0; k < nspecial[j][2]; k++) special[j][k] = special[i][k]; + // flip any negative types to positive and flag which ones - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} + int *num_bond = atom->num_bond; + int **bond_type = atom->bond_type; -/* ---------------------------------------------------------------------- */ - -int AtomVecBond::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBond::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecBond::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecBond::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBond::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecBond::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBond::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - } + int any_bond_negative = 0; + for (int m = 0; m < num_bond[i]; m++) { + if (bond_type[i][m] < 0) { + bond_negative[m] = 1; + bond_type[i][m] = -bond_type[i][m]; + any_bond_negative = 1; + } else bond_negative[m] = 0; } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); + // perform the pack with adjusted values - return m; -} + int n = AtomVec::pack_restart(i,buf); -/* ---------------------------------------------------------------------- */ + // restore the flagged types to their negative values -int AtomVecBond::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } + if (any_bond_negative) { + for (int m = 0; m < num_bond[i]; m++) + if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBond::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = ubuf(molecule[j]).d; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecBond::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecBond::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBond::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) - molecule[i] = (tagint) ubuf(buf[m++]).i; - return m; -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them -------------------------------------------------------------------------- */ - -int AtomVecBond::pack_exchange(int i, double *buf) -{ - int k; - - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = ubuf(molecule[i]).d; - - buf[m++] = ubuf(num_bond[i]).d; - for (k = 0; k < num_bond[i]; k++) { - buf[m++] = ubuf(bond_type[i][k]).d; - buf[m++] = ubuf(bond_atom[i][k]).d; - } - - buf[m++] = ubuf(nspecial[i][0]).d; - buf[m++] = ubuf(nspecial[i][1]).d; - buf[m++] = ubuf(nspecial[i][2]).d; - for (k = 0; k < nspecial[i][2]; k++) buf[m++] = ubuf(special[i][k]).d; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBond::unpack_exchange(double *buf) -{ - int k; - - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - - num_bond[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_bond[nlocal]; k++) { - bond_type[nlocal][k] = (int) ubuf(buf[m++]).i; - bond_atom[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - nspecial[nlocal][0] = (int) ubuf(buf[m++]).i; - nspecial[nlocal][1] = (int) ubuf(buf[m++]).i; - nspecial[nlocal][2] = (int) ubuf(buf[m++]).i; - for (k = 0; k < nspecial[nlocal][2]; k++) - special[nlocal][k] = (tagint) ubuf(buf[m++]).i; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecBond::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 0; - for (i = 0; i < nlocal; i++) - n += 13 + 2*num_bond[i]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - return n; } -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecBond::pack_restart(int i, double *buf) -{ - int k; - - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = ubuf(molecule[i]).d; - - buf[m++] = ubuf(num_bond[i]).d; - for (k = 0; k < num_bond[i]; k++) { - buf[m++] = ubuf(MAX(bond_type[i][k],-bond_type[i][k])).d; - buf[m++] = ubuf(bond_atom[i][k]).d; - } - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - /* ---------------------------------------------------------------------- unpack data for one atom from restart file including extra quantities + initialize other atom quantities ------------------------------------------------------------------------- */ int AtomVecBond::unpack_restart(double *buf) { - int k; + AtomVec::unpack_restart(buf); + int ilocal = atom->nlocal-1; - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - - num_bond[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_bond[nlocal]; k++) { - bond_type[nlocal][k] = (int) ubuf(buf[m++]).i; - bond_atom[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - nspecial[nlocal][0] = nspecial[nlocal][1] = nspecial[nlocal][2] = 0; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecBond::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - molecule[nlocal] = 0; - num_bond[nlocal] = 0; - nspecial[nlocal][0] = nspecial[nlocal][1] = nspecial[nlocal][2] = 0; - - atom->nlocal++; + atom->nspecial[ilocal][0] = 0; + atom->nspecial[ilocal][1] = 0; + atom->nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file - initialize other atom quantities + modify what default AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ void AtomVecBond::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::data_atom(coord,imagetmp,values); + int ilocal = atom->nlocal-1; - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - num_bond[nlocal] = 0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecBond::data_atom_hybrid(int nlocal, char **values) -{ - molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - - num_bond[nlocal] = 0; - - return 1; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecBond::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(molecule[i]).d; - buf[i][2] = ubuf(type[i]).d; - buf[i][3] = x[i][0]; - buf[i][4] = x[i][1]; - buf[i][5] = x[i][2]; - buf[i][6] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][7] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecBond::pack_data_hybrid(int i, double *buf) -{ - buf[0] = ubuf(molecule[i]).d; - return 1; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecBond::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " " TAGINT_FORMAT - " %d %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(tagint) ubuf(buf[i][1]).i, - (int) ubuf(buf[i][2]).i, - buf[i][3],buf[i][4],buf[i][5], - (int) ubuf(buf[i][6]).i,(int) ubuf(buf[i][7]).i, - (int) ubuf(buf[i][8]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecBond::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," " TAGINT_FORMAT,(tagint) ubuf(buf[0]).i); - return 1; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecBond::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); - if (atom->memcheck("nspecial")) bytes += memory->usage(nspecial,nmax,3); - if (atom->memcheck("special")) - bytes += memory->usage(special,nmax,atom->maxspecial); - - if (atom->memcheck("num_bond")) bytes += memory->usage(num_bond,nmax); - if (atom->memcheck("bond_type")) - bytes += memory->usage(bond_type,nmax,atom->bond_per_atom); - if (atom->memcheck("bond_atom")) - bytes += memory->usage(bond_atom,nmax,atom->bond_per_atom); - - return bytes; + atom->num_bond[ilocal] = 0; + atom->nspecial[ilocal][0] = 0; + atom->nspecial[ilocal][1] = 0; + atom->nspecial[ilocal][2] = 0; } diff --git a/src/MOLECULE/atom_vec_bond.h b/src/MOLECULE/atom_vec_bond.h index d7370d4659..9245bc317a 100644 --- a/src/MOLECULE/atom_vec_bond.h +++ b/src/MOLECULE/atom_vec_bond.h @@ -27,46 +27,14 @@ namespace LAMMPS_NS { class AtomVecBond : public AtomVec { public: AtomVecBond(class LAMMPS *); - void grow(int); - void grow_reset(); - void copy(int, int, int); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); + ~AtomVecBond(); int pack_restart(int, double *); int unpack_restart(double *); - void create_atom(int, double *); void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - bigint memory_usage(); private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - tagint *molecule; - int **nspecial; - tagint **special; - int *num_bond; - int **bond_type; - tagint **bond_atom; + int bond_per_atom; + int *bond_negative; }; } @@ -76,13 +44,4 @@ class AtomVecBond : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - */ diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index 76c60ba121..826d5fea4e 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -13,13 +13,6 @@ #include "atom_vec_full.h" #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" -#include "memory.h" -#include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -31,1078 +24,204 @@ AtomVecFull::AtomVecFull(LAMMPS *lmp) : AtomVec(lmp) bonds_allow = angles_allow = dihedrals_allow = impropers_allow = 1; mass_type = 1; - comm_x_only = comm_f_only = 1; - size_forward = 3; - size_reverse = 3; - size_border = 8; - size_velocity = 3; - size_data_atom = 7; - size_data_vel = 4; - xcol_data = 5; - atom->molecule_flag = atom->q_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) + "q molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 " + "num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 " + "dihedral_atom3 dihedral_atom4 " + "num_improper improper_type improper_atom1 improper_atom2 " + "improper_atom3 improper_atom4 " + "nspecial special"; + fields_copy = (char *) + "q molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 " + "num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 " + "dihedral_atom3 dihedral_atom4 " + "num_improper improper_type improper_atom1 improper_atom2 " + "improper_atom3 improper_atom4 " + "nspecial special"; + fields_comm = NULL; + fields_comm_vel = NULL; + fields_reverse = NULL; + fields_border = (char *) "q molecule"; + fields_border_vel = (char *) "q molecule"; + fields_exchange = (char *) + "q molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 " + "num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 " + "dihedral_atom3 dihedral_atom4 " + "num_improper improper_type improper_atom1 improper_atom2 " + "improper_atom3 improper_atom4 " + "nspecial special"; + fields_restart = (char *) + "q molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 " + "num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 " + "dihedral_atom3 dihedral_atom4 " + "num_improper improper_type improper_atom1 improper_atom2 " + "improper_atom3 improper_atom4"; + fields_create = (char *) + "q molecule num_bond num_angle num_dihedral num_improper nspecial"; + fields_data_atom = (char *) "id molecule type q x"; + fields_data_vel = NULL; + + setup_fields(); + + bond_per_atom = angle_per_atom = dihedral_per_atom = improper_per_atom = 0; + bond_negative = angle_negative = dihedral_negative = improper_negative = NULL; +} + +/* ---------------------------------------------------------------------- */ + +AtomVecFull::~AtomVecFull() +{ + delete [] bond_negative; + delete [] angle_negative; + delete [] dihedral_negative; + delete [] improper_negative; } /* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n + pack atom I's data for restart file + modify/unmodify values for default AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -void AtomVecFull::grow(int n) +int AtomVecFull::pack_restart(int i, double *buf) { - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); + // insure negative vectors are needed length - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - q = memory->grow(atom->q,nmax,"atom:q"); - molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); - - nspecial = memory->grow(atom->nspecial,nmax,3,"atom:nspecial"); - special = memory->grow(atom->special,nmax,atom->maxspecial,"atom:special"); - - num_bond = memory->grow(atom->num_bond,nmax,"atom:num_bond"); - bond_type = memory->grow(atom->bond_type,nmax,atom->bond_per_atom, - "atom:bond_type"); - bond_atom = memory->grow(atom->bond_atom,nmax,atom->bond_per_atom, - "atom:bond_atom"); - - num_angle = memory->grow(atom->num_angle,nmax,"atom:num_angle"); - angle_type = memory->grow(atom->angle_type,nmax,atom->angle_per_atom, - "atom:angle_type"); - angle_atom1 = memory->grow(atom->angle_atom1,nmax,atom->angle_per_atom, - "atom:angle_atom1"); - angle_atom2 = memory->grow(atom->angle_atom2,nmax,atom->angle_per_atom, - "atom:angle_atom2"); - angle_atom3 = memory->grow(atom->angle_atom3,nmax,atom->angle_per_atom, - "atom:angle_atom3"); - - num_dihedral = memory->grow(atom->num_dihedral,nmax,"atom:num_dihedral"); - dihedral_type = memory->grow(atom->dihedral_type,nmax, - atom->dihedral_per_atom,"atom:dihedral_type"); - dihedral_atom1 = - memory->grow(atom->dihedral_atom1,nmax,atom->dihedral_per_atom, - "atom:dihedral_atom1"); - dihedral_atom2 = - memory->grow(atom->dihedral_atom2,nmax,atom->dihedral_per_atom, - "atom:dihedral_atom2"); - dihedral_atom3 = - memory->grow(atom->dihedral_atom3,nmax,atom->dihedral_per_atom, - "atom:dihedral_atom3"); - dihedral_atom4 = - memory->grow(atom->dihedral_atom4,nmax,atom->dihedral_per_atom, - "atom:dihedral_atom4"); - - num_improper = memory->grow(atom->num_improper,nmax,"atom:num_improper"); - improper_type = - memory->grow(atom->improper_type,nmax,atom->improper_per_atom, - "atom:improper_type"); - improper_atom1 = - memory->grow(atom->improper_atom1,nmax,atom->improper_per_atom, - "atom:improper_atom1"); - improper_atom2 = - memory->grow(atom->improper_atom2,nmax,atom->improper_per_atom, - "atom:improper_atom2"); - improper_atom3 = - memory->grow(atom->improper_atom3,nmax,atom->improper_per_atom, - "atom:improper_atom3"); - improper_atom4 = - memory->grow(atom->improper_atom4,nmax,atom->improper_per_atom, - "atom:improper_atom4"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecFull::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - q = atom->q; molecule = atom->molecule; - nspecial = atom->nspecial; special = atom->special; - num_bond = atom->num_bond; bond_type = atom->bond_type; - bond_atom = atom->bond_atom; - num_angle = atom->num_angle; angle_type = atom->angle_type; - angle_atom1 = atom->angle_atom1; angle_atom2 = atom->angle_atom2; - angle_atom3 = atom->angle_atom3; - num_dihedral = atom->num_dihedral; dihedral_type = atom->dihedral_type; - dihedral_atom1 = atom->dihedral_atom1; dihedral_atom2 = atom->dihedral_atom2; - dihedral_atom3 = atom->dihedral_atom3; dihedral_atom4 = atom->dihedral_atom4; - num_improper = atom->num_improper; improper_type = atom->improper_type; - improper_atom1 = atom->improper_atom1; improper_atom2 = atom->improper_atom2; - improper_atom3 = atom->improper_atom3; improper_atom4 = atom->improper_atom4; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecFull::copy(int i, int j, int delflag) -{ - int k; - - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - q[j] = q[i]; - molecule[j] = molecule[i]; - - num_bond[j] = num_bond[i]; - for (k = 0; k < num_bond[j]; k++) { - bond_type[j][k] = bond_type[i][k]; - bond_atom[j][k] = bond_atom[i][k]; + if (bond_per_atom < atom->bond_per_atom) { + delete [] bond_negative; + bond_per_atom = atom->bond_per_atom; + bond_negative = new int[bond_per_atom]; + } + if (angle_per_atom < atom->angle_per_atom) { + delete [] angle_negative; + angle_per_atom = atom->angle_per_atom; + angle_negative = new int[angle_per_atom]; + } + if (dihedral_per_atom < atom->dihedral_per_atom) { + delete [] dihedral_negative; + dihedral_per_atom = atom->dihedral_per_atom; + dihedral_negative = new int[dihedral_per_atom]; + } + if (improper_per_atom < atom->improper_per_atom) { + delete [] improper_negative; + improper_per_atom = atom->improper_per_atom; + improper_negative = new int[improper_per_atom]; } - num_angle[j] = num_angle[i]; - for (k = 0; k < num_angle[j]; k++) { - angle_type[j][k] = angle_type[i][k]; - angle_atom1[j][k] = angle_atom1[i][k]; - angle_atom2[j][k] = angle_atom2[i][k]; - angle_atom3[j][k] = angle_atom3[i][k]; + // flip any negative types to positive and flag which ones + + int *num_bond = atom->num_bond; + int **bond_type = atom->bond_type; + int *num_angle = atom->num_angle; + int **angle_type = atom->angle_type; + int *num_dihedral = atom->num_dihedral; + int **dihedral_type = atom->dihedral_type; + int *num_improper = atom->num_improper; + int **improper_type = atom->improper_type; + + int any_bond_negative = 0; + for (int m = 0; m < num_bond[i]; m++) { + if (bond_type[i][m] < 0) { + bond_negative[m] = 1; + bond_type[i][m] = -bond_type[i][m]; + any_bond_negative = 1; + } else bond_negative[m] = 0; } - num_dihedral[j] = num_dihedral[i]; - for (k = 0; k < num_dihedral[j]; k++) { - dihedral_type[j][k] = dihedral_type[i][k]; - dihedral_atom1[j][k] = dihedral_atom1[i][k]; - dihedral_atom2[j][k] = dihedral_atom2[i][k]; - dihedral_atom3[j][k] = dihedral_atom3[i][k]; - dihedral_atom4[j][k] = dihedral_atom4[i][k]; + int any_angle_negative = 0; + for (int m = 0; m < num_angle[i]; m++) { + if (angle_type[i][m] < 0) { + angle_negative[m] = 1; + angle_type[i][m] = -angle_type[i][m]; + any_angle_negative = 1; + } else angle_negative[m] = 0; } - num_improper[j] = num_improper[i]; - for (k = 0; k < num_improper[j]; k++) { - improper_type[j][k] = improper_type[i][k]; - improper_atom1[j][k] = improper_atom1[i][k]; - improper_atom2[j][k] = improper_atom2[i][k]; - improper_atom3[j][k] = improper_atom3[i][k]; - improper_atom4[j][k] = improper_atom4[i][k]; + int any_dihedral_negative = 0; + for (int m = 0; m < num_dihedral[i]; m++) { + if (dihedral_type[i][m] < 0) { + dihedral_negative[m] = 1; + dihedral_type[i][m] = -dihedral_type[i][m]; + any_dihedral_negative = 1; + } else dihedral_negative[m] = 0; } - nspecial[j][0] = nspecial[i][0]; - nspecial[j][1] = nspecial[i][1]; - nspecial[j][2] = nspecial[i][2]; - for (k = 0; k < nspecial[j][2]; k++) special[j][k] = special[i][k]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecFull::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecFull::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecFull::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecFull::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecFull::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecFull::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecFull::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(molecule[j]).d; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(molecule[j]).d; - } + int any_improper_negative = 0; + for (int m = 0; m < num_improper[i]; m++) { + if (improper_type[i][m] < 0) { + improper_negative[m] = 1; + improper_type[i][m] = -improper_type[i][m]; + any_improper_negative = 1; + } else improper_negative[m] = 0; } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); + // perform the pack with adjusted values - return m; -} + int n = AtomVec::pack_restart(i,buf); -/* ---------------------------------------------------------------------- */ + // restore the flagged types to their negative values -int AtomVecFull::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(molecule[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } + if (any_bond_negative) { + for (int m = 0; m < num_bond[i]; m++) + if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecFull::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = q[j]; - buf[m++] = ubuf(molecule[j]).d; + if (any_angle_negative) { + for (int m = 0; m < num_angle[i]; m++) + if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecFull::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - q[i] = buf[m++]; - molecule[i] = (tagint) ubuf(buf[m++]).i; + if (any_dihedral_negative) { + for (int m = 0; m < num_dihedral[i]; m++) + if (dihedral_negative[m]) dihedral_type[i][m] = -dihedral_type[i][m]; } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecFull::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - q[i] = buf[m++]; - molecule[i] = (tagint) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; + if (any_improper_negative) { + for (int m = 0; m < num_improper[i]; m++) + if (improper_negative[m]) improper_type[i][m] = -improper_type[i][m]; } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecFull::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - q[i] = buf[m++]; - molecule[i] = (tagint) ubuf(buf[m++]).i; - } - return m; -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them -------------------------------------------------------------------------- */ - -int AtomVecFull::pack_exchange(int i, double *buf) -{ - int k; - - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = q[i]; - buf[m++] = ubuf(molecule[i]).d; - - buf[m++] = ubuf(num_bond[i]).d; - for (k = 0; k < num_bond[i]; k++) { - buf[m++] = ubuf(bond_type[i][k]).d; - buf[m++] = ubuf(bond_atom[i][k]).d; - } - - buf[m++] = ubuf(num_angle[i]).d; - for (k = 0; k < num_angle[i]; k++) { - buf[m++] = ubuf(angle_type[i][k]).d; - buf[m++] = ubuf(angle_atom1[i][k]).d; - buf[m++] = ubuf(angle_atom2[i][k]).d; - buf[m++] = ubuf(angle_atom3[i][k]).d; - } - - buf[m++] = ubuf(num_dihedral[i]).d; - for (k = 0; k < num_dihedral[i]; k++) { - buf[m++] = ubuf(dihedral_type[i][k]).d; - buf[m++] = ubuf(dihedral_atom1[i][k]).d; - buf[m++] = ubuf(dihedral_atom2[i][k]).d; - buf[m++] = ubuf(dihedral_atom3[i][k]).d; - buf[m++] = ubuf(dihedral_atom4[i][k]).d; - } - - buf[m++] = ubuf(num_improper[i]).d; - for (k = 0; k < num_improper[i]; k++) { - buf[m++] = ubuf(improper_type[i][k]).d; - buf[m++] = ubuf(improper_atom1[i][k]).d; - buf[m++] = ubuf(improper_atom2[i][k]).d; - buf[m++] = ubuf(improper_atom3[i][k]).d; - buf[m++] = ubuf(improper_atom4[i][k]).d; - } - - buf[m++] = ubuf(nspecial[i][0]).d; - buf[m++] = ubuf(nspecial[i][1]).d; - buf[m++] = ubuf(nspecial[i][2]).d; - for (k = 0; k < nspecial[i][2]; k++) buf[m++] = ubuf(special[i][k]).d; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecFull::unpack_exchange(double *buf) -{ - int k; - - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - q[nlocal] = buf[m++]; - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - - num_bond[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_bond[nlocal]; k++) { - bond_type[nlocal][k] = (int) ubuf(buf[m++]).i; - bond_atom[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_angle[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_angle[nlocal]; k++) { - angle_type[nlocal][k] = (int) ubuf(buf[m++]).i; - angle_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_dihedral[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_dihedral[nlocal]; k++) { - dihedral_type[nlocal][k] = (int) ubuf(buf[m++]).i; - dihedral_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom4[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_improper[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_improper[nlocal]; k++) { - improper_type[nlocal][k] = (int) ubuf(buf[m++]).i; - improper_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom4[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - nspecial[nlocal][0] = (int) ubuf(buf[m++]).i; - nspecial[nlocal][1] = (int) ubuf(buf[m++]).i; - nspecial[nlocal][2] = (int) ubuf(buf[m++]).i; - for (k = 0; k < nspecial[nlocal][2]; k++) - special[nlocal][k] = (tagint) ubuf(buf[m++]).i; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecFull::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 0; - for (i = 0; i < nlocal; i++) - n += 17 + 2*num_bond[i] + 4*num_angle[i] + - 5*num_dihedral[i] + 5*num_improper[i]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - return n; } -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecFull::pack_restart(int i, double *buf) -{ - int k; - - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = q[i]; - buf[m++] = ubuf(molecule[i]).d; - - buf[m++] = ubuf(num_bond[i]).d; - for (k = 0; k < num_bond[i]; k++) { - buf[m++] = ubuf(MAX(bond_type[i][k],-bond_type[i][k])).d; - buf[m++] = ubuf(bond_atom[i][k]).d; - } - - buf[m++] = ubuf(num_angle[i]).d; - for (k = 0; k < num_angle[i]; k++) { - buf[m++] = ubuf(MAX(angle_type[i][k],-angle_type[i][k])).d; - buf[m++] = ubuf(angle_atom1[i][k]).d; - buf[m++] = ubuf(angle_atom2[i][k]).d; - buf[m++] = ubuf(angle_atom3[i][k]).d; - } - - buf[m++] = ubuf(num_dihedral[i]).d; - for (k = 0; k < num_dihedral[i]; k++) { - buf[m++] = ubuf(MAX(dihedral_type[i][k],-dihedral_type[i][k])).d; - buf[m++] = ubuf(dihedral_atom1[i][k]).d; - buf[m++] = ubuf(dihedral_atom2[i][k]).d; - buf[m++] = ubuf(dihedral_atom3[i][k]).d; - buf[m++] = ubuf(dihedral_atom4[i][k]).d; - } - - buf[m++] = ubuf(num_improper[i]).d; - for (k = 0; k < num_improper[i]; k++) { - buf[m++] = ubuf(MAX(improper_type[i][k],-improper_type[i][k])).d; - buf[m++] = ubuf(improper_atom1[i][k]).d; - buf[m++] = ubuf(improper_atom2[i][k]).d; - buf[m++] = ubuf(improper_atom3[i][k]).d; - buf[m++] = ubuf(improper_atom4[i][k]).d; - } - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - /* ---------------------------------------------------------------------- unpack data for one atom from restart file including extra quantities + initialize other atom quantities ------------------------------------------------------------------------- */ int AtomVecFull::unpack_restart(double *buf) { - int k; + AtomVec::unpack_restart(buf); + int ilocal = atom->nlocal-1; - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - q[nlocal] = buf[m++]; - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - - num_bond[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_bond[nlocal]; k++) { - bond_type[nlocal][k] = (int) ubuf(buf[m++]).i; - bond_atom[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_angle[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_angle[nlocal]; k++) { - angle_type[nlocal][k] = (int) ubuf(buf[m++]).i; - angle_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_dihedral[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_dihedral[nlocal]; k++) { - dihedral_type[nlocal][k] = (int) ubuf(buf[m++]).i; - dihedral_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom4[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_improper[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_improper[nlocal]; k++) { - improper_type[nlocal][k] = (int) ubuf(buf[m++]).i; - improper_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom4[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - nspecial[nlocal][0] = nspecial[nlocal][1] = nspecial[nlocal][2] = 0; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecFull::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - q[nlocal] = 0.0; - molecule[nlocal] = 0; - num_bond[nlocal] = 0; - num_angle[nlocal] = 0; - num_dihedral[nlocal] = 0; - num_improper[nlocal] = 0; - nspecial[nlocal][0] = nspecial[nlocal][1] = nspecial[nlocal][2] = 0; - - atom->nlocal++; + atom->nspecial[ilocal][0] = 0; + atom->nspecial[ilocal][1] = 0; + atom->nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file - initialize other atom quantities + modify what default AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ void AtomVecFull::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::data_atom(coord,imagetmp,values); + int ilocal = atom->nlocal-1; - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - q[nlocal] = utils::numeric(FLERR,values[3],true,lmp); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - num_bond[nlocal] = 0; - num_angle[nlocal] = 0; - num_dihedral[nlocal] = 0; - num_improper[nlocal] = 0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecFull::data_atom_hybrid(int nlocal, char **values) -{ - molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - q[nlocal] = utils::numeric(FLERR,values[1],true,lmp); - - num_bond[nlocal] = 0; - num_angle[nlocal] = 0; - num_dihedral[nlocal] = 0; - num_improper[nlocal] = 0; - - return 2; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecFull::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(molecule[i]).d; - buf[i][2] = ubuf(type[i]).d; - buf[i][3] = q[i]; - buf[i][4] = x[i][0]; - buf[i][5] = x[i][1]; - buf[i][6] = x[i][2]; - buf[i][7] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecFull::pack_data_hybrid(int i, double *buf) -{ - buf[0] = ubuf(molecule[i]).d; - buf[1] = q[i]; - return 2; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecFull::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " " TAGINT_FORMAT - " %d %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(tagint) ubuf(buf[i][1]).i, - (int) ubuf(buf[i][2]).i, - buf[i][3],buf[i][4],buf[i][5],buf[i][6], - (int) ubuf(buf[i][7]).i,(int) ubuf(buf[i][8]).i, - (int) ubuf(buf[i][9]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecFull::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," " TAGINT_FORMAT " %-1.16e",(tagint) ubuf(buf[0]).i,buf[1]); - return 2; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecFull::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("q")) bytes += memory->usage(q,nmax); - if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); - if (atom->memcheck("nspecial")) bytes += memory->usage(nspecial,nmax,3); - if (atom->memcheck("special")) - bytes += memory->usage(special,nmax,atom->maxspecial); - - if (atom->memcheck("num_bond")) bytes += memory->usage(num_bond,nmax); - if (atom->memcheck("bond_type")) - bytes += memory->usage(bond_type,nmax,atom->bond_per_atom); - if (atom->memcheck("bond_atom")) - bytes += memory->usage(bond_atom,nmax,atom->bond_per_atom); - - if (atom->memcheck("num_angle")) bytes += memory->usage(num_angle,nmax); - if (atom->memcheck("angle_type")) - bytes += memory->usage(angle_type,nmax,atom->angle_per_atom); - if (atom->memcheck("angle_atom1")) - bytes += memory->usage(angle_atom1,nmax,atom->angle_per_atom); - if (atom->memcheck("angle_atom2")) - bytes += memory->usage(angle_atom2,nmax,atom->angle_per_atom); - if (atom->memcheck("angle_atom3")) - bytes += memory->usage(angle_atom3,nmax,atom->angle_per_atom); - - if (atom->memcheck("num_dihedral")) bytes += memory->usage(num_dihedral,nmax); - if (atom->memcheck("dihedral_type")) - bytes += memory->usage(dihedral_type,nmax,atom->dihedral_per_atom); - if (atom->memcheck("dihedral_atom1")) - bytes += memory->usage(dihedral_atom1,nmax,atom->dihedral_per_atom); - if (atom->memcheck("dihedral_atom2")) - bytes += memory->usage(dihedral_atom2,nmax,atom->dihedral_per_atom); - if (atom->memcheck("dihedral_atom3")) - bytes += memory->usage(dihedral_atom3,nmax,atom->dihedral_per_atom); - if (atom->memcheck("dihedral_atom4")) - bytes += memory->usage(dihedral_atom4,nmax,atom->dihedral_per_atom); - - if (atom->memcheck("num_improper")) bytes += memory->usage(num_improper,nmax); - if (atom->memcheck("improper_type")) - bytes += memory->usage(improper_type,nmax,atom->improper_per_atom); - if (atom->memcheck("improper_atom1")) - bytes += memory->usage(improper_atom1,nmax,atom->improper_per_atom); - if (atom->memcheck("improper_atom2")) - bytes += memory->usage(improper_atom2,nmax,atom->improper_per_atom); - if (atom->memcheck("improper_atom3")) - bytes += memory->usage(improper_atom3,nmax,atom->improper_per_atom); - if (atom->memcheck("improper_atom4")) - bytes += memory->usage(improper_atom4,nmax,atom->improper_per_atom); - - return bytes; + atom->num_bond[ilocal] = 0; + atom->num_angle[ilocal] = 0; + atom->num_dihedral[ilocal] = 0; + atom->num_improper[ilocal] = 0; + atom->nspecial[ilocal][0] = 0; + atom->nspecial[ilocal][1] = 0; + atom->nspecial[ilocal][2] = 0; } diff --git a/src/MOLECULE/atom_vec_full.h b/src/MOLECULE/atom_vec_full.h index abaf570b17..b194a86994 100644 --- a/src/MOLECULE/atom_vec_full.h +++ b/src/MOLECULE/atom_vec_full.h @@ -27,57 +27,14 @@ namespace LAMMPS_NS { class AtomVecFull : public AtomVec { public: AtomVecFull(class LAMMPS *); - virtual ~AtomVecFull() {} - void grow(int); - void grow_reset(); - void copy(int, int, int); - virtual int pack_comm(int, int *, double *, int, int *); - virtual int pack_comm_vel(int, int *, double *, int, int *); - virtual void unpack_comm(int, int, double *); - virtual void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - virtual int pack_border(int, int *, double *, int, int *); - virtual int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - virtual void unpack_border(int, int, double *); - virtual void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - virtual int pack_exchange(int, double *); - virtual int unpack_exchange(double *); - int size_restart(); + ~AtomVecFull(); int pack_restart(int, double *); int unpack_restart(double *); - void create_atom(int, double *); void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - bigint memory_usage(); - protected: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double *q; - tagint *molecule; - int **nspecial; - tagint **special; - int *num_bond; - int **bond_type; - tagint **bond_atom; - int *num_angle; - int **angle_type; - tagint **angle_atom1,**angle_atom2,**angle_atom3; - int *num_dihedral; - int **dihedral_type; - tagint **dihedral_atom1,**dihedral_atom2,**dihedral_atom3,**dihedral_atom4; - int *num_improper; - int **improper_type; - tagint **improper_atom1,**improper_atom2,**improper_atom3,**improper_atom4; + private: + int bond_per_atom,angle_per_atom,dihedral_per_atom,improper_per_atom; + int *bond_negative,*angle_negative,*dihedral_negative,*improper_negative; }; } @@ -87,13 +44,4 @@ class AtomVecFull : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - */ diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index 73cec70456..dad7c5cea6 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -13,13 +13,6 @@ #include "atom_vec_molecular.h" #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" -#include "memory.h" -#include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -31,1056 +24,204 @@ AtomVecMolecular::AtomVecMolecular(LAMMPS *lmp) : AtomVec(lmp) bonds_allow = angles_allow = dihedrals_allow = impropers_allow = 1; mass_type = 1; - comm_x_only = comm_f_only = 1; - size_forward = 3; - size_reverse = 3; - size_border = 7; - size_velocity = 3; - size_data_atom = 6; - size_data_vel = 4; - xcol_data = 4; - atom->molecule_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) + "molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 " + "num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 " + "dihedral_atom3 dihedral_atom4 " + "num_improper improper_type improper_atom1 improper_atom2 " + "improper_atom3 improper_atom4 " + "nspecial special"; + fields_copy = (char *) + "molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 " + "num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 " + "dihedral_atom3 dihedral_atom4 " + "num_improper improper_type improper_atom1 improper_atom2 " + "improper_atom3 improper_atom4 " + "nspecial special"; + fields_comm = NULL; + fields_comm_vel = NULL; + fields_reverse = NULL; + fields_border = (char *) "molecule"; + fields_border_vel = (char *) "molecule"; + fields_exchange = (char *) + "molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 " + "num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 " + "dihedral_atom3 dihedral_atom4 " + "num_improper improper_type improper_atom1 improper_atom2 " + "improper_atom3 improper_atom4 " + "nspecial special"; + fields_restart = (char *) + "molecule num_bond bond_type bond_atom " + "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 " + "num_dihedral dihedral_type dihedral_atom1 dihedral_atom2 " + "dihedral_atom3 dihedral_atom4 " + "num_improper improper_type improper_atom1 improper_atom2 " + "improper_atom3 improper_atom4"; + fields_create = (char *) + "molecule num_bond num_angle num_dihedral num_improper nspecial"; + fields_data_atom = (char *) "id molecule type x"; + fields_data_vel = NULL; + + setup_fields(); + + bond_per_atom = angle_per_atom = dihedral_per_atom = improper_per_atom = 0; + bond_negative = angle_negative = dihedral_negative = improper_negative = NULL; +} + +/* ---------------------------------------------------------------------- */ + +AtomVecMolecular::~AtomVecMolecular() +{ + delete [] bond_negative; + delete [] angle_negative; + delete [] dihedral_negative; + delete [] improper_negative; } /* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n + pack atom I's data for restart file + modify/unmodify values for default AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -void AtomVecMolecular::grow(int n) +int AtomVecMolecular::pack_restart(int i, double *buf) { - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); + // insure negative vectors are needed length - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); - - nspecial = memory->grow(atom->nspecial,nmax,3,"atom:nspecial"); - special = memory->grow(atom->special,nmax,atom->maxspecial,"atom:special"); - - num_bond = memory->grow(atom->num_bond,nmax,"atom:num_bond"); - bond_type = memory->grow(atom->bond_type,nmax,atom->bond_per_atom, - "atom:bond_type"); - bond_atom = memory->grow(atom->bond_atom,nmax,atom->bond_per_atom, - "atom:bond_atom"); - - num_angle = memory->grow(atom->num_angle,nmax,"atom:num_angle"); - angle_type = memory->grow(atom->angle_type,nmax,atom->angle_per_atom, - "atom:angle_type"); - angle_atom1 = memory->grow(atom->angle_atom1,nmax,atom->angle_per_atom, - "atom:angle_atom1"); - angle_atom2 = memory->grow(atom->angle_atom2,nmax,atom->angle_per_atom, - "atom:angle_atom2"); - angle_atom3 = memory->grow(atom->angle_atom3,nmax,atom->angle_per_atom, - "atom:angle_atom3"); - - num_dihedral = memory->grow(atom->num_dihedral,nmax,"atom:num_dihedral"); - dihedral_type = memory->grow(atom->dihedral_type,nmax, - atom->dihedral_per_atom,"atom:dihedral_type"); - dihedral_atom1 = - memory->grow(atom->dihedral_atom1,nmax,atom->dihedral_per_atom, - "atom:dihedral_atom1"); - dihedral_atom2 = - memory->grow(atom->dihedral_atom2,nmax,atom->dihedral_per_atom, - "atom:dihedral_atom2"); - dihedral_atom3 = - memory->grow(atom->dihedral_atom3,nmax,atom->dihedral_per_atom, - "atom:dihedral_atom3"); - dihedral_atom4 = - memory->grow(atom->dihedral_atom4,nmax,atom->dihedral_per_atom, - "atom:dihedral_atom4"); - - num_improper = memory->grow(atom->num_improper,nmax,"atom:num_improper"); - improper_type = - memory->grow(atom->improper_type,nmax,atom->improper_per_atom, - "atom:improper_type"); - improper_atom1 = - memory->grow(atom->improper_atom1,nmax,atom->improper_per_atom, - "atom:improper_atom1"); - improper_atom2 = - memory->grow(atom->improper_atom2,nmax,atom->improper_per_atom, - "atom:improper_atom2"); - improper_atom3 = - memory->grow(atom->improper_atom3,nmax,atom->improper_per_atom, - "atom:improper_atom3"); - improper_atom4 = - memory->grow(atom->improper_atom4,nmax,atom->improper_per_atom, - "atom:improper_atom4"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecMolecular::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - molecule = atom->molecule; - nspecial = atom->nspecial; special = atom->special; - num_bond = atom->num_bond; bond_type = atom->bond_type; - bond_atom = atom->bond_atom; - num_angle = atom->num_angle; angle_type = atom->angle_type; - angle_atom1 = atom->angle_atom1; angle_atom2 = atom->angle_atom2; - angle_atom3 = atom->angle_atom3; - num_dihedral = atom->num_dihedral; dihedral_type = atom->dihedral_type; - dihedral_atom1 = atom->dihedral_atom1; dihedral_atom2 = atom->dihedral_atom2; - dihedral_atom3 = atom->dihedral_atom3; dihedral_atom4 = atom->dihedral_atom4; - num_improper = atom->num_improper; improper_type = atom->improper_type; - improper_atom1 = atom->improper_atom1; improper_atom2 = atom->improper_atom2; - improper_atom3 = atom->improper_atom3; improper_atom4 = atom->improper_atom4; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecMolecular::copy(int i, int j, int delflag) -{ - int k; - - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - molecule[j] = molecule[i]; - - num_bond[j] = num_bond[i]; - for (k = 0; k < num_bond[j]; k++) { - bond_type[j][k] = bond_type[i][k]; - bond_atom[j][k] = bond_atom[i][k]; + if (bond_per_atom < atom->bond_per_atom) { + delete [] bond_negative; + bond_per_atom = atom->bond_per_atom; + bond_negative = new int[bond_per_atom]; + } + if (angle_per_atom < atom->angle_per_atom) { + delete [] angle_negative; + angle_per_atom = atom->angle_per_atom; + angle_negative = new int[angle_per_atom]; + } + if (dihedral_per_atom < atom->dihedral_per_atom) { + delete [] dihedral_negative; + dihedral_per_atom = atom->dihedral_per_atom; + dihedral_negative = new int[dihedral_per_atom]; + } + if (improper_per_atom < atom->improper_per_atom) { + delete [] improper_negative; + improper_per_atom = atom->improper_per_atom; + improper_negative = new int[improper_per_atom]; } - num_angle[j] = num_angle[i]; - for (k = 0; k < num_angle[j]; k++) { - angle_type[j][k] = angle_type[i][k]; - angle_atom1[j][k] = angle_atom1[i][k]; - angle_atom2[j][k] = angle_atom2[i][k]; - angle_atom3[j][k] = angle_atom3[i][k]; + // flip any negative types to positive and flag which ones + + int *num_bond = atom->num_bond; + int **bond_type = atom->bond_type; + int *num_angle = atom->num_angle; + int **angle_type = atom->angle_type; + int *num_dihedral = atom->num_dihedral; + int **dihedral_type = atom->dihedral_type; + int *num_improper = atom->num_improper; + int **improper_type = atom->improper_type; + + int any_bond_negative = 0; + for (int m = 0; m < num_bond[i]; m++) { + if (bond_type[i][m] < 0) { + bond_negative[m] = 1; + bond_type[i][m] = -bond_type[i][m]; + any_bond_negative = 1; + } else bond_negative[m] = 0; } - num_dihedral[j] = num_dihedral[i]; - for (k = 0; k < num_dihedral[j]; k++) { - dihedral_type[j][k] = dihedral_type[i][k]; - dihedral_atom1[j][k] = dihedral_atom1[i][k]; - dihedral_atom2[j][k] = dihedral_atom2[i][k]; - dihedral_atom3[j][k] = dihedral_atom3[i][k]; - dihedral_atom4[j][k] = dihedral_atom4[i][k]; + int any_angle_negative = 0; + for (int m = 0; m < num_angle[i]; m++) { + if (angle_type[i][m] < 0) { + angle_negative[m] = 1; + angle_type[i][m] = -angle_type[i][m]; + any_angle_negative = 1; + } else angle_negative[m] = 0; } - num_improper[j] = num_improper[i]; - for (k = 0; k < num_improper[j]; k++) { - improper_type[j][k] = improper_type[i][k]; - improper_atom1[j][k] = improper_atom1[i][k]; - improper_atom2[j][k] = improper_atom2[i][k]; - improper_atom3[j][k] = improper_atom3[i][k]; - improper_atom4[j][k] = improper_atom4[i][k]; + int any_dihedral_negative = 0; + for (int m = 0; m < num_dihedral[i]; m++) { + if (dihedral_type[i][m] < 0) { + dihedral_negative[m] = 1; + dihedral_type[i][m] = -dihedral_type[i][m]; + any_dihedral_negative = 1; + } else dihedral_negative[m] = 0; } - nspecial[j][0] = nspecial[i][0]; - nspecial[j][1] = nspecial[i][1]; - nspecial[j][2] = nspecial[i][2]; - for (k = 0; k < nspecial[j][2]; k++) special[j][k] = special[i][k]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMolecular::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMolecular::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMolecular::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMolecular::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMolecular::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMolecular::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMolecular::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - } + int any_improper_negative = 0; + for (int m = 0; m < num_improper[i]; m++) { + if (improper_type[i][m] < 0) { + improper_negative[m] = 1; + improper_type[i][m] = -improper_type[i][m]; + any_improper_negative = 1; + } else improper_negative[m] = 0; } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); + // perform the pack with adjusted values - return m; -} + int n = AtomVec::pack_restart(i,buf); -/* ---------------------------------------------------------------------- */ + // restore the flagged types to their negative values -int AtomVecMolecular::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } + if (any_bond_negative) { + for (int m = 0; m < num_bond[i]; m++) + if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMolecular::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = ubuf(molecule[j]).d; + if (any_angle_negative) { + for (int m = 0; m < num_angle[i]; m++) + if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMolecular::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; + if (any_dihedral_negative) { + for (int m = 0; m < num_dihedral[i]; m++) + if (dihedral_negative[m]) dihedral_type[i][m] = -dihedral_type[i][m]; } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMolecular::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; + if (any_improper_negative) { + for (int m = 0; m < num_improper[i]; m++) + if (improper_negative[m]) improper_type[i][m] = -improper_type[i][m]; } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMolecular::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) - molecule[i] = (tagint) ubuf(buf[m++]).i; - return m; -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them -------------------------------------------------------------------------- */ - -int AtomVecMolecular::pack_exchange(int i, double *buf) -{ - int k; - - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = ubuf(molecule[i]).d; - - buf[m++] = ubuf(num_bond[i]).d; - for (k = 0; k < num_bond[i]; k++) { - buf[m++] = ubuf(bond_type[i][k]).d; - buf[m++] = ubuf(bond_atom[i][k]).d; - } - - buf[m++] = ubuf(num_angle[i]).d; - for (k = 0; k < num_angle[i]; k++) { - buf[m++] = ubuf(angle_type[i][k]).d; - buf[m++] = ubuf(angle_atom1[i][k]).d; - buf[m++] = ubuf(angle_atom2[i][k]).d; - buf[m++] = ubuf(angle_atom3[i][k]).d; - } - - buf[m++] = ubuf(num_dihedral[i]).d; - for (k = 0; k < num_dihedral[i]; k++) { - buf[m++] = ubuf(dihedral_type[i][k]).d; - buf[m++] = ubuf(dihedral_atom1[i][k]).d; - buf[m++] = ubuf(dihedral_atom2[i][k]).d; - buf[m++] = ubuf(dihedral_atom3[i][k]).d; - buf[m++] = ubuf(dihedral_atom4[i][k]).d; - } - - buf[m++] = ubuf(num_improper[i]).d; - for (k = 0; k < num_improper[i]; k++) { - buf[m++] = ubuf(improper_type[i][k]).d; - buf[m++] = ubuf(improper_atom1[i][k]).d; - buf[m++] = ubuf(improper_atom2[i][k]).d; - buf[m++] = ubuf(improper_atom3[i][k]).d; - buf[m++] = ubuf(improper_atom4[i][k]).d; - } - - buf[m++] = ubuf(nspecial[i][0]).d; - buf[m++] = ubuf(nspecial[i][1]).d; - buf[m++] = ubuf(nspecial[i][2]).d; - for (k = 0; k < nspecial[i][2]; k++) buf[m++] = ubuf(special[i][k]).d; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMolecular::unpack_exchange(double *buf) -{ - int k; - - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - - num_bond[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_bond[nlocal]; k++) { - bond_type[nlocal][k] = (int) ubuf(buf[m++]).i; - bond_atom[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_angle[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_angle[nlocal]; k++) { - angle_type[nlocal][k] = (int) ubuf(buf[m++]).i; - angle_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_dihedral[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_dihedral[nlocal]; k++) { - dihedral_type[nlocal][k] = (int) ubuf(buf[m++]).i; - dihedral_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom4[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_improper[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_improper[nlocal]; k++) { - improper_type[nlocal][k] = (int) ubuf(buf[m++]).i; - improper_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom4[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - nspecial[nlocal][0] = (int) ubuf(buf[m++]).i; - nspecial[nlocal][1] = (int) ubuf(buf[m++]).i; - nspecial[nlocal][2] = (int) ubuf(buf[m++]).i; - for (k = 0; k < nspecial[nlocal][2]; k++) - special[nlocal][k] = (int) ubuf(buf[m++]).i; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecMolecular::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 0; - for (i = 0; i < nlocal; i++) - n += 16 + 2*num_bond[i] + 4*num_angle[i] + - 5*num_dihedral[i] + 5*num_improper[i]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - return n; } -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecMolecular::pack_restart(int i, double *buf) -{ - int k; - - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = ubuf(molecule[i]).d; - - buf[m++] = ubuf(num_bond[i]).d; - for (k = 0; k < num_bond[i]; k++) { - buf[m++] = ubuf(MAX(bond_type[i][k],-bond_type[i][k])).d; - buf[m++] = ubuf(bond_atom[i][k]).d; - } - - buf[m++] = ubuf(num_angle[i]).d; - for (k = 0; k < num_angle[i]; k++) { - buf[m++] = ubuf(MAX(angle_type[i][k],-angle_type[i][k])).d; - buf[m++] = ubuf(angle_atom1[i][k]).d; - buf[m++] = ubuf(angle_atom2[i][k]).d; - buf[m++] = ubuf(angle_atom3[i][k]).d; - } - - buf[m++] = ubuf(num_dihedral[i]).d; - for (k = 0; k < num_dihedral[i]; k++) { - buf[m++] = ubuf(MAX(dihedral_type[i][k],-dihedral_type[i][k])).d; - buf[m++] = ubuf(dihedral_atom1[i][k]).d; - buf[m++] = ubuf(dihedral_atom2[i][k]).d; - buf[m++] = ubuf(dihedral_atom3[i][k]).d; - buf[m++] = ubuf(dihedral_atom4[i][k]).d; - } - - buf[m++] = ubuf(num_improper[i]).d; - for (k = 0; k < num_improper[i]; k++) { - buf[m++] = ubuf(MAX(improper_type[i][k],-improper_type[i][k])).d; - buf[m++] = ubuf(improper_atom1[i][k]).d; - buf[m++] = ubuf(improper_atom2[i][k]).d; - buf[m++] = ubuf(improper_atom3[i][k]).d; - buf[m++] = ubuf(improper_atom4[i][k]).d; - } - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - /* ---------------------------------------------------------------------- unpack data for one atom from restart file including extra quantities + initialize other atom quantities ------------------------------------------------------------------------- */ int AtomVecMolecular::unpack_restart(double *buf) { - int k; + AtomVec::unpack_restart(buf); + int ilocal = atom->nlocal-1; - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - - num_bond[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_bond[nlocal]; k++) { - bond_type[nlocal][k] = (int) ubuf(buf[m++]).i; - bond_atom[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_angle[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_angle[nlocal]; k++) { - angle_type[nlocal][k] = (int) ubuf(buf[m++]).i; - angle_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - angle_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_dihedral[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_dihedral[nlocal]; k++) { - dihedral_type[nlocal][k] = (int) ubuf(buf[m++]).i; - dihedral_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - dihedral_atom4[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - num_improper[nlocal] = (int) ubuf(buf[m++]).i; - for (k = 0; k < num_improper[nlocal]; k++) { - improper_type[nlocal][k] = (int) ubuf(buf[m++]).i; - improper_atom1[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom2[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom3[nlocal][k] = (tagint) ubuf(buf[m++]).i; - improper_atom4[nlocal][k] = (tagint) ubuf(buf[m++]).i; - } - - nspecial[nlocal][0] = nspecial[nlocal][1] = nspecial[nlocal][2] = 0; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecMolecular::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - molecule[nlocal] = 0; - num_bond[nlocal] = 0; - num_angle[nlocal] = 0; - num_dihedral[nlocal] = 0; - num_improper[nlocal] = 0; - nspecial[nlocal][0] = nspecial[nlocal][1] = nspecial[nlocal][2] = 0; - - atom->nlocal++; + atom->nspecial[ilocal][0] = 0; + atom->nspecial[ilocal][1] = 0; + atom->nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file - initialize other atom quantities + modify what default AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecMolecular::data_atom(double *coord, imageint imagetmp, - char **values) +void AtomVecMolecular::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::data_atom(coord,imagetmp,values); + int ilocal = atom->nlocal-1; - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - num_bond[nlocal] = 0; - num_angle[nlocal] = 0; - num_dihedral[nlocal] = 0; - num_improper[nlocal] = 0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecMolecular::data_atom_hybrid(int nlocal, char **values) -{ - molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - - num_bond[nlocal] = 0; - num_angle[nlocal] = 0; - num_dihedral[nlocal] = 0; - num_improper[nlocal] = 0; - - return 1; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecMolecular::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(molecule[i]).d; - buf[i][2] = ubuf(type[i]).d; - buf[i][3] = x[i][0]; - buf[i][4] = x[i][1]; - buf[i][5] = x[i][2]; - buf[i][6] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][7] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecMolecular::pack_data_hybrid(int i, double *buf) -{ - buf[0] = ubuf(molecule[i]).d; - return 1; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecMolecular::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " " TAGINT_FORMAT - " %d %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(tagint) ubuf(buf[i][1]).i, - (int) ubuf(buf[i][2]).i, - buf[i][3],buf[i][4],buf[i][5], - (int) ubuf(buf[i][6]).i,(int) ubuf(buf[i][7]).i, - (int) ubuf(buf[i][8]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecMolecular::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," " TAGINT_FORMAT,(tagint) ubuf(buf[0]).i); - return 1; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecMolecular::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); - if (atom->memcheck("nspecial")) bytes += memory->usage(nspecial,nmax,3); - if (atom->memcheck("special")) - bytes += memory->usage(special,nmax,atom->maxspecial); - - if (atom->memcheck("num_bond")) bytes += memory->usage(num_bond,nmax); - if (atom->memcheck("bond_type")) - bytes += memory->usage(bond_type,nmax,atom->bond_per_atom); - if (atom->memcheck("bond_atom")) - bytes += memory->usage(bond_atom,nmax,atom->bond_per_atom); - - if (atom->memcheck("num_angle")) bytes += memory->usage(num_angle,nmax); - if (atom->memcheck("angle_type")) - bytes += memory->usage(angle_type,nmax,atom->angle_per_atom); - if (atom->memcheck("angle_atom1")) - bytes += memory->usage(angle_atom1,nmax,atom->angle_per_atom); - if (atom->memcheck("angle_atom2")) - bytes += memory->usage(angle_atom2,nmax,atom->angle_per_atom); - if (atom->memcheck("angle_atom3")) - bytes += memory->usage(angle_atom3,nmax,atom->angle_per_atom); - - if (atom->memcheck("num_dihedral")) bytes += memory->usage(num_dihedral,nmax); - if (atom->memcheck("dihedral_type")) - bytes += memory->usage(dihedral_type,nmax,atom->dihedral_per_atom); - if (atom->memcheck("dihedral_atom1")) - bytes += memory->usage(dihedral_atom1,nmax,atom->dihedral_per_atom); - if (atom->memcheck("dihedral_atom2")) - bytes += memory->usage(dihedral_atom2,nmax,atom->dihedral_per_atom); - if (atom->memcheck("dihedral_atom3")) - bytes += memory->usage(dihedral_atom3,nmax,atom->dihedral_per_atom); - if (atom->memcheck("dihedral_atom4")) - bytes += memory->usage(dihedral_atom4,nmax,atom->dihedral_per_atom); - - if (atom->memcheck("num_improper")) bytes += memory->usage(num_improper,nmax); - if (atom->memcheck("improper_type")) - bytes += memory->usage(improper_type,nmax,atom->improper_per_atom); - if (atom->memcheck("improper_atom1")) - bytes += memory->usage(improper_atom1,nmax,atom->improper_per_atom); - if (atom->memcheck("improper_atom2")) - bytes += memory->usage(improper_atom2,nmax,atom->improper_per_atom); - if (atom->memcheck("improper_atom3")) - bytes += memory->usage(improper_atom3,nmax,atom->improper_per_atom); - if (atom->memcheck("improper_atom4")) - bytes += memory->usage(improper_atom4,nmax,atom->improper_per_atom); - - return bytes; + atom->num_bond[ilocal] = 0; + atom->num_angle[ilocal] = 0; + atom->num_dihedral[ilocal] = 0; + atom->num_improper[ilocal] = 0; + atom->nspecial[ilocal][0] = 0; + atom->nspecial[ilocal][1] = 0; + atom->nspecial[ilocal][2] = 0; } diff --git a/src/MOLECULE/atom_vec_molecular.h b/src/MOLECULE/atom_vec_molecular.h index 19104c3987..cba6d1b480 100644 --- a/src/MOLECULE/atom_vec_molecular.h +++ b/src/MOLECULE/atom_vec_molecular.h @@ -27,55 +27,14 @@ namespace LAMMPS_NS { class AtomVecMolecular : public AtomVec { public: AtomVecMolecular(class LAMMPS *); - void grow(int); - void grow_reset(); - void copy(int, int, int); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); + ~AtomVecMolecular(); int pack_restart(int, double *); int unpack_restart(double *); - void create_atom(int, double *); void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - bigint memory_usage(); private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - tagint *molecule; - int **nspecial; - tagint **special; - int *num_bond; - int **bond_type; - tagint **bond_atom; - int *num_angle; - int **angle_type; - tagint **angle_atom1,**angle_atom2,**angle_atom3; - int *num_dihedral; - int **dihedral_type; - tagint **dihedral_atom1,**dihedral_atom2,**dihedral_atom3,**dihedral_atom4; - int *num_improper; - int **improper_type; - tagint **improper_atom1,**improper_atom2,**improper_atom3,**improper_atom4; + int bond_per_atom,angle_per_atom,dihedral_per_atom,improper_per_atom; + int *bond_negative,*angle_negative,*dihedral_negative,*improper_negative; }; } @@ -85,13 +44,4 @@ class AtomVecMolecular : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - */ diff --git a/src/MOLECULE/atom_vec_template.cpp b/src/MOLECULE/atom_vec_template.cpp index c9ccfc6d2b..31d9af4caf 100644 --- a/src/MOLECULE/atom_vec_template.cpp +++ b/src/MOLECULE/atom_vec_template.cpp @@ -31,16 +31,27 @@ AtomVecTemplate::AtomVecTemplate(LAMMPS *lmp) : AtomVec(lmp) molecular = 2; mass_type = 1; - comm_x_only = comm_f_only = 1; - size_forward = 3; - size_reverse = 3; - size_border = 9; - size_velocity = 3; - size_data_atom = 8; - size_data_vel = 4; - xcol_data = 6; - atom->molecule_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "molecule molindex molatom"; + fields_copy = (char *) "molecule molindex molatom"; + fields_comm = NULL; + fields_comm_vel = NULL; + fields_reverse = NULL; + fields_border = (char *) "molecule molindex molatom"; + fields_border_vel = (char *) "molecule molindex molatom"; + fields_exchange = (char *) "molecule molindex molatom"; + fields_restart = (char *) "molecule molindex molatom"; + fields_create = (char *) "molecule molindex molatom"; + fields_data_atom = (char *) "id molecule molindex molatom type x"; + fields_data_vel = NULL; + + setup_fields(); } /* ---------------------------------------------------------------------- @@ -85,786 +96,35 @@ void AtomVecTemplate::process_args(int narg, char **arg) } } -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecTemplate::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); - molindex = memory->grow(atom->molindex,nmax,"atom:molindex"); - molatom = memory->grow(atom->molatom,nmax,"atom:molatom"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecTemplate::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - molecule = atom->molecule; - molindex = atom->molindex; molatom = atom->molatom; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecTemplate::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - molecule[j] = molecule[i]; - molindex[j] = molindex[i]; - molatom[j] = molatom[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTemplate::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTemplate::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTemplate::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTemplate::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTemplate::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTemplate::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTemplate::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(molindex[j]).d; - buf[m++] = ubuf(molatom[j]).d; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(molindex[j]).d; - buf[m++] = ubuf(molatom[j]).d; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTemplate::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(molindex[j]).d; - buf[m++] = ubuf(molatom[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(molindex[j]).d; - buf[m++] = ubuf(molatom[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(molindex[j]).d; - buf[m++] = ubuf(molatom[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTemplate::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(molindex[j]).d; - buf[m++] = ubuf(molatom[j]).d; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTemplate::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - molindex[i] = (int) ubuf(buf[m++]).i; - molatom[i] = (int) ubuf(buf[m++]).i; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTemplate::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - molindex[i] = (int) ubuf(buf[m++]).i; - molatom[i] = (int) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTemplate::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - molecule[i] = (tagint) ubuf(buf[m++]).i; - molindex[i] = (int) ubuf(buf[m++]).i; - molatom[i] = (int) ubuf(buf[m++]).i; - } - return m; -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them -------------------------------------------------------------------------- */ - -int AtomVecTemplate::pack_exchange(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = ubuf(molecule[i]).d; - buf[m++] = ubuf(molindex[i]).d; - buf[m++] = ubuf(molatom[i]).d; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTemplate::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - molindex[nlocal] = (int) ubuf(buf[m++]).i; - molatom[nlocal] = (int) ubuf(buf[m++]).i; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecTemplate::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 14 * nlocal; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecTemplate::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = ubuf(molecule[i]).d; - buf[m++] = ubuf(molindex[i]).d; - buf[m++] = ubuf(molatom[i]).d; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecTemplate::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - molindex[nlocal] = (int) ubuf(buf[m++]).i; - molatom[nlocal] = (int) ubuf(buf[m++]).i; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - /* ---------------------------------------------------------------------- create one atom of itype at coord - set other values to defaults + modify what default AtomVec::create_atom() just created ------------------------------------------------------------------------- */ void AtomVecTemplate::create_atom(int itype, double *coord) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::create_atom(itype,coord); - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - molecule[nlocal] = 0; - molindex[nlocal] = -1; - molatom[nlocal] = -1; - - atom->nlocal++; + int ilocal = atom->nlocal-1; + atom->molindex[ilocal] = -1; + atom->molatom[ilocal] = -1; } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file - initialize other atom quantities + error check what default AtomVec::data_atom() just unpacked ------------------------------------------------------------------------- */ void AtomVecTemplate::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::data_atom(coord,imagetmp,values); - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - if (tag[nlocal] <= 0) - error->one(FLERR,"Invalid atom ID in Atoms section of data file"); + int ilocal = atom->nlocal-1; + int molindex = atom->molindex[ilocal]; + int molatom = atom->molatom[ilocal]; - molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp); - molindex[nlocal] = utils::inumeric(FLERR,values[2],true,lmp) - 1; - molatom[nlocal] = utils::inumeric(FLERR,values[3],true,lmp) - 1; - - if (molindex[nlocal] < 0 || molindex[nlocal] >= nset) + if (molindex < 0 || molindex >= nset) error->one(FLERR,"Invalid template index in Atoms section of data file"); - if (molatom[nlocal] < 0 || - molatom[nlocal] >= onemols[molindex[nlocal]]->natoms) + if (molatom < 0 || molatom >= onemols[molindex]->natoms) error->one(FLERR,"Invalid template atom in Atoms section of data file"); - - type[nlocal] = utils::inumeric(FLERR,values[4],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecTemplate::data_atom_hybrid(int nlocal, char **values) -{ - molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - molindex[nlocal] = utils::inumeric(FLERR,values[1],true,lmp) - 1; - molatom[nlocal] = utils::inumeric(FLERR,values[2],true,lmp) - 1; - return 3; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecTemplate::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(molecule[i]).d; - buf[i][2] = ubuf(molindex[i]+1).d; - buf[i][3] = ubuf(molatom[i]+1).d; - buf[i][4] = ubuf(type[i]).d; - buf[i][5] = x[i][0]; - buf[i][6] = x[i][1]; - buf[i][7] = x[i][2]; - buf[i][8] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][10] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecTemplate::pack_data_hybrid(int i, double *buf) -{ - buf[0] = ubuf(molecule[i]).d; - buf[1] = ubuf(molindex[i]+1).d; - buf[2] = ubuf(molatom[i]+1).d; - return 3; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecTemplate::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " " TAGINT_FORMAT - " %d %d %d %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(tagint) ubuf(buf[i][1]).i, - (int) ubuf(buf[i][2]).i,(int) ubuf(buf[i][3]).i, - (int) ubuf(buf[i][4]).i, - buf[i][5],buf[i][6],buf[i][7], - (int) ubuf(buf[i][8]).i,(int) ubuf(buf[i][9]).i, - (int) ubuf(buf[i][10]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecTemplate::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," " TAGINT_FORMAT " %d %d", - (tagint) ubuf(buf[0]).i,(int) ubuf(buf[1]).i,(int) ubuf(buf[2]).i); - return 3; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecTemplate::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); - if (atom->memcheck("molindex")) bytes += memory->usage(molindex,nmax); - if (atom->memcheck("molatom")) bytes += memory->usage(molatom,nmax); - - return bytes; } diff --git a/src/MOLECULE/atom_vec_template.h b/src/MOLECULE/atom_vec_template.h index eee7fa9723..59a1386f2d 100644 --- a/src/MOLECULE/atom_vec_template.h +++ b/src/MOLECULE/atom_vec_template.h @@ -27,44 +27,9 @@ namespace LAMMPS_NS { class AtomVecTemplate : public AtomVec { public: AtomVecTemplate(class LAMMPS *); - virtual ~AtomVecTemplate() {} void process_args(int, char **); - void grow(int); - void grow_reset(); - void copy(int, int, int); - virtual int pack_comm(int, int *, double *, int, int *); - virtual int pack_comm_vel(int, int *, double *, int, int *); - virtual void unpack_comm(int, int, double *); - virtual void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - virtual int pack_border(int, int *, double *, int, int *); - virtual int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - virtual void unpack_border(int, int, double *); - virtual void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - virtual int pack_exchange(int, double *); - virtual int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - bigint memory_usage(); - - protected: - tagint *tag; - int *type,*mask; - tagint *image; - double **x,**v,**f; - tagint *molecule; - int *molindex,*molatom; + void data_atom(double *, imageint, char **); }; } @@ -88,15 +53,6 @@ E: Atom style template molecule must have atom types The defined molecule(s) does not specify atom types. -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom ID in Atoms section of data file - -Atom IDs must be positive integers. - E: Invalid template index in Atoms section of data file The template indices must be between 1 to N, where N is the number of @@ -107,8 +63,4 @@ E: Invalid template atom in Atoms section of data file The atom indices must be between 1 to N, where N is the number of atoms in the template molecule the atom belongs to. -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - */ diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index 3e3312bf01..29c4cb0d83 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -19,14 +19,9 @@ #include #include #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" #include "citeme.h" #include "memory.h" #include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -49,859 +44,67 @@ AtomVecPeri::AtomVecPeri(LAMMPS *lmp) : AtomVec(lmp) molecular = 0; - comm_x_only = 0; - comm_f_only = 1; - size_forward = 4; - size_reverse = 3; - size_border = 12; - size_velocity = 3; - size_data_atom = 7; - size_data_vel = 4; - xcol_data = 5; - + atom->rmass_flag = 1; atom->peri_flag = 1; - atom->vfrac_flag = atom->rmass_flag = 1; -} - -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecPeri::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - vfrac = memory->grow(atom->vfrac,nmax,"atom:vfrac"); - rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); - s0 = memory->grow(atom->s0,nmax,"atom:s0"); - x0 = memory->grow(atom->x0,nmax,3,"atom:x0"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecPeri::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - vfrac = atom->vfrac; rmass = atom->rmass; - s0 = atom->s0; x0 = atom->x0; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecPeri::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - vfrac[j] = vfrac[i]; - rmass[j] = rmass[i]; - s0[j] = s0[i]; - x0[j][0] = x0[i][0]; - x0[j][1] = x0[i][1]; - x0[j][2] = x0[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecPeri::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) - -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = s0[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = s0[j]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecPeri::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) - -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = s0[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = s0[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = s0[j]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecPeri::pack_comm_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = s0[j]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecPeri::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - s0[i] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecPeri::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - s0[i] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecPeri::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) - s0[i] = buf[m++]; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecPeri::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecPeri::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecPeri::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = vfrac[j]; - buf[m++] = rmass[j]; - buf[m++] = s0[j]; - buf[m++] = x0[j][0]; - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = vfrac[j]; - buf[m++] = rmass[j]; - buf[m++] = s0[j]; - buf[m++] = x0[j][0]; - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecPeri::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = vfrac[j]; - buf[m++] = rmass[j]; - buf[m++] = s0[j]; - buf[m++] = x0[j][0]; - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = vfrac[j]; - buf[m++] = rmass[j]; - buf[m++] = s0[j]; - buf[m++] = x0[j][0]; - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = vfrac[j]; - buf[m++] = rmass[j]; - buf[m++] = s0[j]; - buf[m++] = x0[j][0]; - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecPeri::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = vfrac[j]; - buf[m++] = rmass[j]; - buf[m++] = s0[j]; - buf[m++] = x0[j][0]; - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecPeri::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - vfrac[i] = buf[m++]; - rmass[i] = buf[m++]; - s0[i] = buf[m++]; - x0[i][0] = buf[m++]; - x0[i][1] = buf[m++]; - x0[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecPeri::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - vfrac[i] = buf[m++]; - rmass[i] = buf[m++]; - s0[i] = buf[m++]; - x0[i][0] = buf[m++]; - x0[i][1] = buf[m++]; - x0[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecPeri::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - vfrac[i] = buf[m++]; - rmass[i] = buf[m++]; - s0[i] = buf[m++]; - x0[i][0] = buf[m++]; - x0[i][1] = buf[m++]; - x0[i][2] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them -------------------------------------------------------------------------- */ - -int AtomVecPeri::pack_exchange(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = vfrac[i]; - buf[m++] = rmass[i]; - buf[m++] = s0[i]; - buf[m++] = x0[i][0]; - buf[m++] = x0[i][1]; - buf[m++] = x0[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecPeri::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - vfrac[nlocal] = buf[m++]; - rmass[nlocal] = buf[m++]; - s0[nlocal] = buf[m++]; - x0[nlocal][0] = buf[m++]; - x0[nlocal][1] = buf[m++]; - x0[nlocal][2] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecPeri::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 17 * nlocal; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecPeri::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = vfrac[i]; - buf[m++] = rmass[i]; - buf[m++] = s0[i]; - buf[m++] = x0[i][0]; - buf[m++] = x0[i][1]; - buf[m++] = x0[i][2]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecPeri::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - vfrac[nlocal] = buf[m++]; - rmass[nlocal] = buf[m++]; - s0[nlocal] = buf[m++]; - x0[nlocal][0] = buf[m++]; - x0[nlocal][1] = buf[m++]; - x0[nlocal][2] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; + atom->vfrac_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "rmass vfrac s0 x0"; + fields_copy = (char *) "rmass vfrac s0 x0"; + fields_comm = (char *) "s0"; + fields_comm_vel = (char *) "s0"; + fields_reverse = NULL; + fields_border = (char *) "rmass vfrac s0 x0"; + fields_border_vel = (char *) "rmass vfrac s0 x0"; + fields_exchange = (char *) "rmass vfrac s0 x0"; + fields_restart = (char *) "rmass vfrac s0 x0"; + fields_create = (char *) "rmass vfrac s0 x0"; + fields_data_atom = (char *) "id type vfrac rmass x"; + fields_data_vel = (char *) "omega"; + + setup_fields(); } /* ---------------------------------------------------------------------- create one atom of itype at coord - set other values to defaults + modify what default AtomVec::create_atom() just created ------------------------------------------------------------------------- */ void AtomVecPeri::create_atom(int itype, double *coord) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::create_atom(itype,coord); + int ilocal = atom->nlocal-1; - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - vfrac[nlocal] = 1.0; - rmass[nlocal] = 1.0; - s0[nlocal] = DBL_MAX; - x0[nlocal][0] = coord[0]; - x0[nlocal][1] = coord[1]; - x0[nlocal][2] = coord[2]; - - atom->nlocal++; + atom->vfrac[ilocal] = 1.0; + atom->rmass[ilocal] = 1.0; + atom->s0[ilocal] = DBL_MAX; + atom->x0[ilocal][0] = coord[0]; + atom->x0[ilocal][1] = coord[1]; + atom->x0[ilocal][2] = coord[2]; } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file - initialize other atom quantities + modify what default AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ void AtomVecPeri::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::data_atom(coord,imagetmp,values); + int ilocal = atom->nlocal-1; - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); + atom->s0[ilocal] = DBL_MAX; + atom->x0[ilocal][0] = coord[0]; + atom->x0[ilocal][1] = coord[1]; + atom->x0[ilocal][2] = coord[2]; - vfrac[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - rmass[nlocal] = utils::numeric(FLERR,values[3],true,lmp); - if (rmass[nlocal] <= 0.0) error->one(FLERR,"Invalid mass value"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - s0[nlocal] = DBL_MAX; - x0[nlocal][0] = coord[0]; - x0[nlocal][1] = coord[1]; - x0[nlocal][2] = coord[2]; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecPeri::data_atom_hybrid(int nlocal, char **values) -{ - vfrac[nlocal] = utils::numeric(FLERR,values[0],true,lmp); - rmass[nlocal] = utils::numeric(FLERR,values[1],true,lmp); - if (rmass[nlocal] <= 0.0) error->one(FLERR,"Invalid mass value"); - - s0[nlocal] = DBL_MAX; - x0[nlocal][0] = x[nlocal][0]; - x0[nlocal][1] = x[nlocal][1]; - x0[nlocal][2] = x[nlocal][2]; - - return 2; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecPeri::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = vfrac[i]; - buf[i][3] = rmass[i]; - buf[i][4] = x[i][0]; - buf[i][5] = x[i][1]; - buf[i][6] = x[i][2]; - buf[i][7] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecPeri::pack_data_hybrid(int i, double *buf) -{ - buf[0] = vfrac[i]; - buf[1] = rmass[i]; - return 2; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecPeri::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4],buf[i][5],buf[i][6], - (int) ubuf(buf[i][7]).i,(int) ubuf(buf[i][8]).i, - (int) ubuf(buf[i][9]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecPeri::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %-1.16e",buf[0],buf[1]); - return 2; + if (atom->rmass[ilocal] <= 0.0) + error->one(FLERR,"Invalid mass in Atoms section of data file"); } /* ---------------------------------------------------------------------- @@ -929,12 +132,14 @@ void AtomVecPeri::pack_property_atom(int index, double *buf, int n = 0; if (index == 0) { + double *vfrac = atom->vfrac; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = vfrac[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 1) { + double *s0 = atom->s0; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = s0[i]; else buf[n] = 0.0; @@ -942,27 +147,3 @@ void AtomVecPeri::pack_property_atom(int index, double *buf, } } } - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecPeri::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("vfrac")) bytes += memory->usage(vfrac,nmax); - if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); - if (atom->memcheck("s0")) bytes += memory->usage(s0,nmax); - if (atom->memcheck("x0")) bytes += memory->usage(x0,nmax,3); - - return bytes; -} diff --git a/src/PERI/atom_vec_peri.h b/src/PERI/atom_vec_peri.h index 0fc30d6dc2..12ef650348 100644 --- a/src/PERI/atom_vec_peri.h +++ b/src/PERI/atom_vec_peri.h @@ -27,45 +27,10 @@ namespace LAMMPS_NS { class AtomVecPeri : public AtomVec { public: AtomVecPeri(class LAMMPS *); - void grow(int); - void grow_reset(); - void copy(int, int, int); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); void create_atom(int, double *); void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); int property_atom(char *); void pack_property_atom(int, double *, int, int); - bigint memory_usage(); - - private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double *vfrac,*rmass,*s0,**x0; }; } @@ -75,17 +40,4 @@ class AtomVecPeri : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - -E: Invalid mass value - -Self-explanatory. - */ diff --git a/src/SPIN/atom_vec_spin.cpp b/src/SPIN/atom_vec_spin.cpp index ad1384ffd2..135f8936a1 100644 --- a/src/SPIN/atom_vec_spin.cpp +++ b/src/SPIN/atom_vec_spin.cpp @@ -27,13 +27,6 @@ #include #include #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "error.h" -#include "fix.h" -#include "memory.h" -#include "modify.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -45,908 +38,45 @@ AtomVecSpin::AtomVecSpin(LAMMPS *lmp) : AtomVec(lmp) mass_type = 1; forceclearflag = 1; - comm_x_only = 0; - comm_f_only = 0; - size_forward = 7; - size_reverse = 9; - size_border = 10; - size_velocity = 3; - size_data_atom = 9; - size_data_vel = 4; - xcol_data = 4; - atom->sp_flag = 1; -} -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecSpin::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - - // allocating mech. quantities - - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - // allocating mag. quantities - - sp = memory->grow(atom->sp,nmax,4,"atom:sp"); - fm = memory->grow(atom->fm,nmax*comm->nthreads,3,"atom:fm"); - fm_long = memory->grow(atom->fm_long,nmax*comm->nthreads,3,"atom:fm_long"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecSpin::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - sp = atom->sp; fm = atom->fm; fm_long = atom->fm_long; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecSpin::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - sp[j][0] = sp[i][0]; - sp[j][1] = sp[i][1]; - sp[j][2] = sp[i][2]; - sp[j][3] = sp[i][3]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSpin::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - buf[m++] = sp[j][3]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - buf[m++] = sp[j][3]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSpin::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - buf[m++] = sp[j][3]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - buf[m++] = sp[j][3]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - buf[m++] = sp[j][3]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSpin::pack_comm_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = sp[j][3]; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSpin::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - sp[i][0] = buf[m++]; - sp[i][1] = buf[m++]; - sp[i][2] = buf[m++]; - sp[i][3] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSpin::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - sp[i][0] = buf[m++]; - sp[i][1] = buf[m++]; - sp[i][2] = buf[m++]; - sp[i][3] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSpin::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - sp[i][3] = buf[m++]; - sp[i][0] = buf[m++]; - sp[i][1] = buf[m++]; - sp[i][2] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSpin::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = fm[i][0]; - buf[m++] = fm[i][1]; - buf[m++] = fm[i][2]; - buf[m++] = fm_long[i][0]; - buf[m++] = fm_long[i][1]; - buf[m++] = fm_long[i][2]; - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSpin::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - fm[j][0] += buf[m++]; - fm[j][1] += buf[m++]; - fm[j][2] += buf[m++]; - fm_long[j][0] += buf[m++]; - fm_long[j][1] += buf[m++]; - fm_long[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSpin::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - buf[m++] = sp[j][3]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - buf[m++] = sp[j][3]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSpin::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - buf[m++] = sp[j][3]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - buf[m++] = sp[j][3]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - buf[m++] = sp[j][3]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSpin::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = sp[j][3]; - buf[m++] = sp[j][0]; - buf[m++] = sp[j][1]; - buf[m++] = sp[j][2]; - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSpin::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - sp[i][0] = buf[m++]; - sp[i][1] = buf[m++]; - sp[i][2] = buf[m++]; - sp[i][3] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); - -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSpin::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - sp[i][0] = buf[m++]; - sp[i][1] = buf[m++]; - sp[i][2] = buf[m++]; - sp[i][3] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); - -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSpin::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - sp[i][3] = buf[m++]; - sp[i][0] = buf[m++]; - sp[i][1] = buf[m++]; - sp[i][2] = buf[m++]; - } - - return m; -} - -/* ---------------------------------------------------------------------- - pack all atom quantities for shipping to another proc - xyz must be 1st 3 values, so that comm::exchange can test on them -------------------------------------------------------------------------- */ - -int AtomVecSpin::pack_exchange(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = sp[i][0]; - buf[m++] = sp[i][1]; - buf[m++] = sp[i][2]; - buf[m++] = sp[i][3]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSpin::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - sp[nlocal][0] = buf[m++]; - sp[nlocal][1] = buf[m++]; - sp[nlocal][2] = buf[m++]; - sp[nlocal][3] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecSpin::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 15 * nlocal; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecSpin::pack_restart(int i, double *buf) -{ - int m = 1; - - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = sp[i][0]; - buf[m++] = sp[i][1]; - buf[m++] = sp[i][2]; - buf[m++] = sp[i][3]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecSpin::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - sp[nlocal][0] = buf[m++]; - sp[nlocal][1] = buf[m++]; - sp[nlocal][2] = buf[m++]; - sp[nlocal][3] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecSpin::create_atom(int itype, double *coord) -{ - - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - sp[nlocal][0] = 0.0; - sp[nlocal][1] = 0.0; - sp[nlocal][2] = 0.0; - sp[nlocal][3] = 0.0; - - atom->nlocal++; + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "sp fm fm_long"; + fields_copy = (char *) "sp"; + fields_comm = (char *) "sp"; + fields_comm_vel = (char *) "sp"; + fields_reverse = (char *) "fm fm_long"; + fields_border = (char *) "sp"; + fields_border_vel = (char *) "sp"; + fields_exchange = (char *) "sp"; + fields_restart = (char *) "sp"; + fields_create = (char *) "sp"; + fields_data_atom = (char *) "id type x sp"; + fields_data_vel = (char *) "omega"; + + setup_fields(); } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file - initialize other atom quantities + modify what default AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ void AtomVecSpin::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::data_atom(coord,imagetmp,values); + int ilocal = atom->nlocal-1; - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - sp[nlocal][3] = utils::numeric(FLERR,values[2],true,lmp); - sp[nlocal][0] = utils::numeric(FLERR,values[6],true,lmp); - sp[nlocal][1] = utils::numeric(FLERR,values[7],true,lmp); - sp[nlocal][2] = utils::numeric(FLERR,values[8],true,lmp); - double inorm = 1.0/sqrt(sp[nlocal][0]*sp[nlocal][0] + - sp[nlocal][1]*sp[nlocal][1] + - sp[nlocal][2]*sp[nlocal][2]); - sp[nlocal][0] *= inorm; - sp[nlocal][1] *= inorm; - sp[nlocal][2] *= inorm; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecSpin::data_atom_hybrid(int nlocal, char **values) -{ - - sp[nlocal][0] = utils::numeric(FLERR,values[0],true,lmp); - sp[nlocal][1] = utils::numeric(FLERR,values[1],true,lmp); - sp[nlocal][2] = utils::numeric(FLERR,values[2],true,lmp); - double inorm = 1.0/sqrt(sp[nlocal][0]*sp[nlocal][0] + - sp[nlocal][1]*sp[nlocal][1] + - sp[nlocal][2]*sp[nlocal][2]); - sp[nlocal][0] *= inorm; - sp[nlocal][1] *= inorm; - sp[nlocal][2] *= inorm; - sp[nlocal][3] = utils::numeric(FLERR,values[3],true,lmp); - - return 4; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecSpin::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = sp[i][3]; - buf[i][3] = x[i][0]; - buf[i][4] = x[i][1]; - buf[i][5] = x[i][2]; - buf[i][6] = sp[i][0]; - buf[i][7] = sp[i][1]; - buf[i][8] = sp[i][2]; - buf[i][9] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][10] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][11] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecSpin::pack_data_hybrid(int i, double *buf) -{ - buf[0] = sp[i][3]; - buf[1] = sp[i][0]; - buf[2] = sp[i][1]; - buf[3] = sp[i][2]; - return 4; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecSpin::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT \ - " %d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e " - "%-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4], - buf[i][5],buf[i][6],buf[i][7],buf[i][8], - (int) ubuf(buf[i][9]).i,(int) ubuf(buf[i][10]).i, - (int) ubuf(buf[i][11]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecSpin::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %-1.16e %-1.16e %-1.16e",buf[0],buf[1],buf[2],buf[3]); - return 4; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecSpin::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("sp")) bytes += memory->usage(sp,nmax,4); - if (atom->memcheck("fm")) bytes += memory->usage(fm,nmax*comm->nthreads,3); - if (atom->memcheck("fm_long")) bytes += memory->usage(fm_long,nmax*comm->nthreads,3); - - return bytes; + double *sp = atom->sp[ilocal]; + double inorm = 1.0/sqrt(sp[0]*sp[0] + sp[1]*sp[1] + sp[2]*sp[2]); + sp[0] *= inorm; + sp[1] *= inorm; + sp[2] *= inorm; } /* ---------------------------------------------------------------------- @@ -959,5 +89,3 @@ void AtomVecSpin::force_clear(int /*n*/, size_t nbytes) memset(&atom->fm[0][0],0,3*nbytes); memset(&atom->fm_long[0][0],0,3*nbytes); } - - diff --git a/src/SPIN/atom_vec_spin.h b/src/SPIN/atom_vec_spin.h index 6ce2c9dc7d..ca92cccc2e 100644 --- a/src/SPIN/atom_vec_spin.h +++ b/src/SPIN/atom_vec_spin.h @@ -27,53 +27,8 @@ namespace LAMMPS_NS { class AtomVecSpin : public AtomVec { public: AtomVecSpin(class LAMMPS *); - void grow(int); - void grow_reset(); - void copy(int, int, int); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - bigint memory_usage(); - - // clear magnetic and mechanic forces - void force_clear(int, size_t); - - - private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; // lattice quantities - - // spin quantities - double **sp; // sp[i][0-2] direction of the spin i - // sp[i][3] atomic magnetic moment of the spin i - double **fm; // fm[i][0-2] direction of magnetic precession - double **fm_long; // storage of long-range spin prec. components }; } @@ -83,13 +38,4 @@ class AtomVecSpin : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - */ diff --git a/src/atom.cpp b/src/atom.cpp index de5d30930a..7f1a5a6022 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -44,9 +44,11 @@ using namespace LAMMPS_NS; using namespace MathConst; #define DELTA 1 -#define DELTA_MEMSTR 1024 +#define DELTA_PERATOM 64 #define EPSILON 1.0e-6 +enum{DOUBLE,INT,BIGINT}; + /* ---------------------------------------------------------------------- */ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) @@ -66,6 +68,11 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) binhead = NULL; next = permute = NULL; + // data structure with info on per-atom vectors/arrays + + nperatom = maxperatom = 0; + peratom = NULL; + // initialize atom arrays // customize by adding new array @@ -193,6 +200,10 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) pdscale = 1.0; + // initialize peratom data structure + + peratom_create(); + // ntype-length arrays mass = NULL; @@ -245,6 +256,12 @@ Atom::~Atom() memory->destroy(next); memory->destroy(permute); + // delete peratom data struct + + for (int i = 0; i < nperatom; i++) + delete [] peratom[i].name; + memory->sfree(peratom); + // delete atom arrays // customize by adding new array @@ -403,6 +420,175 @@ void Atom::settings(Atom *old) } } +/* ---------------------------------------------------------------------- + one-time creation of peratom data structure +------------------------------------------------------------------------- */ + +void Atom::peratom_create() +{ + for (int i = 0; i < nperatom; i++) + delete [] peratom[i].name; + memory->sfree(peratom); + + peratom = NULL; + nperatom = maxperatom = 0; + + // customize: add new peratom variables here, order does not matter + // register tagint & imageint variables as INT or BIGINT + + int tagintsize = INT; + if (sizeof(tagint) == 8) tagintsize = BIGINT; + int imageintsize = INT; + if (sizeof(imageint) == 8) imageintsize = BIGINT; + + add_peratom("id",&tag,tagintsize,0); + add_peratom("type",&type,INT,0); + add_peratom("mask",&mask,INT,0); + add_peratom("image",&image,imageintsize,0); + + add_peratom("x",&x,DOUBLE,3); + add_peratom("v",&v,DOUBLE,3); + add_peratom("f",&f,DOUBLE,3,1); // set per-thread flag + + add_peratom("rmass",&rmass,DOUBLE,0); + add_peratom("q",&q,DOUBLE,0); + add_peratom("mu",&mu,DOUBLE,4); + add_peratom("mu3",&mu,DOUBLE,3); // just first 3 values of mu[4] + + // finite size particles + + add_peratom("radius",&radius,DOUBLE,0); + add_peratom("omega",&omega,DOUBLE,3); + add_peratom("amgmom",&angmom,DOUBLE,3); + add_peratom("torque",&torque,DOUBLE,3,1); // set per-thread flag + + add_peratom("ellipsoid",&ellipsoid,INT,0); + add_peratom("line",&line,INT,0); + add_peratom("tri",&tri,INT,0); + add_peratom("body",&body,INT,0); + + // MOLECULE package + + add_peratom("molecule",&molecule,tagintsize,0); + add_peratom("molindex",&molindex,INT,0); + add_peratom("molatom",&molatom,INT,0); + + add_peratom("nspecial",&nspecial,INT,3); + add_peratom_vary("special",&special,tagintsize,&maxspecial,&nspecial,3); + + add_peratom("num_bond",&num_bond,INT,0); + add_peratom_vary("bond_type",&bond_type,INT,&bond_per_atom,&num_bond); + add_peratom_vary("bond_atom",&bond_atom,tagintsize,&bond_per_atom,&num_bond); + + add_peratom("num_angle",&num_angle,INT,0); + add_peratom_vary("angle_type",&angle_type,INT,&angle_per_atom,&num_angle); + add_peratom_vary("angle_atom1",&angle_atom1,tagintsize, + &angle_per_atom,&num_angle); + add_peratom_vary("angle_atom2",&angle_atom2,tagintsize, + &angle_per_atom,&num_angle); + add_peratom_vary("angle_atom3",&angle_atom3,tagintsize, + &angle_per_atom,&num_angle); + + add_peratom("num_dihedral",&num_dihedral,INT,0); + add_peratom_vary("dihedral_type",&dihedral_type,INT, + &dihedral_per_atom,&num_dihedral); + add_peratom_vary("dihedral_atom1",&dihedral_atom1,tagintsize, + &dihedral_per_atom,&num_dihedral); + add_peratom_vary("dihedral_atom2",&dihedral_atom2,tagintsize, + &dihedral_per_atom,&num_dihedral); + add_peratom_vary("dihedral_atom3",&dihedral_atom3,tagintsize, + &dihedral_per_atom,&num_dihedral); + add_peratom_vary("dihedral_atom4",&dihedral_atom4,tagintsize, + &dihedral_per_atom,&num_dihedral); + + add_peratom("num_improper",&num_improper,INT,0); + add_peratom_vary("improper_type",&improper_type,INT, + &improper_per_atom,&num_improper); + add_peratom_vary("improper_atom1",&improper_atom1,tagintsize, + &improper_per_atom,&num_improper); + add_peratom_vary("improper_atom2",&improper_atom2,tagintsize, + &improper_per_atom,&num_improper); + add_peratom_vary("improper_atom3",&improper_atom3,tagintsize, + &improper_per_atom,&num_improper); + add_peratom_vary("improper_atom4",&improper_atom4,tagintsize, + &improper_per_atom,&num_improper); + + // PERI package + + add_peratom("vfrac",&vfrac,DOUBLE,0); + add_peratom("s0",&s0,DOUBLE,0); + add_peratom("x0",&x0,DOUBLE,3); + + // SPIN package + + add_peratom("sp",&sp,DOUBLE,4); + add_peratom("fm",&fm,DOUBLE,3,1); + add_peratom("fm_long",&fm_long,DOUBLE,3,1); +} + +/* ---------------------------------------------------------------------- + add info for a single per-atom vector/array to PerAtom data struct + cols = 0: per-atom vector + cols = N: static per-atom array with N columns + use add_peratom_vary() when column count varies per atom +------------------------------------------------------------------------- */ + +void Atom::add_peratom(const char *name, void *address, + int datatype, int cols, int threadflag) +{ + if (nperatom == maxperatom) { + maxperatom += DELTA_PERATOM; + peratom = (PerAtom *) + memory->srealloc(peratom,maxperatom*sizeof(PerAtom),"atom:peratom"); + } + + int n = strlen(name) + 1; + peratom[nperatom].name = new char[n]; + strcpy(peratom[nperatom].name,name); + peratom[nperatom].address = address; + peratom[nperatom].datatype = datatype; + peratom[nperatom].cols = cols; + peratom[nperatom].threadflag = threadflag; + peratom[nperatom].address_length = NULL; + + nperatom++; +} + +/* ---------------------------------------------------------------------- + add info for a single per-atom array to PerAtom data struct + cols = address of int variable with max columns per atom + for collength = 0: + length = address of peratom vector with column count per atom + e.g. num_bond + for collength = N: + length = address of peratom array with column count per atom + collength = index of column (1 to N) in peratom array with count + e.g. nspecial +------------------------------------------------------------------------- */ + +void Atom::add_peratom_vary(const char *name, void *address, + int datatype, int *cols, void *length, int collength) +{ + if (nperatom == maxperatom) { + maxperatom += DELTA_PERATOM; + peratom = (PerAtom *) + memory->srealloc(peratom,maxperatom*sizeof(PerAtom),"atom:peratom"); + } + + int n = strlen(name) + 1; + peratom[nperatom].name = new char[n]; + strcpy(peratom[nperatom].name,name); + peratom[nperatom].address = address; + peratom[nperatom].datatype = datatype; + peratom[nperatom].cols = -1; + peratom[nperatom].threadflag = 0; + peratom[nperatom].address_maxcols = cols; + peratom[nperatom].address_length = length; + peratom[nperatom].collength = collength; + + nperatom++; +} + /* ---------------------------------------------------------------------- create an AtomVec style called from lammps.cpp, input script, restart file, replicate @@ -2296,11 +2482,7 @@ void *Atom::extract(char *name) bigint Atom::memory_usage() { - memlength = DELTA_MEMSTR; - memory->create(memstr,memlength,"atom:memstr"); - memstr[0] = '\0'; bigint bytes = avec->memory_usage(); - memory->destroy(memstr); bytes += max_same*sizeof(int); if (map_style == 1) @@ -2316,31 +2498,3 @@ bigint Atom::memory_usage() return bytes; } - -/* ---------------------------------------------------------------------- - accumulate per-atom vec names in memstr, padded by spaces - return 1 if padded str is not already in memlist, else 0 -------------------------------------------------------------------------- */ - -int Atom::memcheck(const char *str) -{ - int n = strlen(str) + 3; - char *padded = new char[n]; - strcpy(padded," "); - strcat(padded,str); - strcat(padded," "); - - if (strstr(memstr,padded)) { - delete [] padded; - return 0; - } - - if ((int)strlen(memstr) + n >= memlength) { - memlength += DELTA_MEMSTR; - memory->grow(memstr,memlength,"atom:memstr"); - } - - strcat(memstr,padded); - delete [] padded; - return 1; -} diff --git a/src/atom.h b/src/atom.h index 81f643c007..6cc5dff72a 100644 --- a/src/atom.h +++ b/src/atom.h @@ -38,6 +38,8 @@ class Atom : protected Pointers { bigint nlines; // number of lines bigint ntris; // number of triangles bigint nbodies; // number of bodies + + // system properties bigint nbonds,nangles,ndihedrals,nimpropers; int ntypes,nbondtypes,nangletypes,ndihedraltypes,nimpropertypes; @@ -49,69 +51,28 @@ class Atom : protected Pointers { int nfirst; // # of atoms in first group on this proc char *firstgroupname; // group-ID to store first, NULL if unset - // per-atom arrays - // customize by adding new array + // -------------------------------------------------------------------- + // 1st customization section: customize by adding new per-atom variable + // per-atom vectors and arrays tagint *tag; int *type,*mask; imageint *image; double **x,**v,**f; - tagint *molecule; - int *molindex,*molatom; - + double *rmass; double *q,**mu; + + // finite-size particles + + double *radius; double **omega,**angmom,**torque; - double *radius,*rmass; int *ellipsoid,*line,*tri,*body; - // SPIN package + // MOLECULE package - double **sp; - double **fm; - double **fm_long; - - // PERI package - - double *vfrac,*s0; - double **x0; - - // USER-EFF and USER-AWPMD packages - - int *spin; - double *eradius,*ervel,*erforce,*ervelforce; - double *cs,*csforce,*vforce; - int *etag; - - // USER-SPH package - - double *rho,*drho,*e,*de,*cv; - double **vest; - - // USER-SMD package - - double *contact_radius; - double **smd_data_9; - double **smd_stress; - double *eff_plastic_strain; - double *eff_plastic_strain_rate; - double *damage; - - // USER-DPD package - - double *uCond,*uMech,*uChem,*uCGnew,*uCG; - double *duChem; - double *dpdTheta; - int nspecies_dpd; - - // USER-MESO package - - double **cc, **cc_flux; // cc = chemical concentration - double *edpd_temp,*edpd_flux; // temperature and heat flux - double *edpd_cv; // heat capacity - int cc_species; - - // molecular info + tagint *molecule; + int *molindex,*molatom; int **nspecial; // 0,1,2 = cumulative # of 1-2,1-3,1-4 neighs tagint **special; // IDs of 1-2,1-3,1-4 neighs of each atom @@ -133,15 +94,56 @@ class Atom : protected Pointers { int **improper_type; tagint **improper_atom1,**improper_atom2,**improper_atom3,**improper_atom4; - // custom arrays used by fix property/atom + // PERI package - int **ivector; - double **dvector; - char **iname,**dname; - int nivector,ndvector; + double *vfrac,*s0; + double **x0; - // atom style and per-atom array existence flags - // customize by adding new flag + // SPIN package + + double **sp; + double **fm; + double **fm_long; + + // USER-AWPMD and USER_EFF packages + + int *spin; + double *eradius,*ervel,*erforce,*ervelforce; + double *cs,*csforce,*vforce; + int *etag; + + // USER-DPD package + + double *uCond,*uMech,*uChem,*uCGnew,*uCG; + double *duChem; + double *dpdTheta; + int nspecies_dpd; + + // USER-MESO package + + double **cc, **cc_flux; // cc = chemical concentration + double *edpd_temp,*edpd_flux; // temperature and heat flux + double *edpd_cv; // heat capacity + int cc_species; + + // USER-SMD package + + double *contact_radius; + double **smd_data_9; + double **smd_stress; + double *eff_plastic_strain; + double *eff_plastic_strain_rate; + double *damage; + + // USER-SPH package + + double *rho,*drho,*e,*de,*cv; + double **vest; + + // -------------------------------------------------------------------- + // 1st customization section: customize by adding new flag + // existence flags for per-atom vectors and arrays + // 1 if variable is used, 0 if not int sphere_flag,ellipsoid_flag,line_flag,tri_flag,body_flag; int peri_flag,electron_flag; @@ -156,7 +158,7 @@ class Atom : protected Pointers { int rho_flag,e_flag,cv_flag,vest_flag; int dpd_flag,edpd_flag,tdpd_flag; - //USER-SPIN package + // USER-SPIN package int sp_flag; @@ -175,6 +177,32 @@ class Atom : protected Pointers { double pdscale; + // end of 2 customization sections + // -------------------------------------------------------------------- + + // per-atom data struct describing all per-atom vectors/arrays + + struct PerAtom { + char *name; + void *address; + void *address_length; + int *address_maxcols; + int datatype; + int cols; + int collength; + int threadflag; + }; + + PerAtom *peratom; + int nperatom,maxperatom; + + // custom arrays used by fix property/atom + + int **ivector; + double **dvector; + char **iname,**dname; + int nivector,ndvector; + // molecule templates // each template can be a set of consecutive molecules // each with same ID (stored in molecules) @@ -221,12 +249,17 @@ class Atom : protected Pointers { typedef std::map AtomVecCreatorMap; AtomVecCreatorMap *avec_map; + // -------------------------------------------------------------------- // functions Atom(class LAMMPS *); ~Atom(); void settings(class Atom *); + void peratom_create(); + void add_peratom(const char *, void *, int, int, int threadflag=0); + void add_peratom_vary(const char *, void *, int, int *, + void *, int collength=0); void create_avec(const char *, int, char **, int); virtual class AtomVec *new_avec(const char *, int, int &); void init(); @@ -289,8 +322,10 @@ class Atom : protected Pointers { inline int get_map_size() {return map_tag_max+1;}; inline int get_map_maxarray() {return map_maxarray+1;}; + // NOTE: placeholder method until AtomVec is refactored + int memcheck(const char *) {return 1;} + bigint memory_usage(); - int memcheck(const char *); // functions for global to local ID mapping // map lookup function inlined for efficiency @@ -343,9 +378,6 @@ class Atom : protected Pointers { double bininvx,bininvy,bininvz; // inverse actual bin sizes double bboxlo[3],bboxhi[3]; // bounding box of my sub-domain - int memlength; // allocated size of memstr - char *memstr; // string of array names already counted - void setup_sort_bins(); int next_prime(int); diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index bc94e36e7a..428117f0db 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -12,18 +12,27 @@ ------------------------------------------------------------------------- */ #include "atom_vec.h" +#include #include #include "atom.h" -#include "force.h" +#include "comm.h" #include "domain.h" +#include "force.h" +#include "modify.h" +#include "fix.h" +#include "math_const.h" +#include "memory.h" #include "error.h" #include "utils.h" using namespace LAMMPS_NS; +using namespace MathConst; #define DELTA 16384 #define DELTA_BONUS 8192 +enum{DOUBLE,INT,BIGINT}; + /* ---------------------------------------------------------------------- */ AtomVec::AtomVec(LAMMPS *lmp) : Pointers(lmp) @@ -39,6 +48,40 @@ AtomVec::AtomVec(LAMMPS *lmp) : Pointers(lmp) nargcopy = 0; argcopy = NULL; + + nthreads = comm->nthreads; + + // peratom variables auto-included in corresponding child style fields string + // these fields cannot be specified in the fields string + // leading/trailing whitespace just facilitates matching in process_args() + + default_grow = " id type mask image x v f "; + default_copy = " id type mask image x v "; + default_comm = " x "; + default_comm_vel = " x v "; + default_reverse = " f "; + default_border = " id type mask x "; + default_border_vel = " id type mask x v "; + default_exchange = " id type mask image x v "; + default_restart = " id type mask image x v "; + default_create = " id type mask image x v "; + default_data_atom = ""; + default_data_vel = " v "; + + // initializations + + init_method(&mgrow); + init_method(&mcopy); + init_method(&mcomm); + init_method(&mcomm_vel); + init_method(&mreverse); + init_method(&mborder); + init_method(&mborder_vel); + init_method(&mexchange); + init_method(&mrestart); + init_method(&mcreate); + init_method(&mdata_atom); + init_method(&mdata_vel); } /* ---------------------------------------------------------------------- */ @@ -47,6 +90,21 @@ AtomVec::~AtomVec() { for (int i = 0; i < nargcopy; i++) delete [] argcopy[i]; delete [] argcopy; + + destroy_method(&mgrow); + destroy_method(&mcopy); + destroy_method(&mcomm); + destroy_method(&mcomm_vel); + destroy_method(&mreverse); + destroy_method(&mborder); + destroy_method(&mborder_vel); + destroy_method(&mexchange); + destroy_method(&mrestart); + destroy_method(&mcreate); + destroy_method(&mdata_atom); + destroy_method(&mdata_vel); + + delete [] threads; } /* ---------------------------------------------------------------------- @@ -87,6 +145,223 @@ void AtomVec::init() error->all(FLERR,"KOKKOS package requires a kokkos enabled atom_style"); } +/* ---------------------------------------------------------------------- + process field strings to initialize data structs for all other methods +------------------------------------------------------------------------- */ + +void AtomVec::setup_fields() +{ + int n,cols; + + if (!fields_data_atom) + error->all(FLERR,"Atom style requires fields_data_atom"); + + // process field strings + // return # of fields and matching index into atom->peratom (in Method struct) + + ngrow = process_fields(fields_grow,default_grow,&mgrow); + ncopy = process_fields(fields_copy,default_copy,&mcopy); + ncomm = process_fields(fields_comm,default_comm,&mcomm); + ncomm_vel = process_fields(fields_comm_vel,default_comm_vel,&mcomm_vel); + nreverse = process_fields(fields_reverse,default_reverse,&mreverse); + nborder = process_fields(fields_border,default_border,&mborder); + nborder_vel = process_fields(fields_border_vel,default_border_vel,&mborder_vel); + nexchange = process_fields(fields_exchange,default_exchange,&mexchange); + nrestart = process_fields(fields_restart,default_restart,&mrestart); + ncreate = process_fields(fields_create,default_create,&mcreate); + ndata_atom = process_fields(fields_data_atom,default_data_atom,&mdata_atom); + ndata_vel = process_fields(fields_data_vel,default_data_vel,&mdata_vel); + + // populate field-based data struct for each method to use + + create_method(ngrow,&mgrow); + create_method(ncopy,&mcopy); + create_method(ncomm,&mcomm); + create_method(ncomm_vel,&mcomm_vel); + create_method(nreverse,&mreverse); + create_method(nborder,&mborder); + create_method(nborder_vel,&mborder_vel); + create_method(nexchange,&mexchange); + create_method(nrestart,&mrestart); + create_method(ncreate,&mcreate); + create_method(ndata_atom,&mdata_atom); + create_method(ndata_vel,&mdata_vel); + + // create threads data struct for grow and memory_usage to use + + threads = new int[ngrow]; + for (int i = 0; i < ngrow; i++) { + Atom::PerAtom *field = &atom->peratom[mgrow.index[i]]; + if (field->threadflag) threads[i] = nthreads; + else threads[i] = 1; + } + + // set style-specific variables + // NOTE: check for others vars in atom_vec.cpp/h ?? + + if (ncomm == 0) comm_x_only = 1; + else comm_x_only = 0; + + if (nreverse == 0) comm_f_only = 1; + else comm_f_only = 0; + + size_forward = 3; + for (n = 0; n < ncomm; n++) { + cols = mcomm.cols[n]; + if (cols == 0) size_forward++; + else size_forward += cols; + } + + size_reverse = 3; + for (n = 0; n < nreverse; n++) { + cols = mreverse.cols[n]; + if (cols == 0) size_reverse++; + else size_reverse += cols; + } + + size_border = 6; + for (n = 0; n < nborder; n++) { + cols = mborder.cols[n]; + if (cols == 0) size_border++; + else size_border += cols; + } + + size_velocity = 3; + for (n = 0; n < ncomm_vel; n++) { + cols = mcomm_vel.cols[n]; + if (cols == 0) size_velocity++; + else size_velocity += cols; + } + + size_data_atom = 0; + for (n = 0; n < ndata_atom; n++) { + cols = mdata_atom.cols[n]; + if (strcmp(atom->peratom[mdata_atom.index[n]].name,"x") == 0) + xcol_data = size_data_atom + 1; + if (cols == 0) size_data_atom++; + else size_data_atom += cols; + } + + size_data_vel = 4; + for (n = 0; n < ndata_vel; n++) { + cols = mdata_vel.cols[n]; + if (cols == 0) size_data_vel++; + else size_data_vel += cols; + } +} + +/* ---------------------------------------------------------------------- + process a single field string +------------------------------------------------------------------------- */ + +int AtomVec::process_fields(char *list, const char *default_list, Method *method) +{ + int i,n; + char match[128]; + + if (list == NULL) { + method->index = NULL; + return 0; + } + + // make copy of list of fields so can tokenize it + + n = strlen(list) + 1; + char *copy = new char[n]; + strcpy(copy,list); + + int nfield = atom->count_words(copy); + int *index = new int[nfield]; + + Atom::PerAtom *peratom = atom->peratom; + int nperatom = atom->nperatom; + + nfield = 0; + char *field = strtok(copy," "); + while (field) { + + // find field in master Atom::peratom list + + for (i = 0; i < nperatom; i++) + if (strcmp(field,peratom[i].name) == 0) break; + if (i == nperatom) error->all(FLERR,"Atom_style unrecognized peratom field"); + index[nfield++] = i; + + // error if field is in default list or appears multiple times + + sprintf(match," %s ",field); + if (strstr(default_list,match)) + error->all(FLERR,"Atom_style repeat of default peratom field"); + + for (i = 0; i < nfield-1; i++) + if (index[i] == index[nfield-1]) + error->all(FLERR,"Atom_style duplicated peratom field"); + + field = strtok(NULL," "); + } + + delete [] copy; + + method->index = index; + return nfield; +} + +/* ---------------------------------------------------------------------- + create a method data structs for processing fields +------------------------------------------------------------------------- */ + +void AtomVec::create_method(int nfield, Method *method) +{ + method->pdata = new void*[nfield]; + method->datatype = new int[nfield]; + method->cols = new int[nfield]; + method->maxcols = new int*[nfield]; + method->collength = new int[nfield]; + method->plength = new void*[nfield]; + + for (int i = 0; i < nfield; i++) { + Atom::PerAtom *field = &atom->peratom[method->index[i]]; + method->pdata[i] = (void *) field->address; + method->datatype[i] = field->datatype; + method->cols[i] = field->cols; + if (method->cols[i] < 0) { + method->maxcols[i] = field->address_maxcols; + method->collength[i] = field->collength; + method->plength[i] = field->address_length; + } + } +} + +/* ---------------------------------------------------------------------- + free memory in a method data structs +------------------------------------------------------------------------- */ + +void AtomVec::init_method(Method *method) +{ + method->pdata = NULL; + method->datatype = NULL; + method->cols = NULL; + method->maxcols = NULL; + method->collength = NULL; + method->plength = NULL; + method->index = NULL; +} + +/* ---------------------------------------------------------------------- + free memory in a method data structs +------------------------------------------------------------------------- */ + +void AtomVec::destroy_method(Method *method) +{ + delete [] method->pdata; + delete [] method->datatype; + delete [] method->cols; + delete [] method->maxcols; + delete [] method->collength; + delete [] method->plength; + delete [] method->index; +} + /* ---------------------------------------------------------------------- grow nmax so it is a multiple of DELTA ------------------------------------------------------------------------- */ @@ -108,16 +383,1700 @@ int AtomVec::grow_nmax_bonus(int nmax_bonus) return nmax_bonus; } +/* ---------------------------------------------------------------------- + grow atom arrays + n = 0 grows arrays by a chunk + n > 0 allocates arrays to size n +------------------------------------------------------------------------- */ + +void AtomVec::grow(int n) +{ + int i,datatype,cols,maxcols; + void *pdata,*plength; + + if (n == 0) grow_nmax(); + else nmax = n; + atom->nmax = nmax; + if (nmax < 0 || nmax > MAXSMALLINT) + error->one(FLERR,"Per-processor system is too big"); + + tag = memory->grow(atom->tag,nmax,"atom:tag"); + type = memory->grow(atom->type,nmax,"atom:type"); + mask = memory->grow(atom->mask,nmax,"atom:mask"); + image = memory->grow(atom->image,nmax,"atom:image"); + x = memory->grow(atom->x,nmax,3,"atom:x"); + v = memory->grow(atom->v,nmax,3,"atom:v"); + f = memory->grow(atom->f,nmax*nthreads,3,"atom:f"); + + for (i = 0; i < ngrow; i++) { + pdata = mgrow.pdata[i]; + datatype = mgrow.datatype[i]; + cols = mgrow.cols[i]; + if (datatype == DOUBLE) { + if (cols == 0) + memory->grow(*((double **) pdata),nmax*threads[i],"atom:dvec"); + else if (cols > 0) + memory->grow(*((double ***) pdata),nmax*threads[i],cols,"atom:darray"); + else { + maxcols = *(mgrow.maxcols[i]); + memory->grow(*((double ***) pdata),nmax*threads[i],maxcols,"atom:darray"); + } + } else if (datatype == INT) { + if (cols == 0) + memory->grow(*((int **) pdata),nmax*threads[i],"atom:ivec"); + else if (cols > 0) + memory->grow(*((int ***) pdata),nmax*threads[i],cols,"atom:iarray"); + else { + maxcols = *(mgrow.maxcols[i]); + memory->grow(*((int ***) pdata),nmax*threads[i],maxcols,"atom:iarray"); + } + } else if (datatype == BIGINT) { + if (cols == 0) + memory->grow(*((bigint **) pdata),nmax*threads[i],"atom:bvec"); + else if (cols > 0) + memory->grow(*((bigint ***) pdata),nmax*threads[i],cols,"atom:barray"); + else { + maxcols = *(mgrow.maxcols[i]); + memory->grow(*((int ***) pdata),nmax*threads[i],maxcols,"atom:barray"); + } + } + } + + for (int iextra = 0; iextra < atom->nextra_grow; iextra++) + modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); +} + +/* ---------------------------------------------------------------------- + reset local array ptrs +------------------------------------------------------------------------- */ + +void AtomVec::grow_reset() +{ + // NOTE: is this method needed anymore + tag = atom->tag; type = atom->type; + mask = atom->mask; image = atom->image; + x = atom->x; v = atom->v; f = atom->f; +} + +/* ---------------------------------------------------------------------- + copy atom I info to atom J +------------------------------------------------------------------------- */ + +void AtomVec::copy(int i, int j, int delflag) +{ + int m,n,datatype,cols,collength,ncols; + void *pdata,*plength; + + tag[j] = tag[i]; + type[j] = type[i]; + mask[j] = mask[i]; + image[j] = image[i]; + x[j][0] = x[i][0]; + x[j][1] = x[i][1]; + x[j][2] = x[i][2]; + v[j][0] = v[i][0]; + v[j][1] = v[i][1]; + v[j][2] = v[i][2]; + + if (ncopy) { + for (n = 0; n < ncopy; n++) { + pdata = mcopy.pdata[n]; + datatype = mcopy.datatype[n]; + cols = mcopy.cols[n]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + vec[j] = vec[i]; + } else if (cols > 0) { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) + array[j][m] = array[i][m]; + } else { + double **array = *((double ***) pdata); + collength = mcopy.collength[n]; + plength = mcopy.plength[n]; + if (collength) ncols = (*((int ***) plength))[i][collength-1]; + else ncols = (*((int **) plength))[i]; + for (m = 0; m < ncols; m++) + array[j][m] = array[i][m]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + vec[j] = vec[i]; + } else if (cols > 0) { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + array[j][m] = array[i][m]; + } else { + int **array = *((int ***) pdata); + collength = mcopy.collength[n]; + plength = mcopy.plength[n]; + if (collength) ncols = (*((int ***) plength))[i][collength-1]; + else ncols = (*((int **) plength))[i]; + for (m = 0; m < ncols; m++) + array[j][m] = array[i][m]; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + vec[j] = vec[i]; + } else if (cols > 0) { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + array[j][m] = array[i][m]; + } else { + bigint **array = *((bigint ***) pdata); + collength = mcopy.collength[n]; + plength = mcopy.plength[n]; + if (collength) ncols = (*((int ***) plength))[i][collength-1]; + else ncols = (*((int **) plength))[i]; + for (m = 0; m < ncols; m++) + array[j][m] = array[i][m]; + } + } + } + } + + if (atom->nextra_grow) + for (int iextra = 0; iextra < atom->nextra_grow; iextra++) + modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); +} + +/* ---------------------------------------------------------------------- */ + +int AtomVec::pack_comm(int n, int *list, double *buf, + int pbc_flag, int *pbc) +{ + int i,j,m,mm,nn,datatype,cols; + double dx,dy,dz; + void *pdata; + + m = 0; + if (pbc_flag == 0) { + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x[j][0]; + buf[m++] = x[j][1]; + buf[m++] = x[j][2]; + } + } else { + if (domain->triclinic == 0) { + dx = pbc[0]*domain->xprd; + dy = pbc[1]*domain->yprd; + dz = pbc[2]*domain->zprd; + } else { + dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; + dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; + dz = pbc[2]*domain->zprd; + } + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x[j][0] + dx; + buf[m++] = x[j][1] + dy; + buf[m++] = x[j][2] + dz; + } + } + + if (comm) { + for (nn = 0; nn < ncomm; nn++) { + pdata = mcomm.pdata[nn]; + datatype = mcomm.datatype[nn]; + cols = mcomm.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = vec[j]; + } + } else { + double **array = *((double ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = array[j][mm]; + } + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = ubuf(vec[j]).d; + } + } else { + int **array = *((int ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[j][mm]).d; + } + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = ubuf(vec[j]).d; + } + } else { + bigint **array = *((bigint ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[j][mm]).d; + } + } + } + } + } + + return m; +} + +/* ---------------------------------------------------------------------- */ + +int AtomVec::pack_comm_vel(int n, int *list, double *buf, + int pbc_flag, int *pbc) +{ + int i,j,m,mm,nn,datatype,cols; + double dx,dy,dz,dvx,dvy,dvz; + void *pdata; + + m = 0; + if (pbc_flag == 0) { + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x[j][0]; + buf[m++] = x[j][1]; + buf[m++] = x[j][2]; + buf[m++] = v[j][0]; + buf[m++] = v[j][1]; + buf[m++] = v[j][2]; + } + } else { + if (domain->triclinic == 0) { + dx = pbc[0]*domain->xprd; + dy = pbc[1]*domain->yprd; + dz = pbc[2]*domain->zprd; + } else { + dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; + dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; + dz = pbc[2]*domain->zprd; + } + if (!deform_vremap) { + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x[j][0] + dx; + buf[m++] = x[j][1] + dy; + buf[m++] = x[j][2] + dz; + buf[m++] = v[j][0]; + buf[m++] = v[j][1]; + buf[m++] = v[j][2]; + } + } else { + dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; + dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; + dvz = pbc[2]*h_rate[2]; + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x[j][0] + dx; + buf[m++] = x[j][1] + dy; + buf[m++] = x[j][2] + dz; + if (mask[i] & deform_groupbit) { + buf[m++] = v[j][0] + dvx; + buf[m++] = v[j][1] + dvy; + buf[m++] = v[j][2] + dvz; + } else { + buf[m++] = v[j][0]; + buf[m++] = v[j][1]; + buf[m++] = v[j][2]; + } + } + } + } + + if (ncomm_vel) { + for (nn = 0; nn < ncomm_vel; nn++) { + pdata = mcomm_vel.pdata[nn]; + datatype = mcomm_vel.datatype[nn]; + cols = mcomm_vel.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = vec[j]; + } + } else { + double **array = *((double ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = array[j][mm]; + } + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = ubuf(vec[j]).d; + } + } else { + int **array = *((int ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[j][mm]).d; + } + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = ubuf(vec[j]).d; + } + } else { + bigint **array = *((bigint ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[j][mm]).d; + } + } + } + } + } + + return m; +} + +/* ---------------------------------------------------------------------- */ + +void AtomVec::unpack_comm(int n, int first, double *buf) +{ + int i,m,last,mm,nn,datatype,cols; + void *pdata; + + m = 0; + last = first + n; + for (i = first; i < last; i++) { + x[i][0] = buf[m++]; + x[i][1] = buf[m++]; + x[i][2] = buf[m++]; + } + + if (ncomm) { + for (nn = 0; nn < ncomm; nn++) { + pdata = mcomm.pdata[nn]; + datatype = mcomm.datatype[nn]; + cols = mcomm.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + for (i = first; i < last; i++) + vec[i] = buf[m++]; + } else { + double **array = *((double ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = buf[m++]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + for (i = first; i < last; i++) + vec[i] = ubuf(buf[m++]).i; + } else { + int **array = *((int ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = (int) ubuf(buf[m++]).i; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + for (i = first; i < last; i++) + vec[i] = (bigint) ubuf(buf[m++]).i; + } else { + bigint **array = *((bigint ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = (bigint) ubuf(buf[m++]).i; + } + } + } + } +} + +/* ---------------------------------------------------------------------- */ + +void AtomVec::unpack_comm_vel(int n, int first, double *buf) +{ + int i,m,last,mm,nn,datatype,cols; + void *pdata; + + m = 0; + last = first + n; + for (i = first; i < last; i++) { + x[i][0] = buf[m++]; + x[i][1] = buf[m++]; + x[i][2] = buf[m++]; + v[i][0] = buf[m++]; + v[i][1] = buf[m++]; + v[i][2] = buf[m++]; + } + + if (ncomm_vel) { + for (nn = 0; nn < ncomm_vel; nn++) { + pdata = mcomm_vel.pdata[nn]; + datatype = mcomm_vel.datatype[nn]; + cols = mcomm_vel.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + for (i = first; i < last; i++) + vec[i] = buf[m++]; + } else { + double **array = *((double ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = buf[m++]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + for (i = first; i < last; i++) + vec[i] = ubuf(buf[m++]).i; + } else { + int **array = *((int ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = (int) ubuf(buf[m++]).i; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + for (i = first; i < last; i++) + vec[i] = (bigint) ubuf(buf[m++]).i; + } else { + bigint **array = *((bigint ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = (bigint) ubuf(buf[m++]).i; + } + } + } + } +} + +/* ---------------------------------------------------------------------- */ + +int AtomVec::pack_reverse(int n, int first, double *buf) +{ + int i,m,last,mm,nn,datatype,cols; + void *pdata; + + m = 0; + last = first + n; + for (i = first; i < last; i++) { + buf[m++] = f[i][0]; + buf[m++] = f[i][1]; + buf[m++] = f[i][2]; + } + + if (nreverse) { + for (nn = 0; nn < nreverse; nn++) { + pdata = mreverse.pdata[nn]; + datatype = mreverse.datatype[nn]; + cols = mreverse.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + for (i = first; i < last; i++) { + buf[m++] = vec[i]; + } + } else { + double **array = *((double ***) pdata); + for (i = first; i < last; i++) { + for (mm = 0; mm < cols; mm++) + buf[m++] = array[i][mm]; + } + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + for (i = first; i < last; i++) { + buf[m++] = ubuf(vec[i]).d; + } + } else { + int **array = *((int ***) pdata); + for (i = first; i < last; i++) { + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[i][mm]).d; + } + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + for (i = first; i < last; i++) { + buf[m++] = ubuf(vec[i]).d; + } + } else { + bigint **array = *((bigint ***) pdata); + for (i = first; i < last; i++) { + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[i][mm]).d; + } + } + } + } + } + + return m; +} + +/* ---------------------------------------------------------------------- */ + +void AtomVec::unpack_reverse(int n, int *list, double *buf) +{ + int i,j,m,mm,nn,datatype,cols; + void *pdata; + + m = 0; + for (i = 0; i < n; i++) { + j = list[i]; + f[j][0] += buf[m++]; + f[j][1] += buf[m++]; + f[j][2] += buf[m++]; + } + + if (nreverse) { + for (nn = 0; nn < nreverse; nn++) { + pdata = mreverse.pdata[nn]; + datatype = mreverse.datatype[nn]; + cols = mreverse.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + vec[j] += buf[m++]; + } + } else { + double **array = *((double ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + array[j][mm] += buf[m++]; + } + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + vec[j] += buf[m++]; + } + } else { + int **array = *((int ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + array[j][mm] += buf[m++]; + } + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + vec[j] += buf[m++]; + } + } else { + bigint **array = *((bigint ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + array[j][mm] += buf[m++]; + } + } + } + } + } +} + +/* ---------------------------------------------------------------------- */ + +int AtomVec::pack_border(int n, int *list, double *buf, int pbc_flag, int *pbc) +{ + int i,j,m,mm,nn,datatype,cols; + double dx,dy,dz; + void *pdata; + + m = 0; + if (pbc_flag == 0) { + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x[j][0]; + buf[m++] = x[j][1]; + buf[m++] = x[j][2]; + buf[m++] = ubuf(tag[j]).d; + buf[m++] = ubuf(type[j]).d; + buf[m++] = ubuf(mask[j]).d; + } + } else { + if (domain->triclinic == 0) { + dx = pbc[0]*domain->xprd; + dy = pbc[1]*domain->yprd; + dz = pbc[2]*domain->zprd; + } else { + dx = pbc[0]; + dy = pbc[1]; + dz = pbc[2]; + } + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x[j][0] + dx; + buf[m++] = x[j][1] + dy; + buf[m++] = x[j][2] + dz; + buf[m++] = ubuf(tag[j]).d; + buf[m++] = ubuf(type[j]).d; + buf[m++] = ubuf(mask[j]).d; + } + } + + if (nborder) { + for (nn = 0; nn < nborder; nn++) { + pdata = mborder.pdata[nn]; + datatype = mborder.datatype[nn]; + cols = mborder.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = vec[j]; + } + } else { + double **array = *((double ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = array[j][mm]; + } + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = ubuf(vec[j]).d; + } + } else { + int **array = *((int ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[j][mm]).d; + } + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = ubuf(vec[j]).d; + } + } else { + bigint **array = *((bigint ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[j][mm]).d; + } + } + } + } + } + + if (atom->nextra_border) + for (int iextra = 0; iextra < atom->nextra_border; iextra++) + m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); + + return m; +} + +/* ---------------------------------------------------------------------- */ + +int AtomVec::pack_border_vel(int n, int *list, double *buf, + int pbc_flag, int *pbc) +{ + int i,j,m,mm,nn,datatype,cols; + double dx,dy,dz,dvx,dvy,dvz; + void *pdata; + + m = 0; + if (pbc_flag == 0) { + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x[j][0]; + buf[m++] = x[j][1]; + buf[m++] = x[j][2]; + buf[m++] = ubuf(tag[j]).d; + buf[m++] = ubuf(type[j]).d; + buf[m++] = ubuf(mask[j]).d; + buf[m++] = v[j][0]; + buf[m++] = v[j][1]; + buf[m++] = v[j][2]; + } + } else { + if (domain->triclinic == 0) { + dx = pbc[0]*domain->xprd; + dy = pbc[1]*domain->yprd; + dz = pbc[2]*domain->zprd; + } else { + dx = pbc[0]; + dy = pbc[1]; + dz = pbc[2]; + } + if (!deform_vremap) { + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x[j][0] + dx; + buf[m++] = x[j][1] + dy; + buf[m++] = x[j][2] + dz; + buf[m++] = ubuf(tag[j]).d; + buf[m++] = ubuf(type[j]).d; + buf[m++] = ubuf(mask[j]).d; + buf[m++] = v[j][0]; + buf[m++] = v[j][1]; + buf[m++] = v[j][2]; + } + } else { + dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; + dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; + dvz = pbc[2]*h_rate[2]; + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x[j][0] + dx; + buf[m++] = x[j][1] + dy; + buf[m++] = x[j][2] + dz; + buf[m++] = ubuf(tag[j]).d; + buf[m++] = ubuf(type[j]).d; + buf[m++] = ubuf(mask[j]).d; + if (mask[i] & deform_groupbit) { + buf[m++] = v[j][0] + dvx; + buf[m++] = v[j][1] + dvy; + buf[m++] = v[j][2] + dvz; + } else { + buf[m++] = v[j][0]; + buf[m++] = v[j][1]; + buf[m++] = v[j][2]; + } + } + } + } + + if (nborder_vel) { + for (nn = 0; nn < nborder_vel; nn++) { + pdata = mborder_vel.pdata[nn]; + datatype = mborder_vel.datatype[nn]; + cols = mborder_vel.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = vec[j]; + } + } else { + double **array = *((double ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = array[j][mm]; + } + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = ubuf(vec[j]).d; + } + } else { + int **array = *((int ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[j][mm]).d; + } + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = ubuf(vec[j]).d; + } + } else { + bigint **array = *((bigint ***) pdata); + for (i = 0; i < n; i++) { + j = list[i]; + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[j][mm]).d; + } + } + } + } + } + + if (atom->nextra_border) + for (int iextra = 0; iextra < atom->nextra_border; iextra++) + m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); + + return m; +} + +/* ---------------------------------------------------------------------- */ + +void AtomVec::unpack_border(int n, int first, double *buf) +{ + int i,m,last,mm,nn,datatype,cols; + void *pdata; + + m = 0; + last = first + n; + for (i = first; i < last; i++) { + if (i == nmax) grow(0); + x[i][0] = buf[m++]; + x[i][1] = buf[m++]; + x[i][2] = buf[m++]; + tag[i] = (tagint) ubuf(buf[m++]).i; + type[i] = (int) ubuf(buf[m++]).i; + mask[i] = (int) ubuf(buf[m++]).i; + } + + if (nborder) { + for (nn = 0; nn < nborder; nn++) { + pdata = mborder.pdata[nn]; + datatype = mborder.datatype[nn]; + cols = mborder.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + for (i = first; i < last; i++) + vec[i] = buf[m++]; + } else { + double **array = *((double ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = buf[m++]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + for (i = first; i < last; i++) + vec[i] = ubuf(buf[m++]).i; + } else { + int **array = *((int ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = (int) ubuf(buf[m++]).i; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + for (i = first; i < last; i++) + vec[i] = (bigint) ubuf(buf[m++]).i; + } else { + bigint **array = *((bigint ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = (bigint) ubuf(buf[m++]).i; + } + } + } + } + + if (atom->nextra_border) + for (int iextra = 0; iextra < atom->nextra_border; iextra++) + m += modify->fix[atom->extra_border[iextra]]-> + unpack_border(n,first,&buf[m]); +} + +/* ---------------------------------------------------------------------- */ + +void AtomVec::unpack_border_vel(int n, int first, double *buf) +{ + int i,m,last,mm,nn,datatype,cols; + void *pdata; + + m = 0; + last = first + n; + for (i = first; i < last; i++) { + if (i == nmax) grow(0); + x[i][0] = buf[m++]; + x[i][1] = buf[m++]; + x[i][2] = buf[m++]; + tag[i] = (tagint) ubuf(buf[m++]).i; + type[i] = (int) ubuf(buf[m++]).i; + mask[i] = (int) ubuf(buf[m++]).i; + v[i][0] = buf[m++]; + v[i][1] = buf[m++]; + v[i][2] = buf[m++]; + } + + if (nborder_vel) { + for (nn = 0; nn < nborder_vel; nn++) { + pdata = mborder_vel.pdata[nn]; + datatype = mborder_vel.datatype[nn]; + cols = mborder_vel.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + for (i = first; i < last; i++) + vec[i] = buf[m++]; + } else { + double **array = *((double ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = buf[m++]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + for (i = first; i < last; i++) + vec[i] = ubuf(buf[m++]).i; + } else { + int **array = *((int ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = (int) ubuf(buf[m++]).i; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + for (i = first; i < last; i++) + vec[i] = (bigint) ubuf(buf[m++]).i; + } else { + bigint **array = *((bigint ***) pdata); + for (i = first; i < last; i++) + for (mm = 0; mm < cols; mm++) + array[i][mm] = (bigint) ubuf(buf[m++]).i; + } + } + } + } + + if (atom->nextra_border) + for (int iextra = 0; iextra < atom->nextra_border; iextra++) + m += modify->fix[atom->extra_border[iextra]]-> + unpack_border(n,first,&buf[m]); +} + +/* ---------------------------------------------------------------------- + pack data for atom I for sending to another proc + xyz must be 1st 3 values, so comm::exchange() can test on them +------------------------------------------------------------------------- */ + +int AtomVec::pack_exchange(int i, double *buf) +{ + int mm,nn,datatype,cols,collength,ncols; + void *pdata,*plength; + + int m = 1; + buf[m++] = x[i][0]; + buf[m++] = x[i][1]; + buf[m++] = x[i][2]; + buf[m++] = v[i][0]; + buf[m++] = v[i][1]; + buf[m++] = v[i][2]; + buf[m++] = ubuf(tag[i]).d; + buf[m++] = ubuf(type[i]).d; + buf[m++] = ubuf(mask[i]).d; + buf[m++] = ubuf(image[i]).d; + + if (nexchange) { + for (nn = 0; nn < nexchange; nn++) { + pdata = mexchange.pdata[nn]; + datatype = mexchange.datatype[nn]; + cols = mexchange.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + buf[m++] = vec[i]; + } else if (cols > 0) { + double **array = *((double ***) pdata); + for (mm = 0; mm < cols; mm++) + buf[m++] = array[i][mm]; + } else { + double **array = *((double ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[i][collength-1]; + else ncols = (*((int **) plength))[i]; + for (mm = 0; mm < ncols; mm++) + buf[m++] = array[i][mm]; + } + } if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + buf[m++] = ubuf(vec[i]).d; + } else if (cols > 0) { + int **array = *((int ***) pdata); + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[i][mm]).d; + } else { + int **array = *((int ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[i][collength-1]; + else ncols = (*((int **) plength))[i]; + for (mm = 0; mm < ncols; mm++) + buf[m++] = ubuf(array[i][mm]).d; + } + } if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + buf[m++] = ubuf(vec[i]).d; + } else if (cols > 0) { + bigint **array = *((bigint ***) pdata); + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[i][mm]).d; + } else { + bigint **array = *((bigint ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[i][collength-1]; + else ncols = (*((int **) plength))[i]; + for (mm = 0; mm < ncols; mm++) + buf[m++] = ubuf(array[i][mm]).d; + } + } + } + } + + if (atom->nextra_grow) + for (int iextra = 0; iextra < atom->nextra_grow; iextra++) + m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); + + buf[0] = m; + return m; +} + +/* ---------------------------------------------------------------------- */ + +int AtomVec::unpack_exchange(double *buf) +{ + int mm,nn,datatype,cols,collength,ncols; + void *pdata,*plength; + + int nlocal = atom->nlocal; + if (nlocal == nmax) grow(0); + + int m = 1; + x[nlocal][0] = buf[m++]; + x[nlocal][1] = buf[m++]; + x[nlocal][2] = buf[m++]; + v[nlocal][0] = buf[m++]; + v[nlocal][1] = buf[m++]; + v[nlocal][2] = buf[m++]; + tag[nlocal] = (tagint) ubuf(buf[m++]).i; + type[nlocal] = (int) ubuf(buf[m++]).i; + mask[nlocal] = (int) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; + + if (nexchange) { + for (nn = 0; nn < nexchange; nn++) { + pdata = mexchange.pdata[nn]; + datatype = mexchange.datatype[nn]; + cols = mexchange.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + vec[nlocal] = buf[m++]; + } else if (cols > 0) { + double **array = *((double ***) pdata); + for (mm = 0; mm < cols; mm++) + array[nlocal][mm] = buf[m++]; + } else { + double **array = *((double ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[nlocal][collength-1]; + else ncols = (*((int **) plength))[nlocal]; + for (mm = 0; mm < ncols; mm++) + array[nlocal][mm] = buf[m++]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + vec[nlocal] = ubuf(buf[m++]).i; + } else if (cols > 0) { + int **array = *((int ***) pdata); + for (mm = 0; mm < cols; mm++) + array[nlocal][mm] = (int) ubuf(buf[m++]).i; + } else { + int **array = *((int ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[nlocal][collength-1]; + else ncols = (*((int **) plength))[nlocal]; + for (mm = 0; mm < ncols; mm++) + array[nlocal][mm] = (int) ubuf(buf[m++]).i; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + vec[nlocal] = (bigint) ubuf(buf[m++]).i; + } else if (cols > 0) { + bigint **array = *((bigint ***) pdata); + for (mm = 0; mm < cols; mm++) + array[nlocal][mm] = (bigint) ubuf(buf[m++]).i; + } else { + bigint **array = *((bigint ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[nlocal][collength-1]; + else ncols = (*((int **) plength))[nlocal]; + for (mm = 0; mm < ncols; mm++) + array[nlocal][mm] = (bigint) ubuf(buf[m++]).i; + } + } + } + } + + if (atom->nextra_grow) + for (int iextra = 0; iextra < atom->nextra_grow; iextra++) + m += modify->fix[atom->extra_grow[iextra]]-> + unpack_exchange(nlocal,&buf[m]); + + atom->nlocal++; + return m; +} + +/* ---------------------------------------------------------------------- + size of restart data for all atoms owned by this proc + include extra data stored by fixes +------------------------------------------------------------------------- */ + +int AtomVec::size_restart() +{ + int i,nn,cols,collength,ncols; + void *plength; + + // NOTE: need to worry about overflow of returned int ?? + + int nlocal = atom->nlocal; + + // 11 = length storage + id,type,mask,image,x,v + + int n = 11 * nlocal; + + if (nrestart) { + for (nn = 0; nn < nrestart; nn++) { + cols = mrestart.cols[i]; + if (cols == 0) n += nlocal; + else if (cols > 0) n += cols*nlocal; + else { + collength = mrestart.collength[nn]; + plength = mrestart.plength[nn]; + for (i = 0; i < nlocal; i++) { + if (collength) ncols = (*((int ***) plength))[nlocal][collength-1]; + else ncols = (*((int **) plength))[nlocal]; + n += ncols; + } + } + } + } + + if (atom->nextra_restart) + for (int iextra = 0; iextra < atom->nextra_restart; iextra++) + for (i = 0; i < nlocal; i++) + n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); + + return n; +} + +/* ---------------------------------------------------------------------- + pack atom I's data for restart file including extra quantities + xyz must be 1st 3 values, so that read_restart can test on them + molecular types may be negative, but write as positive +------------------------------------------------------------------------- */ + +int AtomVec::pack_restart(int i, double *buf) +{ + int mm,nn,datatype,cols,collength,ncols; + void *pdata,*plength; + + int m = 1; + buf[m++] = x[i][0]; + buf[m++] = x[i][1]; + buf[m++] = x[i][2]; + buf[m++] = ubuf(tag[i]).d; + buf[m++] = ubuf(type[i]).d; + buf[m++] = ubuf(mask[i]).d; + buf[m++] = ubuf(image[i]).d; + buf[m++] = v[i][0]; + buf[m++] = v[i][1]; + buf[m++] = v[i][2]; + + for (nn = 0; nn < nrestart; nn++) { + pdata = mrestart.pdata[nn]; + datatype = mrestart.datatype[nn]; + cols = mrestart.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + buf[m++] = vec[i]; + } else if (ncols > 0) { + double **array = *((double ***) pdata); + for (mm = 0; mm < cols; mm++) + buf[m++] = array[i][mm]; + } else { + double **array = *((double ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[i][collength-1]; + else ncols = (*((int **) plength))[i]; + for (mm = 0; mm < ncols; mm++) + buf[m++] = array[i][mm]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + buf[m++] = ubuf(vec[i]).d; + } else if (cols > 0) { + int **array = *((int ***) pdata); + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[i][mm]).d; + } else { + int **array = *((int ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[i][collength-1]; + else ncols = (*((int **) plength))[i]; + for (mm = 0; mm < ncols; mm++) + buf[m++] = ubuf(array[i][mm]).d; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + buf[m++] = ubuf(vec[i]).d; + } else if (ncols > 0) { + bigint **array = *((bigint ***) pdata); + for (mm = 0; mm < cols; mm++) + buf[m++] = ubuf(array[i][mm]).d; + } else { + bigint **array = *((bigint ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[i][collength-1]; + else ncols = (*((int **) plength))[i]; + for (mm = 0; mm < ncols; mm++) + buf[m++] = ubuf(array[i][mm]).d; + } + } + } + + for (int iextra = 0; iextra < atom->nextra_restart; iextra++) + m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); + + buf[0] = m; + return m; +} + +/* ---------------------------------------------------------------------- + unpack data for one atom from restart file including extra quantities +------------------------------------------------------------------------- */ + +int AtomVec::unpack_restart(double *buf) +{ + int mm,nn,datatype,cols,collength,ncols; + void *pdata,*plength; + + int nlocal = atom->nlocal; + if (nlocal == nmax) { + grow(0); + if (atom->nextra_store) + memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); + } + + int m = 1; + x[nlocal][0] = buf[m++]; + x[nlocal][1] = buf[m++]; + x[nlocal][2] = buf[m++]; + tag[nlocal] = (tagint) ubuf(buf[m++]).i; + type[nlocal] = (int) ubuf(buf[m++]).i; + mask[nlocal] = (int) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; + v[nlocal][0] = buf[m++]; + v[nlocal][1] = buf[m++]; + v[nlocal][2] = buf[m++]; + + for (nn = 0; nn < nrestart; nn++) { + pdata = mrestart.pdata[nn]; + datatype = mrestart.datatype[nn]; + cols = mrestart.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + vec[nlocal] = buf[m++]; + } else if (cols > 0) { + double **array = *((double ***) pdata); + for (mm = 0; mm < cols; mm++) + array[nlocal][mm] = buf[m++]; + } else { + double **array = *((double ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[nlocal][collength-1]; + else ncols = (*((int **) plength))[nlocal]; + for (mm = 0; mm < ncols; mm++) + array[nlocal][mm] = buf[m++]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + vec[nlocal] = ubuf(buf[m++]).i; + } else if (cols > 0) { + int **array = *((int ***) pdata); + for (mm = 0; mm < cols; mm++) + array[nlocal][mm] = (int) ubuf(buf[m++]).i; + } else { + int **array = *((int ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[nlocal][collength-1]; + else ncols = (*((int **) plength))[nlocal]; + for (mm = 0; mm < ncols; mm++) + array[nlocal][mm] = (int) ubuf(buf[m++]).i; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + vec[nlocal] = (bigint) ubuf(buf[m++]).i; + } else if (cols > 0) { + bigint **array = *((bigint ***) pdata); + for (mm = 0; mm < cols; mm++) + array[nlocal][mm] = (bigint) ubuf(buf[m++]).i; + } else { + int **array = *((int ***) pdata); + collength = mexchange.collength[nn]; + plength = mexchange.plength[nn]; + if (collength) ncols = (*((int ***) plength))[nlocal][collength-1]; + else ncols = (*((int **) plength))[nlocal]; + for (mm = 0; mm < ncols; mm++) + array[nlocal][mm] = (bigint) ubuf(buf[m++]).i; + } + } + } + + double **extra = atom->extra; + if (atom->nextra_store) { + int size = static_cast (buf[0]) - m; + for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; + } + + atom->nlocal++; + return m; +} + +/* ---------------------------------------------------------------------- + create one atom of itype at coord + set other values to defaults +------------------------------------------------------------------------- */ + +void AtomVec::create_atom(int itype, double *coord) +{ + int m,n,datatype,cols; + void *pdata; + + int nlocal = atom->nlocal; + if (nlocal == nmax) grow(0); + + tag[nlocal] = 0; + type[nlocal] = itype; + x[nlocal][0] = coord[0]; + x[nlocal][1] = coord[1]; + x[nlocal][2] = coord[2]; + mask[nlocal] = 1; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; + v[nlocal][0] = 0.0; + v[nlocal][1] = 0.0; + v[nlocal][2] = 0.0; + + // special-case initialization for some fields + + for (n = 0; n < ncreate; n++) { + pdata = mcreate.pdata[n]; + datatype = mcreate.datatype[n]; + cols = mcreate.cols[n]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + vec[nlocal] = 0.0; + } else { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) + array[nlocal][m] = 0.0; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + vec[nlocal] = 0; + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + array[nlocal][m] = 0; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + vec[nlocal] = 0; + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + array[nlocal][m] = 0; + } + } + } + + atom->nlocal++; +} + +/* ---------------------------------------------------------------------- + unpack one line from Atoms section of data file + initialize other atom quantities +------------------------------------------------------------------------- */ + +void AtomVec::data_atom(double *coord, imageint imagetmp, char **values) +{ + int m,n,datatype,cols; + void *pdata; + + int nlocal = atom->nlocal; + if (nlocal == nmax) grow(0); + + x[nlocal][0] = coord[0]; + x[nlocal][1] = coord[1]; + x[nlocal][2] = coord[2]; + mask[nlocal] = 1; + image[nlocal] = imagetmp; + v[nlocal][0] = 0.0; + v[nlocal][1] = 0.0; + v[nlocal][2] = 0.0; + + int ivalue = 0; + for (n = 0; n < ndata_atom; n++) { + pdata = mdata_atom.pdata[n]; + datatype = mdata_atom.datatype[n]; + cols = mdata_atom.cols[n]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + vec[nlocal] = utils::numeric(FLERR,values[ivalue++],true,lmp); + } else { + double **array = *((double ***) pdata); + if (array == atom->x) { // already set by coord arg + ivalue += cols; + continue; + } + for (m = 0; m < cols; m++) + array[nlocal][m] = utils::numeric(FLERR,values[ivalue++],true,lmp); + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + vec[nlocal] = utils::inumeric(FLERR,values[ivalue++],true,lmp); + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + array[nlocal][m] = utils::inumeric(FLERR,values[ivalue++],true,lmp); + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + vec[nlocal] = utils::bnumeric(FLERR,values[ivalue++],true,lmp); + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + array[nlocal][m] = utils::bnumeric(FLERR,values[ivalue++],true,lmp); + } + } + } + + // error checks applicable to all styles + + if (atom->tag[nlocal] <= 0) + error->one(FLERR,"Invalid atom ID in Atoms section of data file"); + if (atom->type[nlocal] <= 0 || atom->type[nlocal] > atom->ntypes) + error->one(FLERR,"Invalid atom type in Atoms section of data file"); + + atom->nlocal++; +} + +/* ---------------------------------------------------------------------- + pack atom info for data file including 3 image flags +------------------------------------------------------------------------- */ + +void AtomVec::pack_data(double **buf) +{ + int i,j,m,n,datatype,cols; + void *pdata; + + int nlocal = atom->nlocal; + for (int i = 0; i < nlocal; i++) { + j = 0; + for (n = 0; n < ndata_atom; n++) { + pdata = mdata_atom.pdata[n]; + datatype = mdata_atom.datatype[n]; + cols = mdata_atom.cols[n]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + buf[i][j++] = vec[i]; + } else { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) + buf[i][j++] = array[i][m]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + buf[i][j++] = ubuf(vec[i]).d; + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + buf[i][j++] = ubuf(array[i][m]).d; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + buf[i][j++] = ubuf(vec[i]).d; + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + buf[i][j++] = ubuf(array[i][m]).d; + } + } + } + + buf[i][j++] = ubuf((image[i] & IMGMASK) - IMGMAX).d; + buf[i][j++] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; + buf[i][j++] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; + } +} + +/* ---------------------------------------------------------------------- + write atom info to data file + id is first field, 3 image flags are final fields +------------------------------------------------------------------------- */ + +void AtomVec::write_data(FILE *fp, int n, double **buf) +{ + int i,j,m,nn,datatype,cols; + void *pdata; + + for (i = 0; i < n; i++) { + fprintf(fp,TAGINT_FORMAT,(tagint) ubuf(buf[i][0]).i); + + j = 1; + for (nn = 1; nn < ndata_atom; nn++) { + pdata = mdata_atom.pdata[nn]; + datatype = mdata_atom.datatype[nn]; + cols = mdata_atom.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + fprintf(fp," %-1.16e",buf[i][j++]); + } else { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) + fprintf(fp," %-1.16e",buf[i][j++]); + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + fprintf(fp," %d",(int) ubuf(buf[i][j++]).i); + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + fprintf(fp," %d",(int) ubuf(buf[i][j++]).i); + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i); + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i); + } + } + } + + fprintf(fp," %d %d %d\n", + (int) ubuf(buf[i][j]).i, + (int) ubuf(buf[i][j+1]).i, + (int) ubuf(buf[i][j+2]).i); + } +} + /* ---------------------------------------------------------------------- unpack one line from Velocities section of data file ------------------------------------------------------------------------- */ -void AtomVec::data_vel(int m, char **values) +void AtomVec::data_vel(int ilocal, char **values) { + int m,n,datatype,cols; + void *pdata; + double **v = atom->v; - v[m][0] = utils::numeric(FLERR,values[0],true,lmp); - v[m][1] = utils::numeric(FLERR,values[1],true,lmp); - v[m][2] = utils::numeric(FLERR,values[2],true,lmp); + v[ilocal][0] = utils::numeric(FLERR,values[0],true,lmp); + v[ilocal][1] = utils::numeric(FLERR,values[1],true,lmp); + v[ilocal][2] = utils::numeric(FLERR,values[2],true,lmp); + + int ivalue = 3; + for (n = 0; n < ndata_vel; n++) { + pdata = mdata_vel.pdata[n]; + datatype = mdata_vel.datatype[n]; + cols = mdata_vel.cols[n]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + vec[ilocal] = utils::numeric(FLERR,values[ivalue++],true,lmp); + } else { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) + array[ilocal][m] = utils::numeric(FLERR,values[ivalue++],true,lmp); + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + vec[ilocal] = utils::inumeric(FLERR,values[ivalue++],true,lmp); + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + array[ilocal][m] = utils::inumeric(FLERR,values[ivalue++],true,lmp); + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + vec[ilocal] = utils::bnumeric(FLERR,values[ivalue++],true,lmp); + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + array[ilocal][m] = utils::bnumeric(FLERR,values[ivalue++],true,lmp); + } + } + } } /* ---------------------------------------------------------------------- @@ -126,27 +2085,109 @@ void AtomVec::data_vel(int m, char **values) void AtomVec::pack_vel(double **buf) { + int i,j,m,n,datatype,cols; + void *pdata; + double **v = atom->v; tagint *tag = atom->tag; int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { + for (i = 0; i < nlocal; i++) { buf[i][0] = ubuf(tag[i]).d; buf[i][1] = v[i][0]; buf[i][2] = v[i][1]; buf[i][3] = v[i][2]; + + j = 4; + if (ndata_vel) { + for (n = 0; n < ndata_vel; n++) { + pdata = mdata_vel.pdata[n]; + datatype = mdata_vel.datatype[n]; + cols = mdata_vel.cols[n]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + buf[i][j++] = vec[i]; + } else { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) + buf[i][j++] = array[i][m]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + buf[i][j++] = ubuf(vec[i]).d; + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + buf[i][j++] = ubuf(array[i][m]).d; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + buf[i][j++] = ubuf(vec[i]).d; + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + buf[i][j++] = ubuf(array[i][m]).d; + } + } + } + } } } /* ---------------------------------------------------------------------- write velocity info to data file + id and velocity vector are first 4 fields ------------------------------------------------------------------------- */ void AtomVec::write_vel(FILE *fp, int n, double **buf) { - for (int i = 0; i < n; i++) + int i,j,m,nn,datatype,cols; + void *pdata; + + for (i = 0; i < n; i++) { fprintf(fp,TAGINT_FORMAT " %-1.16e %-1.16e %-1.16e\n", (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3]); + + j = 4; + for (nn = 0; nn < ndata_vel; nn++) { + pdata = mdata_vel.pdata[nn]; + datatype = mdata_vel.datatype[nn]; + cols = mdata_vel.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + fprintf(fp," %-1.16e",buf[i][j++]); + } else { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) + fprintf(fp," %-1.16e",buf[i][j++]); + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + fprintf(fp," %d",(int) ubuf(buf[i][j++]).i); + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + fprintf(fp," %d",(int) ubuf(buf[i][j++]).i); + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i); + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i); + } + } + } + + fprintf(fp,"\n"); + } } /* ---------------------------------------------------------------------- @@ -395,3 +2436,60 @@ void AtomVec::write_improper(FILE *fp, int n, tagint **buf, int index) index++; } } + +/* ---------------------------------------------------------------------- + return # of bytes of allocated memory +------------------------------------------------------------------------- */ + +bigint AtomVec::memory_usage() +{ + int datatype,cols,index,maxcols; + void *pdata; + + bigint bytes = 0; + + bytes += memory->usage(tag,nmax); + bytes += memory->usage(type,nmax); + bytes += memory->usage(mask,nmax); + bytes += memory->usage(image,nmax); + bytes += memory->usage(x,nmax,3); + bytes += memory->usage(v,nmax,3); + bytes += memory->usage(f,nmax*nthreads,3); + + for (int i = 0; i < ngrow; i++) { + pdata = mgrow.pdata[i]; + datatype = mgrow.datatype[i]; + cols = mgrow.cols[i]; + index = mgrow.index[i]; + if (datatype == DOUBLE) { + if (cols == 0) { + bytes += memory->usage(*((double **) pdata),nmax*threads[i]); + } else if (cols > 0) { + bytes += memory->usage(*((double ***) pdata),nmax*threads[i],cols); + } else { + maxcols = *(mgrow.maxcols[i]); + bytes += memory->usage(*((double ***) pdata),nmax*threads[i],maxcols); + } + } else if (datatype == INT) { + if (cols == 0) { + bytes += memory->usage(*((int **) pdata),nmax*threads[i]); + } else if (cols > 0) { + bytes += memory->usage(*((int ***) pdata),nmax*threads[i],cols); + } else { + maxcols = *(mgrow.maxcols[i]); + bytes += memory->usage(*((int ***) pdata),nmax*threads[i],maxcols); + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bytes += memory->usage(*((bigint **) pdata),nmax*threads[i]); + } else if (cols > 0) { + bytes += memory->usage(*((bigint ***) pdata),nmax*threads[i],cols); + } else { + maxcols = *(mgrow.maxcols[i]); + bytes += memory->usage(*((bigint ***) pdata),nmax*threads[i],maxcols); + } + } + } + + return bytes; +} diff --git a/src/atom_vec.h b/src/atom_vec.h index 2b57238c3b..c3551b541d 100644 --- a/src/atom_vec.h +++ b/src/atom_vec.h @@ -55,54 +55,54 @@ class AtomVec : protected Pointers { virtual void process_args(int, char **); virtual void init(); - virtual void grow(int) = 0; - virtual void grow_reset() = 0; - virtual void copy(int, int, int) = 0; - virtual void clear_bonus() {} - virtual void force_clear(int, size_t) {} + void grow(int); + void grow_reset(); + void copy(int, int, int); + void clear_bonus() {} + void force_clear(int, size_t) {} - virtual int pack_comm(int, int *, double *, int, int *) = 0; - virtual int pack_comm_vel(int, int *, double *, int, int *) = 0; - virtual int pack_comm_hybrid(int, int *, double *) {return 0;} - virtual void unpack_comm(int, int, double *) = 0; - virtual void unpack_comm_vel(int, int, double *) = 0; - virtual int unpack_comm_hybrid(int, int, double *) {return 0;} + int pack_comm(int, int *, double *, int, int *); + int pack_comm_vel(int, int *, double *, int, int *); + int pack_comm_hybrid(int, int *, double *) {return 0;} + void unpack_comm(int, int, double *); + void unpack_comm_vel(int, int, double *); + int unpack_comm_hybrid(int, int, double *) {return 0;} - virtual int pack_reverse(int, int, double *) = 0; - virtual int pack_reverse_hybrid(int, int, double *) {return 0;} - virtual void unpack_reverse(int, int *, double *) = 0; - virtual int unpack_reverse_hybrid(int, int *, double *) {return 0;} + int pack_reverse(int, int, double *); + int pack_reverse_hybrid(int, int, double *) {return 0;} + void unpack_reverse(int, int *, double *); + int unpack_reverse_hybrid(int, int *, double *) {return 0;} - virtual int pack_border(int, int *, double *, int, int *) = 0; - virtual int pack_border_vel(int, int *, double *, int, int *) = 0; - virtual int pack_border_hybrid(int, int *, double *) {return 0;} - virtual void unpack_border(int, int, double *) = 0; - virtual void unpack_border_vel(int, int, double *) = 0; - virtual int unpack_border_hybrid(int, int, double *) {return 0;} + int pack_border(int, int *, double *, int, int *); + int pack_border_vel(int, int *, double *, int, int *); + int pack_border_hybrid(int, int *, double *) {return 0;} + void unpack_border(int, int, double *); + void unpack_border_vel(int, int, double *); + int unpack_border_hybrid(int, int, double *) {return 0;} - virtual int pack_exchange(int, double *) = 0; - virtual int unpack_exchange(double *) = 0; + int pack_exchange(int, double *); + int unpack_exchange(double *); - virtual int size_restart() = 0; - virtual int pack_restart(int, double *) = 0; - virtual int unpack_restart(double *) = 0; + int size_restart(); + virtual int pack_restart(int, double *); + virtual int unpack_restart(double *); - virtual void create_atom(int, double *) = 0; + virtual void create_atom(int, double *); - virtual void data_atom(double *, imageint, char **) = 0; - virtual void data_atom_bonus(int, char **) {} - virtual int data_atom_hybrid(int, char **) {return 0;} - virtual void data_vel(int, char **); - virtual int data_vel_hybrid(int, char **) {return 0;} + virtual void data_atom(double *, imageint, char **); + void data_atom_bonus(int, char **) {} + int data_atom_hybrid(int, char **) {return 0;} + void data_vel(int, char **); + int data_vel_hybrid(int, char **) {return 0;} - virtual void pack_data(double **) = 0; - virtual int pack_data_hybrid(int, double *) {return 0;} - virtual void write_data(FILE *, int, double **) = 0; - virtual int write_data_hybrid(FILE *, double *) {return 0;} - virtual void pack_vel(double **); - virtual int pack_vel_hybrid(int, double *) {return 0;} - virtual void write_vel(FILE *, int, double **); - virtual int write_vel_hybrid(FILE *, double *) {return 0;} + void pack_data(double **); + int pack_data_hybrid(int, double *) {return 0;} + void write_data(FILE *, int, double **); + int write_data_hybrid(FILE *, double *) {return 0;} + void pack_vel(double **); + int pack_vel_hybrid(int, double *) {return 0;} + void write_vel(FILE *, int, double **); + int write_vel_hybrid(FILE *, double *) {return 0;} int pack_bond(tagint **); void write_bond(FILE *, int, tagint **, int); @@ -113,10 +113,10 @@ class AtomVec : protected Pointers { int pack_improper(tagint **); void write_improper(FILE *, int, tagint **, int); - virtual int property_atom(char *) {return -1;} - virtual void pack_property_atom(int, double *, int, int) {} + int property_atom(char *) {return -1;} + void pack_property_atom(int, double *, int, int) {} - virtual bigint memory_usage() = 0; + bigint memory_usage(); protected: int nmax; // local copy of atom->nmax @@ -124,6 +124,47 @@ class AtomVec : protected Pointers { int deform_groupbit; double *h_rate; + tagint *tag; // peratom fields common to all styles + int *type,*mask; + imageint *image; + double **x,**v,**f; + + const char *default_grow,*default_copy; + const char *default_comm,*default_comm_vel,*default_reverse; + const char *default_border,*default_border_vel; + const char *default_exchange,*default_restart; + const char *default_create,*default_data_atom,*default_data_vel; + + char *fields_grow,*fields_copy; + char *fields_comm,*fields_comm_vel,*fields_reverse; + char *fields_border,*fields_border_vel; + char *fields_exchange,*fields_restart; + char *fields_create,*fields_data_atom,*fields_data_vel; + + struct Method { + void **pdata; + int *datatype; + int *cols; + int **maxcols; + int *collength; + void **plength; + int *index; + }; + + Method mgrow,mcopy; + Method mcomm,mcomm_vel,mreverse,mborder,mborder_vel,mexchange,mrestart; + Method mcreate,mdata_atom,mdata_vel; + + int ngrow,ncopy; + int ncomm,ncomm_vel,nreverse,nborder,nborder_vel,nexchange,nrestart; + int ncreate,ndata_atom,ndata_vel; + + // thread info for fields that are duplicated over threads + // used by fields in grow() and memory_usage() + + int nthreads; + int *threads; + // union data struct for packing 32-bit and 64-bit ints into double bufs // this avoids aliasing issues by having 2 pointers (double,int) // to same buf memory @@ -143,8 +184,15 @@ class AtomVec : protected Pointers { ubuf(int arg) : i(arg) {} }; + // local methods + void grow_nmax(); int grow_nmax_bonus(int); + void setup_fields(); + int process_fields(char *, const char *, Method *); + void create_method(int, Method *); + void init_method(Method *); + void destroy_method(Method *); }; } @@ -161,4 +209,13 @@ E: KOKKOS package requires a kokkos enabled atom_style Self-explanatory. +E: Per-processor system is too big + +The number of owned atoms plus ghost atoms on a single +processor must fit in 32-bit integer. + +E: Invalid atom type in Atoms section of data file + +Atom types must range from 1 to specified # of types. + */ diff --git a/src/atom_vec_atomic.cpp b/src/atom_vec_atomic.cpp index 25a28f1668..a283e99081 100644 --- a/src/atom_vec_atomic.cpp +++ b/src/atom_vec_atomic.cpp @@ -12,14 +12,6 @@ ------------------------------------------------------------------------- */ #include "atom_vec_atomic.h" -#include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" -#include "memory.h" -#include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -30,654 +22,23 @@ AtomVecAtomic::AtomVecAtomic(LAMMPS *lmp) : AtomVec(lmp) molecular = 0; mass_type = 1; - comm_x_only = comm_f_only = 1; - size_forward = 3; - size_reverse = 3; - size_border = 6; - size_velocity = 3; - size_data_atom = 5; - size_data_vel = 4; - xcol_data = 3; -} - -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecAtomic::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecAtomic::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecAtomic::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAtomic::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAtomic::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecAtomic::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecAtomic::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAtomic::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecAtomic::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAtomic::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAtomic::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecAtomic::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecAtomic::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them -------------------------------------------------------------------------- */ - -int AtomVecAtomic::pack_exchange(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecAtomic::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecAtomic::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 11 * nlocal; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecAtomic::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecAtomic::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecAtomic::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecAtomic::data_atom(double *coord, imageint imagetmp, char **values) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecAtomic::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = x[i][0]; - buf[i][3] = x[i][1]; - buf[i][4] = x[i][2]; - buf[i][5] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][6] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][7] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecAtomic::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " %d %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4], - (int) ubuf(buf[i][5]).i,(int) ubuf(buf[i][6]).i, - (int) ubuf(buf[i][7]).i); -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecAtomic::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - return bytes; + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = NULL; + fields_copy = NULL; + fields_comm = NULL; + fields_comm_vel = NULL; + fields_reverse = NULL; + fields_border = NULL; + fields_border_vel = NULL; + fields_exchange = NULL; + fields_restart = NULL; + fields_create = NULL; + fields_data_atom = (char *) "id type x"; + fields_data_vel = NULL; + + setup_fields(); } diff --git a/src/atom_vec_atomic.h b/src/atom_vec_atomic.h index afcede89b1..3caf1a5a94 100644 --- a/src/atom_vec_atomic.h +++ b/src/atom_vec_atomic.h @@ -27,36 +27,7 @@ namespace LAMMPS_NS { class AtomVecAtomic : public AtomVec { public: AtomVecAtomic(class LAMMPS *); - virtual ~AtomVecAtomic() {} - void grow(int); - void grow_reset(); - void copy(int, int, int); - virtual int pack_comm(int, int *, double *, int, int *); - virtual int pack_comm_vel(int, int *, double *, int, int *); - virtual void unpack_comm(int, int, double *); - virtual void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - virtual int pack_border(int, int *, double *, int, int *); - virtual int pack_border_vel(int, int *, double *, int, int *); - virtual void unpack_border(int, int, double *); - virtual void unpack_border_vel(int, int, double *); - virtual int pack_exchange(int, double *); - virtual int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - void pack_data(double **); - void write_data(FILE *, int, double **); - bigint memory_usage(); - - protected: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; + ~AtomVecAtomic() {} }; } @@ -66,13 +37,4 @@ class AtomVecAtomic : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - */ diff --git a/src/atom_vec_charge.cpp b/src/atom_vec_charge.cpp index 9f35d16ff0..9c8f18a846 100644 --- a/src/atom_vec_charge.cpp +++ b/src/atom_vec_charge.cpp @@ -13,13 +13,6 @@ #include "atom_vec_charge.h" #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" -#include "memory.h" -#include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -30,742 +23,25 @@ AtomVecCharge::AtomVecCharge(LAMMPS *lmp) : AtomVec(lmp) molecular = 0; mass_type = 1; - comm_x_only = comm_f_only = 1; - size_forward = 3; - size_reverse = 3; - size_border = 7; - size_velocity = 3; - size_data_atom = 6; - size_data_vel = 4; - xcol_data = 4; - atom->q_flag = 1; -} - -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecCharge::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - q = memory->grow(atom->q,nmax,"atom:q"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecCharge::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - q = atom->q; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecCharge::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - q[j] = q[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecCharge::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecCharge::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecCharge::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecCharge::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecCharge::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecCharge::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecCharge::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecCharge::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecCharge::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = q[j]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecCharge::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - q[i] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecCharge::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - q[i] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecCharge::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) - q[i] = buf[m++]; - return m; -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them -------------------------------------------------------------------------- */ - -int AtomVecCharge::pack_exchange(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = q[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecCharge::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - q[nlocal] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecCharge::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 12 * nlocal; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecCharge::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = q[i]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecCharge::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - q[nlocal] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecCharge::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - q[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecCharge::data_atom(double *coord, imageint imagetmp, char **values) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - q[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecCharge::data_atom_hybrid(int nlocal, char **values) -{ - q[nlocal] = utils::numeric(FLERR,values[0],true,lmp); - - return 1; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecCharge::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = q[i]; - buf[i][3] = x[i][0]; - buf[i][4] = x[i][1]; - buf[i][5] = x[i][2]; - buf[i][6] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][7] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecCharge::pack_data_hybrid(int i, double *buf) -{ - buf[0] = q[i]; - return 1; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecCharge::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " %d %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4],buf[i][5], - (int) ubuf(buf[i][6]).i,(int) ubuf(buf[i][7]).i, - (int) ubuf(buf[i][8]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecCharge::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e",buf[0]); - return 1; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecCharge::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("q")) bytes += memory->usage(q,nmax); - - return bytes; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "q"; + fields_copy = (char *) "q"; + fields_comm = NULL; + fields_comm_vel = NULL; + fields_reverse = NULL; + fields_border = (char *) "q"; + fields_border_vel = (char *) "q"; + fields_exchange = (char *) "q"; + fields_restart = (char *) "q"; + fields_create = (char *) "q"; + fields_data_atom = (char *) "id type q x"; + fields_data_vel = NULL; + + setup_fields(); } diff --git a/src/atom_vec_charge.h b/src/atom_vec_charge.h index 10f1d8d141..d52b4a068a 100644 --- a/src/atom_vec_charge.h +++ b/src/atom_vec_charge.h @@ -27,42 +27,6 @@ namespace LAMMPS_NS { class AtomVecCharge : public AtomVec { public: AtomVecCharge(class LAMMPS *); - virtual ~AtomVecCharge() {} - void grow(int); - void grow_reset(); - void copy(int, int, int); - virtual int pack_comm(int, int *, double *, int, int *); - virtual int pack_comm_vel(int, int *, double *, int, int *); - virtual void unpack_comm(int, int, double *); - virtual void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - virtual int pack_border(int, int *, double *, int, int *); - virtual int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - virtual void unpack_border(int, int, double *); - virtual void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - virtual int pack_exchange(int, double *); - virtual int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - bigint memory_usage(); - - protected: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double *q; }; } @@ -72,13 +36,4 @@ class AtomVecCharge : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - */ diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index 75136503ea..7a14ea26e6 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -5,7 +5,7 @@ Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under + certain rights in this software. This software is distributead under the GNU General Public License. See the README file in the top-level LAMMPS directory. @@ -14,15 +14,11 @@ #include "atom_vec_sphere.h" #include #include "atom.h" -#include "comm.h" -#include "domain.h" #include "modify.h" #include "fix.h" #include "fix_adapt.h" #include "math_const.h" -#include "memory.h" #include "error.h" -#include "utils.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -33,19 +29,29 @@ AtomVecSphere::AtomVecSphere(LAMMPS *lmp) : AtomVec(lmp) { molecular = 0; - comm_x_only = 1; - comm_f_only = 0; - size_forward = 3; - size_reverse = 6; - size_border = 8; - size_velocity = 6; - size_data_atom = 7; - size_data_vel = 7; - xcol_data = 5; - atom->sphere_flag = 1; atom->radius_flag = atom->rmass_flag = atom->omega_flag = atom->torque_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "radius rmass omega torque"; + fields_copy = (char *) "radius rmass omega"; + fields_comm = NULL; + fields_comm_vel = (char *) "omega"; + fields_reverse = (char *) "torque"; + fields_border = (char *) "radius rmass"; + fields_border_vel = (char *) "radius rmass omega"; + fields_exchange = (char *) "radius rmass omega"; + fields_restart = (char *) "radius rmass omega"; + fields_create = (char *) "radius rmass omega"; + fields_data_atom = (char *) "id type radius rmass x"; + fields_data_vel = (char *) "omega"; + + setup_fields(); } /* ---------------------------------------------------------------------- */ @@ -55,10 +61,11 @@ void AtomVecSphere::init() AtomVec::init(); // set radvary if particle diameters are time-varying due to fix adapt + // NOTE: change this to a atom_style sphere optional arg radvary = 0; - comm_x_only = 1; - size_forward = 3; + //comm_x_only = 1; + //size_forward = 3; for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"adapt") == 0) { @@ -69,1118 +76,42 @@ void AtomVecSphere::init() size_forward = 5; } } -} -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecSphere::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - radius = memory->grow(atom->radius,nmax,"atom:radius"); - rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); - omega = memory->grow(atom->omega,nmax,3,"atom:omega"); - torque = memory->grow(atom->torque,nmax*comm->nthreads,3,"atom:torque"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecSphere::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - radius = atom->radius; rmass = atom->rmass; - omega = atom->omega; torque = atom->torque; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecSphere::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - radius[j] = radius[i]; - rmass[j] = rmass[i]; - omega[j][0] = omega[i][0]; - omega[j][1] = omega[i][1]; - omega[j][2] = omega[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - if (radvary == 0) { - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - } - } - - } else { - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - } - } - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - if (radvary == 0) { - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } - } - - } else { - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } - } - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::pack_comm_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - if (radvary == 0) return 0; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSphere::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - if (radvary == 0) { - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - } - } else { - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - } - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSphere::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - if (radvary == 0) { - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - omega[i][0] = buf[m++]; - omega[i][1] = buf[m++]; - omega[i][2] = buf[m++]; - } - } else { - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - omega[i][0] = buf[m++]; - omega[i][1] = buf[m++]; - omega[i][2] = buf[m++]; - } - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - if (radvary == 0) return 0; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = torque[i][0]; - buf[m++] = torque[i][1]; - buf[m++] = torque[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::pack_reverse_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = torque[i][0]; - buf[m++] = torque[i][1]; - buf[m++] = torque[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSphere::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - torque[j][0] += buf[m++]; - torque[j][1] += buf[m++]; - torque[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::unpack_reverse_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - torque[j][0] += buf[m++]; - torque[j][1] += buf[m++]; - torque[j][2] += buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSphere::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - - -/* ---------------------------------------------------------------------- */ - -void AtomVecSphere::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - omega[i][0] = buf[m++]; - omega[i][1] = buf[m++]; - omega[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them -------------------------------------------------------------------------- */ - -int AtomVecSphere::pack_exchange(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = radius[i]; - buf[m++] = rmass[i]; - buf[m++] = omega[i][0]; - buf[m++] = omega[i][1]; - buf[m++] = omega[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSphere::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - radius[nlocal] = buf[m++]; - rmass[nlocal] = buf[m++]; - omega[nlocal][0] = buf[m++]; - omega[nlocal][1] = buf[m++]; - omega[nlocal][2] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecSphere::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 16 * nlocal; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecSphere::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = radius[i]; - buf[m++] = rmass[i]; - buf[m++] = omega[i][0]; - buf[m++] = omega[i][1]; - buf[m++] = omega[i][2]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecSphere::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - radius[nlocal] = buf[m++]; - rmass[nlocal] = buf[m++]; - omega[nlocal][0] = buf[m++]; - omega[nlocal][1] = buf[m++]; - omega[nlocal][2] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; + //fields_comm = (char *) "radius rmass"; + //fields_comm_vel = (char *) "radius rmass"; } /* ---------------------------------------------------------------------- create one atom of itype at coord - set other values to defaults + modify what default AtomVec::create_atom() just created ------------------------------------------------------------------------- */ void AtomVecSphere::create_atom(int itype, double *coord) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::create_atom(itype,coord); + int ilocal = atom->nlocal-1; - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - radius[nlocal] = 0.5; - rmass[nlocal] = 4.0*MY_PI/3.0 * radius[nlocal]*radius[nlocal]*radius[nlocal]; - omega[nlocal][0] = 0.0; - omega[nlocal][1] = 0.0; - omega[nlocal][2] = 0.0; - - atom->nlocal++; + atom->radius[ilocal] = 0.5; + atom->rmass[ilocal] = 4.0*MY_PI/3.0 * 0.5*0.5*0.5; } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file - initialize other atom quantities + modify what default AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ void AtomVecSphere::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + AtomVec::data_atom(coord,imagetmp,values); + int ilocal = atom->nlocal-1; - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); + double radius = 0.5 * atom->radius[ilocal]; + atom->radius[ilocal] = radius; + if (radius > 0.0) + atom->rmass[ilocal] = + 4.0*MY_PI/3.0 * radius*radius*radius * atom->rmass[ilocal]; - radius[nlocal] = 0.5 * utils::numeric(FLERR,values[2],true,lmp); - if (radius[nlocal] < 0.0) - error->one(FLERR,"Invalid radius in Atoms section of data file"); - - double density = utils::numeric(FLERR,values[3],true,lmp); - if (density <= 0.0) - error->one(FLERR,"Invalid density in Atoms section of data file"); - - if (radius[nlocal] == 0.0) rmass[nlocal] = density; - else - rmass[nlocal] = 4.0*MY_PI/3.0 * - radius[nlocal]*radius[nlocal]*radius[nlocal] * density; - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - omega[nlocal][0] = 0.0; - omega[nlocal][1] = 0.0; - omega[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecSphere::data_atom_hybrid(int nlocal, char **values) -{ - radius[nlocal] = 0.5 * utils::numeric(FLERR,values[0],true,lmp); - if (radius[nlocal] < 0.0) - error->one(FLERR,"Invalid radius in Atoms section of data file"); - - double density = utils::numeric(FLERR,values[1],true,lmp); - if (density <= 0.0) - error->one(FLERR,"Invalid density in Atoms section of data file"); - - if (radius[nlocal] == 0.0) rmass[nlocal] = density; - else - rmass[nlocal] = 4.0*MY_PI/3.0 * - radius[nlocal]*radius[nlocal]*radius[nlocal] * density; - - return 2; -} - -/* ---------------------------------------------------------------------- - unpack one line from Velocities section of data file -------------------------------------------------------------------------- */ - -void AtomVecSphere::data_vel(int m, char **values) -{ - v[m][0] = utils::numeric(FLERR,values[0],true,lmp); - v[m][1] = utils::numeric(FLERR,values[1],true,lmp); - v[m][2] = utils::numeric(FLERR,values[2],true,lmp); - omega[m][0] = utils::numeric(FLERR,values[3],true,lmp); - omega[m][1] = utils::numeric(FLERR,values[4],true,lmp); - omega[m][2] = utils::numeric(FLERR,values[5],true,lmp); -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Velocities section of data file -------------------------------------------------------------------------- */ - -int AtomVecSphere::data_vel_hybrid(int m, char **values) -{ - omega[m][0] = utils::numeric(FLERR,values[0],true,lmp); - omega[m][1] = utils::numeric(FLERR,values[1],true,lmp); - omega[m][2] = utils::numeric(FLERR,values[2],true,lmp); - return 3; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecSphere::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = 2.0*radius[i]; - if (radius[i] == 0.0) buf[i][3] = rmass[i]; - else - buf[i][3] = rmass[i] / (4.0*MY_PI/3.0 * radius[i]*radius[i]*radius[i]); - buf[i][4] = x[i][0]; - buf[i][5] = x[i][1]; - buf[i][6] = x[i][2]; - buf[i][7] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecSphere::pack_data_hybrid(int i, double *buf) -{ - buf[0] = 2.0*radius[i]; - if (radius[i] == 0.0) buf[1] = rmass[i]; - else buf[1] = rmass[i] / (4.0*MY_PI/3.0 * radius[i]*radius[i]*radius[i]); - return 2; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecSphere::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3], - buf[i][4],buf[i][5],buf[i][6], - (int) ubuf(buf[i][7]).i,(int) ubuf(buf[i][8]).i, - (int) ubuf(buf[i][9]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecSphere::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %-1.16e",buf[0],buf[1]); - return 2; -} - -/* ---------------------------------------------------------------------- - pack velocity info for data file -------------------------------------------------------------------------- */ - -void AtomVecSphere::pack_vel(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = v[i][0]; - buf[i][2] = v[i][1]; - buf[i][3] = v[i][2]; - buf[i][4] = omega[i][0]; - buf[i][5] = omega[i][1]; - buf[i][6] = omega[i][2]; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid velocity info for data file -------------------------------------------------------------------------- */ - -int AtomVecSphere::pack_vel_hybrid(int i, double *buf) -{ - buf[0] = omega[i][0]; - buf[1] = omega[i][1]; - buf[2] = omega[i][2]; - return 3; -} - -/* ---------------------------------------------------------------------- - write velocity info to data file -------------------------------------------------------------------------- */ - -void AtomVecSphere::write_vel(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e\n", - (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3], - buf[i][4],buf[i][5],buf[i][6]); -} - -/* ---------------------------------------------------------------------- - write hybrid velocity info to data file -------------------------------------------------------------------------- */ - -int AtomVecSphere::write_vel_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %-1.16e %-1.16e",buf[0],buf[1],buf[2]); - return 3; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecSphere::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("radius")) bytes += memory->usage(radius,nmax); - if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); - if (atom->memcheck("omega")) bytes += memory->usage(omega,nmax,3); - if (atom->memcheck("torque")) - bytes += memory->usage(torque,nmax*comm->nthreads,3); - - return bytes; + if (atom->rmass[ilocal] <= 0.0) + error->one(FLERR,"Invalid mass in Atoms section of data file"); } diff --git a/src/atom_vec_sphere.h b/src/atom_vec_sphere.h index 28b1198d59..98762dba49 100644 --- a/src/atom_vec_sphere.h +++ b/src/atom_vec_sphere.h @@ -27,54 +27,11 @@ namespace LAMMPS_NS { class AtomVecSphere : public AtomVec { public: AtomVecSphere(class LAMMPS *); - ~AtomVecSphere() {} void init(); - void grow(int); - void grow_reset(); - void copy(int, int, int); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - int pack_reverse_hybrid(int, int, double *); - void unpack_reverse(int, int *, double *); - int unpack_reverse_hybrid(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); void create_atom(int, double *); void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void data_vel(int, char **); - int data_vel_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - void pack_vel(double **); - int pack_vel_hybrid(int, double *); - void write_vel(FILE *, int, double **); - int write_vel_hybrid(FILE *, double *); - bigint memory_usage(); private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double *radius,*rmass; - double **omega,**torque; int radvary; }; @@ -85,15 +42,6 @@ class AtomVecSphere : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - E: Invalid radius in Atoms section of data file Radius must be >= 0.0. From 6c18e366d7d2972a1bf79e6e5f5bd0dd7c0bb6af Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 26 Nov 2019 18:34:51 -0700 Subject: [PATCH 007/577] changes to start to make atom style hybrid work --- src/DIPOLE/atom_vec_dipole.cpp | 12 +- src/DIPOLE/atom_vec_dipole.h | 2 +- src/MOLECULE/atom_vec_angle.cpp | 59 +- src/MOLECULE/atom_vec_angle.h | 8 +- src/MOLECULE/atom_vec_bond.cpp | 50 +- src/MOLECULE/atom_vec_bond.h | 8 +- src/MOLECULE/atom_vec_full.cpp | 81 +-- src/MOLECULE/atom_vec_full.h | 9 +- src/MOLECULE/atom_vec_molecular.cpp | 81 +-- src/MOLECULE/atom_vec_molecular.h | 9 +- src/MOLECULE/atom_vec_template.cpp | 17 +- src/MOLECULE/atom_vec_template.h | 4 +- src/PERI/atom_vec_peri.cpp | 14 +- src/PERI/atom_vec_peri.h | 2 +- src/SPIN/atom_vec_spin.cpp | 34 +- src/SPIN/atom_vec_spin.h | 2 +- src/atom.cpp | 1 + src/atom_vec.cpp | 490 +++++++------- src/atom_vec.h | 51 +- src/atom_vec_hybrid.cpp | 959 ++-------------------------- src/atom_vec_hybrid.h | 36 +- src/atom_vec_sphere.cpp | 80 ++- src/atom_vec_sphere.h | 8 +- src/special.cpp | 1 - 24 files changed, 586 insertions(+), 1432 deletions(-) diff --git a/src/DIPOLE/atom_vec_dipole.cpp b/src/DIPOLE/atom_vec_dipole.cpp index dc3279227d..650bc14d8f 100644 --- a/src/DIPOLE/atom_vec_dipole.cpp +++ b/src/DIPOLE/atom_vec_dipole.cpp @@ -55,16 +55,12 @@ AtomVecDipole::AtomVecDipole(LAMMPS *lmp) : AtomVec(lmp) } /* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - modify what the default AtomVec::data_atom() just initialized + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecDipole::data_atom(double *coord, imageint imagetmp, char **values) +void AtomVecDipole::data_atom_post(int ilocal) { - AtomVec::data_atom(coord,imagetmp,values); - - int ilocal = atom->nlocal-1; - double mu = atom->mu[ilocal]; + double *mu = atom->mu[ilocal]; mu[3] = sqrt(mu[0]*mu[0] + mu[1]*mu[1] + mu[2]*mu[2]); } - diff --git a/src/DIPOLE/atom_vec_dipole.h b/src/DIPOLE/atom_vec_dipole.h index 6abcb4e2ea..45f33d109d 100644 --- a/src/DIPOLE/atom_vec_dipole.h +++ b/src/DIPOLE/atom_vec_dipole.h @@ -27,7 +27,7 @@ namespace LAMMPS_NS { class AtomVecDipole : public AtomVec { public: AtomVecDipole(class LAMMPS *); - void data_atom(double *, imageint, char **); + void data_atom_post(int); }; } diff --git a/src/MOLECULE/atom_vec_angle.cpp b/src/MOLECULE/atom_vec_angle.cpp index 79f5a7853e..df48c4b2a0 100644 --- a/src/MOLECULE/atom_vec_angle.cpp +++ b/src/MOLECULE/atom_vec_angle.cpp @@ -67,11 +67,10 @@ AtomVecAngle::~AtomVecAngle() } /* ---------------------------------------------------------------------- - pack atom I's data for restart file - modify/unmodify values for default AtomVec::pack_restart() to pack + modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -int AtomVecAngle::pack_restart(int i, double *buf) +void AtomVecAngle::pack_restart_pre(int i) { // insure negative vectors are needed length @@ -110,51 +109,49 @@ int AtomVecAngle::pack_restart(int i, double *buf) any_angle_negative = 1; } else angle_negative[m] = 0; } - - // perform the pack with adjusted values - - int n = AtomVec::pack_restart(i,buf); - - // restore the flagged types to their negative values - - if (any_bond_negative) { - for (int m = 0; m < num_bond[i]; m++) - if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; - } - if (any_angle_negative) { - for (int m = 0; m < num_angle[i]; m++) - if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; - } - - return n; } /* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities - initialize other atom quantities + unmodify values packed by AtomVec::pack_restart() ------------------------------------------------------------------------- */ -int AtomVecAngle::unpack_restart(double *buf) +void AtomVecAngle::pack_restart_post(int i) { - AtomVec::unpack_restart(buf); - int ilocal = atom->nlocal-1; + // restore the flagged types to their negative values + if (any_bond_negative) { + int *num_bond = atom->num_bond; + int **bond_type = atom->bond_type; + for (int m = 0; m < num_bond[i]; m++) + if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; + } + + if (any_angle_negative) { + int *num_angle = atom->num_angle; + int **angle_type = atom->angle_type; + for (int m = 0; m < num_angle[i]; m++) + if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; + } +} + +/* ---------------------------------------------------------------------- + initialize other atom quantities after AtomVec::unpack_restart() +------------------------------------------------------------------------- */ + +void AtomVecAngle::unpack_restart_init(int ilocal) +{ atom->nspecial[ilocal][0] = 0; atom->nspecial[ilocal][1] = 0; atom->nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - modify what default AtomVec::data_atom() just unpacked + modify what AtomVec::data_atom() just unpacked or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecAngle::data_atom(double *coord, imageint imagetmp, char **values) +void AtomVecAngle::data_atom_post(int ilocal) { - AtomVec::data_atom(coord,imagetmp,values); - int ilocal = atom->nlocal-1; - atom->num_bond[ilocal] = 0; atom->num_angle[ilocal] = 0; atom->nspecial[ilocal][0] = 0; diff --git a/src/MOLECULE/atom_vec_angle.h b/src/MOLECULE/atom_vec_angle.h index 6511b517ee..48e55b0988 100644 --- a/src/MOLECULE/atom_vec_angle.h +++ b/src/MOLECULE/atom_vec_angle.h @@ -28,11 +28,13 @@ class AtomVecAngle : public AtomVec { public: AtomVecAngle(class LAMMPS *); ~AtomVecAngle(); - int pack_restart(int, double *); - int unpack_restart(double *); - void data_atom(double *, imageint, char **); + void pack_restart_pre(int); + void pack_restart_post(int); + void unpack_restart_init(int); + void data_atom_post(int); private: + int any_bond_negative,any_angle_negative; int bond_per_atom,angle_per_atom; int *bond_negative,*angle_negative; }; diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index 20cdfdd65a..fd3f08979d 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -61,11 +61,10 @@ AtomVecBond::~AtomVecBond() } /* ---------------------------------------------------------------------- - pack atom I's data for restart file - modify/unmodify values for default AtomVec::pack_restart() to pack + modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -int AtomVecBond::pack_restart(int i, double *buf) +void AtomVecBond::pack_restart_pre(int i) { // insure bond_negative vector is needed length @@ -80,7 +79,7 @@ int AtomVecBond::pack_restart(int i, double *buf) int *num_bond = atom->num_bond; int **bond_type = atom->bond_type; - int any_bond_negative = 0; + any_bond_negative = 0; for (int m = 0; m < num_bond[i]; m++) { if (bond_type[i][m] < 0) { bond_negative[m] = 1; @@ -88,47 +87,42 @@ int AtomVecBond::pack_restart(int i, double *buf) any_bond_negative = 1; } else bond_negative[m] = 0; } - - // perform the pack with adjusted values - - int n = AtomVec::pack_restart(i,buf); - - // restore the flagged types to their negative values - - if (any_bond_negative) { - for (int m = 0; m < num_bond[i]; m++) - if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; - } - - return n; } /* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities - initialize other atom quantities + unmodify values packed by AtomVec::pack_restart() ------------------------------------------------------------------------- */ -int AtomVecBond::unpack_restart(double *buf) +void AtomVecBond::pack_restart_post(int i) { - AtomVec::unpack_restart(buf); - int ilocal = atom->nlocal-1; + // restore the flagged types to their negative values + if (any_bond_negative) { + int *num_bond = atom->num_bond; + int **bond_type = atom->bond_type; + for (int m = 0; m < num_bond[i]; m++) + if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; + } +} + +/* ---------------------------------------------------------------------- + initialize other atom quantities after AtomVec::unpack_restart() +------------------------------------------------------------------------- */ + +void AtomVecBond::unpack_restart_init(int ilocal) +{ atom->nspecial[ilocal][0] = 0; atom->nspecial[ilocal][1] = 0; atom->nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - modify what default AtomVec::data_atom() just unpacked + modify what AtomVec::data_atom() just unpacked or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecBond::data_atom(double *coord, imageint imagetmp, char **values) +void AtomVecBond::data_atom_post(int ilocal) { - AtomVec::data_atom(coord,imagetmp,values); - int ilocal = atom->nlocal-1; - atom->num_bond[ilocal] = 0; atom->nspecial[ilocal][0] = 0; atom->nspecial[ilocal][1] = 0; diff --git a/src/MOLECULE/atom_vec_bond.h b/src/MOLECULE/atom_vec_bond.h index 9245bc317a..c2bf7d6680 100644 --- a/src/MOLECULE/atom_vec_bond.h +++ b/src/MOLECULE/atom_vec_bond.h @@ -28,11 +28,13 @@ class AtomVecBond : public AtomVec { public: AtomVecBond(class LAMMPS *); ~AtomVecBond(); - int pack_restart(int, double *); - int unpack_restart(double *); - void data_atom(double *, imageint, char **); + void pack_restart_pre(int); + void pack_restart_post(int); + void unpack_restart_init(int); + void data_atom_post(int); private: + int any_bond_negative; int bond_per_atom; int *bond_negative; }; diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index 826d5fea4e..ed838aa0e3 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -89,11 +89,10 @@ AtomVecFull::~AtomVecFull() } /* ---------------------------------------------------------------------- - pack atom I's data for restart file - modify/unmodify values for default AtomVec::pack_restart() to pack + modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -int AtomVecFull::pack_restart(int i, double *buf) +void AtomVecFull::pack_restart_pre(int i) { // insure negative vectors are needed length @@ -164,59 +163,63 @@ int AtomVecFull::pack_restart(int i, double *buf) any_improper_negative = 1; } else improper_negative[m] = 0; } - - // perform the pack with adjusted values - - int n = AtomVec::pack_restart(i,buf); - - // restore the flagged types to their negative values - - if (any_bond_negative) { - for (int m = 0; m < num_bond[i]; m++) - if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; - } - if (any_angle_negative) { - for (int m = 0; m < num_angle[i]; m++) - if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; - } - if (any_dihedral_negative) { - for (int m = 0; m < num_dihedral[i]; m++) - if (dihedral_negative[m]) dihedral_type[i][m] = -dihedral_type[i][m]; - } - if (any_improper_negative) { - for (int m = 0; m < num_improper[i]; m++) - if (improper_negative[m]) improper_type[i][m] = -improper_type[i][m]; - } - - return n; } /* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities - initialize other atom quantities + unmodify values packed by AtomVec::pack_restart() ------------------------------------------------------------------------- */ -int AtomVecFull::unpack_restart(double *buf) +void AtomVecFull::pack_restart_post(int i) { - AtomVec::unpack_restart(buf); - int ilocal = atom->nlocal-1; + // restore the flagged types to their negative values + if (any_bond_negative) { + int *num_bond = atom->num_bond; + int **bond_type = atom->bond_type; + for (int m = 0; m < num_bond[i]; m++) + if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; + } + + if (any_angle_negative) { + int *num_angle = atom->num_angle; + int **angle_type = atom->angle_type; + for (int m = 0; m < num_angle[i]; m++) + if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; + } + + if (any_dihedral_negative) { + int *num_dihedral = atom->num_dihedral; + int **dihedral_type = atom->dihedral_type; + for (int m = 0; m < num_dihedral[i]; m++) + if (dihedral_negative[m]) dihedral_type[i][m] = -dihedral_type[i][m]; + } + + if (any_improper_negative) { + int *num_improper = atom->num_improper; + int **improper_type = atom->improper_type; + for (int m = 0; m < num_improper[i]; m++) + if (improper_negative[m]) improper_type[i][m] = -improper_type[i][m]; + } +} + +/* ---------------------------------------------------------------------- + initialize other atom quantities after AtomVec::unpack_restart() +------------------------------------------------------------------------- */ + +void AtomVecFull::unpack_restart_init(int ilocal) +{ atom->nspecial[ilocal][0] = 0; atom->nspecial[ilocal][1] = 0; atom->nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - modify what default AtomVec::data_atom() just unpacked + modify what AtomVec::data_atom() just unpacked or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecFull::data_atom(double *coord, imageint imagetmp, char **values) +void AtomVecFull::data_atom_post(int ilocal) { - AtomVec::data_atom(coord,imagetmp,values); - int ilocal = atom->nlocal-1; - atom->num_bond[ilocal] = 0; atom->num_angle[ilocal] = 0; atom->num_dihedral[ilocal] = 0; diff --git a/src/MOLECULE/atom_vec_full.h b/src/MOLECULE/atom_vec_full.h index b194a86994..455bbd0d5e 100644 --- a/src/MOLECULE/atom_vec_full.h +++ b/src/MOLECULE/atom_vec_full.h @@ -28,11 +28,14 @@ class AtomVecFull : public AtomVec { public: AtomVecFull(class LAMMPS *); ~AtomVecFull(); - int pack_restart(int, double *); - int unpack_restart(double *); - void data_atom(double *, imageint, char **); + void pack_restart_pre(int); + void pack_restart_post(int); + void unpack_restart_init(int); + void data_atom_post(int); private: + int any_bond_negative,any_angle_negative, + any_dihedral_negative,any_improper_negative; int bond_per_atom,angle_per_atom,dihedral_per_atom,improper_per_atom; int *bond_negative,*angle_negative,*dihedral_negative,*improper_negative; }; diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index dad7c5cea6..77aec2cf50 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -89,11 +89,10 @@ AtomVecMolecular::~AtomVecMolecular() } /* ---------------------------------------------------------------------- - pack atom I's data for restart file - modify/unmodify values for default AtomVec::pack_restart() to pack + modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -int AtomVecMolecular::pack_restart(int i, double *buf) +void AtomVecMolecular::pack_restart_pre(int i) { // insure negative vectors are needed length @@ -164,59 +163,63 @@ int AtomVecMolecular::pack_restart(int i, double *buf) any_improper_negative = 1; } else improper_negative[m] = 0; } - - // perform the pack with adjusted values - - int n = AtomVec::pack_restart(i,buf); - - // restore the flagged types to their negative values - - if (any_bond_negative) { - for (int m = 0; m < num_bond[i]; m++) - if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; - } - if (any_angle_negative) { - for (int m = 0; m < num_angle[i]; m++) - if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; - } - if (any_dihedral_negative) { - for (int m = 0; m < num_dihedral[i]; m++) - if (dihedral_negative[m]) dihedral_type[i][m] = -dihedral_type[i][m]; - } - if (any_improper_negative) { - for (int m = 0; m < num_improper[i]; m++) - if (improper_negative[m]) improper_type[i][m] = -improper_type[i][m]; - } - - return n; } /* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities - initialize other atom quantities + unmodify values packed by AtomVec::pack_restart() ------------------------------------------------------------------------- */ -int AtomVecMolecular::unpack_restart(double *buf) +void AtomVecMolecular::pack_restart_post(int i) { - AtomVec::unpack_restart(buf); - int ilocal = atom->nlocal-1; + // restore the flagged types to their negative values + if (any_bond_negative) { + int *num_bond = atom->num_bond; + int **bond_type = atom->bond_type; + for (int m = 0; m < num_bond[i]; m++) + if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; + } + + if (any_angle_negative) { + int *num_angle = atom->num_angle; + int **angle_type = atom->angle_type; + for (int m = 0; m < num_angle[i]; m++) + if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; + } + + if (any_dihedral_negative) { + int *num_dihedral = atom->num_dihedral; + int **dihedral_type = atom->dihedral_type; + for (int m = 0; m < num_dihedral[i]; m++) + if (dihedral_negative[m]) dihedral_type[i][m] = -dihedral_type[i][m]; + } + + if (any_improper_negative) { + int *num_improper = atom->num_improper; + int **improper_type = atom->improper_type; + for (int m = 0; m < num_improper[i]; m++) + if (improper_negative[m]) improper_type[i][m] = -improper_type[i][m]; + } +} + +/* ---------------------------------------------------------------------- + initialize other atom quantities after AtomVec::unpack_restart() +------------------------------------------------------------------------- */ + +void AtomVecMolecular::unpack_restart_init(int ilocal) +{ atom->nspecial[ilocal][0] = 0; atom->nspecial[ilocal][1] = 0; atom->nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - modify what default AtomVec::data_atom() just unpacked + modify what AtomVec::data_atom() just unpacked or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecMolecular::data_atom(double *coord, imageint imagetmp, char **values) +void AtomVecMolecular::data_atom_post(int ilocal) { - AtomVec::data_atom(coord,imagetmp,values); - int ilocal = atom->nlocal-1; - atom->num_bond[ilocal] = 0; atom->num_angle[ilocal] = 0; atom->num_dihedral[ilocal] = 0; diff --git a/src/MOLECULE/atom_vec_molecular.h b/src/MOLECULE/atom_vec_molecular.h index cba6d1b480..5b79f8b5c6 100644 --- a/src/MOLECULE/atom_vec_molecular.h +++ b/src/MOLECULE/atom_vec_molecular.h @@ -28,11 +28,14 @@ class AtomVecMolecular : public AtomVec { public: AtomVecMolecular(class LAMMPS *); ~AtomVecMolecular(); - int pack_restart(int, double *); - int unpack_restart(double *); - void data_atom(double *, imageint, char **); + void pack_restart_pre(int); + void pack_restart_post(int); + void unpack_restart_init(int); + void data_atom_post(int); private: + int any_bond_negative,any_angle_negative, + any_dihedral_negative,any_improper_negative; int bond_per_atom,angle_per_atom,dihedral_per_atom,improper_per_atom; int *bond_negative,*angle_negative,*dihedral_negative,*improper_negative; }; diff --git a/src/MOLECULE/atom_vec_template.cpp b/src/MOLECULE/atom_vec_template.cpp index 31d9af4caf..d22e9abfb3 100644 --- a/src/MOLECULE/atom_vec_template.cpp +++ b/src/MOLECULE/atom_vec_template.cpp @@ -97,29 +97,22 @@ void AtomVecTemplate::process_args(int narg, char **arg) } /* ---------------------------------------------------------------------- - create one atom of itype at coord - modify what default AtomVec::create_atom() just created + initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecTemplate::create_atom(int itype, double *coord) +void AtomVecTemplate::create_atom_post(int ilocal) { - AtomVec::create_atom(itype,coord); - - int ilocal = atom->nlocal-1; atom->molindex[ilocal] = -1; atom->molatom[ilocal] = -1; } /* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - error check what default AtomVec::data_atom() just unpacked + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecTemplate::data_atom(double *coord, imageint imagetmp, char **values) +void AtomVecTemplate::data_atom_post(int ilocal) { - AtomVec::data_atom(coord,imagetmp,values); - - int ilocal = atom->nlocal-1; int molindex = atom->molindex[ilocal]; int molatom = atom->molatom[ilocal]; diff --git a/src/MOLECULE/atom_vec_template.h b/src/MOLECULE/atom_vec_template.h index 59a1386f2d..52ef5e70e1 100644 --- a/src/MOLECULE/atom_vec_template.h +++ b/src/MOLECULE/atom_vec_template.h @@ -28,8 +28,8 @@ class AtomVecTemplate : public AtomVec { public: AtomVecTemplate(class LAMMPS *); void process_args(int, char **); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); + void create_atom_post(int); + void data_atom_post(int); }; } diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index 29c4cb0d83..5450b23293 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -88,20 +88,16 @@ void AtomVecPeri::create_atom(int itype, double *coord) } /* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - modify what default AtomVec::data_atom() just unpacked + modify what AtomVec::data_atom() just unpacked or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecPeri::data_atom(double *coord, imageint imagetmp, char **values) +void AtomVecPeri::data_atom_post(int ilocal) { - AtomVec::data_atom(coord,imagetmp,values); - int ilocal = atom->nlocal-1; - atom->s0[ilocal] = DBL_MAX; - atom->x0[ilocal][0] = coord[0]; - atom->x0[ilocal][1] = coord[1]; - atom->x0[ilocal][2] = coord[2]; + atom->x0[ilocal][0] = atom->x[ilocal][0]; + atom->x0[ilocal][1] = atom->x[ilocal][1]; + atom->x0[ilocal][2] = atom->x[ilocal][2]; if (atom->rmass[ilocal] <= 0.0) error->one(FLERR,"Invalid mass in Atoms section of data file"); diff --git a/src/PERI/atom_vec_peri.h b/src/PERI/atom_vec_peri.h index 12ef650348..3b41950a6f 100644 --- a/src/PERI/atom_vec_peri.h +++ b/src/PERI/atom_vec_peri.h @@ -28,7 +28,7 @@ class AtomVecPeri : public AtomVec { public: AtomVecPeri(class LAMMPS *); void create_atom(int, double *); - void data_atom(double *, imageint, char **); + void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); }; diff --git a/src/SPIN/atom_vec_spin.cpp b/src/SPIN/atom_vec_spin.cpp index 135f8936a1..6c88fb1a9e 100644 --- a/src/SPIN/atom_vec_spin.cpp +++ b/src/SPIN/atom_vec_spin.cpp @@ -62,25 +62,7 @@ AtomVecSpin::AtomVecSpin(LAMMPS *lmp) : AtomVec(lmp) } /* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - modify what default AtomVec::data_atom() just unpacked - or initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecSpin::data_atom(double *coord, imageint imagetmp, char **values) -{ - AtomVec::data_atom(coord,imagetmp,values); - int ilocal = atom->nlocal-1; - - double *sp = atom->sp[ilocal]; - double inorm = 1.0/sqrt(sp[0]*sp[0] + sp[1]*sp[1] + sp[2]*sp[2]); - sp[0] *= inorm; - sp[1] *= inorm; - sp[2] *= inorm; -} - -/* ---------------------------------------------------------------------- - clear all forces (mech and mag) + clear all forces (mechanical and magnetic) ------------------------------------------------------------------------- */ void AtomVecSpin::force_clear(int /*n*/, size_t nbytes) @@ -89,3 +71,17 @@ void AtomVecSpin::force_clear(int /*n*/, size_t nbytes) memset(&atom->fm[0][0],0,3*nbytes); memset(&atom->fm_long[0][0],0,3*nbytes); } + +/* ---------------------------------------------------------------------- + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities +------------------------------------------------------------------------- */ + +void AtomVecSpin::data_atom_post(int ilocal) +{ + double *sp = atom->sp[ilocal]; + double inorm = 1.0/sqrt(sp[0]*sp[0] + sp[1]*sp[1] + sp[2]*sp[2]); + sp[0] *= inorm; + sp[1] *= inorm; + sp[2] *= inorm; +} diff --git a/src/SPIN/atom_vec_spin.h b/src/SPIN/atom_vec_spin.h index ca92cccc2e..c68f3a0419 100644 --- a/src/SPIN/atom_vec_spin.h +++ b/src/SPIN/atom_vec_spin.h @@ -27,8 +27,8 @@ namespace LAMMPS_NS { class AtomVecSpin : public AtomVec { public: AtomVecSpin(class LAMMPS *); - void data_atom(double *, imageint, char **); void force_clear(int, size_t); + void data_atom_post(int); }; } diff --git a/src/atom.cpp b/src/atom.cpp index 7f1a5a6022..e1736e321c 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -2498,3 +2498,4 @@ bigint Atom::memory_usage() return bytes; } + diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index 428117f0db..776d7a4619 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -145,223 +145,6 @@ void AtomVec::init() error->all(FLERR,"KOKKOS package requires a kokkos enabled atom_style"); } -/* ---------------------------------------------------------------------- - process field strings to initialize data structs for all other methods -------------------------------------------------------------------------- */ - -void AtomVec::setup_fields() -{ - int n,cols; - - if (!fields_data_atom) - error->all(FLERR,"Atom style requires fields_data_atom"); - - // process field strings - // return # of fields and matching index into atom->peratom (in Method struct) - - ngrow = process_fields(fields_grow,default_grow,&mgrow); - ncopy = process_fields(fields_copy,default_copy,&mcopy); - ncomm = process_fields(fields_comm,default_comm,&mcomm); - ncomm_vel = process_fields(fields_comm_vel,default_comm_vel,&mcomm_vel); - nreverse = process_fields(fields_reverse,default_reverse,&mreverse); - nborder = process_fields(fields_border,default_border,&mborder); - nborder_vel = process_fields(fields_border_vel,default_border_vel,&mborder_vel); - nexchange = process_fields(fields_exchange,default_exchange,&mexchange); - nrestart = process_fields(fields_restart,default_restart,&mrestart); - ncreate = process_fields(fields_create,default_create,&mcreate); - ndata_atom = process_fields(fields_data_atom,default_data_atom,&mdata_atom); - ndata_vel = process_fields(fields_data_vel,default_data_vel,&mdata_vel); - - // populate field-based data struct for each method to use - - create_method(ngrow,&mgrow); - create_method(ncopy,&mcopy); - create_method(ncomm,&mcomm); - create_method(ncomm_vel,&mcomm_vel); - create_method(nreverse,&mreverse); - create_method(nborder,&mborder); - create_method(nborder_vel,&mborder_vel); - create_method(nexchange,&mexchange); - create_method(nrestart,&mrestart); - create_method(ncreate,&mcreate); - create_method(ndata_atom,&mdata_atom); - create_method(ndata_vel,&mdata_vel); - - // create threads data struct for grow and memory_usage to use - - threads = new int[ngrow]; - for (int i = 0; i < ngrow; i++) { - Atom::PerAtom *field = &atom->peratom[mgrow.index[i]]; - if (field->threadflag) threads[i] = nthreads; - else threads[i] = 1; - } - - // set style-specific variables - // NOTE: check for others vars in atom_vec.cpp/h ?? - - if (ncomm == 0) comm_x_only = 1; - else comm_x_only = 0; - - if (nreverse == 0) comm_f_only = 1; - else comm_f_only = 0; - - size_forward = 3; - for (n = 0; n < ncomm; n++) { - cols = mcomm.cols[n]; - if (cols == 0) size_forward++; - else size_forward += cols; - } - - size_reverse = 3; - for (n = 0; n < nreverse; n++) { - cols = mreverse.cols[n]; - if (cols == 0) size_reverse++; - else size_reverse += cols; - } - - size_border = 6; - for (n = 0; n < nborder; n++) { - cols = mborder.cols[n]; - if (cols == 0) size_border++; - else size_border += cols; - } - - size_velocity = 3; - for (n = 0; n < ncomm_vel; n++) { - cols = mcomm_vel.cols[n]; - if (cols == 0) size_velocity++; - else size_velocity += cols; - } - - size_data_atom = 0; - for (n = 0; n < ndata_atom; n++) { - cols = mdata_atom.cols[n]; - if (strcmp(atom->peratom[mdata_atom.index[n]].name,"x") == 0) - xcol_data = size_data_atom + 1; - if (cols == 0) size_data_atom++; - else size_data_atom += cols; - } - - size_data_vel = 4; - for (n = 0; n < ndata_vel; n++) { - cols = mdata_vel.cols[n]; - if (cols == 0) size_data_vel++; - else size_data_vel += cols; - } -} - -/* ---------------------------------------------------------------------- - process a single field string -------------------------------------------------------------------------- */ - -int AtomVec::process_fields(char *list, const char *default_list, Method *method) -{ - int i,n; - char match[128]; - - if (list == NULL) { - method->index = NULL; - return 0; - } - - // make copy of list of fields so can tokenize it - - n = strlen(list) + 1; - char *copy = new char[n]; - strcpy(copy,list); - - int nfield = atom->count_words(copy); - int *index = new int[nfield]; - - Atom::PerAtom *peratom = atom->peratom; - int nperatom = atom->nperatom; - - nfield = 0; - char *field = strtok(copy," "); - while (field) { - - // find field in master Atom::peratom list - - for (i = 0; i < nperatom; i++) - if (strcmp(field,peratom[i].name) == 0) break; - if (i == nperatom) error->all(FLERR,"Atom_style unrecognized peratom field"); - index[nfield++] = i; - - // error if field is in default list or appears multiple times - - sprintf(match," %s ",field); - if (strstr(default_list,match)) - error->all(FLERR,"Atom_style repeat of default peratom field"); - - for (i = 0; i < nfield-1; i++) - if (index[i] == index[nfield-1]) - error->all(FLERR,"Atom_style duplicated peratom field"); - - field = strtok(NULL," "); - } - - delete [] copy; - - method->index = index; - return nfield; -} - -/* ---------------------------------------------------------------------- - create a method data structs for processing fields -------------------------------------------------------------------------- */ - -void AtomVec::create_method(int nfield, Method *method) -{ - method->pdata = new void*[nfield]; - method->datatype = new int[nfield]; - method->cols = new int[nfield]; - method->maxcols = new int*[nfield]; - method->collength = new int[nfield]; - method->plength = new void*[nfield]; - - for (int i = 0; i < nfield; i++) { - Atom::PerAtom *field = &atom->peratom[method->index[i]]; - method->pdata[i] = (void *) field->address; - method->datatype[i] = field->datatype; - method->cols[i] = field->cols; - if (method->cols[i] < 0) { - method->maxcols[i] = field->address_maxcols; - method->collength[i] = field->collength; - method->plength[i] = field->address_length; - } - } -} - -/* ---------------------------------------------------------------------- - free memory in a method data structs -------------------------------------------------------------------------- */ - -void AtomVec::init_method(Method *method) -{ - method->pdata = NULL; - method->datatype = NULL; - method->cols = NULL; - method->maxcols = NULL; - method->collength = NULL; - method->plength = NULL; - method->index = NULL; -} - -/* ---------------------------------------------------------------------- - free memory in a method data structs -------------------------------------------------------------------------- */ - -void AtomVec::destroy_method(Method *method) -{ - delete [] method->pdata; - delete [] method->datatype; - delete [] method->cols; - delete [] method->maxcols; - delete [] method->collength; - delete [] method->plength; - delete [] method->index; -} - /* ---------------------------------------------------------------------- grow nmax so it is a multiple of DELTA ------------------------------------------------------------------------- */ @@ -446,18 +229,6 @@ void AtomVec::grow(int n) modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); } -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVec::grow_reset() -{ - // NOTE: is this method needed anymore - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; -} - /* ---------------------------------------------------------------------- copy atom I info to atom J ------------------------------------------------------------------------- */ @@ -1614,6 +1385,10 @@ int AtomVec::pack_restart(int i, double *buf) int mm,nn,datatype,cols,collength,ncols; void *pdata,*plength; + // if needed, change values before packing + + pack_restart_pre(i); + int m = 1; buf[m++] = x[i][0]; buf[m++] = x[i][1]; @@ -1684,6 +1459,12 @@ int AtomVec::pack_restart(int i, double *buf) } } + // if needed, restore values after packing + + pack_restart_post(i); + + // invoke fixes which store peratom restart info + for (int iextra = 0; iextra < atom->nextra_restart; iextra++) m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); @@ -1777,6 +1558,12 @@ int AtomVec::unpack_restart(double *buf) } } + // if needed, initialize other peratom values + + unpack_restart_init(nlocal); + + // store extra restart info which fixes can unpack when instantiated + double **extra = atom->extra; if (atom->nextra_store) { int size = static_cast (buf[0]) - m; @@ -1812,7 +1599,7 @@ void AtomVec::create_atom(int itype, double *coord) v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; - // special-case initialization for some fields + // initialization additional fields for (n = 0; n < ncreate; n++) { pdata = mcreate.pdata[n]; @@ -1848,12 +1635,16 @@ void AtomVec::create_atom(int itype, double *coord) } } + // if needed, initialize other peratom values + + create_atom_post(nlocal); + atom->nlocal++; } /* ---------------------------------------------------------------------- unpack one line from Atoms section of data file - initialize other atom quantities + initialize other peratom quantities ------------------------------------------------------------------------- */ void AtomVec::data_atom(double *coord, imageint imagetmp, char **values) @@ -1919,6 +1710,10 @@ void AtomVec::data_atom(double *coord, imageint imagetmp, char **values) if (atom->type[nlocal] <= 0 || atom->type[nlocal] > atom->ntypes) error->one(FLERR,"Invalid atom type in Atoms section of data file"); + // if needed, modify unpacked values or initialize other peratom values + + data_atom_post(nlocal); + atom->nlocal++; } @@ -1933,6 +1728,11 @@ void AtomVec::pack_data(double **buf) int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { + + // if needed, change values before packing + + pack_data_pre(i); + j = 0; for (n = 0; n < ndata_atom; n++) { pdata = mdata_atom.pdata[n]; @@ -1971,6 +1771,10 @@ void AtomVec::pack_data(double **buf) buf[i][j++] = ubuf((image[i] & IMGMASK) - IMGMAX).d; buf[i][j++] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; buf[i][j++] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; + + // if needed, restore values after packing + + pack_data_post(i); } } @@ -2493,3 +2297,227 @@ bigint AtomVec::memory_usage() return bytes; } + +// ---------------------------------------------------------------------- +// internal methods +// ---------------------------------------------------------------------- + +/* ---------------------------------------------------------------------- + process field strings to initialize data structs for all other methods +------------------------------------------------------------------------- */ + +void AtomVec::setup_fields() +{ + int n,cols; + + if (!fields_data_atom) + error->all(FLERR,"Atom style requires fields_data_atom"); + if (strstr(fields_data_atom,"id ") != fields_data_atom) + error->all(FLERR,"Atom style fields_data_atom must have id as first field"); + + // process field strings + // return # of fields and matching index into atom->peratom (in Method struct) + + ngrow = process_fields(fields_grow,default_grow,&mgrow); + ncopy = process_fields(fields_copy,default_copy,&mcopy); + ncomm = process_fields(fields_comm,default_comm,&mcomm); + ncomm_vel = process_fields(fields_comm_vel,default_comm_vel,&mcomm_vel); + nreverse = process_fields(fields_reverse,default_reverse,&mreverse); + nborder = process_fields(fields_border,default_border,&mborder); + nborder_vel = process_fields(fields_border_vel,default_border_vel,&mborder_vel); + nexchange = process_fields(fields_exchange,default_exchange,&mexchange); + nrestart = process_fields(fields_restart,default_restart,&mrestart); + ncreate = process_fields(fields_create,default_create,&mcreate); + ndata_atom = process_fields(fields_data_atom,default_data_atom,&mdata_atom); + ndata_vel = process_fields(fields_data_vel,default_data_vel,&mdata_vel); + + // populate field-based data struct for each method to use + + create_method(ngrow,&mgrow); + create_method(ncopy,&mcopy); + create_method(ncomm,&mcomm); + create_method(ncomm_vel,&mcomm_vel); + create_method(nreverse,&mreverse); + create_method(nborder,&mborder); + create_method(nborder_vel,&mborder_vel); + create_method(nexchange,&mexchange); + create_method(nrestart,&mrestart); + create_method(ncreate,&mcreate); + create_method(ndata_atom,&mdata_atom); + create_method(ndata_vel,&mdata_vel); + + // create threads data struct for grow and memory_usage to use + + threads = new int[ngrow]; + for (int i = 0; i < ngrow; i++) { + Atom::PerAtom *field = &atom->peratom[mgrow.index[i]]; + if (field->threadflag) threads[i] = nthreads; + else threads[i] = 1; + } + + // set style-specific variables + // NOTE: check for others vars in atom_vec.cpp/h ?? + // NOTE: need to set maxexchange, e.g for style hybrid? + + if (ncomm == 0) comm_x_only = 1; + else comm_x_only = 0; + + if (nreverse == 0) comm_f_only = 1; + else comm_f_only = 0; + + size_forward = 3; + for (n = 0; n < ncomm; n++) { + cols = mcomm.cols[n]; + if (cols == 0) size_forward++; + else size_forward += cols; + } + + size_reverse = 3; + for (n = 0; n < nreverse; n++) { + cols = mreverse.cols[n]; + if (cols == 0) size_reverse++; + else size_reverse += cols; + } + + size_border = 6; + for (n = 0; n < nborder; n++) { + cols = mborder.cols[n]; + if (cols == 0) size_border++; + else size_border += cols; + } + + size_velocity = 3; + for (n = 0; n < ncomm_vel; n++) { + cols = mcomm_vel.cols[n]; + if (cols == 0) size_velocity++; + else size_velocity += cols; + } + + size_data_atom = 0; + for (n = 0; n < ndata_atom; n++) { + cols = mdata_atom.cols[n]; + if (strcmp(atom->peratom[mdata_atom.index[n]].name,"x") == 0) + xcol_data = size_data_atom + 1; + if (cols == 0) size_data_atom++; + else size_data_atom += cols; + } + + size_data_vel = 4; + for (n = 0; n < ndata_vel; n++) { + cols = mdata_vel.cols[n]; + if (cols == 0) size_data_vel++; + else size_data_vel += cols; + } +} + +/* ---------------------------------------------------------------------- + process a single field string +------------------------------------------------------------------------- */ + +int AtomVec::process_fields(char *list, const char *default_list, Method *method) +{ + int i,n; + char match[128]; + + if (list == NULL) { + method->index = NULL; + return 0; + } + + // make copy of list of fields so can tokenize it + + n = strlen(list) + 1; + char *copy = new char[n]; + strcpy(copy,list); + + int nfield = atom->count_words(copy); + int *index = new int[nfield]; + + Atom::PerAtom *peratom = atom->peratom; + int nperatom = atom->nperatom; + + nfield = 0; + char *field = strtok(copy," "); + while (field) { + + // find field in master Atom::peratom list + + for (i = 0; i < nperatom; i++) + if (strcmp(field,peratom[i].name) == 0) break; + if (i == nperatom) error->all(FLERR,"Atom_style unrecognized peratom field"); + index[nfield++] = i; + + // error if field is in default list or appears multiple times + + sprintf(match," %s ",field); + if (strstr(default_list,match)) + error->all(FLERR,"Atom_style repeat of default peratom field"); + + for (i = 0; i < nfield-1; i++) + if (index[i] == index[nfield-1]) + error->all(FLERR,"Atom_style duplicated peratom field"); + + field = strtok(NULL," "); + } + + delete [] copy; + + method->index = index; + return nfield; +} + +/* ---------------------------------------------------------------------- + create a method data structs for processing fields +------------------------------------------------------------------------- */ + +void AtomVec::create_method(int nfield, Method *method) +{ + method->pdata = new void*[nfield]; + method->datatype = new int[nfield]; + method->cols = new int[nfield]; + method->maxcols = new int*[nfield]; + method->collength = new int[nfield]; + method->plength = new void*[nfield]; + + for (int i = 0; i < nfield; i++) { + Atom::PerAtom *field = &atom->peratom[method->index[i]]; + method->pdata[i] = (void *) field->address; + method->datatype[i] = field->datatype; + method->cols[i] = field->cols; + if (method->cols[i] < 0) { + method->maxcols[i] = field->address_maxcols; + method->collength[i] = field->collength; + method->plength[i] = field->address_length; + } + } +} + +/* ---------------------------------------------------------------------- + free memory in a method data structs +------------------------------------------------------------------------- */ + +void AtomVec::init_method(Method *method) +{ + method->pdata = NULL; + method->datatype = NULL; + method->cols = NULL; + method->maxcols = NULL; + method->collength = NULL; + method->plength = NULL; + method->index = NULL; +} + +/* ---------------------------------------------------------------------- + free memory in a method data structs +------------------------------------------------------------------------- */ + +void AtomVec::destroy_method(Method *method) +{ + delete [] method->pdata; + delete [] method->datatype; + delete [] method->cols; + delete [] method->maxcols; + delete [] method->collength; + delete [] method->plength; + delete [] method->index; +} diff --git a/src/atom_vec.h b/src/atom_vec.h index c3551b541d..8ed6fff35f 100644 --- a/src/atom_vec.h +++ b/src/atom_vec.h @@ -49,60 +49,68 @@ class AtomVec : protected Pointers { int nargcopy; // copy of command-line args for atom_style command char **argcopy; // used when AtomVec is realloced (restart,replicate) + // additional list of peratom fields operated on by different methods + // set by child styles + + char *fields_grow,*fields_copy; + char *fields_comm,*fields_comm_vel,*fields_reverse; + char *fields_border,*fields_border_vel; + char *fields_exchange,*fields_restart; + char *fields_create,*fields_data_atom,*fields_data_vel; + + // methods + AtomVec(class LAMMPS *); virtual ~AtomVec(); void store_args(int, char **); virtual void process_args(int, char **); virtual void init(); + virtual void force_clear(int, size_t) {} + void grow(int); - void grow_reset(); void copy(int, int, int); void clear_bonus() {} - void force_clear(int, size_t) {} int pack_comm(int, int *, double *, int, int *); int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *) {return 0;} void unpack_comm(int, int, double *); void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *) {return 0;} int pack_reverse(int, int, double *); - int pack_reverse_hybrid(int, int, double *) {return 0;} void unpack_reverse(int, int *, double *); - int unpack_reverse_hybrid(int, int *, double *) {return 0;} int pack_border(int, int *, double *, int, int *); int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *) {return 0;} void unpack_border(int, int, double *); void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *) {return 0;} int pack_exchange(int, double *); int unpack_exchange(double *); int size_restart(); - virtual int pack_restart(int, double *); - virtual int unpack_restart(double *); + virtual void pack_restart_pre(int) {} + int pack_restart(int, double *); + virtual void pack_restart_post(int) {} + int unpack_restart(double *); + virtual void unpack_restart_init(int) {} - virtual void create_atom(int, double *); + void create_atom(int, double *); + virtual void create_atom_post(int) {} + + void data_atom(double *, imageint, char **); + virtual void data_atom_post(int) {} - virtual void data_atom(double *, imageint, char **); void data_atom_bonus(int, char **) {} - int data_atom_hybrid(int, char **) {return 0;} void data_vel(int, char **); - int data_vel_hybrid(int, char **) {return 0;} + virtual void pack_data_pre(int) {} void pack_data(double **); + virtual void pack_data_post(int) {} int pack_data_hybrid(int, double *) {return 0;} void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *) {return 0;} void pack_vel(double **); - int pack_vel_hybrid(int, double *) {return 0;} void write_vel(FILE *, int, double **); - int write_vel_hybrid(FILE *, double *) {return 0;} int pack_bond(tagint **); void write_bond(FILE *, int, tagint **, int); @@ -129,18 +137,15 @@ class AtomVec : protected Pointers { imageint *image; double **x,**v,**f; + // standard list of peratom fields always operated on by different methods + // common to all styles, so not listed in field strings + const char *default_grow,*default_copy; const char *default_comm,*default_comm_vel,*default_reverse; const char *default_border,*default_border_vel; const char *default_exchange,*default_restart; const char *default_create,*default_data_atom,*default_data_vel; - char *fields_grow,*fields_copy; - char *fields_comm,*fields_comm_vel,*fields_reverse; - char *fields_border,*fields_border_vel; - char *fields_exchange,*fields_restart; - char *fields_create,*fields_data_atom,*fields_data_vel; - struct Method { void **pdata; int *datatype; diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index 4ca0dfbba5..d96494544c 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -35,6 +35,15 @@ AtomVecHybrid::~AtomVecHybrid() delete [] styles; for (int k = 0; k < nstyles; k++) delete [] keywords[k]; delete [] keywords; + + // these strings will be concatenated from sub-style strings + // fields_data_atom must start with fields common to all styles + + fields_grow = fields_copy = fields_comm = fields_comm_vel = NULL; + fields_reverse = fields_border = fields_border_vel = NULL; + fields_exchange = fields_restart = fields_create = NULL; + fields_data_atom = (char *) "id type x"; + fields_data_vel = NULL; } /* ---------------------------------------------------------------------- @@ -81,51 +90,49 @@ void AtomVecHybrid::process_args(int narg, char **arg) for (int i = 0; i < nallstyles; i++) delete [] allstyles[i]; delete [] allstyles; - // hybrid settings are MAX or MIN of sub-style settings - // hybrid sizes are minimal values plus extra values for each sub-style + // concatenate field strings from all sub-styles - molecular = 0; - comm_x_only = comm_f_only = 1; + concatenate_fields(); - size_forward = 3; - size_reverse = 3; - size_border = 6; - size_data_atom = 5; - size_data_vel = 4; - xcol_data = 3; - maxexchange = 0; + // parent AtomVec will now operate on concatenated fields + setup_fields(); +} + +/* ---------------------------------------------------------------------- */ + +void AtomVecHybrid::concatenate_fields() +{ for (int k = 0; k < nstyles; k++) { - if ((styles[k]->molecular == 1 && molecular == 2) || - (styles[k]->molecular == 2 && molecular == 1)) - error->all(FLERR,"Cannot mix molecular and molecule template " - "atom styles"); - molecular = MAX(molecular,styles[k]->molecular); - - bonds_allow = MAX(bonds_allow,styles[k]->bonds_allow); - angles_allow = MAX(angles_allow,styles[k]->angles_allow); - dihedrals_allow = MAX(dihedrals_allow,styles[k]->dihedrals_allow); - impropers_allow = MAX(impropers_allow,styles[k]->impropers_allow); - mass_type = MAX(mass_type,styles[k]->mass_type); - dipole_type = MAX(dipole_type,styles[k]->dipole_type); - forceclearflag = MAX(forceclearflag,styles[k]->forceclearflag); - - if (styles[k]->molecular == 2) onemols = styles[k]->onemols; - - comm_x_only = MIN(comm_x_only,styles[k]->comm_x_only); - comm_f_only = MIN(comm_f_only,styles[k]->comm_f_only); - size_forward += styles[k]->size_forward - 3; - size_reverse += styles[k]->size_reverse - 3; - size_border += styles[k]->size_border - 6; - size_data_atom += styles[k]->size_data_atom - 5; - size_data_vel += styles[k]->size_data_vel - 4; - - maxexchange += styles[k]->maxexchange; + concatenate(fields_grow,styles[k]->fields_grow); + concatenate(fields_copy,styles[k]->fields_copy); + concatenate(fields_comm,styles[k]->fields_comm); + concatenate(fields_comm_vel,styles[k]->fields_comm_vel); + concatenate(fields_reverse,styles[k]->fields_reverse); + concatenate(fields_border,styles[k]->fields_border); + concatenate(fields_border_vel,styles[k]->fields_border_vel); + concatenate(fields_exchange,styles[k]->fields_exchange); + concatenate(fields_restart,styles[k]->fields_restart); + concatenate(fields_create,styles[k]->fields_create); + concatenate(fields_data_atom,styles[k]->fields_data_atom); + concatenate(fields_data_vel,styles[k]->fields_data_vel); } +} - size_velocity = 3; - if (atom->omega_flag) size_velocity += 3; - if (atom->angmom_flag) size_velocity += 3; +/* ---------------------------------------------------------------------- */ + +void AtomVecHybrid::concatenate(char *&root, char *add) +{ + /* + char **rootwords,**addwords; + int nroot = parse(root,rootwords); + int nadd = parse(add,addwords); + + for (int iadd = 0; iadd < nadd; iadd++) { + if (check(addwords[iadd],nroot,rootwords)) continue; + addone(addwords[iadd],nroot,rootwords); + } + */ } /* ---------------------------------------------------------------------- */ @@ -136,76 +143,6 @@ void AtomVecHybrid::init() for (int k = 0; k < nstyles; k++) styles[k]->init(); } -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecHybrid::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - // sub-styles perform all reallocation - // turn off nextra_grow so hybrid can do that once below - - int tmp = atom->nextra_grow; - atom->nextra_grow = 0; - for (int k = 0; k < nstyles; k++) styles[k]->grow(nmax); - atom->nextra_grow = tmp; - - // insure hybrid local ptrs and sub-style ptrs are up to date - // for sub-styles, do this in case - // multiple sub-style reallocs of same array occurred - - grow_reset(); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecHybrid::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - omega = atom->omega; angmom = atom->angmom; - - for (int k = 0; k < nstyles; k++) styles[k]->grow_reset(); -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J for all sub-styles -------------------------------------------------------------------------- */ - -void AtomVecHybrid::copy(int i, int j, int delflag) -{ - int tmp = atom->nextra_grow; - atom->nextra_grow = 0; - for (int k = 0; k < nstyles; k++) styles[k]->copy(i,j,delflag); - atom->nextra_grow = tmp; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecHybrid::clear_bonus() -{ - for (int k = 0; k < nstyles; k++) styles[k]->clear_bonus(); -} - /* ---------------------------------------------------------------------- */ void AtomVecHybrid::force_clear(int n, size_t nbytes) @@ -214,799 +151,6 @@ void AtomVecHybrid::force_clear(int n, size_t nbytes) if (styles[k]->forceclearflag) styles[k]->force_clear(n,nbytes); } -/* ---------------------------------------------------------------------- */ - -int AtomVecHybrid::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,k,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - } - } - - // pack sub-style contributions as contiguous chunks - - for (k = 0; k < nstyles; k++) - m += styles[k]->pack_comm_hybrid(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecHybrid::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,k,m; - double dx,dy,dz,dvx,dvy,dvz; - int omega_flag = atom->omega_flag; - int angmom_flag = atom->angmom_flag; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - if (omega_flag) { - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - if (angmom_flag) { - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - if (omega_flag) { - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - if (angmom_flag) { - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - if (omega_flag) { - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - if (angmom_flag) { - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } - } - - // pack sub-style contributions as contiguous chunks - - for (k = 0; k < nstyles; k++) - m += styles[k]->pack_comm_hybrid(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecHybrid::unpack_comm(int n, int first, double *buf) -{ - int i,k,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - } - - // unpack sub-style contributions as contiguous chunks - - for (k = 0; k < nstyles; k++) - m += styles[k]->unpack_comm_hybrid(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecHybrid::unpack_comm_vel(int n, int first, double *buf) -{ - int i,k,m,last; - int omega_flag = atom->omega_flag; - int angmom_flag = atom->angmom_flag; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - if (omega_flag) { - omega[i][0] = buf[m++]; - omega[i][1] = buf[m++]; - omega[i][2] = buf[m++]; - } - if (angmom_flag) { - angmom[i][0] = buf[m++]; - angmom[i][1] = buf[m++]; - angmom[i][2] = buf[m++]; - } - } - - // unpack sub-style contributions as contiguous chunks - - for (k = 0; k < nstyles; k++) - m += styles[k]->unpack_comm_hybrid(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecHybrid::pack_reverse(int n, int first, double *buf) -{ - int i,k,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - - // pack sub-style contributions as contiguous chunks - - for (k = 0; k < nstyles; k++) - m += styles[k]->pack_reverse_hybrid(n,first,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecHybrid::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,k,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } - - // unpack sub-style contributions as contiguous chunks - - for (k = 0; k < nstyles; k++) - m += styles[k]->unpack_reverse_hybrid(n,list,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecHybrid::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,k,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - } - } - - // pack sub-style contributions as contiguous chunks - - for (k = 0; k < nstyles; k++) - m += styles[k]->pack_border_hybrid(n,list,&buf[m]); - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecHybrid::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,k,m; - double dx,dy,dz,dvx,dvy,dvz; - int omega_flag = atom->omega_flag; - int angmom_flag = atom->angmom_flag; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - if (omega_flag) { - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - if (angmom_flag) { - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - if (omega_flag) { - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - if (angmom_flag) { - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - if (omega_flag) { - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - if (angmom_flag) { - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } - } - - // pack sub-style contributions as contiguous chunks - - for (k = 0; k < nstyles; k++) - m += styles[k]->pack_border_hybrid(n,list,&buf[m]); - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecHybrid::unpack_border(int n, int first, double *buf) -{ - int i,k,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - } - - // unpack sub-style contributions as contiguous chunks - - for (k = 0; k < nstyles; k++) - m += styles[k]->unpack_border_hybrid(n,first,&buf[m]); - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecHybrid::unpack_border_vel(int n, int first, double *buf) -{ - int i,k,m,last; - int omega_flag = atom->omega_flag; - int angmom_flag = atom->angmom_flag; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - if (omega_flag) { - omega[i][0] = buf[m++]; - omega[i][1] = buf[m++]; - omega[i][2] = buf[m++]; - } - if (angmom_flag) { - angmom[i][0] = buf[m++]; - angmom[i][1] = buf[m++]; - angmom[i][2] = buf[m++]; - } - } - - // unpack sub-style contributions as contiguous chunks - - for (k = 0; k < nstyles; k++) - m += styles[k]->unpack_border_hybrid(n,first,&buf[m]); - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - pack each sub-style one after the other -------------------------------------------------------------------------- */ - -int AtomVecHybrid::pack_exchange(int i, double *buf) -{ - int k,m; - - int tmp = atom->nextra_grow; - atom->nextra_grow = 0; - - m = 0; - for (k = 0; k < nstyles; k++) - m += styles[k]->pack_exchange(i,&buf[m]); - - atom->nextra_grow = tmp; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for single atom received from another proc - unpack each sub-style one after the other - grow() occurs here so arrays for all sub-styles are grown -------------------------------------------------------------------------- */ - -int AtomVecHybrid::unpack_exchange(double *buf) -{ - int k,m; - - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int tmp = atom->nextra_grow; - atom->nextra_grow = 0; - - m = 0; - for (k = 0; k < nstyles; k++) { - m += styles[k]->unpack_exchange(&buf[m]); - atom->nlocal--; - } - - atom->nextra_grow = tmp; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecHybrid::size_restart() -{ - int tmp = atom->nextra_restart; - atom->nextra_restart = 0; - - int n = 0; - for (int k = 0; k < nstyles; k++) - n += styles[k]->size_restart(); - - atom->nextra_restart = tmp; - - int nlocal = atom->nlocal; - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (int i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - pack each sub-style one after the other -------------------------------------------------------------------------- */ - -int AtomVecHybrid::pack_restart(int i, double *buf) -{ - int tmp = atom->nextra_restart; - atom->nextra_restart = 0; - - int m = 0; - for (int k = 0; k < nstyles; k++) - m += styles[k]->pack_restart(i,&buf[m]); - - atom->nextra_restart = tmp; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities - unpack each sub-style one after the other - grow() occurs here so arrays for all sub-styles are grown -------------------------------------------------------------------------- */ - -int AtomVecHybrid::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int tmp = atom->nextra_store; - atom->nextra_store = 0; - - int m = 0; - for (int k = 0; k < nstyles; k++) { - m += styles[k]->unpack_restart(&buf[m]); - atom->nlocal--; - } - atom->nextra_store = tmp; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - create each sub-style one after the other - grow() occurs here so arrays for all sub-styles are grown -------------------------------------------------------------------------- */ - -void AtomVecHybrid::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - for (int k = 0; k < nstyles; k++) { - styles[k]->create_atom(itype,coord); - atom->nlocal--; - } - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - grow() occurs here so arrays for all sub-styles are grown -------------------------------------------------------------------------- */ - -void AtomVecHybrid::data_atom(double *coord, imageint imagetmp, char **values) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - mask[nlocal] = 1; - - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - if (atom->omega_flag) { - omega[nlocal][0] = 0.0; - omega[nlocal][1] = 0.0; - omega[nlocal][2] = 0.0; - } - if (atom->angmom_flag) { - angmom[nlocal][0] = 0.0; - angmom[nlocal][1] = 0.0; - angmom[nlocal][2] = 0.0; - } - - // each sub-style parses sub-style specific values - - int m = 5; - for (int k = 0; k < nstyles; k++) - m += styles[k]->data_atom_hybrid(nlocal,&values[m]); - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Velocities section of data file -------------------------------------------------------------------------- */ - -void AtomVecHybrid::data_vel(int m, char **values) -{ - v[m][0] = utils::numeric(FLERR,values[0],true,lmp); - v[m][1] = utils::numeric(FLERR,values[1],true,lmp); - v[m][2] = utils::numeric(FLERR,values[2],true,lmp); - - // each sub-style parses sub-style specific values - - int n = 3; - for (int k = 0; k < nstyles; k++) - n += styles[k]->data_vel_hybrid(m,&values[n]); -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecHybrid::pack_data(double **buf) -{ - int k,m; - - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = x[i][0]; - buf[i][3] = x[i][1]; - buf[i][4] = x[i][2]; - - m = 5; - for (k = 0; k < nstyles; k++) - m += styles[k]->pack_data_hybrid(i,&buf[i][m]); - - buf[i][m] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][m+1] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][m+2] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecHybrid::write_data(FILE *fp, int n, double **buf) -{ - int k,m; - - for (int i = 0; i < n; i++) { - fprintf(fp,TAGINT_FORMAT " %d %-1.16e %-1.16e %-1.16e", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4]); - - m = 5; - for (k = 0; k < nstyles; k++) - m += styles[k]->write_data_hybrid(fp,&buf[i][m]); - - fprintf(fp," %d %d %d\n", - (int) ubuf(buf[i][m]).i,(int) ubuf(buf[i][m+1]).i, - (int) ubuf(buf[i][m+2]).i); - } -} - -/* ---------------------------------------------------------------------- - pack velocity info for data file -------------------------------------------------------------------------- */ - -void AtomVecHybrid::pack_vel(double **buf) -{ - int k,m; - - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = v[i][0]; - buf[i][2] = v[i][1]; - buf[i][3] = v[i][2]; - - m = 4; - for (k = 0; k < nstyles; k++) - m += styles[k]->pack_vel_hybrid(i,&buf[i][m]); - } -} - -/* ---------------------------------------------------------------------- - write velocity info to data file -------------------------------------------------------------------------- */ - -void AtomVecHybrid::write_vel(FILE *fp, int n, double **buf) -{ - int k,m; - - for (int i = 0; i < n; i++) { - fprintf(fp,TAGINT_FORMAT " %g %g %g", - (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3]); - - m = 4; - for (k = 0; k < nstyles; k++) - m += styles[k]->write_vel_hybrid(fp,&buf[i][m]); - - fprintf(fp,"\n"); - } -} - /* ---------------------------------------------------------------------- assign an index to named atom property and return index returned value encodes which sub-style and index returned by sub-style @@ -1073,14 +217,3 @@ int AtomVecHybrid::known_style(char *str) if (strcmp(str,allstyles[i]) == 0) return 1; return 0; } - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecHybrid::memory_usage() -{ - bigint bytes = 0; - for (int k = 0; k < nstyles; k++) bytes += styles[k]->memory_usage(); - return bytes; -} diff --git a/src/atom_vec_hybrid.h b/src/atom_vec_hybrid.h index 8129baccba..41067d44f2 100644 --- a/src/atom_vec_hybrid.h +++ b/src/atom_vec_hybrid.h @@ -34,48 +34,16 @@ class AtomVecHybrid : public AtomVec { ~AtomVecHybrid(); void process_args(int, char **); void init(); - void grow(int); - void grow_reset(); - void copy(int, int, int); - void clear_bonus(); void force_clear(int, size_t); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **) {return 0;} - void data_vel(int, char **); - void pack_data(double **); - void write_data(FILE *, int, double **); - void pack_vel(double **); - void write_vel(FILE *, int, double **); int property_atom(char *); void pack_property_atom(int, double *, int, int); - bigint memory_usage(); private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double **omega,**angmom; - int nallstyles; char **allstyles; + void concatenate_fields(); + void concatenate(char *&, char *); void build_styles(); int known_style(char *); }; diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index 7a14ea26e6..b44aa69035 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -19,6 +19,7 @@ #include "fix_adapt.h" #include "math_const.h" #include "error.h" +#include "utils.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -54,58 +55,61 @@ AtomVecSphere::AtomVecSphere(LAMMPS *lmp) : AtomVec(lmp) setup_fields(); } +/* ---------------------------------------------------------------------- + process sub-style args + optional arg = 0/1 for static/dynamic particle radii +------------------------------------------------------------------------- */ + +void AtomVecSphere::process_args(int narg, char **arg) +{ + if (narg == 0) return; + if (narg != 1) error->all(FLERR,"Illegal atom_style sphere command"); + + radvary = utils::numeric(FLERR,arg[0],true,lmp); + if (radvary < 0 || radvary > 1) + error->all(FLERR,"Illegal atom_style sphere command"); + if (radvary == 0) return; + + // dynamic particle radius and mass must be communicated every step + + fields_comm = (char *) "radius rmass"; + fields_comm_vel = (char *) "radius rmass omega"; +} + /* ---------------------------------------------------------------------- */ void AtomVecSphere::init() { AtomVec::init(); - // set radvary if particle diameters are time-varying due to fix adapt - // NOTE: change this to a atom_style sphere optional arg - - radvary = 0; - //comm_x_only = 1; - //size_forward = 3; + // check if optional radvary setting should have been set to 1 for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"adapt") == 0) { FixAdapt *fix = (FixAdapt *) modify->fix[i]; - if (fix->diamflag) { - radvary = 1; - comm_x_only = 0; - size_forward = 5; - } + if (fix->diamflag && radvary == 0) + error->all(FLERR,"Fix adapt changes particle radii " + "but atom_style sphere is not dynamic"); } - - //fields_comm = (char *) "radius rmass"; - //fields_comm_vel = (char *) "radius rmass"; } /* ---------------------------------------------------------------------- - create one atom of itype at coord - modify what default AtomVec::create_atom() just created + initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecSphere::create_atom(int itype, double *coord) +void AtomVecSphere::create_atom_post(int ilocal) { - AtomVec::create_atom(itype,coord); - int ilocal = atom->nlocal-1; - atom->radius[ilocal] = 0.5; atom->rmass[ilocal] = 4.0*MY_PI/3.0 * 0.5*0.5*0.5; } /* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - modify what default AtomVec::data_atom() just unpacked + modify what AtomVec::data_atom() just unpacked or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecSphere::data_atom(double *coord, imageint imagetmp, char **values) +void AtomVecSphere::data_atom_post(int ilocal) { - AtomVec::data_atom(coord,imagetmp,values); - int ilocal = atom->nlocal-1; - double radius = 0.5 * atom->radius[ilocal]; atom->radius[ilocal] = radius; if (radius > 0.0) @@ -115,3 +119,27 @@ void AtomVecSphere::data_atom(double *coord, imageint imagetmp, char **values) if (atom->rmass[ilocal] <= 0.0) error->one(FLERR,"Invalid mass in Atoms section of data file"); } + +/* ---------------------------------------------------------------------- + modify values for AtomVec::pack_data() to pack +------------------------------------------------------------------------- */ + +void AtomVecSphere::pack_data_pre(int ilocal) +{ + radius = atom->radius[ilocal]; + rmass = atom->rmass[ilocal]; + + atom->radius[ilocal] *= 2.0; + if (radius == 0.0) + atom->rmass[ilocal] = rmass / (4.0*MY_PI/3.0 * radius*radius*radius); +} + +/* ---------------------------------------------------------------------- + unmodify values packed by AtomVec::pack_data() +------------------------------------------------------------------------- */ + +void AtomVecSphere::pack_data_post(int ilocal) +{ + atom->radius[ilocal] = radius; + atom->rmass[ilocal] = rmass; +} diff --git a/src/atom_vec_sphere.h b/src/atom_vec_sphere.h index 98762dba49..c205ba43de 100644 --- a/src/atom_vec_sphere.h +++ b/src/atom_vec_sphere.h @@ -27,12 +27,16 @@ namespace LAMMPS_NS { class AtomVecSphere : public AtomVec { public: AtomVecSphere(class LAMMPS *); + void process_args(int, char **); void init(); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); + void create_atom_post(int); + void data_atom_post(int); + void pack_data_pre(int); + void pack_data_post(int); private: int radvary; + double radius,rmass; }; } diff --git a/src/special.cpp b/src/special.cpp index 3dd817bc7f..f859f4ff53 100644 --- a/src/special.cpp +++ b/src/special.cpp @@ -715,7 +715,6 @@ void Special::combine() memory->create(atom->special,atom->nmax,atom->maxspecial,"atom:special"); } - atom->avec->grow_reset(); tagint **special = atom->special; // ---------------------------------------------------- From 4f6cb135920c7788b8501b96155678430740172e Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 27 Nov 2019 16:03:50 -0700 Subject: [PATCH 008/577] added atom styles with bonus data, also a few USER packages --- src/MOLECULE/atom_vec_template.cpp | 2 +- src/PERI/atom_vec_peri.cpp | 14 +- src/PERI/atom_vec_peri.h | 2 +- src/USER-DPD/atom_vec_dpd.cpp | 929 +---------------- src/USER-DPD/atom_vec_dpd.h | 51 +- src/USER-EFF/atom_vec_electron.cpp | 954 +---------------- src/USER-EFF/atom_vec_electron.h | 49 +- src/USER-MESO/atom_vec_edpd.cpp | 819 +-------------- src/USER-MESO/atom_vec_edpd.h | 34 +- src/atom.cpp | 30 +- src/atom.h | 15 +- src/atom_vec.cpp | 50 +- src/atom_vec.h | 41 +- src/atom_vec_body.cpp | 1185 +++------------------ src/atom_vec_body.h | 72 +- src/atom_vec_ellipsoid.cpp | 1228 ++++------------------ src/atom_vec_ellipsoid.h | 69 +- src/atom_vec_line.cpp | 1173 ++++----------------- src/atom_vec_line.h | 70 +- src/atom_vec_sphere.cpp | 4 +- src/atom_vec_tri.cpp | 1537 +++++----------------------- src/atom_vec_tri.h | 70 +- src/read_data.cpp | 6 +- src/read_data.h | 2 +- 24 files changed, 1022 insertions(+), 7384 deletions(-) diff --git a/src/MOLECULE/atom_vec_template.cpp b/src/MOLECULE/atom_vec_template.cpp index d22e9abfb3..f8f99ae8a8 100644 --- a/src/MOLECULE/atom_vec_template.cpp +++ b/src/MOLECULE/atom_vec_template.cpp @@ -97,7 +97,7 @@ void AtomVecTemplate::process_args(int narg, char **arg) } /* ---------------------------------------------------------------------- - initialize other atom quantities + initialize non-zero atom quantities ------------------------------------------------------------------------- */ void AtomVecTemplate::create_atom_post(int ilocal) diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index 5450b23293..4fcebc2f84 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -70,21 +70,17 @@ AtomVecPeri::AtomVecPeri(LAMMPS *lmp) : AtomVec(lmp) } /* ---------------------------------------------------------------------- - create one atom of itype at coord - modify what default AtomVec::create_atom() just created + initialize non-zero atom quantities ------------------------------------------------------------------------- */ -void AtomVecPeri::create_atom(int itype, double *coord) +void AtomVecPeri::create_atom_post(int ilocal) { - AtomVec::create_atom(itype,coord); - int ilocal = atom->nlocal-1; - atom->vfrac[ilocal] = 1.0; atom->rmass[ilocal] = 1.0; atom->s0[ilocal] = DBL_MAX; - atom->x0[ilocal][0] = coord[0]; - atom->x0[ilocal][1] = coord[1]; - atom->x0[ilocal][2] = coord[2]; + atom->x0[ilocal][0] = atom->x[ilocal][0]; + atom->x0[ilocal][1] = atom->x[ilocal][1]; + atom->x0[ilocal][2] = atom->x[ilocal][2]; } /* ---------------------------------------------------------------------- diff --git a/src/PERI/atom_vec_peri.h b/src/PERI/atom_vec_peri.h index 3b41950a6f..13a62eb194 100644 --- a/src/PERI/atom_vec_peri.h +++ b/src/PERI/atom_vec_peri.h @@ -27,7 +27,7 @@ namespace LAMMPS_NS { class AtomVecPeri : public AtomVec { public: AtomVecPeri(class LAMMPS *); - void create_atom(int, double *); + void create_atom_post(int); void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); diff --git a/src/USER-DPD/atom_vec_dpd.cpp b/src/USER-DPD/atom_vec_dpd.cpp index d1768d473e..27e0f70a20 100644 --- a/src/USER-DPD/atom_vec_dpd.cpp +++ b/src/USER-DPD/atom_vec_dpd.cpp @@ -17,13 +17,7 @@ #include "atom_vec_dpd.h" #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" -#include "memory.h" #include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -34,904 +28,55 @@ AtomVecDPD::AtomVecDPD(LAMMPS *lmp) : AtomVec(lmp) molecular = 0; mass_type = 1; - comm_x_only = comm_f_only = 0; // we communicate not only x forward but also dpdTheta - size_forward = 7; // 3 + dpdTheta + uCond + uMech + uChem - size_reverse = 3; // 3 - size_border = 12; // 6 + dpdTheta + uCond + uMech + uChem + uCG + uCGnew - size_velocity = 3; - size_data_atom = 6; // we read id + type + dpdTheta + x + y + z - size_data_vel = 4; - xcol_data = 4; // 1=id 2=type 3=dpdTheta 4=x - atom->rho_flag = 1; atom->dpd_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "rho dpdTheta uCond uMech uChem uCG uCGnew duChem"; + fields_copy = (char *) "dpdTheta uCond uMech uChem uCG uCGnew"; + fields_comm = (char *) "dpdTheta uCond uMech uChem"; + fields_comm_vel = (char *) "dpdTheta uCond uMech uChem"; + fields_reverse = NULL; + fields_border = (char *) "dpdTheta uCond uMech uChem uCG uCGnew"; + fields_border_vel = (char *) "dpdTheta uCond uMech uChem uCG uCGnew"; + fields_exchange = (char *) "dpdTheta uCond uMech uChem uCG uCGnew"; + fields_restart = (char *) "dpdTheta uCond uMech uChem"; + fields_create = (char *) "rho dpdTheta uCond uMech uChem uCG uCGnew duChem"; + fields_data_atom = (char *) "id type dpdTheta x"; + fields_data_vel = (char *) "omega"; + + setup_fields(); } /* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n + initialize other atom quantities after AtomVec::unpack_restart() ------------------------------------------------------------------------- */ -void AtomVecDPD::grow(int n) +void AtomVecDPD::unpack_restart_init(int ilocal) { - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - rho = memory->grow(atom->rho, nmax, "atom:rho"); - dpdTheta = memory->grow(atom->dpdTheta, nmax, "atom:dpdTheta"); - uCond = memory->grow(atom->uCond,nmax,"atom:uCond"); - uMech = memory->grow(atom->uMech,nmax,"atom:uMech"); - uChem = memory->grow(atom->uChem,nmax,"atom:uChem"); - uCG = memory->grow(atom->uCG,nmax,"atom:uCG"); - uCGnew = memory->grow(atom->uCGnew,nmax,"atom:uCGnew"); - duChem = memory->grow(atom->duChem,nmax,"atom:duChem"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); + atom->uCG[ilocal] = 0.0; + atom->uCGnew[ilocal] = 0.0; } /* ---------------------------------------------------------------------- - reset local array ptrs + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecDPD::grow_reset() +void AtomVecDPD::data_atom_post(int ilocal) { - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - rho = atom->rho; - dpdTheta = atom->dpdTheta; - uCond = atom->uCond; - uMech = atom->uMech; - uChem = atom->uChem; - uCG = atom->uCG; - uCGnew = atom->uCGnew; - duChem = atom->duChem; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecDPD::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - dpdTheta[j] = dpdTheta[i]; - uCond[j] = uCond[i]; - uMech[j] = uMech[i]; - uChem[j] = uChem[i]; - uCG[j] = uCG[i]; - uCGnew[j] = uCGnew[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDPD::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDPD::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecDPD::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - dpdTheta[i] = buf[m++]; - uCond[i] = buf[m++]; - uMech[i] = buf[m++]; - uChem[i] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecDPD::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - dpdTheta[i] = buf[m++]; - uCond[i] = buf[m++]; - uMech[i] = buf[m++]; - uChem[i] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDPD::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecDPD::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDPD::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - buf[m++] = uCG[j]; - buf[m++] = uCGnew[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - buf[m++] = uCG[j]; - buf[m++] = uCGnew[j]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDPD::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - buf[m++] = uCG[j]; - buf[m++] = uCGnew[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - buf[m++] = uCG[j]; - buf[m++] = uCGnew[j]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - buf[m++] = uCG[j]; - buf[m++] = uCGnew[j]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDPD::pack_comm_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDPD::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = dpdTheta[j]; - buf[m++] = uCond[j]; - buf[m++] = uMech[j]; - buf[m++] = uChem[j]; - buf[m++] = uCG[j]; - buf[m++] = uCGnew[j]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecDPD::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - dpdTheta[i] = buf[m++]; - uCond[i] = buf[m++]; - uMech[i] = buf[m++]; - uChem[i] = buf[m++]; - uCG[i] = buf[m++]; - uCGnew[i] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecDPD::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - dpdTheta[i] = buf[m++]; - uCond[i] = buf[m++]; - uMech[i] = buf[m++]; - uChem[i] = buf[m++]; - uCG[i] = buf[m++]; - uCGnew[i] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDPD::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - dpdTheta[i] = buf[m++]; - uCond[i] = buf[m++]; - uMech[i] = buf[m++]; - uChem[i] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDPD::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - dpdTheta[i] = buf[m++]; - uCond[i] = buf[m++]; - uMech[i] = buf[m++]; - uChem[i] = buf[m++]; - uCG[i] = buf[m++]; - uCGnew[i] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them -------------------------------------------------------------------------- */ - -int AtomVecDPD::pack_exchange(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = dpdTheta[i]; - buf[m++] = uCond[i]; - buf[m++] = uMech[i]; - buf[m++] = uChem[i]; - buf[m++] = uCG[i]; - buf[m++] = uCGnew[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecDPD::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - dpdTheta[nlocal] = buf[m++]; - uCond[nlocal] = buf[m++]; - uMech[nlocal] = buf[m++]; - uChem[nlocal] = buf[m++]; - uCG[nlocal] = buf[m++]; - uCGnew[nlocal] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecDPD::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = 15 * nlocal; // 11 + dpdTheta + uCond + uMech + uChem - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecDPD::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = dpdTheta[i]; - buf[m++] = uCond[i]; - buf[m++] = uMech[i]; - buf[m++] = uChem[i]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecDPD::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - dpdTheta[nlocal] = buf[m++]; - uCond[nlocal] = buf[m++]; - uMech[nlocal] = buf[m++]; - uChem[nlocal] = buf[m++]; - uCG[nlocal] = 0.0; - uCGnew[nlocal] = 0.0; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecDPD::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - rho[nlocal] = 0.0; - dpdTheta[nlocal] = 0.0; - uCond[nlocal] = 0.0; - uMech[nlocal] = 0.0; - uChem[nlocal] = 0.0; - uCG[nlocal] = 0.0; - uCGnew[nlocal] = 0.0; - duChem[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecDPD::data_atom(double *coord, tagint imagetmp, char **values) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - dpdTheta[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - if (dpdTheta[nlocal] <= 0) - error->one(FLERR,"Internal temperature in Atoms section of date file must be > zero"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - rho[nlocal] = 0.0; - uCond[nlocal] = 0.0; - uMech[nlocal] = 0.0; - uChem[nlocal] = 0.0; - uCG[nlocal] = 0.0; - uCGnew[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecDPD::data_atom_hybrid(int nlocal, char **values) -{ - dpdTheta[nlocal] = utils::numeric(FLERR,values[0],true,lmp); - - return 1; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecDPD::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = dpdTheta[i]; - buf[i][3] = x[i][0]; - buf[i][4] = x[i][1]; - buf[i][5] = x[i][2]; - buf[i][6] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][7] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecDPD::pack_data_hybrid(int i, double *buf) -{ - buf[0] = dpdTheta[i]; - return 1; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecDPD::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " %d %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4],buf[i][5], - (int) ubuf(buf[i][6]).i,(int) ubuf(buf[i][7]).i, - (int) ubuf(buf[i][8]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecDPD::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e",buf[0]); - return 1; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecDPD::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - if (atom->memcheck("rho")) bytes += memory->usage(rho,nmax); - if (atom->memcheck("dpdTheta")) bytes += memory->usage(dpdTheta,nmax); - if (atom->memcheck("uCond")) bytes += memory->usage(uCond,nmax); - if (atom->memcheck("uMech")) bytes += memory->usage(uMech,nmax); - if (atom->memcheck("uChem")) bytes += memory->usage(uChem,nmax); - if (atom->memcheck("uCG")) bytes += memory->usage(uCG,nmax); - if (atom->memcheck("uCGnew")) bytes += memory->usage(uCGnew,nmax); - if (atom->memcheck("duChem")) bytes += memory->usage(duChem,nmax); - - return bytes; + atom->rho[ilocal] = 0.0; + atom->uCond[ilocal] = 0.0; + atom->uMech[ilocal] = 0.0; + atom->uChem[ilocal] = 0.0; + atom->uCG[ilocal] = 0.0; + atom->uCGnew[ilocal] = 0.0; + + if (atom->dpdTheta[ilocal] <= 0) + error->one(FLERR,"Internal temperature in Atoms section of date file " + "must be > zero"); } diff --git a/src/USER-DPD/atom_vec_dpd.h b/src/USER-DPD/atom_vec_dpd.h index 234d2ccce7..20c8a9a2d2 100644 --- a/src/USER-DPD/atom_vec_dpd.h +++ b/src/USER-DPD/atom_vec_dpd.h @@ -27,46 +27,8 @@ namespace LAMMPS_NS { class AtomVecDPD : public AtomVec { public: AtomVecDPD(class LAMMPS *); - virtual ~AtomVecDPD() {} - void grow(int); - void grow_reset(); - void copy(int, int, int); - virtual int pack_comm(int, int *, double *, int, int *); - virtual int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - virtual void unpack_comm(int, int, double *); - virtual void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - virtual int pack_border(int, int *, double *, int, int *); - virtual int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - virtual void unpack_border(int, int, double *); - virtual void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - virtual int pack_exchange(int, double *); - virtual int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - bigint memory_usage(); - double *uCond,*uMech,*uChem,*uCG,*uCGnew,*rho,*dpdTheta; - double *duChem; - - protected: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - + void unpack_restart_init(int); + void data_atom_post(int); }; } @@ -76,15 +38,6 @@ class AtomVecDPD : public AtomVec { /* ERROR/WARNING messages: -E: Per-processor system is too big - -The number of owned atoms plus ghost atoms on a single -processor must fit in 32-bit integer. - -E: Invalid atom type in Atoms section of data file - -Atom types must range from 1 to specified # of types. - E: Internal temperature in Atoms section of data file must be > zero All internal temperatures must be > zero diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index 552a89c04a..fc73bf4dd5 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -46,929 +46,61 @@ AtomVecElectron::AtomVecElectron(LAMMPS *lmp) : AtomVec(lmp) { if (lmp->citeme) lmp->citeme->add(cite_user_eff_package); - comm_x_only = comm_f_only = 0; - - mass_type = 1; - molecular = 0; forceclearflag = 1; - size_forward = 4; - size_reverse = 4; - size_border = 9; - size_velocity = 3; - size_data_atom = 8; - size_data_vel = 5; - xcol_data = 6; - atom->ecp_flag = 0; atom->electron_flag = 1; atom->q_flag = atom->spin_flag = atom->eradius_flag = atom->ervel_flag = atom->erforce_flag = 1; -} -/* ---------------------------------------------------------------------- - grow atom-electron arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file -void AtomVecElectron::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; + fields_grow = (char *) "q spin eradius ervel erforce"; + fields_copy = (char *) "q spin eradius ervel"; + fields_comm = (char *) "eradius"; + fields_comm_vel = (char *) "eradius"; + fields_reverse = (char *) "erforce"; + fields_border = (char *) "q spin eradius"; + fields_border_vel = (char *) "q spin eradius"; + fields_exchange = (char *) "q spin eradius ervel"; + fields_restart = (char *) "q spin eradius ervel"; + fields_create = (char *) "q spin eradius ervel"; + fields_data_atom = (char *) "id type q spin eradius x"; + fields_data_vel = (char *) "ervel"; - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - q = memory->grow(atom->q,nmax,"atom:q"); - spin = memory->grow(atom->spin,nmax,"atom:spin"); - eradius = memory->grow(atom->eradius,nmax,"atom:eradius"); - ervel = memory->grow(atom->ervel,nmax,"atom:ervel"); - erforce = memory->grow(atom->erforce,nmax*comm->nthreads,"atom:erforce"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecElectron::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - q = atom->q; - eradius = atom->eradius; ervel = atom->ervel; erforce = atom->erforce; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecElectron::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - q[j] = q[i]; - spin[j] = spin[i]; - eradius[j] = eradius[i]; - ervel[j] = ervel[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); + setup_fields(); } /* ---------------------------------------------------------------------- */ -void AtomVecElectron::force_clear(int n, size_t nbytes) +void AtomVecElectron::force_clear(int /*n*/, size_t nbytes) { - memset(&erforce[n],0,nbytes); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = eradius[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = eradius[j]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = eradius[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = eradius[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = eradius[j]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::pack_comm_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = eradius[j]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecElectron::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - eradius[i] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecElectron::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - eradius[i] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) - eradius[i] = buf[m++]; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = erforce[i]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::pack_reverse_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) - buf[m++] = erforce[i]; - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecElectron::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - erforce[j] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::unpack_reverse_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - erforce[j] += buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (domain->triclinic == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecElectron::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - q[i] = buf[m++]; - spin[i] = (int) ubuf(buf[m++]).i; - eradius[i] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecElectron::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - q[i] = buf[m++]; - spin[i] = (int) ubuf(buf[m++]).i; - eradius[i] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - q[i] = buf[m++]; - spin[i] = (int) ubuf(buf[m++]).i; - eradius[i] = buf[m++]; - } - return m; + memset(&atom->erforce[0],0,nbytes); } /* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them + initialize non-zero atom quantities ------------------------------------------------------------------------- */ -int AtomVecElectron::pack_exchange(int i, double *buf) +void AtomVecElectron::create_atom_post(int ilocal) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = q[i]; - buf[m++] = ubuf(spin[i]).d; - buf[m++] = eradius[i]; - buf[m++] = ervel[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecElectron::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - q[nlocal] = buf[m++]; - spin[nlocal] = (int) ubuf(buf[m++]).i; - eradius[nlocal] = buf[m++]; - ervel[nlocal] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; + atom->spin[ilocal] = 1; + atom->eradius[ilocal] = 1.0; } /* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -int AtomVecElectron::size_restart() +void AtomVecElectron::data_atom_post(int ilocal) { - int i; - - int nlocal = atom->nlocal; - int n = 15 * nlocal; // Associated with pack_restart - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecElectron::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = q[i]; - buf[m++] = ubuf(spin[i]).d; - buf[m++] = eradius[i]; - buf[m++] = ervel[i]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecElectron::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - q[nlocal] = buf[m++]; - spin[nlocal] = (int) ubuf(buf[m++]).i; - eradius[nlocal] = buf[m++]; - ervel[nlocal] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecElectron::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - q[nlocal] = 0.0; - spin[nlocal] = 1; - eradius[nlocal] = 1.0; - ervel[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecElectron::data_atom(double *coord, imageint imagetmp, char **values) -{ - int nlocal = atom->nlocal; - - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - q[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - spin[nlocal] = utils::inumeric(FLERR,values[3],true,lmp); - if (spin[nlocal] == 3) atom->ecp_flag = 1; - - eradius[nlocal] = utils::numeric(FLERR,values[4],true,lmp); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - ervel[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecElectron::data_atom_hybrid(int nlocal, char **values) -{ - q[nlocal] = utils::numeric(FLERR,values[0],true,lmp); - spin[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - eradius[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - if (eradius[nlocal] < 0.0) - error->one(FLERR,"Invalid eradius in Atoms section of data file"); - - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - ervel[nlocal] = 0.0; - - return 3; -} - -/* ---------------------------------------------------------------------- - unpack one line from Velocities section of data file -------------------------------------------------------------------------- */ - -void AtomVecElectron::data_vel(int m, char **values) -{ - v[m][0] = utils::numeric(FLERR,values[0],true,lmp); - v[m][1] = utils::numeric(FLERR,values[1],true,lmp); - v[m][2] = utils::numeric(FLERR,values[2],true,lmp); - ervel[m] = utils::numeric(FLERR,values[3],true,lmp); -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Velocities section of data file -------------------------------------------------------------------------- */ - -int AtomVecElectron::data_vel_hybrid(int m, char **values) -{ - ervel[m] = utils::numeric(FLERR,values[0],true,lmp); - return 1; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecElectron::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = q[i]; - buf[i][3] = ubuf(spin[i]).d; - buf[i][4] = eradius[i]; - buf[i][5] = x[i][0]; - buf[i][6] = x[i][1]; - buf[i][7] = x[i][2]; - buf[i][8] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][10] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecElectron::pack_data_hybrid(int i, double *buf) -{ - buf[0] = q[i]; - buf[1] = ubuf(spin[i]).d; - buf[2] = eradius[i]; - return 3; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecElectron::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %d %-1.16e %d %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i,buf[i][2], - (int) ubuf(buf[i][3]).i,buf[i][4],buf[i][5],buf[i][6],buf[i][7], - (int) ubuf(buf[i][8]).i,(int) ubuf(buf[i][9]).i, - (int) ubuf(buf[i][10]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecElectron::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %d %-1.16e",buf[0],(int) ubuf(buf[1]).i,buf[2]); - return 3; -} - -/* ---------------------------------------------------------------------- - pack velocity info for data file -------------------------------------------------------------------------- */ - -void AtomVecElectron::pack_vel(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = v[i][0]; - buf[i][2] = v[i][1]; - buf[i][3] = v[i][2]; - buf[i][4] = ervel[i]; - } -} - -/* ---------------------------------------------------------------------- - pack velocity info for data file -------------------------------------------------------------------------- */ - -int AtomVecElectron::pack_vel_hybrid(int i, double *buf) -{ - buf[0] = ervel[i]; - return 1; -} - -/* ---------------------------------------------------------------------- - write hybrid velocity info to data file -------------------------------------------------------------------------- */ - -void AtomVecElectron::write_vel(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " %-1.16e %-1.16e %-1.16e %-1.16e\n", - (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3],buf[i][4]); -} - -/* ---------------------------------------------------------------------- - write hybrid velocity info to data file -------------------------------------------------------------------------- */ - -int AtomVecElectron::write_vel_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e",buf[0]); - return 1; + atom->ervel[ilocal] = 0.0; + if (atom->spin[ilocal] == 3) atom->ecp_flag = 1; } /* ---------------------------------------------------------------------- @@ -998,24 +130,28 @@ void AtomVecElectron::pack_property_atom(int index, double *buf, int n = 0; if (index == 0) { + int *spin = atom->spin; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = spin[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 1) { + double *eradius = atom->eradius; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = eradius[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 2) { + double *ervel = atom->ervel; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = ervel[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 3) { + double *erforce = atom->erforce; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = erforce[i]; else buf[n] = 0.0; @@ -1023,29 +159,3 @@ void AtomVecElectron::pack_property_atom(int index, double *buf, } } } - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecElectron::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("q")) bytes += memory->usage(q,nmax); - if (atom->memcheck("spin")) bytes += memory->usage(spin,nmax); - if (atom->memcheck("eradius")) bytes += memory->usage(eradius,nmax); - if (atom->memcheck("ervel")) bytes += memory->usage(ervel,nmax); - if (atom->memcheck("erforce")) - bytes += memory->usage(erforce,nmax*comm->nthreads); - - return bytes; -} diff --git a/src/USER-EFF/atom_vec_electron.h b/src/USER-EFF/atom_vec_electron.h index 6e79775c3d..fabb03438d 100644 --- a/src/USER-EFF/atom_vec_electron.h +++ b/src/USER-EFF/atom_vec_electron.h @@ -27,56 +27,11 @@ namespace LAMMPS_NS { class AtomVecElectron : public AtomVec { public: AtomVecElectron(class LAMMPS *); - ~AtomVecElectron() {} - void grow(int); - void grow_reset(); - void copy(int, int, int); void force_clear(int, size_t); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - int pack_reverse_hybrid(int, int, double *); - void unpack_reverse(int, int *, double *); - int unpack_reverse_hybrid(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void data_vel(int, char **); - int data_vel_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - void pack_vel(double **); - int pack_vel_hybrid(int, double *); - void write_vel(FILE *, int, double **); - int write_vel_hybrid(FILE *, double *); + void create_atom_post(int); + void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); - bigint memory_usage(); - - private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - int *spin; - double *q,*eradius,*ervel,*erforce; }; } diff --git a/src/USER-MESO/atom_vec_edpd.cpp b/src/USER-MESO/atom_vec_edpd.cpp index edc7a34331..59cee397b5 100644 --- a/src/USER-MESO/atom_vec_edpd.cpp +++ b/src/USER-MESO/atom_vec_edpd.cpp @@ -10,6 +10,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ + #include "atom_vec_edpd.h" #include #include "atom.h" @@ -28,817 +29,65 @@ using namespace LAMMPS_NS; AtomVecEDPD::AtomVecEDPD(LAMMPS *lmp) : AtomVec(lmp) { - if(strcmp(update->unit_style,"lj") != 0) + if (strcmp(update->unit_style,"lj") != 0) error->all(FLERR,"Atom style edpd requires lj units"); molecular = 0; mass_type = 1; forceclearflag = 1; - comm_x_only = comm_f_only = 0; - comm->ghost_velocity = 1; - - size_forward = 3 + 5; // edpd_temp + vest[4] - size_reverse = 3 + 1; // edpd_flux - size_border = 6 + 6; // edpd_temp + edpd_cv + vest[4] - size_velocity = 3; - size_data_atom = 5 + 2; // we read id + type + edpd_temp + edpd_cv + xyz[3] - size_data_vel = 4; - xcol_data = 5; - atom->edpd_flag = 1; atom->vest_flag = 1; -} -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file -void AtomVecEDPD::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); + fields_grow = (char *) "edpd_cv edpd_temp edpd_flux vest"; + fields_copy = (char *) "edpd_cv edpd_temp edpd_flux vest"; + fields_comm = (char *) "edpd_temp vest"; + fields_comm_vel = (char *) "edpd_temp vest"; + fields_reverse = (char *) "edpd_flux"; + fields_border = (char *) "edpd_cv edpd_temp vest"; + fields_border_vel = (char *) "edpd_cv edpd_temp vest"; + fields_exchange = (char *) "edpd_cv edpd_temp vest"; + fields_restart = (char * ) "edpd_cv edpd_temp vest"; + fields_create = (char *) "edpd_cv edpd_temp edpd_flux vest"; + fields_data_atom = (char *) "id type edpd_temp edpd_cv x"; + fields_data_vel = NULL; - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - edpd_cv= memory->grow(atom->edpd_cv, nmax, "atom:edpd_cv"); - edpd_temp = memory->grow(atom->edpd_temp, nmax, "atom:edpd_temp"); - edpd_flux = memory->grow(atom->edpd_flux, nmax*comm->nthreads,"atom:edpd_flux"); - vest = memory->grow(atom->vest, nmax, 4, "atom:vest"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecEDPD::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - edpd_cv = atom->cv; edpd_temp = atom->edpd_temp; edpd_flux = atom->edpd_flux; - vest = atom->vest; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecEDPD::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - edpd_temp[j] = edpd_temp[i]; - edpd_flux[j] = edpd_flux[i]; - edpd_cv[j] = edpd_cv[i]; - vest[j][0] = vest[i][0]; - vest[j][1] = vest[i][1]; - vest[j][2] = vest[i][2]; - vest[j][3] = vest[i][3]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - - -void AtomVecEDPD::force_clear(int n, size_t nbytes) -{ - memset(&edpd_flux[n],0,nbytes); -} - - -/* ---------------------------------------------------------------------- */ - -int AtomVecEDPD::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = edpd_temp[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = vest[j][3]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = edpd_temp[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = vest[j][3]; - } - } - return m; + setup_fields(); } /* ---------------------------------------------------------------------- */ -int AtomVecEDPD::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) +void AtomVecEDPD::force_clear(int /*n*/, size_t nbytes) { - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = edpd_temp[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = vest[j][3]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = edpd_temp[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = vest[j][3]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = edpd_temp[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = vest[j][3]; - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecEDPD::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - edpd_temp[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - vest[i][3] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecEDPD::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - edpd_temp[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - vest[i][3] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEDPD::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = edpd_flux[i]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecEDPD::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - edpd_flux[j] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEDPD::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = edpd_temp[j]; - buf[m++] = edpd_cv[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = vest[j][3]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = edpd_temp[j]; - buf[m++] = edpd_cv[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = vest[j][3]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEDPD::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = edpd_temp[j]; - buf[m++] = edpd_cv[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = vest[j][3]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = edpd_temp[j]; - buf[m++] = edpd_cv[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = vest[j][3]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = edpd_temp[j]; - buf[m++] = edpd_cv[j]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - buf[m++] = vest[j][0] + dvx; - buf[m++] = vest[j][1] + dvy; - buf[m++] = vest[j][2] + dvz; - buf[m++] = vest[j][3]; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = vest[j][3]; - } - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecEDPD::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - edpd_temp[i] = buf[m++]; - edpd_cv[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - vest[i][3] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecEDPD::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - edpd_temp[i] = buf[m++]; - edpd_cv[i] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - vest[i][3] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); + memset(&atom->edpd_flux[0],0,nbytes); } /* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them + initialize non-zero atom quantities ------------------------------------------------------------------------- */ -int AtomVecEDPD::pack_exchange(int i, double *buf) +void AtomVecEDPD::create_atom_post(int ilocal) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = edpd_temp[i]; - buf[m++] = edpd_cv[i]; - buf[m++] = vest[i][0]; - buf[m++] = vest[i][1]; - buf[m++] = vest[i][2]; - buf[m++] = vest[i][3]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEDPD::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - edpd_temp[nlocal] = buf[m++]; - edpd_cv[nlocal] = buf[m++]; - vest[nlocal][0] = buf[m++]; - vest[nlocal][1] = buf[m++]; - vest[nlocal][2] = buf[m++]; - vest[nlocal][3] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; + atom->edpd_temp[ilocal] = 1.0; + atom->edpd_cv[ilocal]= 1.0e5; + atom->vest[ilocal][3] = atom->edpd_temp[ilocal]; } /* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -int AtomVecEDPD::size_restart() +void AtomVecEDPD::data_atom_post(int ilocal) { - int i; - - int nlocal = atom->nlocal; - int n = (11 + 6) * nlocal; // 11 + edpd_temp + edpd_cv + vest[4] - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecEDPD::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = edpd_temp[i]; - buf[m++] = edpd_cv[i]; - buf[m++] = vest[i][0]; - buf[m++] = vest[i][1]; - buf[m++] = vest[i][2]; - buf[m++] = vest[i][3]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecEDPD::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - edpd_temp[nlocal] = buf[m++]; - edpd_cv[nlocal]= buf[m++]; - vest[nlocal][0] = buf[m++]; - vest[nlocal][1] = buf[m++]; - vest[nlocal][2] = buf[m++]; - vest[nlocal][3] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecEDPD::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - edpd_temp[nlocal] = 1.0; - edpd_flux[nlocal] = 0.0; - edpd_cv[nlocal]= 1.0E5; - vest[nlocal][0] = 0.0; - vest[nlocal][1] = 0.0; - vest[nlocal][2] = 0.0; - vest[nlocal][3] = edpd_temp[nlocal]; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecEDPD::data_atom(double *coord, imageint imagetmp, char **values) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - edpd_temp[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - edpd_cv[nlocal] = utils::numeric(FLERR,values[3],true,lmp); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - vest[nlocal][0] = 0.0; - vest[nlocal][1] = 0.0; - vest[nlocal][2] = 0.0; - vest[nlocal][3] = edpd_temp[nlocal]; - edpd_flux[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecEDPD::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = edpd_temp[i]; - buf[i][3] = edpd_cv[i]; - buf[i][4] = x[i][0]; - buf[i][5] = x[i][1]; - buf[i][6] = x[i][2]; - buf[i][7] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecEDPD::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " %d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4],buf[i][5],buf[i][6], - (int) ubuf(buf[i][7]).i,(int) ubuf(buf[i][8]).i,(int) ubuf(buf[i][9]).i); -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecEDPD::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - if (atom->memcheck("edpd_temp")) bytes += memory->usage(edpd_temp,nmax); - if (atom->memcheck("edpd_flux")) bytes += memory->usage(edpd_flux,nmax*comm->nthreads); - if (atom->memcheck("edpd_cv")) bytes += memory->usage(edpd_cv,nmax); - if (atom->memcheck("vest")) bytes += memory->usage(vest,nmax,4); - - return bytes; + atom->edpd_flux[ilocal] = 0.0; + atom->vest[ilocal][0] = 0.0; + atom->vest[ilocal][1] = 0.0; + atom->vest[ilocal][2] = 0.0; + atom->vest[ilocal][3] = atom->edpd_temp[ilocal]; } diff --git a/src/USER-MESO/atom_vec_edpd.h b/src/USER-MESO/atom_vec_edpd.h index 36a4cae97b..7d41b51665 100644 --- a/src/USER-MESO/atom_vec_edpd.h +++ b/src/USER-MESO/atom_vec_edpd.h @@ -27,39 +27,9 @@ namespace LAMMPS_NS { class AtomVecEDPD : public AtomVec { public: AtomVecEDPD(class LAMMPS *); - virtual ~AtomVecEDPD() {} - void grow(int); - void grow_reset(); - void copy(int, int, int); void force_clear(int, size_t); - virtual int pack_comm(int, int *, double *, int, int *); - virtual int pack_comm_vel(int, int *, double *, int, int *); - virtual void unpack_comm(int, int, double *); - virtual void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - virtual int pack_border(int, int *, double *, int, int *); - virtual int pack_border_vel(int, int *, double *, int, int *); - virtual void unpack_border(int, int, double *); - virtual void unpack_border_vel(int, int, double *); - virtual int pack_exchange(int, double *); - virtual int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - void pack_data(double **); - void write_data(FILE *, int, double **); - bigint memory_usage(); - - protected: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double **vest; // store intermediate velocity for using mvv integrator - double *edpd_temp,*edpd_flux,*edpd_cv; // temperature, heat flux, and heat capacity + void create_atom_post(int); + void data_atom_post(int); }; } diff --git a/src/atom.cpp b/src/atom.cpp index e1736e321c..d238db5e65 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -459,8 +459,8 @@ void Atom::peratom_create() add_peratom("radius",&radius,DOUBLE,0); add_peratom("omega",&omega,DOUBLE,3); - add_peratom("amgmom",&angmom,DOUBLE,3); add_peratom("torque",&torque,DOUBLE,3,1); // set per-thread flag + add_peratom("angmom",&angmom,DOUBLE,3); add_peratom("ellipsoid",&ellipsoid,INT,0); add_peratom("line",&line,INT,0); @@ -524,6 +524,31 @@ void Atom::peratom_create() add_peratom("sp",&sp,DOUBLE,4); add_peratom("fm",&fm,DOUBLE,3,1); add_peratom("fm_long",&fm_long,DOUBLE,3,1); + + // USER-EFF package + + add_peratom("spin",&spin,INT,0); + add_peratom("eradius",&eradius,DOUBLE,0); + add_peratom("ervel",&ervel,DOUBLE,0); + add_peratom("erforce",&erforce,DOUBLE,0,1); // set per-thread flag + + // USER-DPD package + + add_peratom("rho",&eradius,DOUBLE,0); + add_peratom("dpdTheta",&dpdTheta,DOUBLE,0); + add_peratom("uCond",&uCond,DOUBLE,0); + add_peratom("uMech",&uMech,DOUBLE,0); + add_peratom("uChem",&uChem,DOUBLE,0); + add_peratom("uCG",&uCG,DOUBLE,0); + add_peratom("uCGnew",&uCGnew,DOUBLE,0); + add_peratom("duChem",&duChem,DOUBLE,0); + + // USER-MESO package + + add_peratom("edpd_cv",&edpd_cv,DOUBLE,0); + add_peratom("edpd_temp",&edpd_temp,DOUBLE,0); + add_peratom("edpd_flux",&edpd_flux,DOUBLE,0,1); // set per-thread flag + add_peratom("vest",&vest,DOUBLE,4); } /* ---------------------------------------------------------------------- @@ -1605,8 +1630,7 @@ void Atom::data_bonus(int n, char *buf, AtomVec *avec_bonus, tagint id_offset) call style-specific routine to parse line ------------------------------------------------------------------------- */ -void Atom::data_bodies(int n, char *buf, AtomVecBody *avec_body, - tagint id_offset) +void Atom::data_bodies(int n, char *buf, AtomVec *avec_body, tagint id_offset) { int j,m,nvalues,tagdata,ninteger,ndouble; diff --git a/src/atom.h b/src/atom.h index 6cc5dff72a..a105b3e5b1 100644 --- a/src/atom.h +++ b/src/atom.h @@ -121,7 +121,7 @@ class Atom : protected Pointers { // USER-MESO package - double **cc, **cc_flux; // cc = chemical concentration + double **cc,**cc_flux; // cc = chemical concentration double *edpd_temp,*edpd_flux; // temperature and heat flux double *edpd_cv; // heat capacity int cc_species; @@ -141,13 +141,12 @@ class Atom : protected Pointers { double **vest; // -------------------------------------------------------------------- - // 1st customization section: customize by adding new flag - // existence flags for per-atom vectors and arrays + // 1st customization section: customize by adding new flags + // most are existence flags for per-atom vectors and arrays // 1 if variable is used, 0 if not int sphere_flag,ellipsoid_flag,line_flag,tri_flag,body_flag; int peri_flag,electron_flag; - int ecp_flag; int wavepacket_flag,sph_flag; int molecule_flag,molindex_flag,molatom_flag; @@ -158,10 +157,14 @@ class Atom : protected Pointers { int rho_flag,e_flag,cv_flag,vest_flag; int dpd_flag,edpd_flag,tdpd_flag; - // USER-SPIN package + // SPIN package int sp_flag; + // USER-EFF package + + int ecp_flag; + // USER-SMD package int smd_flag; @@ -286,7 +289,7 @@ class Atom : protected Pointers { void data_dihedrals(int, char *, int *, tagint, int); void data_impropers(int, char *, int *, tagint, int); void data_bonus(int, char *, class AtomVec *, tagint); - void data_bodies(int, char *, class AtomVecBody *, tagint); + void data_bodies(int, char *, class AtomVec *, tagint); void data_fix_compute_variable(int, int); virtual void allocate_type_arrays(); diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index 776d7a4619..ed56151d33 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -38,11 +38,13 @@ enum{DOUBLE,INT,BIGINT}; AtomVec::AtomVec(LAMMPS *lmp) : Pointers(lmp) { nmax = 0; + + molecular = 0; bonds_allow = angles_allow = dihedrals_allow = impropers_allow = 0; mass_type = dipole_type = 0; forceclearflag = 0; - size_data_bonus = 0; maxexchange = 0; + bonus_flag = 0; kokkosable = 0; @@ -309,6 +311,8 @@ void AtomVec::copy(int i, int j, int delflag) } } + if (bonus_flag) copy_bonus(i,j,delflag); + if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); @@ -349,7 +353,7 @@ int AtomVec::pack_comm(int n, int *list, double *buf, } } - if (comm) { + if (ncomm) { for (nn = 0; nn < ncomm; nn++) { pdata = mcomm.pdata[nn]; datatype = mcomm.datatype[nn]; @@ -403,6 +407,8 @@ int AtomVec::pack_comm(int n, int *list, double *buf, } } + if (bonus_flag) m += pack_comm_bonus(n,list,&buf[m]); + return m; } @@ -522,6 +528,8 @@ int AtomVec::pack_comm_vel(int n, int *list, double *buf, } } + if (bonus_flag) m += pack_comm_bonus(n,list,&buf[m]); + return m; } @@ -581,6 +589,8 @@ void AtomVec::unpack_comm(int n, int first, double *buf) } } } + + if (bonus_flag) unpack_comm_bonus(n,first,&buf[m]); } /* ---------------------------------------------------------------------- */ @@ -642,6 +652,8 @@ void AtomVec::unpack_comm_vel(int n, int first, double *buf) } } } + + if (bonus_flag) unpack_comm_bonus(n,first,&buf[m]); } /* ---------------------------------------------------------------------- */ @@ -874,6 +886,8 @@ int AtomVec::pack_border(int n, int *list, double *buf, int pbc_flag, int *pbc) } } + if (bonus_flag) m += pack_border_bonus(n,list,&buf[m]); + if (atom->nextra_border) for (int iextra = 0; iextra < atom->nextra_border; iextra++) m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); @@ -1006,6 +1020,8 @@ int AtomVec::pack_border_vel(int n, int *list, double *buf, } } + if (bonus_flag) m += pack_border_bonus(n,list,&buf[m]); + if (atom->nextra_border) for (int iextra = 0; iextra < atom->nextra_border; iextra++) m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); @@ -1074,6 +1090,8 @@ void AtomVec::unpack_border(int n, int first, double *buf) } } + if (bonus_flag) m += unpack_border_bonus(n,first,&buf[m]); + if (atom->nextra_border) for (int iextra = 0; iextra < atom->nextra_border; iextra++) m += modify->fix[atom->extra_border[iextra]]-> @@ -1144,6 +1162,8 @@ void AtomVec::unpack_border_vel(int n, int first, double *buf) } } + if (bonus_flag) m += unpack_border_bonus(n,first,&buf[m]); + if (atom->nextra_border) for (int iextra = 0; iextra < atom->nextra_border; iextra++) m += modify->fix[atom->extra_border[iextra]]-> @@ -1232,6 +1252,8 @@ int AtomVec::pack_exchange(int i, double *buf) } } + if (bonus_flag) m += pack_exchange_bonus(i,&buf[m]); + if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); @@ -1322,6 +1344,8 @@ int AtomVec::unpack_exchange(double *buf) } } + if (bonus_flag) m += unpack_exchange_bonus(nlocal,&buf[m]); + if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) m += modify->fix[atom->extra_grow[iextra]]-> @@ -1366,6 +1390,8 @@ int AtomVec::size_restart() } } + if (bonus_flag) n += size_restart_bonus(); + if (atom->nextra_restart) for (int iextra = 0; iextra < atom->nextra_restart; iextra++) for (i = 0; i < nlocal; i++) @@ -1459,6 +1485,8 @@ int AtomVec::pack_restart(int i, double *buf) } } + if (bonus_flag) m += pack_restart_bonus(i,&buf[m]); + // if needed, restore values after packing pack_restart_post(i); @@ -1558,6 +1586,8 @@ int AtomVec::unpack_restart(double *buf) } } + if (bonus_flag) m += unpack_restart_bonus(nlocal,&buf[m]); + // if needed, initialize other peratom values unpack_restart_init(nlocal); @@ -1635,7 +1665,7 @@ void AtomVec::create_atom(int itype, double *coord) } } - // if needed, initialize other peratom values + // if needed, initialize non-zero peratom values create_atom_post(nlocal); @@ -2295,6 +2325,8 @@ bigint AtomVec::memory_usage() } } + if (bonus_flag) bytes += memory_usage_bonus(); + return bytes; } @@ -2359,8 +2391,9 @@ void AtomVec::setup_fields() // NOTE: check for others vars in atom_vec.cpp/h ?? // NOTE: need to set maxexchange, e.g for style hybrid? - if (ncomm == 0) comm_x_only = 1; - else comm_x_only = 0; + comm_x_only = 1; + if (ncomm) comm_x_only = 0; + if (bonus_flag && size_forward_bonus) comm_x_only = 0; if (nreverse == 0) comm_f_only = 1; else comm_f_only = 0; @@ -2371,6 +2404,7 @@ void AtomVec::setup_fields() if (cols == 0) size_forward++; else size_forward += cols; } + if (bonus_flag) size_forward += size_forward_bonus; size_reverse = 3; for (n = 0; n < nreverse; n++) { @@ -2385,6 +2419,7 @@ void AtomVec::setup_fields() if (cols == 0) size_border++; else size_border += cols; } + if (bonus_flag) size_border += size_border_bonus; size_velocity = 3; for (n = 0; n < ncomm_vel; n++) { @@ -2444,7 +2479,10 @@ int AtomVec::process_fields(char *list, const char *default_list, Method *method for (i = 0; i < nperatom; i++) if (strcmp(field,peratom[i].name) == 0) break; - if (i == nperatom) error->all(FLERR,"Atom_style unrecognized peratom field"); + if (i == nperatom) { + printf("FIELD %s\n",field); + error->all(FLERR,"Atom_style unrecognized peratom field"); + } index[nfield++] = i; // error if field is in default list or appears multiple times diff --git a/src/atom_vec.h b/src/atom_vec.h index 8ed6fff35f..33bf4a3ccd 100644 --- a/src/atom_vec.h +++ b/src/atom_vec.h @@ -36,11 +36,16 @@ class AtomVec : protected Pointers { int size_velocity; // # of velocity based quantities int size_data_atom; // number of values in Atom line int size_data_vel; // number of values in Velocity line - int size_data_bonus; // number of values in Bonus line int xcol_data; // column (1-N) where x is in Atom line int maxexchange; // max size of exchanged atom // only needs to be set if size > BUFEXTRA + int bonus_flag; // 1 if stores bonus data + int size_forward_bonus; // # in forward bonus comm + int size_border_bonus; // # in border bonus comm + int size_restart_bonus_one; // # in restart bonus comm + int size_data_bonus; // number of values in Bonus line + class Molecule **onemols; // list of molecules for style template int nset; // # of molecules in list @@ -62,6 +67,7 @@ class AtomVec : protected Pointers { AtomVec(class LAMMPS *); virtual ~AtomVec(); + void store_args(int, char **); virtual void process_args(int, char **); virtual void init(); @@ -70,13 +76,18 @@ class AtomVec : protected Pointers { void grow(int); void copy(int, int, int); - void clear_bonus() {} + + virtual void copy_bonus(int, int, int) {} + virtual void clear_bonus() {} int pack_comm(int, int *, double *, int, int *); int pack_comm_vel(int, int *, double *, int, int *); void unpack_comm(int, int, double *); void unpack_comm_vel(int, int, double *); + virtual int pack_comm_bonus(int, int *, double *) {} + virtual void unpack_comm_bonus(int, int, double *) {} + int pack_reverse(int, int, double *); void unpack_reverse(int, int *, double *); @@ -85,16 +96,27 @@ class AtomVec : protected Pointers { void unpack_border(int, int, double *); void unpack_border_vel(int, int, double *); + virtual int pack_border_bonus(int, int *, double *) {} + virtual int unpack_border_bonus(int, int, double *) {} + int pack_exchange(int, double *); int unpack_exchange(double *); + virtual int pack_exchange_bonus(int, double *) {} + virtual int unpack_exchange_bonus(int, double *) {} + int size_restart(); - virtual void pack_restart_pre(int) {} int pack_restart(int, double *); - virtual void pack_restart_post(int) {} int unpack_restart(double *); + + virtual void pack_restart_pre(int) {} + virtual void pack_restart_post(int) {} virtual void unpack_restart_init(int) {} + virtual int size_restart_bonus() {} + virtual int pack_restart_bonus(int, double *) {} + virtual int unpack_restart_bonus(int, double *) {} + void create_atom(int, double *); virtual void create_atom_post(int) {} @@ -102,13 +124,15 @@ class AtomVec : protected Pointers { virtual void data_atom_post(int) {} void data_atom_bonus(int, char **) {} - void data_vel(int, char **); + void data_body(int, int, int, int *, double *) {} + + void pack_data(double **); + void write_data(FILE *, int, double **); virtual void pack_data_pre(int) {} - void pack_data(double **); virtual void pack_data_post(int) {} - int pack_data_hybrid(int, double *) {return 0;} - void write_data(FILE *, int, double **); + + void data_vel(int, char **); void pack_vel(double **); void write_vel(FILE *, int, double **); @@ -125,6 +149,7 @@ class AtomVec : protected Pointers { void pack_property_atom(int, double *, int, int) {} bigint memory_usage(); + virtual bigint memory_usage_bonus() {} protected: int nmax; // local copy of atom->nmax diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index 5e83946078..1a8c2defd9 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -18,7 +18,6 @@ #include "style_body.h" #include "body.h" #include "atom.h" -#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -33,17 +32,17 @@ using namespace LAMMPS_NS; AtomVecBody::AtomVecBody(LAMMPS *lmp) : AtomVec(lmp) { molecular = 0; + bonus_flag = 1; - // size_forward and size_border set in settings(), via Body class + // first 3 sizes do not include values from body itself + // 1st,2nd body counts are added in process_args() via body style + // 3rd body count is added in size_restart_bonus() + // size_data_bonus is not used by Atom class for body style - comm_x_only = comm_f_only = 0; - size_forward = 0; - size_reverse = 6; - size_border = 0; - size_velocity = 6; - size_data_atom = 7; - size_data_vel = 7; - xcol_data = 5; + size_forward_bonus = 4; + size_border_bonus = 9; + size_restart_bonus_one = 9; + size_data_bonus = 0; atom->body_flag = 1; atom->rmass_flag = 1; @@ -58,6 +57,26 @@ AtomVecBody::AtomVecBody(LAMMPS *lmp) : AtomVec(lmp) if (sizeof(double) == sizeof(int)) intdoubleratio = 1; else if (sizeof(double) == 2*sizeof(int)) intdoubleratio = 2; else error->all(FLERR,"Internal error in atom_style body"); + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "radius rmass angmom torque body"; + fields_copy = (char *) "radius rmass angmom"; + fields_comm = NULL; + fields_comm_vel = (char *) "angmom"; + fields_reverse = (char *) "torque"; + fields_border = (char *) "radius rmass"; + fields_border_vel = (char *) "radius rmass angmom"; + fields_exchange = (char *) "radius rmass angmom"; + fields_restart = (char *) "radius rmass angmom"; + fields_create = (char *) "radius rmass angmom tri"; + fields_data_atom = (char *) "id type body rmass x"; + fields_data_vel = (char *) "angmom"; + + setup_fields(); } /* ---------------------------------------------------------------------- */ @@ -96,65 +115,18 @@ void AtomVecBody::process_args(int narg, char **arg) #undef BodyStyle #undef BODY_CLASS - else error->all(FLERR,utils::check_packages_for_style("body",arg[0],lmp).c_str()); + else error->all(FLERR,utils:: + check_packages_for_style("body",arg[0],lmp).c_str()); bptr->avec = this; icp = bptr->icp; dcp = bptr->dcp; // max size of forward/border comm - // 7,16 are packed in pack_comm/pack_border // bptr values = max number of additional ivalues/dvalues from Body class - size_forward = 7 + bptr->size_forward; - size_border = 18 + bptr->size_border; -} - -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecBody::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - radius = memory->grow(atom->radius,nmax,"atom:radius"); - rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); - angmom = memory->grow(atom->angmom,nmax,3,"atom:angmom"); - torque = memory->grow(atom->torque,nmax*comm->nthreads,3,"atom:torque"); - body = memory->grow(atom->body,nmax,"atom:body"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecBody::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - radius = atom->radius; rmass = atom->rmass; - angmom = atom->angmom; torque = atom->torque; - body = atom->body; + size_forward_bonus += bptr->size_forward; + size_border_bonus += bptr->size_border; } /* ---------------------------------------------------------------------- @@ -176,24 +148,9 @@ void AtomVecBody::grow_bonus() if delflag and atom J has bonus data, then delete it ------------------------------------------------------------------------- */ -void AtomVecBody::copy(int i, int j, int delflag) +void AtomVecBody::copy_bonus(int i, int j, int delflag) { - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - radius[j] = radius[i]; - rmass[j] = rmass[i]; - angmom[j][0] = angmom[i][0]; - angmom[j][1] = angmom[i][1]; - angmom[j][2] = angmom[i][2]; + int *body = atom->body; // if deleting atom J via delflag and J has bonus data, then delete it @@ -201,7 +158,7 @@ void AtomVecBody::copy(int i, int j, int delflag) int k = body[j]; icp->put(bonus[k].iindex); dcp->put(bonus[k].dindex); - copy_bonus(nlocal_bonus-1,k); + copy_bonus_all(nlocal_bonus-1,k); nlocal_bonus--; } @@ -210,10 +167,6 @@ void AtomVecBody::copy(int i, int j, int delflag) if (body[i] >= 0 && i != j) bonus[body[i]].ilocal = j; body[j] = body[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); } /* ---------------------------------------------------------------------- @@ -221,9 +174,9 @@ void AtomVecBody::copy(int i, int j, int delflag) also reset body that points to I to now point to J ------------------------------------------------------------------------- */ -void AtomVecBody::copy_bonus(int i, int j) +void AtomVecBody::copy_bonus_all(int i, int j) { - body[bonus[i].ilocal] = j; + atom->body[bonus[i].ilocal] = j; memcpy(&bonus[j],&bonus[i],sizeof(Bonus)); } @@ -240,167 +193,21 @@ void AtomVecBody::clear_bonus() dcp->put(bonus[i].dindex); } nghost_bonus = 0; + + if (atom->nextra_grow) + for (int iextra = 0; iextra < atom->nextra_grow; iextra++) + modify->fix[atom->extra_grow[iextra]]->clear_bonus(); } /* ---------------------------------------------------------------------- */ -int AtomVecBody::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - double *quat; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - if (body[j] >= 0) { - quat = bonus[body[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - m += bptr->pack_comm_body(&bonus[body[j]],&buf[m]); - } - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (body[j] >= 0) { - quat = bonus[body[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - m += bptr->pack_comm_body(&bonus[body[j]],&buf[m]); - } - } - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBody::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - double *quat; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - if (body[j] >= 0) { - quat = bonus[body[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - m += bptr->pack_comm_body(&bonus[body[j]],&buf[m]); - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (body[j] >= 0) { - quat = bonus[body[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - m += bptr->pack_comm_body(&bonus[body[j]],&buf[m]); - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (body[j] >= 0) { - quat = bonus[body[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - m += bptr->pack_comm_body(&bonus[body[j]],&buf[m]); - } - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBody::pack_comm_hybrid(int n, int *list, double *buf) +int AtomVecBody::pack_comm_bonus(int n, int *list, double *buf) { int i,j,m; double *quat; + int *body = atom->body; + m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -413,22 +220,22 @@ int AtomVecBody::pack_comm_hybrid(int n, int *list, double *buf) m += bptr->pack_comm_body(&bonus[body[j]],&buf[m]); } } + return m; } /* ---------------------------------------------------------------------- */ -void AtomVecBody::unpack_comm(int n, int first, double *buf) +void AtomVecBody::unpack_comm_bonus(int n, int first, double *buf) { int i,m,last; double *quat; + int *body = atom->body; + m = 0; last = first + n; for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; if (body[i] >= 0) { quat = bonus[body[i]].quat; quat[0] = buf[m++]; @@ -442,359 +249,16 @@ void AtomVecBody::unpack_comm(int n, int first, double *buf) /* ---------------------------------------------------------------------- */ -void AtomVecBody::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - double *quat; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - if (body[i] >= 0) { - quat = bonus[body[i]].quat; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - m += bptr->unpack_comm_body(&bonus[body[i]],&buf[m]); - } - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - angmom[i][0] = buf[m++]; - angmom[i][1] = buf[m++]; - angmom[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBody::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - double *quat; - - m = 0; - last = first + n; - for (i = first; i < last; i++) - if (body[i] >= 0) { - quat = bonus[body[i]].quat; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - m += bptr->unpack_comm_body(&bonus[body[i]],&buf[m]); - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBody::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = torque[i][0]; - buf[m++] = torque[i][1]; - buf[m++] = torque[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBody::pack_reverse_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = torque[i][0]; - buf[m++] = torque[i][1]; - buf[m++] = torque[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecBody::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - torque[j][0] += buf[m++]; - torque[j][1] += buf[m++]; - torque[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBody::unpack_reverse_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - torque[j][0] += buf[m++]; - torque[j][1] += buf[m++]; - torque[j][2] += buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBody::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - double *quat,*inertia; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (body[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - quat = bonus[body[j]].quat; - inertia = bonus[body[j]].inertia; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - buf[m++] = inertia[0]; - buf[m++] = inertia[1]; - buf[m++] = inertia[2]; - buf[m++] = ubuf(bonus[body[j]].ninteger).d; - buf[m++] = ubuf(bonus[body[j]].ndouble).d; - m += bptr->pack_border_body(&bonus[body[j]],&buf[m]); - } - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (body[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - quat = bonus[body[j]].quat; - inertia = bonus[body[j]].inertia; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - buf[m++] = inertia[0]; - buf[m++] = inertia[1]; - buf[m++] = inertia[2]; - buf[m++] = ubuf(bonus[body[j]].ninteger).d; - buf[m++] = ubuf(bonus[body[j]].ndouble).d; - m += bptr->pack_border_body(&bonus[body[j]],&buf[m]); - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBody::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - double *quat,*inertia; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (body[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - quat = bonus[body[j]].quat; - inertia = bonus[body[j]].inertia; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - buf[m++] = inertia[0]; - buf[m++] = inertia[1]; - buf[m++] = inertia[2]; - buf[m++] = ubuf(bonus[body[j]].ninteger).d; - buf[m++] = ubuf(bonus[body[j]].ndouble).d; - m += bptr->pack_border_body(&bonus[body[j]],&buf[m]); - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (body[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - quat = bonus[body[j]].quat; - inertia = bonus[body[j]].inertia; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - buf[m++] = inertia[0]; - buf[m++] = inertia[1]; - buf[m++] = inertia[2]; - buf[m++] = ubuf(bonus[body[j]].ninteger).d; - buf[m++] = ubuf(bonus[body[j]].ndouble).d; - m += bptr->pack_border_body(&bonus[body[j]],&buf[m]); - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - if (body[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - quat = bonus[body[j]].quat; - inertia = bonus[body[j]].inertia; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - buf[m++] = inertia[0]; - buf[m++] = inertia[1]; - buf[m++] = inertia[2]; - buf[m++] = ubuf(bonus[body[j]].ninteger).d; - buf[m++] = ubuf(bonus[body[j]].ndouble).d; - m += bptr->pack_border_body(&bonus[body[j]],&buf[m]); - } - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBody::pack_border_hybrid(int n, int *list, double *buf) +int AtomVecBody::pack_border_bonus(int n, int *list, double *buf) { int i,j,m; double *quat,*inertia; + int *body = atom->body; + m = 0; for (i = 0; i < n; i++) { j = list[i]; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; if (body[j] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -811,29 +275,23 @@ int AtomVecBody::pack_border_hybrid(int n, int *list, double *buf) buf[m++] = ubuf(bonus[body[j]].ndouble).d; m += bptr->pack_border_body(&bonus[body[j]],&buf[m]); } - } + } + return m; } /* ---------------------------------------------------------------------- */ -void AtomVecBody::unpack_border(int n, int first, double *buf) +int AtomVecBody::unpack_border_bonus(int n, int first, double *buf) { int i,j,m,last; double *quat,*inertia; + int *body = atom->body; + m = 0; last = first + n; for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; body[i] = (int) ubuf(buf[m++]).i; if (body[i] == 0) body[i] = -1; else { @@ -860,106 +318,6 @@ void AtomVecBody::unpack_border(int n, int first, double *buf) } } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecBody::unpack_border_vel(int n, int first, double *buf) -{ - int i,j,m,last; - double *quat,*inertia; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - body[i] = (int) ubuf(buf[m++]).i; - if (body[i] == 0) body[i] = -1; - else { - j = nlocal_bonus + nghost_bonus; - if (j == nmax_bonus) grow_bonus(); - quat = bonus[j].quat; - inertia = bonus[j].inertia; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - inertia[0] = buf[m++]; - inertia[1] = buf[m++]; - inertia[2] = buf[m++]; - bonus[j].ninteger = (int) ubuf(buf[m++]).i; - bonus[j].ndouble = (int) ubuf(buf[m++]).i; - // corresponding put() calls are in clear_bonus() - bonus[j].ivalue = icp->get(bonus[j].ninteger,bonus[j].iindex); - bonus[j].dvalue = dcp->get(bonus[j].ndouble,bonus[j].dindex); - m += bptr->unpack_border_body(&bonus[j],&buf[m]); - bonus[j].ilocal = i; - body[i] = j; - nghost_bonus++; - } - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - angmom[i][0] = buf[m++]; - angmom[i][1] = buf[m++]; - angmom[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecBody::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,j,m,last; - double *quat,*inertia; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - body[i] = (int) ubuf(buf[m++]).i; - if (body[i] == 0) body[i] = -1; - else { - j = nlocal_bonus + nghost_bonus; - if (j == nmax_bonus) grow_bonus(); - quat = bonus[j].quat; - inertia = bonus[j].inertia; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - inertia[0] = buf[m++]; - inertia[1] = buf[m++]; - inertia[2] = buf[m++]; - bonus[j].ninteger = (int) ubuf(buf[m++]).i; - bonus[j].ndouble = (int) ubuf(buf[m++]).i; - // corresponding put() calls are in clear_bonus() - bonus[j].ivalue = icp->get(bonus[j].ninteger,bonus[j].iindex); - bonus[j].dvalue = dcp->get(bonus[j].ndouble,bonus[j].dindex); - m += bptr->unpack_border_body(&bonus[j],&buf[m]); - bonus[j].ilocal = i; - body[i] = j; - nghost_bonus++; - } - } return m; } @@ -968,24 +326,11 @@ int AtomVecBody::unpack_border_hybrid(int n, int first, double *buf) xyz must be 1st 3 values, so comm::exchange() can test on them ------------------------------------------------------------------------- */ -int AtomVecBody::pack_exchange(int i, double *buf) +int AtomVecBody::pack_exchange_bonus(int i, double *buf) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = radius[i]; - buf[m++] = rmass[i]; - buf[m++] = angmom[i][0]; - buf[m++] = angmom[i][1]; - buf[m++] = angmom[i][2]; + int m = 0; + + int *body = atom->body; if (body[i] < 0) buf[m++] = ubuf(0).d; else { @@ -1009,40 +354,19 @@ int AtomVecBody::pack_exchange(int i, double *buf) m += bonus[j].ndouble; } - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; return m; } /* ---------------------------------------------------------------------- */ -int AtomVecBody::unpack_exchange(double *buf) +int AtomVecBody::unpack_exchange_bonus(int ilocal, double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + int m = 0; - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - radius[nlocal] = buf[m++]; - rmass[nlocal] = buf[m++]; - angmom[nlocal][0] = buf[m++]; - angmom[nlocal][1] = buf[m++]; - angmom[nlocal][2] = buf[m++]; + int *body = atom->body; - body[nlocal] = (int) ubuf(buf[m++]).i; - if (body[nlocal] == 0) body[nlocal] = -1; + body[ilocal] = (int) ubuf(buf[m++]).i; + if (body[ilocal] == 0) body[ilocal] = -1; else { if (nlocal_bonus == nmax_bonus) grow_bonus(); double *quat = bonus[nlocal_bonus].quat; @@ -1069,42 +393,34 @@ int AtomVecBody::unpack_exchange(double *buf) bonus[nlocal_bonus].ndouble*sizeof(double)); m += bonus[nlocal_bonus].ndouble; - bonus[nlocal_bonus].ilocal = nlocal; - body[nlocal] = nlocal_bonus++; + bonus[nlocal_bonus].ilocal = ilocal; + body[ilocal] = nlocal_bonus++; } - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; return m; } /* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes + unpack data for one atom from restart file including bonus data ------------------------------------------------------------------------- */ -int AtomVecBody::size_restart() +int AtomVecBody::size_restart_bonus() { int i; + int *body = atom->body; + int n = 0; int nlocal = atom->nlocal; - for (i = 0; i < nlocal; i++) + for (i = 0; i < nlocal; i++) { if (body[i] >= 0) { - n += 26; + n += size_restart_bonus_one; if (intdoubleratio == 1) n += bonus[body[i]].ninteger; else n += (bonus[body[i]].ninteger+1)/2; n += bonus[body[i]].ndouble; - } else n += 17; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); + } + n++; + } return n; } @@ -1115,25 +431,11 @@ int AtomVecBody::size_restart() molecular types may be negative, but write as positive ------------------------------------------------------------------------- */ -int AtomVecBody::pack_restart(int i, double *buf) +int AtomVecBody::pack_restart_bonus(int i, double *buf) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; + int m = 0; - buf[m++] = radius[i]; - buf[m++] = rmass[i]; - buf[m++] = angmom[i][0]; - buf[m++] = angmom[i][1]; - buf[m++] = angmom[i][2]; + int *body = atom->body; if (body[i] < 0) buf[m++] = ubuf(0).d; else { @@ -1157,47 +459,21 @@ int AtomVecBody::pack_restart(int i, double *buf) m += bonus[j].ndouble; } - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; return m; } /* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities + unpack data for one atom from restart file including bonus data ------------------------------------------------------------------------- */ -int AtomVecBody::unpack_restart(double *buf) +int AtomVecBody::unpack_restart_bonus(int ilocal, double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } + int m = 0; - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; + int *body = atom->body; - radius[nlocal] = buf[m++]; - rmass[nlocal] = buf[m++]; - angmom[nlocal][0] = buf[m++]; - angmom[nlocal][1] = buf[m++]; - angmom[nlocal][2] = buf[m++]; - - body[nlocal] = (int) ubuf(buf[m++]).i; - if (body[nlocal] == 0) body[nlocal] = -1; + body[ilocal] = (int) ubuf(buf[m++]).i; + if (body[ilocal] == 0) body[ilocal] = -1; else { if (nlocal_bonus == nmax_bonus) grow_bonus(); double *quat = bonus[nlocal_bonus].quat; @@ -1222,17 +498,10 @@ int AtomVecBody::unpack_restart(double *buf) memcpy(bonus[nlocal_bonus].dvalue,&buf[m], bonus[nlocal_bonus].ndouble*sizeof(double)); m += bonus[nlocal_bonus].ndouble; - bonus[nlocal_bonus].ilocal = nlocal; - body[nlocal] = nlocal_bonus++; + bonus[nlocal_bonus].ilocal = ilocal; + body[ilocal] = nlocal_bonus++; } - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; return m; } @@ -1241,92 +510,33 @@ int AtomVecBody::unpack_restart(double *buf) set other values to defaults ------------------------------------------------------------------------- */ -void AtomVecBody::create_atom(int itype, double *coord) +void AtomVecBody::create_atom_post(int ilocal) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - radius[nlocal] = 0.5; - rmass[nlocal] = 1.0; - angmom[nlocal][0] = 0.0; - angmom[nlocal][1] = 0.0; - angmom[nlocal][2] = 0.0; - body[nlocal] = -1; - - atom->nlocal++; + atom->radius[ilocal] = 0.5; + atom->rmass[ilocal] = 1.0; + atom->body[ilocal] = -1; } /* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecBody::data_atom(double *coord, imageint imagetmp, char **values) +void AtomVecBody::data_atom_post(int ilocal) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + body_flag = atom->body[ilocal]; + if (body_flag == 0) body_flag = -1; + else if (body_flag == 1) body_flag = 0; + else error->one(FLERR,"Invalid body flag in Atoms section of data file"); + atom->body[ilocal] = body_flag; - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - body[nlocal] = utils::inumeric(FLERR,values[2],true,lmp); - if (body[nlocal] == 0) body[nlocal] = -1; - else if (body[nlocal] == 1) body[nlocal] = 0; - else error->one(FLERR,"Invalid bodyflag in Atoms section of data file"); - - rmass[nlocal] = utils::numeric(FLERR,values[3],true,lmp); - if (rmass[nlocal] <= 0.0) + if (atom->rmass[ilocal] <= 0.0) error->one(FLERR,"Invalid density in Atoms section of data file"); - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - angmom[nlocal][0] = 0.0; - angmom[nlocal][1] = 0.0; - angmom[nlocal][2] = 0.0; - radius[nlocal] = 0.5; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecBody::data_atom_hybrid(int nlocal, char **values) -{ - body[nlocal] = utils::inumeric(FLERR,values[0],true,lmp); - if (body[nlocal] == 0) body[nlocal] = -1; - else if (body[nlocal] == 1) body[nlocal] = 0; - else error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - rmass[nlocal] = utils::numeric(FLERR,values[1],true,lmp); - if (rmass[nlocal] <= 0.0) - error->one(FLERR,"Invalid density in Atoms section of data file"); - - return 2; + atom->radius[ilocal] = 0.5; + atom->angmom[ilocal][0] = 0.0; + atom->angmom[ilocal][1] = 0.0; + atom->angmom[ilocal][2] = 0.0; } /* ---------------------------------------------------------------------- @@ -1336,148 +546,52 @@ int AtomVecBody::data_atom_hybrid(int nlocal, char **values) void AtomVecBody::data_body(int m, int ninteger, int ndouble, int *ivalues, double *dvalues) { - if (body[m]) error->one(FLERR,"Assigning body parameters to non-body atom"); + if (atom->body[m]) + error->one(FLERR,"Assigning body parameters to non-body atom"); if (nlocal_bonus == nmax_bonus) grow_bonus(); bonus[nlocal_bonus].ilocal = m; bptr->data_body(nlocal_bonus,ninteger,ndouble,ivalues,dvalues); - body[m] = nlocal_bonus++; + atom->body[m] = nlocal_bonus++; } /* ---------------------------------------------------------------------- - unpack one tri from Velocities section of data file + return # of bytes of allocated memory ------------------------------------------------------------------------- */ -void AtomVecBody::data_vel(int m, char **values) +bigint AtomVecBody::memory_usage_bonus() { - v[m][0] = utils::numeric(FLERR,values[0],true,lmp); - v[m][1] = utils::numeric(FLERR,values[1],true,lmp); - v[m][2] = utils::numeric(FLERR,values[2],true,lmp); - angmom[m][0] = utils::numeric(FLERR,values[3],true,lmp); - angmom[m][1] = utils::numeric(FLERR,values[4],true,lmp); - angmom[m][2] = utils::numeric(FLERR,values[5],true,lmp); -} + bigint bytes = 0; + bytes += nmax_bonus*sizeof(Bonus); + bytes += icp->size + dcp->size; -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one body in Velocities section of data file -------------------------------------------------------------------------- */ - -int AtomVecBody::data_vel_hybrid(int m, char **values) -{ - angmom[m][0] = utils::numeric(FLERR,values[0],true,lmp); - angmom[m][1] = utils::numeric(FLERR,values[1],true,lmp); - angmom[m][2] = utils::numeric(FLERR,values[2],true,lmp); - return 3; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecBody::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - if (body[i] < 0) buf[i][2] = ubuf(0).d; - else buf[i][2] = ubuf(1).d; - buf[i][3] = rmass[i]; - buf[i][4] = x[i][0]; - buf[i][5] = x[i][1]; - buf[i][6] = x[i][2]; - buf[i][7] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; + int nall = nlocal_bonus + nghost_bonus; + for (int i = 0; i < nall; i++) { + bytes += bonus[i].ninteger * sizeof(int); + bytes += bonus[i].ndouble * sizeof(double); } + + return bytes; } /* ---------------------------------------------------------------------- - pack hybrid atom info for data file + modify values for AtomVec::pack_data() to pack ------------------------------------------------------------------------- */ -int AtomVecBody::pack_data_hybrid(int i, double *buf) -{ - if (body[i] < 0) buf[0] = ubuf(0).d; - else buf[0] = ubuf(1).d; - buf[1] = rmass[i]; - return 2; +void AtomVecBody::pack_data_pre(int ilocal) +{ + body_flag = atom->body[ilocal]; + + if (body_flag < 0) atom->body[ilocal] = 0; + else atom->body[ilocal] = 1; } /* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags + unmodify values packed by AtomVec::pack_data() ------------------------------------------------------------------------- */ -void AtomVecBody::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " %d %d %g %g %g %g %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - (int) ubuf(buf[i][2]).i, - buf[i][3],buf[i][4],buf[i][5],buf[i][6], - (int) ubuf(buf[i][7]).i,(int) ubuf(buf[i][8]).i, - (int) ubuf(buf[i][9]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecBody::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %d %g",(int) ubuf(buf[0]).i,buf[1]); - return 2; -} - -/* ---------------------------------------------------------------------- - pack velocity info for data file -------------------------------------------------------------------------- */ - -void AtomVecBody::pack_vel(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = v[i][0]; - buf[i][2] = v[i][1]; - buf[i][3] = v[i][2]; - buf[i][4] = angmom[i][0]; - buf[i][5] = angmom[i][1]; - buf[i][6] = angmom[i][2]; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid velocity info for data file -------------------------------------------------------------------------- */ - -int AtomVecBody::pack_vel_hybrid(int i, double *buf) -{ - buf[0] = angmom[i][0]; - buf[1] = angmom[i][1]; - buf[2] = angmom[i][2]; - return 3; -} - -/* ---------------------------------------------------------------------- - write velocity info to data file -------------------------------------------------------------------------- */ - -void AtomVecBody::write_vel(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " %g %g %g %g %g %g\n", - (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3], - buf[i][4],buf[i][5],buf[i][6]); -} - -/* ---------------------------------------------------------------------- - write hybrid velocity info to data file -------------------------------------------------------------------------- */ - -int AtomVecBody::write_vel_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %g %g %g",buf[0],buf[1],buf[2]); - return 3; +void AtomVecBody::pack_data_post(int ilocal) +{ + atom->body[ilocal] = body_flag; } /* ---------------------------------------------------------------------- @@ -1497,47 +611,12 @@ double AtomVecBody::radius_body(int ninteger, int ndouble, void AtomVecBody::set_quat(int m, double *quat_external) { - if (body[m] < 0) error->one(FLERR,"Assigning quat to non-body atom"); - double *quat = bonus[body[m]].quat; + if (atom->body[m] < 0) error->one(FLERR,"Assigning quat to non-body atom"); + double *quat = bonus[atom->body[m]].quat; quat[0] = quat_external[0]; quat[1] = quat_external[1]; quat[2] = quat_external[2]; quat[3] = quat_external[3]; } -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecBody::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("radius")) bytes += memory->usage(radius,nmax); - if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); - if (atom->memcheck("angmom")) bytes += memory->usage(angmom,nmax,3); - if (atom->memcheck("torque")) bytes += - memory->usage(torque,nmax*comm->nthreads,3); - if (atom->memcheck("body")) bytes += memory->usage(body,nmax); - - bytes += nmax_bonus*sizeof(Bonus); - bytes += icp->size + dcp->size; - - int nall = nlocal_bonus + nghost_bonus; - for (int i = 0; i < nall; i++) { - bytes += bonus[i].ninteger * sizeof(int); - bytes += bonus[i].ndouble * sizeof(double); - } - - return bytes; -} - /* ---------------------------------------------------------------------- debug method for sanity checking of own/bonus data pointers ------------------------------------------------------------------------- */ diff --git a/src/atom_vec_body.h b/src/atom_vec_body.h index 38309648fb..183b4ea8ea 100644 --- a/src/atom_vec_body.h +++ b/src/atom_vec_body.h @@ -42,49 +42,26 @@ class AtomVecBody : public AtomVec { AtomVecBody(class LAMMPS *); ~AtomVecBody(); void process_args(int, char **); - void grow(int); - void grow_reset(); - void copy(int, int, int); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - int pack_reverse_hybrid(int, int, double *); - void unpack_reverse(int, int *, double *); - int unpack_reverse_hybrid(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void data_vel(int, char **); - int data_vel_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - void pack_vel(double **); - int pack_vel_hybrid(int, double *); - void write_vel(FILE *, int, double **); - int write_vel_hybrid(FILE *, double *); - bigint memory_usage(); - - // manipulate Bonus data structure for extra atom info + void copy_bonus(int, int, int); void clear_bonus(); + int pack_comm_bonus(int, int *, double *); + void unpack_comm_bonus(int, int, double *); + int pack_reverse_bonus(int, int, double *); + int pack_border_bonus(int, int *, double *); + int unpack_border_bonus(int, int, double *); + int pack_exchange_bonus(int, double *); + int unpack_exchange_bonus(int, double *); + int size_restart_bonus(); + int pack_restart_bonus(int, double *); + int unpack_restart_bonus(int, double *); void data_body(int, int, int, int *, double *); + bigint memory_usage_bonus(); + + void create_atom_post(int); + void data_atom_post(int); + void pack_data_pre(int); + void pack_data_post(int); // methods used by other classes to query/set body info @@ -94,23 +71,16 @@ class AtomVecBody : public AtomVec { int nlocal_bonus; private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double *radius; - double *rmass; - double **angmom,**torque; - int *body; - int nghost_bonus,nmax_bonus; - int intdoubleratio; // sizeof(double) / sizeof(int) + int intdoubleratio; // sizeof(double) / sizeof(int) + int body_flag; MyPoolChunk *icp; MyPoolChunk *dcp; void grow_bonus(); - void copy_bonus(int, int); + void copy_bonus_all(int, int); + // check(int); }; } diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index 5565b82a10..7ba26c1c34 100644 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -19,8 +19,6 @@ #include #include "math_extra.h" #include "atom.h" -#include "comm.h" -#include "domain.h" #include "modify.h" #include "fix.h" #include "math_const.h" @@ -36,22 +34,38 @@ using namespace MathConst; AtomVecEllipsoid::AtomVecEllipsoid(LAMMPS *lmp) : AtomVec(lmp) { molecular = 0; + bonus_flag = 1; - comm_x_only = comm_f_only = 0; - size_forward = 7; - size_reverse = 6; - size_border = 15; - size_velocity = 6; - size_data_atom = 7; - size_data_vel = 7; + size_forward_bonus = 4; + size_border_bonus = 8; + size_restart_bonus_one = 7; size_data_bonus = 8; - xcol_data = 5; atom->ellipsoid_flag = 1; atom->rmass_flag = atom->angmom_flag = atom->torque_flag = 1; nlocal_bonus = nghost_bonus = nmax_bonus = 0; bonus = NULL; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "rmass angmom torque ellipsoid"; + fields_copy = (char *) "rmass angmom"; + fields_comm = NULL; + fields_comm_vel = (char *) "angmom"; + fields_reverse = (char *) "torque"; + fields_border = (char *) "rmass"; + fields_border_vel = (char *) "rmass angmom"; + fields_exchange = (char *) "rmass angmom"; + fields_restart = (char *) "rmass angmom"; + fields_create = (char *) "rmass angmom ellipsoid"; + fields_data_atom = (char *) "id type ellipsoid rmass x"; + fields_data_vel = (char *) "angmom"; + + setup_fields(); } /* ---------------------------------------------------------------------- */ @@ -61,51 +75,6 @@ AtomVecEllipsoid::~AtomVecEllipsoid() memory->sfree(bonus); } -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecEllipsoid::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); - angmom = memory->grow(atom->angmom,nmax,3,"atom:angmom"); - torque = memory->grow(atom->torque,nmax*comm->nthreads,3,"atom:torque"); - ellipsoid = memory->grow(atom->ellipsoid,nmax,"atom:ellipsoid"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecEllipsoid::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - rmass = atom->rmass; angmom = atom->angmom; torque = atom->torque; - ellipsoid = atom->ellipsoid; -} - /* ---------------------------------------------------------------------- grow bonus data structure ------------------------------------------------------------------------- */ @@ -121,31 +90,17 @@ void AtomVecEllipsoid::grow_bonus() } /* ---------------------------------------------------------------------- - copy atom I info to atom J + copy atom I bonus info to atom J ------------------------------------------------------------------------- */ -void AtomVecEllipsoid::copy(int i, int j, int delflag) +void AtomVecEllipsoid::copy_bonus(int i, int j, int delflag) { - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - rmass[j] = rmass[i]; - angmom[j][0] = angmom[i][0]; - angmom[j][1] = angmom[i][1]; - angmom[j][2] = angmom[i][2]; + int *ellipsoid = atom->ellipsoid; // if deleting atom J via delflag and J has bonus data, then delete it if (delflag && ellipsoid[j] >= 0) { - copy_bonus(nlocal_bonus-1,ellipsoid[j]); + copy_bonus_all(nlocal_bonus-1,ellipsoid[j]); nlocal_bonus--; } @@ -154,10 +109,6 @@ void AtomVecEllipsoid::copy(int i, int j, int delflag) if (ellipsoid[i] >= 0 && i != j) bonus[ellipsoid[i]].ilocal = j; ellipsoid[j] = ellipsoid[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); } /* ---------------------------------------------------------------------- @@ -165,9 +116,9 @@ void AtomVecEllipsoid::copy(int i, int j, int delflag) also reset ellipsoid that points to I to now point to J ------------------------------------------------------------------------- */ -void AtomVecEllipsoid::copy_bonus(int i, int j) +void AtomVecEllipsoid::copy_bonus_all(int i, int j) { - ellipsoid[bonus[i].ilocal] = j; + atom->ellipsoid[bonus[i].ilocal] = j; memcpy(&bonus[j],&bonus[i],sizeof(Bonus)); } @@ -179,195 +130,21 @@ void AtomVecEllipsoid::copy_bonus(int i, int j) void AtomVecEllipsoid::clear_bonus() { nghost_bonus = 0; -} -/* ---------------------------------------------------------------------- - set shape values in bonus data for particle I - oriented aligned with xyz axes - this may create or delete entry in bonus data -------------------------------------------------------------------------- */ - -void AtomVecEllipsoid::set_shape(int i, - double shapex, double shapey, double shapez) -{ - if (ellipsoid[i] < 0) { - if (shapex == 0.0 && shapey == 0.0 && shapez == 0.0) return; - if (nlocal_bonus == nmax_bonus) grow_bonus(); - double *shape = bonus[nlocal_bonus].shape; - double *quat = bonus[nlocal_bonus].quat; - shape[0] = shapex; - shape[1] = shapey; - shape[2] = shapez; - quat[0] = 1.0; - quat[1] = 0.0; - quat[2] = 0.0; - quat[3] = 0.0; - bonus[nlocal_bonus].ilocal = i; - ellipsoid[i] = nlocal_bonus++; - } else if (shapex == 0.0 && shapey == 0.0 && shapez == 0.0) { - copy_bonus(nlocal_bonus-1,ellipsoid[i]); - nlocal_bonus--; - ellipsoid[i] = -1; - } else { - double *shape = bonus[ellipsoid[i]].shape; - shape[0] = shapex; - shape[1] = shapey; - shape[2] = shapez; - } + if (atom->nextra_grow) + for (int iextra = 0; iextra < atom->nextra_grow; iextra++) + modify->fix[atom->extra_grow[iextra]]->clear_bonus(); } /* ---------------------------------------------------------------------- */ -int AtomVecEllipsoid::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - double *quat; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - if (ellipsoid[j] >= 0) { - quat = bonus[ellipsoid[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (ellipsoid[j] >= 0) { - quat = bonus[ellipsoid[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEllipsoid::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - double *quat; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - if (ellipsoid[j] >= 0) { - quat = bonus[ellipsoid[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (ellipsoid[j] >= 0) { - quat = bonus[ellipsoid[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (ellipsoid[j] >= 0) { - quat = bonus[ellipsoid[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEllipsoid::pack_comm_hybrid(int n, int *list, double *buf) +int AtomVecEllipsoid::pack_comm_bonus(int n, int *list, double *buf) { int i,j,m; double *quat; + int *ellipsoid = atom->ellipsoid; + m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -379,22 +156,22 @@ int AtomVecEllipsoid::pack_comm_hybrid(int n, int *list, double *buf) buf[m++] = quat[3]; } } + return m; } /* ---------------------------------------------------------------------- */ -void AtomVecEllipsoid::unpack_comm(int n, int first, double *buf) +void AtomVecEllipsoid::unpack_comm_bonus(int n, int first, double *buf) { int i,m,last; double *quat; + int *ellipsoid = atom->ellipsoid; + m = 0; last = first + n; for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; if (ellipsoid[i] >= 0) { quat = bonus[ellipsoid[i]].quat; quat[0] = buf[m++]; @@ -407,339 +184,17 @@ void AtomVecEllipsoid::unpack_comm(int n, int first, double *buf) /* ---------------------------------------------------------------------- */ -void AtomVecEllipsoid::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - double *quat; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - if (ellipsoid[i] >= 0) { - quat = bonus[ellipsoid[i]].quat; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - } - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - angmom[i][0] = buf[m++]; - angmom[i][1] = buf[m++]; - angmom[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEllipsoid::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - double *quat; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (ellipsoid[i] >= 0) { - quat = bonus[ellipsoid[i]].quat; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEllipsoid::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = torque[i][0]; - buf[m++] = torque[i][1]; - buf[m++] = torque[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEllipsoid::pack_reverse_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = torque[i][0]; - buf[m++] = torque[i][1]; - buf[m++] = torque[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecEllipsoid::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - torque[j][0] += buf[m++]; - torque[j][1] += buf[m++]; - torque[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEllipsoid::unpack_reverse_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - torque[j][0] += buf[m++]; - torque[j][1] += buf[m++]; - torque[j][2] += buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEllipsoid::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) +int AtomVecEllipsoid::pack_border_bonus(int n, int *list, double *buf) { int i,j,m; double dx,dy,dz; double *shape,*quat; - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = rmass[j]; - if (ellipsoid[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - shape = bonus[ellipsoid[j]].shape; - quat = bonus[ellipsoid[j]].quat; - buf[m++] = shape[0]; - buf[m++] = shape[1]; - buf[m++] = shape[2]; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = rmass[j]; - if (ellipsoid[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - shape = bonus[ellipsoid[j]].shape; - quat = bonus[ellipsoid[j]].quat; - buf[m++] = shape[0]; - buf[m++] = shape[1]; - buf[m++] = shape[2]; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEllipsoid::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - double *shape,*quat; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = rmass[j]; - if (ellipsoid[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - shape = bonus[ellipsoid[j]].shape; - quat = bonus[ellipsoid[j]].quat; - buf[m++] = shape[0]; - buf[m++] = shape[1]; - buf[m++] = shape[2]; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = rmass[j]; - if (ellipsoid[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - shape = bonus[ellipsoid[j]].shape; - quat = bonus[ellipsoid[j]].quat; - buf[m++] = shape[0]; - buf[m++] = shape[1]; - buf[m++] = shape[2]; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = rmass[j]; - if (ellipsoid[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - shape = bonus[ellipsoid[j]].shape; - quat = bonus[ellipsoid[j]].quat; - buf[m++] = shape[0]; - buf[m++] = shape[1]; - buf[m++] = shape[2]; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEllipsoid::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - double *shape,*quat; + int *ellipsoid = atom->ellipsoid; m = 0; for (i = 0; i < n; i++) { j = list[i]; - buf[m++] = rmass[j]; if (ellipsoid[j] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -754,27 +209,22 @@ int AtomVecEllipsoid::pack_border_hybrid(int n, int *list, double *buf) buf[m++] = quat[3]; } } + return m; } /* ---------------------------------------------------------------------- */ -void AtomVecEllipsoid::unpack_border(int n, int first, double *buf) +int AtomVecEllipsoid::unpack_border_bonus(int n, int first, double *buf) { int i,j,m,last; double *shape,*quat; + int *ellipsoid = atom->ellipsoid; + m = 0; last = first + n; for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - rmass[i] = buf[m++]; ellipsoid[i] = (int) ubuf(buf[m++]).i; if (ellipsoid[i] == 0) ellipsoid[i] = -1; else { @@ -795,92 +245,6 @@ void AtomVecEllipsoid::unpack_border(int n, int first, double *buf) } } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecEllipsoid::unpack_border_vel(int n, int first, double *buf) -{ - int i,j,m,last; - double *shape,*quat; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - rmass[i] = buf[m++]; - ellipsoid[i] = (int) ubuf(buf[m++]).i; - if (ellipsoid[i] == 0) ellipsoid[i] = -1; - else { - j = nlocal_bonus + nghost_bonus; - if (j == nmax_bonus) grow_bonus(); - shape = bonus[j].shape; - quat = bonus[j].quat; - shape[0] = buf[m++]; - shape[1] = buf[m++]; - shape[2] = buf[m++]; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - bonus[j].ilocal = i; - ellipsoid[i] = j; - nghost_bonus++; - } - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - angmom[i][0] = buf[m++]; - angmom[i][1] = buf[m++]; - angmom[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecEllipsoid::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,j,m,last; - double *shape,*quat; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - rmass[i] = buf[m++]; - ellipsoid[i] = (int) ubuf(buf[m++]).i; - if (ellipsoid[i] == 0) ellipsoid[i] = -1; - else { - j = nlocal_bonus + nghost_bonus; - if (j == nmax_bonus) grow_bonus(); - shape = bonus[j].shape; - quat = bonus[j].quat; - shape[0] = buf[m++]; - shape[1] = buf[m++]; - shape[2] = buf[m++]; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - bonus[j].ilocal = i; - ellipsoid[i] = j; - nghost_bonus++; - } - } return m; } @@ -889,24 +253,11 @@ int AtomVecEllipsoid::unpack_border_hybrid(int n, int first, double *buf) xyz must be 1st 3 values, so comm::exchange() can test on them ------------------------------------------------------------------------- */ -int AtomVecEllipsoid::pack_exchange(int i, double *buf) +int AtomVecEllipsoid::pack_exchange_bonus(int i, double *buf) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; + int m = 0; - buf[m++] = rmass[i]; - buf[m++] = angmom[i][0]; - buf[m++] = angmom[i][1]; - buf[m++] = angmom[i][2]; + int *ellipsoid = atom->ellipsoid; if (ellipsoid[i] < 0) buf[m++] = ubuf(0).d; else { @@ -923,40 +274,19 @@ int AtomVecEllipsoid::pack_exchange(int i, double *buf) buf[m++] = quat[3]; } - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; return m; } /* ---------------------------------------------------------------------- */ -int AtomVecEllipsoid::unpack_exchange(double *buf) +int AtomVecEllipsoid::unpack_exchange_bonus(int ilocal, double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + int m = 0; - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; + int *ellipsoid = atom->ellipsoid; - rmass[nlocal] = buf[m++]; - angmom[nlocal][0] = buf[m++]; - angmom[nlocal][1] = buf[m++]; - angmom[nlocal][2] = buf[m++]; - - ellipsoid[nlocal] = (int) ubuf(buf[m++]).i; - if (ellipsoid[nlocal] == 0) ellipsoid[nlocal] = -1; + ellipsoid[ilocal] = (int) ubuf(buf[m++]).i; + if (ellipsoid[ilocal] == 0) ellipsoid[ilocal] = -1; else { if (nlocal_bonus == nmax_bonus) grow_bonus(); double *shape = bonus[nlocal_bonus].shape; @@ -968,16 +298,10 @@ int AtomVecEllipsoid::unpack_exchange(double *buf) quat[1] = buf[m++]; quat[2] = buf[m++]; quat[3] = buf[m++]; - bonus[nlocal_bonus].ilocal = nlocal; - ellipsoid[nlocal] = nlocal_bonus++; + bonus[nlocal_bonus].ilocal = ilocal; + ellipsoid[ilocal] = nlocal_bonus++; } - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; return m; } @@ -986,20 +310,18 @@ int AtomVecEllipsoid::unpack_exchange(double *buf) include extra data stored by fixes ------------------------------------------------------------------------- */ -int AtomVecEllipsoid::size_restart() +int AtomVecEllipsoid::size_restart_bonus() { int i; + int *ellipsoid = atom->ellipsoid; + int n = 0; int nlocal = atom->nlocal; - for (i = 0; i < nlocal; i++) - if (ellipsoid[i] >= 0) n += 23; - else n += 16; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); + for (i = 0; i < nlocal; i++) { + if (ellipsoid[i] >= 0) n += size_restart_bonus_one; + n++; + } return n; } @@ -1010,24 +332,11 @@ int AtomVecEllipsoid::size_restart() molecular types may be negative, but write as positive ------------------------------------------------------------------------- */ -int AtomVecEllipsoid::pack_restart(int i, double *buf) +int AtomVecEllipsoid::pack_restart_bonus(int i, double *buf) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; + int m = 0; - buf[m++] = rmass[i]; - buf[m++] = angmom[i][0]; - buf[m++] = angmom[i][1]; - buf[m++] = angmom[i][2]; + int *ellipsoid = atom->ellipsoid; if (ellipsoid[i] < 0) buf[m++] = ubuf(0).d; else { @@ -1042,11 +351,6 @@ int AtomVecEllipsoid::pack_restart(int i, double *buf) buf[m++] = bonus[j].quat[3]; } - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; return m; } @@ -1054,34 +358,14 @@ int AtomVecEllipsoid::pack_restart(int i, double *buf) unpack data for one atom from restart file including bonus data ------------------------------------------------------------------------- */ -int AtomVecEllipsoid::unpack_restart(double *buf) +int AtomVecEllipsoid::unpack_restart_bonus(int ilocal, double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } + int m = 0; - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; + int *ellipsoid = atom->ellipsoid; - rmass[nlocal] = buf[m++]; - angmom[nlocal][0] = buf[m++]; - angmom[nlocal][1] = buf[m++]; - angmom[nlocal][2] = buf[m++]; - - ellipsoid[nlocal] = (int) ubuf(buf[m++]).i; - if (ellipsoid[nlocal] == 0) ellipsoid[nlocal] = -1; + ellipsoid[ilocal] = (int) ubuf(buf[m++]).i; + if (ellipsoid[ilocal] == 0) ellipsoid[ilocal] = -1; else { if (nlocal_bonus == nmax_bonus) grow_bonus(); double *shape = bonus[nlocal_bonus].shape; @@ -1093,118 +377,21 @@ int AtomVecEllipsoid::unpack_restart(double *buf) quat[1] = buf[m++]; quat[2] = buf[m++]; quat[3] = buf[m++]; - bonus[nlocal_bonus].ilocal = nlocal; - ellipsoid[nlocal] = nlocal_bonus++; + bonus[nlocal_bonus].ilocal = ilocal; + ellipsoid[ilocal] = nlocal_bonus++; } - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; return m; } -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecEllipsoid::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - rmass[nlocal] = 1.0; - angmom[nlocal][0] = 0.0; - angmom[nlocal][1] = 0.0; - angmom[nlocal][2] = 0.0; - ellipsoid[nlocal] = -1; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecEllipsoid::data_atom(double *coord, imageint imagetmp, - char **values) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - ellipsoid[nlocal] = utils::inumeric(FLERR,values[2],true,lmp); - if (ellipsoid[nlocal] == 0) ellipsoid[nlocal] = -1; - else if (ellipsoid[nlocal] == 1) ellipsoid[nlocal] = 0; - else error->one(FLERR,"Invalid ellipsoidflag in Atoms section of data file"); - - rmass[nlocal] = utils::numeric(FLERR,values[3],true,lmp); - if (rmass[nlocal] <= 0.0) - error->one(FLERR,"Invalid density in Atoms section of data file"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - angmom[nlocal][0] = 0.0; - angmom[nlocal][1] = 0.0; - angmom[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecEllipsoid::data_atom_hybrid(int nlocal, char **values) -{ - ellipsoid[nlocal] = utils::inumeric(FLERR,values[0],true,lmp); - if (ellipsoid[nlocal] == 0) ellipsoid[nlocal] = -1; - else if (ellipsoid[nlocal] == 1) ellipsoid[nlocal] = 0; - else error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - rmass[nlocal] = utils::numeric(FLERR,values[1],true,lmp); - if (rmass[nlocal] <= 0.0) - error->one(FLERR,"Invalid density in Atoms section of data file"); - - return 2; -} - /* ---------------------------------------------------------------------- unpack one line from Ellipsoids section of data file ------------------------------------------------------------------------- */ void AtomVecEllipsoid::data_atom_bonus(int m, char **values) { + int *ellipsoid = atom->ellipsoid; + if (ellipsoid[m]) error->one(FLERR,"Assigning ellipsoid parameters to non-ellipsoid atom"); @@ -1227,184 +414,113 @@ void AtomVecEllipsoid::data_atom_bonus(int m, char **values) // reset ellipsoid mass // previously stored density in rmass - rmass[m] *= 4.0*MY_PI/3.0 * shape[0]*shape[1]*shape[2]; + atom->rmass[m] *= 4.0*MY_PI/3.0 * shape[0]*shape[1]*shape[2]; bonus[nlocal_bonus].ilocal = m; ellipsoid[m] = nlocal_bonus++; } /* ---------------------------------------------------------------------- - unpack one line from Velocities section of data file + return # of bytes of allocated bonus memory ------------------------------------------------------------------------- */ -void AtomVecEllipsoid::data_vel(int m, char **values) -{ - v[m][0] = utils::numeric(FLERR,values[0],true,lmp); - v[m][1] = utils::numeric(FLERR,values[1],true,lmp); - v[m][2] = utils::numeric(FLERR,values[2],true,lmp); - angmom[m][0] = utils::numeric(FLERR,values[3],true,lmp); - angmom[m][1] = utils::numeric(FLERR,values[4],true,lmp); - angmom[m][2] = utils::numeric(FLERR,values[5],true,lmp); -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Velocities section of data file -------------------------------------------------------------------------- */ - -int AtomVecEllipsoid::data_vel_hybrid(int m, char **values) -{ - angmom[m][0] = utils::numeric(FLERR,values[0],true,lmp); - angmom[m][1] = utils::numeric(FLERR,values[1],true,lmp); - angmom[m][2] = utils::numeric(FLERR,values[2],true,lmp); - return 3; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecEllipsoid::pack_data(double **buf) -{ - double *shape; - - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - if (ellipsoid[i] < 0) buf[i][2] = ubuf(0).d; - else buf[i][2] = ubuf(1).d; - if (ellipsoid[i] < 0) buf[i][3] = rmass[i]; - else { - shape = bonus[ellipsoid[i]].shape; - buf[i][3] = rmass[i] / (4.0*MY_PI/3.0 * shape[0]*shape[1]*shape[2]); - } - buf[i][4] = x[i][0]; - buf[i][5] = x[i][1]; - buf[i][6] = x[i][2]; - buf[i][7] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecEllipsoid::pack_data_hybrid(int i, double *buf) -{ - if (ellipsoid[i] < 0) buf[0] = ubuf(0).d; - else buf[0] = ubuf(1).d; - if (ellipsoid[i] < 0) buf[1] = rmass[i]; - else { - double *shape = bonus[ellipsoid[i]].shape; - buf[1] = rmass[i] / (4.0*MY_PI/3.0 * shape[0]*shape[1]*shape[2]); - } - return 2; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecEllipsoid::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %d %d %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - (int) ubuf(buf[i][2]).i, - buf[i][3],buf[i][4],buf[i][5],buf[i][6], - (int) ubuf(buf[i][7]).i,(int) ubuf(buf[i][8]).i, - (int) ubuf(buf[i][9]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecEllipsoid::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %d %-1.16e",(int) ubuf(buf[0]).i,buf[1]); - return 2; -} - -/* ---------------------------------------------------------------------- - pack velocity info for data file -------------------------------------------------------------------------- */ - -void AtomVecEllipsoid::pack_vel(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = v[i][0]; - buf[i][2] = v[i][1]; - buf[i][3] = v[i][2]; - buf[i][4] = angmom[i][0]; - buf[i][5] = angmom[i][1]; - buf[i][6] = angmom[i][2]; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid velocity info for data file -------------------------------------------------------------------------- */ - -int AtomVecEllipsoid::pack_vel_hybrid(int i, double *buf) -{ - buf[0] = angmom[i][0]; - buf[1] = angmom[i][1]; - buf[2] = angmom[i][2]; - return 3; -} - -/* ---------------------------------------------------------------------- - write velocity info to data file -------------------------------------------------------------------------- */ - -void AtomVecEllipsoid::write_vel(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e\n", - (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3], - buf[i][4],buf[i][5],buf[i][6]); -} - -/* ---------------------------------------------------------------------- - write hybrid velocity info to data file -------------------------------------------------------------------------- */ - -int AtomVecEllipsoid::write_vel_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %-1.16e %-1.16e",buf[0],buf[1],buf[2]); - return 3; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecEllipsoid::memory_usage() +bigint AtomVecEllipsoid::memory_usage_bonus() { bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); - if (atom->memcheck("angmom")) bytes += memory->usage(angmom,nmax,3); - if (atom->memcheck("torque")) - bytes += memory->usage(torque,nmax*comm->nthreads,3); - if (atom->memcheck("ellipsoid")) bytes += memory->usage(ellipsoid,nmax); - bytes += nmax_bonus*sizeof(Bonus); - return bytes; } + +/* ---------------------------------------------------------------------- + initialize non-zero atom quantities +------------------------------------------------------------------------- */ + +void AtomVecEllipsoid::create_atom_post(int ilocal) +{ + atom->rmass[ilocal] = 1.0; + atom->ellipsoid[ilocal] = -1; +} + +/* ---------------------------------------------------------------------- + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities +------------------------------------------------------------------------- */ + +void AtomVecEllipsoid::data_atom_post(int ilocal) +{ + ellipsoid_flag = atom->ellipsoid[ilocal]; + if (ellipsoid_flag == 0) ellipsoid_flag = -1; + else if (ellipsoid_flag == 1) ellipsoid_flag = 0; + else error->one(FLERR,"Invalid ellipsoid flag in Atoms section of data file"); + atom->ellipsoid[ilocal] = ellipsoid_flag; + + if (atom->rmass[ilocal] <= 0.0) + error->one(FLERR,"Invalid density in Atoms section of data file"); +} + +/* ---------------------------------------------------------------------- + modify values for AtomVec::pack_data() to pack +------------------------------------------------------------------------- */ + +void AtomVecEllipsoid::pack_data_pre(int ilocal) +{ + double *shape; + + ellipsoid_flag = atom->ellipsoid[ilocal]; + rmass = atom->rmass[ilocal]; + + if (ellipsoid_flag < 0) atom->ellipsoid[ilocal] = 0; + else atom->ellipsoid[ilocal] = 1; + + if (ellipsoid_flag >= 0) { + shape = bonus[ellipsoid_flag].shape; + atom->rmass[ilocal] /= 4.0*MY_PI/3.0 * shape[0]*shape[1]*shape[2]; + } +} + +/* ---------------------------------------------------------------------- + unmodify values packed by AtomVec::pack_data() +------------------------------------------------------------------------- */ + +void AtomVecEllipsoid::pack_data_post(int ilocal) +{ + atom->ellipsoid[ilocal] = ellipsoid_flag; + atom->rmass[ilocal] = rmass; +} + +/* ---------------------------------------------------------------------- + set shape values in bonus data for particle I + oriented aligned with xyz axes + this may create or delete entry in bonus data +------------------------------------------------------------------------- */ + +void AtomVecEllipsoid:: +set_shape(int i, double shapex, double shapey, double shapez) +{ + int *ellipsoid = atom->ellipsoid; + + if (ellipsoid[i] < 0) { + if (shapex == 0.0 && shapey == 0.0 && shapez == 0.0) return; + if (nlocal_bonus == nmax_bonus) grow_bonus(); + double *shape = bonus[nlocal_bonus].shape; + double *quat = bonus[nlocal_bonus].quat; + shape[0] = shapex; + shape[1] = shapey; + shape[2] = shapez; + quat[0] = 1.0; + quat[1] = 0.0; + quat[2] = 0.0; + quat[3] = 0.0; + bonus[nlocal_bonus].ilocal = i; + ellipsoid[i] = nlocal_bonus++; + } else if (shapex == 0.0 && shapey == 0.0 && shapez == 0.0) { + copy_bonus_all(nlocal_bonus-1,ellipsoid[i]); + nlocal_bonus--; + ellipsoid[i] = -1; + } else { + double *shape = bonus[ellipsoid[i]].shape; + shape[0] = shapex; + shape[1] = shapey; + shape[2] = shapez; + } +} diff --git a/src/atom_vec_ellipsoid.h b/src/atom_vec_ellipsoid.h index d71859624e..70797c59d5 100644 --- a/src/atom_vec_ellipsoid.h +++ b/src/atom_vec_ellipsoid.h @@ -35,49 +35,26 @@ class AtomVecEllipsoid : public AtomVec { AtomVecEllipsoid(class LAMMPS *); ~AtomVecEllipsoid(); - void grow(int); - void grow_reset(); - void copy(int, int, int); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - int pack_reverse_hybrid(int, int, double *); - void unpack_reverse(int, int *, double *); - int unpack_reverse_hybrid(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void data_vel(int, char **); - int data_vel_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - void pack_vel(double **); - int pack_vel_hybrid(int, double *); - void write_vel(FILE *, int, double **); - int write_vel_hybrid(FILE *, double *); - bigint memory_usage(); - - // manipulate Bonus data structure for extra atom info + void copy_bonus(int, int, int); void clear_bonus(); + int pack_comm_bonus(int, int *, double *); + void unpack_comm_bonus(int, int, double *); + int pack_reverse_bonus(int, int, double *); + int pack_border_bonus(int, int *, double *); + int unpack_border_bonus(int, int, double *); + int pack_exchange_bonus(int, double *); + int unpack_exchange_bonus(int, double *); + int size_restart_bonus(); + int pack_restart_bonus(int, double *); + int unpack_restart_bonus(int, double *); void data_atom_bonus(int, char **); + bigint memory_usage_bonus(); + + void create_atom_post(int); + void data_atom_post(int); + void pack_data_pre(int); + void pack_data_post(int); // unique to AtomVecEllipsoid @@ -86,18 +63,12 @@ class AtomVecEllipsoid : public AtomVec { int nlocal_bonus; private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double *rmass; - double **angmom,**torque; - int *ellipsoid; - int nghost_bonus,nmax_bonus; + int ellipsoid_flag; + double rmass; void grow_bonus(); - void copy_bonus(int, int); + void copy_bonus_all(int, int); }; } diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index 695ced13fd..3b806c959e 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -15,7 +15,6 @@ #include #include #include "atom.h" -#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -34,16 +33,12 @@ using namespace MathConst; AtomVecLine::AtomVecLine(LAMMPS *lmp) : AtomVec(lmp) { molecular = 0; + bonus_flag = 1; - comm_x_only = comm_f_only = 0; - size_forward = 4; - size_reverse = 6; - size_border = 12; - size_velocity = 6; - size_data_atom = 8; - size_data_vel = 7; + size_forward_bonus = 1; + size_border_bonus = 3; + size_restart_bonus_one = 2; size_data_bonus = 5; - xcol_data = 6; atom->line_flag = 1; atom->molecule_flag = atom->rmass_flag = 1; @@ -52,6 +47,26 @@ AtomVecLine::AtomVecLine(LAMMPS *lmp) : AtomVec(lmp) nlocal_bonus = nghost_bonus = nmax_bonus = 0; bonus = NULL; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "molecule radius rmass omega torque line"; + fields_copy = (char *) "molecule radius rmass omega"; + fields_comm = NULL; + fields_comm_vel = (char *) "omega"; + fields_reverse = (char *) "torque"; + fields_border = (char *) "molecule radius rmass"; + fields_border_vel = (char *) "molecule radius rmass omega"; + fields_exchange = (char *) "molecule radius rmass omega"; + fields_restart = (char *) "molecule radius rmass omega"; + fields_create = (char *) "molecule radius rmass omega line"; + fields_data_atom = (char *) "id molecule type line rmass x"; + fields_data_vel = (char *) "omega"; + + setup_fields(); } /* ---------------------------------------------------------------------- */ @@ -71,54 +86,6 @@ void AtomVecLine::init() error->all(FLERR,"Atom_style line can only be used in 2d simulations"); } -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecLine::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); - rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); - radius = memory->grow(atom->radius,nmax,"atom:radius"); - omega = memory->grow(atom->omega,nmax,3,"atom:omega"); - torque = memory->grow(atom->torque,nmax*comm->nthreads,3,"atom:torque"); - line = memory->grow(atom->line,nmax,"atom:line"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecLine::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - molecule = atom->molecule; rmass = atom->rmass; - radius = atom->radius; omega = atom->omega; torque = atom->torque; - line = atom->line; -} - /* ---------------------------------------------------------------------- grow bonus data structure ------------------------------------------------------------------------- */ @@ -137,30 +104,14 @@ void AtomVecLine::grow_bonus() copy atom I info to atom J ------------------------------------------------------------------------- */ -void AtomVecLine::copy(int i, int j, int delflag) +void AtomVecLine::copy_bonus(int i, int j, int delflag) { - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - molecule[j] = molecule[i]; - rmass[j] = rmass[i]; - radius[j] = radius[i]; - omega[j][0] = omega[i][0]; - omega[j][1] = omega[i][1]; - omega[j][2] = omega[i][2]; + int *line = atom->line; // if deleting atom J via delflag and J has bonus data, then delete it if (delflag && line[j] >= 0) { - copy_bonus(nlocal_bonus-1,line[j]); + copy_bonus_all(nlocal_bonus-1,line[j]); nlocal_bonus--; } @@ -169,10 +120,6 @@ void AtomVecLine::copy(int i, int j, int delflag) if (line[i] >= 0 && i != j) bonus[line[i]].ilocal = j; line[j] = line[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); } /* ---------------------------------------------------------------------- @@ -180,9 +127,9 @@ void AtomVecLine::copy(int i, int j, int delflag) also reset line that points to I to now point to J ------------------------------------------------------------------------- */ -void AtomVecLine::copy_bonus(int i, int j) +void AtomVecLine::copy_bonus_all(int i, int j) { - line[bonus[i].ilocal] = j; + atom->line[bonus[i].ilocal] = j; memcpy(&bonus[j],&bonus[i],sizeof(Bonus)); } @@ -200,473 +147,49 @@ void AtomVecLine::clear_bonus() modify->fix[atom->extra_grow[iextra]]->clear_bonus(); } -/* ---------------------------------------------------------------------- - set length value in bonus data for particle I - oriented along x axis - this may create or delete entry in bonus data -------------------------------------------------------------------------- */ - -void AtomVecLine::set_length(int i, double value) -{ - if (line[i] < 0) { - if (value == 0.0) return; - if (nlocal_bonus == nmax_bonus) grow_bonus(); - bonus[nlocal_bonus].length = value; - bonus[nlocal_bonus].theta = 0.0; - bonus[nlocal_bonus].ilocal = i; - line[i] = nlocal_bonus++; - } else if (value == 0.0) { - copy_bonus(nlocal_bonus-1,line[i]); - nlocal_bonus--; - line[i] = -1; - } else bonus[line[i]].length = value; - - // also set radius = half of length - // unless value = 0.0, then set diameter = 1.0 - - radius[i] = 0.5 * value; - if (value == 0.0) radius[i] = 0.5; -} - /* ---------------------------------------------------------------------- */ -int AtomVecLine::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) +int AtomVecLine::pack_comm_bonus(int n, int *list, double *buf) { int i,j,m; - double dx,dy,dz; - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; - } - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecLine::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecLine::pack_comm_hybrid(int n, int *list, double *buf) -{ - int i,j,m; + int *line = atom->line; m = 0; for (i = 0; i < n; i++) { j = list[i]; if (line[j] >= 0) buf[m++] = bonus[line[j]].theta; } + return m; } /* ---------------------------------------------------------------------- */ -void AtomVecLine::unpack_comm(int n, int first, double *buf) +void AtomVecLine::unpack_comm_bonus(int n, int first, double *buf) { int i,m,last; + int *line = atom->line; + m = 0; last = first + n; for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; if (line[i] >= 0) bonus[line[i]].theta = buf[m++]; } } /* ---------------------------------------------------------------------- */ -void AtomVecLine::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - if (line[i] >= 0) bonus[line[i]].theta = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - omega[i][0] = buf[m++]; - omega[i][1] = buf[m++]; - omega[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecLine::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) - if (line[i] >= 0) bonus[line[i]].theta = buf[m++]; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecLine::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = torque[i][0]; - buf[m++] = torque[i][1]; - buf[m++] = torque[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecLine::pack_reverse_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = torque[i][0]; - buf[m++] = torque[i][1]; - buf[m++] = torque[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecLine::unpack_reverse(int n, int *list, double *buf) +int AtomVecLine::pack_border_bonus(int n, int *list, double *buf) { int i,j,m; + int *line = atom->line; + m = 0; for (i = 0; i < n; i++) { j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - torque[j][0] += buf[m++]; - torque[j][1] += buf[m++]; - torque[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecLine::unpack_reverse_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - torque[j][0] += buf[m++]; - torque[j][1] += buf[m++]; - torque[j][2] += buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecLine::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (line[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - buf[m++] = bonus[line[j]].length; - buf[m++] = bonus[line[j]].theta; - } - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (line[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - buf[m++] = bonus[line[j]].length; - buf[m++] = bonus[line[j]].theta; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecLine::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (line[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - buf[m++] = bonus[line[j]].length; - buf[m++] = bonus[line[j]].theta; - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (line[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - buf[m++] = bonus[line[j]].length; - buf[m++] = bonus[line[j]].theta; - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (line[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - buf[m++] = bonus[line[j]].length; - buf[m++] = bonus[line[j]].theta; - } - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecLine::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; if (line[j] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -674,28 +197,21 @@ int AtomVecLine::pack_border_hybrid(int n, int *list, double *buf) buf[m++] = bonus[line[j]].theta; } } + return m; } /* ---------------------------------------------------------------------- */ -void AtomVecLine::unpack_border(int n, int first, double *buf) +int AtomVecLine::unpack_border_bonus(int n, int first, double *buf) { int i,j,m,last; + int *line = atom->line; + m = 0; last = first + n; for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; line[i] = (int) ubuf(buf[m++]).i; if (line[i] == 0) line[i] = -1; else { @@ -709,80 +225,6 @@ void AtomVecLine::unpack_border(int n, int first, double *buf) } } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecLine::unpack_border_vel(int n, int first, double *buf) -{ - int i,j,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - line[i] = (int) ubuf(buf[m++]).i; - if (line[i] == 0) line[i] = -1; - else { - j = nlocal_bonus + nghost_bonus; - if (j == nmax_bonus) grow_bonus(); - bonus[j].length = buf[m++]; - bonus[j].theta = buf[m++]; - bonus[j].ilocal = i; - line[i] = j; - nghost_bonus++; - } - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - omega[i][0] = buf[m++]; - omega[i][1] = buf[m++]; - omega[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecLine::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,j,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - molecule[i] = (tagint) ubuf(buf[m++]).i; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - line[i] = (int) ubuf(buf[m++]).i; - if (line[i] == 0) line[i] = -1; - else { - j = nlocal_bonus + nghost_bonus; - if (j == nmax_bonus) grow_bonus(); - bonus[j].length = buf[m++]; - bonus[j].theta = buf[m++]; - bonus[j].ilocal = i; - line[i] = j; - nghost_bonus++; - } - } return m; } @@ -791,26 +233,11 @@ int AtomVecLine::unpack_border_hybrid(int n, int first, double *buf) xyz must be 1st 3 values, so comm::exchange() can test on them ------------------------------------------------------------------------- */ -int AtomVecLine::pack_exchange(int i, double *buf) +int AtomVecLine::pack_exchange_bonus(int i, double *buf) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; + int m = 0; - buf[m++] = ubuf(molecule[i]).d; - buf[m++] = rmass[i]; - buf[m++] = radius[i]; - buf[m++] = omega[i][0]; - buf[m++] = omega[i][1]; - buf[m++] = omega[i][2]; + int *line = atom->line; if (line[i] < 0) buf[m++] = ubuf(0).d; else { @@ -820,56 +247,27 @@ int AtomVecLine::pack_exchange(int i, double *buf) buf[m++] = bonus[j].theta; } - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; return m; } /* ---------------------------------------------------------------------- */ -int AtomVecLine::unpack_exchange(double *buf) +int AtomVecLine::unpack_exchange_bonus(int ilocal, double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + int m = 0; - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; + int *line = atom->line; - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - rmass[nlocal] = buf[m++]; - radius[nlocal] = buf[m++]; - omega[nlocal][0] = buf[m++]; - omega[nlocal][1] = buf[m++]; - omega[nlocal][2] = buf[m++]; - - line[nlocal] = (int) ubuf(buf[m++]).i; - if (line[nlocal] == 0) line[nlocal] = -1; + line[ilocal] = (int) ubuf(buf[m++]).i; + if (line[ilocal] == 0) line[ilocal] = -1; else { if (nlocal_bonus == nmax_bonus) grow_bonus(); bonus[nlocal_bonus].length = buf[m++]; bonus[nlocal_bonus].theta = buf[m++]; - bonus[nlocal_bonus].ilocal = nlocal; - line[nlocal] = nlocal_bonus++; + bonus[nlocal_bonus].ilocal = ilocal; + line[ilocal] = nlocal_bonus++; } - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; return m; } @@ -878,20 +276,18 @@ int AtomVecLine::unpack_exchange(double *buf) include extra data stored by fixes ------------------------------------------------------------------------- */ -int AtomVecLine::size_restart() +int AtomVecLine::size_restart_bonus() { int i; + int *line = atom->line; + int n = 0; int nlocal = atom->nlocal; - for (i = 0; i < nlocal; i++) - if (line[i] >= 0) n += 20; - else n += 18; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); + for (i = 0; i < nlocal; i++) { + if (line[i] >= 0) n += size_restart_bonus_one; + n++; + } return n; } @@ -902,26 +298,11 @@ int AtomVecLine::size_restart() molecular types may be negative, but write as positive ------------------------------------------------------------------------- */ -int AtomVecLine::pack_restart(int i, double *buf) +int AtomVecLine::pack_restart_bonus(int i, double *buf) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; + int m = 0; - buf[m++] = ubuf(molecule[i]).d; - buf[m++] = rmass[i]; - buf[m++] = radius[i]; - buf[m++] = omega[i][0]; - buf[m++] = omega[i][1]; - buf[m++] = omega[i][2]; + int *line = atom->line; if (line[i] < 0) buf[m++] = ubuf(0).d; else { @@ -931,180 +312,40 @@ int AtomVecLine::pack_restart(int i, double *buf) buf[m++] = bonus[j].theta; } - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; return m; } /* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities + unpack data for one atom from restart file including bonus data ------------------------------------------------------------------------- */ -int AtomVecLine::unpack_restart(double *buf) +int AtomVecLine::unpack_restart_bonus(int ilocal, double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } + int m = 0; - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; + int *line = atom->line; - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - rmass[nlocal] = buf[m++]; - radius[nlocal] = buf[m++]; - omega[nlocal][0] = buf[m++]; - omega[nlocal][1] = buf[m++]; - omega[nlocal][2] = buf[m++]; - - line[nlocal] = (int) ubuf(buf[m++]).i; - if (line[nlocal] == 0) line[nlocal] = -1; + line[ilocal] = (int) ubuf(buf[m++]).i; + if (line[ilocal] == 0) line[ilocal] = -1; else { if (nlocal_bonus == nmax_bonus) grow_bonus(); bonus[nlocal_bonus].length = buf[m++]; bonus[nlocal_bonus].theta = buf[m++]; - bonus[nlocal_bonus].ilocal = nlocal; - line[nlocal] = nlocal_bonus++; + bonus[nlocal_bonus].ilocal = ilocal; + line[ilocal] = nlocal_bonus++; } - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; return m; } -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecLine::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - molecule[nlocal] = 0; - radius[nlocal] = 0.5; - rmass[nlocal] = 4.0*MY_PI/3.0 * radius[nlocal]*radius[nlocal]*radius[nlocal]; - omega[nlocal][0] = 0.0; - omega[nlocal][1] = 0.0; - omega[nlocal][2] = 0.0; - line[nlocal] = -1; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecLine::data_atom(double *coord, imageint imagetmp, char **values) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - line[nlocal] = utils::inumeric(FLERR,values[3],true,lmp); - if (line[nlocal] == 0) line[nlocal] = -1; - else if (line[nlocal] == 1) line[nlocal] = 0; - else error->one(FLERR,"Invalid lineflag in Atoms section of data file"); - - rmass[nlocal] = utils::numeric(FLERR,values[4],true,lmp); - if (rmass[nlocal] <= 0.0) - error->one(FLERR,"Invalid density in Atoms section of data file"); - - if (line[nlocal] < 0) { - radius[nlocal] = 0.5; - rmass[nlocal] *= 4.0*MY_PI/3.0 * - radius[nlocal]*radius[nlocal]*radius[nlocal]; - } else radius[nlocal] = 0.0; - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - omega[nlocal][0] = 0.0; - omega[nlocal][1] = 0.0; - omega[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecLine::data_atom_hybrid(int nlocal, char **values) -{ - molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - - line[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (line[nlocal] == 0) line[nlocal] = -1; - else if (line[nlocal] == 1) line[nlocal] = 0; - else error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - rmass[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - if (rmass[nlocal] <= 0.0) - error->one(FLERR,"Invalid density in Atoms section of data file"); - - if (line[nlocal] < 0) { - radius[nlocal] = 0.5; - rmass[nlocal] *= 4.0*MY_PI/3.0 * - radius[nlocal]*radius[nlocal]*radius[nlocal]; - } else radius[nlocal] = 0.0; - - return 3; -} - /* ---------------------------------------------------------------------- unpack one line from Lines section of data file ------------------------------------------------------------------------- */ void AtomVecLine::data_atom_bonus(int m, char **values) { + int *line = atom->line; + if (line[m]) error->one(FLERR,"Assigning line parameters to non-line atom"); if (nlocal_bonus == nmax_bonus) grow_bonus(); @@ -1136,188 +377,122 @@ void AtomVecLine::data_atom_bonus(int m, char **values) // reset line radius and mass // rmass currently holds density - radius[m] = 0.5 * length; - rmass[m] *= length; + atom->radius[m] = 0.5 * length; + atom->rmass[m] *= length; bonus[nlocal_bonus].ilocal = m; line[m] = nlocal_bonus++; } /* ---------------------------------------------------------------------- - unpack one line from Velocities section of data file + return # of bytes of allocated bonus memory ------------------------------------------------------------------------- */ -void AtomVecLine::data_vel(int m, char **values) -{ - v[m][0] = utils::numeric(FLERR,values[0],true,lmp); - v[m][1] = utils::numeric(FLERR,values[1],true,lmp); - v[m][2] = utils::numeric(FLERR,values[2],true,lmp); - omega[m][0] = utils::numeric(FLERR,values[3],true,lmp); - omega[m][1] = utils::numeric(FLERR,values[4],true,lmp); - omega[m][2] = utils::numeric(FLERR,values[5],true,lmp); -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Velocities section of data file -------------------------------------------------------------------------- */ - -int AtomVecLine::data_vel_hybrid(int m, char **values) -{ - omega[m][0] = utils::numeric(FLERR,values[0],true,lmp); - omega[m][1] = utils::numeric(FLERR,values[1],true,lmp); - omega[m][2] = utils::numeric(FLERR,values[2],true,lmp); - return 3; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecLine::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(molecule[i]).d; - buf[i][2] = ubuf(type[i]).d; - if (line[i] < 0) buf[i][3] = ubuf(0).d; - else buf[i][3] = ubuf(1).d; - if (line[i] < 0) - buf[i][4] = rmass[i] / (4.0*MY_PI/3.0 * radius[i]*radius[i]*radius[i]); - else buf[i][4] = rmass[i]/bonus[line[i]].length; - buf[i][5] = x[i][0]; - buf[i][6] = x[i][1]; - buf[i][7] = x[i][2]; - buf[i][8] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][10] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecLine::pack_data_hybrid(int i, double *buf) -{ - buf[0] = ubuf(molecule[i]).d; - if (line[i] < 0) buf[1] = ubuf(0).d; - else buf[1] = ubuf(1).d; - if (line[i] < 0) - buf[2] = rmass[i] / (4.0*MY_PI/3.0 * radius[i]*radius[i]*radius[i]); - else buf[2] = rmass[i]/bonus[line[i]].length; - return 3; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecLine::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " " TAGINT_FORMAT - " %d %d %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(tagint) ubuf(buf[i][1]).i, - (int) ubuf(buf[i][2]).i,(int) ubuf(buf[i][3]).i, - buf[i][4],buf[i][5],buf[i][6],buf[i][7], - (int) ubuf(buf[i][8]).i,(int) ubuf(buf[i][9]).i, - (int) ubuf(buf[i][10]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecLine::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," " TAGINT_FORMAT " %d %-1.16e", - (tagint) ubuf(buf[0]).i,(int) ubuf(buf[1]).i,buf[2]); - return 3; -} - -/* ---------------------------------------------------------------------- - pack velocity info for data file -------------------------------------------------------------------------- */ - -void AtomVecLine::pack_vel(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = v[i][0]; - buf[i][2] = v[i][1]; - buf[i][3] = v[i][2]; - buf[i][4] = omega[i][0]; - buf[i][5] = omega[i][1]; - buf[i][6] = omega[i][2]; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid velocity info for data file -------------------------------------------------------------------------- */ - -int AtomVecLine::pack_vel_hybrid(int i, double *buf) -{ - buf[0] = omega[i][0]; - buf[1] = omega[i][1]; - buf[2] = omega[i][2]; - return 3; -} - -/* ---------------------------------------------------------------------- - write velocity info to data file -------------------------------------------------------------------------- */ - -void AtomVecLine::write_vel(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e\n", - (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3], - buf[i][4],buf[i][5],buf[i][6]); -} - -/* ---------------------------------------------------------------------- - write hybrid velocity info to data file -------------------------------------------------------------------------- */ - -int AtomVecLine::write_vel_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %-1.16e %-1.16e",buf[0],buf[1],buf[2]); - return 3; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecLine::memory_usage() +bigint AtomVecLine::memory_usage_bonus() { bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); - if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); - if (atom->memcheck("radius")) bytes += memory->usage(radius,nmax); - if (atom->memcheck("omega")) bytes += memory->usage(omega,nmax,3); - if (atom->memcheck("torque")) - bytes += memory->usage(torque,nmax*comm->nthreads,3); - if (atom->memcheck("line")) bytes += memory->usage(line,nmax); - bytes += nmax_bonus*sizeof(Bonus); - return bytes; } +/* ---------------------------------------------------------------------- + create one atom of itype at coord + set other values to defaults +------------------------------------------------------------------------- */ + +void AtomVecLine::create_atom_post(int ilocal) +{ + double radius = 0.5; + atom->radius[ilocal] = radius; + atom->rmass[ilocal] = 4.0*MY_PI/3.0 * radius*radius*radius; + atom->line[ilocal] = -1; +} + +/* ---------------------------------------------------------------------- + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities +------------------------------------------------------------------------- */ + +void AtomVecLine::data_atom_post(int ilocal) +{ + line_flag = atom->line[ilocal]; + if (line_flag == 0) line_flag = -1; + else if (line_flag == 1) line_flag = 0; + else error->one(FLERR,"Invalid line flag in Atoms section of data file"); + atom->line[ilocal] = line_flag; + + if (atom->rmass[ilocal] <= 0.0) + error->one(FLERR,"Invalid density in Atoms section of data file"); + + if (line_flag < 0) { + double radius = 0.5; + atom->radius[ilocal] = radius; + atom->rmass[ilocal] *= 4.0*MY_PI/3.0 * radius*radius*radius; + } else atom->radius[ilocal] = 0.0; + + atom->omega[ilocal][0] = 0.0; + atom->omega[ilocal][1] = 0.0; + atom->omega[ilocal][2] = 0.0; +} + +/* ---------------------------------------------------------------------- + modify values for AtomVec::pack_data() to pack +------------------------------------------------------------------------- */ + +void AtomVecLine::pack_data_pre(int ilocal) +{ + line_flag = atom->line[ilocal]; + rmass = atom->rmass[ilocal]; + + if (line_flag < 0) atom->line[ilocal] = 0; + else atom->line[ilocal] = 1; + + if (line_flag < 0) { + double radius = atom->radius[ilocal]; + atom->rmass[ilocal] /= 4.0*MY_PI/3.0 * radius*radius*radius; + } else atom->rmass[ilocal] /= bonus[line_flag].length; +} + +/* ---------------------------------------------------------------------- + unmodify values packed by AtomVec::pack_data() +------------------------------------------------------------------------- */ + +void AtomVecLine::pack_data_post(int ilocal) +{ + atom->line[ilocal] = line_flag; + atom->rmass[ilocal] = rmass; +} + +/* ---------------------------------------------------------------------- + set length value in bonus data for particle I + oriented along x axis + this may create or delete entry in bonus data +------------------------------------------------------------------------- */ + +void AtomVecLine::set_length(int i, double value) +{ + int *line = atom->line; + + if (line[i] < 0) { + if (value == 0.0) return; + if (nlocal_bonus == nmax_bonus) grow_bonus(); + bonus[nlocal_bonus].length = value; + bonus[nlocal_bonus].theta = 0.0; + bonus[nlocal_bonus].ilocal = i; + line[i] = nlocal_bonus++; + } else if (value == 0.0) { + copy_bonus_all(nlocal_bonus-1,line[i]); + nlocal_bonus--; + line[i] = -1; + } else bonus[line[i]].length = value; + + // also set radius = half of length + // unless value = 0.0, then set diameter = 1.0 + + atom->radius[i] = 0.5 * value; + if (value == 0.0) atom->radius[i] = 0.5; +} + /* ---------------------------------------------------------------------- check consistency of internal Bonus data structure n = # of atoms in regular structure to check against diff --git a/src/atom_vec_line.h b/src/atom_vec_line.h index 6c8701cfc2..a8bc8fd1bc 100644 --- a/src/atom_vec_line.h +++ b/src/atom_vec_line.h @@ -35,49 +35,26 @@ class AtomVecLine : public AtomVec { AtomVecLine(class LAMMPS *); ~AtomVecLine(); void init(); - void grow(int); - void grow_reset(); - void copy(int, int, int); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - int pack_reverse_hybrid(int, int, double *); - void unpack_reverse(int, int *, double *); - int unpack_reverse_hybrid(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void data_vel(int, char **); - int data_vel_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - void pack_vel(double **); - int pack_vel_hybrid(int, double *); - void write_vel(FILE *, int, double **); - int write_vel_hybrid(FILE *, double *); - bigint memory_usage(); - - // manipulate Bonus data structure for extra atom info + void copy_bonus(int, int, int); void clear_bonus(); + int pack_comm_bonus(int, int *, double *); + void unpack_comm_bonus(int, int, double *); + int pack_reverse_bonus(int, int, double *); + int pack_border_bonus(int, int *, double *); + int unpack_border_bonus(int, int, double *); + int pack_exchange_bonus(int, double *); + int unpack_exchange_bonus(int, double *); + int size_restart_bonus(); + int pack_restart_bonus(int, double *); + int unpack_restart_bonus(int, double *); void data_atom_bonus(int, char **); + bigint memory_usage_bonus(); + + void create_atom_post(int); + void data_atom_post(int); + void pack_data_pre(int); + void pack_data_post(int); // unique to AtomVecLine @@ -86,19 +63,12 @@ class AtomVecLine : public AtomVec { int nlocal_bonus; private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - tagint *molecule; - double *rmass,*radius; - double **omega,**torque; - int *line; - int nghost_bonus,nmax_bonus; + int line_flag; + double rmass; void grow_bonus(); - void copy_bonus(int, int); + void copy_bonus_all(int, int); // void consistency_check(int, char *); }; diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index b44aa69035..5ae4c0ca21 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -94,7 +94,7 @@ void AtomVecSphere::init() } /* ---------------------------------------------------------------------- - initialize other atom quantities + initialize non-zero atom quantities ------------------------------------------------------------------------- */ void AtomVecSphere::create_atom_post(int ilocal) @@ -117,7 +117,7 @@ void AtomVecSphere::data_atom_post(int ilocal) 4.0*MY_PI/3.0 * radius*radius*radius * atom->rmass[ilocal]; if (atom->rmass[ilocal] <= 0.0) - error->one(FLERR,"Invalid mass in Atoms section of data file"); + error->one(FLERR,"Invalid density in Atoms section of data file"); } /* ---------------------------------------------------------------------- diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index 3b7bfe5377..6da0ef7015 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -16,7 +16,6 @@ #include #include "math_extra.h" #include "atom.h" -#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -35,16 +34,12 @@ using namespace MathConst; AtomVecTri::AtomVecTri(LAMMPS *lmp) : AtomVec(lmp) { molecular = 0; + bonus_flag = 1; - comm_x_only = comm_f_only = 0; - size_forward = 7; - size_reverse = 6; - size_border = 26; - size_velocity = 9; - size_data_atom = 8; - size_data_vel = 7; + size_forward_bonus = 4; + size_border_bonus = 17; + size_restart_bonus_one = 16; size_data_bonus = 10; - xcol_data = 6; atom->tri_flag = 1; atom->molecule_flag = atom->rmass_flag = 1; @@ -55,8 +50,25 @@ AtomVecTri::AtomVecTri(LAMMPS *lmp) : AtomVec(lmp) nlocal_bonus = nghost_bonus = nmax_bonus = 0; bonus = NULL; - if (domain->dimension != 3) - error->all(FLERR,"Atom_style tri can only be used in 3d simulations"); + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in the string does not matter + // except fields_data_atom and fields_data_vel which must match data file + + fields_grow = (char *) "molecule radius rmass omega angmom torque tri"; + fields_copy = (char *) "molecule radius rmass omega angmom"; + fields_comm = NULL; + fields_comm_vel = (char *) "omega angmom"; + fields_reverse = (char *) "torque"; + fields_border = (char *) "molecule radius rmass"; + fields_border_vel = (char *) "molecule radius rmass omega"; + fields_exchange = (char *) "molecule radius rmass omega angmom"; + fields_restart = (char *) "molecule radius rmass omega angmom"; + fields_create = (char *) "molecule radius rmass omega angmom line"; + fields_data_atom = (char *) "id molecule type tri rmass x"; + fields_data_vel = (char *) "omega angmom"; + + setup_fields(); } /* ---------------------------------------------------------------------- */ @@ -76,56 +88,6 @@ void AtomVecTri::init() error->all(FLERR,"Atom_style tri can only be used in 3d simulations"); } -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n -------------------------------------------------------------------------- */ - -void AtomVecTri::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); - rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); - radius = memory->grow(atom->radius,nmax,"atom:radius"); - omega = memory->grow(atom->omega,nmax,3,"atom:omega"); - angmom = memory->grow(atom->angmom,nmax,3,"atom:angmom"); - torque = memory->grow(atom->torque,nmax*comm->nthreads,3,"atom:torque"); - tri = memory->grow(atom->tri,nmax,"atom:tri"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecTri::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - molecule = atom->molecule; rmass = atom->rmass; - radius = atom->radius; omega = atom->omega; - angmom = atom->angmom; torque = atom->torque; - tri = atom->tri; -} - /* ---------------------------------------------------------------------- grow bonus data structure ------------------------------------------------------------------------- */ @@ -145,33 +107,14 @@ void AtomVecTri::grow_bonus() if delflag and atom J has bonus data, then delete it ------------------------------------------------------------------------- */ -void AtomVecTri::copy(int i, int j, int delflag) +void AtomVecTri::copy_bonus(int i, int j, int delflag) { - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - molecule[j] = molecule[i]; - rmass[j] = rmass[i]; - radius[j] = radius[i]; - omega[j][0] = omega[i][0]; - omega[j][1] = omega[i][1]; - omega[j][2] = omega[i][2]; - angmom[j][0] = angmom[i][0]; - angmom[j][1] = angmom[i][1]; - angmom[j][2] = angmom[i][2]; + int *tri = atom->tri; // if deleting atom J via delflag and J has bonus data, then delete it if (delflag && tri[j] >= 0) { - copy_bonus(nlocal_bonus-1,tri[j]); + copy_bonus_all(nlocal_bonus-1,tri[j]); nlocal_bonus--; } @@ -180,10 +123,6 @@ void AtomVecTri::copy(int i, int j, int delflag) if (tri[i] >= 0 && i != j) bonus[tri[i]].ilocal = j; tri[j] = tri[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); } /* ---------------------------------------------------------------------- @@ -191,9 +130,9 @@ void AtomVecTri::copy(int i, int j, int delflag) also reset tri that points to I to now point to J ------------------------------------------------------------------------- */ -void AtomVecTri::copy_bonus(int i, int j) +void AtomVecTri::copy_bonus_all(int i, int j) { - tri[bonus[i].ilocal] = j; + atom->tri[bonus[i].ilocal] = j; memcpy(&bonus[j],&bonus[i],sizeof(Bonus)); } @@ -211,233 +150,15 @@ void AtomVecTri::clear_bonus() modify->fix[atom->extra_grow[iextra]]->clear_bonus(); } -/* ---------------------------------------------------------------------- - set equilateral tri of size in bonus data for particle I - oriented symmetrically in xy plane - this may create or delete entry in bonus data -------------------------------------------------------------------------- */ - -void AtomVecTri::set_equilateral(int i, double size) -{ - // also set radius = distance from center to corner-pt = len(c1) - // unless size = 0.0, then set diameter = 1.0 - - if (tri[i] < 0) { - if (size == 0.0) return; - if (nlocal_bonus == nmax_bonus) grow_bonus(); - double *quat = bonus[nlocal_bonus].quat; - double *c1 = bonus[nlocal_bonus].c1; - double *c2 = bonus[nlocal_bonus].c2; - double *c3 = bonus[nlocal_bonus].c3; - double *inertia = bonus[nlocal_bonus].inertia; - quat[0] = 1.0; - quat[1] = 0.0; - quat[2] = 0.0; - quat[3] = 0.0; - c1[0] = -size/2.0; - c1[1] = -sqrt(3.0)/2.0 * size / 3.0; - c1[2] = 0.0; - c2[0] = size/2.0; - c2[1] = -sqrt(3.0)/2.0 * size / 3.0; - c2[2] = 0.0; - c3[0] = 0.0; - c3[1] = sqrt(3.0)/2.0 * size * 2.0/3.0; - c3[2] = 0.0; - inertia[0] = sqrt(3.0)/96.0 * size*size*size*size; - inertia[1] = sqrt(3.0)/96.0 * size*size*size*size; - inertia[2] = sqrt(3.0)/48.0 * size*size*size*size; - radius[i] = MathExtra::len3(c1); - bonus[nlocal_bonus].ilocal = i; - tri[i] = nlocal_bonus++; - } else if (size == 0.0) { - radius[i] = 0.5; - copy_bonus(nlocal_bonus-1,tri[i]); - nlocal_bonus--; - tri[i] = -1; - } else { - double *c1 = bonus[tri[i]].c1; - double *c2 = bonus[tri[i]].c2; - double *c3 = bonus[tri[i]].c3; - double *inertia = bonus[tri[i]].inertia; - c1[0] = -size/2.0; - c1[1] = -sqrt(3.0)/2.0 * size / 3.0; - c1[2] = 0.0; - c2[0] = size/2.0; - c2[1] = -sqrt(3.0)/2.0 * size / 3.0; - c2[2] = 0.0; - c3[0] = 0.0; - c3[1] = sqrt(3.0)/2.0 * size * 2.0/3.0; - c3[2] = 0.0; - inertia[0] = sqrt(3.0)/96.0 * size*size*size*size; - inertia[1] = sqrt(3.0)/96.0 * size*size*size*size; - inertia[2] = sqrt(3.0)/48.0 * size*size*size*size; - radius[i] = MathExtra::len3(c1); - } -} - /* ---------------------------------------------------------------------- */ -int AtomVecTri::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - double *quat; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - if (tri[j] >= 0) { - quat = bonus[tri[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (tri[j] >= 0) { - quat = bonus[tri[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - } - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTri::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - double *quat; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - if (tri[j] >= 0) { - quat = bonus[tri[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (tri[j] >= 0) { - quat = bonus[tri[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (tri[j] >= 0) { - quat = bonus[tri[j]].quat; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - } - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTri::pack_comm_hybrid(int n, int *list, double *buf) +int AtomVecTri::pack_comm_bonus(int n, int *list, double *buf) { int i,j,m; double *quat; + int *tri = atom->tri; + m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -449,22 +170,22 @@ int AtomVecTri::pack_comm_hybrid(int n, int *list, double *buf) buf[m++] = quat[3]; } } + return m; } /* ---------------------------------------------------------------------- */ -void AtomVecTri::unpack_comm(int n, int first, double *buf) +void AtomVecTri::unpack_comm_bonus(int n, int first, double *buf) { int i,m,last; double *quat; + int *tri = atom->tri; + m = 0; last = first + n; for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; if (tri[i] >= 0) { quat = bonus[tri[i]].quat; quat[0] = buf[m++]; @@ -477,422 +198,16 @@ void AtomVecTri::unpack_comm(int n, int first, double *buf) /* ---------------------------------------------------------------------- */ -void AtomVecTri::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - double *quat; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - if (tri[i] >= 0) { - quat = bonus[tri[i]].quat; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - } - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - omega[i][0] = buf[m++]; - omega[i][1] = buf[m++]; - omega[i][2] = buf[m++]; - angmom[i][0] = buf[m++]; - angmom[i][1] = buf[m++]; - angmom[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTri::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - double *quat; - - m = 0; - last = first + n; - for (i = first; i < last; i++) - if (tri[i] >= 0) { - quat = bonus[tri[i]].quat; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTri::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = torque[i][0]; - buf[m++] = torque[i][1]; - buf[m++] = torque[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTri::pack_reverse_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = torque[i][0]; - buf[m++] = torque[i][1]; - buf[m++] = torque[i][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTri::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - torque[j][0] += buf[m++]; - torque[j][1] += buf[m++]; - torque[j][2] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTri::unpack_reverse_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - torque[j][0] += buf[m++]; - torque[j][1] += buf[m++]; - torque[j][2] += buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTri::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - double *quat,*c1,*c2,*c3,*inertia; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (tri[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - quat = bonus[tri[j]].quat; - c1 = bonus[tri[j]].c1; - c2 = bonus[tri[j]].c2; - c3 = bonus[tri[j]].c3; - inertia = bonus[tri[j]].inertia; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - buf[m++] = c1[0]; - buf[m++] = c1[1]; - buf[m++] = c1[2]; - buf[m++] = c2[0]; - buf[m++] = c2[1]; - buf[m++] = c2[2]; - buf[m++] = c3[0]; - buf[m++] = c3[1]; - buf[m++] = c3[2]; - buf[m++] = inertia[0]; - buf[m++] = inertia[1]; - buf[m++] = inertia[2]; - } - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (tri[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - quat = bonus[tri[j]].quat; - c1 = bonus[tri[j]].c1; - c2 = bonus[tri[j]].c2; - c3 = bonus[tri[j]].c3; - inertia = bonus[tri[j]].inertia; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - buf[m++] = c1[0]; - buf[m++] = c1[1]; - buf[m++] = c1[2]; - buf[m++] = c2[0]; - buf[m++] = c2[1]; - buf[m++] = c2[2]; - buf[m++] = c3[0]; - buf[m++] = c3[1]; - buf[m++] = c3[2]; - buf[m++] = inertia[0]; - buf[m++] = inertia[1]; - buf[m++] = inertia[2]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTri::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - double *quat,*c1,*c2,*c3,*inertia; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (tri[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - quat = bonus[tri[j]].quat; - c1 = bonus[tri[j]].c1; - c2 = bonus[tri[j]].c2; - c3 = bonus[tri[j]].c3; - inertia = bonus[tri[j]].inertia; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - buf[m++] = c1[0]; - buf[m++] = c1[1]; - buf[m++] = c1[2]; - buf[m++] = c2[0]; - buf[m++] = c2[1]; - buf[m++] = c2[2]; - buf[m++] = c3[0]; - buf[m++] = c3[1]; - buf[m++] = c3[2]; - buf[m++] = inertia[0]; - buf[m++] = inertia[1]; - buf[m++] = inertia[2]; - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (tri[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - quat = bonus[tri[j]].quat; - c1 = bonus[tri[j]].c1; - c2 = bonus[tri[j]].c2; - c3 = bonus[tri[j]].c3; - inertia = bonus[tri[j]].inertia; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - buf[m++] = c1[0]; - buf[m++] = c1[1]; - buf[m++] = c1[2]; - buf[m++] = c2[0]; - buf[m++] = c2[1]; - buf[m++] = c2[2]; - buf[m++] = c3[0]; - buf[m++] = c3[1]; - buf[m++] = c3[2]; - buf[m++] = inertia[0]; - buf[m++] = inertia[1]; - buf[m++] = inertia[2]; - } - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - if (tri[j] < 0) buf[m++] = ubuf(0).d; - else { - buf[m++] = ubuf(1).d; - quat = bonus[tri[j]].quat; - c1 = bonus[tri[j]].c1; - c2 = bonus[tri[j]].c2; - c3 = bonus[tri[j]].c3; - inertia = bonus[tri[j]].inertia; - buf[m++] = quat[0]; - buf[m++] = quat[1]; - buf[m++] = quat[2]; - buf[m++] = quat[3]; - buf[m++] = c1[0]; - buf[m++] = c1[1]; - buf[m++] = c1[2]; - buf[m++] = c2[0]; - buf[m++] = c2[1]; - buf[m++] = c2[2]; - buf[m++] = c3[0]; - buf[m++] = c3[1]; - buf[m++] = c3[2]; - buf[m++] = inertia[0]; - buf[m++] = inertia[1]; - buf[m++] = inertia[2]; - } - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = omega[j][0]; - buf[m++] = omega[j][1]; - buf[m++] = omega[j][2]; - buf[m++] = angmom[j][0]; - buf[m++] = angmom[j][1]; - buf[m++] = angmom[j][2]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTri::pack_border_hybrid(int n, int *list, double *buf) +int AtomVecTri::pack_border_bonus(int n, int *list, double *buf) { int i,j,m; double *quat,*c1,*c2,*c3,*inertia; + int *tri = atom->tri; + m = 0; for (i = 0; i < n; i++) { j = list[i]; - buf[m++] = ubuf(molecule[j]).d; - buf[m++] = radius[j]; - buf[m++] = rmass[j]; if (tri[j] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -919,29 +234,22 @@ int AtomVecTri::pack_border_hybrid(int n, int *list, double *buf) buf[m++] = inertia[2]; } } + return m; } /* ---------------------------------------------------------------------- */ -void AtomVecTri::unpack_border(int n, int first, double *buf) +int AtomVecTri::unpack_border_bonus(int n, int first, double *buf) { int i,j,m,last; double *quat,*c1,*c2,*c3,*inertia; + int *tri = atom->tri; + m = 0; last = first + n; for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; tri[i] = (int) ubuf(buf[m++]).i; if (tri[i] == 0) tri[i] = -1; else { @@ -974,123 +282,6 @@ void AtomVecTri::unpack_border(int n, int first, double *buf) } } - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTri::unpack_border_vel(int n, int first, double *buf) -{ - int i,j,m,last; - double *quat,*c1,*c2,*c3,*inertia; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - tri[i] = (int) ubuf(buf[m++]).i; - if (tri[i] == 0) tri[i] = -1; - else { - j = nlocal_bonus + nghost_bonus; - if (j == nmax_bonus) grow_bonus(); - quat = bonus[j].quat; - c1 = bonus[j].c1; - c2 = bonus[j].c2; - c3 = bonus[j].c3; - inertia = bonus[j].inertia; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - c1[0] = buf[m++]; - c1[1] = buf[m++]; - c1[2] = buf[m++]; - c2[0] = buf[m++]; - c2[1] = buf[m++]; - c2[2] = buf[m++]; - c3[0] = buf[m++]; - c3[1] = buf[m++]; - c3[2] = buf[m++]; - inertia[0] = buf[m++]; - inertia[1] = buf[m++]; - inertia[2] = buf[m++]; - bonus[j].ilocal = i; - tri[i] = j; - nghost_bonus++; - } - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - omega[i][0] = buf[m++]; - omega[i][1] = buf[m++]; - omega[i][2] = buf[m++]; - angmom[i][0] = buf[m++]; - angmom[i][1] = buf[m++]; - angmom[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTri::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,j,m,last; - double *quat,*c1,*c2,*c3,*inertia; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - molecule[i] = (tagint) ubuf(buf[m++]).i; - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - tri[i] = (int) ubuf(buf[m++]).i; - if (tri[i] == 0) tri[i] = -1; - else { - j = nlocal_bonus + nghost_bonus; - if (j == nmax_bonus) grow_bonus(); - quat = bonus[j].quat; - c1 = bonus[j].c1; - c2 = bonus[j].c2; - c3 = bonus[j].c3; - inertia = bonus[j].inertia; - quat[0] = buf[m++]; - quat[1] = buf[m++]; - quat[2] = buf[m++]; - quat[3] = buf[m++]; - c1[0] = buf[m++]; - c1[1] = buf[m++]; - c1[2] = buf[m++]; - c2[0] = buf[m++]; - c2[1] = buf[m++]; - c2[2] = buf[m++]; - c3[0] = buf[m++]; - c3[1] = buf[m++]; - c3[2] = buf[m++]; - inertia[0] = buf[m++]; - inertia[1] = buf[m++]; - inertia[2] = buf[m++]; - bonus[j].ilocal = i; - tri[i] = j; - nghost_bonus++; - } - } return m; } @@ -1099,29 +290,11 @@ int AtomVecTri::unpack_border_hybrid(int n, int first, double *buf) xyz must be 1st 3 values, so comm::exchange() can test on them ------------------------------------------------------------------------- */ -int AtomVecTri::pack_exchange(int i, double *buf) +int AtomVecTri::pack_exchange_bonus(int i, double *buf) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; + int m = 0; - buf[m++] = ubuf(molecule[i]).d; - buf[m++] = rmass[i]; - buf[m++] = radius[i]; - buf[m++] = omega[i][0]; - buf[m++] = omega[i][1]; - buf[m++] = omega[i][2]; - buf[m++] = angmom[i][0]; - buf[m++] = angmom[i][1]; - buf[m++] = angmom[i][2]; + int *tri = atom->tri; if (tri[i] < 0) buf[m++] = ubuf(0).d; else { @@ -1150,45 +323,19 @@ int AtomVecTri::pack_exchange(int i, double *buf) buf[m++] = inertia[2]; } - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; return m; } /* ---------------------------------------------------------------------- */ -int AtomVecTri::unpack_exchange(double *buf) +int AtomVecTri::unpack_exchange_bonus(int ilocal, double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); + int m = 0; - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; + int *tri = atom->tri; - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - rmass[nlocal] = buf[m++]; - radius[nlocal] = buf[m++]; - omega[nlocal][0] = buf[m++]; - omega[nlocal][1] = buf[m++]; - omega[nlocal][2] = buf[m++]; - angmom[nlocal][0] = buf[m++]; - angmom[nlocal][1] = buf[m++]; - angmom[nlocal][2] = buf[m++]; - - tri[nlocal] = (int) ubuf(buf[m++]).i; - if (tri[nlocal] == 0) tri[nlocal] = -1; + tri[ilocal] = (int) ubuf(buf[m++]).i; + if (tri[ilocal] == 0) tri[ilocal] = -1; else { if (nlocal_bonus == nmax_bonus) grow_bonus(); double *quat = bonus[nlocal_bonus].quat; @@ -1212,16 +359,10 @@ int AtomVecTri::unpack_exchange(double *buf) inertia[0] = buf[m++]; inertia[1] = buf[m++]; inertia[2] = buf[m++]; - bonus[nlocal_bonus].ilocal = nlocal; - tri[nlocal] = nlocal_bonus++; + bonus[nlocal_bonus].ilocal = ilocal; + tri[ilocal] = nlocal_bonus++; } - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; return m; } @@ -1230,53 +371,31 @@ int AtomVecTri::unpack_exchange(double *buf) include extra data stored by fixes ------------------------------------------------------------------------- */ -int AtomVecTri::size_restart() +int AtomVecTri::size_restart_bonus() { int i; + int *tri = atom->tri; + int n = 0; int nlocal = atom->nlocal; - for (i = 0; i < nlocal; i++) - if (tri[i] >= 0) n += 37; - else n += 21; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); + for (i = 0; i < nlocal; i++) { + if (tri[i] >= 0) n += size_restart_bonus_one; + n++; + } return n; } /* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive + unpack data for one atom from restart file including bonus data ------------------------------------------------------------------------- */ -int AtomVecTri::pack_restart(int i, double *buf) +int AtomVecTri::pack_restart_bonus(int i, double *buf) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; + int m = 0; - buf[m++] = ubuf(molecule[i]).d; - buf[m++] = rmass[i]; - buf[m++] = radius[i]; - buf[m++] = omega[i][0]; - buf[m++] = omega[i][1]; - buf[m++] = omega[i][2]; - buf[m++] = angmom[i][0]; - buf[m++] = angmom[i][1]; - buf[m++] = angmom[i][2]; + int *tri = atom->tri; if (tri[i] < 0) buf[m++] = ubuf(0).d; else { @@ -1305,51 +424,21 @@ int AtomVecTri::pack_restart(int i, double *buf) buf[m++] = inertia[2]; } - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; return m; } /* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities + unpack data for one atom from restart file including bonus data ------------------------------------------------------------------------- */ -int AtomVecTri::unpack_restart(double *buf) +int AtomVecTri::unpack_restart_bonus(int ilocal, double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } + int m = 0; - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; + int *tri = atom->tri; - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - rmass[nlocal] = buf[m++]; - radius[nlocal] = buf[m++]; - omega[nlocal][0] = buf[m++]; - omega[nlocal][1] = buf[m++]; - omega[nlocal][2] = buf[m++]; - angmom[nlocal][0] = buf[m++]; - angmom[nlocal][1] = buf[m++]; - angmom[nlocal][2] = buf[m++]; - - tri[nlocal] = (int) ubuf(buf[m++]).i; - if (tri[nlocal] == 0) tri[nlocal] = -1; + tri[ilocal] = (int) ubuf(buf[m++]).i; + if (tri[ilocal] == 0) tri[ilocal] = -1; else { if (nlocal_bonus == nmax_bonus) grow_bonus(); double *quat = bonus[nlocal_bonus].quat; @@ -1373,140 +462,21 @@ int AtomVecTri::unpack_restart(double *buf) inertia[0] = buf[m++]; inertia[1] = buf[m++]; inertia[2] = buf[m++]; - bonus[nlocal_bonus].ilocal = nlocal; - tri[nlocal] = nlocal_bonus++; + bonus[nlocal_bonus].ilocal = ilocal; + tri[ilocal] = nlocal_bonus++; } - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; return m; } -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecTri::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - molecule[nlocal] = 0; - radius[nlocal] = 0.5; - rmass[nlocal] = 4.0*MY_PI/3.0 * radius[nlocal]*radius[nlocal]*radius[nlocal]; - omega[nlocal][0] = 0.0; - omega[nlocal][1] = 0.0; - omega[nlocal][2] = 0.0; - angmom[nlocal][0] = 0.0; - angmom[nlocal][1] = 0.0; - angmom[nlocal][2] = 0.0; - tri[nlocal] = -1; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecTri::data_atom(double *coord, imageint imagetmp, char **values) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - tri[nlocal] = utils::inumeric(FLERR,values[3],true,lmp); - if (tri[nlocal] == 0) tri[nlocal] = -1; - else if (tri[nlocal] == 1) tri[nlocal] = 0; - else error->one(FLERR,"Invalid triflag in Atoms section of data file"); - - rmass[nlocal] = utils::numeric(FLERR,values[4],true,lmp); - if (rmass[nlocal] <= 0.0) - error->one(FLERR,"Invalid density in Atoms section of data file"); - - if (tri[nlocal] < 0) { - radius[nlocal] = 0.5; - rmass[nlocal] *= 4.0*MY_PI/3.0 * - radius[nlocal]*radius[nlocal]*radius[nlocal]; - } else radius[nlocal] = 0.0; - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - omega[nlocal][0] = 0.0; - omega[nlocal][1] = 0.0; - omega[nlocal][2] = 0.0; - angmom[nlocal][0] = 0.0; - angmom[nlocal][1] = 0.0; - angmom[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one tri in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecTri::data_atom_hybrid(int nlocal, char **values) -{ - molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - - tri[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (tri[nlocal] == 0) tri[nlocal] = -1; - else if (tri[nlocal] == 1) tri[nlocal] = 0; - else error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - rmass[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - if (rmass[nlocal] <= 0.0) - error->one(FLERR,"Invalid density in Atoms section of data file"); - - if (tri[nlocal] < 0) { - radius[nlocal] = 0.5; - rmass[nlocal] *= 4.0*MY_PI/3.0 * - radius[nlocal]*radius[nlocal]*radius[nlocal]; - } else radius[nlocal] = 0.0; - - return 3; -} - /* ---------------------------------------------------------------------- unpack one line from Tris section of data file ------------------------------------------------------------------------- */ void AtomVecTri::data_atom_bonus(int m, char **values) { + int *tri = atom->tri; + if (tri[m]) error->one(FLERR,"Assigning tri parameters to non-tri atom"); if (nlocal_bonus == nmax_bonus) grow_bonus(); @@ -1553,9 +523,9 @@ void AtomVecTri::data_atom_bonus(int m, char **values) if (delta/size > EPSILON) error->one(FLERR,"Inconsistent triangle in data file"); - x[m][0] = centroid[0]; - x[m][1] = centroid[1]; - x[m][2] = centroid[2]; + atom->x[m][0] = centroid[0]; + atom->x[m][1] = centroid[1]; + atom->x[m][2] = centroid[2]; // reset tri radius and mass // rmass currently holds density @@ -1563,22 +533,22 @@ void AtomVecTri::data_atom_bonus(int m, char **values) double c4[3]; MathExtra::sub3(c1,centroid,c4); - radius[m] = MathExtra::lensq3(c4); + atom->radius[m] = MathExtra::lensq3(c4); MathExtra::sub3(c2,centroid,c4); - radius[m] = MAX(radius[m],MathExtra::lensq3(c4)); + atom->radius[m] = MAX(atom->radius[m],MathExtra::lensq3(c4)); MathExtra::sub3(c3,centroid,c4); - radius[m] = MAX(radius[m],MathExtra::lensq3(c4)); - radius[m] = sqrt(radius[m]); + atom->radius[m] = MAX(atom->radius[m],MathExtra::lensq3(c4)); + atom->radius[m] = sqrt(atom->radius[m]); double norm[3]; MathExtra::cross3(c2mc1,c3mc1,norm); double area = 0.5 * MathExtra::len3(norm); - rmass[m] *= area; + atom->rmass[m] *= area; // inertia = inertia tensor of triangle as 6-vector in Voigt notation double inertia[6]; - MathExtra::inertia_triangle(c1,c2,c3,rmass[m],inertia); + MathExtra::inertia_triangle(c1,c2,c3,atom->rmass[m],inertia); // diagonalize inertia tensor via Jacobi rotations // bonus[].inertia = 3 eigenvalues = principal moments of inertia @@ -1635,207 +605,156 @@ void AtomVecTri::data_atom_bonus(int m, char **values) } /* ---------------------------------------------------------------------- - unpack one line from Velocities section of data file + return # of bytes of allocated bonus memory ------------------------------------------------------------------------- */ -void AtomVecTri::data_vel(int m, char **values) -{ - v[m][0] = utils::numeric(FLERR,values[0],true,lmp); - v[m][1] = utils::numeric(FLERR,values[1],true,lmp); - v[m][2] = utils::numeric(FLERR,values[2],true,lmp); - omega[m][0] = utils::numeric(FLERR,values[3],true,lmp); - omega[m][1] = utils::numeric(FLERR,values[4],true,lmp); - omega[m][2] = utils::numeric(FLERR,values[5],true,lmp); - angmom[m][0] = utils::numeric(FLERR,values[6],true,lmp); - angmom[m][1] = utils::numeric(FLERR,values[7],true,lmp); - angmom[m][2] = utils::numeric(FLERR,values[8],true,lmp); -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Velocities section of data file -------------------------------------------------------------------------- */ - -int AtomVecTri::data_vel_hybrid(int m, char **values) -{ - omega[m][0] = utils::numeric(FLERR,values[0],true,lmp); - omega[m][1] = utils::numeric(FLERR,values[1],true,lmp); - omega[m][2] = utils::numeric(FLERR,values[2],true,lmp); - angmom[m][0] = utils::numeric(FLERR,values[3],true,lmp); - angmom[m][1] = utils::numeric(FLERR,values[4],true,lmp); - angmom[m][2] = utils::numeric(FLERR,values[5],true,lmp); - return 6; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecTri::pack_data(double **buf) -{ - double c2mc1[3],c3mc1[3],norm[3]; - double area; - - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(molecule[i]).d; - buf[i][2] = ubuf(type[i]).d; - if (tri[i] < 0) buf[i][3] = ubuf(0).d; - else buf[i][3] = ubuf(1).d; - if (tri[i] < 0) - buf[i][4] = rmass[i] / (4.0*MY_PI/3.0 * radius[i]*radius[i]*radius[i]); - else { - MathExtra::sub3(bonus[tri[i]].c2,bonus[tri[i]].c1,c2mc1); - MathExtra::sub3(bonus[tri[i]].c3,bonus[tri[i]].c1,c3mc1); - MathExtra::cross3(c2mc1,c3mc1,norm); - area = 0.5 * MathExtra::len3(norm); - buf[i][4] = rmass[i]/area; - } - buf[i][5] = x[i][0]; - buf[i][6] = x[i][1]; - buf[i][7] = x[i][2]; - buf[i][8] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][10] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecTri::pack_data_hybrid(int i, double *buf) -{ - buf[0] = ubuf(molecule[i]).d; - if (tri[i] < 0) buf[1] = ubuf(0).d; - else buf[1] = ubuf(1).d; - if (tri[i] < 0) - buf[2] = rmass[i] / (4.0*MY_PI/3.0 * radius[i]*radius[i]*radius[i]); - else { - double c2mc1[3],c3mc1[3],norm[3]; - MathExtra::sub3(bonus[tri[i]].c2,bonus[tri[i]].c1,c2mc1); - MathExtra::sub3(bonus[tri[i]].c3,bonus[tri[i]].c1,c3mc1); - MathExtra::cross3(c2mc1,c3mc1,norm); - double area = 0.5 * MathExtra::len3(norm); - buf[2] = rmass[i]/area; - } - return 3; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecTri::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " " TAGINT_FORMAT - " %d %d %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(tagint) ubuf(buf[i][1]).i, - (int) ubuf(buf[i][2]).i,(int) ubuf(buf[i][3]).i, - buf[i][4],buf[i][5],buf[i][6],buf[i][7], - (int) ubuf(buf[i][8]).i,(int) ubuf(buf[i][9]).i, - (int) ubuf(buf[i][10]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecTri::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," " TAGINT_FORMAT " %d %-1.16e", - (tagint) ubuf(buf[0]).i,(int) ubuf(buf[1]).i,buf[2]); - return 3; -} - -/* ---------------------------------------------------------------------- - pack velocity info for data file -------------------------------------------------------------------------- */ - -void AtomVecTri::pack_vel(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = v[i][0]; - buf[i][2] = v[i][1]; - buf[i][3] = v[i][2]; - buf[i][4] = omega[i][0]; - buf[i][5] = omega[i][1]; - buf[i][6] = omega[i][2]; - buf[i][7] = angmom[i][0]; - buf[i][8] = angmom[i][1]; - buf[i][9] = angmom[i][2]; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid velocity info for data file -------------------------------------------------------------------------- */ - -int AtomVecTri::pack_vel_hybrid(int i, double *buf) -{ - buf[0] = omega[i][0]; - buf[1] = omega[i][1]; - buf[2] = omega[i][2]; - buf[3] = angmom[i][0]; - buf[4] = angmom[i][1]; - buf[5] = angmom[i][2]; - return 6; -} - -/* ---------------------------------------------------------------------- - write velocity info to data file -------------------------------------------------------------------------- */ - -void AtomVecTri::write_vel(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e " - "%-1.16e %-1.16e %-1.16e\n", - (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3], - buf[i][4],buf[i][5],buf[i][6],buf[i][7],buf[i][8],buf[i][9]); -} - -/* ---------------------------------------------------------------------- - write hybrid velocity info to data file -------------------------------------------------------------------------- */ - -int AtomVecTri::write_vel_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e", - buf[0],buf[1],buf[2],buf[3],buf[4],buf[5]); - return 6; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecTri::memory_usage() +bigint AtomVecTri::memory_usage_bonus() { bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); - if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); - if (atom->memcheck("radius")) bytes += memory->usage(radius,nmax); - if (atom->memcheck("omega")) bytes += memory->usage(omega,nmax,3); - if (atom->memcheck("angmom")) bytes += memory->usage(angmom,nmax,3); - if (atom->memcheck("torque")) bytes += - memory->usage(torque,nmax*comm->nthreads,3); - if (atom->memcheck("tri")) bytes += memory->usage(tri,nmax); - bytes += nmax_bonus*sizeof(Bonus); - return bytes; } + +/* ---------------------------------------------------------------------- + create one atom of itype at coord + set other values to defaults +------------------------------------------------------------------------- */ + +void AtomVecTri::create_atom_post(int ilocal) +{ + double radius = 0.5; + atom->radius[ilocal] = radius; + atom->rmass[ilocal] = 4.0*MY_PI/3.0 * radius*radius*radius; + atom->tri[ilocal] = -1; +} + +/* ---------------------------------------------------------------------- + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities +------------------------------------------------------------------------- */ + +void AtomVecTri::data_atom_post(int ilocal) +{ + tri_flag = atom->tri[ilocal]; + if (tri_flag == 0) tri_flag = -1; + else if (tri_flag == 1) tri_flag = 0; + else error->one(FLERR,"Invalid tri flag in Atoms section of data file"); + atom->tri[ilocal] = tri_flag; + + if (atom->rmass[ilocal] <= 0.0) + error->one(FLERR,"Invalid density in Atoms section of data file"); + + if (tri_flag < 0) { + double radius = 0.5; + atom->radius[ilocal] = radius; + atom->rmass[ilocal] *= 4.0*MY_PI/3.0 * radius*radius*radius; + } else atom->radius[ilocal] = 0.0; + + atom->omega[ilocal][0] = 0.0; + atom->omega[ilocal][1] = 0.0; + atom->omega[ilocal][2] = 0.0; + atom->angmom[ilocal][0] = 0.0; + atom->angmom[ilocal][1] = 0.0; + atom->angmom[ilocal][2] = 0.0; +} + +/* ---------------------------------------------------------------------- + modify values for AtomVec::pack_data() to pack +------------------------------------------------------------------------- */ + +void AtomVecTri::pack_data_pre(int ilocal) +{ + tri_flag = atom->tri[ilocal]; + rmass = atom->rmass[ilocal]; + + if (tri_flag < 0) atom->tri[ilocal] = 0; + else atom->tri[ilocal] = 1; + + if (tri_flag < 0) { + double radius = atom->radius[ilocal]; + atom->rmass[ilocal] /= 4.0*MY_PI/3.0 * radius*radius*radius; + } else { + double c2mc1[3],c3mc1[3],norm[3]; + MathExtra::sub3(bonus[tri_flag].c2,bonus[tri_flag].c1,c2mc1); + MathExtra::sub3(bonus[tri_flag].c3,bonus[tri_flag].c1,c3mc1); + MathExtra::cross3(c2mc1,c3mc1,norm); + double area = 0.5 * MathExtra::len3(norm); + atom->rmass[ilocal] /= area; + } +} + +/* ---------------------------------------------------------------------- + unmodify values packed by AtomVec::pack_data() +------------------------------------------------------------------------- */ + +void AtomVecTri::pack_data_post(int ilocal) +{ + atom->tri[ilocal] = tri_flag; + atom->rmass[ilocal] = rmass; +} + +/* ---------------------------------------------------------------------- + set equilateral tri of size in bonus data for particle I + oriented symmetrically in xy plane + this may create or delete entry in bonus data +------------------------------------------------------------------------- */ + +void AtomVecTri::set_equilateral(int i, double size) +{ + // also set radius = distance from center to corner-pt = len(c1) + // unless size = 0.0, then set diameter = 1.0 + + int *tri = atom->tri; + + if (tri[i] < 0) { + if (size == 0.0) return; + if (nlocal_bonus == nmax_bonus) grow_bonus(); + double *quat = bonus[nlocal_bonus].quat; + double *c1 = bonus[nlocal_bonus].c1; + double *c2 = bonus[nlocal_bonus].c2; + double *c3 = bonus[nlocal_bonus].c3; + double *inertia = bonus[nlocal_bonus].inertia; + quat[0] = 1.0; + quat[1] = 0.0; + quat[2] = 0.0; + quat[3] = 0.0; + c1[0] = -size/2.0; + c1[1] = -sqrt(3.0)/2.0 * size / 3.0; + c1[2] = 0.0; + c2[0] = size/2.0; + c2[1] = -sqrt(3.0)/2.0 * size / 3.0; + c2[2] = 0.0; + c3[0] = 0.0; + c3[1] = sqrt(3.0)/2.0 * size * 2.0/3.0; + c3[2] = 0.0; + inertia[0] = sqrt(3.0)/96.0 * size*size*size*size; + inertia[1] = sqrt(3.0)/96.0 * size*size*size*size; + inertia[2] = sqrt(3.0)/48.0 * size*size*size*size; + atom->radius[i] = MathExtra::len3(c1); + bonus[nlocal_bonus].ilocal = i; + tri[i] = nlocal_bonus++; + } else if (size == 0.0) { + atom->radius[i] = 0.5; + copy_bonus_all(nlocal_bonus-1,tri[i]); + nlocal_bonus--; + tri[i] = -1; + } else { + double *c1 = bonus[tri[i]].c1; + double *c2 = bonus[tri[i]].c2; + double *c3 = bonus[tri[i]].c3; + double *inertia = bonus[tri[i]].inertia; + c1[0] = -size/2.0; + c1[1] = -sqrt(3.0)/2.0 * size / 3.0; + c1[2] = 0.0; + c2[0] = size/2.0; + c2[1] = -sqrt(3.0)/2.0 * size / 3.0; + c2[2] = 0.0; + c3[0] = 0.0; + c3[1] = sqrt(3.0)/2.0 * size * 2.0/3.0; + c3[2] = 0.0; + inertia[0] = sqrt(3.0)/96.0 * size*size*size*size; + inertia[1] = sqrt(3.0)/96.0 * size*size*size*size; + inertia[2] = sqrt(3.0)/48.0 * size*size*size*size; + atom->radius[i] = MathExtra::len3(c1); + } +} diff --git a/src/atom_vec_tri.h b/src/atom_vec_tri.h index 81b4c1ada9..3c701067b2 100644 --- a/src/atom_vec_tri.h +++ b/src/atom_vec_tri.h @@ -37,49 +37,26 @@ class AtomVecTri : public AtomVec { AtomVecTri(class LAMMPS *); ~AtomVecTri(); void init(); - void grow(int); - void grow_reset(); - void copy(int, int, int); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - int pack_reverse_hybrid(int, int, double *); - void unpack_reverse(int, int *, double *); - int unpack_reverse_hybrid(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void data_vel(int, char **); - int data_vel_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - void pack_vel(double **); - int pack_vel_hybrid(int, double *); - void write_vel(FILE *, int, double **); - int write_vel_hybrid(FILE *, double *); - bigint memory_usage(); - - // manipulate Bonus data structure for extra atom info + void copy_bonus(int, int, int); void clear_bonus(); + int pack_comm_bonus(int, int *, double *); + void unpack_comm_bonus(int, int, double *); + int pack_reverse_bonus(int, int, double *); + int pack_border_bonus(int, int *, double *); + int unpack_border_bonus(int, int, double *); + int pack_exchange_bonus(int, double *); + int unpack_exchange_bonus(int, double *); + int size_restart_bonus(); + int pack_restart_bonus(int, double *); + int unpack_restart_bonus(int, double *); void data_atom_bonus(int, char **); + bigint memory_usage_bonus(); + + void create_atom_post(int); + void data_atom_post(int); + void pack_data_pre(int); + void pack_data_post(int); // unique to AtomVecTri @@ -88,19 +65,12 @@ class AtomVecTri : public AtomVec { int nlocal_bonus; private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - tagint *molecule; - double *rmass,*radius; - double **omega,**angmom,**torque; - int *tri; - int nghost_bonus,nmax_bonus; + int tri_flag; + double rmass; void grow_bonus(); - void copy_bonus(int, int); + void copy_bonus_all(int, int); }; } diff --git a/src/read_data.cpp b/src/read_data.cpp index d558b87633..aa4e758744 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -568,7 +568,7 @@ void ReadData::command(int narg, char **arg) if (!avec_body) error->all(FLERR,"Invalid data file section: Bodies"); if (atomflag == 0) error->all(FLERR,"Must read Atoms before Bodies"); - bodies(firstpass); + bodies(firstpass,(AtomVec *) avec_body); } else if (strcmp(keyword,"Masses") == 0) { if (firstpass) mass(); @@ -1686,7 +1686,7 @@ void ReadData::bonus(bigint nbonus, AtomVec *ptr, const char *type) if not firstpass, just read past data, but no processing of data ------------------------------------------------------------------------- */ -void ReadData::bodies(int firstpass) +void ReadData::bodies(int firstpass, AtomVec *ptr) { int m,nchunk,nline,nmax,ninteger,ndouble,nword,ncount,onebody,tmp,rv; char *eof; @@ -1770,7 +1770,7 @@ void ReadData::bodies(int firstpass) MPI_Bcast(&m,1,MPI_INT,0,world); MPI_Bcast(buffer,m,MPI_CHAR,0,world); - if (firstpass) atom->data_bodies(nchunk,buffer,avec_body,id_offset); + if (firstpass) atom->data_bodies(nchunk,buffer,ptr,id_offset); nread += nchunk; } diff --git a/src/read_data.h b/src/read_data.h index 98de607f6b..aee54ef3ed 100644 --- a/src/read_data.h +++ b/src/read_data.h @@ -97,7 +97,7 @@ class ReadData : protected Pointers { void impropers(int); void bonus(bigint, class AtomVec *, const char *); - void bodies(int); + void bodies(int, class AtomVec *); void mass(); void paircoeffs(); From ccca80a6a5e5ba9b3d42a5aebaa11552fbd123fe Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Mon, 2 Dec 2019 15:39:54 -0700 Subject: [PATCH 009/577] changes to enable atom_style hybrid to work --- src/DIPOLE/atom_vec_dipole.cpp | 8 +- src/MOLECULE/atom_vec_angle.cpp | 36 +-- src/MOLECULE/atom_vec_bond.cpp | 26 +- src/MOLECULE/atom_vec_full.cpp | 58 ++-- src/MOLECULE/atom_vec_molecular.cpp | 58 ++-- src/MOLECULE/atom_vec_template.cpp | 8 +- src/PERI/atom_vec_peri.cpp | 8 +- src/SPIN/atom_vec_spin.cpp | 6 +- src/USER-DPD/atom_vec_dpd.cpp | 8 +- src/USER-EFF/atom_vec_electron.cpp | 6 +- src/USER-MESO/atom_vec_edpd.cpp | 6 +- src/atom_vec.cpp | 323 +++++++++++--------- src/atom_vec.h | 3 +- src/atom_vec_atomic.cpp | 26 +- src/atom_vec_body.cpp | 8 +- src/atom_vec_body.h | 1 - src/atom_vec_charge.cpp | 14 +- src/atom_vec_ellipsoid.cpp | 8 +- src/atom_vec_ellipsoid.h | 1 - src/atom_vec_hybrid.cpp | 444 ++++++++++++++++++++++++---- src/atom_vec_hybrid.h | 38 ++- src/atom_vec_line.cpp | 8 +- src/atom_vec_line.h | 1 - src/atom_vec_sphere.cpp | 8 +- src/atom_vec_tri.cpp | 8 +- src/atom_vec_tri.h | 1 - 26 files changed, 763 insertions(+), 357 deletions(-) diff --git a/src/DIPOLE/atom_vec_dipole.cpp b/src/DIPOLE/atom_vec_dipole.cpp index 650bc14d8f..5cdbab1b33 100644 --- a/src/DIPOLE/atom_vec_dipole.cpp +++ b/src/DIPOLE/atom_vec_dipole.cpp @@ -35,21 +35,21 @@ AtomVecDipole::AtomVecDipole(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "q mu"; fields_copy = (char *) "q mu"; fields_comm = (char *) "mu3"; fields_comm_vel = (char *) "mu3"; - fields_reverse = NULL; + fields_reverse = (char *) ""; fields_border = (char *) "q mu"; fields_border_vel = (char *) "q mu"; fields_exchange = (char *) "q mu"; fields_restart = (char *) "q mu"; fields_create = (char *) "q mu"; fields_data_atom = (char *) "id type q x mu3"; - fields_data_vel = NULL; + fields_data_vel = (char *) "id v"; setup_fields(); } diff --git a/src/MOLECULE/atom_vec_angle.cpp b/src/MOLECULE/atom_vec_angle.cpp index df48c4b2a0..1bd6f9a071 100644 --- a/src/MOLECULE/atom_vec_angle.cpp +++ b/src/MOLECULE/atom_vec_angle.cpp @@ -28,8 +28,8 @@ AtomVecAngle::AtomVecAngle(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "molecule num_bond bond_type bond_atom " @@ -37,9 +37,9 @@ AtomVecAngle::AtomVecAngle(LAMMPS *lmp) : AtomVec(lmp) fields_copy = (char *) "molecule num_bond bond_type bond_atom " "num_angle angle_type angle_atom1 angle_atom2 angle_atom3 nspecial special"; - fields_comm = NULL; - fields_comm_vel = NULL; - fields_reverse = NULL; + fields_comm = (char *) ""; + fields_comm_vel = (char *) ""; + fields_reverse = (char *) ""; fields_border = (char *) "molecule"; fields_border_vel = (char *) "molecule"; fields_exchange = (char *) @@ -50,7 +50,7 @@ AtomVecAngle::AtomVecAngle(LAMMPS *lmp) : AtomVec(lmp) "num_angle angle_type angle_atom1 angle_atom2 angle_atom3"; fields_create = (char *) "molecule num_bond num_angle nspecial"; fields_data_atom = (char *) "id molecule type x"; - fields_data_vel = NULL; + fields_data_vel = (char *) "id v"; setup_fields(); @@ -70,7 +70,7 @@ AtomVecAngle::~AtomVecAngle() modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -void AtomVecAngle::pack_restart_pre(int i) +void AtomVecAngle::pack_restart_pre(int ilocal) { // insure negative vectors are needed length @@ -93,19 +93,19 @@ void AtomVecAngle::pack_restart_pre(int i) int **angle_type = atom->angle_type; int any_bond_negative = 0; - for (int m = 0; m < num_bond[i]; m++) { - if (bond_type[i][m] < 0) { + for (int m = 0; m < num_bond[ilocal]; m++) { + if (bond_type[ilocal][m] < 0) { bond_negative[m] = 1; - bond_type[i][m] = -bond_type[i][m]; + bond_type[ilocal][m] = -bond_type[ilocal][m]; any_bond_negative = 1; } else bond_negative[m] = 0; } int any_angle_negative = 0; - for (int m = 0; m < num_angle[i]; m++) { - if (angle_type[i][m] < 0) { + for (int m = 0; m < num_angle[ilocal]; m++) { + if (angle_type[ilocal][m] < 0) { angle_negative[m] = 1; - angle_type[i][m] = -angle_type[i][m]; + angle_type[ilocal][m] = -angle_type[ilocal][m]; any_angle_negative = 1; } else angle_negative[m] = 0; } @@ -115,22 +115,22 @@ void AtomVecAngle::pack_restart_pre(int i) unmodify values packed by AtomVec::pack_restart() ------------------------------------------------------------------------- */ -void AtomVecAngle::pack_restart_post(int i) +void AtomVecAngle::pack_restart_post(int ilocal) { // restore the flagged types to their negative values if (any_bond_negative) { int *num_bond = atom->num_bond; int **bond_type = atom->bond_type; - for (int m = 0; m < num_bond[i]; m++) - if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; + for (int m = 0; m < num_bond[ilocal]; m++) + if (bond_negative[m]) bond_type[ilocal][m] = -bond_type[ilocal][m]; } if (any_angle_negative) { int *num_angle = atom->num_angle; int **angle_type = atom->angle_type; - for (int m = 0; m < num_angle[i]; m++) - if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; + for (int m = 0; m < num_angle[ilocal]; m++) + if (angle_negative[m]) angle_type[ilocal][m] = -angle_type[ilocal][m]; } } diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index fd3f08979d..30ad7d83e1 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -28,16 +28,16 @@ AtomVecBond::AtomVecBond(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "molecule num_bond bond_type bond_atom nspecial special"; fields_copy = (char *) "molecule num_bond bond_type bond_atom nspecial special"; - fields_comm = NULL; - fields_comm_vel = NULL; - fields_reverse = NULL; + fields_comm = (char *) ""; + fields_comm_vel = (char *) ""; + fields_reverse = (char *) ""; fields_border = (char *) "molecule"; fields_border_vel = (char *) "molecule"; fields_exchange = (char *) @@ -45,7 +45,7 @@ AtomVecBond::AtomVecBond(LAMMPS *lmp) : AtomVec(lmp) fields_restart = (char *) "molecule num_bond bond_type bond_atom"; fields_create = (char *) "molecule num_bond nspecial"; fields_data_atom = (char *) "id molecule type x"; - fields_data_vel = NULL; + fields_data_vel = (char *) "id v"; setup_fields(); @@ -64,7 +64,7 @@ AtomVecBond::~AtomVecBond() modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -void AtomVecBond::pack_restart_pre(int i) +void AtomVecBond::pack_restart_pre(int ilocal) { // insure bond_negative vector is needed length @@ -80,10 +80,10 @@ void AtomVecBond::pack_restart_pre(int i) int **bond_type = atom->bond_type; any_bond_negative = 0; - for (int m = 0; m < num_bond[i]; m++) { - if (bond_type[i][m] < 0) { + for (int m = 0; m < num_bond[ilocal]; m++) { + if (bond_type[ilocal][m] < 0) { bond_negative[m] = 1; - bond_type[i][m] = -bond_type[i][m]; + bond_type[ilocal][m] = -bond_type[ilocal][m]; any_bond_negative = 1; } else bond_negative[m] = 0; } @@ -93,15 +93,15 @@ void AtomVecBond::pack_restart_pre(int i) unmodify values packed by AtomVec::pack_restart() ------------------------------------------------------------------------- */ -void AtomVecBond::pack_restart_post(int i) +void AtomVecBond::pack_restart_post(int ilocal) { // restore the flagged types to their negative values if (any_bond_negative) { int *num_bond = atom->num_bond; int **bond_type = atom->bond_type; - for (int m = 0; m < num_bond[i]; m++) - if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; + for (int m = 0; m < num_bond[ilocal]; m++) + if (bond_negative[m]) bond_type[ilocal][m] = -bond_type[ilocal][m]; } } diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index ed838aa0e3..9ab0a296e0 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -28,8 +28,8 @@ AtomVecFull::AtomVecFull(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "q molecule num_bond bond_type bond_atom " @@ -47,9 +47,9 @@ AtomVecFull::AtomVecFull(LAMMPS *lmp) : AtomVec(lmp) "num_improper improper_type improper_atom1 improper_atom2 " "improper_atom3 improper_atom4 " "nspecial special"; - fields_comm = NULL; - fields_comm_vel = NULL; - fields_reverse = NULL; + fields_comm = (char *) ""; + fields_comm_vel = (char *) ""; + fields_reverse = (char *) ""; fields_border = (char *) "q molecule"; fields_border_vel = (char *) "q molecule"; fields_exchange = (char *) @@ -70,7 +70,7 @@ AtomVecFull::AtomVecFull(LAMMPS *lmp) : AtomVec(lmp) fields_create = (char *) "q molecule num_bond num_angle num_dihedral num_improper nspecial"; fields_data_atom = (char *) "id molecule type q x"; - fields_data_vel = NULL; + fields_data_vel = (char *) "id v"; setup_fields(); @@ -92,7 +92,7 @@ AtomVecFull::~AtomVecFull() modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -void AtomVecFull::pack_restart_pre(int i) +void AtomVecFull::pack_restart_pre(int ilocal) { // insure negative vectors are needed length @@ -129,37 +129,37 @@ void AtomVecFull::pack_restart_pre(int i) int **improper_type = atom->improper_type; int any_bond_negative = 0; - for (int m = 0; m < num_bond[i]; m++) { - if (bond_type[i][m] < 0) { + for (int m = 0; m < num_bond[ilocal]; m++) { + if (bond_type[ilocal][m] < 0) { bond_negative[m] = 1; - bond_type[i][m] = -bond_type[i][m]; + bond_type[ilocal][m] = -bond_type[ilocal][m]; any_bond_negative = 1; } else bond_negative[m] = 0; } int any_angle_negative = 0; - for (int m = 0; m < num_angle[i]; m++) { - if (angle_type[i][m] < 0) { + for (int m = 0; m < num_angle[ilocal]; m++) { + if (angle_type[ilocal][m] < 0) { angle_negative[m] = 1; - angle_type[i][m] = -angle_type[i][m]; + angle_type[ilocal][m] = -angle_type[ilocal][m]; any_angle_negative = 1; } else angle_negative[m] = 0; } int any_dihedral_negative = 0; - for (int m = 0; m < num_dihedral[i]; m++) { - if (dihedral_type[i][m] < 0) { + for (int m = 0; m < num_dihedral[ilocal]; m++) { + if (dihedral_type[ilocal][m] < 0) { dihedral_negative[m] = 1; - dihedral_type[i][m] = -dihedral_type[i][m]; + dihedral_type[ilocal][m] = -dihedral_type[ilocal][m]; any_dihedral_negative = 1; } else dihedral_negative[m] = 0; } int any_improper_negative = 0; - for (int m = 0; m < num_improper[i]; m++) { - if (improper_type[i][m] < 0) { + for (int m = 0; m < num_improper[ilocal]; m++) { + if (improper_type[ilocal][m] < 0) { improper_negative[m] = 1; - improper_type[i][m] = -improper_type[i][m]; + improper_type[ilocal][m] = -improper_type[ilocal][m]; any_improper_negative = 1; } else improper_negative[m] = 0; } @@ -169,36 +169,38 @@ void AtomVecFull::pack_restart_pre(int i) unmodify values packed by AtomVec::pack_restart() ------------------------------------------------------------------------- */ -void AtomVecFull::pack_restart_post(int i) +void AtomVecFull::pack_restart_post(int ilocal) { // restore the flagged types to their negative values if (any_bond_negative) { int *num_bond = atom->num_bond; int **bond_type = atom->bond_type; - for (int m = 0; m < num_bond[i]; m++) - if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; + for (int m = 0; m < num_bond[ilocal]; m++) + if (bond_negative[m]) bond_type[ilocal][m] = -bond_type[ilocal][m]; } if (any_angle_negative) { int *num_angle = atom->num_angle; int **angle_type = atom->angle_type; - for (int m = 0; m < num_angle[i]; m++) - if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; + for (int m = 0; m < num_angle[ilocal]; m++) + if (angle_negative[m]) angle_type[ilocal][m] = -angle_type[ilocal][m]; } if (any_dihedral_negative) { int *num_dihedral = atom->num_dihedral; int **dihedral_type = atom->dihedral_type; - for (int m = 0; m < num_dihedral[i]; m++) - if (dihedral_negative[m]) dihedral_type[i][m] = -dihedral_type[i][m]; + for (int m = 0; m < num_dihedral[ilocal]; m++) + if (dihedral_negative[m]) + dihedral_type[ilocal][m] = -dihedral_type[ilocal][m]; } if (any_improper_negative) { int *num_improper = atom->num_improper; int **improper_type = atom->improper_type; - for (int m = 0; m < num_improper[i]; m++) - if (improper_negative[m]) improper_type[i][m] = -improper_type[i][m]; + for (int m = 0; m < num_improper[ilocal]; m++) + if (improper_negative[m]) + improper_type[ilocal][m] = -improper_type[ilocal][m]; } } diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index 77aec2cf50..52947ceb71 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -28,8 +28,8 @@ AtomVecMolecular::AtomVecMolecular(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "molecule num_bond bond_type bond_atom " @@ -47,9 +47,9 @@ AtomVecMolecular::AtomVecMolecular(LAMMPS *lmp) : AtomVec(lmp) "num_improper improper_type improper_atom1 improper_atom2 " "improper_atom3 improper_atom4 " "nspecial special"; - fields_comm = NULL; - fields_comm_vel = NULL; - fields_reverse = NULL; + fields_comm = (char *) ""; + fields_comm_vel = (char *) ""; + fields_reverse = (char *) ""; fields_border = (char *) "molecule"; fields_border_vel = (char *) "molecule"; fields_exchange = (char *) @@ -70,7 +70,7 @@ AtomVecMolecular::AtomVecMolecular(LAMMPS *lmp) : AtomVec(lmp) fields_create = (char *) "molecule num_bond num_angle num_dihedral num_improper nspecial"; fields_data_atom = (char *) "id molecule type x"; - fields_data_vel = NULL; + fields_data_vel = (char *) "id v"; setup_fields(); @@ -92,7 +92,7 @@ AtomVecMolecular::~AtomVecMolecular() modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ -void AtomVecMolecular::pack_restart_pre(int i) +void AtomVecMolecular::pack_restart_pre(int ilocal) { // insure negative vectors are needed length @@ -129,37 +129,37 @@ void AtomVecMolecular::pack_restart_pre(int i) int **improper_type = atom->improper_type; int any_bond_negative = 0; - for (int m = 0; m < num_bond[i]; m++) { - if (bond_type[i][m] < 0) { + for (int m = 0; m < num_bond[ilocal]; m++) { + if (bond_type[ilocal][m] < 0) { bond_negative[m] = 1; - bond_type[i][m] = -bond_type[i][m]; + bond_type[ilocal][m] = -bond_type[ilocal][m]; any_bond_negative = 1; } else bond_negative[m] = 0; } int any_angle_negative = 0; - for (int m = 0; m < num_angle[i]; m++) { - if (angle_type[i][m] < 0) { + for (int m = 0; m < num_angle[ilocal]; m++) { + if (angle_type[ilocal][m] < 0) { angle_negative[m] = 1; - angle_type[i][m] = -angle_type[i][m]; + angle_type[ilocal][m] = -angle_type[ilocal][m]; any_angle_negative = 1; } else angle_negative[m] = 0; } int any_dihedral_negative = 0; - for (int m = 0; m < num_dihedral[i]; m++) { - if (dihedral_type[i][m] < 0) { + for (int m = 0; m < num_dihedral[ilocal]; m++) { + if (dihedral_type[ilocal][m] < 0) { dihedral_negative[m] = 1; - dihedral_type[i][m] = -dihedral_type[i][m]; + dihedral_type[ilocal][m] = -dihedral_type[ilocal][m]; any_dihedral_negative = 1; } else dihedral_negative[m] = 0; } int any_improper_negative = 0; - for (int m = 0; m < num_improper[i]; m++) { - if (improper_type[i][m] < 0) { + for (int m = 0; m < num_improper[ilocal]; m++) { + if (improper_type[ilocal][m] < 0) { improper_negative[m] = 1; - improper_type[i][m] = -improper_type[i][m]; + improper_type[ilocal][m] = -improper_type[ilocal][m]; any_improper_negative = 1; } else improper_negative[m] = 0; } @@ -169,36 +169,38 @@ void AtomVecMolecular::pack_restart_pre(int i) unmodify values packed by AtomVec::pack_restart() ------------------------------------------------------------------------- */ -void AtomVecMolecular::pack_restart_post(int i) +void AtomVecMolecular::pack_restart_post(int ilocal) { // restore the flagged types to their negative values if (any_bond_negative) { int *num_bond = atom->num_bond; int **bond_type = atom->bond_type; - for (int m = 0; m < num_bond[i]; m++) - if (bond_negative[m]) bond_type[i][m] = -bond_type[i][m]; + for (int m = 0; m < num_bond[ilocal]; m++) + if (bond_negative[m]) bond_type[ilocal][m] = -bond_type[ilocal][m]; } if (any_angle_negative) { int *num_angle = atom->num_angle; int **angle_type = atom->angle_type; - for (int m = 0; m < num_angle[i]; m++) - if (angle_negative[m]) angle_type[i][m] = -angle_type[i][m]; + for (int m = 0; m < num_angle[ilocal]; m++) + if (angle_negative[m]) angle_type[ilocal][m] = -angle_type[ilocal][m]; } if (any_dihedral_negative) { int *num_dihedral = atom->num_dihedral; int **dihedral_type = atom->dihedral_type; - for (int m = 0; m < num_dihedral[i]; m++) - if (dihedral_negative[m]) dihedral_type[i][m] = -dihedral_type[i][m]; + for (int m = 0; m < num_dihedral[ilocal]; m++) + if (dihedral_negative[m]) + dihedral_type[ilocal][m] = -dihedral_type[ilocal][m]; } if (any_improper_negative) { int *num_improper = atom->num_improper; int **improper_type = atom->improper_type; - for (int m = 0; m < num_improper[i]; m++) - if (improper_negative[m]) improper_type[i][m] = -improper_type[i][m]; + for (int m = 0; m < num_improper[ilocal]; m++) + if (improper_negative[m]) + improper_type[ilocal][m] = -improper_type[ilocal][m]; } } diff --git a/src/MOLECULE/atom_vec_template.cpp b/src/MOLECULE/atom_vec_template.cpp index f8f99ae8a8..546c19da12 100644 --- a/src/MOLECULE/atom_vec_template.cpp +++ b/src/MOLECULE/atom_vec_template.cpp @@ -40,16 +40,16 @@ AtomVecTemplate::AtomVecTemplate(LAMMPS *lmp) : AtomVec(lmp) fields_grow = (char *) "molecule molindex molatom"; fields_copy = (char *) "molecule molindex molatom"; - fields_comm = NULL; - fields_comm_vel = NULL; - fields_reverse = NULL; + fields_comm = (char *) ""; + fields_comm_vel = (char *) ""; + fields_reverse = (char *) ""; fields_border = (char *) "molecule molindex molatom"; fields_border_vel = (char *) "molecule molindex molatom"; fields_exchange = (char *) "molecule molindex molatom"; fields_restart = (char *) "molecule molindex molatom"; fields_create = (char *) "molecule molindex molatom"; fields_data_atom = (char *) "id molecule molindex molatom type x"; - fields_data_vel = NULL; + fields_data_vel = (char *) ""; setup_fields(); } diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index 4fcebc2f84..58ff9c54d9 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -50,21 +50,21 @@ AtomVecPeri::AtomVecPeri(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "rmass vfrac s0 x0"; fields_copy = (char *) "rmass vfrac s0 x0"; fields_comm = (char *) "s0"; fields_comm_vel = (char *) "s0"; - fields_reverse = NULL; + fields_reverse = (char *) ""; fields_border = (char *) "rmass vfrac s0 x0"; fields_border_vel = (char *) "rmass vfrac s0 x0"; fields_exchange = (char *) "rmass vfrac s0 x0"; fields_restart = (char *) "rmass vfrac s0 x0"; fields_create = (char *) "rmass vfrac s0 x0"; fields_data_atom = (char *) "id type vfrac rmass x"; - fields_data_vel = (char *) "omega"; + fields_data_vel = (char *) "id v omega"; setup_fields(); } diff --git a/src/SPIN/atom_vec_spin.cpp b/src/SPIN/atom_vec_spin.cpp index 6c88fb1a9e..a8ff15492a 100644 --- a/src/SPIN/atom_vec_spin.cpp +++ b/src/SPIN/atom_vec_spin.cpp @@ -42,8 +42,8 @@ AtomVecSpin::AtomVecSpin(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "sp fm fm_long"; fields_copy = (char *) "sp"; @@ -56,7 +56,7 @@ AtomVecSpin::AtomVecSpin(LAMMPS *lmp) : AtomVec(lmp) fields_restart = (char *) "sp"; fields_create = (char *) "sp"; fields_data_atom = (char *) "id type x sp"; - fields_data_vel = (char *) "omega"; + fields_data_vel = (char *) "id v omega"; setup_fields(); } diff --git a/src/USER-DPD/atom_vec_dpd.cpp b/src/USER-DPD/atom_vec_dpd.cpp index 27e0f70a20..ce35178d8d 100644 --- a/src/USER-DPD/atom_vec_dpd.cpp +++ b/src/USER-DPD/atom_vec_dpd.cpp @@ -33,21 +33,21 @@ AtomVecDPD::AtomVecDPD(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "rho dpdTheta uCond uMech uChem uCG uCGnew duChem"; fields_copy = (char *) "dpdTheta uCond uMech uChem uCG uCGnew"; fields_comm = (char *) "dpdTheta uCond uMech uChem"; fields_comm_vel = (char *) "dpdTheta uCond uMech uChem"; - fields_reverse = NULL; + fields_reverse = (char *) ""; fields_border = (char *) "dpdTheta uCond uMech uChem uCG uCGnew"; fields_border_vel = (char *) "dpdTheta uCond uMech uChem uCG uCGnew"; fields_exchange = (char *) "dpdTheta uCond uMech uChem uCG uCGnew"; fields_restart = (char *) "dpdTheta uCond uMech uChem"; fields_create = (char *) "rho dpdTheta uCond uMech uChem uCG uCGnew duChem"; fields_data_atom = (char *) "id type dpdTheta x"; - fields_data_vel = (char *) "omega"; + fields_data_vel = (char *) "id v omega"; setup_fields(); } diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index fc73bf4dd5..0bad0f115f 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -56,8 +56,8 @@ AtomVecElectron::AtomVecElectron(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "q spin eradius ervel erforce"; fields_copy = (char *) "q spin eradius ervel"; @@ -70,7 +70,7 @@ AtomVecElectron::AtomVecElectron(LAMMPS *lmp) : AtomVec(lmp) fields_restart = (char *) "q spin eradius ervel"; fields_create = (char *) "q spin eradius ervel"; fields_data_atom = (char *) "id type q spin eradius x"; - fields_data_vel = (char *) "ervel"; + fields_data_vel = (char *) "id v ervel"; setup_fields(); } diff --git a/src/USER-MESO/atom_vec_edpd.cpp b/src/USER-MESO/atom_vec_edpd.cpp index 59cee397b5..b4602c760c 100644 --- a/src/USER-MESO/atom_vec_edpd.cpp +++ b/src/USER-MESO/atom_vec_edpd.cpp @@ -41,8 +41,8 @@ AtomVecEDPD::AtomVecEDPD(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "edpd_cv edpd_temp edpd_flux vest"; fields_copy = (char *) "edpd_cv edpd_temp edpd_flux vest"; @@ -55,7 +55,7 @@ AtomVecEDPD::AtomVecEDPD(LAMMPS *lmp) : AtomVec(lmp) fields_restart = (char * ) "edpd_cv edpd_temp vest"; fields_create = (char *) "edpd_cv edpd_temp edpd_flux vest"; fields_data_atom = (char *) "id type edpd_temp edpd_cv x"; - fields_data_vel = NULL; + fields_data_vel = (char *) "id v"; setup_fields(); } diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index ed56151d33..cfbc8b12a6 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -55,20 +55,19 @@ AtomVec::AtomVec(LAMMPS *lmp) : Pointers(lmp) // peratom variables auto-included in corresponding child style fields string // these fields cannot be specified in the fields string - // leading/trailing whitespace just facilitates matching in process_args() - default_grow = " id type mask image x v f "; - default_copy = " id type mask image x v "; - default_comm = " x "; - default_comm_vel = " x v "; - default_reverse = " f "; - default_border = " id type mask x "; - default_border_vel = " id type mask x v "; - default_exchange = " id type mask image x v "; - default_restart = " id type mask image x v "; - default_create = " id type mask image x v "; + default_grow = "id type mask image x v f"; + default_copy = "id type mask image x v"; + default_comm = "x"; + default_comm_vel = "x v"; + default_reverse = "f"; + default_border = "id type mask x"; + default_border_vel = "id type mask x v"; + default_exchange = "id type mask image x v"; + default_restart = "id type mask image x v"; + default_create = "id type mask image x v"; default_data_atom = ""; - default_data_vel = " v "; + default_data_vel = ""; // initializations @@ -1757,6 +1756,7 @@ void AtomVec::pack_data(double **buf) void *pdata; int nlocal = atom->nlocal; + for (int i = 0; i < nlocal; i++) { // if needed, change values before packing @@ -1877,37 +1877,39 @@ void AtomVec::data_vel(int ilocal, char **values) v[ilocal][1] = utils::numeric(FLERR,values[1],true,lmp); v[ilocal][2] = utils::numeric(FLERR,values[2],true,lmp); - int ivalue = 3; - for (n = 0; n < ndata_vel; n++) { - pdata = mdata_vel.pdata[n]; - datatype = mdata_vel.datatype[n]; - cols = mdata_vel.cols[n]; - if (datatype == DOUBLE) { - if (cols == 0) { - double *vec = *((double **) pdata); - vec[ilocal] = utils::numeric(FLERR,values[ivalue++],true,lmp); - } else { - double **array = *((double ***) pdata); - for (m = 0; m < cols; m++) - array[ilocal][m] = utils::numeric(FLERR,values[ivalue++],true,lmp); - } - } else if (datatype == INT) { - if (cols == 0) { - int *vec = *((int **) pdata); - vec[ilocal] = utils::inumeric(FLERR,values[ivalue++],true,lmp); - } else { - int **array = *((int ***) pdata); - for (m = 0; m < cols; m++) - array[ilocal][m] = utils::inumeric(FLERR,values[ivalue++],true,lmp); - } - } else if (datatype == BIGINT) { - if (cols == 0) { - bigint *vec = *((bigint **) pdata); - vec[ilocal] = utils::bnumeric(FLERR,values[ivalue++],true,lmp); - } else { - bigint **array = *((bigint ***) pdata); - for (m = 0; m < cols; m++) - array[ilocal][m] = utils::bnumeric(FLERR,values[ivalue++],true,lmp); + if (ndata_vel) { + int ivalue = 3; + for (n = 0; n < ndata_vel; n++) { + pdata = mdata_vel.pdata[n]; + datatype = mdata_vel.datatype[n]; + cols = mdata_vel.cols[n]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + vec[ilocal] = utils::numeric(FLERR,values[ivalue++],true,lmp); + } else { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) + array[ilocal][m] = utils::numeric(FLERR,values[ivalue++],true,lmp); + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + vec[ilocal] = utils::inumeric(FLERR,values[ivalue++],true,lmp); + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + array[ilocal][m] = utils::inumeric(FLERR,values[ivalue++],true,lmp); + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + vec[ilocal] = utils::bnumeric(FLERR,values[ivalue++],true,lmp); + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + array[ilocal][m] = utils::bnumeric(FLERR,values[ivalue++],true,lmp); + } } } } @@ -1922,49 +1924,40 @@ void AtomVec::pack_vel(double **buf) int i,j,m,n,datatype,cols; void *pdata; - double **v = atom->v; - tagint *tag = atom->tag; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = v[i][0]; - buf[i][2] = v[i][1]; - buf[i][3] = v[i][2]; - - j = 4; - if (ndata_vel) { - for (n = 0; n < ndata_vel; n++) { - pdata = mdata_vel.pdata[n]; - datatype = mdata_vel.datatype[n]; - cols = mdata_vel.cols[n]; - if (datatype == DOUBLE) { - if (cols == 0) { - double *vec = *((double **) pdata); - buf[i][j++] = vec[i]; - } else { - double **array = *((double ***) pdata); - for (m = 0; m < cols; m++) - buf[i][j++] = array[i][m]; - } - } else if (datatype == INT) { - if (cols == 0) { - int *vec = *((int **) pdata); - buf[i][j++] = ubuf(vec[i]).d; - } else { - int **array = *((int ***) pdata); - for (m = 0; m < cols; m++) - buf[i][j++] = ubuf(array[i][m]).d; - } - } else if (datatype == BIGINT) { - if (cols == 0) { - bigint *vec = *((bigint **) pdata); - buf[i][j++] = ubuf(vec[i]).d; - } else { - bigint **array = *((bigint ***) pdata); - for (m = 0; m < cols; m++) - buf[i][j++] = ubuf(array[i][m]).d; - } + j = 0; + for (n = 0; n < ndata_vel; n++) { + pdata = mdata_vel.pdata[n]; + datatype = mdata_vel.datatype[n]; + cols = mdata_vel.cols[n]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + buf[i][j++] = vec[i]; + } else { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) + buf[i][j++] = array[i][m]; + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + buf[i][j++] = ubuf(vec[i]).d; + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + buf[i][j++] = ubuf(array[i][m]).d; + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + buf[i][j++] = ubuf(vec[i]).d; + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + buf[i][j++] = ubuf(array[i][m]).d; } } } @@ -1985,37 +1978,39 @@ void AtomVec::write_vel(FILE *fp, int n, double **buf) fprintf(fp,TAGINT_FORMAT " %-1.16e %-1.16e %-1.16e\n", (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3]); - j = 4; - for (nn = 0; nn < ndata_vel; nn++) { - pdata = mdata_vel.pdata[nn]; - datatype = mdata_vel.datatype[nn]; - cols = mdata_vel.cols[nn]; - if (datatype == DOUBLE) { - if (cols == 0) { - double *vec = *((double **) pdata); - fprintf(fp," %-1.16e",buf[i][j++]); - } else { - double **array = *((double ***) pdata); - for (m = 0; m < cols; m++) + if (ndata_vel) { + j = 4; + for (nn = 0; nn < ndata_vel; nn++) { + pdata = mdata_vel.pdata[nn]; + datatype = mdata_vel.datatype[nn]; + cols = mdata_vel.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); fprintf(fp," %-1.16e",buf[i][j++]); - } - } else if (datatype == INT) { - if (cols == 0) { - int *vec = *((int **) pdata); - fprintf(fp," %d",(int) ubuf(buf[i][j++]).i); - } else { - int **array = *((int ***) pdata); - for (m = 0; m < cols; m++) + } else { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) + fprintf(fp," %-1.16e",buf[i][j++]); + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); fprintf(fp," %d",(int) ubuf(buf[i][j++]).i); - } - } else if (datatype == BIGINT) { - if (cols == 0) { - bigint *vec = *((bigint **) pdata); - fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i); - } else { - bigint **array = *((bigint ***) pdata); - for (m = 0; m < cols; m++) + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) + fprintf(fp," %d",(int) ubuf(buf[i][j++]).i); + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i); + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) + fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i); + } } } } @@ -2342,10 +2337,11 @@ void AtomVec::setup_fields() { int n,cols; - if (!fields_data_atom) - error->all(FLERR,"Atom style requires fields_data_atom"); if (strstr(fields_data_atom,"id ") != fields_data_atom) error->all(FLERR,"Atom style fields_data_atom must have id as first field"); + if (strstr(fields_data_vel,"id v") != fields_data_vel) + error->all(FLERR,"Atom style fields_data_vel must have " + "'id v' as first fields"); // process field strings // return # of fields and matching index into atom->peratom (in Method struct) @@ -2387,7 +2383,7 @@ void AtomVec::setup_fields() else threads[i] = 1; } - // set style-specific variables + // set style-specific sizes // NOTE: check for others vars in atom_vec.cpp/h ?? // NOTE: need to set maxexchange, e.g for style hybrid? @@ -2437,7 +2433,7 @@ void AtomVec::setup_fields() else size_data_atom += cols; } - size_data_vel = 4; + size_data_vel = 0; for (n = 0; n < ndata_vel; n++) { cols = mdata_vel.cols[n]; if (cols == 0) size_data_vel++; @@ -2449,61 +2445,96 @@ void AtomVec::setup_fields() process a single field string ------------------------------------------------------------------------- */ -int AtomVec::process_fields(char *list, const char *default_list, Method *method) +int AtomVec::process_fields(char *str, const char *default_str, Method *method) { - int i,n; - char match[128]; - - if (list == NULL) { + if (str == NULL) { method->index = NULL; return 0; } - // make copy of list of fields so can tokenize it + // tokenize words in both strings - n = strlen(list) + 1; - char *copy = new char[n]; - strcpy(copy,list); - - int nfield = atom->count_words(copy); - int *index = new int[nfield]; + char *copy1,*copy2; + char **words,**defwords; + int nfield = tokenize(str,words,copy1); + int ndef = tokenize((char *) default_str,defwords,copy2); + // process fields one by one, add to index vector + Atom::PerAtom *peratom = atom->peratom; int nperatom = atom->nperatom; - - nfield = 0; - char *field = strtok(copy," "); - while (field) { + + int *index = new int[nfield]; + int match; + + for (int i = 0; i < nfield; i++) { // find field in master Atom::peratom list - for (i = 0; i < nperatom; i++) - if (strcmp(field,peratom[i].name) == 0) break; - if (i == nperatom) { - printf("FIELD %s\n",field); - error->all(FLERR,"Atom_style unrecognized peratom field"); + for (match = 0; match < nperatom; match++) + if (strcmp(words[i],peratom[match].name) == 0) break; + if (match == nperatom) { + char str[128]; + sprintf(str,"Peratom field %s not recognized",words[i]); + error->all(FLERR,str); } - index[nfield++] = i; + index[i] = match; - // error if field is in default list or appears multiple times + // error if field appears multiple times - sprintf(match," %s ",field); - if (strstr(default_list,match)) - error->all(FLERR,"Atom_style repeat of default peratom field"); + for (match = 0; match < i; match++) + if (index[i] == index[match]) { + char str[128]; + sprintf(str,"Peratom field %s is repeated",words[i]); + error->all(FLERR,str); + } - for (i = 0; i < nfield-1; i++) - if (index[i] == index[nfield-1]) - error->all(FLERR,"Atom_style duplicated peratom field"); + // error if field is in default str + + for (match = 0; match < ndef; match++) + if (strcmp(words[i],defwords[match]) == 0) { + char str[128]; + sprintf(str,"Peratom field %s is a default",words[i]); + error->all(FLERR,str); + } - field = strtok(NULL," "); } - delete [] copy; + delete [] copy1; + delete [] copy2; + delete [] words; + delete [] defwords; method->index = index; return nfield; } +/* ---------------------------------------------------------------------- + tokenize str into white-space separated words + return nwords = number of words + return words = vector of ptrs to each word + also return copystr since words points into it, caller will delete copystr +------------------------------------------------------------------------- */ + +int AtomVec::tokenize(char *str, char **&words, char *©str) +{ + int n = strlen(str) + 1; + copystr = new char[n]; + strcpy(copystr,str); + + int nword = atom->count_words(copystr); + words = new char*[nword]; + + nword = 0; + char *word = strtok(copystr," "); + while (word) { + words[nword++] = word; + word = strtok(NULL," "); + } + + return nword; +} + /* ---------------------------------------------------------------------- create a method data structs for processing fields ------------------------------------------------------------------------- */ diff --git a/src/atom_vec.h b/src/atom_vec.h index 33bf4a3ccd..69ea1d51ab 100644 --- a/src/atom_vec.h +++ b/src/atom_vec.h @@ -55,7 +55,7 @@ class AtomVec : protected Pointers { char **argcopy; // used when AtomVec is realloced (restart,replicate) // additional list of peratom fields operated on by different methods - // set by child styles + // set or created by child styles char *fields_grow,*fields_copy; char *fields_comm,*fields_comm_vel,*fields_reverse; @@ -220,6 +220,7 @@ class AtomVec : protected Pointers { int grow_nmax_bonus(int); void setup_fields(); int process_fields(char *, const char *, Method *); + int tokenize(char *, char **&, char *&); void create_method(int, Method *); void init_method(Method *); void destroy_method(Method *); diff --git a/src/atom_vec_atomic.cpp b/src/atom_vec_atomic.cpp index a283e99081..eb8dfc1b7e 100644 --- a/src/atom_vec_atomic.cpp +++ b/src/atom_vec_atomic.cpp @@ -24,21 +24,21 @@ AtomVecAtomic::AtomVecAtomic(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file - fields_grow = NULL; - fields_copy = NULL; - fields_comm = NULL; - fields_comm_vel = NULL; - fields_reverse = NULL; - fields_border = NULL; - fields_border_vel = NULL; - fields_exchange = NULL; - fields_restart = NULL; - fields_create = NULL; + fields_grow = (char *) ""; + fields_copy = (char *) ""; + fields_comm = (char *) ""; + fields_comm_vel = (char *) ""; + fields_reverse = (char *) ""; + fields_border = (char *) ""; + fields_border_vel = (char *) ""; + fields_exchange = (char *) ""; + fields_restart = (char *) ""; + fields_create = (char *) ""; fields_data_atom = (char *) "id type x"; - fields_data_vel = NULL; + fields_data_vel = (char *) "id v"; setup_fields(); } diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index 1a8c2defd9..19ac69cef3 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -60,12 +60,12 @@ AtomVecBody::AtomVecBody(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "radius rmass angmom torque body"; fields_copy = (char *) "radius rmass angmom"; - fields_comm = NULL; + fields_comm = (char *) ""; fields_comm_vel = (char *) "angmom"; fields_reverse = (char *) "torque"; fields_border = (char *) "radius rmass"; @@ -74,7 +74,7 @@ AtomVecBody::AtomVecBody(LAMMPS *lmp) : AtomVec(lmp) fields_restart = (char *) "radius rmass angmom"; fields_create = (char *) "radius rmass angmom tri"; fields_data_atom = (char *) "id type body rmass x"; - fields_data_vel = (char *) "angmom"; + fields_data_vel = (char *) "id v angmom"; setup_fields(); } diff --git a/src/atom_vec_body.h b/src/atom_vec_body.h index 183b4ea8ea..939b01878d 100644 --- a/src/atom_vec_body.h +++ b/src/atom_vec_body.h @@ -47,7 +47,6 @@ class AtomVecBody : public AtomVec { void clear_bonus(); int pack_comm_bonus(int, int *, double *); void unpack_comm_bonus(int, int, double *); - int pack_reverse_bonus(int, int, double *); int pack_border_bonus(int, int *, double *); int unpack_border_bonus(int, int, double *); int pack_exchange_bonus(int, double *); diff --git a/src/atom_vec_charge.cpp b/src/atom_vec_charge.cpp index 9c8f18a846..5957ef5215 100644 --- a/src/atom_vec_charge.cpp +++ b/src/atom_vec_charge.cpp @@ -27,21 +27,21 @@ AtomVecCharge::AtomVecCharge(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "q"; fields_copy = (char *) "q"; - fields_comm = NULL; - fields_comm_vel = NULL; - fields_reverse = NULL; + fields_comm = (char *) ""; + fields_comm_vel = (char *) ""; + fields_reverse = (char *) ""; fields_border = (char *) "q"; fields_border_vel = (char *) "q"; fields_exchange = (char *) "q"; fields_restart = (char *) "q"; fields_create = (char *) "q"; - fields_data_atom = (char *) "id type q x"; - fields_data_vel = NULL; + fields_data_atom = (char *) "id type q x"; + fields_data_vel = (char *) "id v"; setup_fields(); } diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index 7ba26c1c34..9166293384 100644 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -49,12 +49,12 @@ AtomVecEllipsoid::AtomVecEllipsoid(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "rmass angmom torque ellipsoid"; fields_copy = (char *) "rmass angmom"; - fields_comm = NULL; + fields_comm = (char *) ""; fields_comm_vel = (char *) "angmom"; fields_reverse = (char *) "torque"; fields_border = (char *) "rmass"; @@ -63,7 +63,7 @@ AtomVecEllipsoid::AtomVecEllipsoid(LAMMPS *lmp) : AtomVec(lmp) fields_restart = (char *) "rmass angmom"; fields_create = (char *) "rmass angmom ellipsoid"; fields_data_atom = (char *) "id type ellipsoid rmass x"; - fields_data_vel = (char *) "angmom"; + fields_data_vel = (char *) "id v angmom"; setup_fields(); } diff --git a/src/atom_vec_ellipsoid.h b/src/atom_vec_ellipsoid.h index 70797c59d5..79d17a2206 100644 --- a/src/atom_vec_ellipsoid.h +++ b/src/atom_vec_ellipsoid.h @@ -40,7 +40,6 @@ class AtomVecEllipsoid : public AtomVec { void clear_bonus(); int pack_comm_bonus(int, int *, double *); void unpack_comm_bonus(int, int, double *); - int pack_reverse_bonus(int, int, double *); int pack_border_bonus(int, int *, double *); int unpack_border_bonus(int, int, double *); int pack_exchange_bonus(int, double *); diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index d96494544c..9a79f66972 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -14,18 +14,39 @@ #include "atom_vec_hybrid.h" #include #include "atom.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" +#include "comm.h" #include "memory.h" #include "error.h" -#include "utils.h" using namespace LAMMPS_NS; +#define NFIELDSTRINGS 12 // # of field strings + /* ---------------------------------------------------------------------- */ -AtomVecHybrid::AtomVecHybrid(LAMMPS *lmp) : AtomVec(lmp) {} +AtomVecHybrid::AtomVecHybrid(LAMMPS *lmp) : AtomVec(lmp) +{ + nstyles = 0; + styles = NULL; + keywords = NULL; + fieldstrings = NULL; + + nstyles_bonus = 0; + styles_bonus = NULL; + + // NOTE: set bonus_flag if any substyle does + // set nstyles_bonus, styles_bonus + // NOTE: call method in each sub-style to set q_flag ?? + + // these strings will be concatenated from sub-style strings + // fields_data_atom & fields_data_vel start with fields common to all styles + + fields_grow = fields_copy = fields_comm = fields_comm_vel = (char *) ""; + fields_reverse = fields_border = fields_border_vel = (char *) ""; + fields_exchange = fields_restart = fields_create = (char *) ""; + fields_data_atom = (char *) "id type x"; + fields_data_vel = (char *) "id v"; +} /* ---------------------------------------------------------------------- */ @@ -36,14 +57,23 @@ AtomVecHybrid::~AtomVecHybrid() for (int k = 0; k < nstyles; k++) delete [] keywords[k]; delete [] keywords; - // these strings will be concatenated from sub-style strings - // fields_data_atom must start with fields common to all styles + // NOTE: need to check these have actually been allocated - fields_grow = fields_copy = fields_comm = fields_comm_vel = NULL; - fields_reverse = fields_border = fields_border_vel = NULL; - fields_exchange = fields_restart = fields_create = NULL; - fields_data_atom = (char *) "id type x"; - fields_data_vel = NULL; + delete [] fields_grow; + delete [] fields_copy; + delete [] fields_comm; + delete [] fields_comm_vel; + delete [] fields_reverse; + delete [] fields_border; + delete [] fields_border_vel; + delete [] fields_exchange; + delete [] fields_restart; + delete [] fields_create; + delete [] fields_data_atom; + delete [] fields_data_vel; + + for (int k = 0; k < nstyles; k++) delete [] fieldstrings[k].fstr; + delete [] fieldstrings; } /* ---------------------------------------------------------------------- @@ -52,7 +82,7 @@ AtomVecHybrid::~AtomVecHybrid() void AtomVecHybrid::process_args(int narg, char **arg) { - // build list of all known atom styles + // create list of all known atom styles build_styles(); @@ -85,58 +115,120 @@ void AtomVecHybrid::process_args(int narg, char **arg) nstyles++; } + // hybrid settings are MAX or MIN of sub-style settings + // check for both mass_type = 0 and 1, so can warn + + molecular = 0; + maxexchange = 0; + + for (int k = 0; k < nstyles; k++) { + if ((styles[k]->molecular == 1 && molecular == 2) || + (styles[k]->molecular == 2 && molecular == 1)) + error->all(FLERR,"Cannot mix molecular and molecule template " + "atom styles"); + molecular = MAX(molecular,styles[k]->molecular); + + bonds_allow = MAX(bonds_allow,styles[k]->bonds_allow); + angles_allow = MAX(angles_allow,styles[k]->angles_allow); + dihedrals_allow = MAX(dihedrals_allow,styles[k]->dihedrals_allow); + impropers_allow = MAX(impropers_allow,styles[k]->impropers_allow); + mass_type = MAX(mass_type,styles[k]->mass_type); + dipole_type = MAX(dipole_type,styles[k]->dipole_type); + forceclearflag = MAX(forceclearflag,styles[k]->forceclearflag); + + if (styles[k]->molecular == 2) onemols = styles[k]->onemols; + + // NOTE: need to sum this one? + maxexchange += styles[k]->maxexchange; + } + + // issue a warning if both per-type mass and per-atom rmass are defined + + int mass_pertype = 0; + int mass_peratom = 0; + + for (int k = 0; k < nstyles; k++) { + if (styles[k]->mass_type == 0) mass_peratom = 1; + if (styles[k]->mass_type == 1) mass_pertype = 1; + } + + if (mass_pertype && mass_peratom && comm->me == 0) + error->warning(FLERR, + "Atom_style hybrid defines both pertype and peratom masses " + "- both must be set, only peratom masses will be used"); + // free allstyles created by build_styles() for (int i = 0; i < nallstyles; i++) delete [] allstyles[i]; delete [] allstyles; - // concatenate field strings from all sub-styles + // set field strings from all substyles - concatenate_fields(); + fieldstrings = new FieldStrings[nstyles]; - // parent AtomVec will now operate on concatenated fields + for (int k = 0; k < nstyles; k++) { + fieldstrings[k].fstr = new char*[NFIELDSTRINGS]; + fieldstrings[k].fstr[0] = styles[k]->fields_grow; + fieldstrings[k].fstr[1] = styles[k]->fields_copy; + fieldstrings[k].fstr[2] = styles[k]->fields_comm; + fieldstrings[k].fstr[3] = styles[k]->fields_comm_vel; + fieldstrings[k].fstr[4] = styles[k]->fields_reverse; + fieldstrings[k].fstr[5] = styles[k]->fields_border; + fieldstrings[k].fstr[6] = styles[k]->fields_border_vel; + fieldstrings[k].fstr[7] = styles[k]->fields_exchange; + fieldstrings[k].fstr[8] = styles[k]->fields_restart; + fieldstrings[k].fstr[9] = styles[k]->fields_create; + fieldstrings[k].fstr[10] = styles[k]->fields_data_atom; + fieldstrings[k].fstr[11] = styles[k]->fields_data_vel; + } + + // merge field strings from all sub-styles + // save concat_grow to check for duplicates of special-case fields + + char *concat_grow;; + char *null = NULL; + + fields_grow = merge_fields(0,fields_grow,1,concat_grow); + fields_copy = merge_fields(1,fields_copy,0,null); + fields_comm = merge_fields(2,fields_comm,0,null); + fields_comm_vel = merge_fields(3,fields_comm_vel,0,null); + fields_reverse = merge_fields(4,fields_reverse,0,null); + fields_border = merge_fields(5,fields_border,0,null); + fields_border_vel = merge_fields(6,fields_border_vel,0,null); + fields_exchange = merge_fields(7,fields_exchange,0,null); + fields_restart = merge_fields(8,fields_restart,0,null); + fields_create = merge_fields(9,fields_create,0,null); + fields_data_atom = merge_fields(10,fields_data_atom,0,null); + fields_data_vel = merge_fields(11,fields_data_vel,0,null); + + // check concat_grow for multiple special-case fields + // may cause issues with style-specific create_atom() and data_atom() methods + // issue warnings if appear in multiple sub-styles + + const char *dupfield[] = {"radius","rmass"}; + int ndupfield = 2; + char *ptr; + + for (int idup = 0; idup < ndupfield; idup++) { + char *dup = (char *) dupfield[idup]; + ptr = strstr(concat_grow,dup); + if (strstr(ptr+1,dup)) { + char str[128]; + sprintf(str,"Peratom %s is in multiple sub-styles - " + "must be used consistently",dup); + if (comm->me == 0) error->warning(FLERR,str); + } + } + + delete [] concat_grow; + + // parent AtomVec can now operate on merged fields setup_fields(); } /* ---------------------------------------------------------------------- */ -void AtomVecHybrid::concatenate_fields() -{ - for (int k = 0; k < nstyles; k++) { - concatenate(fields_grow,styles[k]->fields_grow); - concatenate(fields_copy,styles[k]->fields_copy); - concatenate(fields_comm,styles[k]->fields_comm); - concatenate(fields_comm_vel,styles[k]->fields_comm_vel); - concatenate(fields_reverse,styles[k]->fields_reverse); - concatenate(fields_border,styles[k]->fields_border); - concatenate(fields_border_vel,styles[k]->fields_border_vel); - concatenate(fields_exchange,styles[k]->fields_exchange); - concatenate(fields_restart,styles[k]->fields_restart); - concatenate(fields_create,styles[k]->fields_create); - concatenate(fields_data_atom,styles[k]->fields_data_atom); - concatenate(fields_data_vel,styles[k]->fields_data_vel); - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecHybrid::concatenate(char *&root, char *add) -{ - /* - char **rootwords,**addwords; - int nroot = parse(root,rootwords); - int nadd = parse(add,addwords); - - for (int iadd = 0; iadd < nadd; iadd++) { - if (check(addwords[iadd],nroot,rootwords)) continue; - addone(addwords[iadd],nroot,rootwords); - } - */ -} - -/* ---------------------------------------------------------------------- */ - void AtomVecHybrid::init() { AtomVec::init(); @@ -151,6 +243,185 @@ void AtomVecHybrid::force_clear(int n, size_t nbytes) if (styles[k]->forceclearflag) styles[k]->force_clear(n,nbytes); } +/* ---------------------------------------------------------------------- + modify values for AtomVec::pack_restart() to pack +------------------------------------------------------------------------- */ + +void AtomVecHybrid::pack_restart_pre(int ilocal) +{ + for (int k = 0; k < nstyles; k++) + styles[k]->pack_restart_pre(ilocal); +} + +/* ---------------------------------------------------------------------- + unmodify values packed by AtomVec::pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecHybrid::pack_restart_post(int ilocal) +{ + for (int k = 0; k < nstyles; k++) + styles[k]->pack_restart_post(ilocal); +} + +/* ---------------------------------------------------------------------- + initialize other atom quantities after AtomVec::unpack_restart() +------------------------------------------------------------------------- */ + +void AtomVecHybrid::unpack_restart_init(int ilocal) +{ + for (int k = 0; k < nstyles; k++) + styles[k]->unpack_restart_init(ilocal); +} + +/* ---------------------------------------------------------------------- + initialize non-zero atom quantities +------------------------------------------------------------------------- */ + +void AtomVecHybrid::create_atom_post(int ilocal) +{ + for (int k = 0; k < nstyles; k++) + styles[k]->create_atom_post(ilocal); +} + +/* ---------------------------------------------------------------------- + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities +------------------------------------------------------------------------- */ + +void AtomVecHybrid::data_atom_post(int ilocal) +{ + for (int k = 0; k < nstyles; k++) + styles[k]->data_atom_post(ilocal); +} + +/* ---------------------------------------------------------------------- + modify values for AtomVec::pack_data() to pack +------------------------------------------------------------------------- */ + +void AtomVecHybrid::pack_data_pre(int ilocal) +{ + for (int k = 0; k < nstyles; k++) + styles[k]->pack_data_pre(ilocal); +} + +/* ---------------------------------------------------------------------- + unmodify values packed by AtomVec::pack_data() +------------------------------------------------------------------------- */ + +void AtomVecHybrid::pack_data_post(int ilocal) +{ + for (int k = 0; k < nstyles; k++) + styles[k]->pack_data_post(ilocal); +} + +/* ---------------------------------------------------------------------- */ + +void AtomVecHybrid::copy_bonus(int i, int j, int delflag) +{ + for (int k = 0; k < nstyles_bonus; k++) + styles_bonus[k]->copy_bonus(i,j,delflag); +} + +// NOTE: need a clear_bonus() ? + +/* ---------------------------------------------------------------------- */ + +int AtomVecHybrid::pack_comm_bonus(int n, int *list, double *buf) +{ + int m = 0; + for (int k = 0; k < nstyles_bonus; k++) + m += styles_bonus[k]->pack_comm_bonus(n,list,buf); + return m; +} + +/* ---------------------------------------------------------------------- */ + +void AtomVecHybrid::unpack_comm_bonus(int n, int first, double *buf) +{ + for (int k = 0; k < nstyles_bonus; k++) + styles_bonus[k]->unpack_comm_bonus(n,first,buf); +} + +/* ---------------------------------------------------------------------- */ + +int AtomVecHybrid::pack_border_bonus(int n, int *list, double *buf) +{ + int m = 0; + for (int k = 0; k < nstyles_bonus; k++) + m += styles_bonus[k]->pack_border_bonus(n,list,buf); + return m; +} + +/* ---------------------------------------------------------------------- */ + +int AtomVecHybrid::unpack_border_bonus(int n, int first, double *buf) +{ + int m = 0; + for (int k = 0; k < nstyles_bonus; k++) + m += styles_bonus[k]->unpack_border_bonus(n,first,buf); + return m; +} + +/* ---------------------------------------------------------------------- */ + +int AtomVecHybrid::pack_exchange_bonus(int i, double *buf) +{ + int m = 0; + for (int k = 0; k < nstyles_bonus; k++) + m += styles_bonus[k]->pack_exchange_bonus(i,buf); + return m; +} + +/* ---------------------------------------------------------------------- */ + +int AtomVecHybrid::unpack_exchange_bonus(int ilocal, double *buf) +{ + int m = 0; + for (int k = 0; k < nstyles_bonus; k++) + m += styles_bonus[k]->unpack_exchange_bonus(ilocal,buf); + return m; +} + +/* ---------------------------------------------------------------------- */ + +int AtomVecHybrid::size_restart_bonus() +{ + int n = 0; + for (int k = 0; k < nstyles_bonus; k++) + n += styles_bonus[k]->size_restart_bonus(); + return n; +} + +/* ---------------------------------------------------------------------- */ + +int AtomVecHybrid::pack_restart_bonus(int i, double *buf) +{ + int m = 0; + for (int k = 0; k < nstyles_bonus; k++) + m += styles_bonus[k]->pack_restart_bonus(i,buf); + return m; +} + +/* ---------------------------------------------------------------------- */ + +int AtomVecHybrid::unpack_restart_bonus(int ilocal, double *buf) +{ + int m = 0; + for (int k = 0; k < nstyles_bonus; k++) + m += styles_bonus[k]->unpack_restart_bonus(ilocal,buf); + return m; +} + +/* ---------------------------------------------------------------------- */ + +bigint AtomVecHybrid::memory_usage_bonus() +{ + bigint bytes = 0; + for (int k = 0; k < nstyles_bonus; k++) + bytes += styles_bonus[k]->memory_usage_bonus(); + return bytes; +} + /* ---------------------------------------------------------------------- assign an index to named atom property and return index returned value encodes which sub-style and index returned by sub-style @@ -179,6 +450,75 @@ void AtomVecHybrid::pack_property_atom(int multiindex, double *buf, styles[k]->pack_property_atom(index,buf,nvalues,groupbit); } +// ---------------------------------------------------------------------- +// internal methods +// ---------------------------------------------------------------------- + +/* ---------------------------------------------------------------------- + merge fields and remove duplicate fields + concat = root + Inum fields string from all substyles + return dedup = concat with duplicate fields removed + if concat_flag set, also return concat (w/ duplicates) + so caller can check for problematic fields, call will free it +------------------------------------------------------------------------- */ + +char *AtomVecHybrid::merge_fields(int inum, char *root, + int concat_flag, char *&concat_str) +{ + // create concatenated string of length size from root + all substyles + + int size = strlen(root) + 1; + for (int k = 0; k < nstyles; k++) + size += strlen(fieldstrings[k].fstr[inum]) + 1; + + char *concat = new char[size]; + strcpy(concat,root); + + for (int k = 0; k < nstyles; k++) { + if (strlen(concat)) strcat(concat," "); + strcat(concat,fieldstrings[k].fstr[inum]); + } + + // identify unique words in concatenated string + + char *copystr; + char **words; + int nwords = tokenize(concat,words,copystr); + int *unique = new int[nwords]; + + for (int i = 0; i < nwords; i++) { + unique[i] = 1; + for (int j = 0; j < i; j++) + if (strcmp(words[i],words[j]) == 0) unique[i] = 0; + } + + // construct a new deduped string + + char *dedup = new char[size]; + dedup[0] = '\0'; + + for (int i = 0; i < nwords; i++) { + if (!unique[i]) continue; + strcat(dedup,words[i]); + if (i < nwords-1) strcat(dedup," "); + } + + // clean up or return concat + + if (concat_flag) concat_str = concat; + else delete [] concat; + + // clean up + + delete [] copystr; + delete [] words; + delete [] unique; + + // return final concatenated, deduped string + + return dedup; +} + /* ---------------------------------------------------------------------- allstyles = list of all atom styles in this LAMMPS executable ------------------------------------------------------------------------- */ diff --git a/src/atom_vec_hybrid.h b/src/atom_vec_hybrid.h index 41067d44f2..83d29112dd 100644 --- a/src/atom_vec_hybrid.h +++ b/src/atom_vec_hybrid.h @@ -35,6 +35,33 @@ class AtomVecHybrid : public AtomVec { void process_args(int, char **); void init(); void force_clear(int, size_t); + + void copy_bonus(int, int, int); + void clear_bonus() {} + int pack_comm_bonus(int, int *, double *); + void unpack_comm_bonus(int, int, double *); + int pack_border_bonus(int, int *, double *); + int unpack_border_bonus(int, int, double *); + int pack_exchange_bonus(int, double *); + int unpack_exchange_bonus(int, double *); + int size_restart_bonus(); + int pack_restart_bonus(int, double *); + int unpack_restart_bonus(int, double *); + bigint memory_usage_bonus(); + + void pack_restart_pre(int); + void pack_restart_post(int); + void unpack_restart_init(int); + void create_atom_post(int); + void data_atom_post(int); + void pack_data_pre(int); + void pack_data_post(int); + + //void create_atom_post(int); + //void data_atom_post(int); + //void pack_data_pre(int); + //void pack_data_post(int); + int property_atom(char *); void pack_property_atom(int, double *, int, int); @@ -42,8 +69,15 @@ class AtomVecHybrid : public AtomVec { int nallstyles; char **allstyles; - void concatenate_fields(); - void concatenate(char *&, char *); + struct FieldStrings { + char **fstr; + }; + FieldStrings *fieldstrings; + + int nstyles_bonus; + class AtomVec **styles_bonus; + + char *merge_fields(int, char *, int, char *&); void build_styles(); int known_style(char *); }; diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index 3b806c959e..ded2f88c2f 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -50,12 +50,12 @@ AtomVecLine::AtomVecLine(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "molecule radius rmass omega torque line"; fields_copy = (char *) "molecule radius rmass omega"; - fields_comm = NULL; + fields_comm = (char *) ""; fields_comm_vel = (char *) "omega"; fields_reverse = (char *) "torque"; fields_border = (char *) "molecule radius rmass"; @@ -64,7 +64,7 @@ AtomVecLine::AtomVecLine(LAMMPS *lmp) : AtomVec(lmp) fields_restart = (char *) "molecule radius rmass omega"; fields_create = (char *) "molecule radius rmass omega line"; fields_data_atom = (char *) "id molecule type line rmass x"; - fields_data_vel = (char *) "omega"; + fields_data_vel = (char *) "id v omega"; setup_fields(); } diff --git a/src/atom_vec_line.h b/src/atom_vec_line.h index a8bc8fd1bc..a47843f4f2 100644 --- a/src/atom_vec_line.h +++ b/src/atom_vec_line.h @@ -40,7 +40,6 @@ class AtomVecLine : public AtomVec { void clear_bonus(); int pack_comm_bonus(int, int *, double *); void unpack_comm_bonus(int, int, double *); - int pack_reverse_bonus(int, int, double *); int pack_border_bonus(int, int *, double *); int unpack_border_bonus(int, int, double *); int pack_exchange_bonus(int, double *); diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index 5ae4c0ca21..6796f9c8f2 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -36,12 +36,12 @@ AtomVecSphere::AtomVecSphere(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "radius rmass omega torque"; fields_copy = (char *) "radius rmass omega"; - fields_comm = NULL; + fields_comm = (char *) ""; fields_comm_vel = (char *) "omega"; fields_reverse = (char *) "torque"; fields_border = (char *) "radius rmass"; @@ -50,7 +50,7 @@ AtomVecSphere::AtomVecSphere(LAMMPS *lmp) : AtomVec(lmp) fields_restart = (char *) "radius rmass omega"; fields_create = (char *) "radius rmass omega"; fields_data_atom = (char *) "id type radius rmass x"; - fields_data_vel = (char *) "omega"; + fields_data_vel = (char *) "id v omega"; setup_fields(); } diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index 6da0ef7015..32d75c16f3 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -52,12 +52,12 @@ AtomVecTri::AtomVecTri(LAMMPS *lmp) : AtomVec(lmp) // strings with peratom variables to include in each AtomVec method // strings cannot contain fields in corresponding AtomVec default strings - // order of fields in the string does not matter - // except fields_data_atom and fields_data_vel which must match data file + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) "molecule radius rmass omega angmom torque tri"; fields_copy = (char *) "molecule radius rmass omega angmom"; - fields_comm = NULL; + fields_comm = (char *) ""; fields_comm_vel = (char *) "omega angmom"; fields_reverse = (char *) "torque"; fields_border = (char *) "molecule radius rmass"; @@ -66,7 +66,7 @@ AtomVecTri::AtomVecTri(LAMMPS *lmp) : AtomVec(lmp) fields_restart = (char *) "molecule radius rmass omega angmom"; fields_create = (char *) "molecule radius rmass omega angmom line"; fields_data_atom = (char *) "id molecule type tri rmass x"; - fields_data_vel = (char *) "omega angmom"; + fields_data_vel = (char *) "id v omega angmom"; setup_fields(); } diff --git a/src/atom_vec_tri.h b/src/atom_vec_tri.h index 3c701067b2..ad4c0103ca 100644 --- a/src/atom_vec_tri.h +++ b/src/atom_vec_tri.h @@ -42,7 +42,6 @@ class AtomVecTri : public AtomVec { void clear_bonus(); int pack_comm_bonus(int, int *, double *); void unpack_comm_bonus(int, int, double *); - int pack_reverse_bonus(int, int, double *); int pack_border_bonus(int, int *, double *); int unpack_border_bonus(int, int, double *); int pack_exchange_bonus(int, double *); From 9e52980aaae343c0c2dc912ff5b44ee7a46b8eb5 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 3 Dec 2019 11:15:16 -0700 Subject: [PATCH 010/577] all of remaining USER package styles except AWPMD --- src/SPIN/atom_vec_spin.cpp | 12 +- src/USER-EFF/atom_vec_electron.cpp | 17 +- src/USER-MESO/atom_vec_edpd.cpp | 20 +- src/USER-MESO/atom_vec_edpd.h | 1 + src/USER-MESO/atom_vec_mdpd.cpp | 903 +------------------ src/USER-MESO/atom_vec_mdpd.h | 43 +- src/USER-MESO/atom_vec_tdpd.cpp | 858 +----------------- src/USER-MESO/atom_vec_tdpd.h | 32 +- src/USER-SMD/atom_vec_smd.cpp | 1324 +++------------------------- src/USER-SMD/atom_vec_smd.h | 59 +- src/USER-SPH/atom_vec_meso.cpp | 977 +------------------- src/USER-SPH/atom_vec_meso.h | 43 +- src/atom.cpp | 128 ++- src/atom.h | 16 +- src/atom_vec_hybrid.h | 5 - src/atom_vec_sphere.cpp | 7 +- 16 files changed, 368 insertions(+), 4077 deletions(-) diff --git a/src/SPIN/atom_vec_spin.cpp b/src/SPIN/atom_vec_spin.cpp index a8ff15492a..638a3b8021 100644 --- a/src/SPIN/atom_vec_spin.cpp +++ b/src/SPIN/atom_vec_spin.cpp @@ -62,14 +62,16 @@ AtomVecSpin::AtomVecSpin(LAMMPS *lmp) : AtomVec(lmp) } /* ---------------------------------------------------------------------- - clear all forces (mechanical and magnetic) + clear extra forces starting at atom N + nbytes = # of bytes to clear for a per-atom vector + include f b/c this is invoked from within SPIN pair styles ------------------------------------------------------------------------- */ -void AtomVecSpin::force_clear(int /*n*/, size_t nbytes) +void AtomVecSpin::force_clear(int n, size_t nbytes) { - memset(&atom->f[0][0],0,3*nbytes); - memset(&atom->fm[0][0],0,3*nbytes); - memset(&atom->fm_long[0][0],0,3*nbytes); + memset(&atom->f[n][0],0,3*nbytes); + memset(&atom->fm[n][0],0,3*nbytes); + memset(&atom->fm_long[n][0],0,3*nbytes); } /* ---------------------------------------------------------------------- diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index 0bad0f115f..3688f7f582 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -18,14 +18,8 @@ #include "atom_vec_electron.h" #include #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" #include "citeme.h" -#include "memory.h" #include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -46,6 +40,8 @@ AtomVecElectron::AtomVecElectron(LAMMPS *lmp) : AtomVec(lmp) { if (lmp->citeme) lmp->citeme->add(cite_user_eff_package); + mass_type = 1; + molecular = 0; forceclearflag = 1; atom->ecp_flag = 0; @@ -75,11 +71,14 @@ AtomVecElectron::AtomVecElectron(LAMMPS *lmp) : AtomVec(lmp) setup_fields(); } -/* ---------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- + clear extra forces starting at atom N + nbytes = # of bytes to clear for a per-atom vector +------------------------------------------------------------------------- */ -void AtomVecElectron::force_clear(int /*n*/, size_t nbytes) +void AtomVecElectron::force_clear(int n, size_t nbytes) { - memset(&atom->erforce[0],0,nbytes); + memset(&atom->erforce[n],0,nbytes); } /* ---------------------------------------------------------------------- diff --git a/src/USER-MESO/atom_vec_edpd.cpp b/src/USER-MESO/atom_vec_edpd.cpp index b4602c760c..7a031c256b 100644 --- a/src/USER-MESO/atom_vec_edpd.cpp +++ b/src/USER-MESO/atom_vec_edpd.cpp @@ -29,9 +29,6 @@ using namespace LAMMPS_NS; AtomVecEDPD::AtomVecEDPD(LAMMPS *lmp) : AtomVec(lmp) { - if (strcmp(update->unit_style,"lj") != 0) - error->all(FLERR,"Atom style edpd requires lj units"); - molecular = 0; mass_type = 1; forceclearflag = 1; @@ -62,9 +59,22 @@ AtomVecEDPD::AtomVecEDPD(LAMMPS *lmp) : AtomVec(lmp) /* ---------------------------------------------------------------------- */ -void AtomVecEDPD::force_clear(int /*n*/, size_t nbytes) +void AtomVecEDPD::init() { - memset(&atom->edpd_flux[0],0,nbytes); + AtomVec::init(); + + if (strcmp(update->unit_style,"lj") != 0) + error->all(FLERR,"Atom style edpd requires lj units"); +} + +/* ---------------------------------------------------------------------- + clear extra forces starting at atom N + nbytes = # of bytes to clear for a per-atom vector +------------------------------------------------------------------------- */ + +void AtomVecEDPD::force_clear(int n, size_t nbytes) +{ + memset(&atom->edpd_flux[n],0,nbytes); } /* ---------------------------------------------------------------------- diff --git a/src/USER-MESO/atom_vec_edpd.h b/src/USER-MESO/atom_vec_edpd.h index 7d41b51665..bb667ae792 100644 --- a/src/USER-MESO/atom_vec_edpd.h +++ b/src/USER-MESO/atom_vec_edpd.h @@ -27,6 +27,7 @@ namespace LAMMPS_NS { class AtomVecEDPD : public AtomVec { public: AtomVecEDPD(class LAMMPS *); + void init(); void force_clear(int, size_t); void create_atom_post(int); void data_atom_post(int); diff --git a/src/USER-MESO/atom_vec_mdpd.cpp b/src/USER-MESO/atom_vec_mdpd.cpp index 4c9db36645..eefda1ff6a 100644 --- a/src/USER-MESO/atom_vec_mdpd.cpp +++ b/src/USER-MESO/atom_vec_mdpd.cpp @@ -14,14 +14,8 @@ #include "atom_vec_mdpd.h" #include #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" #include "update.h" -#include "memory.h" #include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -29,865 +23,63 @@ using namespace LAMMPS_NS; AtomVecMDPD::AtomVecMDPD(LAMMPS *lmp) : AtomVec(lmp) { - if(strcmp(update->unit_style,"lj") != 0) - error->all(FLERR,"Atom style mdpd requires lj units"); - molecular = 0; mass_type = 1; forceclearflag = 1; - comm_x_only = comm_f_only = 0; - comm->ghost_velocity = 1; - - size_forward = 3 + 4; // 3 + rho + vest[3], that means we may only communicate 4 in hybrid - size_reverse = 3 + 1; // 3 + drho - size_border = 6 + 4; // 6 + rho + vest[3] - size_velocity = 3; - size_data_atom = 6; - size_data_vel = 4; - xcol_data = 4; - atom->rho_flag = 1; atom->vest_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file + + fields_grow = (char *) "rho drho vest"; + fields_copy = (char *) "rho drho vest"; + fields_comm = (char *) "rho vest"; + fields_comm_vel = (char *) "rho vest"; + fields_reverse = (char *) "drho"; + fields_border = (char *) "rho vest"; + fields_border_vel = (char *) "rho vest"; + fields_exchange = (char *) "rho vest"; + fields_restart = (char * ) "rho vest"; + fields_create = (char *) "rho drho vest"; + fields_data_atom = (char *) "id type rho x"; + fields_data_vel = (char *) "id v"; + + setup_fields(); } -/* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n - ------------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- */ -void AtomVecMDPD::grow(int n) +void AtomVecMDPD::init() { - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag, nmax, "atom:tag"); - type = memory->grow(atom->type, nmax, "atom:type"); - mask = memory->grow(atom->mask, nmax, "atom:mask"); - image = memory->grow(atom->image, nmax, "atom:image"); - x = memory->grow(atom->x, nmax, 3, "atom:x"); - v = memory->grow(atom->v, nmax, 3, "atom:v"); - f = memory->grow(atom->f, nmax*comm->nthreads, 3, "atom:f"); - - rho = memory->grow(atom->rho, nmax, "atom:rho"); - drho = memory->grow(atom->drho, nmax*comm->nthreads, "atom:drho"); - vest = memory->grow(atom->vest, nmax, 3, "atom:vest"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); + if (strcmp(update->unit_style,"lj") != 0) + error->all(FLERR,"Atom style mdpd requires lj units"); } /* ---------------------------------------------------------------------- - reset local array ptrs - ------------------------------------------------------------------------- */ - -void AtomVecMDPD::grow_reset() { - tag = atom->tag; - type = atom->type; - mask = atom->mask; - image = atom->image; - x = atom->x; - v = atom->v; - f = atom->f; - rho = atom->rho; - drho = atom->drho; - vest = atom->vest; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMDPD::copy(int i, int j, int delflag) { - //printf("in AtomVecMDPD::copy\n"); - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - rho[j] = rho[i]; - drho[j] = drho[i]; - vest[j][0] = vest[i][0]; - vest[j][1] = vest[i][1]; - vest[j][2] = vest[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i, j,delflag); -} - -/* ---------------------------------------------------------------------- */ + clear extra forces starting at atom N + nbytes = # of bytes to clear for a per-atom vector +------------------------------------------------------------------------- */ void AtomVecMDPD::force_clear(int n, size_t nbytes) { - memset(&drho[n],0,nbytes); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_comm_hybrid(int n, int *list, double *buf) { - //printf("in AtomVecMDPD::pack_comm_hybrid\n"); - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::unpack_comm_hybrid(int n, int first, double *buf) { - //printf("in AtomVecMDPD::unpack_comm_hybrid\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - rho[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_border_hybrid(int n, int *list, double *buf) { - //printf("in AtomVecMDPD::pack_border_hybrid\n"); - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::unpack_border_hybrid(int n, int first, double *buf) { - //printf("in AtomVecMDPD::unpack_border_hybrid\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - rho[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_reverse_hybrid(int n, int first, double *buf) { - //printf("in AtomVecMDPD::pack_reverse_hybrid\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = drho[i]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::unpack_reverse_hybrid(int n, int *list, double *buf) { - //printf("in AtomVecMDPD::unpack_reverse_hybrid\n"); - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - drho[j] += buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_comm(int n, int *list, double *buf, int pbc_flag, - int *pbc) { - //printf("in AtomVecMDPD::pack_comm\n"); - int i, j, m; - double dx, dy, dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0] * domain->xprd; - dy = pbc[1] * domain->yprd; - dz = pbc[2] * domain->zprd; - } else { - dx = pbc[0] * domain->xprd + pbc[5] * domain->xy + pbc[4] * domain->xz; - dy = pbc[1] * domain->yprd + pbc[3] * domain->yz; - dz = pbc[2] * domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_comm_vel(int n, int *list, double *buf, int pbc_flag, - int *pbc) { - //printf("in AtomVecMDPD::pack_comm_vel\n"); - int i, j, m; - double dx, dy, dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0] * domain->xprd; - dy = pbc[1] * domain->yprd; - dz = pbc[2] * domain->zprd; - } else { - dx = pbc[0] * domain->xprd + pbc[5] * domain->xy + pbc[4] * domain->xz; - dy = pbc[1] * domain->yprd + pbc[3] * domain->yz; - dz = pbc[2] * domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMDPD::unpack_comm(int n, int first, double *buf) { - //printf("in AtomVecMDPD::unpack_comm\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - rho[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMDPD::unpack_comm_vel(int n, int first, double *buf) { - //printf("in AtomVecMDPD::unpack_comm_vel\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - rho[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_reverse(int n, int first, double *buf) { - //printf("in AtomVecMDPD::pack_reverse\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = drho[i]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMDPD::unpack_reverse(int n, int *list, double *buf) { - //printf("in AtomVecMDPD::unpack_reverse\n"); - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - drho[j] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_border(int n, int *list, double *buf, int pbc_flag, - int *pbc) { - //printf("in AtomVecMDPD::pack_border\n"); - int i, j, m; - double dx, dy, dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0] * domain->xprd; - dy = pbc[1] * domain->yprd; - dz = pbc[2] * domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_border_vel(int n, int *list, double *buf, int pbc_flag, - int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0] * domain->xprd; - dy = pbc[1] * domain->yprd; - dz = pbc[2] * domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - dvx = pbc[0] * h_rate[0] + pbc[5] * h_rate[5] + pbc[4] * h_rate[4]; - dvy = pbc[1] * h_rate[1] + pbc[3] * h_rate[3]; - dvz = pbc[2] * h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - buf[m++] = rho[j]; - buf[m++] = vest[j][0] + dvx; - buf[m++] = vest[j][1] + dvy; - buf[m++] = vest[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = rho[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMDPD::unpack_border(int n, int first, double *buf) { - //printf("in AtomVecMDPD::unpack_border\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) - grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - rho[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMDPD::unpack_border_vel(int n, int first, double *buf) { - //printf("in AtomVecMDPD::unpack_border_vel\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) - grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - rho[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); + memset(&atom->drho[n],0,nbytes); } /* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them - ------------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_exchange(int i, double *buf) { - //printf("in AtomVecMDPD::pack_exchange\n"); - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = rho[i]; - buf[m++] = vest[i][0]; - buf[m++] = vest[i][1]; - buf[m++] = vest[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i, &buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMDPD::unpack_exchange(double *buf) { - //printf("in AtomVecMDPD::unpack_exchange\n"); - int nlocal = atom->nlocal; - if (nlocal == nmax) - grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - rho[nlocal] = buf[m++]; - vest[nlocal][0] = buf[m++]; - vest[nlocal][1] = buf[m++]; - vest[nlocal][2] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> unpack_exchange(nlocal, - &buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes - ------------------------------------------------------------------------- */ - -int AtomVecMDPD::size_restart() { - int i; - - int nlocal = atom->nlocal; - int n = 15 * nlocal; // 11 + rho + vest[3] - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive - ------------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_restart(int i, double *buf) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = rho[i]; - buf[m++] = vest[i][0]; - buf[m++] = vest[i][1]; - buf[m++] = vest[i][2]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i, &buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities - ------------------------------------------------------------------------- */ - -int AtomVecMDPD::unpack_restart(double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra, nmax, atom->nextra_store, "atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - rho[nlocal] = buf[m++]; - vest[nlocal][0] = buf[m++]; - vest[nlocal][1] = buf[m++]; - vest[nlocal][2] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) - extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults - ------------------------------------------------------------------------- */ - -void AtomVecMDPD::create_atom(int itype, double *coord) { - int nlocal = atom->nlocal; - if (nlocal == nmax) - grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - rho[nlocal] = 0.0; - vest[nlocal][0] = 0.0; - vest[nlocal][1] = 0.0; - vest[nlocal][2] = 0.0; - drho[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities - ------------------------------------------------------------------------- */ - -void AtomVecMDPD::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - vest[nlocal][0] = 0.0; - vest[nlocal][1] = 0.0; - vest[nlocal][2] = 0.0; - - rho[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - drho[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style - ------------------------------------------------------------------------- */ - -int AtomVecMDPD::data_atom_hybrid(int nlocal, char **values) -{ - rho[nlocal] = utils::numeric(FLERR,values[0],true,lmp); - return 3; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecMDPD::pack_data(double **buf) +void AtomVecMDPD::data_atom_post(int ilocal) { - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = rho[i]; - buf[i][3] = x[i][0]; - buf[i][4] = x[i][1]; - buf[i][5] = x[i][2]; - buf[i][6] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][7] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][8] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecMDPD::pack_data_hybrid(int i, double *buf) -{ - buf[0] = rho[i]; - return 3; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecMDPD::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %d %-1.16e %-1.16e %-1.16e %-1.16e " - "%d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4],buf[i][5], - (int) ubuf(buf[i][6]).i,(int) ubuf(buf[i][7]).i, - (int) ubuf(buf[i][8]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecMDPD::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e",buf[0]); - return 3; + atom->drho[ilocal] = 0.0; + atom->vest[ilocal][0] = 0.0; + atom->vest[ilocal][1] = 0.0; + atom->vest[ilocal][2] = 0.0; } /* ---------------------------------------------------------------------- @@ -912,15 +104,17 @@ void AtomVecMDPD::pack_property_atom(int index, double *buf, { int *mask = atom->mask; int nlocal = atom->nlocal; - int n = 0; + int n = 0; if (index == 0) { + double *rho = atom->rho; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = rho[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 1) { + double *drho = atom->drho; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = drho[i]; else buf[n] = 0.0; @@ -928,24 +122,3 @@ void AtomVecMDPD::pack_property_atom(int index, double *buf, } } } - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory - ------------------------------------------------------------------------- */ - -bigint AtomVecMDPD::memory_usage() { - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag, nmax); - if (atom->memcheck("type")) bytes += memory->usage(type, nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask, nmax); - if (atom->memcheck("image")) bytes += memory->usage(image, nmax); - if (atom->memcheck("x")) bytes += memory->usage(x, nmax, 3); - if (atom->memcheck("v")) bytes += memory->usage(v, nmax, 3); - if (atom->memcheck("f")) bytes += memory->usage(f, nmax*comm->nthreads, 3); - if (atom->memcheck("rho")) bytes += memory->usage(rho, nmax); - if (atom->memcheck("drho")) bytes += memory->usage(drho, nmax*comm->nthreads); - if (atom->memcheck("vest")) bytes += memory->usage(vest, nmax, 3); - - return bytes; -} diff --git a/src/USER-MESO/atom_vec_mdpd.h b/src/USER-MESO/atom_vec_mdpd.h index 9e9ffcdcf2..0eb4fff2df 100644 --- a/src/USER-MESO/atom_vec_mdpd.h +++ b/src/USER-MESO/atom_vec_mdpd.h @@ -27,50 +27,11 @@ namespace LAMMPS_NS { class AtomVecMDPD : public AtomVec { public: AtomVecMDPD(class LAMMPS *); - ~AtomVecMDPD() {} - void grow(int); - void grow_reset(); - void copy(int, int, int); + void init(); void force_clear(int, size_t); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - int pack_comm_hybrid(int, int *, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_border_hybrid(int, int *, double *); - int unpack_border_hybrid(int, int, double *); - int pack_reverse_hybrid(int, int, double *); - int unpack_reverse_hybrid(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); + void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); - bigint memory_usage(); - - private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double *rho, *drho; - double **vest; // estimated velocity during force computation }; } diff --git a/src/USER-MESO/atom_vec_tdpd.cpp b/src/USER-MESO/atom_vec_tdpd.cpp index 74ac47066b..55284f69a2 100644 --- a/src/USER-MESO/atom_vec_tdpd.cpp +++ b/src/USER-MESO/atom_vec_tdpd.cpp @@ -14,12 +14,7 @@ #include "atom_vec_tdpd.h" #include #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" #include "update.h" -#include "memory.h" #include "error.h" #include "utils.h" @@ -29,29 +24,30 @@ using namespace LAMMPS_NS; AtomVecTDPD::AtomVecTDPD(LAMMPS *lmp) : AtomVec(lmp) { - if(strcmp(update->unit_style,"lj") != 0) - error->all(FLERR,"Atom style edpd requires lj units"); - molecular = 0; mass_type = 1; forceclearflag = 1; - comm_x_only = comm_f_only = 0; - comm->ghost_velocity = 1; - - cc_species = 0; // for now, reset in process_args() - - size_forward = 3 + cc_species + 3; //vest[3] - size_reverse = 3 + cc_species; - size_border = 6 + cc_species + 3; //vest[3] - size_velocity = 3; - // for data_atom, we read id + type + xyz[3] + cc[i] where i=1,cc_species - size_data_atom = 5 + cc_species; - size_data_vel = 4; - xcol_data = 3; - atom->tdpd_flag = 1; atom->vest_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file + + fields_grow = (char *) "cc cc_flux vest"; + fields_copy = (char *) "cc vest"; + fields_comm = (char *) "cc vest"; + fields_comm_vel = (char *) "cc vest"; + fields_reverse = (char *) "cc_flux"; + fields_border = (char *) "cc vest"; + fields_border_vel = (char *) "cc vest"; + fields_exchange = (char *) "cc vest"; + fields_restart = (char * ) "cc vest"; + fields_create = (char *) "cc vest"; + fields_data_atom = (char *) "id type x cc"; + fields_data_vel = (char *) "id v"; } /* ---------------------------------------------------------------------- @@ -66,812 +62,42 @@ void AtomVecTDPD::process_args(int narg, char **arg) atom->cc_species = utils::inumeric(FLERR,arg[0],false,lmp); cc_species = atom->cc_species; - // reset sizes that depend on cc_species + atom->add_peratom_change_columns("cc",cc_species); + atom->add_peratom_change_columns("cc_species",cc_species); - size_forward = 3 + cc_species + 3; - size_reverse = 3 + cc_species; - size_border = 6 + cc_species + 3; - size_data_atom = 5 + cc_species; + // delay setting up of fields until now + + setup_fields(); +} + +/* ---------------------------------------------------------------------- */ + +void AtomVecTDPD::init() +{ + AtomVec::init(); + + if (strcmp(update->unit_style,"lj") != 0) + error->all(FLERR,"Atom style tdpd requires lj units"); } /* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n + clear extra forces starting at atom N + nbytes = # of bytes to clear for a per-atom vector ------------------------------------------------------------------------- */ -void AtomVecTDPD::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - cc = memory->grow(atom->cc,nmax*comm->nthreads,cc_species,"atom:cc"); - cc_flux = memory->grow(atom->cc_flux,nmax*comm->nthreads,cc_species, - "atom:cc_flux"); - vest = memory->grow(atom->vest, nmax, 3, "atom:vest"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecTDPD::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - cc = atom->cc; cc_flux = atom->cc_flux; - vest = atom->vest; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecTDPD::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - for(int k = 0; k < cc_species; k++) - cc[j][k] = cc[i][k]; - - vest[j][0] = vest[i][0]; - vest[j][1] = vest[i][1]; - vest[j][2] = vest[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - - void AtomVecTDPD::force_clear(int n, size_t nbytes) { - memset(&cc_flux[n][0],0,cc_species*nbytes); -} - - -/* ---------------------------------------------------------------------- */ - -int AtomVecTDPD::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,k,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - - for(k = 0; k < cc_species; k++) - buf[m++] = cc[j][k]; - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - - for(k = 0; k < cc_species; k++) - buf[m++] = cc[j][k]; - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTDPD::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,k,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - - for(k = 0; k < cc_species; k++) - buf[m++] = cc[j][k]; - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - - for(k = 0; k < cc_species; k++) - buf[m++] = cc[j][k]; - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - for(k = 0; k < cc_species; k++) - buf[m++] = cc[j][k]; - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTDPD::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - - for(int k = 0; k < cc_species; k++) - cc[i][k] = buf[m++]; - - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTDPD::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - for(int k = 0; k < cc_species; k++) - cc[i][k] = buf[m++]; - - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTDPD::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - for(int k = 0; k < cc_species; k++) - buf[m++] = cc_flux[i][k]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTDPD::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - for(int k = 0; k < cc_species; k++) - cc_flux[j][k] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTDPD::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - for(int k = 0; k < cc_species; k++) - buf[m++] = cc[j][k]; - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - for(int k = 0; k < cc_species; k++) - buf[m++] = cc[j][k]; - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTDPD::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - for(int k = 0; k < cc_species; k++) - buf[m++] = cc[j][k]; - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - for(int k = 0; k < cc_species; k++) - buf[m++] = cc[j][k]; - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - for(int k = 0; k < cc_species; k++) - buf[m++] = cc[j][k]; - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTDPD::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - for(int k = 0; k < cc_species; k++) - cc[i][k] = buf[m++]; - - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecTDPD::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - for(int k = 0; k < cc_species; k++) - cc[i][k] = buf[m++]; - - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); + memset(&atom->cc_flux[n][0],0,cc_species*nbytes); } /* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -int AtomVecTDPD::pack_exchange(int i, double *buf) +void AtomVecTDPD::data_atom_post(int ilocal) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - for(int k = 0; k < cc_species; k++) - buf[m++] = cc[i][k]; - - buf[m++] = vest[i][0]; - buf[m++] = vest[i][1]; - buf[m++] = vest[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecTDPD::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - for(int k = 0; k < cc_species; k++) - cc[nlocal][k] = buf[m++]; - - vest[nlocal][0] = buf[m++]; - vest[nlocal][1] = buf[m++]; - vest[nlocal][2] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes -------------------------------------------------------------------------- */ - -int AtomVecTDPD::size_restart() -{ - int i; - - int nlocal = atom->nlocal; - int n = (11 + cc_species + 3) * nlocal; // 11 + cc[i] + vest[3] - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecTDPD::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - for(int k = 0; k < cc_species; k++) - buf[m++] = cc[i][k]; - - buf[m++] = vest[i][0]; - buf[m++] = vest[i][1]; - buf[m++] = vest[i][2]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecTDPD::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - for(int k = 0; k < cc_species; k++) - cc[nlocal][k] = buf[m++]; - - vest[nlocal][0] = buf[m++]; - vest[nlocal][1] = buf[m++]; - vest[nlocal][2] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults -------------------------------------------------------------------------- */ - -void AtomVecTDPD::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - for(int k = 0; k < cc_species; k++) - cc[nlocal][k] = 0.0; - - vest[nlocal][0] = 0.0; - vest[nlocal][1] = 0.0; - vest[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities -------------------------------------------------------------------------- */ - -void AtomVecTDPD::data_atom(double *coord, imageint imagetmp, char **values) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - for(int k = 0; k < cc_species; k++) - cc[nlocal][k] = utils::numeric(FLERR,values[5+k],true,lmp); - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - vest[nlocal][0] = 0.0; - vest[nlocal][1] = 0.0; - vest[nlocal][2] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecTDPD::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = x[i][0]; - buf[i][3] = x[i][1]; - buf[i][4] = x[i][2]; - buf[i][5] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][6] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][7] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - for(int k = 0; k < cc_species; k++) - buf[i][8+k] = cc[i][k]; - } -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecTDPD::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++){ - fprintf(fp,TAGINT_FORMAT " %d %-1.16e %-1.16e %-1.16e %d %d %d", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4], - (int) ubuf(buf[i][5]).i,(int) ubuf(buf[i][6]).i, - (int) ubuf(buf[i][7]).i); - for(int k = 0; k < cc_species; k++) - fprintf(fp," %-1.16e",buf[i][8+k]); - fprintf(fp,"\n"); - } -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecTDPD::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - if (atom->memcheck("cc")) bytes += memory->usage(cc,nmax*comm->nthreads,cc_species); - if (atom->memcheck("cc_flux")) bytes += memory->usage(cc_flux,nmax*comm->nthreads,cc_species); - if (atom->memcheck("vest")) bytes += memory->usage(vest, nmax); - - return bytes; + atom->vest[ilocal][0] = 0.0; + atom->vest[ilocal][1] = 0.0; + atom->vest[ilocal][2] = 0.0; } diff --git a/src/USER-MESO/atom_vec_tdpd.h b/src/USER-MESO/atom_vec_tdpd.h index 86e9ae4bb8..7321859fb4 100644 --- a/src/USER-MESO/atom_vec_tdpd.h +++ b/src/USER-MESO/atom_vec_tdpd.h @@ -27,40 +27,12 @@ namespace LAMMPS_NS { class AtomVecTDPD : public AtomVec { public: AtomVecTDPD(class LAMMPS *); - virtual ~AtomVecTDPD() {} void process_args(int, char **); - void grow(int); - void grow_reset(); - void copy(int, int, int); + void init(); void force_clear(int, size_t); - virtual int pack_comm(int, int *, double *, int, int *); - virtual int pack_comm_vel(int, int *, double *, int, int *); - virtual void unpack_comm(int, int, double *); - virtual void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - virtual int pack_border(int, int *, double *, int, int *); - virtual int pack_border_vel(int, int *, double *, int, int *); - virtual void unpack_border(int, int, double *); - virtual void unpack_border_vel(int, int, double *); - virtual int pack_exchange(int, double *); - virtual int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - void pack_data(double **); - void write_data(FILE *, int, double **); - bigint memory_usage(); + void data_atom_post(int); protected: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double **vest; // store intermediate velocity for using mvv integrator - double **cc,**cc_flux; int cc_species; }; diff --git a/src/USER-SMD/atom_vec_smd.cpp b/src/USER-SMD/atom_vec_smd.cpp index 604504c5a7..0fada3dc2a 100644 --- a/src/USER-SMD/atom_vec_smd.cpp +++ b/src/USER-SMD/atom_vec_smd.cpp @@ -25,13 +25,7 @@ #include "atom_vec_smd.h" #include #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" -#include "memory.h" #include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -40,1247 +34,139 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : - AtomVec(lmp) { - molecular = 0; +AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp) +{ + molecular = 0; + mass_type = 1; + forceclearflag = 1; - comm_x_only = 0; - comm_f_only = 0; - size_forward = 6; // variables that are changed by time integration - size_reverse = 4; // f[3] + de - size_border = 31; - size_velocity = 6; // v + vest - size_data_atom = 13; // 7 + 3 x0 + 3 x - size_data_vel = 4; - xcol_data = 11; + atom->smd_flag = 1; - atom->radius_flag = 1; - atom->rmass_flag = 1; - atom->vfrac_flag = 1; - atom->contact_radius_flag = 1; - atom->molecule_flag = 1; - atom->smd_data_9_flag = 1; - atom->e_flag = 1; - atom->vest_flag = 1; - atom->smd_stress_flag = 1; - atom->eff_plastic_strain_flag = 1; - atom->x0_flag = 1; - atom->damage_flag = 1; - atom->eff_plastic_strain_rate_flag = 1; + atom->radius_flag = 1; + atom->rmass_flag = 1; + atom->vfrac_flag = 1; + atom->contact_radius_flag = 1; + atom->molecule_flag = 1; + atom->smd_data_9_flag = 1; + atom->e_flag = 1; + atom->vest_flag = 1; + atom->smd_stress_flag = 1; + atom->eff_plastic_strain_flag = 1; + atom->x0_flag = 1; + atom->damage_flag = 1; + atom->eff_plastic_strain_rate_flag = 1; - forceclearflag = 1; + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file - atom->smd_flag = 1; -} + fields_grow = (char *) + "de vfrac rmass x0 radius contact_radius molecule " + "smd_data_9 e vest tlsph_stress " + "eff_plastic_strain eff_plastic_strain_rate damage"; + fields_copy = (char *) + "vfrac rmass x0 radius contact_radius molecule e " + "eff_plastic_strain eff_plastic_strain_rate vest " + "smd_data_9 smd_stress damage"; + fields_comm = (char *) "radius vfrac vest e"; + fields_comm_vel = (char *) "radius vfrac vest e"; + fields_reverse = (char *) "de"; + fields_border = (char *) + "x0 molecule radius rmass vfrac contact_radius e " + "eff_plastic_strain smd_data_9 smd_stress"; + fields_border_vel = (char *) + "x0 molecule radius rmass vfrac contact_radius e " + "eff_plastic_strain smd_data_9 smd_stress vest"; + fields_exchange = (char *) + "x0 molecule radius rmass vfrac contact_radius e " + "eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress " + "vest damage"; + fields_restart = (char *) + "x0 molecule radius rmass vfrac contact_radius e " + "eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress " + "vest damage"; + fields_create = (char *) + "x0 vest vfrac rmass radius contact_radius molecule e " + "eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress damage"; + fields_data_atom = (char *) + "id type molecule vfrac rmass radius contact_radius x"; + fields_data_vel = (char *) "id v vest"; -/* ---------------------------------------------------------------------- */ + // set these array sizes based on defines -void AtomVecSMD::init() { - AtomVec::init(); + atom->add_peratom_change_columns("smd_data_9",NMAT_FULL); + atom->add_peratom_change_columns("smd_stress",NMAT_SYMM); - // do nothing here + setup_fields(); } /* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n - ------------------------------------------------------------------------- */ + clear extra forces starting at atom N + nbytes = # of bytes to clear for a per-atom vector + NOTE: does f need to be re-cleared? +------------------------------------------------------------------------- */ -void AtomVecSMD::grow(int n) { - if (n == 0) - grow_nmax(); - else - nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR, "Per-processor system is too big"); - - //printf("in grow, nmax is now %d\n", nmax); - - tag = memory->grow(atom->tag, nmax, "atom:tag"); - type = memory->grow(atom->type, nmax, "atom:type"); - mask = memory->grow(atom->mask, nmax, "atom:mask"); - image = memory->grow(atom->image, nmax, "atom:image"); - x = memory->grow(atom->x, nmax, 3, "atom:x"); - v = memory->grow(atom->v, nmax, 3, "atom:v"); - - f = memory->grow(atom->f, nmax * comm->nthreads, 3, "atom:f"); - de = memory->grow(atom->de, nmax * comm->nthreads, "atom:de"); - - vfrac = memory->grow(atom->vfrac, nmax, "atom:vfrac"); - rmass = memory->grow(atom->rmass, nmax, "atom:rmass"); - x0 = memory->grow(atom->x0, nmax, 3, "atom:x0"); - radius = memory->grow(atom->radius, nmax, "atom:radius"); - contact_radius = memory->grow(atom->contact_radius, nmax, "atom:contact_radius"); - molecule = memory->grow(atom->molecule, nmax, "atom:molecule"); - smd_data_9 = memory->grow(atom->smd_data_9, nmax, NMAT_FULL, "atom:defgrad_old"); - e = memory->grow(atom->e, nmax, "atom:e"); - vest = memory->grow(atom->vest, nmax, 3, "atom:vest"); - tlsph_stress = memory->grow(atom->smd_stress, nmax, NMAT_SYMM, "atom:tlsph_stress"); - eff_plastic_strain = memory->grow(atom->eff_plastic_strain, nmax, "atom:eff_plastic_strain"); - eff_plastic_strain_rate = memory->grow(atom->eff_plastic_strain_rate, nmax, "atom:eff_plastic_strain_rate"); - damage = memory->grow(atom->damage, nmax, "atom:damage"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); +void AtomVecSMD::force_clear(int n, size_t nbytes) +{ + memset(&atom->de[n],0,nbytes); + memset(&atom->f[n][0],0,3*nbytes); } /* ---------------------------------------------------------------------- - reset local array ptrs - ------------------------------------------------------------------------- */ + initialize non-zero atom quantities +------------------------------------------------------------------------- */ -void AtomVecSMD::grow_reset() { - tag = atom->tag; - type = atom->type; - mask = atom->mask; - image = atom->image; - x = atom->x; - v = atom->v; - f = atom->f; - radius = atom->radius; - rmass = atom->rmass; +void AtomVecSMD::create_atom_post(int ilocal) +{ + atom->x0[ilocal][0] = atom->x[ilocal][0]; + atom->x0[ilocal][1] = atom->x[ilocal][1]; + atom->x0[ilocal][2] = atom->x[ilocal][2]; - vfrac = atom->vfrac; - x0 = atom->x0; - contact_radius = atom->contact_radius; - molecule = atom->molecule; - smd_data_9 = atom->smd_data_9; - e = atom->e; - de = atom->de; - tlsph_stress = atom->smd_stress; - eff_plastic_strain = atom->eff_plastic_strain; - eff_plastic_strain_rate = atom->eff_plastic_strain_rate; - damage = atom->damage; - vest = atom->vest; + atom->vfrac[ilocal] = 1.0; + atom->rmass[ilocal] = 1.0; + atom->radius[ilocal] = 0.5; + atom->contact_radius[ilocal] = 0.5; + atom->molecule[ilocal] = 1; + + atom->smd_data_9[ilocal][0] = 1.0; // xx + atom->smd_data_9[ilocal][4] = 1.0; // yy + atom->smd_data_9[ilocal][8] = 1.0; // zz } /* ---------------------------------------------------------------------- - copy atom I info to atom J - ------------------------------------------------------------------------- */ + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities +------------------------------------------------------------------------- */ -void AtomVecSMD::copy(int i, int j, int delflag) { - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; +void AtomVecSMD::data_atom_post(int ilocal) +{ + atom->e[ilocal] = 0.0; + atom->x0[ilocal][0] = atom->x[ilocal][0]; + atom->x0[ilocal][1] = atom->x[ilocal][1]; + atom->x0[ilocal][2] = atom->x[ilocal][2]; - vfrac[j] = vfrac[i]; - rmass[j] = rmass[i]; - x0[j][0] = x0[i][0]; - x0[j][1] = x0[i][1]; - x0[j][2] = x0[i][2]; - radius[j] = radius[i]; - contact_radius[j] = contact_radius[i]; - molecule[j] = molecule[i]; - e[j] = e[i]; - eff_plastic_strain[j] = eff_plastic_strain[i]; - eff_plastic_strain_rate[j] = eff_plastic_strain_rate[i]; - vest[j][0] = vest[i][0]; - vest[j][1] = vest[i][1]; - vest[j][2] = vest[i][2]; + atom->vest[ilocal][0] = 0.0; + atom->vest[ilocal][1] = 0.0; + atom->vest[ilocal][2] = 0.0; - for (int k = 0; k < NMAT_FULL; k++) { - smd_data_9[j][k] = smd_data_9[i][k]; - } + atom->damage[ilocal] = 0.0; - for (int k = 0; k < NMAT_SYMM; k++) { - tlsph_stress[j][k] = tlsph_stress[i][k]; - } + atom->eff_plastic_strain[ilocal] = 0.0; + atom->eff_plastic_strain_rate[ilocal] = 0.0; - damage[j] = damage[i]; + for (int k = 0; k < NMAT_FULL; k++) + atom->smd_data_9[ilocal][k] = 0.0; - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i, j, delflag); + for (int k = 0; k < NMAT_SYMM; k++) + atom->smd_stress[ilocal][k] = 0.0; + + atom->smd_data_9[ilocal][0] = 1.0; // xx + atom->smd_data_9[ilocal][4] = 1.0; // yy + atom->smd_data_9[ilocal][8] = 1.0; // zz } -/* ---------------------------------------------------------------------- */ -int AtomVecSMD::pack_comm(int /*n*/, int * /*list*/, double * /*buf*/, int /*pbc_flag*/, int * /*pbc*/) { - error->one(FLERR, "atom vec tlsph can only be used with ghost velocities turned on"); - return -1; -} -/* ---------------------------------------------------------------------- */ -int AtomVecSMD::pack_comm_vel(int n, int *list, double *buf, int pbc_flag, int *pbc) { - // communicate quantities to ghosts, which are changed by time-integration AND are required on ghost atoms. - //no need to pack stress or defgrad information here, as these quantities are not required for ghost atoms. - // Inside pair_style tlsph, these quantities are computed and communicated to ghosts. - - // no need to communicate x0 here, as it is not changed by time integration - // if x0 is changed when the ref config is updated, this communication is performed in the fix_integrate/tlsph - // similarily, rmass could be removed here. - // radius should be communicated here for future time-integration of the radius with ulsph (not implemented yet) - int i, j, m; - double dx, dy, dz, dvx, dvy, dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; //3 - buf[m++] = radius[j]; - buf[m++] = vfrac[j]; // 5 - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; // 8 - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; // 11 - buf[m++] = e[j]; // 12 - - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0] * domain->xprd; - dy = pbc[1] * domain->yprd; - dz = pbc[2] * domain->zprd; - } else { - dx = pbc[0] * domain->xprd + pbc[5] * domain->xy + pbc[4] * domain->xz; - dy = pbc[1] * domain->yprd + pbc[3] * domain->yz; - dz = pbc[2] * domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = radius[j]; - buf[m++] = vfrac[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; // 8 - - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; // 11 - buf[m++] = e[j]; // 12 - - } - } else { - dvx = pbc[0] * h_rate[0] + pbc[5] * h_rate[5] + pbc[4] * h_rate[4]; - dvy = pbc[1] * h_rate[1] + pbc[3] * h_rate[3]; - dvz = pbc[2] * h_rate[2]; -// printf("\ndvx = %f, dvy=%f, dvz=%f\n", dvx, dvy, dvz); -// printf("dx = %f, dy=%f, dz=%f\n", dx, dy, dz); - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = radius[j]; - buf[m++] = vfrac[j]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - buf[m++] = vest[j][0] + dvx; - buf[m++] = vest[j][1] + dvy; - buf[m++] = vest[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; // 8 - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; // 11 - } - - buf[m++] = e[j]; // 12 - - } - } - } - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSMD::pack_comm_hybrid(int n, int *list, double *buf) { - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = radius[j]; - buf[m++] = vfrac[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - buf[m++] = e[j]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSMD::unpack_comm(int /*n*/, int /*first*/, double * /*buf*/) { - error->one(FLERR, "atom vec tlsph can only be used with ghost velocities turned on"); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSMD::unpack_comm_vel(int n, int first, double *buf) { - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; //3 - radius[i] = buf[m++]; - vfrac[i] = buf[m++]; // 5 - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; // 8 - - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; // 11 - e[i] = buf[m++]; - - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSMD::unpack_comm_hybrid(int n, int first, double *buf) { - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - radius[i] = buf[m++]; - vfrac[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - e[i] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSMD::pack_reverse(int n, int first, double *buf) { - int i, m, last; - - printf("in pack_reverse\n"); - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = de[i]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSMD::pack_reverse_hybrid(int n, int first, double *buf) { - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = de[i]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSMD::unpack_reverse(int n, int *list, double *buf) { - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - de[j] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSMD::unpack_reverse_hybrid(int n, int *list, double *buf) { - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - de[j] += buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSMD::pack_border(int /*n*/, int * /*list*/, double * /*buf*/, int /*pbc_flag*/, int * /*pbc*/) { - error->one(FLERR, "atom vec tlsph can only be used with ghost velocities turned on"); - return -1; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSMD::pack_border_vel(int n, int *list, double *buf, int pbc_flag, int *pbc) { - int i, j, m; - double dx, dy, dz, dvx, dvy, dvz; - - //printf("AtomVecSMD::pack_border_vel\n"); - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; // 3 - buf[m++] = x0[j][0]; - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; // 6 - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; // 10 - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - buf[m++] = vfrac[j]; - buf[m++] = contact_radius[j]; - buf[m++] = e[j]; - buf[m++] = eff_plastic_strain[j]; // 16 - - for (int k = 0; k < NMAT_FULL; k++) { - buf[m++] = smd_data_9[j][k]; - } // 25 - - for (int k = 0; k < NMAT_SYMM; k++) { - buf[m++] = tlsph_stress[j][k]; - } // 31 - - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; // 34 - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; // 37 - } - } else { - - if (domain->triclinic == 0) { - dx = pbc[0] * domain->xprd; - dy = pbc[1] * domain->yprd; - dz = pbc[2] * domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - //printf("dx = %f\n", dx); - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; // 3 - buf[m++] = x0[j][0]; // this is correct - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; // 6 - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; // 10 - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - buf[m++] = vfrac[j]; - buf[m++] = contact_radius[j]; - buf[m++] = e[j]; - buf[m++] = eff_plastic_strain[j]; // 17 - - for (int k = 0; k < NMAT_FULL; k++) { - buf[m++] = smd_data_9[j][k]; - } // 26 - - for (int k = 0; k < NMAT_SYMM; k++) { - buf[m++] = tlsph_stress[j][k]; - } // 32 - - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; // 35 - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; // 38 - - } - } else { - dvx = pbc[0] * h_rate[0] + pbc[5] * h_rate[5] + pbc[4] * h_rate[4]; - dvy = pbc[1] * h_rate[1] + pbc[3] * h_rate[3]; - dvz = pbc[2] * h_rate[2]; -// printf("\ndvx = %f, dvy=%f, dvz=%f\n", dvx, dvy, dvz); -// printf("dx = %f, dy=%f, dz=%f\n", dx, dy, dz); - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; // 3 - buf[m++] = x0[j][0]; - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; // 6 - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = ubuf(molecule[j]).d; // 10 - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - buf[m++] = vfrac[j]; - buf[m++] = contact_radius[j]; - buf[m++] = e[j]; - buf[m++] = eff_plastic_strain[j]; // 16 - - for (int k = 0; k < NMAT_FULL; k++) { - buf[m++] = smd_data_9[j][k]; - } // 25 - - for (int k = 0; k < NMAT_SYMM; k++) { - buf[m++] = tlsph_stress[j][k]; - } // 31 - - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; // 34 - buf[m++] = vest[j][0] + dvx; - buf[m++] = vest[j][1] + dvy; - buf[m++] = vest[j][2] + dvz; // 37 - - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; // 34 - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; // 37 - } - - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n, list, &buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSMD::pack_border_hybrid(int n, int *list, double *buf) { - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - - buf[m++] = x0[j][0]; - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; // 3 - buf[m++] = ubuf(molecule[j]).d; // 4 - buf[m++] = radius[j]; - buf[m++] = rmass[j]; - buf[m++] = vfrac[j]; - buf[m++] = contact_radius[j]; - buf[m++] = e[j]; - buf[m++] = eff_plastic_strain[j]; // 11 - - for (int k = 0; k < NMAT_FULL; k++) { - buf[m++] = smd_data_9[j][k]; - } // 20 - - for (int k = 0; k < NMAT_SYMM; k++) { - buf[m++] = tlsph_stress[j][k]; - } // 26 - - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSMD::unpack_border(int /*n*/, int /*first*/, double * /*buf*/) { - error->one(FLERR, "atom vec tlsph can only be used with ghost velocities turned on"); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSMD::unpack_border_vel(int n, int first, double *buf) { - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) - grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; // 3 - x0[i][0] = buf[m++]; - x0[i][1] = buf[m++]; - x0[i][2] = buf[m++]; // 6 - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - molecule[i] = (tagint) ubuf(buf[m++]).i; // 10 - - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - vfrac[i] = buf[m++]; - contact_radius[i] = buf[m++]; - e[i] = buf[m++]; - eff_plastic_strain[i] = buf[m++]; // 16 - - for (int k = 0; k < NMAT_FULL; k++) { - smd_data_9[i][k] = buf[m++]; - } // 25 - - for (int k = 0; k < NMAT_SYMM; k++) { - tlsph_stress[i][k] = buf[m++]; - } // 31 - - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; // 34 - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; // 37 - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->unpack_border(n, first, &buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSMD::unpack_border_hybrid(int n, int first, double *buf) { - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x0[i][0] = buf[m++]; - x0[i][1] = buf[m++]; - x0[i][2] = buf[m++]; // 3 - molecule[i] = (tagint) ubuf(buf[m++]).i; // 4 - radius[i] = buf[m++]; - rmass[i] = buf[m++]; - vfrac[i] = buf[m++]; - contact_radius[i] = buf[m++]; - e[i] = buf[m++]; - eff_plastic_strain[i] = buf[m++]; // 11 - - for (int k = 0; k < NMAT_FULL; k++) { - smd_data_9[i][k] = buf[m++]; - } // 20 - - for (int k = 0; k < NMAT_SYMM; k++) { - tlsph_stress[i][k] = buf[m++]; - } // 26 - } - return m; -} - -/* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them - ------------------------------------------------------------------------- */ - -int AtomVecSMD::pack_exchange(int i, double *buf) { - int m = 1; - - //printf("in AtomVecSMD::pack_exchange tag %d\n", tag[i]); - - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; // 3 - buf[m++] = x0[i][0]; - buf[m++] = x0[i][1]; - buf[m++] = x0[i][2]; // 6 - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = ubuf(molecule[i]).d; // 11 - buf[m++] = radius[i]; - buf[m++] = rmass[i]; - buf[m++] = vfrac[i]; - buf[m++] = contact_radius[i]; - buf[m++] = e[i]; - buf[m++] = eff_plastic_strain[i]; // 18 - buf[m++] = eff_plastic_strain_rate[i]; // 19 - - for (int k = 0; k < NMAT_FULL; k++) { - buf[m++] = smd_data_9[i][k]; - } // 27 - - for (int k = 0; k < NMAT_SYMM; k++) { - buf[m++] = tlsph_stress[i][k]; - } // 33 - - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; // 36 - buf[m++] = vest[i][0]; - buf[m++] = vest[i][1]; - buf[m++] = vest[i][2]; // 39 - - buf[m++] = damage[i]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i, &buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecSMD::unpack_exchange(double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) - grow(0); - - int m = 1; - - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; // 3 - x0[nlocal][0] = buf[m++]; - x0[nlocal][1] = buf[m++]; - x0[nlocal][2] = buf[m++]; // 6 - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; // 11 - - radius[nlocal] = buf[m++]; - rmass[nlocal] = buf[m++]; - vfrac[nlocal] = buf[m++]; - contact_radius[nlocal] = buf[m++]; - e[nlocal] = buf[m++]; - eff_plastic_strain[nlocal] = buf[m++]; // 18 - eff_plastic_strain_rate[nlocal] = buf[m++]; // 19 - - for (int k = 0; k < NMAT_FULL; k++) { - smd_data_9[nlocal][k] = buf[m++]; - } // 27 - - for (int k = 0; k < NMAT_SYMM; k++) { - tlsph_stress[nlocal][k] = buf[m++]; - } // 33 - - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; // 36 - vest[nlocal][0] = buf[m++]; - vest[nlocal][1] = buf[m++]; - vest[nlocal][2] = buf[m++]; // 39 - - damage[nlocal] = buf[m++]; //40 - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->unpack_exchange(nlocal, &buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes - ------------------------------------------------------------------------- */ - -int AtomVecSMD::size_restart() { - int i; - - int nlocal = atom->nlocal; - int n = 43 * nlocal; // count pack_restart + 1 (size of buffer) - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive - ------------------------------------------------------------------------- */ -int AtomVecSMD::pack_restart(int i, double *buf) { - int m = 1; // 1 - - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; // 4 - buf[m++] = x0[i][0]; - buf[m++] = x0[i][1]; - buf[m++] = x0[i][2]; // 7 - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; // 10 - buf[m++] = ubuf(image[i]).d; - buf[m++] = ubuf(molecule[i]).d; - buf[m++] = radius[i]; - buf[m++] = rmass[i]; - buf[m++] = vfrac[i]; // 15 - buf[m++] = contact_radius[i]; - buf[m++] = e[i]; - buf[m++] = eff_plastic_strain[i]; - buf[m++] = eff_plastic_strain_rate[i]; // 19 - - for (int k = 0; k < NMAT_FULL; k++) { - buf[m++] = smd_data_9[i][k]; - } // 28 - - for (int k = 0; k < NMAT_SYMM; k++) { - buf[m++] = tlsph_stress[i][k]; - } // 34 - - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; // 37 - buf[m++] = vest[i][0]; - buf[m++] = vest[i][1]; - buf[m++] = vest[i][2]; // 40 - - buf[m++] = damage[i]; // 41 - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i, &buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities - ------------------------------------------------------------------------- */ - -int AtomVecSMD::unpack_restart(double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra, nmax, atom->nextra_store, "atom:extra"); - } - - int m = 1; - - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; // 3 - x0[nlocal][0] = buf[m++]; - x0[nlocal][1] = buf[m++]; - x0[nlocal][2] = buf[m++]; // 6 - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - molecule[nlocal] = (tagint) ubuf(buf[m++]).i; // 11 - - radius[nlocal] = buf[m++]; - rmass[nlocal] = buf[m++]; - vfrac[nlocal] = buf[m++]; //14 - contact_radius[nlocal] = buf[m++]; //15 - e[nlocal] = buf[m++]; - eff_plastic_strain[nlocal] = buf[m++]; // 18 - eff_plastic_strain_rate[nlocal] = buf[m++]; // 29 - - for (int k = 0; k < NMAT_FULL; k++) { - smd_data_9[nlocal][k] = buf[m++]; - } // 28 - - for (int k = 0; k < NMAT_SYMM; k++) { - tlsph_stress[nlocal][k] = buf[m++]; - } // 34 - - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; // 37 - vest[nlocal][0] = buf[m++]; - vest[nlocal][1] = buf[m++]; - vest[nlocal][2] = buf[m++]; // 40 - - damage[nlocal] = buf[m++]; //41 - - //printf("nlocal in restart is %d\n", nlocal); - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast(buf[0]) - m; - for (int i = 0; i < size; i++) - extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - - //printf("returning m=%d in unpack_restart\n", m); - - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults - ------------------------------------------------------------------------- */ - -void AtomVecSMD::create_atom(int itype, double *coord) { - int nlocal = atom->nlocal; - if (nlocal == nmax) { - printf("nlocal = %d, nmax = %d, calling grow\n", nlocal, nmax); - grow(0); - printf("... finished growing\n"); - } - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - x0[nlocal][0] = coord[0]; - x0[nlocal][1] = coord[1]; - x0[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - vest[nlocal][0] = 0.0; - vest[nlocal][1] = 0.0; - vest[nlocal][2] = 0.0; - - vfrac[nlocal] = 1.0; - rmass[nlocal] = 1.0; - radius[nlocal] = 0.5; - contact_radius[nlocal] = 0.5; - molecule[nlocal] = 1; - e[nlocal] = 0.0; - eff_plastic_strain[nlocal] = 0.0; - eff_plastic_strain_rate[nlocal] = 0.0; - - for (int k = 0; k < NMAT_FULL; k++) { - smd_data_9[nlocal][k] = 0.0; - } - smd_data_9[nlocal][0] = 1.0; // xx - smd_data_9[nlocal][4] = 1.0; // yy - smd_data_9[nlocal][8] = 1.0; // zz - - for (int k = 0; k < NMAT_SYMM; k++) { - tlsph_stress[nlocal][k] = 0.0; - } - - damage[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities - ------------------------------------------------------------------------- */ - -void AtomVecSMD::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) - grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR, "Invalid atom type in Atoms section of data file"); - - molecule[nlocal] = utils::tnumeric(FLERR,values[2],true,lmp); - if (molecule[nlocal] <= 0) - error->one(FLERR, "Invalid molecule in Atoms section of data file"); - - vfrac[nlocal] = utils::numeric(FLERR,values[3],true,lmp); - if (vfrac[nlocal] < 0.0) - error->one(FLERR, "Invalid volume in Atoms section of data file"); - - rmass[nlocal] = utils::numeric(FLERR,values[4],true,lmp); - if (rmass[nlocal] == 0.0) - error->one(FLERR, "Invalid mass in Atoms section of data file"); - - radius[nlocal] = utils::numeric(FLERR,values[5],true,lmp); - if (radius[nlocal] < 0.0) - error->one(FLERR, "Invalid radius in Atoms section of data file"); - - contact_radius[nlocal] = utils::numeric(FLERR,values[6],true,lmp); - if (contact_radius[nlocal] < 0.0) - error->one(FLERR, "Invalid contact radius in Atoms section of data file"); - - e[nlocal] = 0.0; - - x0[nlocal][0] = utils::numeric(FLERR,values[7],true,lmp); - x0[nlocal][1] = utils::numeric(FLERR,values[8],true,lmp); - x0[nlocal][2] = utils::numeric(FLERR,values[9],true,lmp); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - vest[nlocal][0] = 0.0; - vest[nlocal][1] = 0.0; - vest[nlocal][2] = 0.0; - - damage[nlocal] = 0.0; - - eff_plastic_strain[nlocal] = 0.0; - eff_plastic_strain_rate[nlocal] = 0.0; - - for (int k = 0; k < NMAT_FULL; k++) { - smd_data_9[nlocal][k] = 0.0; - } - - for (int k = 0; k < NMAT_SYMM; k++) { - tlsph_stress[nlocal][k] = 0.0; - } - - smd_data_9[nlocal][0] = 1.0; // xx - smd_data_9[nlocal][4] = 1.0; // yy - smd_data_9[nlocal][8] = 1.0; // zz - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style - ------------------------------------------------------------------------- */ - -int AtomVecSMD::data_atom_hybrid(int /*nlocal*/, char **/*values*/) { - error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd"); - return -1; -} - -/* ---------------------------------------------------------------------- - unpack one line from Velocities section of data file - ------------------------------------------------------------------------- */ - -void AtomVecSMD::data_vel(int m, char **values) { - v[m][0] = utils::numeric(FLERR,values[0],true,lmp); - v[m][1] = utils::numeric(FLERR,values[1],true,lmp); - v[m][2] = utils::numeric(FLERR,values[2],true,lmp); - vest[m][0] = utils::numeric(FLERR,values[0],true,lmp); - vest[m][1] = utils::numeric(FLERR,values[1],true,lmp); - vest[m][2] = utils::numeric(FLERR,values[2],true,lmp); -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Velocities section of data file - ------------------------------------------------------------------------- */ - -int AtomVecSMD::data_vel_hybrid(int /*m*/, char **/*values*/) { - error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd"); - return 0; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags - ------------------------------------------------------------------------- */ - -void AtomVecSMD::pack_data(double **buf) { - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = ubuf(molecule[i]).d; - buf[i][3] = vfrac[i]; - buf[i][4] = rmass[i]; - buf[i][5] = radius[i]; - buf[i][6] = contact_radius[i]; - - buf[i][7] = x[i][0]; - buf[i][8] = x[i][1]; - buf[i][9] = x[i][2]; - - buf[i][10] = x0[i][0]; - buf[i][11] = x0[i][1]; - buf[i][12] = x0[i][2]; - - buf[i][13] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][14] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][15] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file - ------------------------------------------------------------------------- */ - -int AtomVecSMD::pack_data_hybrid(int /*i*/, double * /*buf*/) { - error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd"); - return -1; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags - ------------------------------------------------------------------------- */ - -void AtomVecSMD::write_data(FILE *fp, int n, double **buf) { - for (int i = 0; i < n; i++) - fprintf(fp, - TAGINT_FORMAT - " %d %d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e\n", (tagint) ubuf(buf[i][0]).i, - (int) ubuf(buf[i][1]).i, (int) ubuf(buf[i][2]).i, buf[i][3], buf[i][4], buf[i][5], buf[i][6], buf[i][7], buf[i][8], - buf[i][9], buf[i][10], buf[i][11], buf[i][12]); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file - ------------------------------------------------------------------------- */ - -int AtomVecSMD::write_data_hybrid(FILE * /*fp*/, double * /*buf*/) { - error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd"); - return -1; -} - -/* ---------------------------------------------------------------------- - pack velocity info for data file - ------------------------------------------------------------------------- */ - -void AtomVecSMD::pack_vel(double **buf) { - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = v[i][0]; - buf[i][2] = v[i][1]; - buf[i][3] = v[i][2]; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid velocity info for data file - ------------------------------------------------------------------------- */ - -int AtomVecSMD::pack_vel_hybrid(int /*i*/, double * /*buf*/) { - error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd"); - return 0; -} - -/* ---------------------------------------------------------------------- - write velocity info to data file - ------------------------------------------------------------------------- */ - -void AtomVecSMD::write_vel(FILE *fp, int n, double **buf) { - for (int i = 0; i < n; i++) - fprintf(fp, TAGINT_FORMAT - " %-1.16e %-1.16e %-1.16e\n", (tagint) ubuf(buf[i][0]).i, buf[i][1], buf[i][2], buf[i][3]); -} - -/* ---------------------------------------------------------------------- - write hybrid velocity info to data file - ------------------------------------------------------------------------- */ - -int AtomVecSMD::write_vel_hybrid(FILE * /*fp*/, double * /*buf*/) { - error->one(FLERR, "hybrid atom style functionality not yet implemented for atom style smd"); - return 3; -} - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory - ------------------------------------------------------------------------- */ - -bigint AtomVecSMD::memory_usage() { - bigint bytes = 0; - - if (atom->memcheck("tag")) - bytes += memory->usage(tag, nmax); - if (atom->memcheck("type")) - bytes += memory->usage(type, nmax); - if (atom->memcheck("molecule")) - bytes += memory->usage(molecule, nmax); - if (atom->memcheck("mask")) - bytes += memory->usage(mask, nmax); - if (atom->memcheck("image")) - bytes += memory->usage(image, nmax); - if (atom->memcheck("x")) - bytes += memory->usage(x, nmax, 3); - if (atom->memcheck("v")) - bytes += memory->usage(v, nmax, 3); - if (atom->memcheck("vest")) - bytes += memory->usage(vest, nmax, 3); - if (atom->memcheck("f")) - bytes += memory->usage(f, nmax * comm->nthreads, 3); - - if (atom->memcheck("radius")) - bytes += memory->usage(radius, nmax); - if (atom->memcheck("contact_radius")) - bytes += memory->usage(contact_radius, nmax); - if (atom->memcheck("vfrac")) - bytes += memory->usage(vfrac, nmax); - if (atom->memcheck("rmass")) - bytes += memory->usage(rmass, nmax); - if (atom->memcheck("eff_plastic_strain")) - bytes += memory->usage(eff_plastic_strain, nmax); - if (atom->memcheck("eff_plastic_strain_rate")) - bytes += memory->usage(eff_plastic_strain_rate, nmax); - if (atom->memcheck("e")) - bytes += memory->usage(e, nmax); - if (atom->memcheck("de")) - bytes += memory->usage(de, nmax); - - if (atom->memcheck("smd_data_9")) - bytes += memory->usage(smd_data_9, nmax, NMAT_FULL); - if (atom->memcheck("tlsph_stress")) - bytes += memory->usage(tlsph_stress, nmax, NMAT_SYMM); - - if (atom->memcheck("damage")) - bytes += memory->usage(damage, nmax); - - return bytes; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecSMD::force_clear(int n, size_t nbytes) { - //printf("clearing force on atom %d", n); - memset(&de[n], 0, nbytes); - memset(&f[0][0], 0, 3 * nbytes); -} diff --git a/src/USER-SMD/atom_vec_smd.h b/src/USER-SMD/atom_vec_smd.h index 34fdfc1f76..539f209ca7 100644 --- a/src/USER-SMD/atom_vec_smd.h +++ b/src/USER-SMD/atom_vec_smd.h @@ -9,7 +9,6 @@ * * ----------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories @@ -39,63 +38,9 @@ namespace LAMMPS_NS { class AtomVecSMD : public AtomVec { public: AtomVecSMD(class LAMMPS *); - ~AtomVecSMD() {} - void init(); - void grow(int); - void grow_reset(); - void copy(int, int, int); void force_clear(int, size_t); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - int pack_reverse_hybrid(int, int, double *); - void unpack_reverse(int, int *, double *); - int unpack_reverse_hybrid(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void data_vel(int, char **); - int data_vel_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - void pack_vel(double **); - int pack_vel_hybrid(int, double *); - void write_vel(FILE *, int, double **); - int write_vel_hybrid(FILE *, double *); - bigint memory_usage(); - - private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double *radius,*rmass; - - tagint *molecule; - double *vfrac,**x0,*contact_radius, **smd_data_9, *e, *de, **vest; - double **tlsph_stress; - double *eff_plastic_strain; - double *damage; - double *eff_plastic_strain_rate; - - + void create_atom_post(int); + void data_atom_post(int); }; } diff --git a/src/USER-SPH/atom_vec_meso.cpp b/src/USER-SPH/atom_vec_meso.cpp index cd7c2251ab..a80ab91d2e 100644 --- a/src/USER-SPH/atom_vec_meso.cpp +++ b/src/USER-SPH/atom_vec_meso.cpp @@ -14,13 +14,7 @@ #include "atom_vec_meso.h" #include #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" -#include "memory.h" #include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -32,921 +26,64 @@ AtomVecMeso::AtomVecMeso(LAMMPS *lmp) : AtomVec(lmp) mass_type = 1; forceclearflag = 1; - comm_x_only = 0; // we communicate not only x forward but also vest ... - comm_f_only = 0; // we also communicate de and drho in reverse direction - size_forward = 8; // 3 + rho + e + vest[3], that means we may only communicate 5 in hybrid - size_reverse = 5; // 3 + drho + de - size_border = 12; // 6 + rho + e + vest[3] + cv - size_velocity = 3; - size_data_atom = 8; - size_data_vel = 4; - xcol_data = 6; - atom->e_flag = 1; atom->rho_flag = 1; atom->cv_flag = 1; atom->vest_flag = 1; + + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file + + fields_grow = (char *) "rho drho e de cv vest"; + fields_copy = (char *) "rho drho e de cv vest"; + fields_comm = (char *) "rho e vest"; + fields_comm_vel = (char *) "rho e vest"; + fields_reverse = (char *) "drho de"; + fields_border = (char *) "rho e cv vest"; + fields_border_vel = (char *) "rho e cv vest"; + fields_exchange = (char *) "rho e cv vest"; + fields_restart = (char * ) "rho e cv vest"; + fields_create = (char *) "rho e cv vest de drho"; + fields_data_atom = (char *) "id type rho e cv x"; + fields_data_vel = (char *) "id v"; + + setup_fields(); } /* ---------------------------------------------------------------------- - grow atom arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n - ------------------------------------------------------------------------- */ - -void AtomVecMeso::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - if (nmax < 0 || nmax > MAXSMALLINT) - error->one(FLERR,"Per-processor system is too big"); - - tag = memory->grow(atom->tag, nmax, "atom:tag"); - type = memory->grow(atom->type, nmax, "atom:type"); - mask = memory->grow(atom->mask, nmax, "atom:mask"); - image = memory->grow(atom->image, nmax, "atom:image"); - x = memory->grow(atom->x, nmax, 3, "atom:x"); - v = memory->grow(atom->v, nmax, 3, "atom:v"); - f = memory->grow(atom->f, nmax*comm->nthreads, 3, "atom:f"); - - rho = memory->grow(atom->rho, nmax, "atom:rho"); - drho = memory->grow(atom->drho, nmax*comm->nthreads, "atom:drho"); - e = memory->grow(atom->e, nmax, "atom:e"); - de = memory->grow(atom->de, nmax*comm->nthreads, "atom:de"); - vest = memory->grow(atom->vest, nmax, 3, "atom:vest"); - cv = memory->grow(atom->cv, nmax, "atom:cv"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs - ------------------------------------------------------------------------- */ - -void AtomVecMeso::grow_reset() { - tag = atom->tag; - type = atom->type; - mask = atom->mask; - image = atom->image; - x = atom->x; - v = atom->v; - f = atom->f; - rho = atom->rho; - drho = atom->drho; - e = atom->e; - de = atom->de; - vest = atom->vest; - cv = atom->cv; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMeso::copy(int i, int j, int delflag) { - //printf("in AtomVecMeso::copy\n"); - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - rho[j] = rho[i]; - drho[j] = drho[i]; - e[j] = e[i]; - de[j] = de[i]; - cv[j] = cv[i]; - vest[j][0] = vest[i][0]; - vest[j][1] = vest[i][1]; - vest[j][2] = vest[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i, j,delflag); -} - -/* ---------------------------------------------------------------------- */ + clear extra forces starting at atom N + nbytes = # of bytes to clear for a per-atom vector +------------------------------------------------------------------------- */ void AtomVecMeso::force_clear(int n, size_t nbytes) { - memset(&de[n],0,nbytes); - memset(&drho[n],0,nbytes); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::pack_comm_hybrid(int n, int *list, double *buf) { - //printf("in AtomVecMeso::pack_comm_hybrid\n"); - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::unpack_comm_hybrid(int n, int first, double *buf) { - //printf("in AtomVecMeso::unpack_comm_hybrid\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - rho[i] = buf[m++]; - e[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::pack_border_hybrid(int n, int *list, double *buf) { - //printf("in AtomVecMeso::pack_border_hybrid\n"); - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::unpack_border_hybrid(int n, int first, double *buf) { - //printf("in AtomVecMeso::unpack_border_hybrid\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - rho[i] = buf[m++]; - e[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::pack_reverse_hybrid(int n, int first, double *buf) { - //printf("in AtomVecMeso::pack_reverse_hybrid\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = drho[i]; - buf[m++] = de[i]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::unpack_reverse_hybrid(int n, int *list, double *buf) { - //printf("in AtomVecMeso::unpack_reverse_hybrid\n"); - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - drho[j] += buf[m++]; - de[j] += buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::pack_comm(int n, int *list, double *buf, int pbc_flag, - int *pbc) { - //printf("in AtomVecMeso::pack_comm\n"); - int i, j, m; - double dx, dy, dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0] * domain->xprd; - dy = pbc[1] * domain->yprd; - dz = pbc[2] * domain->zprd; - } else { - dx = pbc[0] * domain->xprd + pbc[5] * domain->xy + pbc[4] * domain->xz; - dy = pbc[1] * domain->yprd + pbc[3] * domain->yz; - dz = pbc[2] * domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::pack_comm_vel(int n, int *list, double *buf, int pbc_flag, - int *pbc) { - //printf("in AtomVecMeso::pack_comm_vel\n"); - int i, j, m; - double dx, dy, dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0] * domain->xprd; - dy = pbc[1] * domain->yprd; - dz = pbc[2] * domain->zprd; - } else { - dx = pbc[0] * domain->xprd + pbc[5] * domain->xy + pbc[4] * domain->xz; - dy = pbc[1] * domain->yprd + pbc[3] * domain->yz; - dz = pbc[2] * domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMeso::unpack_comm(int n, int first, double *buf) { - //printf("in AtomVecMeso::unpack_comm\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - rho[i] = buf[m++]; - e[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMeso::unpack_comm_vel(int n, int first, double *buf) { - //printf("in AtomVecMeso::unpack_comm_vel\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - rho[i] = buf[m++]; - e[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::pack_reverse(int n, int first, double *buf) { - //printf("in AtomVecMeso::pack_reverse\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = drho[i]; - buf[m++] = de[i]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMeso::unpack_reverse(int n, int *list, double *buf) { - //printf("in AtomVecMeso::unpack_reverse\n"); - int i, j, m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - drho[j] += buf[m++]; - de[j] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::pack_border(int n, int *list, double *buf, int pbc_flag, - int *pbc) { - //printf("in AtomVecMeso::pack_border\n"); - int i, j, m; - double dx, dy, dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = cv[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0] * domain->xprd; - dy = pbc[1] * domain->yprd; - dz = pbc[2] * domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = cv[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::pack_border_vel(int n, int *list, double *buf, int pbc_flag, - int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = cv[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0] * domain->xprd; - dy = pbc[1] * domain->yprd; - dz = pbc[2] * domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = cv[j]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - } else { - dvx = pbc[0] * h_rate[0] + pbc[5] * h_rate[5] + pbc[4] * h_rate[4]; - dvy = pbc[1] * h_rate[1] + pbc[3] * h_rate[3]; - dvz = pbc[2] * h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - buf[m++] = vest[j][0] + dvx; - buf[m++] = vest[j][1] + dvy; - buf[m++] = vest[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - buf[m++] = vest[j][0]; - buf[m++] = vest[j][1]; - buf[m++] = vest[j][2]; - } - buf[m++] = rho[j]; - buf[m++] = e[j]; - buf[m++] = cv[j]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMeso::unpack_border(int n, int first, double *buf) { - //printf("in AtomVecMeso::unpack_border\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) - grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - rho[i] = buf[m++]; - e[i] = buf[m++]; - cv[i] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecMeso::unpack_border_vel(int n, int first, double *buf) { - //printf("in AtomVecMeso::unpack_border_vel\n"); - int i, m, last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) - grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - vest[i][0] = buf[m++]; - vest[i][1] = buf[m++]; - vest[i][2] = buf[m++]; - rho[i] = buf[m++]; - e[i] = buf[m++]; - cv[i] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); + memset(&atom->de[n],0,nbytes); + memset(&atom->drho[n],0,nbytes); } /* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them - ------------------------------------------------------------------------- */ - -int AtomVecMeso::pack_exchange(int i, double *buf) { - //printf("in AtomVecMeso::pack_exchange\n"); - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = rho[i]; - buf[m++] = e[i]; - buf[m++] = cv[i]; - buf[m++] = vest[i][0]; - buf[m++] = vest[i][1]; - buf[m++] = vest[i][2]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i, &buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecMeso::unpack_exchange(double *buf) { - //printf("in AtomVecMeso::unpack_exchange\n"); - int nlocal = atom->nlocal; - if (nlocal == nmax) - grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - rho[nlocal] = buf[m++]; - e[nlocal] = buf[m++]; - cv[nlocal] = buf[m++]; - vest[nlocal][0] = buf[m++]; - vest[nlocal][1] = buf[m++]; - vest[nlocal][2] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> unpack_exchange(nlocal, - &buf[m]); - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes - ------------------------------------------------------------------------- */ - -int AtomVecMeso::size_restart() { - int i; - - int nlocal = atom->nlocal; - int n = 17 * nlocal; // 11 + rho + e + cv + vest[3] - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive - ------------------------------------------------------------------------- */ - -int AtomVecMeso::pack_restart(int i, double *buf) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = rho[i]; - buf[m++] = e[i]; - buf[m++] = cv[i]; - buf[m++] = vest[i][0]; - buf[m++] = vest[i][1]; - buf[m++] = vest[i][2]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i, &buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities - ------------------------------------------------------------------------- */ - -int AtomVecMeso::unpack_restart(double *buf) { - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra, nmax, atom->nextra_store, "atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - rho[nlocal] = buf[m++]; - e[nlocal] = buf[m++]; - cv[nlocal] = buf[m++]; - vest[nlocal][0] = buf[m++]; - vest[nlocal][1] = buf[m++]; - vest[nlocal][2] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) - extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults - ------------------------------------------------------------------------- */ - -void AtomVecMeso::create_atom(int itype, double *coord) { - int nlocal = atom->nlocal; - if (nlocal == nmax) - grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - rho[nlocal] = 0.0; - e[nlocal] = 0.0; - cv[nlocal] = 1.0; - vest[nlocal][0] = 0.0; - vest[nlocal][1] = 0.0; - vest[nlocal][2] = 0.0; - de[nlocal] = 0.0; - drho[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities - ------------------------------------------------------------------------- */ - -void AtomVecMeso::data_atom(double *coord, imageint imagetmp, char **values) { - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - rho[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - e[nlocal] = utils::numeric(FLERR,values[3],true,lmp); - cv[nlocal] = utils::numeric(FLERR,values[4],true,lmp); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - //printf("rho=%f, e=%f, cv=%f, x=%f\n", rho[nlocal], e[nlocal], cv[nlocal], x[nlocal][0]); - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - vest[nlocal][0] = 0.0; - vest[nlocal][1] = 0.0; - vest[nlocal][2] = 0.0; - - de[nlocal] = 0.0; - drho[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style - ------------------------------------------------------------------------- */ - -int AtomVecMeso::data_atom_hybrid(int nlocal, char **values) { - - rho[nlocal] = utils::numeric(FLERR,values[0],true,lmp); - e[nlocal] = utils::numeric(FLERR,values[1],true,lmp); - cv[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - - return 3; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags + initialize non-zero atom quantities ------------------------------------------------------------------------- */ -void AtomVecMeso::pack_data(double **buf) +void AtomVecMeso::create_atom_post(int ilocal) { - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = rho[i]; - buf[i][3] = e[i]; - buf[i][4] = cv[i]; - buf[i][5] = x[i][0]; - buf[i][6] = x[i][1]; - buf[i][7] = x[i][2]; - buf[i][8] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][9] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][10] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } + atom->cv[ilocal] = 1.0; } /* ---------------------------------------------------------------------- - pack hybrid atom info for data file + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -int AtomVecMeso::pack_data_hybrid(int i, double *buf) +void AtomVecMeso::data_atom_post(int ilocal) { - buf[0] = rho[i]; - buf[1] = e[i]; - buf[2] = cv[i]; - return 3; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecMeso::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e " - "%d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],buf[i][3],buf[i][4], - buf[i][5],buf[i][6],buf[i][7], - (int) ubuf(buf[i][8]).i,(int) ubuf(buf[i][9]).i, - (int) ubuf(buf[i][10]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecMeso::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %-1.16e %-1.16e",buf[0],buf[1],buf[2]); - return 3; + atom->vest[ilocal][0] = 0.0; + atom->vest[ilocal][1] = 0.0; + atom->vest[ilocal][2] = 0.0; + atom->de[ilocal] = 0.0; + atom->drho[ilocal] = 0.0; } /* ---------------------------------------------------------------------- @@ -977,30 +114,35 @@ void AtomVecMeso::pack_property_atom(int index, double *buf, int n = 0; if (index == 0) { + double *rho = atom->rho; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = rho[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 1) { + double *drho = atom->drho; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = drho[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 2) { + double *e = atom->e; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = e[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 3) { + double *de = atom->de; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = de[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 4) { + double *cv = atom->cv; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = cv[i]; else buf[n] = 0.0; @@ -1008,40 +150,3 @@ void AtomVecMeso::pack_property_atom(int index, double *buf, } } } - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory - ------------------------------------------------------------------------- */ - -bigint AtomVecMeso::memory_usage() { - bigint bytes = 0; - - if (atom->memcheck("tag")) - bytes += memory->usage(tag, nmax); - if (atom->memcheck("type")) - bytes += memory->usage(type, nmax); - if (atom->memcheck("mask")) - bytes += memory->usage(mask, nmax); - if (atom->memcheck("image")) - bytes += memory->usage(image, nmax); - if (atom->memcheck("x")) - bytes += memory->usage(x, nmax, 3); - if (atom->memcheck("v")) - bytes += memory->usage(v, nmax, 3); - if (atom->memcheck("f")) - bytes += memory->usage(f, nmax*comm->nthreads, 3); - if (atom->memcheck("rho")) - bytes += memory->usage(rho, nmax); - if (atom->memcheck("drho")) - bytes += memory->usage(drho, nmax*comm->nthreads); - if (atom->memcheck("e")) - bytes += memory->usage(e, nmax); - if (atom->memcheck("de")) - bytes += memory->usage(de, nmax*comm->nthreads); - if (atom->memcheck("cv")) - bytes += memory->usage(cv, nmax); - if (atom->memcheck("vest")) - bytes += memory->usage(vest, nmax); - - return bytes; -} diff --git a/src/USER-SPH/atom_vec_meso.h b/src/USER-SPH/atom_vec_meso.h index da68222e29..c8a1090474 100644 --- a/src/USER-SPH/atom_vec_meso.h +++ b/src/USER-SPH/atom_vec_meso.h @@ -27,50 +27,11 @@ namespace LAMMPS_NS { class AtomVecMeso : public AtomVec { public: AtomVecMeso(class LAMMPS *); - ~AtomVecMeso() {} - void grow(int); - void grow_reset(); - void copy(int, int, int); void force_clear(int, size_t); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); - int pack_comm_hybrid(int, int *, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_border_hybrid(int, int *, double *); - int unpack_border_hybrid(int, int, double *); - int pack_reverse_hybrid(int, int, double *); - int unpack_reverse_hybrid(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); + void create_atom_post(int); + void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); - bigint memory_usage(); - - private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - double *rho, *drho, *e, *de, *cv; - double **vest; // estimated velocity during force computation }; } diff --git a/src/atom.cpp b/src/atom.cpp index d238db5e65..8fd859478f 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -81,50 +81,21 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) image = NULL; x = v = f = NULL; - molecule = NULL; - molindex = molatom = NULL; + // charged and dipolar particles + q = NULL; mu = NULL; + + // finite-size particles + omega = angmom = torque = NULL; radius = rmass = NULL; ellipsoid = line = tri = body = NULL; - vfrac = s0 = NULL; - x0 = NULL; + // molecular systems - spin = NULL; - eradius = ervel = erforce = NULL; - cs = csforce = vforce = ervelforce = NULL; - etag = NULL; - - rho = drho = e = de = cv = NULL; - vest = NULL; - - // SPIN package - - sp = fm = fm_long = NULL; - - // USER-DPD - - uCond = uMech = uChem = uCG = uCGnew = NULL; - duChem = NULL; - dpdTheta = NULL; - - // USER-MESO - - cc = cc_flux = NULL; - edpd_temp = edpd_flux = edpd_cv = NULL; - - // USER-SMD - - contact_radius = NULL; - smd_data_9 = NULL; - smd_stress = NULL; - eff_plastic_strain = NULL; - eff_plastic_strain_rate = NULL; - damage = NULL; - - // molecular info + molecule = NULL; + molindex = molatom = NULL; bond_per_atom = extra_bond_per_atom = 0; num_bond = NULL; @@ -150,6 +121,47 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) nspecial = NULL; special = NULL; + // PERI package + + vfrac = s0 = NULL; + x0 = NULL; + + // SPIN package + + sp = fm = fm_long = NULL; + + // USER-EFF and USER-AWPMD packages + + spin = NULL; + eradius = ervel = erforce = NULL; + ervelforce = cs = csforce = NULL; + vforce = NULL; + etag = NULL; + + // USER-DPD package + + uCond = uMech = uChem = uCG = uCGnew = NULL; + duChem = dpdTheta = NULL; + + // USER-MESO package + + cc = cc_flux = NULL; + edpd_temp = edpd_flux = edpd_cv = NULL; + + // USER-SMD package + + contact_radius = NULL; + smd_data_9 = NULL; + smd_stress = NULL; + eff_plastic_strain = NULL; + eff_plastic_strain_rate = NULL; + damage = NULL; + + // USER-SPH package + + rho = drho = e = de = cv = NULL; + vest = NULL; + // user-defined molecules nmolecule = 0; @@ -532,9 +544,16 @@ void Atom::peratom_create() add_peratom("ervel",&ervel,DOUBLE,0); add_peratom("erforce",&erforce,DOUBLE,0,1); // set per-thread flag + // USER-AWPMD package + + add_peratom("cs",&cs,DOUBLE,0); + add_peratom("csforce",&csforce,DOUBLE,0); + add_peratom("vforce",&vforce,DOUBLE,3); + add_peratom("ervelforce",&ervelforce,DOUBLE,0); + add_peratom("etag",&etag,INT,0); + // USER-DPD package - add_peratom("rho",&eradius,DOUBLE,0); add_peratom("dpdTheta",&dpdTheta,DOUBLE,0); add_peratom("uCond",&uCond,DOUBLE,0); add_peratom("uMech",&uMech,DOUBLE,0); @@ -548,7 +567,26 @@ void Atom::peratom_create() add_peratom("edpd_cv",&edpd_cv,DOUBLE,0); add_peratom("edpd_temp",&edpd_temp,DOUBLE,0); add_peratom("edpd_flux",&edpd_flux,DOUBLE,0,1); // set per-thread flag - add_peratom("vest",&vest,DOUBLE,4); + add_peratom("cc",&cc,DOUBLE,1); + add_peratom("cc_flux",&cc_flux,DOUBLE,1,1); // set per-thread flag + + // USER-SPH package + + add_peratom("rho",&rho,DOUBLE,0); + add_peratom("drho",&drho,DOUBLE,0,1); // set per-thread flag + add_peratom("e",&e,DOUBLE,0); + add_peratom("de",&de,DOUBLE,0,1); // set per-thread flag + add_peratom("vest",&vest,DOUBLE,3); + add_peratom("cv",&cv,DOUBLE,0); + + // USER-SMD package + + add_peratom("contact_radius",&contact_radius,DOUBLE,0); + add_peratom("smd_data_9",&smd_data_9,DOUBLE,1); + add_peratom("smd_stress",&smd_stress,DOUBLE,1); + add_peratom("eff_plastic_strain",&eff_plastic_strain,DOUBLE,0); + add_peratom("eff_plastic_strain_rate",&eff_plastic_strain_rate,DOUBLE,0); + add_peratom("damage",&damage,DOUBLE,0); } /* ---------------------------------------------------------------------- @@ -579,6 +617,18 @@ void Atom::add_peratom(const char *name, void *address, nperatom++; } +/* ---------------------------------------------------------------------- + change the column count fof an existing peratom array entry + allows atom_style to specify column count as an argument + see atom_style tdpd as an example +------------------------------------------------------------------------- */ + +void Atom::add_peratom_change_columns(const char *name, int cols) +{ + for (int i = 0; i < nperatom; i++) + if (strcmp(name,peratom[i].name) == 0) peratom[i].cols = cols; +} + /* ---------------------------------------------------------------------- add info for a single per-atom array to PerAtom data struct cols = address of int variable with max columns per atom diff --git a/src/atom.h b/src/atom.h index a105b3e5b1..007d364a7b 100644 --- a/src/atom.h +++ b/src/atom.h @@ -60,6 +60,8 @@ class Atom : protected Pointers { imageint *image; double **x,**v,**f; + // charged and dipolar particles + double *rmass; double *q,**mu; @@ -69,7 +71,7 @@ class Atom : protected Pointers { double **omega,**angmom,**torque; int *ellipsoid,*line,*tri,*body; - // MOLECULE package + // molecular systems tagint *molecule; int *molindex,*molatom; @@ -101,15 +103,14 @@ class Atom : protected Pointers { // SPIN package - double **sp; - double **fm; - double **fm_long; + double **sp,**fm,**fm_long; - // USER-AWPMD and USER_EFF packages + // USER_EFF and USER-AWPMD packages int *spin; - double *eradius,*ervel,*erforce,*ervelforce; - double *cs,*csforce,*vforce; + double *eradius,*ervel,*erforce; + double *ervelforce,*cs,*csforce; + double **vforce; int *etag; // USER-DPD package @@ -261,6 +262,7 @@ class Atom : protected Pointers { void settings(class Atom *); void peratom_create(); void add_peratom(const char *, void *, int, int, int threadflag=0); + void add_peratom_change_columns(const char *, int); void add_peratom_vary(const char *, void *, int, int *, void *, int collength=0); void create_avec(const char *, int, char **, int); diff --git a/src/atom_vec_hybrid.h b/src/atom_vec_hybrid.h index 83d29112dd..7d838b7a7f 100644 --- a/src/atom_vec_hybrid.h +++ b/src/atom_vec_hybrid.h @@ -57,11 +57,6 @@ class AtomVecHybrid : public AtomVec { void pack_data_pre(int); void pack_data_post(int); - //void create_atom_post(int); - //void data_atom_post(int); - //void pack_data_pre(int); - //void pack_data_post(int); - int property_atom(char *); void pack_property_atom(int, double *, int, int); diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index 6796f9c8f2..81f1b02fdb 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -28,6 +28,7 @@ using namespace MathConst; AtomVecSphere::AtomVecSphere(LAMMPS *lmp) : AtomVec(lmp) { + mass_type = 0; molecular = 0; atom->sphere_flag = 1; @@ -51,8 +52,6 @@ AtomVecSphere::AtomVecSphere(LAMMPS *lmp) : AtomVec(lmp) fields_create = (char *) "radius rmass omega"; fields_data_atom = (char *) "id type radius rmass x"; fields_data_vel = (char *) "id v omega"; - - setup_fields(); } /* ---------------------------------------------------------------------- @@ -74,6 +73,10 @@ void AtomVecSphere::process_args(int narg, char **arg) fields_comm = (char *) "radius rmass"; fields_comm_vel = (char *) "radius rmass omega"; + + // delay setting up of fields until now + + setup_fields(); } /* ---------------------------------------------------------------------- */ From f51ee40640c98b0b238638313598591d14078d64 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 3 Dec 2019 11:24:12 -0700 Subject: [PATCH 011/577] atom_vec.cpp --- src/atom_vec.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index cfbc8b12a6..bbfccadb89 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -133,7 +133,8 @@ void AtomVec::process_args(int narg, char ** /*arg*/) } /* ---------------------------------------------------------------------- - copy of velocity remap settings from Domain + pull settings from Domain needed for pack_comm_vel and pack_border_vel + child classes may override this method, but should also invoke it ------------------------------------------------------------------------- */ void AtomVec::init() From 9af08f2d5405dd781166f239c41ae1adb4eed34e Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 6 Dec 2019 10:06:16 -0700 Subject: [PATCH 012/577] small change for atom_style mdpd --- src/USER-MESO/atom_vec_mdpd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/USER-MESO/atom_vec_mdpd.cpp b/src/USER-MESO/atom_vec_mdpd.cpp index eefda1ff6a..b87ff14c3c 100644 --- a/src/USER-MESO/atom_vec_mdpd.cpp +++ b/src/USER-MESO/atom_vec_mdpd.cpp @@ -55,6 +55,8 @@ AtomVecMDPD::AtomVecMDPD(LAMMPS *lmp) : AtomVec(lmp) void AtomVecMDPD::init() { + AtomVec::init(); + if (strcmp(update->unit_style,"lj") != 0) error->all(FLERR,"Atom style mdpd requires lj units"); } From db6d272303dfa748953c04f60b7041af00aa4ccb Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 13 Dec 2019 13:54:12 -0700 Subject: [PATCH 013/577] more additions to USER atom styles and bug fixes --- src/GRANULAR/fix_pour.cpp | 5 + src/MOLECULE/atom_vec_bond.cpp | 22 +- src/MOLECULE/atom_vec_bond.h | 4 + src/MOLECULE/atom_vec_full.cpp | 8 +- src/MOLECULE/atom_vec_molecular.cpp | 8 +- src/USER-AWPMD/atom_vec_wavepacket.cpp | 1126 +----------------------- src/USER-AWPMD/atom_vec_wavepacket.h | 75 +- src/USER-AWPMD/fix_nve_awpmd.cpp | 6 +- src/USER-DPD/atom_vec_dpd.cpp | 2 +- src/USER-EFF/atom_vec_electron.cpp | 3 - src/USER-EFF/pair_eff_cut.cpp | 27 +- src/USER-EFF/pair_eff_cut.h | 4 +- src/USER-MESO/atom_vec_edpd.cpp | 22 +- src/USER-MESO/atom_vec_tdpd.cpp | 2 +- src/USER-MESO/fix_mvv_edpd.cpp | 6 +- src/USER-SMD/atom_vec_smd.cpp | 4 +- src/atom.cpp | 4 + src/atom.h | 5 +- src/atom_vec.cpp | 24 +- src/atom_vec.h | 18 +- src/atom_vec_body.cpp | 45 +- src/atom_vec_body.h | 3 + src/atom_vec_ellipsoid.cpp | 4 +- src/atom_vec_line.cpp | 4 +- src/atom_vec_sphere.cpp | 20 +- src/atom_vec_tri.cpp | 6 +- src/fix_gravity.cpp | 21 +- src/replicate.cpp | 27 +- src/verlet.cpp | 2 +- 29 files changed, 218 insertions(+), 1289 deletions(-) diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 2255f64eb2..b54920f7b2 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -40,6 +40,7 @@ using namespace MathConst; enum{ATOM,MOLECULE}; enum{ONE,RANGE,POLY}; +enum{CONSTANT,EQUAL}; // same as FixGravity #define EPSILON 0.001 #define SMALL 1.0e-10 @@ -318,6 +319,10 @@ void FixPour::init() if (ifix == -1) error->all(FLERR,"No fix gravity defined for fix pour"); + int varflag = ((FixGravity *) modify->fix[ifix])->varflag; + if (varflag != CONSTANT) + error->all(FLERR,"Fix gravity for fix pour must be constant"); + double xgrav = ((FixGravity *) modify->fix[ifix])->xgrav; double ygrav = ((FixGravity *) modify->fix[ifix])->ygrav; double zgrav = ((FixGravity *) modify->fix[ifix])->zgrav; diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index 30ad7d83e1..00e8e3260d 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -60,6 +60,20 @@ AtomVecBond::~AtomVecBond() delete [] bond_negative; } +/* ---------------------------------------------------------------------- + grow atom arrays + must set local copy of body ptr + needed in replicate when 2 atom classes exist and pack_restart() is called +------------------------------------------------------------------------- */ + +void AtomVecBond::grow(int n) +{ + AtomVec::grow(n); + num_bond = atom->num_bond; + bond_type = atom->bond_type; +} + + /* ---------------------------------------------------------------------- modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ @@ -76,8 +90,8 @@ void AtomVecBond::pack_restart_pre(int ilocal) // flip any negative types to positive and flag which ones - int *num_bond = atom->num_bond; - int **bond_type = atom->bond_type; + //int *num_bond = atom->num_bond; + //int **bond_type = atom->bond_type; any_bond_negative = 0; for (int m = 0; m < num_bond[ilocal]; m++) { @@ -98,8 +112,8 @@ void AtomVecBond::pack_restart_post(int ilocal) // restore the flagged types to their negative values if (any_bond_negative) { - int *num_bond = atom->num_bond; - int **bond_type = atom->bond_type; + //int *num_bond = atom->num_bond; + //int **bond_type = atom->bond_type; for (int m = 0; m < num_bond[ilocal]; m++) if (bond_negative[m]) bond_type[ilocal][m] = -bond_type[ilocal][m]; } diff --git a/src/MOLECULE/atom_vec_bond.h b/src/MOLECULE/atom_vec_bond.h index c2bf7d6680..90c4b1f217 100644 --- a/src/MOLECULE/atom_vec_bond.h +++ b/src/MOLECULE/atom_vec_bond.h @@ -28,6 +28,7 @@ class AtomVecBond : public AtomVec { public: AtomVecBond(class LAMMPS *); ~AtomVecBond(); + void grow(int); void pack_restart_pre(int); void pack_restart_post(int); void unpack_restart_init(int); @@ -37,6 +38,9 @@ class AtomVecBond : public AtomVec { int any_bond_negative; int bond_per_atom; int *bond_negative; + + int *num_bond; + int **bond_type; }; } diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index 9ab0a296e0..be7c92ce93 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -128,7 +128,7 @@ void AtomVecFull::pack_restart_pre(int ilocal) int *num_improper = atom->num_improper; int **improper_type = atom->improper_type; - int any_bond_negative = 0; + any_bond_negative = 0; for (int m = 0; m < num_bond[ilocal]; m++) { if (bond_type[ilocal][m] < 0) { bond_negative[m] = 1; @@ -137,7 +137,7 @@ void AtomVecFull::pack_restart_pre(int ilocal) } else bond_negative[m] = 0; } - int any_angle_negative = 0; + any_angle_negative = 0; for (int m = 0; m < num_angle[ilocal]; m++) { if (angle_type[ilocal][m] < 0) { angle_negative[m] = 1; @@ -146,7 +146,7 @@ void AtomVecFull::pack_restart_pre(int ilocal) } else angle_negative[m] = 0; } - int any_dihedral_negative = 0; + any_dihedral_negative = 0; for (int m = 0; m < num_dihedral[ilocal]; m++) { if (dihedral_type[ilocal][m] < 0) { dihedral_negative[m] = 1; @@ -155,7 +155,7 @@ void AtomVecFull::pack_restart_pre(int ilocal) } else dihedral_negative[m] = 0; } - int any_improper_negative = 0; + any_improper_negative = 0; for (int m = 0; m < num_improper[ilocal]; m++) { if (improper_type[ilocal][m] < 0) { improper_negative[m] = 1; diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index 52947ceb71..ea15216aee 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -128,7 +128,7 @@ void AtomVecMolecular::pack_restart_pre(int ilocal) int *num_improper = atom->num_improper; int **improper_type = atom->improper_type; - int any_bond_negative = 0; + any_bond_negative = 0; for (int m = 0; m < num_bond[ilocal]; m++) { if (bond_type[ilocal][m] < 0) { bond_negative[m] = 1; @@ -137,7 +137,7 @@ void AtomVecMolecular::pack_restart_pre(int ilocal) } else bond_negative[m] = 0; } - int any_angle_negative = 0; + any_angle_negative = 0; for (int m = 0; m < num_angle[ilocal]; m++) { if (angle_type[ilocal][m] < 0) { angle_negative[m] = 1; @@ -146,7 +146,7 @@ void AtomVecMolecular::pack_restart_pre(int ilocal) } else angle_negative[m] = 0; } - int any_dihedral_negative = 0; + any_dihedral_negative = 0; for (int m = 0; m < num_dihedral[ilocal]; m++) { if (dihedral_type[ilocal][m] < 0) { dihedral_negative[m] = 1; @@ -155,7 +155,7 @@ void AtomVecMolecular::pack_restart_pre(int ilocal) } else dihedral_negative[m] = 0; } - int any_improper_negative = 0; + any_improper_negative = 0; for (int m = 0; m < num_improper[ilocal]; m++) { if (improper_type[ilocal][m] < 0) { improper_negative[m] = 1; diff --git a/src/USER-AWPMD/atom_vec_wavepacket.cpp b/src/USER-AWPMD/atom_vec_wavepacket.cpp index bce334a7b3..d643ae8e0a 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.cpp +++ b/src/USER-AWPMD/atom_vec_wavepacket.cpp @@ -18,13 +18,7 @@ #include "atom_vec_wavepacket.h" #include #include "atom.h" -#include "comm.h" -#include "domain.h" -#include "modify.h" -#include "fix.h" -#include "memory.h" #include "error.h" -#include "utils.h" using namespace LAMMPS_NS; @@ -32,1079 +26,69 @@ using namespace LAMMPS_NS; AtomVecWavepacket::AtomVecWavepacket(LAMMPS *lmp) : AtomVec(lmp) { - comm_x_only = comm_f_only = 0; - mass_type = 1; molecular = 0; forceclearflag = 1; - size_forward = 4; // coords[3]+radius[1] - size_reverse = 10; // force[3]+erforce[1]+ervelforce[1]+vforce[3]+csforce[2] - size_border = 10; // coords[3]+tag[1]+type[1]+mask[1]+q[1]+spin[1]+eradius[1]+etag[1] - size_velocity = 6; // +velocities[3]+ ervel[1]+cs[2] - size_data_atom = 11; // for input file: 1-tag 2-type 3-q 4-spin 5-eradius 6-etag 7-cs_re 8-cs_im 9-x 10-y 11-z - size_data_vel = 5; // for input file: vx vy vz ervel - xcol_data = 9; // starting column for x data - atom->wavepacket_flag = 1; - atom->electron_flag = 1; // compatible with eff + + atom->electron_flag = 1; // compatible with eff atom->q_flag = atom->spin_flag = atom->eradius_flag = atom->ervel_flag = atom->erforce_flag = 1; + atom->cs_flag = atom->csforce_flag = + atom->vforce_flag = atom->ervelforce_flag = atom->etag_flag = 1; - atom->cs_flag = atom->csforce_flag = atom->vforce_flag = atom->ervelforce_flag = atom->etag_flag = 1; + // strings with peratom variables to include in each AtomVec method + // strings cannot contain fields in corresponding AtomVec default strings + // order of fields in a string does not matter + // except: fields_data_atom & fields_data_vel must match data file + + fields_grow = (char *) + "q spin eradius ervel erforce cs csforce " + "vforce ervelforce etag"; + fields_copy = (char *) "q spin eradius ervel cs etag"; + fields_comm = (char *) "eradius"; + fields_comm_vel = (char *) "eradius ervel cs"; + fields_reverse = (char *) "erforce ervelforce vforce csforce"; + fields_border = (char *) "q spin eradius etag"; + fields_border_vel = (char *) "q spin eradius etag ervel cs"; + fields_exchange = (char *) "q spin eradius ervel etag cs"; + fields_restart = (char *) "q spin eradius ervel etag cs"; + fields_create = (char *) "q spin eradius ervel etag cs"; + fields_data_atom = (char *) "id type q spin eradius etag cs x"; + fields_data_vel = (char *) "id v ervel"; + + setup_fields(); } /* ---------------------------------------------------------------------- - grow atom-electron arrays - n = 0 grows arrays by a chunk - n > 0 allocates arrays to size n + clear extra forces starting at atom N + nbytes = # of bytes to clear for a per-atom vector ------------------------------------------------------------------------- */ -void AtomVecWavepacket::grow(int n) -{ - if (n == 0) grow_nmax(); - else nmax = n; - atom->nmax = nmax; - - tag = memory->grow(atom->tag,nmax,"atom:tag"); - type = memory->grow(atom->type,nmax,"atom:type"); - mask = memory->grow(atom->mask,nmax,"atom:mask"); - image = memory->grow(atom->image,nmax,"atom:image"); - x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); - - q = memory->grow(atom->q,nmax,"atom:q"); - spin = memory->grow(atom->spin,nmax,"atom:spin"); - eradius = memory->grow(atom->eradius,nmax,"atom:eradius"); - ervel = memory->grow(atom->ervel,nmax,"atom:ervel"); - erforce = memory->grow(atom->erforce,nmax*comm->nthreads,"atom:erforce"); - - cs = memory->grow(atom->cs,2*nmax,"atom:cs"); - csforce = memory->grow(atom->csforce,2*nmax,"atom:csforce"); - vforce = memory->grow(atom->vforce,3*nmax,"atom:vforce"); - ervelforce = memory->grow(atom->ervelforce,nmax,"atom:ervelforce"); - etag = memory->grow(atom->etag,nmax,"atom:etag"); - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); -} - -/* ---------------------------------------------------------------------- - reset local array ptrs -------------------------------------------------------------------------- */ - -void AtomVecWavepacket::grow_reset() -{ - tag = atom->tag; type = atom->type; - mask = atom->mask; image = atom->image; - x = atom->x; v = atom->v; f = atom->f; - q = atom->q; - eradius = atom->eradius; ervel = atom->ervel; erforce = atom->erforce; - - cs = atom->cs; - csforce = atom->csforce; - vforce = atom->vforce; - ervelforce = atom->ervelforce; - etag = atom->etag; -} - -/* ---------------------------------------------------------------------- - copy atom I info to atom J -------------------------------------------------------------------------- */ - -void AtomVecWavepacket::copy(int i, int j, int delflag) -{ - tag[j] = tag[i]; - type[j] = type[i]; - mask[j] = mask[i]; - image[j] = image[i]; - x[j][0] = x[i][0]; - x[j][1] = x[i][1]; - x[j][2] = x[i][2]; - v[j][0] = v[i][0]; - v[j][1] = v[i][1]; - v[j][2] = v[i][2]; - - q[j] = q[i]; - spin[j] = spin[i]; - eradius[j] = eradius[i]; - ervel[j] = ervel[i]; - - cs[2*j] = cs[2*i]; - cs[2*j+1] = cs[2*i+1]; - etag[j] = etag[i]; - - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j,delflag); -} - -/* ---------------------------------------------------------------------- */ - void AtomVecWavepacket::force_clear(int n, size_t nbytes) { - memset(&erforce[n],0,nbytes); -} - -/* ---------------------------------------------------------------------- */ -// this will be used as partial pack for unsplit Hartree packets (v, ervel not regarded as separate variables) - -int AtomVecWavepacket::pack_comm(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = eradius[j]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = eradius[j]; - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ -// this is a complete pack of all 'position' variables of AWPMD - -int AtomVecWavepacket::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = eradius[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - - buf[m++] = ervel[j]; - buf[m++] = cs[2*j]; - buf[m++] = cs[2*j+1]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]*domain->xprd + pbc[5]*domain->xy + pbc[4]*domain->xz; - dy = pbc[1]*domain->yprd + pbc[3]*domain->yz; - dz = pbc[2]*domain->zprd; - } - if (!deform_vremap) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = eradius[j]; - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - - buf[m++] = ervel[j]; - buf[m++] = cs[2*j]; - buf[m++] = cs[2*j+1]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = eradius[j]; - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - buf[m++] = ervel[j]; - buf[m++] = cs[2*j]; - buf[m++] = cs[2*j+1]; - } - } - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecWavepacket::pack_comm_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = eradius[j]; - buf[m++] = ervel[j]; - buf[m++] = cs[2*j]; - buf[m++] = cs[2*j+1]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecWavepacket::unpack_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - eradius[i] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecWavepacket::unpack_comm_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - eradius[i] = buf[m++]; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - - ervel[i] = buf[m++]; - cs[2*i] = buf[m++]; - cs[2*i+1] = buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecWavepacket::unpack_comm_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++){ - eradius[i] = buf[m++]; - ervel[i] = buf[m++]; - cs[2*i] = buf[m++]; - cs[2*i+1] = buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecWavepacket::pack_reverse(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { //10 - buf[m++] = f[i][0]; - buf[m++] = f[i][1]; - buf[m++] = f[i][2]; - buf[m++] = erforce[i]; - - buf[m++] = ervelforce[i]; - buf[m++] = vforce[3*i]; - buf[m++] = vforce[3*i+1]; - buf[m++] = vforce[3*i+2]; - buf[m++] = csforce[2*i]; - buf[m++] = csforce[2*i+1]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecWavepacket::pack_reverse_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++){ - buf[m++] = erforce[i]; - - buf[m++] = ervelforce[i]; - buf[m++] = vforce[3*i]; - buf[m++] = vforce[3*i+1]; - buf[m++] = vforce[3*i+2]; - buf[m++] = csforce[2*i]; - buf[m++] = csforce[2*i+1]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecWavepacket::unpack_reverse(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - f[j][0] += buf[m++]; - f[j][1] += buf[m++]; - f[j][2] += buf[m++]; - erforce[j] += buf[m++]; - - ervelforce[j] += buf[m++]; - vforce[3*j] += buf[m++]; - vforce[3*j+1] += buf[m++]; - vforce[3*j+2] += buf[m++]; - csforce[2*j] += buf[m++]; - csforce[2*j+1] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecWavepacket::unpack_reverse_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - erforce[j] += buf[m++]; - - ervelforce[j] += buf[m++]; - vforce[3*j] += buf[m++]; - vforce[3*j+1] += buf[m++]; - vforce[3*j+2] += buf[m++]; - csforce[2*j] += buf[m++]; - csforce[2*j+1] += buf[m++]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ -// will be used for Hartree unsplit version (the etag is added however) -int AtomVecWavepacket::pack_border(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - buf[m++] = ubuf(etag[j]).d; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - buf[m++] = ubuf(etag[j]).d; - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecWavepacket::pack_border_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) -{ - int i,j,m; - double dx,dy,dz,dvx,dvy,dvz; - - m = 0; - if (pbc_flag == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0]; - buf[m++] = x[j][1]; - buf[m++] = x[j][2]; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - buf[m++] = ubuf(etag[j]).d; - - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - - buf[m++] = ervel[j]; - buf[m++] = cs[2*j]; - buf[m++] = cs[2*j+1]; - } - } else { - if (domain->triclinic == 0) { - dx = pbc[0]*domain->xprd; - dy = pbc[1]*domain->yprd; - dz = pbc[2]*domain->zprd; - } else { - dx = pbc[0]; - dy = pbc[1]; - dz = pbc[2]; - } - if (domain->triclinic == 0) { - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - buf[m++] = ubuf(etag[j]).d; - - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - - - buf[m++] = ervel[j]; - buf[m++] = cs[2*j]; - buf[m++] = cs[2*j+1]; - } - } else { - dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4]; - dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3]; - dvz = pbc[2]*h_rate[2]; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x[j][0] + dx; - buf[m++] = x[j][1] + dy; - buf[m++] = x[j][2] + dz; - buf[m++] = ubuf(tag[j]).d; - buf[m++] = ubuf(type[j]).d; - buf[m++] = ubuf(mask[j]).d; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - buf[m++] = ubuf(etag[j]).d; - - if (mask[i] & deform_groupbit) { - buf[m++] = v[j][0] + dvx; - buf[m++] = v[j][1] + dvy; - buf[m++] = v[j][2] + dvz; - } else { - buf[m++] = v[j][0]; - buf[m++] = v[j][1]; - buf[m++] = v[j][2]; - } - - buf[m++] = ervel[j]; - buf[m++] = cs[2*j]; - buf[m++] = cs[2*j+1]; - } - } - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]->pack_border(n,list,&buf[m]); - - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecWavepacket::pack_border_hybrid(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = q[j]; - buf[m++] = ubuf(spin[j]).d; - buf[m++] = eradius[j]; - - buf[m++] = ubuf(etag[j]).d; - buf[m++] = ervel[j]; - buf[m++] = cs[2*j]; - buf[m++] = cs[2*j+1]; - } - return m; -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecWavepacket::unpack_border(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - q[i] = buf[m++]; - spin[i] = (int) ubuf(buf[m++]).i; - eradius[i] = buf[m++]; - etag[i] = (int) ubuf(buf[m++]).i; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -void AtomVecWavepacket::unpack_border_vel(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - if (i == nmax) grow(0); - x[i][0] = buf[m++]; - x[i][1] = buf[m++]; - x[i][2] = buf[m++]; - tag[i] = (tagint) ubuf(buf[m++]).i; - type[i] = (int) ubuf(buf[m++]).i; - mask[i] = (int) ubuf(buf[m++]).i; - q[i] = buf[m++]; - spin[i] = (int) ubuf(buf[m++]).i; - eradius[i] = buf[m++]; - etag[i] = (int) ubuf(buf[m++]).i; - v[i][0] = buf[m++]; - v[i][1] = buf[m++]; - v[i][2] = buf[m++]; - ervel[i] = buf[m++]; - cs[2*i] = buf[m++]; - cs[2*i+1] = buf[m++]; - } - - if (atom->nextra_border) - for (int iextra = 0; iextra < atom->nextra_border; iextra++) - m += modify->fix[atom->extra_border[iextra]]-> - unpack_border(n,first,&buf[m]); -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecWavepacket::unpack_border_hybrid(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) { - q[i] = buf[m++]; - spin[i] = (int) ubuf(buf[m++]).i; - eradius[i] = buf[m++]; - etag[i] = (int) ubuf(buf[m++]).i; - ervel[i] = buf[m++]; - cs[2*i] = buf[m++]; - cs[2*i+1] = buf[m++]; - } - return m; + memset(&atom->erforce[n],0,nbytes); } /* ---------------------------------------------------------------------- - pack data for atom I for sending to another proc - xyz must be 1st 3 values, so comm::exchange() can test on them + initialize non-zero atom quantities + make each atom a proton ------------------------------------------------------------------------- */ -int AtomVecWavepacket::pack_exchange(int i, double *buf) +void AtomVecWavepacket::create_atom_post(int ilocal) { - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - - buf[m++] = q[i]; - buf[m++] = ubuf(spin[i]).d; - buf[m++] = eradius[i]; - buf[m++] = ervel[i]; - - buf[m++] = ubuf(etag[i]).d; - buf[m++] = cs[2*i]; - buf[m++] = cs[2*i+1]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- */ - -int AtomVecWavepacket::unpack_exchange(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - - q[nlocal] = buf[m++]; - spin[nlocal] = (int) ubuf(buf[m++]).i; - eradius[nlocal] = buf[m++]; - ervel[nlocal] = buf[m++]; - - etag[nlocal] = (int) ubuf(buf[m++]).i; - cs[2*nlocal] = buf[m++]; - cs[2*nlocal+1] = buf[m++]; - - if (atom->nextra_grow) - for (int iextra = 0; iextra < atom->nextra_grow; iextra++) - m += modify->fix[atom->extra_grow[iextra]]-> - unpack_exchange(nlocal,&buf[m]); - - atom->nlocal++; - return m; + atom->q[ilocal] = 1.0; } /* ---------------------------------------------------------------------- - size of restart data for all atoms owned by this proc - include extra data stored by fixes + modify what AtomVec::data_atom() just unpacked + or initialize other atom quantities ------------------------------------------------------------------------- */ -int AtomVecWavepacket::size_restart() +void AtomVecWavepacket::data_atom_post(int ilocal) { - int i; - - int nlocal = atom->nlocal; - int n = 18 * nlocal; // Associated with pack_restart - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - for (i = 0; i < nlocal; i++) - n += modify->fix[atom->extra_restart[iextra]]->size_restart(i); - - return n; -} - -/* ---------------------------------------------------------------------- - pack atom I's data for restart file including extra quantities - xyz must be 1st 3 values, so that read_restart can test on them - molecular types may be negative, but write as positive -------------------------------------------------------------------------- */ - -int AtomVecWavepacket::pack_restart(int i, double *buf) -{ - int m = 1; - buf[m++] = x[i][0]; - buf[m++] = x[i][1]; - buf[m++] = x[i][2]; - buf[m++] = ubuf(tag[i]).d; - buf[m++] = ubuf(type[i]).d; - buf[m++] = ubuf(mask[i]).d; - buf[m++] = ubuf(image[i]).d; - buf[m++] = v[i][0]; - buf[m++] = v[i][1]; - buf[m++] = v[i][2]; - - buf[m++] = q[i]; - buf[m++] = ubuf(spin[i]).d; - buf[m++] = eradius[i]; - buf[m++] = ervel[i]; - - buf[m++] = ubuf(etag[i]).d; - buf[m++] = cs[2*i]; - buf[m++] = cs[2*i+1]; - - if (atom->nextra_restart) - for (int iextra = 0; iextra < atom->nextra_restart; iextra++) - m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]); - - buf[0] = m; - return m; -} - -/* ---------------------------------------------------------------------- - unpack data for one atom from restart file including extra quantities -------------------------------------------------------------------------- */ - -int AtomVecWavepacket::unpack_restart(double *buf) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) { - grow(0); - if (atom->nextra_store) - memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra"); - } - - int m = 1; - x[nlocal][0] = buf[m++]; - x[nlocal][1] = buf[m++]; - x[nlocal][2] = buf[m++]; - tag[nlocal] = (tagint) ubuf(buf[m++]).i; - type[nlocal] = (int) ubuf(buf[m++]).i; - mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (imageint) ubuf(buf[m++]).i; - v[nlocal][0] = buf[m++]; - v[nlocal][1] = buf[m++]; - v[nlocal][2] = buf[m++]; - - q[nlocal] = buf[m++]; - spin[nlocal] = (int) ubuf(buf[m++]).i; - eradius[nlocal] = buf[m++]; - ervel[nlocal] = buf[m++]; - - etag[nlocal] = (int) ubuf(buf[m++]).i; - cs[2*nlocal] = buf[m++]; - cs[2*nlocal+1] = buf[m++]; - - double **extra = atom->extra; - if (atom->nextra_store) { - int size = static_cast (buf[0]) - m; - for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++]; - } - - atom->nlocal++; - return m; -} - -/* ---------------------------------------------------------------------- - create one atom of itype at coord - set other values to defaults - AWPMD: creates a proton -------------------------------------------------------------------------- */ - -void AtomVecWavepacket::create_atom(int itype, double *coord) -{ - int nlocal = atom->nlocal; - if (nlocal == nmax) grow(0); - - tag[nlocal] = 0; - type[nlocal] = itype; - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - mask[nlocal] = 1; - image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | - ((imageint) IMGMAX << IMGBITS) | IMGMAX; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - - q[nlocal] = 1.; - spin[nlocal] = 0; - eradius[nlocal] = 0.0; - ervel[nlocal] = 0.0; - - etag[nlocal] = 0; - cs[2*nlocal] = 0.; - cs[2*nlocal+1] = 0.; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack one line from Atoms section of data file - initialize other atom quantities - AWPMD: 0-tag 1-type 2-q 3-spin 4-eradius 5-etag 6-cs_re 7-cs_im -------------------------------------------------------------------------- */ - -void AtomVecWavepacket::data_atom(double *coord, imageint imagetmp, - char **values) -{ - int nlocal = atom->nlocal; - - if (nlocal == nmax) grow(0); - - tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) - error->one(FLERR,"Invalid atom type in Atoms section of data file"); - - q[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - spin[nlocal] = utils::inumeric(FLERR,values[3],true,lmp); - eradius[nlocal] = utils::numeric(FLERR,values[4],true,lmp); - if (eradius[nlocal] < 0.0) - error->one(FLERR,"Invalid eradius in Atoms section of data file"); - - etag[nlocal] = utils::inumeric(FLERR,values[5],true,lmp); - cs[2*nlocal] = utils::numeric(FLERR,values[6],true,lmp); - cs[2*nlocal+1] = utils::numeric(FLERR,values[7],true,lmp); - - x[nlocal][0] = coord[0]; - x[nlocal][1] = coord[1]; - x[nlocal][2] = coord[2]; - - image[nlocal] = imagetmp; - - mask[nlocal] = 1; - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - ervel[nlocal] = 0.0; - - atom->nlocal++; -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Atoms section of data file - initialize other atom quantities for this sub-style -------------------------------------------------------------------------- */ - -int AtomVecWavepacket::data_atom_hybrid(int nlocal, char **values) -{ - q[nlocal] = utils::numeric(FLERR,values[0],true,lmp); - spin[nlocal] = utils::inumeric(FLERR,values[1],true,lmp); - eradius[nlocal] = utils::numeric(FLERR,values[2],true,lmp); - if (eradius[nlocal] < 0.0) - error->one(FLERR,"Invalid eradius in Atoms section of data file"); - - etag[nlocal] = utils::inumeric(FLERR,values[3],true,lmp); - cs[2*nlocal] = utils::inumeric(FLERR,values[4],true,lmp); - cs[2*nlocal+1] = utils::numeric(FLERR,values[5],true,lmp); - - v[nlocal][0] = 0.0; - v[nlocal][1] = 0.0; - v[nlocal][2] = 0.0; - ervel[nlocal] = 0.0; - - return 3; -} - -/* ---------------------------------------------------------------------- - unpack one line from Velocities section of data file -------------------------------------------------------------------------- */ - -void AtomVecWavepacket::data_vel(int m, char **values) -{ - v[m][0] = utils::numeric(FLERR,values[0],true,lmp); - v[m][1] = utils::numeric(FLERR,values[1],true,lmp); - v[m][2] = utils::numeric(FLERR,values[2],true,lmp); - ervel[m] = utils::numeric(FLERR,values[3],true,lmp); -} - -/* ---------------------------------------------------------------------- - unpack hybrid quantities from one line in Velocities section of data file -------------------------------------------------------------------------- */ - -int AtomVecWavepacket::data_vel_hybrid(int m, char **values) -{ - ervel[m] = utils::numeric(FLERR,values[0],true,lmp); - return 1; -} - -/* ---------------------------------------------------------------------- - pack atom info for data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecWavepacket::pack_data(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = ubuf(type[i]).d; - buf[i][2] = q[i]; - buf[i][3] = ubuf(spin[i]).d; - buf[i][4] = eradius[i]; - buf[i][5] = ubuf(etag[i]).d; - buf[i][6] = cs[2*i]; - buf[i][7] = cs[2*i+1]; - buf[i][8] = x[i][0]; - buf[i][9] = x[i][1]; - buf[i][10] = x[i][2]; - buf[i][11] = ubuf((image[i] & IMGMASK) - IMGMAX).d; - buf[i][12] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d; - buf[i][13] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid atom info for data file -------------------------------------------------------------------------- */ - -int AtomVecWavepacket::pack_data_hybrid(int i, double *buf) -{ - buf[0] = q[i]; - buf[1] = ubuf(spin[i]).d; - buf[2] = eradius[i]; - buf[3] = ubuf(etag[i]).d; - buf[4] = cs[2*i]; - buf[5] = cs[2*i+1]; - return 6; -} - -/* ---------------------------------------------------------------------- - write atom info to data file including 3 image flags -------------------------------------------------------------------------- */ - -void AtomVecWavepacket::write_data(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT - " %d %-1.16e %d %-1.16e %d %-1.16e %-1.16e %-1.16e " - "%-1.16e %-1.16e %d %d %d\n", - (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, - buf[i][2],(int) ubuf(buf[i][3]).i,buf[i][4], - (int) ubuf(buf[i][5]).i,buf[i][6],buf[i][8], - buf[i][8],buf[i][9],buf[i][10], - (int) ubuf(buf[i][11]).i,(int) ubuf(buf[i][12]).i, - (int) ubuf(buf[i][13]).i); -} - -/* ---------------------------------------------------------------------- - write hybrid atom info to data file -------------------------------------------------------------------------- */ - -int AtomVecWavepacket::write_data_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e %d %-1.16e %d %-1.16e %-1.16e", - buf[0],(int) ubuf(buf[1]).i,buf[2],(int) ubuf(buf[3]).i, - buf[4],buf[5]); - return 6; -} - -/* ---------------------------------------------------------------------- - pack velocity info for data file -------------------------------------------------------------------------- */ - -void AtomVecWavepacket::pack_vel(double **buf) -{ - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - buf[i][0] = ubuf(tag[i]).d; - buf[i][1] = v[i][0]; - buf[i][2] = v[i][1]; - buf[i][3] = v[i][2]; - buf[i][4] = ervel[i]; - } -} - -/* ---------------------------------------------------------------------- - pack hybrid velocity info for data file -------------------------------------------------------------------------- */ - -int AtomVecWavepacket::pack_vel_hybrid(int i, double *buf) -{ - buf[0] = ervel[i]; - return 1; -} - -/* ---------------------------------------------------------------------- - write velocity info to data file -------------------------------------------------------------------------- */ - -void AtomVecWavepacket::write_vel(FILE *fp, int n, double **buf) -{ - for (int i = 0; i < n; i++) - fprintf(fp,TAGINT_FORMAT " %-1.16e %-1.16e %-1.16e %-1.16e\n", - (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3],buf[i][4]); -} - -/* ---------------------------------------------------------------------- - write hybrid velocity info to data file -------------------------------------------------------------------------- */ - -int AtomVecWavepacket::write_vel_hybrid(FILE *fp, double *buf) -{ - fprintf(fp," %-1.16e",buf[0]); - return 1; + atom->ervel[ilocal] = 0.0; } /* ---------------------------------------------------------------------- @@ -1131,27 +115,31 @@ void AtomVecWavepacket::pack_property_atom(int index, double *buf, { int *mask = atom->mask; int nlocal = atom->nlocal; - int n = 0; + int n = 0; if (index == 0) { + int *spin = atom->spin; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = spin[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 1) { + double *eradius = atom->eradius; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = eradius[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 2) { + double *ervel = atom->ervel; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = ervel[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 3) { + double *erforce = atom->erforce; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = erforce[i]; else buf[n] = 0.0; @@ -1159,35 +147,3 @@ void AtomVecWavepacket::pack_property_atom(int index, double *buf, } } } - -/* ---------------------------------------------------------------------- - return # of bytes of allocated memory -------------------------------------------------------------------------- */ - -bigint AtomVecWavepacket::memory_usage() -{ - bigint bytes = 0; - - if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax); - if (atom->memcheck("type")) bytes += memory->usage(type,nmax); - if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax); - if (atom->memcheck("image")) bytes += memory->usage(image,nmax); - if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); - if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); - - if (atom->memcheck("q")) bytes += memory->usage(q,nmax); - if (atom->memcheck("spin")) bytes += memory->usage(spin,nmax); - if (atom->memcheck("eradius")) bytes += memory->usage(eradius,nmax); - if (atom->memcheck("ervel")) bytes += memory->usage(ervel,nmax); - if (atom->memcheck("erforce")) - bytes += memory->usage(erforce,nmax*comm->nthreads); - - if (atom->memcheck("ervelforce")) bytes += memory->usage(ervelforce,nmax); - if (atom->memcheck("cs")) bytes += memory->usage(cs,2*nmax); - if (atom->memcheck("csforce")) bytes += memory->usage(csforce,2*nmax); - if (atom->memcheck("vforce")) bytes += memory->usage(vforce,3*nmax); - if (atom->memcheck("etag")) bytes += memory->usage(etag,nmax); - - return bytes; -} diff --git a/src/USER-AWPMD/atom_vec_wavepacket.h b/src/USER-AWPMD/atom_vec_wavepacket.h index d1a0c7c7f2..e7db15db14 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.h +++ b/src/USER-AWPMD/atom_vec_wavepacket.h @@ -11,11 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -/* ---------------------------------------------------------------------- - Contributing author: Ilya Valuev (JIHT RAS) -------------------------------------------------------------------------- */ - - #ifdef ATOM_CLASS AtomStyle(wavepacket,AtomVecWavepacket) @@ -32,77 +27,11 @@ namespace LAMMPS_NS { class AtomVecWavepacket : public AtomVec { public: AtomVecWavepacket(class LAMMPS *); - ~AtomVecWavepacket() {} - void grow(int); - void grow_reset(); - void copy(int, int, int); void force_clear(int, size_t); - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - int pack_comm_hybrid(int, int *, double *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); - int unpack_comm_hybrid(int, int, double *); - int pack_reverse(int, int, double *); - int pack_reverse_hybrid(int, int, double *); - void unpack_reverse(int, int *, double *); - int unpack_reverse_hybrid(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - int pack_border_hybrid(int, int *, double *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); - int unpack_border_hybrid(int, int, double *); - int pack_exchange(int, double *); - int unpack_exchange(double *); - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); - void create_atom(int, double *); - void data_atom(double *, imageint, char **); - int data_atom_hybrid(int, char **); - void data_vel(int, char **); - int data_vel_hybrid(int, char **); - void pack_data(double **); - int pack_data_hybrid(int, double *); - void write_data(FILE *, int, double **); - int write_data_hybrid(FILE *, double *); - void pack_vel(double **); - int pack_vel_hybrid(int, double *); - void write_vel(FILE *, int, double **); - int write_vel_hybrid(FILE *, double *); + void create_atom_post(int); + void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); - bigint memory_usage(); - -private: - tagint *tag; - int *type,*mask; - imageint *image; - double **x,**v,**f; - - ///\en spin: -1 or 1 for electron, 0 for ion (compatible with eff) - int *spin; - ///\en charge: must be specified in the corresponding units (-1 for electron in real units, eff compatible) - double *q; - ///\en width of the wavepacket (compatible with eff) - double *eradius; - ///\en width velocity for the wavepacket (compatible with eff) - double *ervel; - ///\en (generalized) force on width (compatible with eff) - double *erforce; - - // AWPMD- specific: - ///\en electron tag: must be the same for the WPs belonging to the same electron - int *etag; - ///\en wavepacket split coefficients: cre, cim, size is 2*N - double *cs; - ///\en force on wavepacket split coefficients: re, im, size is 2*N - double *csforce; - ///\en (generalized) force on velocity, size is 3*N - double *vforce; - ///\en (generalized) force on radius velocity, size is N - double *ervelforce; }; } diff --git a/src/USER-AWPMD/fix_nve_awpmd.cpp b/src/USER-AWPMD/fix_nve_awpmd.cpp index b4a1cbf72a..2aa2e7680b 100644 --- a/src/USER-AWPMD/fix_nve_awpmd.cpp +++ b/src/USER-AWPMD/fix_nve_awpmd.cpp @@ -74,8 +74,6 @@ void FixNVEAwpmd::init() void FixNVEAwpmd::initial_integrate(int /* vflag */) { - - // update v,vr and x,radius of atoms in group double **x = atom->x; @@ -84,7 +82,7 @@ void FixNVEAwpmd::initial_integrate(int /* vflag */) double *ervel = atom->ervel; double **f = atom->f; double *erforce = atom->erforce; - double *vforce=atom->vforce; + double **vforce=atom->vforce; double *ervelforce=atom->ervelforce; double *mass = atom->mass; @@ -101,7 +99,7 @@ void FixNVEAwpmd::initial_integrate(int /* vflag */) double dtfm = dtf / mass[type[i]]; double dtfmr=dtfm; for(int j=0;j<3;j++){ - x[i][j] += dtv*vforce[3*i+j]; + x[i][j] += dtv*vforce[i][j]; v[i][j] += dtfm*f[i][j]; } eradius[i]+= dtv*ervelforce[i]; diff --git a/src/USER-DPD/atom_vec_dpd.cpp b/src/USER-DPD/atom_vec_dpd.cpp index ce35178d8d..124a081191 100644 --- a/src/USER-DPD/atom_vec_dpd.cpp +++ b/src/USER-DPD/atom_vec_dpd.cpp @@ -47,7 +47,7 @@ AtomVecDPD::AtomVecDPD(LAMMPS *lmp) : AtomVec(lmp) fields_restart = (char *) "dpdTheta uCond uMech uChem"; fields_create = (char *) "rho dpdTheta uCond uMech uChem uCG uCGnew duChem"; fields_data_atom = (char *) "id type dpdTheta x"; - fields_data_vel = (char *) "id v omega"; + fields_data_vel = (char *) "id v"; setup_fields(); } diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index 3688f7f582..0ac56c48a3 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -44,8 +44,6 @@ AtomVecElectron::AtomVecElectron(LAMMPS *lmp) : AtomVec(lmp) molecular = 0; forceclearflag = 1; - atom->ecp_flag = 0; - atom->electron_flag = 1; atom->q_flag = atom->spin_flag = atom->eradius_flag = atom->ervel_flag = atom->erforce_flag = 1; @@ -99,7 +97,6 @@ void AtomVecElectron::create_atom_post(int ilocal) void AtomVecElectron::data_atom_post(int ilocal) { atom->ervel[ilocal] = 0.0; - if (atom->spin[ilocal] == 3) atom->ecp_flag = 1; } /* ---------------------------------------------------------------------- diff --git a/src/USER-EFF/pair_eff_cut.cpp b/src/USER-EFF/pair_eff_cut.cpp index e7aed14030..f9333f4bec 100644 --- a/src/USER-EFF/pair_eff_cut.cpp +++ b/src/USER-EFF/pair_eff_cut.cpp @@ -801,7 +801,7 @@ void PairEffCut::settings(int narg, char **arg) int atype; int iarg = 1; - int ecp_found = 0; + ecp_found = 0; while (iarg < narg) { if (strcmp(arg[iarg],"limit/eradius") == 0) { @@ -821,17 +821,15 @@ void PairEffCut::settings(int narg, char **arg) else if (strcmp(arg[iarg+1],"O") == 0) ecp_type[atype] = 8; else if (strcmp(arg[iarg+1],"Al") == 0) ecp_type[atype] = 13; else if (strcmp(arg[iarg+1],"Si") == 0) ecp_type[atype] = 14; - else error->all(FLERR, "Note: there are no default parameters for this atom ECP\n"); + else error->all(FLERR, "No default parameters for this atom ECP\n"); iarg += 2; ecp_found = 1; } - } + } else error->all(FLERR,"Illegal pair style command"); } - if (!ecp_found && atom->ecp_flag) - error->all(FLERR,"Need to specify ECP type on pair_style command"); - // Need to introduce 2 new constants w/out changing update.cpp + if (force->qqr2e==332.06371) { // i.e. Real units chosen h2e = 627.509; // hartree->kcal/mol hhmss2e = 175.72044219620075; // hartree->kcal/mol * (Bohr->Angstrom)^2 @@ -872,9 +870,24 @@ void PairEffCut::init_style() if (update->whichflag == 1) { if (force->qqr2e == 332.06371 && update->dt == 1.0) - error->all(FLERR,"You must lower the default real units timestep for pEFF "); + error->all(FLERR,"Must lower the default real units timestep for pEFF "); } + // check if any atom's spin = 3 and ECP type was not set + + int *spin = atom->spin; + int nlocal = atom->nlocal; + + int flag = 0; + for (int i = 0; i < nlocal; i++) + if (spin[i] == 3) flag = 1; + + int flagall; + MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world); + + if (flagall && !ecp_found) + error->all(FLERR,"Need to specify ECP type on pair_style command"); + // need a half neigh list and optionally a granular history neigh list neighbor->request(this,instance_me); diff --git a/src/USER-EFF/pair_eff_cut.h b/src/USER-EFF/pair_eff_cut.h index 63dabe5db8..bd04344373 100644 --- a/src/USER-EFF/pair_eff_cut.h +++ b/src/USER-EFF/pair_eff_cut.h @@ -46,10 +46,12 @@ class PairEffCut : public Pair { private: int limit_eradius_flag, pressure_with_evirials_flag; + int ecp_found; double cut_global; double **cut; int ecp_type[100]; - double PAULI_CORE_A[100], PAULI_CORE_B[100], PAULI_CORE_C[100], PAULI_CORE_D[100], PAULI_CORE_E[100]; + double PAULI_CORE_A[100],PAULI_CORE_B[100],PAULI_CORE_C[100]; + double PAULI_CORE_D[100],PAULI_CORE_E[100]; double hhmss2e, h2e; int nmax; diff --git a/src/USER-MESO/atom_vec_edpd.cpp b/src/USER-MESO/atom_vec_edpd.cpp index 7a031c256b..e06ac633ec 100644 --- a/src/USER-MESO/atom_vec_edpd.cpp +++ b/src/USER-MESO/atom_vec_edpd.cpp @@ -41,16 +41,16 @@ AtomVecEDPD::AtomVecEDPD(LAMMPS *lmp) : AtomVec(lmp) // order of fields in a string does not matter // except: fields_data_atom & fields_data_vel must match data file - fields_grow = (char *) "edpd_cv edpd_temp edpd_flux vest"; - fields_copy = (char *) "edpd_cv edpd_temp edpd_flux vest"; - fields_comm = (char *) "edpd_temp vest"; - fields_comm_vel = (char *) "edpd_temp vest"; + fields_grow = (char *) "edpd_cv edpd_temp edpd_flux vest vest_temp"; + fields_copy = (char *) "edpd_cv edpd_temp edpd_flux vest vest_temp"; + fields_comm = (char *) "edpd_temp vest vest_temp"; + fields_comm_vel = (char *) "edpd_temp vest vest_temp"; fields_reverse = (char *) "edpd_flux"; - fields_border = (char *) "edpd_cv edpd_temp vest"; - fields_border_vel = (char *) "edpd_cv edpd_temp vest"; - fields_exchange = (char *) "edpd_cv edpd_temp vest"; - fields_restart = (char * ) "edpd_cv edpd_temp vest"; - fields_create = (char *) "edpd_cv edpd_temp edpd_flux vest"; + fields_border = (char *) "edpd_cv edpd_temp vest vest_temp"; + fields_border_vel = (char *) "edpd_cv edpd_temp vest vest_temp"; + fields_exchange = (char *) "edpd_cv edpd_temp vest vest_temp"; + fields_restart = (char * ) "edpd_cv edpd_temp vest vest_temp"; + fields_create = (char *) "edpd_cv edpd_temp edpd_flux vest vest_temp"; fields_data_atom = (char *) "id type edpd_temp edpd_cv x"; fields_data_vel = (char *) "id v"; @@ -85,7 +85,7 @@ void AtomVecEDPD::create_atom_post(int ilocal) { atom->edpd_temp[ilocal] = 1.0; atom->edpd_cv[ilocal]= 1.0e5; - atom->vest[ilocal][3] = atom->edpd_temp[ilocal]; + atom->vest_temp[ilocal] = atom->edpd_temp[ilocal]; } /* ---------------------------------------------------------------------- @@ -99,5 +99,5 @@ void AtomVecEDPD::data_atom_post(int ilocal) atom->vest[ilocal][0] = 0.0; atom->vest[ilocal][1] = 0.0; atom->vest[ilocal][2] = 0.0; - atom->vest[ilocal][3] = atom->edpd_temp[ilocal]; + atom->vest_temp[ilocal] = atom->edpd_temp[ilocal]; } diff --git a/src/USER-MESO/atom_vec_tdpd.cpp b/src/USER-MESO/atom_vec_tdpd.cpp index 55284f69a2..5734fcf9ad 100644 --- a/src/USER-MESO/atom_vec_tdpd.cpp +++ b/src/USER-MESO/atom_vec_tdpd.cpp @@ -63,7 +63,7 @@ void AtomVecTDPD::process_args(int narg, char **arg) cc_species = atom->cc_species; atom->add_peratom_change_columns("cc",cc_species); - atom->add_peratom_change_columns("cc_species",cc_species); + atom->add_peratom_change_columns("cc_flux",cc_species); // delay setting up of fields until now diff --git a/src/USER-MESO/fix_mvv_edpd.cpp b/src/USER-MESO/fix_mvv_edpd.cpp index bd9cd9cc2a..3294d8d682 100644 --- a/src/USER-MESO/fix_mvv_edpd.cpp +++ b/src/USER-MESO/fix_mvv_edpd.cpp @@ -88,6 +88,7 @@ void FixMvvEDPD::initial_integrate(int /*vflag*/) double *edpd_flux = atom->edpd_flux; double *edpd_cv = atom->edpd_cv; double **vest = atom->vest; + double *vest_temp = atom->vest_temp; double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; @@ -105,7 +106,7 @@ void FixMvvEDPD::initial_integrate(int /*vflag*/) vest[i][0] = v[i][0] + dtfm * f[i][0]; vest[i][1] = v[i][1] + dtfm * f[i][1]; vest[i][2] = v[i][2] + dtfm * f[i][2]; - vest[i][3] = edpd_temp[i] + dtT * edpd_flux[i]; + vest_temp[i] = edpd_temp[i] + dtT * edpd_flux[i]; x[i][0] += dtv * vest[i][0]; x[i][1] += dtv * vest[i][1]; @@ -131,6 +132,7 @@ void FixMvvEDPD::final_integrate() double *edpd_flux = atom->edpd_flux; double *edpd_cv = atom->edpd_cv; double **vest = atom->vest; + double *vest_temp = atom->vest_temp; double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; @@ -148,7 +150,7 @@ void FixMvvEDPD::final_integrate() v[i][0] = vest[i][0] + dtfm * f[i][0]; v[i][1] = vest[i][1] + dtfm * f[i][1]; v[i][2] = vest[i][2] + dtfm * f[i][2]; - edpd_temp[i] = vest[i][3] + dtT * edpd_flux[i]; + edpd_temp[i] = vest_temp[i] + dtT * edpd_flux[i]; } } diff --git a/src/USER-SMD/atom_vec_smd.cpp b/src/USER-SMD/atom_vec_smd.cpp index 0fada3dc2a..9f0ed04a09 100644 --- a/src/USER-SMD/atom_vec_smd.cpp +++ b/src/USER-SMD/atom_vec_smd.cpp @@ -63,7 +63,7 @@ AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp) fields_grow = (char *) "de vfrac rmass x0 radius contact_radius molecule " - "smd_data_9 e vest tlsph_stress " + "smd_data_9 e vest smd_stress " "eff_plastic_strain eff_plastic_strain_rate damage"; fields_copy = (char *) "vfrac rmass x0 radius contact_radius molecule e " @@ -91,7 +91,7 @@ AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp) "eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress damage"; fields_data_atom = (char *) "id type molecule vfrac rmass radius contact_radius x"; - fields_data_vel = (char *) "id v vest"; + fields_data_vel = (char *) "id v"; // set these array sizes based on defines diff --git a/src/atom.cpp b/src/atom.cpp index 8fd859478f..0fbee8f583 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -566,6 +566,7 @@ void Atom::peratom_create() add_peratom("edpd_cv",&edpd_cv,DOUBLE,0); add_peratom("edpd_temp",&edpd_temp,DOUBLE,0); + add_peratom("vest_temp",&vest_temp,DOUBLE,0); add_peratom("edpd_flux",&edpd_flux,DOUBLE,0,1); // set per-thread flag add_peratom("cc",&cc,DOUBLE,1); add_peratom("cc_flux",&cc_flux,DOUBLE,1,1); // set per-thread flag @@ -625,8 +626,11 @@ void Atom::add_peratom(const char *name, void *address, void Atom::add_peratom_change_columns(const char *name, int cols) { + int i; for (int i = 0; i < nperatom; i++) if (strcmp(name,peratom[i].name) == 0) peratom[i].cols = cols; + if (i == nperatom) + error->all(FLERR,"Could not find name of peratom array for column change"); } /* ---------------------------------------------------------------------- diff --git a/src/atom.h b/src/atom.h index 007d364a7b..bc1eb1a7d7 100644 --- a/src/atom.h +++ b/src/atom.h @@ -124,6 +124,7 @@ class Atom : protected Pointers { double **cc,**cc_flux; // cc = chemical concentration double *edpd_temp,*edpd_flux; // temperature and heat flux + double *vest_temp; double *edpd_cv; // heat capacity int cc_species; @@ -162,10 +163,6 @@ class Atom : protected Pointers { int sp_flag; - // USER-EFF package - - int ecp_flag; - // USER-SMD package int smd_flag; diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index bbfccadb89..e31c235760 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -45,6 +45,7 @@ AtomVec::AtomVec(LAMMPS *lmp) : Pointers(lmp) forceclearflag = 0; maxexchange = 0; bonus_flag = 0; + size_forward_bonus = size_border_bonus = 0; kokkosable = 0; @@ -176,7 +177,7 @@ int AtomVec::grow_nmax_bonus(int nmax_bonus) void AtomVec::grow(int n) { - int i,datatype,cols,maxcols; + int datatype,cols,maxcols; void *pdata,*plength; if (n == 0) grow_nmax(); @@ -193,7 +194,7 @@ void AtomVec::grow(int n) v = memory->grow(atom->v,nmax,3,"atom:v"); f = memory->grow(atom->f,nmax*nthreads,3,"atom:f"); - for (i = 0; i < ngrow; i++) { + for (int i = 0; i < ngrow; i++) { pdata = mgrow.pdata[i]; datatype = mgrow.datatype[i]; cols = mgrow.cols[i]; @@ -415,7 +416,7 @@ int AtomVec::pack_comm(int n, int *list, double *buf, /* ---------------------------------------------------------------------- */ int AtomVec::pack_comm_vel(int n, int *list, double *buf, - int pbc_flag, int *pbc) + int pbc_flag, int *pbc) { int i,j,m,mm,nn,datatype,cols; double dx,dy,dz,dvx,dvy,dvz; @@ -1375,15 +1376,15 @@ int AtomVec::size_restart() if (nrestart) { for (nn = 0; nn < nrestart; nn++) { - cols = mrestart.cols[i]; + cols = mrestart.cols[nn]; if (cols == 0) n += nlocal; else if (cols > 0) n += cols*nlocal; else { collength = mrestart.collength[nn]; plength = mrestart.plength[nn]; for (i = 0; i < nlocal; i++) { - if (collength) ncols = (*((int ***) plength))[nlocal][collength-1]; - else ncols = (*((int **) plength))[nlocal]; + if (collength) ncols = (*((int ***) plength))[i][collength-1]; + else ncols = (*((int **) plength))[i]; n += ncols; } } @@ -1435,7 +1436,7 @@ int AtomVec::pack_restart(int i, double *buf) if (cols == 0) { double *vec = *((double **) pdata); buf[m++] = vec[i]; - } else if (ncols > 0) { + } else if (cols > 0) { double **array = *((double ***) pdata); for (mm = 0; mm < cols; mm++) buf[m++] = array[i][mm]; @@ -1469,7 +1470,7 @@ int AtomVec::pack_restart(int i, double *buf) if (cols == 0) { bigint *vec = *((bigint **) pdata); buf[m++] = ubuf(vec[i]).d; - } else if (ncols > 0) { + } else if (cols > 0) { bigint **array = *((bigint ***) pdata); for (mm = 0; mm < cols; mm++) buf[m++] = ubuf(array[i][mm]).d; @@ -1705,7 +1706,7 @@ void AtomVec::data_atom(double *coord, imageint imagetmp, char **values) vec[nlocal] = utils::numeric(FLERR,values[ivalue++],true,lmp); } else { double **array = *((double ***) pdata); - if (array == atom->x) { // already set by coord arg + if (array == atom->x) { // x was already set by coord arg ivalue += cols; continue; } @@ -1878,9 +1879,9 @@ void AtomVec::data_vel(int ilocal, char **values) v[ilocal][1] = utils::numeric(FLERR,values[1],true,lmp); v[ilocal][2] = utils::numeric(FLERR,values[2],true,lmp); - if (ndata_vel) { + if (ndata_vel > 2) { int ivalue = 3; - for (n = 0; n < ndata_vel; n++) { + for (n = 2; n < ndata_vel; n++) { pdata = mdata_vel.pdata[n]; datatype = mdata_vel.datatype[n]; cols = mdata_vel.cols[n]; @@ -2434,6 +2435,7 @@ void AtomVec::setup_fields() else size_data_atom += cols; } + size_data_vel = 0; for (n = 0; n < ndata_vel; n++) { cols = mdata_vel.cols[n]; diff --git a/src/atom_vec.h b/src/atom_vec.h index 69ea1d51ab..5911c8414b 100644 --- a/src/atom_vec.h +++ b/src/atom_vec.h @@ -74,7 +74,7 @@ class AtomVec : protected Pointers { virtual void force_clear(int, size_t) {} - void grow(int); + virtual void grow(int); void copy(int, int, int); virtual void copy_bonus(int, int, int) {} @@ -122,13 +122,11 @@ class AtomVec : protected Pointers { void data_atom(double *, imageint, char **); virtual void data_atom_post(int) {} - - void data_atom_bonus(int, char **) {} - void data_body(int, int, int, int *, double *) {} + virtual void data_atom_bonus(int, char **) {} + virtual void data_body(int, int, int, int *, double *) {} void pack_data(double **); void write_data(FILE *, int, double **); - virtual void pack_data_pre(int) {} virtual void pack_data_post(int) {} @@ -145,19 +143,19 @@ class AtomVec : protected Pointers { int pack_improper(tagint **); void write_improper(FILE *, int, tagint **, int); - int property_atom(char *) {return -1;} - void pack_property_atom(int, double *, int, int) {} + virtual int property_atom(char *) {return -1;} + virtual void pack_property_atom(int, double *, int, int) {} bigint memory_usage(); virtual bigint memory_usage_bonus() {} protected: - int nmax; // local copy of atom->nmax - int deform_vremap; // local copy of domain properties + int nmax; // local copy of atom->nmax + int deform_vremap; // local copy of domain properties int deform_groupbit; double *h_rate; - tagint *tag; // peratom fields common to all styles + tagint *tag; // peratom fields common to all styles int *type,*mask; imageint *image; double **x,**v,**f; diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index 19ac69cef3..a04f23a47c 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -40,8 +40,8 @@ AtomVecBody::AtomVecBody(LAMMPS *lmp) : AtomVec(lmp) // size_data_bonus is not used by Atom class for body style size_forward_bonus = 4; - size_border_bonus = 9; - size_restart_bonus_one = 9; + size_border_bonus = 10; + size_restart_bonus_one = 10; size_data_bonus = 0; atom->body_flag = 1; @@ -72,11 +72,9 @@ AtomVecBody::AtomVecBody(LAMMPS *lmp) : AtomVec(lmp) fields_border_vel = (char *) "radius rmass angmom"; fields_exchange = (char *) "radius rmass angmom"; fields_restart = (char *) "radius rmass angmom"; - fields_create = (char *) "radius rmass angmom tri"; + fields_create = (char *) "radius rmass angmom body"; fields_data_atom = (char *) "id type body rmass x"; fields_data_vel = (char *) "id v angmom"; - - setup_fields(); } /* ---------------------------------------------------------------------- */ @@ -127,6 +125,20 @@ void AtomVecBody::process_args(int narg, char **arg) size_forward_bonus += bptr->size_forward; size_border_bonus += bptr->size_border; + + setup_fields(); +} + +/* ---------------------------------------------------------------------- + grow atom arrays + must set local copy of body ptr + needed in replicate when 2 atom classes exist and pack_restart() is called +------------------------------------------------------------------------- */ + +void AtomVecBody::grow(int n) +{ + AtomVec::grow(n); + body = atom->body; } /* ---------------------------------------------------------------------- @@ -150,8 +162,6 @@ void AtomVecBody::grow_bonus() void AtomVecBody::copy_bonus(int i, int j, int delflag) { - int *body = atom->body; - // if deleting atom J via delflag and J has bonus data, then delete it if (delflag && body[j] >= 0) { @@ -206,8 +216,6 @@ int AtomVecBody::pack_comm_bonus(int n, int *list, double *buf) int i,j,m; double *quat; - int *body = atom->body; - m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -231,8 +239,6 @@ void AtomVecBody::unpack_comm_bonus(int n, int first, double *buf) int i,m,last; double *quat; - int *body = atom->body; - m = 0; last = first + n; for (i = first; i < last; i++) { @@ -254,8 +260,6 @@ int AtomVecBody::pack_border_bonus(int n, int *list, double *buf) int i,j,m; double *quat,*inertia; - int *body = atom->body; - m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -287,8 +291,6 @@ int AtomVecBody::unpack_border_bonus(int n, int first, double *buf) int i,j,m,last; double *quat,*inertia; - int *body = atom->body; - m = 0; last = first + n; for (i = first; i < last; i++) { @@ -330,8 +332,6 @@ int AtomVecBody::pack_exchange_bonus(int i, double *buf) { int m = 0; - int *body = atom->body; - if (body[i] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -363,8 +363,6 @@ int AtomVecBody::unpack_exchange_bonus(int ilocal, double *buf) { int m = 0; - int *body = atom->body; - body[ilocal] = (int) ubuf(buf[m++]).i; if (body[ilocal] == 0) body[ilocal] = -1; else { @@ -408,8 +406,6 @@ int AtomVecBody::size_restart_bonus() { int i; - int *body = atom->body; - int n = 0; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { @@ -418,8 +414,7 @@ int AtomVecBody::size_restart_bonus() if (intdoubleratio == 1) n += bonus[body[i]].ninteger; else n += (bonus[body[i]].ninteger+1)/2; n += bonus[body[i]].ndouble; - } - n++; + } else n++; } return n; @@ -435,8 +430,6 @@ int AtomVecBody::pack_restart_bonus(int i, double *buf) { int m = 0; - int *body = atom->body; - if (body[i] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -470,8 +463,6 @@ int AtomVecBody::unpack_restart_bonus(int ilocal, double *buf) { int m = 0; - int *body = atom->body; - body[ilocal] = (int) ubuf(buf[m++]).i; if (body[ilocal] == 0) body[ilocal] = -1; else { diff --git a/src/atom_vec_body.h b/src/atom_vec_body.h index 939b01878d..3f32c8223c 100644 --- a/src/atom_vec_body.h +++ b/src/atom_vec_body.h @@ -43,6 +43,7 @@ class AtomVecBody : public AtomVec { ~AtomVecBody(); void process_args(int, char **); + void grow(int); void copy_bonus(int, int, int); void clear_bonus(); int pack_comm_bonus(int, int *, double *); @@ -74,6 +75,8 @@ class AtomVecBody : public AtomVec { int intdoubleratio; // sizeof(double) / sizeof(int) int body_flag; + int *body; + MyPoolChunk *icp; MyPoolChunk *dcp; diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index 9166293384..e8ab6d5613 100644 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -38,7 +38,7 @@ AtomVecEllipsoid::AtomVecEllipsoid(LAMMPS *lmp) : AtomVec(lmp) size_forward_bonus = 4; size_border_bonus = 8; - size_restart_bonus_one = 7; + size_restart_bonus_one = 8; size_data_bonus = 8; atom->ellipsoid_flag = 1; @@ -320,7 +320,7 @@ int AtomVecEllipsoid::size_restart_bonus() int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { if (ellipsoid[i] >= 0) n += size_restart_bonus_one; - n++; + else n++; } return n; diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index ded2f88c2f..7ab697b349 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -37,7 +37,7 @@ AtomVecLine::AtomVecLine(LAMMPS *lmp) : AtomVec(lmp) size_forward_bonus = 1; size_border_bonus = 3; - size_restart_bonus_one = 2; + size_restart_bonus_one = 3; size_data_bonus = 5; atom->line_flag = 1; @@ -286,7 +286,7 @@ int AtomVecLine::size_restart_bonus() int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { if (line[i] >= 0) n += size_restart_bonus_one; - n++; + else n++; } return n; diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index 81f1b02fdb..b601fc8f7c 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -61,18 +61,22 @@ AtomVecSphere::AtomVecSphere(LAMMPS *lmp) : AtomVec(lmp) void AtomVecSphere::process_args(int narg, char **arg) { - if (narg == 0) return; - if (narg != 1) error->all(FLERR,"Illegal atom_style sphere command"); - - radvary = utils::numeric(FLERR,arg[0],true,lmp); - if (radvary < 0 || radvary > 1) + if (narg != 0 && narg != 1) error->all(FLERR,"Illegal atom_style sphere command"); - if (radvary == 0) return; + + radvary = 0; + if (narg == 1) { + radvary = utils::numeric(FLERR,arg[0],true,lmp); + if (radvary < 0 || radvary > 1) + error->all(FLERR,"Illegal atom_style sphere command"); + } // dynamic particle radius and mass must be communicated every step - fields_comm = (char *) "radius rmass"; - fields_comm_vel = (char *) "radius rmass omega"; + if (radvary) { + fields_comm = (char *) "radius rmass"; + fields_comm_vel = (char *) "radius rmass omega"; + } // delay setting up of fields until now diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index 32d75c16f3..7345646a1e 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -38,7 +38,7 @@ AtomVecTri::AtomVecTri(LAMMPS *lmp) : AtomVec(lmp) size_forward_bonus = 4; size_border_bonus = 17; - size_restart_bonus_one = 16; + size_restart_bonus_one = 17; size_data_bonus = 10; atom->tri_flag = 1; @@ -64,7 +64,7 @@ AtomVecTri::AtomVecTri(LAMMPS *lmp) : AtomVec(lmp) fields_border_vel = (char *) "molecule radius rmass omega"; fields_exchange = (char *) "molecule radius rmass omega angmom"; fields_restart = (char *) "molecule radius rmass omega angmom"; - fields_create = (char *) "molecule radius rmass omega angmom line"; + fields_create = (char *) "molecule radius rmass omega angmom tri"; fields_data_atom = (char *) "id molecule type tri rmass x"; fields_data_vel = (char *) "id v omega angmom"; @@ -381,7 +381,7 @@ int AtomVecTri::size_restart_bonus() int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { if (tri[i] >= 0) n += size_restart_bonus_one; - n++; + else n++; } return n; diff --git a/src/fix_gravity.cpp b/src/fix_gravity.cpp index 14ba913c01..e00bbb4e17 100644 --- a/src/fix_gravity.cpp +++ b/src/fix_gravity.cpp @@ -31,7 +31,7 @@ using namespace FixConst; using namespace MathConst; enum{CHUTE,SPHERICAL,VECTOR}; -enum{CONSTANT,EQUAL}; +enum{CONSTANT,EQUAL}; // same as FixPour /* ---------------------------------------------------------------------- */ @@ -134,6 +134,16 @@ FixGravity::FixGravity(LAMMPS *lmp, int narg, char **arg) : eflag = 0; egrav = 0.0; + + // set gravity components once and for all if CONSTANT + + varflag = CONSTANT; + if (mstyle != CONSTANT || vstyle != CONSTANT || pstyle != CONSTANT || + tstyle != CONSTANT || xstyle != CONSTANT || ystyle != CONSTANT || + zstyle != CONSTANT) varflag = EQUAL; + + if (varflag == CONSTANT) set_acceleration(); + } /* ---------------------------------------------------------------------- */ @@ -222,15 +232,6 @@ void FixGravity::init() if (!input->variable->equalstyle(zvar)) error->all(FLERR,"Variable for fix gravity is invalid style"); } - - varflag = CONSTANT; - if (mstyle != CONSTANT || vstyle != CONSTANT || pstyle != CONSTANT || - tstyle != CONSTANT || xstyle != CONSTANT || ystyle != CONSTANT || - zstyle != CONSTANT) varflag = EQUAL; - - // set gravity components once and for all - - if (varflag == CONSTANT) set_acceleration(); } /* ---------------------------------------------------------------------- */ diff --git a/src/replicate.cpp b/src/replicate.cpp index 1617ab0313..3659f7cf7a 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -331,35 +331,43 @@ void Replicate::command(int narg, char **arg) if (me == 0 && screen) { fprintf(screen," bounding box image = (%i %i %i) to (%i %i %i)\n", - _imagelo[0],_imagelo[1],_imagelo[2],_imagehi[0],_imagehi[1],_imagehi[2]); + _imagelo[0],_imagelo[1],_imagelo[2], + _imagehi[0],_imagehi[1],_imagehi[2]); fprintf(screen," bounding box extra memory = %.2f MB\n", (double)size_buf_all*sizeof(double)/1024/1024); } // rnk offsets - int * disp_buf_rnk; + int *disp_buf_rnk; memory->create(disp_buf_rnk, nprocs, "replicate:disp_buf_rnk"); disp_buf_rnk[0] = 0; - for (i=1; icreate(buf_all, size_buf_all, "replicate:buf_all"); - MPI_Allgatherv(buf, n, MPI_DOUBLE, buf_all, size_buf_rnk, disp_buf_rnk, MPI_DOUBLE, world); + MPI_Allgatherv(buf,n,MPI_DOUBLE,buf_all,size_buf_rnk,disp_buf_rnk, + MPI_DOUBLE,world); // bounding box of original unwrapped system double _orig_lo[3], _orig_hi[3]; if (triclinic) { - _orig_lo[0] = domain->boxlo[0] + _imagelo[0] * old_xprd + _imagelo[1] * old_xy + _imagelo[2] * old_xz; - _orig_lo[1] = domain->boxlo[1] + _imagelo[1] * old_yprd + _imagelo[2] * old_yz; + _orig_lo[0] = domain->boxlo[0] + + _imagelo[0] * old_xprd + _imagelo[1] * old_xy + _imagelo[2] * old_xz; + _orig_lo[1] = domain->boxlo[1] + + _imagelo[1] * old_yprd + _imagelo[2] * old_yz; _orig_lo[2] = domain->boxlo[2] + _imagelo[2] * old_zprd; - _orig_hi[0] = domain->boxlo[0] + (_imagehi[0]+1) * old_xprd + (_imagehi[1]+1) * old_xy + (_imagehi[2]+1) * old_xz; - _orig_hi[1] = domain->boxlo[1] + (_imagehi[1]+1) * old_yprd + (_imagehi[2]+1) * old_yz; + _orig_hi[0] = domain->boxlo[0] + + (_imagehi[0]+1) * old_xprd + + (_imagehi[1]+1) * old_xy + (_imagehi[2]+1) * old_xz; + _orig_hi[1] = domain->boxlo[1] + + (_imagehi[1]+1) * old_yprd + (_imagehi[2]+1) * old_yz; _orig_hi[2] = domain->boxlo[2] + (_imagehi[2]+1) * old_zprd; } else { _orig_lo[0] = domain->boxlo[0] + _imagelo[0] * old_xprd; @@ -605,7 +613,8 @@ void Replicate::command(int narg, char **arg) MPI_Reduce(&num_replicas_added, &sum, 1, MPI_INT, MPI_SUM, 0, world); double avg = (double) sum / nprocs; if (me == 0 && screen) - fprintf(screen," average # of replicas added to proc = %.2f out of %i (%.2f %%)\n", + fprintf(screen," average # of replicas added to proc = %.2f " + "out of %i (%.2f %%)\n", avg,nx*ny*nz,avg/(nx*ny*nz)*100.0); } else { diff --git a/src/verlet.cpp b/src/verlet.cpp index 8cd6fe940d..fe9645618a 100644 --- a/src/verlet.cpp +++ b/src/verlet.cpp @@ -109,7 +109,7 @@ void Verlet::setup(int flag) domain->pbc(); domain->reset_box(); comm->setup(); - if (neighbor->style) neighbor->setup_bins(); + if (neighbor->style) neighbor->setup_bins(); comm->exchange(); if (atom->sortfreq > 0) atom->sort(); comm->borders(); From b6374bacfb13a4b9c7273c2d07dd5dd1dd055ba0 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 18 Dec 2019 08:56:03 -0700 Subject: [PATCH 014/577] enable replicate to work with local ptrs --- src/DIPOLE/atom_vec_dipole.cpp | 15 +++- src/DIPOLE/atom_vec_dipole.h | 5 ++ src/MOLECULE/atom_vec_angle.cpp | 39 ++++++---- src/MOLECULE/atom_vec_angle.h | 6 ++ src/MOLECULE/atom_vec_bond.cpp | 29 +++---- src/MOLECULE/atom_vec_bond.h | 10 ++- src/MOLECULE/atom_vec_full.cpp | 55 ++++++------- src/MOLECULE/atom_vec_full.h | 6 ++ src/MOLECULE/atom_vec_molecular.cpp | 55 ++++++------- src/MOLECULE/atom_vec_molecular.h | 6 ++ src/MOLECULE/atom_vec_template.cpp | 23 ++++-- src/MOLECULE/atom_vec_template.h | 5 ++ src/PERI/atom_vec_peri.cpp | 37 +++++---- src/PERI/atom_vec_peri.h | 7 ++ src/SPIN/atom_vec_spin.cpp | 29 +++++-- src/SPIN/atom_vec_spin.h | 5 ++ src/USER-DPD/atom_vec_dpd.cpp | 34 +++++--- src/USER-DPD/atom_vec_dpd.h | 7 ++ src/USER-EFF/atom_vec_electron.cpp | 25 ++++-- src/USER-EFF/atom_vec_electron.h | 6 ++ src/USER-MESO/atom_vec_edpd.cpp | 32 +++++--- src/USER-MESO/atom_vec_edpd.h | 7 ++ src/USER-MESO/atom_vec_mdpd.cpp | 24 ++++-- src/USER-MESO/atom_vec_mdpd.h | 6 ++ src/USER-MESO/atom_vec_tdpd.cpp | 14 +++- src/USER-MESO/atom_vec_tdpd.h | 5 ++ src/USER-SMD/atom_vec_smd.cpp | 90 ++++++++++++--------- src/USER-SMD/atom_vec_smd.h | 8 ++ src/USER-SPH/atom_vec_meso.cpp | 36 +++++---- src/USER-SPH/atom_vec_meso.h | 6 ++ src/atom.cpp | 83 +++++++------------- src/atom.h | 15 ++-- src/atom_vec.cpp | 6 +- src/atom_vec.h | 3 +- src/atom_vec_body.cpp | 58 +++++++------- src/atom_vec_body.h | 6 +- src/atom_vec_ellipsoid.cpp | 61 ++++++--------- src/atom_vec_ellipsoid.h | 6 +- src/atom_vec_hybrid.cpp | 16 ++-- src/atom_vec_hybrid.h | 3 +- src/atom_vec_line.cpp | 93 ++++++++++------------ src/atom_vec_line.h | 7 +- src/atom_vec_sphere.cpp | 45 +++++++---- src/atom_vec_sphere.h | 6 +- src/atom_vec_tri.cpp | 116 +++++++++++++--------------- src/atom_vec_tri.h | 7 +- src/replicate.cpp | 3 +- 47 files changed, 686 insertions(+), 480 deletions(-) diff --git a/src/DIPOLE/atom_vec_dipole.cpp b/src/DIPOLE/atom_vec_dipole.cpp index 5cdbab1b33..074a59d5a1 100644 --- a/src/DIPOLE/atom_vec_dipole.cpp +++ b/src/DIPOLE/atom_vec_dipole.cpp @@ -54,6 +54,16 @@ AtomVecDipole::AtomVecDipole(LAMMPS *lmp) : AtomVec(lmp) setup_fields(); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecDipole::grow_pointers() +{ + mu = atom->mu; +} + /* ---------------------------------------------------------------------- modify what AtomVec::data_atom() just unpacked or initialize other atom quantities @@ -61,6 +71,7 @@ AtomVecDipole::AtomVecDipole(LAMMPS *lmp) : AtomVec(lmp) void AtomVecDipole::data_atom_post(int ilocal) { - double *mu = atom->mu[ilocal]; - mu[3] = sqrt(mu[0]*mu[0] + mu[1]*mu[1] + mu[2]*mu[2]); + double *mu_one = mu[ilocal]; + mu_one[3] = + sqrt(mu_one[0]*mu_one[0] + mu_one[1]*mu_one[1] + mu_one[2]*mu_one[2]); } diff --git a/src/DIPOLE/atom_vec_dipole.h b/src/DIPOLE/atom_vec_dipole.h index 45f33d109d..2030892a43 100644 --- a/src/DIPOLE/atom_vec_dipole.h +++ b/src/DIPOLE/atom_vec_dipole.h @@ -27,7 +27,12 @@ namespace LAMMPS_NS { class AtomVecDipole : public AtomVec { public: AtomVecDipole(class LAMMPS *); + + void grow_pointers(); void data_atom_post(int); + + private: + double **mu; }; } diff --git a/src/MOLECULE/atom_vec_angle.cpp b/src/MOLECULE/atom_vec_angle.cpp index 1bd6f9a071..f3ebe3258b 100644 --- a/src/MOLECULE/atom_vec_angle.cpp +++ b/src/MOLECULE/atom_vec_angle.cpp @@ -66,6 +66,20 @@ AtomVecAngle::~AtomVecAngle() delete [] angle_negative; } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecAngle::grow_pointers() +{ + num_bond = atom->num_bond; + bond_type = atom->bond_type; + num_angle = atom->num_angle; + angle_type = atom->angle_type; + nspecial = atom->nspecial; +} + /* ---------------------------------------------------------------------- modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ @@ -87,11 +101,6 @@ void AtomVecAngle::pack_restart_pre(int ilocal) // flip any negative types to positive and flag which ones - int *num_bond = atom->num_bond; - int **bond_type = atom->bond_type; - int *num_angle = atom->num_angle; - int **angle_type = atom->angle_type; - int any_bond_negative = 0; for (int m = 0; m < num_bond[ilocal]; m++) { if (bond_type[ilocal][m] < 0) { @@ -120,15 +129,11 @@ void AtomVecAngle::pack_restart_post(int ilocal) // restore the flagged types to their negative values if (any_bond_negative) { - int *num_bond = atom->num_bond; - int **bond_type = atom->bond_type; for (int m = 0; m < num_bond[ilocal]; m++) if (bond_negative[m]) bond_type[ilocal][m] = -bond_type[ilocal][m]; } if (any_angle_negative) { - int *num_angle = atom->num_angle; - int **angle_type = atom->angle_type; for (int m = 0; m < num_angle[ilocal]; m++) if (angle_negative[m]) angle_type[ilocal][m] = -angle_type[ilocal][m]; } @@ -140,9 +145,9 @@ void AtomVecAngle::pack_restart_post(int ilocal) void AtomVecAngle::unpack_restart_init(int ilocal) { - atom->nspecial[ilocal][0] = 0; - atom->nspecial[ilocal][1] = 0; - atom->nspecial[ilocal][2] = 0; + nspecial[ilocal][0] = 0; + nspecial[ilocal][1] = 0; + nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- @@ -152,9 +157,9 @@ void AtomVecAngle::unpack_restart_init(int ilocal) void AtomVecAngle::data_atom_post(int ilocal) { - atom->num_bond[ilocal] = 0; - atom->num_angle[ilocal] = 0; - atom->nspecial[ilocal][0] = 0; - atom->nspecial[ilocal][1] = 0; - atom->nspecial[ilocal][2] = 0; + num_bond[ilocal] = 0; + num_angle[ilocal] = 0; + nspecial[ilocal][0] = 0; + nspecial[ilocal][1] = 0; + nspecial[ilocal][2] = 0; } diff --git a/src/MOLECULE/atom_vec_angle.h b/src/MOLECULE/atom_vec_angle.h index 48e55b0988..0ce0b4baab 100644 --- a/src/MOLECULE/atom_vec_angle.h +++ b/src/MOLECULE/atom_vec_angle.h @@ -28,12 +28,18 @@ class AtomVecAngle : public AtomVec { public: AtomVecAngle(class LAMMPS *); ~AtomVecAngle(); + + void grow_pointers(); void pack_restart_pre(int); void pack_restart_post(int); void unpack_restart_init(int); void data_atom_post(int); private: + int *num_bond,*num_angle; + int **bond_type,**angle_type; + int **nspecial; + int any_bond_negative,any_angle_negative; int bond_per_atom,angle_per_atom; int *bond_negative,*angle_negative; diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index 00e8e3260d..64a52fa80a 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -61,19 +61,17 @@ AtomVecBond::~AtomVecBond() } /* ---------------------------------------------------------------------- - grow atom arrays - must set local copy of body ptr - needed in replicate when 2 atom classes exist and pack_restart() is called + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() ------------------------------------------------------------------------- */ -void AtomVecBond::grow(int n) +void AtomVecBond::grow_pointers() { - AtomVec::grow(n); num_bond = atom->num_bond; bond_type = atom->bond_type; + nspecial = atom->nspecial; } - /* ---------------------------------------------------------------------- modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ @@ -90,9 +88,6 @@ void AtomVecBond::pack_restart_pre(int ilocal) // flip any negative types to positive and flag which ones - //int *num_bond = atom->num_bond; - //int **bond_type = atom->bond_type; - any_bond_negative = 0; for (int m = 0; m < num_bond[ilocal]; m++) { if (bond_type[ilocal][m] < 0) { @@ -112,8 +107,6 @@ void AtomVecBond::pack_restart_post(int ilocal) // restore the flagged types to their negative values if (any_bond_negative) { - //int *num_bond = atom->num_bond; - //int **bond_type = atom->bond_type; for (int m = 0; m < num_bond[ilocal]; m++) if (bond_negative[m]) bond_type[ilocal][m] = -bond_type[ilocal][m]; } @@ -125,9 +118,9 @@ void AtomVecBond::pack_restart_post(int ilocal) void AtomVecBond::unpack_restart_init(int ilocal) { - atom->nspecial[ilocal][0] = 0; - atom->nspecial[ilocal][1] = 0; - atom->nspecial[ilocal][2] = 0; + nspecial[ilocal][0] = 0; + nspecial[ilocal][1] = 0; + nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- @@ -137,8 +130,8 @@ void AtomVecBond::unpack_restart_init(int ilocal) void AtomVecBond::data_atom_post(int ilocal) { - atom->num_bond[ilocal] = 0; - atom->nspecial[ilocal][0] = 0; - atom->nspecial[ilocal][1] = 0; - atom->nspecial[ilocal][2] = 0; + num_bond[ilocal] = 0; + nspecial[ilocal][0] = 0; + nspecial[ilocal][1] = 0; + nspecial[ilocal][2] = 0; } diff --git a/src/MOLECULE/atom_vec_bond.h b/src/MOLECULE/atom_vec_bond.h index 90c4b1f217..c938655127 100644 --- a/src/MOLECULE/atom_vec_bond.h +++ b/src/MOLECULE/atom_vec_bond.h @@ -28,19 +28,21 @@ class AtomVecBond : public AtomVec { public: AtomVecBond(class LAMMPS *); ~AtomVecBond(); - void grow(int); + + void grow_pointers(); void pack_restart_pre(int); void pack_restart_post(int); void unpack_restart_init(int); void data_atom_post(int); private: + int *num_bond; + int **bond_type; + int **nspecial; + int any_bond_negative; int bond_per_atom; int *bond_negative; - - int *num_bond; - int **bond_type; }; } diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index be7c92ce93..89afae5005 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -88,6 +88,24 @@ AtomVecFull::~AtomVecFull() delete [] improper_negative; } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecFull::grow_pointers() +{ + num_bond = atom->num_bond; + bond_type = atom->bond_type; + num_angle = atom->num_angle; + angle_type = atom->angle_type; + num_dihedral = atom->num_dihedral; + dihedral_type = atom->dihedral_type; + num_improper = atom->num_improper; + improper_type = atom->improper_type; + nspecial = atom->nspecial; +} + /* ---------------------------------------------------------------------- modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ @@ -119,15 +137,6 @@ void AtomVecFull::pack_restart_pre(int ilocal) // flip any negative types to positive and flag which ones - int *num_bond = atom->num_bond; - int **bond_type = atom->bond_type; - int *num_angle = atom->num_angle; - int **angle_type = atom->angle_type; - int *num_dihedral = atom->num_dihedral; - int **dihedral_type = atom->dihedral_type; - int *num_improper = atom->num_improper; - int **improper_type = atom->improper_type; - any_bond_negative = 0; for (int m = 0; m < num_bond[ilocal]; m++) { if (bond_type[ilocal][m] < 0) { @@ -174,30 +183,22 @@ void AtomVecFull::pack_restart_post(int ilocal) // restore the flagged types to their negative values if (any_bond_negative) { - int *num_bond = atom->num_bond; - int **bond_type = atom->bond_type; for (int m = 0; m < num_bond[ilocal]; m++) if (bond_negative[m]) bond_type[ilocal][m] = -bond_type[ilocal][m]; } if (any_angle_negative) { - int *num_angle = atom->num_angle; - int **angle_type = atom->angle_type; for (int m = 0; m < num_angle[ilocal]; m++) if (angle_negative[m]) angle_type[ilocal][m] = -angle_type[ilocal][m]; } if (any_dihedral_negative) { - int *num_dihedral = atom->num_dihedral; - int **dihedral_type = atom->dihedral_type; for (int m = 0; m < num_dihedral[ilocal]; m++) if (dihedral_negative[m]) dihedral_type[ilocal][m] = -dihedral_type[ilocal][m]; } if (any_improper_negative) { - int *num_improper = atom->num_improper; - int **improper_type = atom->improper_type; for (int m = 0; m < num_improper[ilocal]; m++) if (improper_negative[m]) improper_type[ilocal][m] = -improper_type[ilocal][m]; @@ -210,9 +211,9 @@ void AtomVecFull::pack_restart_post(int ilocal) void AtomVecFull::unpack_restart_init(int ilocal) { - atom->nspecial[ilocal][0] = 0; - atom->nspecial[ilocal][1] = 0; - atom->nspecial[ilocal][2] = 0; + nspecial[ilocal][0] = 0; + nspecial[ilocal][1] = 0; + nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- @@ -222,11 +223,11 @@ void AtomVecFull::unpack_restart_init(int ilocal) void AtomVecFull::data_atom_post(int ilocal) { - atom->num_bond[ilocal] = 0; - atom->num_angle[ilocal] = 0; - atom->num_dihedral[ilocal] = 0; - atom->num_improper[ilocal] = 0; - atom->nspecial[ilocal][0] = 0; - atom->nspecial[ilocal][1] = 0; - atom->nspecial[ilocal][2] = 0; + num_bond[ilocal] = 0; + num_angle[ilocal] = 0; + num_dihedral[ilocal] = 0; + num_improper[ilocal] = 0; + nspecial[ilocal][0] = 0; + nspecial[ilocal][1] = 0; + nspecial[ilocal][2] = 0; } diff --git a/src/MOLECULE/atom_vec_full.h b/src/MOLECULE/atom_vec_full.h index 455bbd0d5e..1abd3351d3 100644 --- a/src/MOLECULE/atom_vec_full.h +++ b/src/MOLECULE/atom_vec_full.h @@ -28,12 +28,18 @@ class AtomVecFull : public AtomVec { public: AtomVecFull(class LAMMPS *); ~AtomVecFull(); + + void grow_pointers(); void pack_restart_pre(int); void pack_restart_post(int); void unpack_restart_init(int); void data_atom_post(int); private: + int *num_bond,*num_angle,*num_dihedral,*num_improper; + int **bond_type,**angle_type,**dihedral_type,**improper_type; + int **nspecial; + int any_bond_negative,any_angle_negative, any_dihedral_negative,any_improper_negative; int bond_per_atom,angle_per_atom,dihedral_per_atom,improper_per_atom; diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index ea15216aee..c2b71468c0 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -88,6 +88,24 @@ AtomVecMolecular::~AtomVecMolecular() delete [] improper_negative; } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecMolecular::grow_pointers() +{ + num_bond = atom->num_bond; + bond_type = atom->bond_type; + num_angle = atom->num_angle; + angle_type = atom->angle_type; + num_dihedral = atom->num_dihedral; + dihedral_type = atom->dihedral_type; + num_improper = atom->num_improper; + improper_type = atom->improper_type; + nspecial = atom->nspecial; +} + /* ---------------------------------------------------------------------- modify values for AtomVec::pack_restart() to pack ------------------------------------------------------------------------- */ @@ -119,15 +137,6 @@ void AtomVecMolecular::pack_restart_pre(int ilocal) // flip any negative types to positive and flag which ones - int *num_bond = atom->num_bond; - int **bond_type = atom->bond_type; - int *num_angle = atom->num_angle; - int **angle_type = atom->angle_type; - int *num_dihedral = atom->num_dihedral; - int **dihedral_type = atom->dihedral_type; - int *num_improper = atom->num_improper; - int **improper_type = atom->improper_type; - any_bond_negative = 0; for (int m = 0; m < num_bond[ilocal]; m++) { if (bond_type[ilocal][m] < 0) { @@ -174,30 +183,22 @@ void AtomVecMolecular::pack_restart_post(int ilocal) // restore the flagged types to their negative values if (any_bond_negative) { - int *num_bond = atom->num_bond; - int **bond_type = atom->bond_type; for (int m = 0; m < num_bond[ilocal]; m++) if (bond_negative[m]) bond_type[ilocal][m] = -bond_type[ilocal][m]; } if (any_angle_negative) { - int *num_angle = atom->num_angle; - int **angle_type = atom->angle_type; for (int m = 0; m < num_angle[ilocal]; m++) if (angle_negative[m]) angle_type[ilocal][m] = -angle_type[ilocal][m]; } if (any_dihedral_negative) { - int *num_dihedral = atom->num_dihedral; - int **dihedral_type = atom->dihedral_type; for (int m = 0; m < num_dihedral[ilocal]; m++) if (dihedral_negative[m]) dihedral_type[ilocal][m] = -dihedral_type[ilocal][m]; } if (any_improper_negative) { - int *num_improper = atom->num_improper; - int **improper_type = atom->improper_type; for (int m = 0; m < num_improper[ilocal]; m++) if (improper_negative[m]) improper_type[ilocal][m] = -improper_type[ilocal][m]; @@ -210,9 +211,9 @@ void AtomVecMolecular::pack_restart_post(int ilocal) void AtomVecMolecular::unpack_restart_init(int ilocal) { - atom->nspecial[ilocal][0] = 0; - atom->nspecial[ilocal][1] = 0; - atom->nspecial[ilocal][2] = 0; + nspecial[ilocal][0] = 0; + nspecial[ilocal][1] = 0; + nspecial[ilocal][2] = 0; } /* ---------------------------------------------------------------------- @@ -222,11 +223,11 @@ void AtomVecMolecular::unpack_restart_init(int ilocal) void AtomVecMolecular::data_atom_post(int ilocal) { - atom->num_bond[ilocal] = 0; - atom->num_angle[ilocal] = 0; - atom->num_dihedral[ilocal] = 0; - atom->num_improper[ilocal] = 0; - atom->nspecial[ilocal][0] = 0; - atom->nspecial[ilocal][1] = 0; - atom->nspecial[ilocal][2] = 0; + num_bond[ilocal] = 0; + num_angle[ilocal] = 0; + num_dihedral[ilocal] = 0; + num_improper[ilocal] = 0; + nspecial[ilocal][0] = 0; + nspecial[ilocal][1] = 0; + nspecial[ilocal][2] = 0; } diff --git a/src/MOLECULE/atom_vec_molecular.h b/src/MOLECULE/atom_vec_molecular.h index 5b79f8b5c6..bcfa13d9d3 100644 --- a/src/MOLECULE/atom_vec_molecular.h +++ b/src/MOLECULE/atom_vec_molecular.h @@ -28,12 +28,18 @@ class AtomVecMolecular : public AtomVec { public: AtomVecMolecular(class LAMMPS *); ~AtomVecMolecular(); + + void grow_pointers(); void pack_restart_pre(int); void pack_restart_post(int); void unpack_restart_init(int); void data_atom_post(int); private: + int *num_bond,*num_angle,*num_dihedral,*num_improper; + int **bond_type,**angle_type,**dihedral_type,**improper_type; + int **nspecial; + int any_bond_negative,any_angle_negative, any_dihedral_negative,any_improper_negative; int bond_per_atom,angle_per_atom,dihedral_per_atom,improper_per_atom; diff --git a/src/MOLECULE/atom_vec_template.cpp b/src/MOLECULE/atom_vec_template.cpp index 546c19da12..97d4c865ba 100644 --- a/src/MOLECULE/atom_vec_template.cpp +++ b/src/MOLECULE/atom_vec_template.cpp @@ -96,14 +96,25 @@ void AtomVecTemplate::process_args(int narg, char **arg) } } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecTemplate::grow_pointers() +{ + molindex = atom->molindex; + molatom = atom->molatom; +} + /* ---------------------------------------------------------------------- initialize non-zero atom quantities ------------------------------------------------------------------------- */ void AtomVecTemplate::create_atom_post(int ilocal) { - atom->molindex[ilocal] = -1; - atom->molatom[ilocal] = -1; + molindex[ilocal] = -1; + molatom[ilocal] = -1; } /* ---------------------------------------------------------------------- @@ -113,11 +124,11 @@ void AtomVecTemplate::create_atom_post(int ilocal) void AtomVecTemplate::data_atom_post(int ilocal) { - int molindex = atom->molindex[ilocal]; - int molatom = atom->molatom[ilocal]; + int molindex_one = molindex[ilocal]; + int molatom_one = molatom[ilocal]; - if (molindex < 0 || molindex >= nset) + if (molindex_one < 0 || molindex_one >= nset) error->one(FLERR,"Invalid template index in Atoms section of data file"); - if (molatom < 0 || molatom >= onemols[molindex]->natoms) + if (molatom_one < 0 || molatom_one >= onemols[molindex_one]->natoms) error->one(FLERR,"Invalid template atom in Atoms section of data file"); } diff --git a/src/MOLECULE/atom_vec_template.h b/src/MOLECULE/atom_vec_template.h index 52ef5e70e1..3bf2ec6273 100644 --- a/src/MOLECULE/atom_vec_template.h +++ b/src/MOLECULE/atom_vec_template.h @@ -27,9 +27,14 @@ namespace LAMMPS_NS { class AtomVecTemplate : public AtomVec { public: AtomVecTemplate(class LAMMPS *); + + void grow_pointers(); void process_args(int, char **); void create_atom_post(int); void data_atom_post(int); + + private: + int *molindex,*molatom; }; } diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index 58ff9c54d9..46d03c35eb 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -69,18 +69,31 @@ AtomVecPeri::AtomVecPeri(LAMMPS *lmp) : AtomVec(lmp) setup_fields(); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecPeri::grow_pointers() +{ + rmass = atom->rmass; + vfrac = atom->vfrac; + s0 = atom->s0; + x0 = atom->x0; +} + /* ---------------------------------------------------------------------- initialize non-zero atom quantities ------------------------------------------------------------------------- */ void AtomVecPeri::create_atom_post(int ilocal) { - atom->vfrac[ilocal] = 1.0; - atom->rmass[ilocal] = 1.0; - atom->s0[ilocal] = DBL_MAX; - atom->x0[ilocal][0] = atom->x[ilocal][0]; - atom->x0[ilocal][1] = atom->x[ilocal][1]; - atom->x0[ilocal][2] = atom->x[ilocal][2]; + vfrac[ilocal] = 1.0; + rmass[ilocal] = 1.0; + s0[ilocal] = DBL_MAX; + x0[ilocal][0] = x[ilocal][0]; + x0[ilocal][1] = x[ilocal][1]; + x0[ilocal][2] = x[ilocal][2]; } /* ---------------------------------------------------------------------- @@ -90,12 +103,12 @@ void AtomVecPeri::create_atom_post(int ilocal) void AtomVecPeri::data_atom_post(int ilocal) { - atom->s0[ilocal] = DBL_MAX; - atom->x0[ilocal][0] = atom->x[ilocal][0]; - atom->x0[ilocal][1] = atom->x[ilocal][1]; - atom->x0[ilocal][2] = atom->x[ilocal][2]; + s0[ilocal] = DBL_MAX; + x0[ilocal][0] = x[ilocal][0]; + x0[ilocal][1] = x[ilocal][1]; + x0[ilocal][2] = x[ilocal][2]; - if (atom->rmass[ilocal] <= 0.0) + if (rmass[ilocal] <= 0.0) error->one(FLERR,"Invalid mass in Atoms section of data file"); } @@ -124,14 +137,12 @@ void AtomVecPeri::pack_property_atom(int index, double *buf, int n = 0; if (index == 0) { - double *vfrac = atom->vfrac; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = vfrac[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 1) { - double *s0 = atom->s0; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = s0[i]; else buf[n] = 0.0; diff --git a/src/PERI/atom_vec_peri.h b/src/PERI/atom_vec_peri.h index 13a62eb194..5739ea55c1 100644 --- a/src/PERI/atom_vec_peri.h +++ b/src/PERI/atom_vec_peri.h @@ -27,10 +27,17 @@ namespace LAMMPS_NS { class AtomVecPeri : public AtomVec { public: AtomVecPeri(class LAMMPS *); + + void grow_pointers(); void create_atom_post(int); void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); + + private: + double *rmass,*vfrac,*s0; + double **x0; + }; } diff --git a/src/SPIN/atom_vec_spin.cpp b/src/SPIN/atom_vec_spin.cpp index 638a3b8021..1e745fd0c1 100644 --- a/src/SPIN/atom_vec_spin.cpp +++ b/src/SPIN/atom_vec_spin.cpp @@ -61,6 +61,18 @@ AtomVecSpin::AtomVecSpin(LAMMPS *lmp) : AtomVec(lmp) setup_fields(); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecSpin::grow_pointers() +{ + sp = atom->sp; + fm = atom->fm; + fm_long = atom->fm_long; +} + /* ---------------------------------------------------------------------- clear extra forces starting at atom N nbytes = # of bytes to clear for a per-atom vector @@ -69,9 +81,9 @@ AtomVecSpin::AtomVecSpin(LAMMPS *lmp) : AtomVec(lmp) void AtomVecSpin::force_clear(int n, size_t nbytes) { - memset(&atom->f[n][0],0,3*nbytes); - memset(&atom->fm[n][0],0,3*nbytes); - memset(&atom->fm_long[n][0],0,3*nbytes); + memset(&f[n][0],0,3*nbytes); + memset(&fm[n][0],0,3*nbytes); + memset(&fm_long[n][0],0,3*nbytes); } /* ---------------------------------------------------------------------- @@ -81,9 +93,10 @@ void AtomVecSpin::force_clear(int n, size_t nbytes) void AtomVecSpin::data_atom_post(int ilocal) { - double *sp = atom->sp[ilocal]; - double inorm = 1.0/sqrt(sp[0]*sp[0] + sp[1]*sp[1] + sp[2]*sp[2]); - sp[0] *= inorm; - sp[1] *= inorm; - sp[2] *= inorm; + double *sp_one = sp[ilocal]; + double norm = + 1.0/sqrt(sp_one[0]*sp_one[0] + sp_one[1]*sp_one[1] + sp_one[2]*sp_one[2]); + sp_one[0] *= norm; + sp_one[1] *= norm; + sp_one[2] *= norm; } diff --git a/src/SPIN/atom_vec_spin.h b/src/SPIN/atom_vec_spin.h index c68f3a0419..f24791605d 100644 --- a/src/SPIN/atom_vec_spin.h +++ b/src/SPIN/atom_vec_spin.h @@ -27,8 +27,13 @@ namespace LAMMPS_NS { class AtomVecSpin : public AtomVec { public: AtomVecSpin(class LAMMPS *); + + void grow_pointers(); void force_clear(int, size_t); void data_atom_post(int); + + private: + double **sp,**fm,**fm_long; }; } diff --git a/src/USER-DPD/atom_vec_dpd.cpp b/src/USER-DPD/atom_vec_dpd.cpp index 124a081191..34efd9bc2b 100644 --- a/src/USER-DPD/atom_vec_dpd.cpp +++ b/src/USER-DPD/atom_vec_dpd.cpp @@ -52,14 +52,30 @@ AtomVecDPD::AtomVecDPD(LAMMPS *lmp) : AtomVec(lmp) setup_fields(); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecDPD::grow_pointers() +{ + rho = atom->rho; + dpdTheta = atom->dpdTheta; + uCond = atom->uCond; + uMech = atom->uMech; + uChem = atom->uChem; + uCG = atom->uCG; + uCGnew = atom->uCGnew; +} + /* ---------------------------------------------------------------------- initialize other atom quantities after AtomVec::unpack_restart() ------------------------------------------------------------------------- */ void AtomVecDPD::unpack_restart_init(int ilocal) { - atom->uCG[ilocal] = 0.0; - atom->uCGnew[ilocal] = 0.0; + uCG[ilocal] = 0.0; + uCGnew[ilocal] = 0.0; } /* ---------------------------------------------------------------------- @@ -69,14 +85,14 @@ void AtomVecDPD::unpack_restart_init(int ilocal) void AtomVecDPD::data_atom_post(int ilocal) { - atom->rho[ilocal] = 0.0; - atom->uCond[ilocal] = 0.0; - atom->uMech[ilocal] = 0.0; - atom->uChem[ilocal] = 0.0; - atom->uCG[ilocal] = 0.0; - atom->uCGnew[ilocal] = 0.0; + rho[ilocal] = 0.0; + uCond[ilocal] = 0.0; + uMech[ilocal] = 0.0; + uChem[ilocal] = 0.0; + uCG[ilocal] = 0.0; + uCGnew[ilocal] = 0.0; - if (atom->dpdTheta[ilocal] <= 0) + if (dpdTheta[ilocal] <= 0) error->one(FLERR,"Internal temperature in Atoms section of date file " "must be > zero"); } diff --git a/src/USER-DPD/atom_vec_dpd.h b/src/USER-DPD/atom_vec_dpd.h index 20c8a9a2d2..61abc658b8 100644 --- a/src/USER-DPD/atom_vec_dpd.h +++ b/src/USER-DPD/atom_vec_dpd.h @@ -27,8 +27,15 @@ namespace LAMMPS_NS { class AtomVecDPD : public AtomVec { public: AtomVecDPD(class LAMMPS *); + + void grow_pointers(); void unpack_restart_init(int); void data_atom_post(int); + +private: + double *rho,*dpdTheta; + double *uCond,*uMech,*uChem; + double *uCG,*uCGnew; }; } diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index 0ac56c48a3..0912fb0498 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -69,6 +69,19 @@ AtomVecElectron::AtomVecElectron(LAMMPS *lmp) : AtomVec(lmp) setup_fields(); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecElectron::grow_pointers() +{ + spin = atom->spin; + eradius = atom->eradius; + ervel = atom->ervel; + erforce = atom->erforce; +} + /* ---------------------------------------------------------------------- clear extra forces starting at atom N nbytes = # of bytes to clear for a per-atom vector @@ -76,7 +89,7 @@ AtomVecElectron::AtomVecElectron(LAMMPS *lmp) : AtomVec(lmp) void AtomVecElectron::force_clear(int n, size_t nbytes) { - memset(&atom->erforce[n],0,nbytes); + memset(&erforce[n],0,nbytes); } /* ---------------------------------------------------------------------- @@ -85,8 +98,8 @@ void AtomVecElectron::force_clear(int n, size_t nbytes) void AtomVecElectron::create_atom_post(int ilocal) { - atom->spin[ilocal] = 1; - atom->eradius[ilocal] = 1.0; + spin[ilocal] = 1; + eradius[ilocal] = 1.0; } /* ---------------------------------------------------------------------- @@ -96,7 +109,7 @@ void AtomVecElectron::create_atom_post(int ilocal) void AtomVecElectron::data_atom_post(int ilocal) { - atom->ervel[ilocal] = 0.0; + ervel[ilocal] = 0.0; } /* ---------------------------------------------------------------------- @@ -126,28 +139,24 @@ void AtomVecElectron::pack_property_atom(int index, double *buf, int n = 0; if (index == 0) { - int *spin = atom->spin; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = spin[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 1) { - double *eradius = atom->eradius; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = eradius[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 2) { - double *ervel = atom->ervel; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = ervel[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 3) { - double *erforce = atom->erforce; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = erforce[i]; else buf[n] = 0.0; diff --git a/src/USER-EFF/atom_vec_electron.h b/src/USER-EFF/atom_vec_electron.h index fabb03438d..9175ca52f7 100644 --- a/src/USER-EFF/atom_vec_electron.h +++ b/src/USER-EFF/atom_vec_electron.h @@ -27,11 +27,17 @@ namespace LAMMPS_NS { class AtomVecElectron : public AtomVec { public: AtomVecElectron(class LAMMPS *); + + void grow_pointers(); void force_clear(int, size_t); void create_atom_post(int); void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); + +private: + int *spin; + double *eradius,*ervel,*erforce; }; } diff --git a/src/USER-MESO/atom_vec_edpd.cpp b/src/USER-MESO/atom_vec_edpd.cpp index e06ac633ec..d08a626fad 100644 --- a/src/USER-MESO/atom_vec_edpd.cpp +++ b/src/USER-MESO/atom_vec_edpd.cpp @@ -67,6 +67,20 @@ void AtomVecEDPD::init() error->all(FLERR,"Atom style edpd requires lj units"); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecEDPD::grow_pointers() +{ + edpd_cv = atom->edpd_cv; + edpd_temp = atom->edpd_temp; + edpd_flux = atom->edpd_flux; + vest = atom->vest; + vest_temp = atom->vest_temp; +} + /* ---------------------------------------------------------------------- clear extra forces starting at atom N nbytes = # of bytes to clear for a per-atom vector @@ -74,7 +88,7 @@ void AtomVecEDPD::init() void AtomVecEDPD::force_clear(int n, size_t nbytes) { - memset(&atom->edpd_flux[n],0,nbytes); + memset(&edpd_flux[n],0,nbytes); } /* ---------------------------------------------------------------------- @@ -83,9 +97,9 @@ void AtomVecEDPD::force_clear(int n, size_t nbytes) void AtomVecEDPD::create_atom_post(int ilocal) { - atom->edpd_temp[ilocal] = 1.0; - atom->edpd_cv[ilocal]= 1.0e5; - atom->vest_temp[ilocal] = atom->edpd_temp[ilocal]; + edpd_temp[ilocal] = 1.0; + edpd_cv[ilocal]= 1.0e5; + vest_temp[ilocal] = edpd_temp[ilocal]; } /* ---------------------------------------------------------------------- @@ -95,9 +109,9 @@ void AtomVecEDPD::create_atom_post(int ilocal) void AtomVecEDPD::data_atom_post(int ilocal) { - atom->edpd_flux[ilocal] = 0.0; - atom->vest[ilocal][0] = 0.0; - atom->vest[ilocal][1] = 0.0; - atom->vest[ilocal][2] = 0.0; - atom->vest_temp[ilocal] = atom->edpd_temp[ilocal]; + edpd_flux[ilocal] = 0.0; + vest[ilocal][0] = 0.0; + vest[ilocal][1] = 0.0; + vest[ilocal][2] = 0.0; + vest_temp[ilocal] = edpd_temp[ilocal]; } diff --git a/src/USER-MESO/atom_vec_edpd.h b/src/USER-MESO/atom_vec_edpd.h index bb667ae792..a69c44a035 100644 --- a/src/USER-MESO/atom_vec_edpd.h +++ b/src/USER-MESO/atom_vec_edpd.h @@ -28,9 +28,16 @@ class AtomVecEDPD : public AtomVec { public: AtomVecEDPD(class LAMMPS *); void init(); + + void grow_pointers(); void force_clear(int, size_t); void create_atom_post(int); void data_atom_post(int); + + private: + double *edpd_cv,*edpd_temp,*edpd_flux; + double **vest; + double *vest_temp; }; } diff --git a/src/USER-MESO/atom_vec_mdpd.cpp b/src/USER-MESO/atom_vec_mdpd.cpp index b87ff14c3c..0acaaf6253 100644 --- a/src/USER-MESO/atom_vec_mdpd.cpp +++ b/src/USER-MESO/atom_vec_mdpd.cpp @@ -61,6 +61,18 @@ void AtomVecMDPD::init() error->all(FLERR,"Atom style mdpd requires lj units"); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecMDPD::grow_pointers() +{ + rho = atom->rho; + drho = atom->drho; + vest = atom->vest; +} + /* ---------------------------------------------------------------------- clear extra forces starting at atom N nbytes = # of bytes to clear for a per-atom vector @@ -68,7 +80,7 @@ void AtomVecMDPD::init() void AtomVecMDPD::force_clear(int n, size_t nbytes) { - memset(&atom->drho[n],0,nbytes); + memset(&drho[n],0,nbytes); } /* ---------------------------------------------------------------------- @@ -78,10 +90,10 @@ void AtomVecMDPD::force_clear(int n, size_t nbytes) void AtomVecMDPD::data_atom_post(int ilocal) { - atom->drho[ilocal] = 0.0; - atom->vest[ilocal][0] = 0.0; - atom->vest[ilocal][1] = 0.0; - atom->vest[ilocal][2] = 0.0; + drho[ilocal] = 0.0; + vest[ilocal][0] = 0.0; + vest[ilocal][1] = 0.0; + vest[ilocal][2] = 0.0; } /* ---------------------------------------------------------------------- @@ -109,14 +121,12 @@ void AtomVecMDPD::pack_property_atom(int index, double *buf, int n = 0; if (index == 0) { - double *rho = atom->rho; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = rho[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 1) { - double *drho = atom->drho; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = drho[i]; else buf[n] = 0.0; diff --git a/src/USER-MESO/atom_vec_mdpd.h b/src/USER-MESO/atom_vec_mdpd.h index 0eb4fff2df..55f5e9bb2d 100644 --- a/src/USER-MESO/atom_vec_mdpd.h +++ b/src/USER-MESO/atom_vec_mdpd.h @@ -28,10 +28,16 @@ class AtomVecMDPD : public AtomVec { public: AtomVecMDPD(class LAMMPS *); void init(); + + void grow_pointers(); void force_clear(int, size_t); void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); + + private: + double *rho,*drho; + double **vest; }; } diff --git a/src/USER-MESO/atom_vec_tdpd.cpp b/src/USER-MESO/atom_vec_tdpd.cpp index 5734fcf9ad..f50fe168d6 100644 --- a/src/USER-MESO/atom_vec_tdpd.cpp +++ b/src/USER-MESO/atom_vec_tdpd.cpp @@ -80,6 +80,18 @@ void AtomVecTDPD::init() error->all(FLERR,"Atom style tdpd requires lj units"); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecTDPD::grow_pointers() +{ + cc_flux = atom->cc_flux; + vest = atom->vest; +} + + /* ---------------------------------------------------------------------- clear extra forces starting at atom N nbytes = # of bytes to clear for a per-atom vector @@ -87,7 +99,7 @@ void AtomVecTDPD::init() void AtomVecTDPD::force_clear(int n, size_t nbytes) { - memset(&atom->cc_flux[n][0],0,cc_species*nbytes); + memset(&cc_flux[n][0],0,cc_species*nbytes); } /* ---------------------------------------------------------------------- diff --git a/src/USER-MESO/atom_vec_tdpd.h b/src/USER-MESO/atom_vec_tdpd.h index 7321859fb4..971696cc5c 100644 --- a/src/USER-MESO/atom_vec_tdpd.h +++ b/src/USER-MESO/atom_vec_tdpd.h @@ -29,10 +29,15 @@ class AtomVecTDPD : public AtomVec { AtomVecTDPD(class LAMMPS *); void process_args(int, char **); void init(); + + void grow_pointers(); void force_clear(int, size_t); void data_atom_post(int); protected: + double **cc_flux; + double **vest; + int cc_species; }; diff --git a/src/USER-SMD/atom_vec_smd.cpp b/src/USER-SMD/atom_vec_smd.cpp index 9f0ed04a09..4c8126d2cc 100644 --- a/src/USER-SMD/atom_vec_smd.cpp +++ b/src/USER-SMD/atom_vec_smd.cpp @@ -62,11 +62,11 @@ AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp) // except: fields_data_atom & fields_data_vel must match data file fields_grow = (char *) - "de vfrac rmass x0 radius contact_radius molecule " - "smd_data_9 e vest smd_stress " + "e de vfrac rmass x0 radius contact_radius molecule " + "smd_data_9 vest smd_stress " "eff_plastic_strain eff_plastic_strain_rate damage"; fields_copy = (char *) - "vfrac rmass x0 radius contact_radius molecule e " + "e vfrac rmass x0 radius contact_radius molecule " "eff_plastic_strain eff_plastic_strain_rate vest " "smd_data_9 smd_stress damage"; fields_comm = (char *) "radius vfrac vest e"; @@ -101,6 +101,29 @@ AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp) setup_fields(); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecSMD::grow_pointers() +{ + e = atom->e; + de = atom->de; + vfrac = atom->vfrac; + rmass = atom->rmass; + x0 = atom->x0; + radius = atom->radius; + contact_radius = atom->contact_radius; + molecule = atom->molecule; + smd_data_9 = atom->smd_data_9; + vest = atom->vest; + smd_stress = atom->smd_stress; + eff_plastic_strain = atom->eff_plastic_strain; + eff_plastic_strain_rate = atom->eff_plastic_strain_rate; + damage = atom->damage; +} + /* ---------------------------------------------------------------------- clear extra forces starting at atom N nbytes = # of bytes to clear for a per-atom vector @@ -109,8 +132,8 @@ AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp) void AtomVecSMD::force_clear(int n, size_t nbytes) { - memset(&atom->de[n],0,nbytes); - memset(&atom->f[n][0],0,3*nbytes); + memset(&de[n],0,nbytes); + memset(&f[n][0],0,3*nbytes); } /* ---------------------------------------------------------------------- @@ -119,19 +142,19 @@ void AtomVecSMD::force_clear(int n, size_t nbytes) void AtomVecSMD::create_atom_post(int ilocal) { - atom->x0[ilocal][0] = atom->x[ilocal][0]; - atom->x0[ilocal][1] = atom->x[ilocal][1]; - atom->x0[ilocal][2] = atom->x[ilocal][2]; + x0[ilocal][0] = x[ilocal][0]; + x0[ilocal][1] = x[ilocal][1]; + x0[ilocal][2] = x[ilocal][2]; - atom->vfrac[ilocal] = 1.0; - atom->rmass[ilocal] = 1.0; - atom->radius[ilocal] = 0.5; - atom->contact_radius[ilocal] = 0.5; - atom->molecule[ilocal] = 1; + vfrac[ilocal] = 1.0; + rmass[ilocal] = 1.0; + radius[ilocal] = 0.5; + contact_radius[ilocal] = 0.5; + molecule[ilocal] = 1; - atom->smd_data_9[ilocal][0] = 1.0; // xx - atom->smd_data_9[ilocal][4] = 1.0; // yy - atom->smd_data_9[ilocal][8] = 1.0; // zz + smd_data_9[ilocal][0] = 1.0; // xx + smd_data_9[ilocal][4] = 1.0; // yy + smd_data_9[ilocal][8] = 1.0; // zz } /* ---------------------------------------------------------------------- @@ -141,32 +164,27 @@ void AtomVecSMD::create_atom_post(int ilocal) void AtomVecSMD::data_atom_post(int ilocal) { - atom->e[ilocal] = 0.0; - atom->x0[ilocal][0] = atom->x[ilocal][0]; - atom->x0[ilocal][1] = atom->x[ilocal][1]; - atom->x0[ilocal][2] = atom->x[ilocal][2]; + e[ilocal] = 0.0; + x0[ilocal][0] = x[ilocal][0]; + x0[ilocal][1] = x[ilocal][1]; + x0[ilocal][2] = x[ilocal][2]; - atom->vest[ilocal][0] = 0.0; - atom->vest[ilocal][1] = 0.0; - atom->vest[ilocal][2] = 0.0; + vest[ilocal][0] = 0.0; + vest[ilocal][1] = 0.0; + vest[ilocal][2] = 0.0; - atom->damage[ilocal] = 0.0; + damage[ilocal] = 0.0; - atom->eff_plastic_strain[ilocal] = 0.0; - atom->eff_plastic_strain_rate[ilocal] = 0.0; + eff_plastic_strain[ilocal] = 0.0; + eff_plastic_strain_rate[ilocal] = 0.0; for (int k = 0; k < NMAT_FULL; k++) - atom->smd_data_9[ilocal][k] = 0.0; + smd_data_9[ilocal][k] = 0.0; for (int k = 0; k < NMAT_SYMM; k++) - atom->smd_stress[ilocal][k] = 0.0; + smd_stress[ilocal][k] = 0.0; - atom->smd_data_9[ilocal][0] = 1.0; // xx - atom->smd_data_9[ilocal][4] = 1.0; // yy - atom->smd_data_9[ilocal][8] = 1.0; // zz + smd_data_9[ilocal][0] = 1.0; // xx + smd_data_9[ilocal][4] = 1.0; // yy + smd_data_9[ilocal][8] = 1.0; // zz } - - - - - diff --git a/src/USER-SMD/atom_vec_smd.h b/src/USER-SMD/atom_vec_smd.h index 539f209ca7..00709aeada 100644 --- a/src/USER-SMD/atom_vec_smd.h +++ b/src/USER-SMD/atom_vec_smd.h @@ -38,9 +38,17 @@ namespace LAMMPS_NS { class AtomVecSMD : public AtomVec { public: AtomVecSMD(class LAMMPS *); + + void grow_pointers(); void force_clear(int, size_t); void create_atom_post(int); void data_atom_post(int); + + private: + int *molecule; + double *e,*de,*vfrac,*rmass,*radius,*contact_radius; + double *eff_plastic_strain,*eff_plastic_strain_rate,*damage; + double **x0,**smd_data_9,**smd_stress,**vest; }; } diff --git a/src/USER-SPH/atom_vec_meso.cpp b/src/USER-SPH/atom_vec_meso.cpp index a80ab91d2e..fdddd15f27 100644 --- a/src/USER-SPH/atom_vec_meso.cpp +++ b/src/USER-SPH/atom_vec_meso.cpp @@ -52,6 +52,21 @@ AtomVecMeso::AtomVecMeso(LAMMPS *lmp) : AtomVec(lmp) setup_fields(); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecMeso::grow_pointers() +{ + rho = atom->rho; + drho = atom->drho; + e = atom->e; + de = atom->de; + cv = atom->cv; + vest = atom->vest; +} + /* ---------------------------------------------------------------------- clear extra forces starting at atom N nbytes = # of bytes to clear for a per-atom vector @@ -59,8 +74,8 @@ AtomVecMeso::AtomVecMeso(LAMMPS *lmp) : AtomVec(lmp) void AtomVecMeso::force_clear(int n, size_t nbytes) { - memset(&atom->de[n],0,nbytes); - memset(&atom->drho[n],0,nbytes); + memset(&de[n],0,nbytes); + memset(&drho[n],0,nbytes); } /* ---------------------------------------------------------------------- @@ -69,7 +84,7 @@ void AtomVecMeso::force_clear(int n, size_t nbytes) void AtomVecMeso::create_atom_post(int ilocal) { - atom->cv[ilocal] = 1.0; + cv[ilocal] = 1.0; } /* ---------------------------------------------------------------------- @@ -79,11 +94,11 @@ void AtomVecMeso::create_atom_post(int ilocal) void AtomVecMeso::data_atom_post(int ilocal) { - atom->vest[ilocal][0] = 0.0; - atom->vest[ilocal][1] = 0.0; - atom->vest[ilocal][2] = 0.0; - atom->de[ilocal] = 0.0; - atom->drho[ilocal] = 0.0; + vest[ilocal][0] = 0.0; + vest[ilocal][1] = 0.0; + vest[ilocal][2] = 0.0; + de[ilocal] = 0.0; + drho[ilocal] = 0.0; } /* ---------------------------------------------------------------------- @@ -114,35 +129,30 @@ void AtomVecMeso::pack_property_atom(int index, double *buf, int n = 0; if (index == 0) { - double *rho = atom->rho; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = rho[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 1) { - double *drho = atom->drho; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = drho[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 2) { - double *e = atom->e; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = e[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 3) { - double *de = atom->de; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = de[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 4) { - double *cv = atom->cv; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = cv[i]; else buf[n] = 0.0; diff --git a/src/USER-SPH/atom_vec_meso.h b/src/USER-SPH/atom_vec_meso.h index c8a1090474..bd84c34fbc 100644 --- a/src/USER-SPH/atom_vec_meso.h +++ b/src/USER-SPH/atom_vec_meso.h @@ -27,11 +27,17 @@ namespace LAMMPS_NS { class AtomVecMeso : public AtomVec { public: AtomVecMeso(class LAMMPS *); + + void grow_pointers(); void force_clear(int, size_t); void create_atom_post(int); void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); + + private: + double *rho,*drho,*e,*de,*cv; + double **vest; }; } diff --git a/src/atom.cpp b/src/atom.cpp index 0fbee8f583..353ed510a4 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -175,42 +175,8 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) iname = dname = NULL; // initialize atom style and array existence flags - // customize by adding new flag - sphere_flag = peri_flag = electron_flag = 0; - wavepacket_flag = sph_flag = 0; - - molecule_flag = 0; - q_flag = mu_flag = 0; - omega_flag = torque_flag = angmom_flag = 0; - radius_flag = rmass_flag = 0; - ellipsoid_flag = line_flag = tri_flag = body_flag = 0; - - // magnetic flags - - sp_flag = 0; - - vfrac_flag = 0; - spin_flag = eradius_flag = ervel_flag = erforce_flag = ervelforce_flag = 0; - cs_flag = csforce_flag = vforce_flag = etag_flag = 0; - - rho_flag = e_flag = cv_flag = vest_flag = 0; - dpd_flag = edpd_flag = tdpd_flag = 0; - - // USER-SMD - - smd_flag = 0; - contact_radius_flag = 0; - smd_data_9_flag = 0; - smd_stress_flag = 0; - x0_flag = 0; - eff_plastic_strain_flag = 0; - eff_plastic_strain_rate_flag = 0; - damage_flag = 0; - - // Peridynamic scale factor - - pdscale = 1.0; + set_atomflag_defaults(); // initialize peratom data structure @@ -668,6 +634,32 @@ void Atom::add_peratom_vary(const char *name, void *address, nperatom++; } +/* ---------------------------------------------------------------------- + add info for a single per-atom array to PerAtom data struct + customize by adding new flag, identical list as atom.h 2nd customization +------------------------------------------------------------------------- */ + +void Atom::set_atomflag_defaults() +{ + sphere_flag = ellipsoid_flag = line_flag = tri_flag = body_flag = 0; + peri_flag = electron_flag = 0; + wavepacket_flag = sph_flag = 0; + molecule_flag = molindex_flag = molatom_flag = 0; + q_flag = mu_flag = 0; + rmass_flag = radius_flag = omega_flag = torque_flag = angmom_flag = 0; + vfrac_flag = spin_flag = eradius_flag = ervel_flag = erforce_flag = 0; + cs_flag = csforce_flag = vforce_flag = ervelforce_flag = etag_flag = 0; + rho_flag = e_flag = cv_flag = vest_flag = 0; + dpd_flag = edpd_flag = tdpd_flag = 0; + sp_flag = 0; + x0_flag = 0; + smd_flag = damage_flag = 0; + contact_radius_flag = smd_data_9_flag = smd_stress_flag = 0; + eff_plastic_strain_flag = eff_plastic_strain_rate_flag = 0; + + pdscale = 1.0; +} + /* ---------------------------------------------------------------------- create an AtomVec style called from lammps.cpp, input script, restart file, replicate @@ -682,26 +674,8 @@ void Atom::create_avec(const char *style, int narg, char **arg, int trysuffix) // unset atom style and array existence flags // may have been set by old avec - // customize by adding new flag - sphere_flag = peri_flag = electron_flag = 0; - wavepacket_flag = sph_flag = 0; - - molecule_flag = 0; - q_flag = mu_flag = 0; - omega_flag = torque_flag = angmom_flag = 0; - radius_flag = rmass_flag = 0; - ellipsoid_flag = line_flag = tri_flag = body_flag = 0; - - // magnetic flags - - sp_flag = 0; - - vfrac_flag = 0; - spin_flag = eradius_flag = ervel_flag = erforce_flag = ervelforce_flag = 0; - cs_flag = csforce_flag = vforce_flag = etag_flag = 0; - - rho_flag = e_flag = cv_flag = vest_flag = 0; + set_atomflag_defaults(); // create instance of AtomVec // use grow() to initialize atom-based arrays to length 1 @@ -785,6 +759,7 @@ AtomVec *Atom::avec_creator(LAMMPS *lmp) return new T(lmp); } + /* ---------------------------------------------------------------------- */ void Atom::init() diff --git a/src/atom.h b/src/atom.h index bc1eb1a7d7..6c7110b5be 100644 --- a/src/atom.h +++ b/src/atom.h @@ -143,7 +143,8 @@ class Atom : protected Pointers { double **vest; // -------------------------------------------------------------------- - // 1st customization section: customize by adding new flags + // 2nd customization section: customize by adding new flags + // identical list as Atom::set_atomflag_defaults() // most are existence flags for per-atom vectors and arrays // 1 if variable is used, 0 if not @@ -165,14 +166,10 @@ class Atom : protected Pointers { // USER-SMD package - int smd_flag; - int contact_radius_flag; - int smd_data_9_flag; - int smd_stress_flag; int x0_flag; - int eff_plastic_strain_flag; - int eff_plastic_strain_rate_flag; - int damage_flag; + int smd_flag,damage_flag; + int contact_radius_flag,smd_data_9_flag,smd_stress_flag; + int eff_plastic_strain_flag,eff_plastic_strain_rate_flag; // Peridynamics scale factor, used by dump cfg @@ -264,6 +261,7 @@ class Atom : protected Pointers { void *, int collength=0); void create_avec(const char *, int, char **, int); virtual class AtomVec *new_avec(const char *, int, int &); + void init(); void setup(); @@ -380,6 +378,7 @@ class Atom : protected Pointers { double bininvx,bininvy,bininvz; // inverse actual bin sizes double bboxlo[3],bboxhi[3]; // bounding box of my sub-domain + void set_atomflag_defaults(); void setup_sort_bins(); int next_prime(int); diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index e31c235760..fac4cc2f6e 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -185,7 +185,7 @@ void AtomVec::grow(int n) atom->nmax = nmax; if (nmax < 0 || nmax > MAXSMALLINT) error->one(FLERR,"Per-processor system is too big"); - + tag = memory->grow(atom->tag,nmax,"atom:tag"); type = memory->grow(atom->type,nmax,"atom:type"); mask = memory->grow(atom->mask,nmax,"atom:mask"); @@ -230,6 +230,8 @@ void AtomVec::grow(int n) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); + + grow_pointers(); } /* ---------------------------------------------------------------------- @@ -2387,7 +2389,6 @@ void AtomVec::setup_fields() // set style-specific sizes // NOTE: check for others vars in atom_vec.cpp/h ?? - // NOTE: need to set maxexchange, e.g for style hybrid? comm_x_only = 1; if (ncomm) comm_x_only = 0; @@ -2435,7 +2436,6 @@ void AtomVec::setup_fields() else size_data_atom += cols; } - size_data_vel = 0; for (n = 0; n < ndata_vel; n++) { cols = mdata_vel.cols[n]; diff --git a/src/atom_vec.h b/src/atom_vec.h index 5911c8414b..94517f80ad 100644 --- a/src/atom_vec.h +++ b/src/atom_vec.h @@ -74,7 +74,8 @@ class AtomVec : protected Pointers { virtual void force_clear(int, size_t) {} - virtual void grow(int); + void grow(int); + virtual void grow_pointers() {} void copy(int, int, int); virtual void copy_bonus(int, int, int) {} diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index a04f23a47c..0f3557596f 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -100,6 +100,7 @@ AtomVecBody::~AtomVecBody() void AtomVecBody::process_args(int narg, char **arg) { // suppress unused parameter warning dependent on style_body.h + (void)(arg); if (narg < 1) error->all(FLERR,"Invalid atom_style body command"); @@ -120,11 +121,12 @@ void AtomVecBody::process_args(int narg, char **arg) icp = bptr->icp; dcp = bptr->dcp; - // max size of forward/border comm + // max size of forward/border and exchange comm // bptr values = max number of additional ivalues/dvalues from Body class size_forward_bonus += bptr->size_forward; size_border_bonus += bptr->size_border; + maxexchange = bptr->maxexchange; setup_fields(); } @@ -138,7 +140,11 @@ void AtomVecBody::process_args(int narg, char **arg) void AtomVecBody::grow(int n) { AtomVec::grow(n); + body = atom->body; + rmass = atom->rmass; + radius = atom->radius; + angmom = atom->angmom; } /* ---------------------------------------------------------------------- @@ -186,7 +192,7 @@ void AtomVecBody::copy_bonus(int i, int j, int delflag) void AtomVecBody::copy_bonus_all(int i, int j) { - atom->body[bonus[i].ilocal] = j; + body[bonus[i].ilocal] = j; memcpy(&bonus[j],&bonus[i],sizeof(Bonus)); } @@ -503,9 +509,9 @@ int AtomVecBody::unpack_restart_bonus(int ilocal, double *buf) void AtomVecBody::create_atom_post(int ilocal) { - atom->radius[ilocal] = 0.5; - atom->rmass[ilocal] = 1.0; - atom->body[ilocal] = -1; + radius[ilocal] = 0.5; + rmass[ilocal] = 1.0; + body[ilocal] = -1; } /* ---------------------------------------------------------------------- @@ -515,19 +521,19 @@ void AtomVecBody::create_atom_post(int ilocal) void AtomVecBody::data_atom_post(int ilocal) { - body_flag = atom->body[ilocal]; + body_flag = body[ilocal]; if (body_flag == 0) body_flag = -1; else if (body_flag == 1) body_flag = 0; else error->one(FLERR,"Invalid body flag in Atoms section of data file"); - atom->body[ilocal] = body_flag; + body[ilocal] = body_flag; - if (atom->rmass[ilocal] <= 0.0) + if (rmass[ilocal] <= 0.0) error->one(FLERR,"Invalid density in Atoms section of data file"); - atom->radius[ilocal] = 0.5; - atom->angmom[ilocal][0] = 0.0; - atom->angmom[ilocal][1] = 0.0; - atom->angmom[ilocal][2] = 0.0; + radius[ilocal] = 0.5; + angmom[ilocal][0] = 0.0; + angmom[ilocal][1] = 0.0; + angmom[ilocal][2] = 0.0; } /* ---------------------------------------------------------------------- @@ -537,12 +543,12 @@ void AtomVecBody::data_atom_post(int ilocal) void AtomVecBody::data_body(int m, int ninteger, int ndouble, int *ivalues, double *dvalues) { - if (atom->body[m]) + if (body[m]) error->one(FLERR,"Assigning body parameters to non-body atom"); if (nlocal_bonus == nmax_bonus) grow_bonus(); bonus[nlocal_bonus].ilocal = m; bptr->data_body(nlocal_bonus,ninteger,ndouble,ivalues,dvalues); - atom->body[m] = nlocal_bonus++; + body[m] = nlocal_bonus++; } /* ---------------------------------------------------------------------- @@ -570,10 +576,10 @@ bigint AtomVecBody::memory_usage_bonus() void AtomVecBody::pack_data_pre(int ilocal) { - body_flag = atom->body[ilocal]; + body_flag = body[ilocal]; - if (body_flag < 0) atom->body[ilocal] = 0; - else atom->body[ilocal] = 1; + if (body_flag < 0) body[ilocal] = 0; + else body[ilocal] = 1; } /* ---------------------------------------------------------------------- @@ -582,7 +588,7 @@ void AtomVecBody::pack_data_pre(int ilocal) void AtomVecBody::pack_data_post(int ilocal) { - atom->body[ilocal] = body_flag; + body[ilocal] = body_flag; } /* ---------------------------------------------------------------------- @@ -602,8 +608,8 @@ double AtomVecBody::radius_body(int ninteger, int ndouble, void AtomVecBody::set_quat(int m, double *quat_external) { - if (atom->body[m] < 0) error->one(FLERR,"Assigning quat to non-body atom"); - double *quat = bonus[atom->body[m]].quat; + if (body[m] < 0) error->one(FLERR,"Assigning quat to non-body atom"); + double *quat = bonus[body[m]].quat; quat[0] = quat_external[0]; quat[1] = quat_external[1]; quat[2] = quat_external[2]; quat[3] = quat_external[3]; } @@ -616,15 +622,15 @@ void AtomVecBody::set_quat(int m, double *quat_external) void AtomVecBody::check(int flag) { for (int i = 0; i < atom->nlocal; i++) { - if (atom->body[i] >= 0 && atom->body[i] >= nlocal_bonus) { + if (body[i] >= 0 && body[i] >= nlocal_bonus) { printf("Proc %d, step %ld, flag %d\n",comm->me,update->ntimestep,flag); errorx->one(FLERR,"BAD AAA"); } } for (int i = atom->nlocal; i < atom->nlocal+atom->nghost; i++) { - if (atom->body[i] >= 0 && - (atom->body[i] < nlocal_bonus || - atom->body[i] >= nlocal_bonus+nghost_bonus)) { + if (body[i] >= 0 && + (body[i] < nlocal_bonus || + body[i] >= nlocal_bonus+nghost_bonus)) { printf("Proc %d, step %ld, flag %d\n",comm->me,update->ntimestep,flag); errorx->one(FLERR,"BAD BBB"); } @@ -636,7 +642,7 @@ void AtomVecBody::check(int flag) } } for (int i = 0; i < nlocal_bonus; i++) { - if (atom->body[bonus[i].ilocal] != i) { + if (body[bonus[i].ilocal] != i) { printf("Proc %d, step %ld, flag %d\n",comm->me,update->ntimestep,flag); errorx->one(FLERR,"BAD DDD"); } @@ -649,7 +655,7 @@ void AtomVecBody::check(int flag) } } for (int i = nlocal_bonus; i < nlocal_bonus+nghost_bonus; i++) { - if (atom->body[bonus[i].ilocal] != i) { + if (body[bonus[i].ilocal] != i) { printf("Proc %d, step %ld, flag %d\n",comm->me,update->ntimestep,flag); errorx->one(FLERR,"BAD FFF"); } diff --git a/src/atom_vec_body.h b/src/atom_vec_body.h index 3f32c8223c..adfc7768eb 100644 --- a/src/atom_vec_body.h +++ b/src/atom_vec_body.h @@ -71,12 +71,14 @@ class AtomVecBody : public AtomVec { int nlocal_bonus; private: + int *body; + double *rmass,*radius; + double **angmom; + int nghost_bonus,nmax_bonus; int intdoubleratio; // sizeof(double) / sizeof(int) int body_flag; - int *body; - MyPoolChunk *icp; MyPoolChunk *dcp; diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index e8ab6d5613..2537fe2538 100644 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -75,6 +75,17 @@ AtomVecEllipsoid::~AtomVecEllipsoid() memory->sfree(bonus); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecEllipsoid::grow_pointers() +{ + ellipsoid = atom->ellipsoid; + rmass = atom->rmass; +} + /* ---------------------------------------------------------------------- grow bonus data structure ------------------------------------------------------------------------- */ @@ -95,8 +106,6 @@ void AtomVecEllipsoid::grow_bonus() void AtomVecEllipsoid::copy_bonus(int i, int j, int delflag) { - int *ellipsoid = atom->ellipsoid; - // if deleting atom J via delflag and J has bonus data, then delete it if (delflag && ellipsoid[j] >= 0) { @@ -118,7 +127,7 @@ void AtomVecEllipsoid::copy_bonus(int i, int j, int delflag) void AtomVecEllipsoid::copy_bonus_all(int i, int j) { - atom->ellipsoid[bonus[i].ilocal] = j; + ellipsoid[bonus[i].ilocal] = j; memcpy(&bonus[j],&bonus[i],sizeof(Bonus)); } @@ -143,8 +152,6 @@ int AtomVecEllipsoid::pack_comm_bonus(int n, int *list, double *buf) int i,j,m; double *quat; - int *ellipsoid = atom->ellipsoid; - m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -167,8 +174,6 @@ void AtomVecEllipsoid::unpack_comm_bonus(int n, int first, double *buf) int i,m,last; double *quat; - int *ellipsoid = atom->ellipsoid; - m = 0; last = first + n; for (i = first; i < last; i++) { @@ -190,8 +195,6 @@ int AtomVecEllipsoid::pack_border_bonus(int n, int *list, double *buf) double dx,dy,dz; double *shape,*quat; - int *ellipsoid = atom->ellipsoid; - m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -220,8 +223,6 @@ int AtomVecEllipsoid::unpack_border_bonus(int n, int first, double *buf) int i,j,m,last; double *shape,*quat; - int *ellipsoid = atom->ellipsoid; - m = 0; last = first + n; for (i = first; i < last; i++) { @@ -257,8 +258,6 @@ int AtomVecEllipsoid::pack_exchange_bonus(int i, double *buf) { int m = 0; - int *ellipsoid = atom->ellipsoid; - if (ellipsoid[i] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -283,8 +282,6 @@ int AtomVecEllipsoid::unpack_exchange_bonus(int ilocal, double *buf) { int m = 0; - int *ellipsoid = atom->ellipsoid; - ellipsoid[ilocal] = (int) ubuf(buf[m++]).i; if (ellipsoid[ilocal] == 0) ellipsoid[ilocal] = -1; else { @@ -314,8 +311,6 @@ int AtomVecEllipsoid::size_restart_bonus() { int i; - int *ellipsoid = atom->ellipsoid; - int n = 0; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { @@ -336,8 +331,6 @@ int AtomVecEllipsoid::pack_restart_bonus(int i, double *buf) { int m = 0; - int *ellipsoid = atom->ellipsoid; - if (ellipsoid[i] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -362,8 +355,6 @@ int AtomVecEllipsoid::unpack_restart_bonus(int ilocal, double *buf) { int m = 0; - int *ellipsoid = atom->ellipsoid; - ellipsoid[ilocal] = (int) ubuf(buf[m++]).i; if (ellipsoid[ilocal] == 0) ellipsoid[ilocal] = -1; else { @@ -390,8 +381,6 @@ int AtomVecEllipsoid::unpack_restart_bonus(int ilocal, double *buf) void AtomVecEllipsoid::data_atom_bonus(int m, char **values) { - int *ellipsoid = atom->ellipsoid; - if (ellipsoid[m]) error->one(FLERR,"Assigning ellipsoid parameters to non-ellipsoid atom"); @@ -414,7 +403,7 @@ void AtomVecEllipsoid::data_atom_bonus(int m, char **values) // reset ellipsoid mass // previously stored density in rmass - atom->rmass[m] *= 4.0*MY_PI/3.0 * shape[0]*shape[1]*shape[2]; + rmass[m] *= 4.0*MY_PI/3.0 * shape[0]*shape[1]*shape[2]; bonus[nlocal_bonus].ilocal = m; ellipsoid[m] = nlocal_bonus++; @@ -437,8 +426,8 @@ bigint AtomVecEllipsoid::memory_usage_bonus() void AtomVecEllipsoid::create_atom_post(int ilocal) { - atom->rmass[ilocal] = 1.0; - atom->ellipsoid[ilocal] = -1; + rmass[ilocal] = 1.0; + ellipsoid[ilocal] = -1; } /* ---------------------------------------------------------------------- @@ -448,13 +437,13 @@ void AtomVecEllipsoid::create_atom_post(int ilocal) void AtomVecEllipsoid::data_atom_post(int ilocal) { - ellipsoid_flag = atom->ellipsoid[ilocal]; + ellipsoid_flag = ellipsoid[ilocal]; if (ellipsoid_flag == 0) ellipsoid_flag = -1; else if (ellipsoid_flag == 1) ellipsoid_flag = 0; else error->one(FLERR,"Invalid ellipsoid flag in Atoms section of data file"); - atom->ellipsoid[ilocal] = ellipsoid_flag; + ellipsoid[ilocal] = ellipsoid_flag; - if (atom->rmass[ilocal] <= 0.0) + if (rmass[ilocal] <= 0.0) error->one(FLERR,"Invalid density in Atoms section of data file"); } @@ -467,14 +456,14 @@ void AtomVecEllipsoid::pack_data_pre(int ilocal) double *shape; ellipsoid_flag = atom->ellipsoid[ilocal]; - rmass = atom->rmass[ilocal]; + rmass_one = atom->rmass[ilocal]; - if (ellipsoid_flag < 0) atom->ellipsoid[ilocal] = 0; - else atom->ellipsoid[ilocal] = 1; + if (ellipsoid_flag < 0) ellipsoid[ilocal] = 0; + else ellipsoid[ilocal] = 1; if (ellipsoid_flag >= 0) { shape = bonus[ellipsoid_flag].shape; - atom->rmass[ilocal] /= 4.0*MY_PI/3.0 * shape[0]*shape[1]*shape[2]; + rmass[ilocal] /= 4.0*MY_PI/3.0 * shape[0]*shape[1]*shape[2]; } } @@ -484,8 +473,8 @@ void AtomVecEllipsoid::pack_data_pre(int ilocal) void AtomVecEllipsoid::pack_data_post(int ilocal) { - atom->ellipsoid[ilocal] = ellipsoid_flag; - atom->rmass[ilocal] = rmass; + ellipsoid[ilocal] = ellipsoid_flag; + rmass[ilocal] = rmass_one; } /* ---------------------------------------------------------------------- @@ -497,8 +486,6 @@ void AtomVecEllipsoid::pack_data_post(int ilocal) void AtomVecEllipsoid:: set_shape(int i, double shapex, double shapey, double shapez) { - int *ellipsoid = atom->ellipsoid; - if (ellipsoid[i] < 0) { if (shapex == 0.0 && shapey == 0.0 && shapez == 0.0) return; if (nlocal_bonus == nmax_bonus) grow_bonus(); diff --git a/src/atom_vec_ellipsoid.h b/src/atom_vec_ellipsoid.h index 79d17a2206..bbf3922bb3 100644 --- a/src/atom_vec_ellipsoid.h +++ b/src/atom_vec_ellipsoid.h @@ -36,6 +36,7 @@ class AtomVecEllipsoid : public AtomVec { AtomVecEllipsoid(class LAMMPS *); ~AtomVecEllipsoid(); + void grow_pointers(); void copy_bonus(int, int, int); void clear_bonus(); int pack_comm_bonus(int, int *, double *); @@ -62,9 +63,12 @@ class AtomVecEllipsoid : public AtomVec { int nlocal_bonus; private: + int *ellipsoid; + double *rmass; + int nghost_bonus,nmax_bonus; int ellipsoid_flag; - double rmass; + double rmass_one; void grow_bonus(); void copy_bonus_all(int, int); diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index 9a79f66972..d1166e5a8e 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -36,7 +36,6 @@ AtomVecHybrid::AtomVecHybrid(LAMMPS *lmp) : AtomVec(lmp) // NOTE: set bonus_flag if any substyle does // set nstyles_bonus, styles_bonus - // NOTE: call method in each sub-style to set q_flag ?? // these strings will be concatenated from sub-style strings // fields_data_atom & fields_data_vel start with fields common to all styles @@ -124,8 +123,8 @@ void AtomVecHybrid::process_args(int narg, char **arg) for (int k = 0; k < nstyles; k++) { if ((styles[k]->molecular == 1 && molecular == 2) || (styles[k]->molecular == 2 && molecular == 1)) - error->all(FLERR,"Cannot mix molecular and molecule template " - "atom styles"); + error->all(FLERR, + "Cannot mix molecular and molecule template atom styles"); molecular = MAX(molecular,styles[k]->molecular); bonds_allow = MAX(bonds_allow,styles[k]->bonds_allow); @@ -135,11 +134,9 @@ void AtomVecHybrid::process_args(int narg, char **arg) mass_type = MAX(mass_type,styles[k]->mass_type); dipole_type = MAX(dipole_type,styles[k]->dipole_type); forceclearflag = MAX(forceclearflag,styles[k]->forceclearflag); + maxexchange += styles[k]->maxexchange; if (styles[k]->molecular == 2) onemols = styles[k]->onemols; - - // NOTE: need to sum this one? - maxexchange += styles[k]->maxexchange; } // issue a warning if both per-type mass and per-atom rmass are defined @@ -237,6 +234,13 @@ void AtomVecHybrid::init() /* ---------------------------------------------------------------------- */ +void AtomVecHybrid::grow_pointers() +{ + for (int k = 0; k < nstyles; k++) styles[k]->grow_pointers(); +} + +/* ---------------------------------------------------------------------- */ + void AtomVecHybrid::force_clear(int n, size_t nbytes) { for (int k = 0; k < nstyles; k++) diff --git a/src/atom_vec_hybrid.h b/src/atom_vec_hybrid.h index 7d838b7a7f..7d8e45c579 100644 --- a/src/atom_vec_hybrid.h +++ b/src/atom_vec_hybrid.h @@ -34,8 +34,9 @@ class AtomVecHybrid : public AtomVec { ~AtomVecHybrid(); void process_args(int, char **); void init(); - void force_clear(int, size_t); + void grow_pointers(); + void force_clear(int, size_t); void copy_bonus(int, int, int); void clear_bonus() {} int pack_comm_bonus(int, int *, double *); diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index 7ab697b349..e178d1f78a 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -86,6 +86,19 @@ void AtomVecLine::init() error->all(FLERR,"Atom_style line can only be used in 2d simulations"); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecLine::grow_pointers() +{ + line = atom->line; + radius = atom->radius; + rmass = atom->rmass; + omega = atom->omega; +} + /* ---------------------------------------------------------------------- grow bonus data structure ------------------------------------------------------------------------- */ @@ -106,8 +119,6 @@ void AtomVecLine::grow_bonus() void AtomVecLine::copy_bonus(int i, int j, int delflag) { - int *line = atom->line; - // if deleting atom J via delflag and J has bonus data, then delete it if (delflag && line[j] >= 0) { @@ -129,7 +140,7 @@ void AtomVecLine::copy_bonus(int i, int j, int delflag) void AtomVecLine::copy_bonus_all(int i, int j) { - atom->line[bonus[i].ilocal] = j; + line[bonus[i].ilocal] = j; memcpy(&bonus[j],&bonus[i],sizeof(Bonus)); } @@ -153,8 +164,6 @@ int AtomVecLine::pack_comm_bonus(int n, int *list, double *buf) { int i,j,m; - int *line = atom->line; - m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -170,8 +179,6 @@ void AtomVecLine::unpack_comm_bonus(int n, int first, double *buf) { int i,m,last; - int *line = atom->line; - m = 0; last = first + n; for (i = first; i < last; i++) { @@ -185,8 +192,6 @@ int AtomVecLine::pack_border_bonus(int n, int *list, double *buf) { int i,j,m; - int *line = atom->line; - m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -207,8 +212,6 @@ int AtomVecLine::unpack_border_bonus(int n, int first, double *buf) { int i,j,m,last; - int *line = atom->line; - m = 0; last = first + n; for (i = first; i < last; i++) { @@ -237,8 +240,6 @@ int AtomVecLine::pack_exchange_bonus(int i, double *buf) { int m = 0; - int *line = atom->line; - if (line[i] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -256,8 +257,6 @@ int AtomVecLine::unpack_exchange_bonus(int ilocal, double *buf) { int m = 0; - int *line = atom->line; - line[ilocal] = (int) ubuf(buf[m++]).i; if (line[ilocal] == 0) line[ilocal] = -1; else { @@ -280,8 +279,6 @@ int AtomVecLine::size_restart_bonus() { int i; - int *line = atom->line; - int n = 0; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { @@ -302,8 +299,6 @@ int AtomVecLine::pack_restart_bonus(int i, double *buf) { int m = 0; - int *line = atom->line; - if (line[i] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -323,8 +318,6 @@ int AtomVecLine::unpack_restart_bonus(int ilocal, double *buf) { int m = 0; - int *line = atom->line; - line[ilocal] = (int) ubuf(buf[m++]).i; if (line[ilocal] == 0) line[ilocal] = -1; else { @@ -344,8 +337,6 @@ int AtomVecLine::unpack_restart_bonus(int ilocal, double *buf) void AtomVecLine::data_atom_bonus(int m, char **values) { - int *line = atom->line; - if (line[m]) error->one(FLERR,"Assigning line parameters to non-line atom"); if (nlocal_bonus == nmax_bonus) grow_bonus(); @@ -377,8 +368,8 @@ void AtomVecLine::data_atom_bonus(int m, char **values) // reset line radius and mass // rmass currently holds density - atom->radius[m] = 0.5 * length; - atom->rmass[m] *= length; + radius[m] = 0.5 * length; + rmass[m] *= length; bonus[nlocal_bonus].ilocal = m; line[m] = nlocal_bonus++; @@ -402,10 +393,10 @@ bigint AtomVecLine::memory_usage_bonus() void AtomVecLine::create_atom_post(int ilocal) { - double radius = 0.5; - atom->radius[ilocal] = radius; - atom->rmass[ilocal] = 4.0*MY_PI/3.0 * radius*radius*radius; - atom->line[ilocal] = -1; + double radius_one = 0.5; + radius[ilocal] = radius_one; + rmass[ilocal] = 4.0*MY_PI/3.0 * radius_one*radius_one*radius_one; + line[ilocal] = -1; } /* ---------------------------------------------------------------------- @@ -415,24 +406,24 @@ void AtomVecLine::create_atom_post(int ilocal) void AtomVecLine::data_atom_post(int ilocal) { - line_flag = atom->line[ilocal]; + line_flag = line[ilocal]; if (line_flag == 0) line_flag = -1; else if (line_flag == 1) line_flag = 0; else error->one(FLERR,"Invalid line flag in Atoms section of data file"); - atom->line[ilocal] = line_flag; + line[ilocal] = line_flag; - if (atom->rmass[ilocal] <= 0.0) + if (rmass[ilocal] <= 0.0) error->one(FLERR,"Invalid density in Atoms section of data file"); if (line_flag < 0) { - double radius = 0.5; - atom->radius[ilocal] = radius; - atom->rmass[ilocal] *= 4.0*MY_PI/3.0 * radius*radius*radius; - } else atom->radius[ilocal] = 0.0; + double radius_one = 0.5; + radius[ilocal] = radius_one; + rmass[ilocal] *= 4.0*MY_PI/3.0 * radius_one*radius_one*radius_one; + } else radius[ilocal] = 0.0; - atom->omega[ilocal][0] = 0.0; - atom->omega[ilocal][1] = 0.0; - atom->omega[ilocal][2] = 0.0; + omega[ilocal][0] = 0.0; + omega[ilocal][1] = 0.0; + omega[ilocal][2] = 0.0; } /* ---------------------------------------------------------------------- @@ -441,16 +432,16 @@ void AtomVecLine::data_atom_post(int ilocal) void AtomVecLine::pack_data_pre(int ilocal) { - line_flag = atom->line[ilocal]; - rmass = atom->rmass[ilocal]; + line_flag = line[ilocal]; + rmass_one = rmass[ilocal]; - if (line_flag < 0) atom->line[ilocal] = 0; - else atom->line[ilocal] = 1; + if (line_flag < 0) line[ilocal] = 0; + else line[ilocal] = 1; if (line_flag < 0) { - double radius = atom->radius[ilocal]; - atom->rmass[ilocal] /= 4.0*MY_PI/3.0 * radius*radius*radius; - } else atom->rmass[ilocal] /= bonus[line_flag].length; + double radius_one = radius[ilocal]; + rmass[ilocal] /= 4.0*MY_PI/3.0 * radius_one*radius_one*radius_one; + } else rmass[ilocal] /= bonus[line_flag].length; } /* ---------------------------------------------------------------------- @@ -459,8 +450,8 @@ void AtomVecLine::pack_data_pre(int ilocal) void AtomVecLine::pack_data_post(int ilocal) { - atom->line[ilocal] = line_flag; - atom->rmass[ilocal] = rmass; + line[ilocal] = line_flag; + rmass[ilocal] = rmass_one; } /* ---------------------------------------------------------------------- @@ -471,8 +462,6 @@ void AtomVecLine::pack_data_post(int ilocal) void AtomVecLine::set_length(int i, double value) { - int *line = atom->line; - if (line[i] < 0) { if (value == 0.0) return; if (nlocal_bonus == nmax_bonus) grow_bonus(); @@ -489,8 +478,8 @@ void AtomVecLine::set_length(int i, double value) // also set radius = half of length // unless value = 0.0, then set diameter = 1.0 - atom->radius[i] = 0.5 * value; - if (value == 0.0) atom->radius[i] = 0.5; + radius[i] = 0.5 * value; + if (value == 0.0) radius[i] = 0.5; } /* ---------------------------------------------------------------------- diff --git a/src/atom_vec_line.h b/src/atom_vec_line.h index a47843f4f2..7bca58c64b 100644 --- a/src/atom_vec_line.h +++ b/src/atom_vec_line.h @@ -36,6 +36,7 @@ class AtomVecLine : public AtomVec { ~AtomVecLine(); void init(); + void grow_pointers(); void copy_bonus(int, int, int); void clear_bonus(); int pack_comm_bonus(int, int *, double *); @@ -62,9 +63,13 @@ class AtomVecLine : public AtomVec { int nlocal_bonus; private: + int *line; + double *radius,*rmass; + double **omega; + int nghost_bonus,nmax_bonus; int line_flag; - double rmass; + double rmass_one; void grow_bonus(); void copy_bonus_all(int, int); diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index b601fc8f7c..64a198c94d 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -100,14 +100,25 @@ void AtomVecSphere::init() } } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecSphere::grow_pointers() +{ + radius = atom->radius; + rmass = atom->rmass; +} + /* ---------------------------------------------------------------------- initialize non-zero atom quantities ------------------------------------------------------------------------- */ void AtomVecSphere::create_atom_post(int ilocal) { - atom->radius[ilocal] = 0.5; - atom->rmass[ilocal] = 4.0*MY_PI/3.0 * 0.5*0.5*0.5; + radius[ilocal] = 0.5; + rmass[ilocal] = 4.0*MY_PI/3.0 * 0.5*0.5*0.5; } /* ---------------------------------------------------------------------- @@ -117,13 +128,12 @@ void AtomVecSphere::create_atom_post(int ilocal) void AtomVecSphere::data_atom_post(int ilocal) { - double radius = 0.5 * atom->radius[ilocal]; - atom->radius[ilocal] = radius; - if (radius > 0.0) - atom->rmass[ilocal] = - 4.0*MY_PI/3.0 * radius*radius*radius * atom->rmass[ilocal]; + radius_one = 0.5 * atom->radius[ilocal]; + radius[ilocal] = radius_one; + if (radius_one > 0.0) + rmass[ilocal] *= 4.0*MY_PI/3.0 * radius_one*radius_one*radius_one; - if (atom->rmass[ilocal] <= 0.0) + if (rmass[ilocal] <= 0.0) error->one(FLERR,"Invalid density in Atoms section of data file"); } @@ -132,13 +142,14 @@ void AtomVecSphere::data_atom_post(int ilocal) ------------------------------------------------------------------------- */ void AtomVecSphere::pack_data_pre(int ilocal) -{ - radius = atom->radius[ilocal]; - rmass = atom->rmass[ilocal]; +{ + radius_one = radius[ilocal]; + rmass_one = rmass[ilocal]; - atom->radius[ilocal] *= 2.0; - if (radius == 0.0) - atom->rmass[ilocal] = rmass / (4.0*MY_PI/3.0 * radius*radius*radius); + radius[ilocal] *= 2.0; + if (radius_one!= 0.0) + rmass[ilocal] = + rmass_one / (4.0*MY_PI/3.0 * radius_one*radius_one*radius_one); } /* ---------------------------------------------------------------------- @@ -146,7 +157,7 @@ void AtomVecSphere::pack_data_pre(int ilocal) ------------------------------------------------------------------------- */ void AtomVecSphere::pack_data_post(int ilocal) -{ - atom->radius[ilocal] = radius; - atom->rmass[ilocal] = rmass; +{ + radius[ilocal] = radius_one; + rmass[ilocal] = rmass_one; } diff --git a/src/atom_vec_sphere.h b/src/atom_vec_sphere.h index c205ba43de..2b735f1163 100644 --- a/src/atom_vec_sphere.h +++ b/src/atom_vec_sphere.h @@ -29,14 +29,18 @@ class AtomVecSphere : public AtomVec { AtomVecSphere(class LAMMPS *); void process_args(int, char **); void init(); + + void grow_pointers(); void create_atom_post(int); void data_atom_post(int); void pack_data_pre(int); void pack_data_post(int); private: + double *radius,*rmass; + int radvary; - double radius,rmass; + double radius_one,rmass_one; }; } diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index 7345646a1e..b130198075 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -88,6 +88,20 @@ void AtomVecTri::init() error->all(FLERR,"Atom_style tri can only be used in 3d simulations"); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecTri::grow_pointers() +{ + tri = atom->tri; + radius = atom->radius; + rmass = atom->rmass; + omega = atom->omega; + angmom = atom->angmom; +} + /* ---------------------------------------------------------------------- grow bonus data structure ------------------------------------------------------------------------- */ @@ -109,8 +123,6 @@ void AtomVecTri::grow_bonus() void AtomVecTri::copy_bonus(int i, int j, int delflag) { - int *tri = atom->tri; - // if deleting atom J via delflag and J has bonus data, then delete it if (delflag && tri[j] >= 0) { @@ -132,7 +144,7 @@ void AtomVecTri::copy_bonus(int i, int j, int delflag) void AtomVecTri::copy_bonus_all(int i, int j) { - atom->tri[bonus[i].ilocal] = j; + tri[bonus[i].ilocal] = j; memcpy(&bonus[j],&bonus[i],sizeof(Bonus)); } @@ -157,8 +169,6 @@ int AtomVecTri::pack_comm_bonus(int n, int *list, double *buf) int i,j,m; double *quat; - int *tri = atom->tri; - m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -181,8 +191,6 @@ void AtomVecTri::unpack_comm_bonus(int n, int first, double *buf) int i,m,last; double *quat; - int *tri = atom->tri; - m = 0; last = first + n; for (i = first; i < last; i++) { @@ -203,8 +211,6 @@ int AtomVecTri::pack_border_bonus(int n, int *list, double *buf) int i,j,m; double *quat,*c1,*c2,*c3,*inertia; - int *tri = atom->tri; - m = 0; for (i = 0; i < n; i++) { j = list[i]; @@ -245,8 +251,6 @@ int AtomVecTri::unpack_border_bonus(int n, int first, double *buf) int i,j,m,last; double *quat,*c1,*c2,*c3,*inertia; - int *tri = atom->tri; - m = 0; last = first + n; for (i = first; i < last; i++) { @@ -294,8 +298,6 @@ int AtomVecTri::pack_exchange_bonus(int i, double *buf) { int m = 0; - int *tri = atom->tri; - if (tri[i] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -332,8 +334,6 @@ int AtomVecTri::unpack_exchange_bonus(int ilocal, double *buf) { int m = 0; - int *tri = atom->tri; - tri[ilocal] = (int) ubuf(buf[m++]).i; if (tri[ilocal] == 0) tri[ilocal] = -1; else { @@ -375,8 +375,6 @@ int AtomVecTri::size_restart_bonus() { int i; - int *tri = atom->tri; - int n = 0; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) { @@ -395,8 +393,6 @@ int AtomVecTri::pack_restart_bonus(int i, double *buf) { int m = 0; - int *tri = atom->tri; - if (tri[i] < 0) buf[m++] = ubuf(0).d; else { buf[m++] = ubuf(1).d; @@ -435,8 +431,6 @@ int AtomVecTri::unpack_restart_bonus(int ilocal, double *buf) { int m = 0; - int *tri = atom->tri; - tri[ilocal] = (int) ubuf(buf[m++]).i; if (tri[ilocal] == 0) tri[ilocal] = -1; else { @@ -475,8 +469,6 @@ int AtomVecTri::unpack_restart_bonus(int ilocal, double *buf) void AtomVecTri::data_atom_bonus(int m, char **values) { - int *tri = atom->tri; - if (tri[m]) error->one(FLERR,"Assigning tri parameters to non-tri atom"); if (nlocal_bonus == nmax_bonus) grow_bonus(); @@ -523,9 +515,9 @@ void AtomVecTri::data_atom_bonus(int m, char **values) if (delta/size > EPSILON) error->one(FLERR,"Inconsistent triangle in data file"); - atom->x[m][0] = centroid[0]; - atom->x[m][1] = centroid[1]; - atom->x[m][2] = centroid[2]; + x[m][0] = centroid[0]; + x[m][1] = centroid[1]; + x[m][2] = centroid[2]; // reset tri radius and mass // rmass currently holds density @@ -533,22 +525,22 @@ void AtomVecTri::data_atom_bonus(int m, char **values) double c4[3]; MathExtra::sub3(c1,centroid,c4); - atom->radius[m] = MathExtra::lensq3(c4); + radius[m] = MathExtra::lensq3(c4); MathExtra::sub3(c2,centroid,c4); - atom->radius[m] = MAX(atom->radius[m],MathExtra::lensq3(c4)); + radius[m] = MAX(radius[m],MathExtra::lensq3(c4)); MathExtra::sub3(c3,centroid,c4); - atom->radius[m] = MAX(atom->radius[m],MathExtra::lensq3(c4)); - atom->radius[m] = sqrt(atom->radius[m]); + radius[m] = MAX(radius[m],MathExtra::lensq3(c4)); + radius[m] = sqrt(radius[m]); double norm[3]; MathExtra::cross3(c2mc1,c3mc1,norm); double area = 0.5 * MathExtra::len3(norm); - atom->rmass[m] *= area; + rmass[m] *= area; // inertia = inertia tensor of triangle as 6-vector in Voigt notation double inertia[6]; - MathExtra::inertia_triangle(c1,c2,c3,atom->rmass[m],inertia); + MathExtra::inertia_triangle(c1,c2,c3,rmass[m],inertia); // diagonalize inertia tensor via Jacobi rotations // bonus[].inertia = 3 eigenvalues = principal moments of inertia @@ -622,10 +614,10 @@ bigint AtomVecTri::memory_usage_bonus() void AtomVecTri::create_atom_post(int ilocal) { - double radius = 0.5; - atom->radius[ilocal] = radius; - atom->rmass[ilocal] = 4.0*MY_PI/3.0 * radius*radius*radius; - atom->tri[ilocal] = -1; + double radius_one = 0.5; + radius[ilocal] = radius_one; + rmass[ilocal] = 4.0*MY_PI/3.0 * radius_one*radius_one*radius_one; + tri[ilocal] = -1; } /* ---------------------------------------------------------------------- @@ -635,27 +627,27 @@ void AtomVecTri::create_atom_post(int ilocal) void AtomVecTri::data_atom_post(int ilocal) { - tri_flag = atom->tri[ilocal]; + tri_flag = tri[ilocal]; if (tri_flag == 0) tri_flag = -1; else if (tri_flag == 1) tri_flag = 0; else error->one(FLERR,"Invalid tri flag in Atoms section of data file"); - atom->tri[ilocal] = tri_flag; + tri[ilocal] = tri_flag; - if (atom->rmass[ilocal] <= 0.0) + if (rmass[ilocal] <= 0.0) error->one(FLERR,"Invalid density in Atoms section of data file"); if (tri_flag < 0) { - double radius = 0.5; - atom->radius[ilocal] = radius; - atom->rmass[ilocal] *= 4.0*MY_PI/3.0 * radius*radius*radius; - } else atom->radius[ilocal] = 0.0; + double radius_one = 0.5; + radius[ilocal] = radius_one; + rmass[ilocal] *= 4.0*MY_PI/3.0 * radius_one*radius_one*radius_one; + } else radius[ilocal] = 0.0; - atom->omega[ilocal][0] = 0.0; - atom->omega[ilocal][1] = 0.0; - atom->omega[ilocal][2] = 0.0; - atom->angmom[ilocal][0] = 0.0; - atom->angmom[ilocal][1] = 0.0; - atom->angmom[ilocal][2] = 0.0; + omega[ilocal][0] = 0.0; + omega[ilocal][1] = 0.0; + omega[ilocal][2] = 0.0; + angmom[ilocal][0] = 0.0; + angmom[ilocal][1] = 0.0; + angmom[ilocal][2] = 0.0; } /* ---------------------------------------------------------------------- @@ -664,22 +656,22 @@ void AtomVecTri::data_atom_post(int ilocal) void AtomVecTri::pack_data_pre(int ilocal) { - tri_flag = atom->tri[ilocal]; - rmass = atom->rmass[ilocal]; + tri_flag = tri[ilocal]; + rmass_one = rmass[ilocal]; - if (tri_flag < 0) atom->tri[ilocal] = 0; - else atom->tri[ilocal] = 1; + if (tri_flag < 0) tri[ilocal] = 0; + else tri[ilocal] = 1; if (tri_flag < 0) { - double radius = atom->radius[ilocal]; - atom->rmass[ilocal] /= 4.0*MY_PI/3.0 * radius*radius*radius; + double radius_one = radius[ilocal]; + rmass[ilocal] /= 4.0*MY_PI/3.0 * radius_one*radius_one*radius_one; } else { double c2mc1[3],c3mc1[3],norm[3]; MathExtra::sub3(bonus[tri_flag].c2,bonus[tri_flag].c1,c2mc1); MathExtra::sub3(bonus[tri_flag].c3,bonus[tri_flag].c1,c3mc1); MathExtra::cross3(c2mc1,c3mc1,norm); double area = 0.5 * MathExtra::len3(norm); - atom->rmass[ilocal] /= area; + rmass[ilocal] /= area; } } @@ -689,8 +681,8 @@ void AtomVecTri::pack_data_pre(int ilocal) void AtomVecTri::pack_data_post(int ilocal) { - atom->tri[ilocal] = tri_flag; - atom->rmass[ilocal] = rmass; + tri[ilocal] = tri_flag; + rmass[ilocal] = rmass_one; } /* ---------------------------------------------------------------------- @@ -704,8 +696,6 @@ void AtomVecTri::set_equilateral(int i, double size) // also set radius = distance from center to corner-pt = len(c1) // unless size = 0.0, then set diameter = 1.0 - int *tri = atom->tri; - if (tri[i] < 0) { if (size == 0.0) return; if (nlocal_bonus == nmax_bonus) grow_bonus(); @@ -730,11 +720,11 @@ void AtomVecTri::set_equilateral(int i, double size) inertia[0] = sqrt(3.0)/96.0 * size*size*size*size; inertia[1] = sqrt(3.0)/96.0 * size*size*size*size; inertia[2] = sqrt(3.0)/48.0 * size*size*size*size; - atom->radius[i] = MathExtra::len3(c1); + radius[i] = MathExtra::len3(c1); bonus[nlocal_bonus].ilocal = i; tri[i] = nlocal_bonus++; } else if (size == 0.0) { - atom->radius[i] = 0.5; + radius[i] = 0.5; copy_bonus_all(nlocal_bonus-1,tri[i]); nlocal_bonus--; tri[i] = -1; @@ -755,6 +745,6 @@ void AtomVecTri::set_equilateral(int i, double size) inertia[0] = sqrt(3.0)/96.0 * size*size*size*size; inertia[1] = sqrt(3.0)/96.0 * size*size*size*size; inertia[2] = sqrt(3.0)/48.0 * size*size*size*size; - atom->radius[i] = MathExtra::len3(c1); + radius[i] = MathExtra::len3(c1); } } diff --git a/src/atom_vec_tri.h b/src/atom_vec_tri.h index ad4c0103ca..0b16285fe6 100644 --- a/src/atom_vec_tri.h +++ b/src/atom_vec_tri.h @@ -38,6 +38,7 @@ class AtomVecTri : public AtomVec { ~AtomVecTri(); void init(); + void grow_pointers(); void copy_bonus(int, int, int); void clear_bonus(); int pack_comm_bonus(int, int *, double *); @@ -64,9 +65,13 @@ class AtomVecTri : public AtomVec { int nlocal_bonus; private: + int *tri; + double *radius,*rmass; + double **omega,**angmom; + int nghost_bonus,nmax_bonus; int tri_flag; - double rmass; + double rmass_one; void grow_bonus(); void copy_bonus_all(int, int); diff --git a/src/replicate.cpp b/src/replicate.cpp index 3659f7cf7a..26b61769b0 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -100,7 +100,8 @@ void Replicate::command(int narg, char **arg) maxmol = maxmol_all; } - // check image flags maximum extent; only efficient small image flags compared to new system + // check image flags maximum extent + // only efficient small image flags compared to new system int _imagelo[3], _imagehi[3]; _imagelo[0] = 0; From ccc8f29d60cabd9971c7db62b9db1e84b95d6aa8 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 18 Dec 2019 12:04:37 -0700 Subject: [PATCH 015/577] added support for USER-AWPMD package --- src/USER-AWPMD/atom_vec_wavepacket.cpp | 25 +++++++++++------ src/USER-AWPMD/atom_vec_wavepacket.h | 6 ++++ src/USER-AWPMD/pair_awpmd_cut.cpp | 26 +++++++++--------- src/USER-SMD/atom_vec_smd.cpp | 2 +- src/atom.cpp | 8 +++--- src/atom.h | 6 ++-- src/atom_vec.cpp | 7 ++--- src/atom_vec_body.cpp | 9 ++---- src/atom_vec_body.h | 2 +- src/atom_vec_hybrid.cpp | 38 ++++++++++++++++++++++---- src/atom_vec_hybrid.h | 3 +- 11 files changed, 86 insertions(+), 46 deletions(-) diff --git a/src/USER-AWPMD/atom_vec_wavepacket.cpp b/src/USER-AWPMD/atom_vec_wavepacket.cpp index d643ae8e0a..c71a3cb6c2 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.cpp +++ b/src/USER-AWPMD/atom_vec_wavepacket.cpp @@ -61,6 +61,20 @@ AtomVecWavepacket::AtomVecWavepacket(LAMMPS *lmp) : AtomVec(lmp) setup_fields(); } +/* ---------------------------------------------------------------------- + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() +------------------------------------------------------------------------- */ + +void AtomVecWavepacket::grow_pointers() +{ + q = atom->q; + spin = atom->spin; + eradius = atom->eradius; + ervel = atom->ervel; + erforce = atom->erforce; +} + /* ---------------------------------------------------------------------- clear extra forces starting at atom N nbytes = # of bytes to clear for a per-atom vector @@ -68,7 +82,7 @@ AtomVecWavepacket::AtomVecWavepacket(LAMMPS *lmp) : AtomVec(lmp) void AtomVecWavepacket::force_clear(int n, size_t nbytes) { - memset(&atom->erforce[n],0,nbytes); + memset(&erforce[n],0,nbytes); } /* ---------------------------------------------------------------------- @@ -78,7 +92,7 @@ void AtomVecWavepacket::force_clear(int n, size_t nbytes) void AtomVecWavepacket::create_atom_post(int ilocal) { - atom->q[ilocal] = 1.0; + q[ilocal] = 1.0; } /* ---------------------------------------------------------------------- @@ -88,7 +102,7 @@ void AtomVecWavepacket::create_atom_post(int ilocal) void AtomVecWavepacket::data_atom_post(int ilocal) { - atom->ervel[ilocal] = 0.0; + ervel[ilocal] = 0.0; } /* ---------------------------------------------------------------------- @@ -113,33 +127,28 @@ int AtomVecWavepacket::property_atom(char *name) void AtomVecWavepacket::pack_property_atom(int index, double *buf, int nvalues, int groupbit) { - int *mask = atom->mask; int nlocal = atom->nlocal; int n = 0; if (index == 0) { - int *spin = atom->spin; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = spin[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 1) { - double *eradius = atom->eradius; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = eradius[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 2) { - double *ervel = atom->ervel; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = ervel[i]; else buf[n] = 0.0; n += nvalues; } } else if (index == 3) { - double *erforce = atom->erforce; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) buf[n] = erforce[i]; else buf[n] = 0.0; diff --git a/src/USER-AWPMD/atom_vec_wavepacket.h b/src/USER-AWPMD/atom_vec_wavepacket.h index e7db15db14..123414eeb7 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.h +++ b/src/USER-AWPMD/atom_vec_wavepacket.h @@ -27,11 +27,17 @@ namespace LAMMPS_NS { class AtomVecWavepacket : public AtomVec { public: AtomVecWavepacket(class LAMMPS *); + + void grow_pointers(); void force_clear(int, size_t); void create_atom_post(int); void data_atom_post(int); int property_atom(char *); void pack_property_atom(int, double *, int, int); + + private: + int *spin; + double *q,*eradius,*ervel,*erforce; }; } diff --git a/src/USER-AWPMD/pair_awpmd_cut.cpp b/src/USER-AWPMD/pair_awpmd_cut.cpp index 092327c367..e382a1cb9c 100644 --- a/src/USER-AWPMD/pair_awpmd_cut.cpp +++ b/src/USER-AWPMD/pair_awpmd_cut.cpp @@ -259,7 +259,7 @@ void PairAWPMDCut::compute(int eflag, int vflag) Vector_3 xx=Vector_3(x[i][0],x[i][1],x[i][2]); Vector_3 rv=m*Vector_3(v[i][0],v[i][1],v[i][2]); double pv=ermscale*m*atom->ervel[i]; - Vector_2 cc=Vector_2(atom->cs[2*i],atom->cs[2*i+1]); + Vector_2 cc=Vector_2(atom->cs[i][0],atom->cs[i][1]); gmap[i]=wpmd->add_split(xx,rv,atom->eradius[i],pv,cc,1.,atom->q[i],itag[i] : -atom->tag[i]); // resetting for the case constraints were applied v[i][0]=rv[0]/m; @@ -284,7 +284,7 @@ void PairAWPMDCut::compute(int eflag, int vflag) } else { // electron int iel=gmap[i]; int s=spin[i] >0 ? 0 : 1; - wpmd->get_wp_force(s,iel,(Vector_3 *)f[i],(Vector_3 *)(atom->vforce+3*i),atom->erforce+i,atom->ervelforce+i,(Vector_2 *)(atom->csforce+2*i)); + wpmd->get_wp_force(s,iel,(Vector_3 *)f[i],(Vector_3 *)(atom->vforce[i]),atom->erforce+i,atom->ervelforce+i,(Vector_2 *)(atom->csforce[i])); } } @@ -671,11 +671,11 @@ void PairAWPMDCut::min_xf_get(int /* ignore */) double *eradius = atom->eradius; double *erforce = atom->erforce; double **v=atom->v; - double *vforce=atom->vforce; + double **vforce=atom->vforce; double *ervel=atom->ervel; double *ervelforce=atom->ervelforce; - double *cs=atom->cs; - double *csforce=atom->csforce; + double **cs=atom->cs; + double **csforce=atom->csforce; int *spin = atom->spin; int nlocal = atom->nlocal; @@ -686,14 +686,14 @@ void PairAWPMDCut::min_xf_get(int /* ignore */) min_varforce[7*i] = eradius[i]*erforce[i]; for(int j=0;j<3;j++){ min_var[7*i+1+3*j] = v[i][j]; - min_varforce[7*i+1+3*j] = vforce[3*i+j]; + min_varforce[7*i+1+3*j] = vforce[i][j]; } min_var[7*i+4] = ervel[i]; min_varforce[7*i+4] = ervelforce[i]; - min_var[7*i+5] = cs[2*i]; - min_varforce[7*i+5] = csforce[2*i]; - min_var[7*i+6] = cs[2*i+1]; - min_varforce[7*i+6] = csforce[2*i+1]; + min_var[7*i+5] = cs[i][0]; + min_varforce[7*i+5] = csforce[i][0]; + min_var[7*i+6] = cs[i][1]; + min_varforce[7*i+6] = csforce[i][1]; } else { for(int j=0;j<7;j++) @@ -710,7 +710,7 @@ void PairAWPMDCut::min_x_set(int /* ignore */) double *eradius = atom->eradius; double **v=atom->v; double *ervel=atom->ervel; - double *cs=atom->cs; + double **cs=atom->cs; int *spin = atom->spin; int nlocal = atom->nlocal; @@ -721,8 +721,8 @@ void PairAWPMDCut::min_x_set(int /* ignore */) for(int j=0;j<3;j++) v[i][j]=min_var[7*i+1+3*j]; ervel[i]=min_var[7*i+4]; - cs[2*i]=min_var[7*i+5]; - cs[2*i+1]=min_var[7*i+6]; + cs[i][0]=min_var[7*i+5]; + cs[i][1]=min_var[7*i+6]; } } } diff --git a/src/USER-SMD/atom_vec_smd.cpp b/src/USER-SMD/atom_vec_smd.cpp index 4c8126d2cc..42978d67d6 100644 --- a/src/USER-SMD/atom_vec_smd.cpp +++ b/src/USER-SMD/atom_vec_smd.cpp @@ -90,7 +90,7 @@ AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp) "x0 vest vfrac rmass radius contact_radius molecule e " "eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress damage"; fields_data_atom = (char *) - "id type molecule vfrac rmass radius contact_radius x"; + "id type molecule vfrac rmass radius contact_radius x0 x"; fields_data_vel = (char *) "id v"; // set these array sizes based on defines diff --git a/src/atom.cpp b/src/atom.cpp index 353ed510a4..1470c873a6 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -134,8 +134,8 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) spin = NULL; eradius = ervel = erforce = NULL; - ervelforce = cs = csforce = NULL; - vforce = NULL; + ervelforce = NULL; + cs = csforce = vforce = NULL; etag = NULL; // USER-DPD package @@ -512,8 +512,8 @@ void Atom::peratom_create() // USER-AWPMD package - add_peratom("cs",&cs,DOUBLE,0); - add_peratom("csforce",&csforce,DOUBLE,0); + add_peratom("cs",&cs,DOUBLE,2); + add_peratom("csforce",&csforce,DOUBLE,2); add_peratom("vforce",&vforce,DOUBLE,3); add_peratom("ervelforce",&ervelforce,DOUBLE,0); add_peratom("etag",&etag,INT,0); diff --git a/src/atom.h b/src/atom.h index 6c7110b5be..ab1ad35f5f 100644 --- a/src/atom.h +++ b/src/atom.h @@ -109,8 +109,8 @@ class Atom : protected Pointers { int *spin; double *eradius,*ervel,*erforce; - double *ervelforce,*cs,*csforce; - double **vforce; + double *ervelforce; + double **cs,**csforce,**vforce; int *etag; // USER-DPD package @@ -322,7 +322,7 @@ class Atom : protected Pointers { inline int get_map_size() {return map_tag_max+1;}; inline int get_map_maxarray() {return map_maxarray+1;}; - // NOTE: placeholder method until AtomVec is refactored + // NOTE: placeholder method until KOKKOS/AtomVec is refactored int memcheck(const char *) {return 1;} bigint memory_usage(); diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index fac4cc2f6e..77ba68f651 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -1368,7 +1368,7 @@ int AtomVec::size_restart() int i,nn,cols,collength,ncols; void *plength; - // NOTE: need to worry about overflow of returned int ?? + // NOTE: need to worry about overflow of returned int N int nlocal = atom->nlocal; @@ -1738,9 +1738,9 @@ void AtomVec::data_atom(double *coord, imageint imagetmp, char **values) // error checks applicable to all styles - if (atom->tag[nlocal] <= 0) + if (tag[nlocal] <= 0) error->one(FLERR,"Invalid atom ID in Atoms section of data file"); - if (atom->type[nlocal] <= 0 || atom->type[nlocal] > atom->ntypes) + if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) error->one(FLERR,"Invalid atom type in Atoms section of data file"); // if needed, modify unpacked values or initialize other peratom values @@ -2388,7 +2388,6 @@ void AtomVec::setup_fields() } // set style-specific sizes - // NOTE: check for others vars in atom_vec.cpp/h ?? comm_x_only = 1; if (ncomm) comm_x_only = 0; diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index 0f3557596f..c262f1a5b6 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -132,15 +132,12 @@ void AtomVecBody::process_args(int narg, char **arg) } /* ---------------------------------------------------------------------- - grow atom arrays - must set local copy of body ptr - needed in replicate when 2 atom classes exist and pack_restart() is called + set local copies of all grow ptrs used by this class, except defaults + needed in replicate when 2 atom classes exist and it calls pack_restart() ------------------------------------------------------------------------- */ -void AtomVecBody::grow(int n) +void AtomVecBody::grow_pointers() { - AtomVec::grow(n); - body = atom->body; rmass = atom->rmass; radius = atom->radius; diff --git a/src/atom_vec_body.h b/src/atom_vec_body.h index adfc7768eb..a47cfb3b54 100644 --- a/src/atom_vec_body.h +++ b/src/atom_vec_body.h @@ -43,7 +43,7 @@ class AtomVecBody : public AtomVec { ~AtomVecBody(); void process_args(int, char **); - void grow(int); + void grow_pointers(); void copy_bonus(int, int, int); void clear_bonus(); int pack_comm_bonus(int, int *, double *); diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index d1166e5a8e..965bfe8543 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -31,12 +31,10 @@ AtomVecHybrid::AtomVecHybrid(LAMMPS *lmp) : AtomVec(lmp) keywords = NULL; fieldstrings = NULL; + bonus_flag = 0; nstyles_bonus = 0; styles_bonus = NULL; - // NOTE: set bonus_flag if any substyle does - // set nstyles_bonus, styles_bonus - // these strings will be concatenated from sub-style strings // fields_data_atom & fields_data_vel start with fields common to all styles @@ -45,6 +43,8 @@ AtomVecHybrid::AtomVecHybrid(LAMMPS *lmp) : AtomVec(lmp) fields_exchange = fields_restart = fields_create = (char *) ""; fields_data_atom = (char *) "id type x"; fields_data_vel = (char *) "id v"; + + fields_allocated = 0; } /* ---------------------------------------------------------------------- */ @@ -56,7 +56,10 @@ AtomVecHybrid::~AtomVecHybrid() for (int k = 0; k < nstyles; k++) delete [] keywords[k]; delete [] keywords; - // NOTE: need to check these have actually been allocated + for (int k = 0; k < nstyles_bonus; k++) delete styles_bonus[k]; + delete [] styles_bonus; + + if (!fields_allocated) return; delete [] fields_grow; delete [] fields_copy; @@ -198,6 +201,8 @@ void AtomVecHybrid::process_args(int narg, char **arg) fields_data_atom = merge_fields(10,fields_data_atom,0,null); fields_data_vel = merge_fields(11,fields_data_vel,0,null); + fields_allocated = 1; + // check concat_grow for multiple special-case fields // may cause issues with style-specific create_atom() and data_atom() methods // issue warnings if appear in multiple sub-styles @@ -219,6 +224,23 @@ void AtomVecHybrid::process_args(int narg, char **arg) delete [] concat_grow; + // set bonus_flag if any substyle has bonus data + // set nstyles_bonus & styles_bonus + + nstyles_bonus = 0; + for (int k = 0; k < nstyles; k++) + if (styles[k]->bonus_flag) nstyles_bonus++; + + if (nstyles_bonus) { + bonus_flag = 1; + styles_bonus = new AtomVec*[nstyles_bonus]; + nstyles_bonus = 0; + for (int k = 0; k < nstyles; k++) { + if (styles[k]->bonus_flag) + styles_bonus[nstyles_bonus++] = styles[k]; + } + } + // parent AtomVec can now operate on merged fields setup_fields(); @@ -326,7 +348,13 @@ void AtomVecHybrid::copy_bonus(int i, int j, int delflag) styles_bonus[k]->copy_bonus(i,j,delflag); } -// NOTE: need a clear_bonus() ? +/* ---------------------------------------------------------------------- */ + +void AtomVecHybrid::clear_bonus() +{ + for (int k = 0; k < nstyles_bonus; k++) + styles_bonus[k]->clear_bonus(); +} /* ---------------------------------------------------------------------- */ diff --git a/src/atom_vec_hybrid.h b/src/atom_vec_hybrid.h index 7d8e45c579..69b0aab7b7 100644 --- a/src/atom_vec_hybrid.h +++ b/src/atom_vec_hybrid.h @@ -38,7 +38,7 @@ class AtomVecHybrid : public AtomVec { void grow_pointers(); void force_clear(int, size_t); void copy_bonus(int, int, int); - void clear_bonus() {} + void clear_bonus(); int pack_comm_bonus(int, int *, double *); void unpack_comm_bonus(int, int, double *); int pack_border_bonus(int, int *, double *); @@ -64,6 +64,7 @@ class AtomVecHybrid : public AtomVec { private: int nallstyles; char **allstyles; + int fields_allocated; struct FieldStrings { char **fstr; From b3a7aa6541bffb443c1de4823ec7e26691c99bed Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 22 Jan 2020 17:48:50 -0500 Subject: [PATCH 016/577] correct whitespace issue --- src/modify.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modify.cpp b/src/modify.cpp index 732770f34e..be6624e6c1 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -960,12 +960,12 @@ void Modify::add_fix(int narg, char **arg, int trysuffix) replace it later with the desired Fix instance ------------------------------------------------------------------------- */ -void Modify::replace_fix(const char *replaceID, +void Modify::replace_fix(const char *replaceID, int narg, char **arg, int trysuffix) { int ifix = find_fix(replaceID); if (ifix < 0) error->all(FLERR,"Modify replace_fix ID could not be found"); - + // change ID, igroup, style of fix being replaced to match new fix // requires some error checking on arguments for new fix From 66c5fa2abd78c0de8fce4caafd4629b670cfc7c0 Mon Sep 17 00:00:00 2001 From: Vsevak Date: Tue, 28 Jan 2020 20:09:40 +0300 Subject: [PATCH 017/577] Merge 'gpu_hip_port' into master --- lib/gpu/Makefile.hip | 148 ++++++++ lib/gpu/geryon/hip_device.h | 519 +++++++++++++++++++++++++++++ lib/gpu/geryon/hip_kernel.h | 298 +++++++++++++++++ lib/gpu/geryon/hip_macros.h | 83 +++++ lib/gpu/geryon/hip_mat.h | 43 +++ lib/gpu/geryon/hip_memory.h | 279 ++++++++++++++++ lib/gpu/geryon/hip_texture.h | 113 +++++++ lib/gpu/geryon/hip_timer.h | 107 ++++++ lib/gpu/geryon/ucl_get_devices.cpp | 5 + lib/gpu/lal_answer.cpp | 17 +- lib/gpu/lal_answer.h | 4 + lib/gpu/lal_atom.cpp | 75 +++++ lib/gpu/lal_atom.cu | 2 +- lib/gpu/lal_atom.h | 13 + lib/gpu/lal_aux_fun1.h | 2 +- lib/gpu/lal_base_atomic.h | 2 + lib/gpu/lal_base_charge.h | 2 + lib/gpu/lal_base_dipole.h | 2 + lib/gpu/lal_base_dpd.h | 2 + lib/gpu/lal_base_ellipsoid.h | 2 + lib/gpu/lal_base_three.h | 2 + lib/gpu/lal_beck.cu | 6 +- lib/gpu/lal_born.cu | 6 +- lib/gpu/lal_born_coul_long.cu | 10 +- lib/gpu/lal_born_coul_long_cs.cu | 11 +- lib/gpu/lal_born_coul_wolf.cu | 10 +- lib/gpu/lal_born_coul_wolf_cs.cu | 10 +- lib/gpu/lal_buck.cu | 6 +- lib/gpu/lal_buck_coul.cu | 10 +- lib/gpu/lal_buck_coul_long.cu | 10 +- lib/gpu/lal_charmm_long.cu | 10 +- lib/gpu/lal_colloid.cu | 6 +- lib/gpu/lal_coul.cu | 10 +- lib/gpu/lal_coul_debye.cu | 10 +- lib/gpu/lal_coul_dsf.cu | 10 +- lib/gpu/lal_coul_long.cu | 10 +- lib/gpu/lal_coul_long_cs.cu | 10 +- lib/gpu/lal_device.cpp | 6 +- lib/gpu/lal_device.cu | 2 +- lib/gpu/lal_dipole_lj.cu | 14 +- lib/gpu/lal_dipole_lj_sf.cu | 14 +- lib/gpu/lal_dipole_long_lj.cu | 14 +- lib/gpu/lal_dpd.cu | 10 +- lib/gpu/lal_eam.cu | 34 +- lib/gpu/lal_ellipsoid_extra.h | 8 +- lib/gpu/lal_ellipsoid_nbor.cu | 6 +- lib/gpu/lal_gauss.cu | 6 +- lib/gpu/lal_gayberne.cu | 2 +- lib/gpu/lal_gayberne_lj.cu | 2 +- lib/gpu/lal_lj.cu | 6 +- lib/gpu/lal_lj96.cu | 6 +- lib/gpu/lal_lj_class2_long.cu | 10 +- lib/gpu/lal_lj_coul.cu | 10 +- lib/gpu/lal_lj_coul_debye.cu | 10 +- lib/gpu/lal_lj_coul_long.cu | 10 +- lib/gpu/lal_lj_coul_msm.cu | 18 +- lib/gpu/lal_lj_cubic.cu | 6 +- lib/gpu/lal_lj_dsf.cu | 10 +- lib/gpu/lal_lj_expand.cu | 6 +- lib/gpu/lal_lj_expand_coul_long.cu | 10 +- lib/gpu/lal_lj_gromacs.cu | 6 +- lib/gpu/lal_lj_sdk.cu | 6 +- lib/gpu/lal_lj_sdk_long.cu | 10 +- lib/gpu/lal_lj_tip4p_long.cpp | 5 +- lib/gpu/lal_lj_tip4p_long.cu | 10 +- lib/gpu/lal_mie.cu | 6 +- lib/gpu/lal_morse.cu | 6 +- lib/gpu/lal_neighbor_cpu.cu | 2 +- lib/gpu/lal_neighbor_gpu.cu | 6 +- lib/gpu/lal_neighbor_shared.h | 4 + lib/gpu/lal_pppm.cu | 10 +- lib/gpu/lal_pppm.h | 2 + lib/gpu/lal_precision.h | 2 + lib/gpu/lal_preprocessor.h | 146 +++++++- lib/gpu/lal_re_squared.cu | 2 +- lib/gpu/lal_re_squared_lj.cu | 2 +- lib/gpu/lal_soft.cu | 6 +- lib/gpu/lal_sw.cu | 18 +- lib/gpu/lal_table.cu | 6 +- lib/gpu/lal_tersoff.cu | 26 +- lib/gpu/lal_tersoff_extra.h | 2 +- lib/gpu/lal_tersoff_mod.cu | 26 +- lib/gpu/lal_tersoff_mod_extra.h | 2 +- lib/gpu/lal_tersoff_zbl.cu | 30 +- lib/gpu/lal_tersoff_zbl_extra.h | 2 +- lib/gpu/lal_ufm.cu | 6 +- lib/gpu/lal_vashishta.cu | 26 +- lib/gpu/lal_yukawa.cu | 6 +- lib/gpu/lal_yukawa_colloid.cu | 10 +- lib/gpu/lal_zbl.cu | 6 +- src/MAKE/OPTIONS/Makefile.hip | 120 +++++++ 91 files changed, 2290 insertions(+), 312 deletions(-) create mode 100644 lib/gpu/Makefile.hip create mode 100644 lib/gpu/geryon/hip_device.h create mode 100644 lib/gpu/geryon/hip_kernel.h create mode 100644 lib/gpu/geryon/hip_macros.h create mode 100644 lib/gpu/geryon/hip_mat.h create mode 100644 lib/gpu/geryon/hip_memory.h create mode 100644 lib/gpu/geryon/hip_texture.h create mode 100644 lib/gpu/geryon/hip_timer.h create mode 100644 src/MAKE/OPTIONS/Makefile.hip diff --git a/lib/gpu/Makefile.hip b/lib/gpu/Makefile.hip new file mode 100644 index 0000000000..5c9f251004 --- /dev/null +++ b/lib/gpu/Makefile.hip @@ -0,0 +1,148 @@ +# /* ---------------------------------------------------------------------- +# Generic Linux Makefile for HIP +# - export HIP_PLATFORM=hcc (or nvcc) before execution +# - change HIP_ARCH for your GPU +# ------------------------------------------------------------------------- */ + +# this setting should match LAMMPS Makefile +# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL + +LMP_INC = -DLAMMPS_SMALLBIG + +# precision for GPU calculations +# -D_SINGLE_SINGLE # Single precision for all calculations +# -D_DOUBLE_DOUBLE # Double precision for all calculations +# -D_SINGLE_DOUBLE # Accumulation of forces, etc. in double + +HIP_PRECISION = -D_SINGLE_DOUBLE + +HIP_OPTS = -O3 +HIP_HOST_OPTS = -Wno-deprecated-declarations +HIP_HOST_INCLUDE = + +# use device sort +# requires linking with hipcc and hipCUB + (rocPRIM or CUB for AMD or Nvidia respectively) +HIP_HOST_OPTS += -DUSE_HIP_DEVICE_SORT +# path to cub +HIP_HOST_INCLUDE += -I./ +# path to hipcub +HIP_HOST_INCLUDE += -I$(HIP_PATH)/../include + +# use mpi +HIP_HOST_OPTS += -DMPI_GERYON -DUCL_NO_EXIT +# this settings should match LAMMPS Makefile +MPI_COMP_OPTS = $(shell mpicxx --showme:compile) +MPI_LINK_OPTS = $(shell mpicxx --showme:link) +#MPI_COMP_OPTS += -I/usr/include/mpi -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1 + +HIP_PATH ?= $(wildcard /opt/rocm/hip) +HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --compiler) + +ifeq (hcc,$(HIP_PLATFORM)) + HIP_OPTS += -ffast-math + # possible values: gfx803,gfx900,gfx906 + HIP_ARCH = gfx906 +else ifeq (nvcc,$(HIP_PLATFORM)) + HIP_OPTS += --use_fast_math + HIP_ARCH = -gencode arch=compute_30,code=[sm_30,compute_30] -gencode arch=compute_32,code=[sm_32,compute_32] -gencode arch=compute_35,code=[sm_35,compute_35] \ + -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_53,code=[sm_53,compute_53]\ + -gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61] -gencode arch=compute_62,code=[sm_62,compute_62]\ + -gencode arch=compute_70,code=[sm_70,compute_70] -gencode arch=compute_72,code=[sm_72,compute_72] -gencode arch=compute_75,code=[sm_75,compute_75] +else + $(error Specify HIP platform using 'export HIP_PLATFORM=(hcc,nvcc)') +endif + +BIN_DIR = . +OBJ_DIR = ./obj +LIB_DIR = . +AR = ar +BSH = /bin/sh + + +# /* ---------------------------------------------------------------------- +# don't change section below without need +# ------------------------------------------------------------------------- */ + +HIP_OPTS += -DUSE_HIP $(HIP_PRECISION) +HIP_GPU_OPTS += $(HIP_OPTS) -I./ + +ifeq (hcc,$(HIP_PLATFORM)) + HIP_HOST_OPTS += -fPIC + HIP_GPU_CC = $(HIP_PATH)/bin/hipcc --genco + HIP_GPU_OPTS_S = -t="$(HIP_ARCH)" -f=\" + HIP_GPU_OPTS_E = \" + HIP_KERNEL_SUFFIX = .cpp + HIP_LIBS_TARGET = export HCC_AMDGPU_TARGET := $(HIP_ARCH) + export HCC_AMDGPU_TARGET := $(HIP_ARCH) +else ifeq (nvcc,$(HIP_PLATFORM)) + HIP_GPU_CC = $(HIP_PATH)/bin/hipcc --fatbin + HIP_GPU_OPTS += $(HIP_ARCH) + HIP_GPU_SORT_ARCH = $(HIP_ARCH) + # fix nvcc can't handle -pthread flag + MPI_COMP_OPTS := $(subst -pthread,-Xcompiler -pthread,$(MPI_COMP_OPTS)) + MPI_LINK_OPTS := $(subst -pthread,-Xcompiler -pthread,$(MPI_LINK_OPTS)) +endif + +# hipcc is essential for device sort, because of hipcub is header only library and ROCm gpu code generation is deferred to the linking stage +HIP_HOST_CC = $(HIP_PATH)/bin/hipcc +HIP_HOST_OPTS += $(HIP_OPTS) $(MPI_COMP_OPTS) $(LMP_INC) +HIP_HOST_CC_CMD = $(HIP_HOST_CC) $(HIP_HOST_OPTS) $(HIP_HOST_INCLUDE) + +# sources + +ALL_H = $(wildcard ./geryon/ucl*.h) $(wildcard ./geryon/hip*.h) $(wildcard ./lal_*.h) +SRCS := $(wildcard ./lal_*.cpp) +OBJS := $(subst ./,$(OBJ_DIR)/,$(SRCS:%.cpp=%.o)) +CUS := $(wildcard lal_*.cu) +CUHS := $(filter-out pppm_cubin.h, $(CUS:lal_%.cu=%_cubin.h)) pppm_f_cubin.h pppm_d_cubin.h +CUHS := $(addprefix $(OBJ_DIR)/, $(CUHS)) + +all: $(OBJ_DIR) $(CUHS) $(LIB_DIR)/libgpu.a $(BIN_DIR)/hip_get_devices + +$(OBJ_DIR): + mkdir -p $@ + +# GPU kernels compilation + +$(OBJ_DIR)/pppm_f_cubin.h: lal_pppm.cu $(ALL_H) + @cp $< $(OBJ_DIR)/temp_pppm_f.cu$(HIP_KERNEL_SUFFIX) + $(HIP_GPU_CC) $(HIP_GPU_OPTS_S) $(HIP_GPU_OPTS) -Dgrdtyp=float -Dgrdtyp4=float4 $(HIP_GPU_OPTS_E) -o $(OBJ_DIR)/pppm_f.cubin $(OBJ_DIR)/temp_pppm_f.cu$(HIP_KERNEL_SUFFIX) + @xxd -i $(OBJ_DIR)/pppm_f.cubin $@ + @sed -i "s/[a-zA-Z0-9_]*pppm_f_cubin/pppm_f/g" $@ + @rm $(OBJ_DIR)/temp_pppm_f.cu$(HIP_KERNEL_SUFFIX) $(OBJ_DIR)/pppm_f.cubin + +$(OBJ_DIR)/pppm_d_cubin.h: lal_pppm.cu $(ALL_H) + @cp $< $(OBJ_DIR)/temp_pppm_d.cu$(HIP_KERNEL_SUFFIX) + $(HIP_GPU_CC) $(HIP_GPU_OPTS_S) $(HIP_GPU_OPTS) -Dgrdtyp=double -Dgrdtyp4=double4 $(HIP_GPU_OPTS_E) -o $(OBJ_DIR)/pppm_d.cubin $(OBJ_DIR)/temp_pppm_d.cu$(HIP_KERNEL_SUFFIX) + @xxd -i $(OBJ_DIR)/pppm_d.cubin $@ + @sed -i "s/[a-zA-Z0-9_]*pppm_d_cubin/pppm_d/g" $@ + @rm $(OBJ_DIR)/temp_pppm_d.cu$(HIP_KERNEL_SUFFIX) $(OBJ_DIR)/pppm_d.cubin + +$(OBJ_DIR)/%_cubin.h: lal_%.cu $(ALL_H) + @cp $< $(OBJ_DIR)/temp_$*.cu$(HIP_KERNEL_SUFFIX) + $(HIP_GPU_CC) $(HIP_GPU_OPTS_S) $(HIP_GPU_OPTS) $(HIP_GPU_OPTS_E) -o $(OBJ_DIR)/$*.cubin $(OBJ_DIR)/temp_$*.cu$(HIP_KERNEL_SUFFIX) + @xxd -i $(OBJ_DIR)/$*.cubin $@ + @sed -i "s/[a-zA-Z0-9_]*$*_cubin/$*/g" $@ + @rm $(OBJ_DIR)/temp_$*.cu$(HIP_KERNEL_SUFFIX) $(OBJ_DIR)/$*.cubin + +# host sources compilation + +$(OBJ_DIR)/lal_atom.o: lal_atom.cpp $(CUHS) $(ALL_H) + $(HIP_HOST_CC_CMD) -o $@ -c $< -I$(OBJ_DIR) $(HIP_GPU_SORT_ARCH) + +$(OBJ_DIR)/lal_%.o: lal_%.cpp $(CUHS) $(ALL_H) + $(HIP_HOST_CC_CMD) -o $@ -c $< -I$(OBJ_DIR) + +# libgpu building + +$(LIB_DIR)/libgpu.a: $(OBJS) + $(AR) -crs $@ $(OBJS) + echo "export HIP_PLATFORM := $(HIP_PLATFORM)\n$(HIP_LIBS_TARGET)" > 'Makefile.lammps' + +# test app building + +$(BIN_DIR)/hip_get_devices: ./geryon/ucl_get_devices.cpp $(ALL_H) + $(HIP_HOST_CC_CMD) -o $@ $< -DUCL_HIP $(MPI_LINK_OPTS) + +clean: + -rm -f $(BIN_DIR)/hip_get_devices $(LIB_DIR)/libgpu.a $(OBJS) $(OBJ_DIR)/temp_* $(CUHS) diff --git a/lib/gpu/geryon/hip_device.h b/lib/gpu/geryon/hip_device.h new file mode 100644 index 0000000000..93f38d28bb --- /dev/null +++ b/lib/gpu/geryon/hip_device.h @@ -0,0 +1,519 @@ +/* ----------------------------------------------------------------------- + Copyright (2009) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the Simplified BSD License. + ----------------------------------------------------------------------- */ + +#ifndef HIP_DEVICE +#define HIP_DEVICE + + +#include +#include +#include +#include +#include +#include "hip_macros.h" +#include "ucl_types.h" + +namespace ucl_hip { + +// -------------------------------------------------------------------------- +// - COMMAND QUEUE STUFF +// -------------------------------------------------------------------------- +typedef hipStream_t command_queue; + +inline void ucl_sync(hipStream_t &stream) { + CU_SAFE_CALL(hipStreamSynchronize(stream)); +} + +struct NVDProperties { + int device_id; + std::string name; + int major; + int minor; + CUDA_INT_TYPE totalGlobalMem; + int multiProcessorCount; + + int maxThreadsPerBlock; + int maxThreadsDim[3]; + int maxGridSize[3]; + int sharedMemPerBlock; + int totalConstantMemory; + int SIMDWidth; + int memPitch; + int regsPerBlock; + int clockRate; + int textureAlign; + + int kernelExecTimeoutEnabled; + int integrated; + int canMapHostMemory; + int concurrentKernels; + int ECCEnabled; + int computeMode; +}; + +/// Class for looking at device properties +/** \note Calls to change the device outside of the class results in incorrect + * behavior + * \note There is no error checking for indexing past the number of devices **/ +class UCL_Device { + public: + /// Collect properties for every GPU on the node + /** \note You must set the active GPU with set() before using the device **/ + inline UCL_Device(); + + inline ~UCL_Device(); + + /// Returns 1 (For compatibility with OpenCL) + inline int num_platforms() { return 1; } + + /// Return a string with name and info of the current platform + inline std::string platform_name() + { return "HIP platform"; } + + /// Delete any contexts/data and set the platform number to be used + inline int set_platform(const int pid); + + /// Return the number of devices that support CUDA + inline int num_devices() { return _properties.size(); } + + /// Set the CUDA device to the specified device number + /** A context and default command queue will be created for the device + * Returns UCL_SUCCESS if successful or UCL_ERROR if the device could not + * be allocated for use. clear() is called to delete any contexts and + * associated data from previous calls to set(). **/ + inline int set(int num); + + /// Delete any context and associated data stored from a call to set() + inline void clear(); + + /// Get the current device number + inline int device_num() { return _device; } + + /// Returns the default stream for the current device + inline command_queue & cq() { return cq(0); } + + /// Returns the stream indexed by i + inline command_queue & cq(const int i) { return _cq[i]; } + + /// Block until all commands in the default stream have completed + inline void sync() { sync(0); } + + /// Block until all commands in the specified stream have completed + inline void sync(const int i) { ucl_sync(cq(i)); } + + /// Get the number of command queues currently available on device + inline int num_queues() + { return _cq.size(); } + + /// Add a stream for device computations + inline void push_command_queue() { + _cq.push_back(hipStream_t()); + CU_SAFE_CALL(hipStreamCreateWithFlags(&_cq.back(),0)); + } + + /// Remove a stream for device computations + /** \note You cannot delete the default stream **/ + inline void pop_command_queue() { + if (_cq.size()<2) return; + CU_SAFE_CALL_NS(hipStreamDestroy(_cq.back())); + _cq.pop_back(); + } + + /// Set the default command queue (by default this is the null stream) + /** \param i index of the command queue (as added by push_command_queue()) + If i is 0, the default command queue is set to the null stream **/ + inline void set_command_queue(const int i) { + if (i==0) _cq[0]=0; + else _cq[0]=_cq[i]; + } + + /// Get the current CUDA device name + inline std::string name() { return name(_device); } + /// Get the CUDA device name + inline std::string name(const int i) + { return std::string(_properties[i].name); } + + /// Get a string telling the type of the current device + inline std::string device_type_name() { return device_type_name(_device); } + /// Get a string telling the type of the device + inline std::string device_type_name(const int i) { return "GPU"; } + + /// Get current device type (UCL_CPU, UCL_GPU, UCL_ACCELERATOR, UCL_DEFAULT) + inline int device_type() { return device_type(_device); } + /// Get device type (UCL_CPU, UCL_GPU, UCL_ACCELERATOR, UCL_DEFAULT) + inline int device_type(const int i) { return UCL_GPU; } + + /// Returns true if host memory is efficiently addressable from device + inline bool shared_memory() { return shared_memory(_device); } + /// Returns true if host memory is efficiently addressable from device + inline bool shared_memory(const int i) { return device_type(i)==UCL_CPU; } + + /// Returns true if double precision is support for the current device + inline bool double_precision() { return double_precision(_device); } + /// Returns true if double precision is support for the device + inline bool double_precision(const int i) {return arch(i)>=1.3;} + + /// Get the number of compute units on the current device + inline unsigned cus() { return cus(_device); } + /// Get the number of compute units + inline unsigned cus(const int i) + { return _properties[i].multiProcessorCount; } + + /// Get the number of cores in the current device + inline unsigned cores() { return cores(_device); } + /// Get the number of cores + inline unsigned cores(const int i) + { if (arch(i)<2.0) return _properties[i].multiProcessorCount*8; + else if (arch(i)<2.1) return _properties[i].multiProcessorCount*32; + else if (arch(i)<3.0) return _properties[i].multiProcessorCount*48; + else return _properties[i].multiProcessorCount*192; } + + /// Get the gigabytes of global memory in the current device + inline double gigabytes() { return gigabytes(_device); } + /// Get the gigabytes of global memory + inline double gigabytes(const int i) + { return static_cast(_properties[i].totalGlobalMem)/1073741824; } + + /// Get the bytes of global memory in the current device + inline size_t bytes() { return bytes(_device); } + /// Get the bytes of global memory + inline size_t bytes(const int i) { return _properties[i].totalGlobalMem; } + + // Get the gigabytes of free memory in the current device + inline double free_gigabytes() { return free_gigabytes(_device); } + // Get the gigabytes of free memory + inline double free_gigabytes(const int i) + { return static_cast(free_bytes(i))/1073741824; } + + // Get the bytes of free memory in the current device + inline size_t free_bytes() { return free_bytes(_device); } + // Get the bytes of free memory + inline size_t free_bytes(const int i) { + CUDA_INT_TYPE dfree, dtotal; + CU_SAFE_CALL_NS(hipMemGetInfo(&dfree, &dtotal)); + return static_cast(dfree); + } + + /// Return the GPGPU compute capability for current device + inline double arch() { return arch(_device); } + /// Return the GPGPU compute capability + inline double arch(const int i) + { return static_cast(_properties[i].minor)/10+_properties[i].major;} + + /// Clock rate in GHz for current device + inline double clock_rate() { return clock_rate(_device); } + /// Clock rate in GHz + inline double clock_rate(const int i) + { return _properties[i].clockRate*1e-6;} + + /// Get the maximum number of threads per block + inline size_t group_size() { return group_size(_device); } + /// Get the maximum number of threads per block + inline size_t group_size(const int i) + { return _properties[i].maxThreadsPerBlock; } + + /// Return the maximum memory pitch in bytes for current device + inline size_t max_pitch() { return max_pitch(_device); } + /// Return the maximum memory pitch in bytes + inline size_t max_pitch(const int i) { return _properties[i].memPitch; } + + /// Returns false if accelerator cannot be shared by multiple processes + /** If it cannot be determined, true is returned **/ + inline bool sharing_supported() { return sharing_supported(_device); } + /// Returns false if accelerator cannot be shared by multiple processes + /** If it cannot be determined, true is returned **/ + inline bool sharing_supported(const int i) + { return (_properties[i].computeMode == hipComputeModeDefault); } + + /// True if splitting device into equal subdevices supported + inline bool fission_equal() + { return fission_equal(_device); } + /// True if splitting device into equal subdevices supported + inline bool fission_equal(const int i) + { return false; } + /// True if splitting device into subdevices by specified counts supported + inline bool fission_by_counts() + { return fission_by_counts(_device); } + /// True if splitting device into subdevices by specified counts supported + inline bool fission_by_counts(const int i) + { return false; } + /// True if splitting device into subdevices by affinity domains supported + inline bool fission_by_affinity() + { return fission_by_affinity(_device); } + /// True if splitting device into subdevices by affinity domains supported + inline bool fission_by_affinity(const int i) + { return false; } + + /// Maximum number of subdevices allowed from device fission + inline int max_sub_devices() + { return max_sub_devices(_device); } + /// Maximum number of subdevices allowed from device fission + inline int max_sub_devices(const int i) + { return 0; } + + /// List all devices along with all properties + inline void print_all(std::ostream &out); + + /// Select the platform that has accelerators (for compatibility with OpenCL) + inline int set_platform_accelerator(int pid=-1) { return UCL_SUCCESS; } + + inline int load_module(const void* program, hipModule_t& module, std::string *log=NULL){ + auto it = _loaded_modules.emplace(program, hipModule_t()); + if(!it.second){ + module = it.first->second; + return UCL_SUCCESS; + } + const unsigned int num_opts=2; + hipJitOption options[num_opts]; + void *values[num_opts]; + + // set up size of compilation log buffer + options[0] = hipJitOptionInfoLogBufferSizeBytes; + values[0] = (void *)(int)10240; + // set up pointer to the compilation log buffer + options[1] = hipJitOptionInfoLogBuffer; + char clog[10240] = { 0 }; + values[1] = clog; + + hipError_t err=hipModuleLoadDataEx(&module,program,num_opts, options,(void **)values); + + if (log!=NULL) + *log=std::string(clog); + + if (err != hipSuccess) { + #ifndef UCL_NO_EXIT + std::cerr << std::endl + << "----------------------------------------------------------\n" + << " UCL Error: Error compiling PTX Program...\n" + << "----------------------------------------------------------\n"; + std::cerr << log << std::endl; + #endif + _loaded_modules.erase(it.first); + return UCL_COMPILE_ERROR; + } + it.first->second = module; + return UCL_SUCCESS; + } + private: + std::unordered_map _loaded_modules; + int _device, _num_devices; + std::vector _properties; + std::vector _cq; + hipDevice_t _cu_device; +}; + +// Grabs the properties for all devices +UCL_Device::UCL_Device() { + CU_SAFE_CALL_NS(hipInit(0)); + CU_SAFE_CALL_NS(hipGetDeviceCount(&_num_devices)); + for (int i=0; i<_num_devices; ++i) { + hipDevice_t dev; + CU_SAFE_CALL_NS(hipDeviceGet(&dev,i)); + int major, minor; + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&major, hipDeviceAttributeComputeCapabilityMajor, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&minor, hipDeviceAttributeComputeCapabilityMinor, dev)); + if (major==9999) + continue; + + NVDProperties prop; + prop.device_id = i; + prop.major=major; + prop.minor=minor; + + char namecstr[1024]; + CU_SAFE_CALL_NS(hipDeviceGetName(namecstr,1024,dev)); + prop.name=namecstr; + + CU_SAFE_CALL_NS(hipDeviceTotalMem(&prop.totalGlobalMem,dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.multiProcessorCount, hipDeviceAttributeMultiprocessorCount, dev)); + + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxThreadsPerBlock, hipDeviceAttributeMaxThreadsPerBlock, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxThreadsDim[0], hipDeviceAttributeMaxBlockDimX, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxThreadsDim[1], hipDeviceAttributeMaxBlockDimY, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxThreadsDim[2], hipDeviceAttributeMaxBlockDimZ, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxGridSize[0], hipDeviceAttributeMaxGridDimX, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxGridSize[1], hipDeviceAttributeMaxGridDimY, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.maxGridSize[2], hipDeviceAttributeMaxGridDimZ, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.sharedMemPerBlock, hipDeviceAttributeMaxSharedMemoryPerBlock, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.totalConstantMemory, hipDeviceAttributeTotalConstantMemory, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.SIMDWidth, hipDeviceAttributeWarpSize, dev)); + //CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.memPitch, CU_DEVICE_ATTRIBUTE_MAX_PITCH, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.regsPerBlock, hipDeviceAttributeMaxRegistersPerBlock, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.clockRate, hipDeviceAttributeClockRate, dev)); + //CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.textureAlign, CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, dev)); + + //#if CUDA_VERSION >= 2020 + //CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.kernelExecTimeoutEnabled, CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT,dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.integrated, hipDeviceAttributeIntegrated, dev)); + //CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.canMapHostMemory, CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, dev)); + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.computeMode, hipDeviceAttributeComputeMode,dev)); + //#endif + //#if CUDA_VERSION >= 3010 + CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.concurrentKernels, hipDeviceAttributeConcurrentKernels, dev)); + //CU_SAFE_CALL_NS(hipDeviceGetAttribute(&prop.ECCEnabled, CU_DEVICE_ATTRIBUTE_ECC_ENABLED, dev)); + //#endif + + _properties.push_back(prop); + } + _device=-1; + _cq.push_back(hipStream_t()); + _cq.back()=0; +} + +UCL_Device::~UCL_Device() { + clear(); +} + +int UCL_Device::set_platform(const int pid) { + clear(); + #ifdef UCL_DEBUG + assert(pid-1) { + for (int i=1; i= 2020 + int driver_version; + hipDriverGetVersion(&driver_version); + out << "Driver Version: " + << driver_version/1000 << "." << driver_version%100 + << std::endl; + //#endif + + if (num_devices() == 0) + out << "There is no device supporting HIP\n"; + for (int i=0; i= 2000 + out << " Number of compute units/multiprocessors: " + << _properties[i].multiProcessorCount << std::endl; + out << " Number of cores: " + << cores(i) << std::endl; + //#endif + out << " Total amount of constant memory: " + << _properties[i].totalConstantMemory << " bytes\n"; + out << " Total amount of local/shared memory per block: " + << _properties[i].sharedMemPerBlock << " bytes\n"; + out << " Total number of registers available per block: " + << _properties[i].regsPerBlock << std::endl; + out << " Warp size: " + << _properties[i].SIMDWidth << std::endl; + out << " Maximum number of threads per block: " + << _properties[i].maxThreadsPerBlock << std::endl; + out << " Maximum group size (# of threads per block) " + << _properties[i].maxThreadsDim[0] << " x " + << _properties[i].maxThreadsDim[1] << " x " + << _properties[i].maxThreadsDim[2] << std::endl; + out << " Maximum item sizes (# threads for each dim) " + << _properties[i].maxGridSize[0] << " x " + << _properties[i].maxGridSize[1] << " x " + << _properties[i].maxGridSize[2] << std::endl; + //out << " Maximum memory pitch: " + // << max_pitch(i) << " bytes\n"; + //out << " Texture alignment: " + // << _properties[i].textureAlign << " bytes\n"; + out << " Clock rate: " + << clock_rate(i) << " GHz\n"; + //#if CUDA_VERSION >= 2020 + //out << " Run time limit on kernels: "; + //if (_properties[i].kernelExecTimeoutEnabled) + // out << "Yes\n"; + //else + // out << "No\n"; + out << " Integrated: "; + if (_properties[i].integrated) + out << "Yes\n"; + else + out << "No\n"; + //out << " Support host page-locked memory mapping: "; + //if (_properties[i].canMapHostMemory) + // out << "Yes\n"; + //else + // out << "No\n"; + out << " Compute mode: "; + if (_properties[i].computeMode == hipComputeModeDefault) + out << "Default\n"; // multiple threads can use device +//#if CUDA_VERSION >= 8000 +// else if (_properties[i].computeMode == hipComputeModeExclusiveProcess) +//#else + else if (_properties[i].computeMode == hipComputeModeExclusive) +//#endif + out << "Exclusive\n"; // only thread can use device + else if (_properties[i].computeMode == hipComputeModeProhibited) + out << "Prohibited\n"; // no thread can use device + //#if CUDART_VERSION >= 4000 + else if (_properties[i].computeMode == hipComputeModeExclusiveProcess) + out << "Exclusive Process\n"; // multiple threads 1 process + //#endif + else + out << "Unknown\n"; + //#endif + //#if CUDA_VERSION >= 3010 + out << " Concurrent kernel execution: "; + if (_properties[i].concurrentKernels) + out << "Yes\n"; + else + out << "No\n"; + //out << " Device has ECC support enabled: "; + //if (_properties[i].ECCEnabled) + // out << "Yes\n"; + //else + // out << "No\n"; + //#endif + } +} + +} + +#endif diff --git a/lib/gpu/geryon/hip_kernel.h b/lib/gpu/geryon/hip_kernel.h new file mode 100644 index 0000000000..654eb44772 --- /dev/null +++ b/lib/gpu/geryon/hip_kernel.h @@ -0,0 +1,298 @@ +/* ----------------------------------------------------------------------- + Copyright (2010) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the Simplified BSD License. + ----------------------------------------------------------------------- */ + +#ifndef HIP_KERNEL +#define HIP_KERNEL + + +#include +#include "hip_device.h" +#include +#include +#include + +namespace ucl_hip { + +class UCL_Texture; +template class UCL_D_Vec; +template class UCL_D_Mat; +template class UCL_Vector; +template class UCL_Matrix; +#define UCL_MAX_KERNEL_ARGS 256 + +/// Class storing 1 or more kernel functions from a single string or file +class UCL_Program { + UCL_Device* _device_ptr; + public: + inline UCL_Program(UCL_Device &device) { _device_ptr = &device; _cq=device.cq(); } + inline UCL_Program(UCL_Device &device, const void *program, + const char *flags="", std::string *log=NULL) { + _device_ptr = &device; _cq=device.cq(); + init(device); + load_string(program,flags,log); + } + + inline ~UCL_Program() {} + + /// Initialize the program with a device + inline void init(UCL_Device &device) { _device_ptr = &device; _cq=device.cq(); } + + /// Clear any data associated with program + /** \note Must call init() after each clear **/ + inline void clear() { } + + /// Load a program from a file and compile with flags + inline int load(const char *filename, const char *flags="", std::string *log=NULL) { + std::ifstream in(filename); + if (!in || in.is_open()==false) { + #ifndef UCL_NO_EXIT + std::cerr << "UCL Error: Could not open kernel file: " + << filename << std::endl; + UCL_GERYON_EXIT; + #endif + return UCL_FILE_NOT_FOUND; + } + + std::string program((std::istreambuf_iterator(in)), + std::istreambuf_iterator()); + in.close(); + return load_string(program.c_str(),flags,log); + } + + /// Load a program from a string and compile with flags + inline int load_string(const void *program, const char *flags="", std::string *log=NULL) { + return _device_ptr->load_module(program, _module, log); + } + + friend class UCL_Kernel; + private: + hipModule_t _module; + hipStream_t _cq; + friend class UCL_Texture; +}; + +/// Class for dealing with CUDA Driver kernels +class UCL_Kernel { + public: + UCL_Kernel() : _dimensions(1), _num_args(0) { + _num_blocks[0]=0; + } + + UCL_Kernel(UCL_Program &program, const char *function) : + _dimensions(1), _num_args(0) { + _num_blocks[0]=0; + set_function(program,function); + _cq=program._cq; + } + + ~UCL_Kernel() {} + + /// Clear any function associated with the kernel + inline void clear() { } + + /// Get the kernel function from a program + /** \ret UCL_ERROR_FLAG (UCL_SUCCESS, UCL_FILE_NOT_FOUND, UCL_ERROR) **/ + inline int set_function(UCL_Program &program, const char *function) { + hipError_t err=hipModuleGetFunction(&_kernel,program._module,function); + if (err!=hipSuccess) { + #ifndef UCL_NO_EXIT + std::cerr << "UCL Error: Could not find function: " << function + << " in program.\n"; + UCL_GERYON_EXIT; + #endif + return UCL_FUNCTION_NOT_FOUND; + } + _cq=program._cq; + return UCL_SUCCESS; + } + + /// Set the kernel argument. + /** If not a device pointer, this must be repeated each time the argument + * changes + * \note To set kernel parameter i (i>0), parameter i-1 must be set **/ + template + inline void set_arg(const unsigned index, const dtype * const arg) { + if (index==_num_args) + add_arg(arg); + else if (index<_num_args){ + assert(0==1); // not implemented + } + else + assert(0==1); // Must add kernel parameters in sequential order + } + + /// Set a geryon container as a kernel argument. + template + inline void set_arg(const UCL_D_Vec * const arg) + { set_arg(&arg->begin()); } + + /// Set a geryon container as a kernel argument. + template + inline void set_arg(const UCL_D_Mat * const arg) + { set_arg(&arg->begin()); } + + /// Set a geryon container as a kernel argument. + template + inline void set_arg(const UCL_Vector * const arg) + { set_arg(&arg->device.begin()); } + + /// Set a geryon container as a kernel argument. + template + inline void set_arg(const UCL_Matrix * const arg) + { set_arg(&arg->device.begin()); } + + /// Add a kernel argument. + inline void add_arg(const hipDeviceptr_t* const arg) { + add_arg((void**)arg); + } + + /// Add a kernel argument. + template + inline void add_arg(const dtype* const arg) { + const auto old_size = _hip_kernel_args.size(); + const auto aligned_size = (old_size+alignof(dtype)-1) & ~(alignof(dtype)-1); + const auto arg_size = sizeof(dtype); + _hip_kernel_args.resize(aligned_size + arg_size); + *((dtype*)(&_hip_kernel_args[aligned_size])) = *arg; + _num_args++; + if (_num_args>UCL_MAX_KERNEL_ARGS) assert(0==1); + } + + /// Add a geryon container as a kernel argument. + template + inline void add_arg(const UCL_D_Vec * const arg) + { add_arg(&arg->begin()); } + + /// Add a geryon container as a kernel argument. + template + inline void add_arg(const UCL_D_Mat * const arg) + { add_arg(&arg->begin()); } + + /// Add a geryon container as a kernel argument. + template + inline void add_arg(const UCL_Vector * const arg) + { add_arg(&arg->device.begin()); } + + /// Add a geryon container as a kernel argument. + template + inline void add_arg(const UCL_Matrix * const arg) + { add_arg(&arg->device.begin()); } + + /// Set the number of thread blocks and the number of threads in each block + /** \note This should be called before any arguments have been added + \note The default command queue is used for the kernel execution **/ + inline void set_size(const size_t num_blocks, const size_t block_size) { + _dimensions=1; + _num_blocks[0]=num_blocks; + _num_blocks[1]=1; + _num_blocks[2]=1; + + _block_size[0]=block_size; + _block_size[1]=1; + _block_size[2]=1; + } + + /// Set the number of thread blocks and the number of threads in each block + /** \note This should be called before any arguments have been added + \note The default command queue for the kernel is changed to cq **/ + inline void set_size(const size_t num_blocks, const size_t block_size, + command_queue &cq) + { _cq=cq; set_size(num_blocks,block_size); } + + /// Set the number of thread blocks and the number of threads in each block + /** \note This should be called before any arguments have been added + \note The default command queue is used for the kernel execution **/ + inline void set_size(const size_t num_blocks_x, const size_t num_blocks_y, + const size_t block_size_x, const size_t block_size_y) { + _dimensions=2; + _num_blocks[0]=num_blocks_x; + _num_blocks[1]=num_blocks_y; + _num_blocks[2]=1; + + _block_size[0]=block_size_x; + _block_size[1]=block_size_y; + _block_size[2]=1; + } + + /// Set the number of thread blocks and the number of threads in each block + /** \note This should be called before any arguments have been added + \note The default command queue for the kernel is changed to cq **/ + inline void set_size(const size_t num_blocks_x, const size_t num_blocks_y, + const size_t block_size_x, const size_t block_size_y, + command_queue &cq) + {_cq=cq; set_size(num_blocks_x, num_blocks_y, block_size_x, block_size_y);} + + /// Set the number of thread blocks and the number of threads in each block + /** \note This should be called before any arguments have been added + \note The default command queue is used for the kernel execution **/ + inline void set_size(const size_t num_blocks_x, const size_t num_blocks_y, + const size_t block_size_x, + const size_t block_size_y, const size_t block_size_z) { + _dimensions=2; + _num_blocks[0]=num_blocks_x; + _num_blocks[1]=num_blocks_y; + _num_blocks[2]=1; + + _block_size[0]=block_size_x; + _block_size[1]=block_size_y; + _block_size[2]=block_size_z; + } + + /// Set the number of thread blocks and the number of threads in each block + /** \note This should be called before any arguments have been added + \note The default command queue is used for the kernel execution **/ + inline void set_size(const size_t num_blocks_x, const size_t num_blocks_y, + const size_t block_size_x, const size_t block_size_y, + const size_t block_size_z, command_queue &cq) { + _cq=cq; + set_size(num_blocks_x, num_blocks_y, block_size_x, block_size_y, + block_size_z); + } + + /// Run the kernel in the default command queue + inline void run() { + size_t args_size = _hip_kernel_args.size(); + void *config[] = { + HIP_LAUNCH_PARAM_BUFFER_POINTER, (void*)_hip_kernel_args.data(), + HIP_LAUNCH_PARAM_BUFFER_SIZE, &args_size, + HIP_LAUNCH_PARAM_END + }; + const auto res = hipModuleLaunchKernel(_kernel,_num_blocks[0],_num_blocks[1], + _num_blocks[2],_block_size[0],_block_size[1], + _block_size[2],0,_cq, NULL, config); + CU_SAFE_CALL(res); +//#endif + } + + /// Clear any arguments associated with the kernel + inline void clear_args() { + _num_args=0; + _hip_kernel_args.clear(); + } + + /// Return the default command queue/stream associated with this data + inline command_queue & cq() { return _cq; } + /// Change the default command queue associated with matrix + inline void cq(command_queue &cq_in) { _cq=cq_in; } + #include "ucl_arg_kludge.h" + + private: + hipFunction_t _kernel; + hipStream_t _cq; + unsigned _dimensions; + unsigned _num_blocks[3]; + unsigned _num_args; + friend class UCL_Texture; + + unsigned _block_size[3]; + std::vector _hip_kernel_args; +}; + +} // namespace + +#endif + diff --git a/lib/gpu/geryon/hip_macros.h b/lib/gpu/geryon/hip_macros.h new file mode 100644 index 0000000000..9c9971b896 --- /dev/null +++ b/lib/gpu/geryon/hip_macros.h @@ -0,0 +1,83 @@ +#ifndef HIP_MACROS_H +#define HIP_MACROS_H + +#include +#include +#include + +//#if CUDA_VERSION >= 3020 +#define CUDA_INT_TYPE size_t +//#else +//#define CUDA_INT_TYPE unsigned +//#endif + +#ifdef MPI_GERYON +#include "mpi.h" +#define NVD_GERYON_EXIT do { \ + int is_final; \ + MPI_Finalized(&is_final); \ + if (!is_final) \ + MPI_Abort(MPI_COMM_WORLD,-1); \ + } while(0) +#else +#define NVD_GERYON_EXIT assert(0==1) +#endif + +#ifndef UCL_GERYON_EXIT +#define UCL_GERYON_EXIT NVD_GERYON_EXIT +#endif + +#ifdef UCL_DEBUG +#define UCL_SYNC_DEBUG +#define UCL_DESTRUCT_CHECK +#endif + +#ifndef UCL_NO_API_CHECK + +#define CU_SAFE_CALL_NS( call ) do { \ + hipError_t err = call; \ + if( hipSuccess != err) { \ + fprintf(stderr, "HIP runtime error %d in call at file '%s' in line %i.\n", \ + err, __FILE__, __LINE__ ); \ + NVD_GERYON_EXIT; \ + } } while (0) + +#ifdef UCL_SYNC_DEBUG + +#define CU_SAFE_CALL( call ) do { \ + CU_SAFE_CALL_NS( call ); \ + hipError_t err=hipCtxSynchronize(); \ + if( hipSuccess != err) { \ + fprintf(stderr, "HIP runtime error %d in file '%s' in line %i.\n", \ + err, __FILE__, __LINE__ ); \ + NVD_GERYON_EXIT; \ + } } while (0) + +#else + +#define CU_SAFE_CALL( call ) CU_SAFE_CALL_NS( call ) + +#endif + +#else // not DEBUG + +// void macros for performance reasons +#define CU_SAFE_CALL_NS( call ) call +#define CU_SAFE_CALL( call) call + +#endif + +#ifdef UCL_DESTRUCT_CHECK + +#define CU_DESTRUCT_CALL( call) CU_SAFE_CALL( call) +#define CU_DESTRUCT_CALL_NS( call) CU_SAFE_CALL_NS( call) + +#else + +#define CU_DESTRUCT_CALL( call) call +#define CU_DESTRUCT_CALL_NS( call) call + +#endif + +#endif + diff --git a/lib/gpu/geryon/hip_mat.h b/lib/gpu/geryon/hip_mat.h new file mode 100644 index 0000000000..d9bbb4e521 --- /dev/null +++ b/lib/gpu/geryon/hip_mat.h @@ -0,0 +1,43 @@ +/* ----------------------------------------------------------------------- + Copyright (2010) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the Simplified BSD License. + ----------------------------------------------------------------------- */ + +/*! \file */ + +#ifndef HIP_MAT_H +#define HIP_MAT_H + + +#include +#include "hip_memory.h" + +/// Namespace for CUDA Driver routines +namespace ucl_hip { + +#define _UCL_MAT_ALLOW +#define _UCL_DEVICE_PTR_MAT +#include "ucl_basemat.h" +#include "ucl_h_vec.h" +#include "ucl_h_mat.h" +#include "ucl_d_vec.h" +#include "ucl_d_mat.h" +#include "ucl_s_obj_help.h" +#include "ucl_vector.h" +#include "ucl_matrix.h" +#undef _UCL_DEVICE_PTR_MAT +#undef _UCL_MAT_ALLOW + +#define UCL_COPY_ALLOW +#include "ucl_copy.h" +#undef UCL_COPY_ALLOW + +#define UCL_PRINT_ALLOW +#include "ucl_print.h" +#undef UCL_PRINT_ALLOW + +} // namespace ucl_cudadr + +#endif diff --git a/lib/gpu/geryon/hip_memory.h b/lib/gpu/geryon/hip_memory.h new file mode 100644 index 0000000000..13f60ad939 --- /dev/null +++ b/lib/gpu/geryon/hip_memory.h @@ -0,0 +1,279 @@ +/* ----------------------------------------------------------------------- + Copyright (2010) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the Simplified BSD License. + ----------------------------------------------------------------------- */ + +#ifndef HIP_MEMORY_H +#define HIP_MEMORY_H + + +#include +#include +#include +#include +#include "hip_macros.h" +#include "hip_device.h" +#include "ucl_types.h" + +namespace ucl_hip { + +// -------------------------------------------------------------------------- +// - API Specific Types +// -------------------------------------------------------------------------- +//typedef dim3 ucl_kernel_dim; + +#ifdef __HIP_PLATFORM_NVCC__ +typedef enum hipArray_Format { + HIP_AD_FORMAT_UNSIGNED_INT8 = 0x01, + HIP_AD_FORMAT_UNSIGNED_INT16 = 0x02, + HIP_AD_FORMAT_UNSIGNED_INT32 = 0x03, + HIP_AD_FORMAT_SIGNED_INT8 = 0x08, + HIP_AD_FORMAT_SIGNED_INT16 = 0x09, + HIP_AD_FORMAT_SIGNED_INT32 = 0x0a, + HIP_AD_FORMAT_HALF = 0x10, + HIP_AD_FORMAT_FLOAT = 0x20 +}hipArray_Format; +#endif + +// -------------------------------------------------------------------------- +// - API SPECIFIC DEVICE POINTERS +// -------------------------------------------------------------------------- +typedef hipDeviceptr_t device_ptr; + +// -------------------------------------------------------------------------- +// - HOST MEMORY ALLOCATION ROUTINES +// -------------------------------------------------------------------------- +template +inline int _host_alloc(mat_type &mat, copy_type &cm, const size_t n, + const enum UCL_MEMOPT kind, const enum UCL_MEMOPT kind2){ + hipError_t err=hipSuccess; + if (kind==UCL_NOT_PINNED) + *(mat.host_ptr())=(typename mat_type::data_type*)malloc(n); + else if (kind==UCL_WRITE_ONLY) + err=hipHostMalloc((void **)mat.host_ptr(),n,hipHostMallocWriteCombined); + else + err=hipHostMalloc((void **)mat.host_ptr(),n,hipHostMallocDefault); + if (err!=hipSuccess || *(mat.host_ptr())==NULL) + return UCL_MEMORY_ERROR; + mat.cq()=cm.cq(); + return UCL_SUCCESS; +} + +template +inline int _host_alloc(mat_type &mat, UCL_Device &dev, const size_t n, + const enum UCL_MEMOPT kind, const enum UCL_MEMOPT kind2){ + hipError_t err=hipSuccess; + if (kind==UCL_NOT_PINNED) + *(mat.host_ptr())=(typename mat_type::data_type*)malloc(n); + else if (kind==UCL_WRITE_ONLY) + err=hipHostMalloc((void **)mat.host_ptr(),n,hipHostMallocWriteCombined); + else + err=hipHostMalloc((void **)mat.host_ptr(),n,hipHostMallocDefault); + if (err!=hipSuccess || *(mat.host_ptr())==NULL) + return UCL_MEMORY_ERROR; + mat.cq()=dev.cq(); + return UCL_SUCCESS; +} + +template +inline void _host_free(mat_type &mat) { + if (mat.kind()==UCL_VIEW) + return; + else if (mat.kind()!=UCL_NOT_PINNED) + CU_DESTRUCT_CALL(hipHostFree(mat.begin())); + else + free(mat.begin()); +} + +template +inline int _host_resize(mat_type &mat, const size_t n) { + _host_free(mat); + hipError_t err=hipSuccess; + if (mat.kind()==UCL_NOT_PINNED) + *(mat.host_ptr())=(typename mat_type::data_type*)malloc(n); + else if (mat.kind()==UCL_WRITE_ONLY) + err=hipHostMalloc((void **)mat.host_ptr(),n,hipHostMallocWriteCombined); + else + err=hipHostMalloc((void **)mat.host_ptr(),n,hipHostMallocDefault); + if (err!=hipSuccess || *(mat.host_ptr())==NULL) + return UCL_MEMORY_ERROR; + return UCL_SUCCESS; +} + +// -------------------------------------------------------------------------- +// - DEVICE MEMORY ALLOCATION ROUTINES +// -------------------------------------------------------------------------- +template +inline int _device_alloc(mat_type &mat, copy_type &cm, const size_t n, + const enum UCL_MEMOPT kind) { + hipError_t err=hipMalloc((void**)&mat.cbegin(),n); + if (err!=hipSuccess) + return UCL_MEMORY_ERROR; + mat.cq()=cm.cq(); + return UCL_SUCCESS; +} + +template +inline int _device_alloc(mat_type &mat, UCL_Device &dev, const size_t n, + const enum UCL_MEMOPT kind) { + hipError_t err=hipMalloc((void**)&mat.cbegin(),n); + if (err!=hipSuccess) + return UCL_MEMORY_ERROR; + mat.cq()=dev.cq(); + return UCL_SUCCESS; +} + +template +inline int _device_alloc(mat_type &mat, copy_type &cm, const size_t rows, + const size_t cols, size_t &pitch, + const enum UCL_MEMOPT kind) { + hipError_t err; + size_t upitch; + err=hipMallocPitch((void**)&mat.cbegin(),&upitch, + cols*sizeof(typename mat_type::data_type),rows); + pitch=static_cast(upitch); + if (err!=hipSuccess) + return UCL_MEMORY_ERROR; + mat.cq()=cm.cq(); + return UCL_SUCCESS; +} + +template +inline int _device_alloc(mat_type &mat, UCL_Device &d, const size_t rows, + const size_t cols, size_t &pitch, + const enum UCL_MEMOPT kind) { + hipError_t err; + size_t upitch; + err=hipMallocPitch((void**)&mat.cbegin(),&upitch, + cols*sizeof(typename mat_type::data_type),rows); + pitch=static_cast(upitch); + if (err!=hipSuccess) + return UCL_MEMORY_ERROR; + mat.cq()=d.cq(); + return UCL_SUCCESS; +} + +template +inline void _device_free(mat_type &mat) { + if (mat.kind()!=UCL_VIEW){ + CU_DESTRUCT_CALL(hipFree((void*)mat.cbegin())); + } +} + +template +inline int _device_resize(mat_type &mat, const size_t n) { + _device_free(mat); + hipError_t err=hipMalloc((void**)&mat.cbegin(),n); + if (err!=hipSuccess) + return UCL_MEMORY_ERROR; + return UCL_SUCCESS; +} + +template +inline int _device_resize(mat_type &mat, const size_t rows, + const size_t cols, size_t &pitch) { + _device_free(mat); + hipError_t err; + size_t upitch; + err=hipMallocPitch((void**)&mat.cbegin(),&upitch, + cols*sizeof(typename mat_type::data_type),rows); + pitch=static_cast(upitch); + if (err!=hipSuccess) + return UCL_MEMORY_ERROR; + return UCL_SUCCESS; +} + +inline void _device_view(hipDeviceptr_t *ptr, hipDeviceptr_t &in) { + *ptr=in; +} + +template +inline void _device_view(hipDeviceptr_t *ptr, numtyp *in) { + *ptr=0; +} + +inline void _device_view(hipDeviceptr_t *ptr, hipDeviceptr_t &in, + const size_t offset, const size_t numsize) { + *ptr=(hipDeviceptr_t)(((char*)in)+offset*numsize); +} + +template +inline void _device_view(hipDeviceptr_t *ptr, numtyp *in, + const size_t offset, const size_t numsize) { + *ptr=0; +} + +// -------------------------------------------------------------------------- +// - DEVICE IMAGE ALLOCATION ROUTINES +// -------------------------------------------------------------------------- +template +inline void _device_image_alloc(mat_type &mat, copy_type &cm, const size_t rows, + const size_t cols) { + assert(0==1); +} + +template +inline void _device_image_alloc(mat_type &mat, UCL_Device &d, const size_t rows, + const size_t cols) { + assert(0==1); +} + +template +inline void _device_image_free(mat_type &mat) { + assert(0==1); +} + +// -------------------------------------------------------------------------- +// - ZERO ROUTINES +// -------------------------------------------------------------------------- +inline void _host_zero(void *ptr, const size_t n) { + memset(ptr,0,n); +} + +template +inline void _device_zero(mat_type &mat, const size_t n, command_queue &cq) { + CU_SAFE_CALL(hipMemsetAsync((void*)mat.cbegin(),0,n,cq)); +} + + +// -------------------------------------------------------------------------- +// - MEMCPY ROUTINES +// -------------------------------------------------------------------------- + + +template +hipMemcpyKind _memcpy_kind(mat1 &dst, const mat2 &src){ + assert(mat1::MEM_TYPE < 2 && mat2::MEM_TYPE < 2); + return (hipMemcpyKind)((1 - mat2::MEM_TYPE)*2 + (1 - mat1::MEM_TYPE)); +} + +template +inline void ucl_mv_cpy(mat1 &dst, const mat2 &src, const size_t n) { + CU_SAFE_CALL(hipMemcpy((void*)dst.begin(), (void*)src.begin(), n, _memcpy_kind(dst, src))); +} + +template +inline void ucl_mv_cpy(mat1 &dst, const mat2 &src, const size_t n, hipStream_t &cq) { + CU_SAFE_CALL(hipMemcpyAsync((void*)dst.begin(), (void*)src.begin(), n, _memcpy_kind(dst, src), cq)); +} + +template +inline void ucl_mv_cpy(mat1 &dst, const size_t dpitch, const mat2 &src, + const size_t spitch, const size_t cols, + const size_t rows) { + CU_SAFE_CALL(hipMemcpy2D((void*)dst.begin(), dpitch, (void*)src.begin(), spitch, cols, rows, _memcpy_kind(dst, src))); +} + +template +inline void ucl_mv_cpy(mat1 &dst, const size_t dpitch, const mat2 &src, + const size_t spitch, const size_t cols, + const size_t rows,hipStream_t &cq) { + CU_SAFE_CALL(hipMemcpy2DAsync((void*)dst.begin(), dpitch, (void*)src.begin(), spitch, cols, rows, _memcpy_kind(dst, src), cq)); +} + +} // namespace ucl_cudart + +#endif + diff --git a/lib/gpu/geryon/hip_texture.h b/lib/gpu/geryon/hip_texture.h new file mode 100644 index 0000000000..e7aa4e1461 --- /dev/null +++ b/lib/gpu/geryon/hip_texture.h @@ -0,0 +1,113 @@ +/* ----------------------------------------------------------------------- + Copyright (2010) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the Simplified BSD License. + ----------------------------------------------------------------------- */ + +#ifndef HIP_TEXTURE +#define HIP_TEXTURE + + +#include +#include "hip_kernel.h" +#include "hip_mat.h" + +namespace ucl_hip { + +#ifdef __HIP_PLATFORM_NVCC__ +inline hipError_t hipModuleGetTexRef(CUtexref* texRef, hipModule_t hmod, const char* name){ + return hipCUResultTohipError(cuModuleGetTexRef(texRef, hmod, name)); +} +inline hipError_t hipTexRefSetFormat(CUtexref tex, hipArray_Format fmt, int NumPackedComponents) { + return hipCUResultTohipError(cuTexRefSetFormat(tex, (CUarray_format)fmt, NumPackedComponents )); +} +inline hipError_t hipTexRefSetAddress(size_t* offset, CUtexref tex, hipDeviceptr_t devPtr, size_t size) { + return hipCUResultTohipError(cuTexRefSetAddress(offset, tex, devPtr, size)); +} +#endif + +/// Class storing a texture reference +class UCL_Texture { + public: + UCL_Texture() {} + ~UCL_Texture() {} + /// Construct with a specified texture reference + inline UCL_Texture(UCL_Program &prog, const char *texture_name) + { get_texture(prog,texture_name); } + /// Set the texture reference for this object + inline void get_texture(UCL_Program &prog, const char *texture_name) + { + #ifdef __HIP_PLATFORM_NVCC__ + CU_SAFE_CALL(hipModuleGetTexRef(&_tex, prog._module, texture_name)); + #else + size_t _global_var_size; + CU_SAFE_CALL(hipModuleGetGlobal(&_device_ptr_to_global_var, &_global_var_size, prog._module, texture_name)); + #endif + } + + /// Bind a float array where each fetch grabs a vector of length numel + template + inline void bind_float(UCL_D_Vec &vec, const unsigned numel) + { _bind_float(vec,numel); } + + /// Bind a float array where each fetch grabs a vector of length numel + template + inline void bind_float(UCL_D_Mat &vec, const unsigned numel) + { _bind_float(vec,numel); } + + /// Bind a float array where each fetch grabs a vector of length numel + template + inline void bind_float(UCL_Vector &vec, const unsigned numel) + { _bind_float(vec.device,numel); } + + /// Bind a float array where each fetch grabs a vector of length numel + template + inline void bind_float(UCL_Matrix &vec, const unsigned numel) + { _bind_float(vec.device,numel); } + + /// Unbind the texture reference from the memory allocation + inline void unbind() { } + + /// Make a texture reference available to kernel + inline void allow(UCL_Kernel &kernel) { + //#if CUDA_VERSION < 4000 + //CU_SAFE_CALL(cuParamSetTexRef(kernel._kernel, CU_PARAM_TR_DEFAULT, _tex)); + //#endif + } + + private: +#ifdef __HIP_PLATFORM_NVCC__ + CUtexref _tex; +#else + void* _device_ptr_to_global_var; +#endif + friend class UCL_Kernel; + + template + inline void _bind_float(mat_typ &vec, const unsigned numel) { + #ifdef UCL_DEBUG + assert(numel!=0 && numel<5); + #endif + +#ifdef __HIP_PLATFORM_NVCC__ + if (vec.element_size()==sizeof(float)) + CU_SAFE_CALL(hipTexRefSetFormat(_tex, HIP_AD_FORMAT_FLOAT, numel)); + else { + if (numel>2) + CU_SAFE_CALL(hipTexRefSetFormat(_tex, HIP_AD_FORMAT_SIGNED_INT32, numel)); + else + CU_SAFE_CALL(hipTexRefSetFormat(_tex,HIP_AD_FORMAT_SIGNED_INT32,numel*2)); + } + CU_SAFE_CALL(hipTexRefSetAddress(NULL, _tex, vec.cbegin(), vec.numel()*vec.element_size())); +#else + void* data_ptr = (void*)vec.cbegin(); + CU_SAFE_CALL(hipMemcpyHtoD(hipDeviceptr_t(_device_ptr_to_global_var), &data_ptr, sizeof(void*))); +#endif + } +}; + +} // namespace + +#endif + diff --git a/lib/gpu/geryon/hip_timer.h b/lib/gpu/geryon/hip_timer.h new file mode 100644 index 0000000000..3be0b8cfd6 --- /dev/null +++ b/lib/gpu/geryon/hip_timer.h @@ -0,0 +1,107 @@ +/* ----------------------------------------------------------------------- + Copyright (2010) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the Simplified BSD License. + ----------------------------------------------------------------------- */ + +#ifndef HIP_TIMER_H +#define HIP_TIMER_H + + +#include +#include "hip_macros.h" +#include "hip_device.h" + +namespace ucl_hip { + +/// Class for timing CUDA Driver events +class UCL_Timer { + public: + inline UCL_Timer() : _total_time(0.0f), _initialized(false) { } + inline UCL_Timer(UCL_Device &dev) : _total_time(0.0f), _initialized(false) + { init(dev); } + + inline ~UCL_Timer() { clear(); } + + /// Clear any data associated with timer + /** \note init() must be called to reuse timer after a clear() **/ + inline void clear() { + if (_initialized) { + CU_DESTRUCT_CALL(hipEventDestroy(start_event)); + CU_DESTRUCT_CALL(hipEventDestroy(stop_event)); + _initialized=false; + _total_time=0.0; + } + } + + /// Initialize default command queue for timing + inline void init(UCL_Device &dev) { init(dev, dev.cq()); } + + /// Initialize command queue for timing + inline void init(UCL_Device &dev, command_queue &cq) { + clear(); + _cq=cq; + _initialized=true; + CU_SAFE_CALL( hipEventCreateWithFlags(&start_event,0) ); + CU_SAFE_CALL( hipEventCreateWithFlags(&stop_event,0) ); + } + + /// Start timing on command queue + inline void start() { CU_SAFE_CALL(hipEventRecord(start_event,_cq)); } + + /// Stop timing on command queue + inline void stop() { CU_SAFE_CALL(hipEventRecord(stop_event,_cq)); } + + /// Block until the start event has been reached on device + inline void sync_start() + { CU_SAFE_CALL(hipEventSynchronize(start_event)); } + + /// Block until the stop event has been reached on device + inline void sync_stop() + { CU_SAFE_CALL(hipEventSynchronize(stop_event)); } + + /// Set the time elapsed to zero (not the total_time) + inline void zero() { + CU_SAFE_CALL(hipEventRecord(start_event,_cq)); + CU_SAFE_CALL(hipEventRecord(stop_event,_cq)); + } + + /// Set the total time to zero + inline void zero_total() { _total_time=0.0; } + + /// Add time from previous start and stop to total + /** Forces synchronization **/ + inline double add_to_total() + { double t=time(); _total_time+=t; return t/1000.0; } + + /// Add a user specified time to the total (ms) + inline void add_time_to_total(const double t) { _total_time+=t; } + + /// Return the time (ms) of last start to stop - Forces synchronization + inline double time() { + float timer; + CU_SAFE_CALL(hipEventSynchronize(stop_event)); + CU_SAFE_CALL( hipEventElapsedTime(&timer,start_event,stop_event) ); + return timer; + } + + /// Return the time (s) of last start to stop - Forces synchronization + inline double seconds() { return time()/1000.0; } + + /// Return the total time in ms + inline double total_time() { return _total_time; } + + /// Return the total time in seconds + inline double total_seconds() { return _total_time/1000.0; } + + private: + hipEvent_t start_event, stop_event; + hipStream_t _cq; + double _total_time; + bool _initialized; +}; + +} // namespace + +#endif diff --git a/lib/gpu/geryon/ucl_get_devices.cpp b/lib/gpu/geryon/ucl_get_devices.cpp index 1fa758fb46..b8dfc6f7b1 100644 --- a/lib/gpu/geryon/ucl_get_devices.cpp +++ b/lib/gpu/geryon/ucl_get_devices.cpp @@ -36,6 +36,11 @@ using namespace ucl_cudadr; using namespace ucl_cudart; #endif +#ifdef UCL_HIP +#include "hip_device.h" +using namespace ucl_hip; +#endif + int main(int argc, char** argv) { UCL_Device cop; std::cout << "Found " << cop.num_platforms() << " platform(s).\n"; diff --git a/lib/gpu/lal_answer.cpp b/lib/gpu/lal_answer.cpp index aa6d33d334..95d40c0d0a 100644 --- a/lib/gpu/lal_answer.cpp +++ b/lib/gpu/lal_answer.cpp @@ -179,13 +179,15 @@ double AnswerT::energy_virial(double *eatom, double **vatom, if (_eflag) { for (int i=0; i<_inum; i++) evdwl+=engv[i]; - if (_ef_atom) - if (_ilist==NULL) + if (_ef_atom) { + if (_ilist==NULL) { for (int i=0; i<_inum; i++) eatom[i]+=engv[i]; - else + } else { for (int i=0; i<_inum; i++) eatom[_ilist[i]]+=engv[i]; + } + } vstart=_inum; } if (_vflag) { @@ -193,7 +195,7 @@ double AnswerT::energy_virial(double *eatom, double **vatom, for (int j=0; j<6; j++) { for (int i=vstart; i +#include +#endif + namespace LAMMPS_AL { #define AtomT Atom @@ -70,6 +75,26 @@ bool AtomT::alloc(const int nall) { } #endif + #ifdef USE_HIP_DEVICE_SORT + if (_gpu_nbor==1) { + size_t temp_storage_bytes = 0; + if(hipSuccess != hipcub::DeviceRadixSort::SortPairs(nullptr, temp_storage_bytes, sort_out_keys, sort_out_keys, sort_out_values, sort_out_values, _max_atoms)) + return false; + if(sort_out_size < _max_atoms){ + if (sort_out_keys ) hipFree(sort_out_keys); + if (sort_out_values) hipFree(sort_out_values); + hipMalloc(&sort_out_keys , _max_atoms * sizeof(unsigned)); + hipMalloc(&sort_out_values, _max_atoms * sizeof(int )); + sort_out_size = _max_atoms; + } + if(temp_storage_bytes > sort_temp_storage_size){ + if(sort_temp_storage) hipFree(sort_temp_storage); + hipMalloc(&sort_temp_storage, temp_storage_bytes); + sort_temp_storage_size = temp_storage_bytes; + } + } + #endif + // --------------------------- Device allocations int gpu_bytes=0; success=success && (x.alloc(_max_atoms*4,*dev,UCL_WRITE_ONLY, @@ -184,6 +209,27 @@ bool AtomT::add_fields(const bool charge, const bool rot, return false; } #endif + + #ifdef USE_HIP_DEVICE_SORT + if (_gpu_nbor==1) { + size_t temp_storage_bytes = 0; + if(hipSuccess != hipcub::DeviceRadixSort::SortPairs(nullptr, temp_storage_bytes, sort_out_keys, sort_out_keys, sort_out_values, sort_out_values, _max_atoms)) + return false; + if(sort_out_size < _max_atoms){ + if (sort_out_keys ) hipFree(sort_out_keys); + if (sort_out_values) hipFree(sort_out_values); + hipMalloc(&sort_out_keys , _max_atoms * sizeof(unsigned)); + hipMalloc(&sort_out_values, _max_atoms * sizeof(int )); + sort_out_size = _max_atoms; + } + if(temp_storage_bytes > sort_temp_storage_size){ + if(sort_temp_storage) hipFree(sort_temp_storage); + hipMalloc(&sort_temp_storage, temp_storage_bytes); + sort_temp_storage_size = temp_storage_bytes; + } + } + #endif + success=success && (dev_particle_id.alloc(_max_atoms,*dev, UCL_READ_ONLY)==UCL_SUCCESS); gpu_bytes+=dev_particle_id.row_bytes(); @@ -275,6 +321,19 @@ void AtomT::clear_resize() { if (_gpu_nbor==1) cudppDestroyPlan(sort_plan); #endif + #ifdef USE_HIP_DEVICE_SORT + if (_gpu_nbor==1) { + if(sort_out_keys) hipFree(sort_out_keys); + if(sort_out_values) hipFree(sort_out_values); + if(sort_temp_storage) hipFree(sort_temp_storage); + sort_out_keys = nullptr; + sort_out_values = nullptr; + sort_temp_storage = nullptr; + sort_temp_storage_size = 0; + sort_out_size = 0; + } + #endif + if (_gpu_nbor==2) { host_particle_id.clear(); host_cell_id.clear(); @@ -326,6 +385,22 @@ void AtomT::sort_neighbor(const int num_atoms) { UCL_GERYON_EXIT; } #endif + + #ifdef USE_HIP_DEVICE_SORT + if(sort_out_size < num_atoms){ + printf("AtomT::sort_neighbor: invalid temp buffer size\n"); + UCL_GERYON_EXIT; + } + if(hipSuccess != hipcub::DeviceRadixSort::SortPairs(sort_temp_storage, sort_temp_storage_size, (unsigned *)dev_cell_id.begin(), sort_out_keys, (int *)dev_particle_id.begin(), sort_out_values, num_atoms)){ + printf("AtomT::sort_neighbor: DeviceRadixSort error\n"); + UCL_GERYON_EXIT; + } + if(hipSuccess != hipMemcpy((unsigned *)dev_cell_id.begin(), sort_out_keys , num_atoms*sizeof(unsigned), hipMemcpyDeviceToDevice) || + hipSuccess != hipMemcpy((int *) dev_particle_id.begin(), sort_out_values, num_atoms*sizeof(int ), hipMemcpyDeviceToDevice)){ + printf("AtomT::sort_neighbor: copy output error\n"); + UCL_GERYON_EXIT; + } + #endif } #ifdef GPU_CAST diff --git a/lib/gpu/lal_atom.cu b/lib/gpu/lal_atom.cu index 28ff31c566..99c76ba625 100644 --- a/lib/gpu/lal_atom.cu +++ b/lib/gpu/lal_atom.cu @@ -13,7 +13,7 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_preprocessor.h" #endif diff --git a/lib/gpu/lal_atom.h b/lib/gpu/lal_atom.h index 57880d7ca9..e39740d6c8 100644 --- a/lib/gpu/lal_atom.h +++ b/lib/gpu/lal_atom.h @@ -29,6 +29,11 @@ using namespace ucl_opencl; #include "geryon/nvc_mat.h" #include "geryon/nvc_kernel.h" using namespace ucl_cudart; +#elif defined(USE_HIP) +#include "geryon/hip_timer.h" +#include "geryon/hip_mat.h" +#include "geryon/hip_kernel.h" +using namespace ucl_hip; #else #include "geryon/nvd_timer.h" #include "geryon/nvd_mat.h" @@ -477,6 +482,14 @@ class Atom { CUDPPConfiguration sort_config; CUDPPHandle sort_plan; #endif + + #ifdef USE_HIP_DEVICE_SORT + unsigned* sort_out_keys = nullptr; + int* sort_out_values = nullptr; + void* sort_temp_storage = nullptr; + size_t sort_temp_storage_size = 0; + size_t sort_out_size = 0; + #endif }; } diff --git a/lib/gpu/lal_aux_fun1.h b/lib/gpu/lal_aux_fun1.h index 47a216ff6f..5b7150d950 100644 --- a/lib/gpu/lal_aux_fun1.h +++ b/lib/gpu/lal_aux_fun1.h @@ -13,7 +13,7 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_preprocessor.h" #endif diff --git a/lib/gpu/lal_base_atomic.h b/lib/gpu/lal_base_atomic.h index e3e9829abc..fef810b17b 100644 --- a/lib/gpu/lal_base_atomic.h +++ b/lib/gpu/lal_base_atomic.h @@ -24,6 +24,8 @@ #include "geryon/ocl_texture.h" #elif defined(USE_CUDART) #include "geryon/nvc_texture.h" +#elif defined(USE_HIP) +#include "geryon/hip_texture.h" #else #include "geryon/nvd_texture.h" #endif diff --git a/lib/gpu/lal_base_charge.h b/lib/gpu/lal_base_charge.h index 64c19554b9..ea81dcdc4e 100644 --- a/lib/gpu/lal_base_charge.h +++ b/lib/gpu/lal_base_charge.h @@ -25,6 +25,8 @@ #include "geryon/ocl_texture.h" #elif defined(USE_CUDART) #include "geryon/nvc_texture.h" +#elif defined(USE_HIP) +#include "geryon/hip_texture.h" #else #include "geryon/nvd_texture.h" #endif diff --git a/lib/gpu/lal_base_dipole.h b/lib/gpu/lal_base_dipole.h index b51c4303cf..31a2a2d5f7 100644 --- a/lib/gpu/lal_base_dipole.h +++ b/lib/gpu/lal_base_dipole.h @@ -23,6 +23,8 @@ #ifdef USE_OPENCL #include "geryon/ocl_texture.h" +#elif defined(USE_HIP) +#include "geryon/hip_texture.h" #else #include "geryon/nvd_texture.h" #endif diff --git a/lib/gpu/lal_base_dpd.h b/lib/gpu/lal_base_dpd.h index 7a75282d0a..1e6f2ab1f2 100644 --- a/lib/gpu/lal_base_dpd.h +++ b/lib/gpu/lal_base_dpd.h @@ -23,6 +23,8 @@ #ifdef USE_OPENCL #include "geryon/ocl_texture.h" +#elif defined(USE_HIP) +#include "geryon/hip_texture.h" #else #include "geryon/nvd_texture.h" #endif diff --git a/lib/gpu/lal_base_ellipsoid.h b/lib/gpu/lal_base_ellipsoid.h index 7deeccbf44..061baac5b6 100644 --- a/lib/gpu/lal_base_ellipsoid.h +++ b/lib/gpu/lal_base_ellipsoid.h @@ -24,6 +24,8 @@ #include "geryon/ocl_texture.h" #elif defined(USE_CUDART) #include "geryon/nvc_texture.h" +#elif defined(USE_HIP) +#include "geryon/hip_texture.h" #else #include "geryon/nvd_texture.h" #endif diff --git a/lib/gpu/lal_base_three.h b/lib/gpu/lal_base_three.h index f5f36863c4..75589f705d 100644 --- a/lib/gpu/lal_base_three.h +++ b/lib/gpu/lal_base_three.h @@ -24,6 +24,8 @@ #include "geryon/ocl_texture.h" #elif defined(USE_CUDART) #include "geryon/nvc_texture.h" +#elif defined(USE_HIP) +#include "geryon/hip_texture.h" #else #include "geryon/nvd_texture.h" #endif diff --git a/lib/gpu/lal_beck.cu b/lib/gpu/lal_beck.cu index 7d72128b5f..bdfa57a0ce 100644 --- a/lib/gpu/lal_beck.cu +++ b/lib/gpu/lal_beck.cu @@ -13,12 +13,12 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_born.cu b/lib/gpu/lal_born.cu index 0ca7fea5fe..6e1d7d95a0 100644 --- a/lib/gpu/lal_born.cu +++ b/lib/gpu/lal_born.cu @@ -13,12 +13,12 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_born_coul_long.cu b/lib/gpu/lal_born_coul_long.cu index 71e5e0ae50..441ce4beb5 100644 --- a/lib/gpu/lal_born_coul_long.cu +++ b/lib/gpu/lal_born_coul_long.cu @@ -13,15 +13,15 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_born_coul_long_cs.cu b/lib/gpu/lal_born_coul_long_cs.cu index b3e79d9ec8..f4b6da2d0d 100644 --- a/lib/gpu/lal_born_coul_long_cs.cu +++ b/lib/gpu/lal_born_coul_long_cs.cu @@ -13,15 +13,16 @@ // email : ndactrung@gmail.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" + #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_born_coul_wolf.cu b/lib/gpu/lal_born_coul_wolf.cu index 2c2249feeb..e34367e18b 100644 --- a/lib/gpu/lal_born_coul_wolf.cu +++ b/lib/gpu/lal_born_coul_wolf.cu @@ -13,15 +13,15 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_born_coul_wolf_cs.cu b/lib/gpu/lal_born_coul_wolf_cs.cu index 847387bfe8..1a02420736 100644 --- a/lib/gpu/lal_born_coul_wolf_cs.cu +++ b/lib/gpu/lal_born_coul_wolf_cs.cu @@ -13,15 +13,15 @@ // email : ndactrung@gmail.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_buck.cu b/lib/gpu/lal_buck.cu index c1e1c7d7e2..c23186f2d8 100644 --- a/lib/gpu/lal_buck.cu +++ b/lib/gpu/lal_buck.cu @@ -13,12 +13,12 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_buck_coul.cu b/lib/gpu/lal_buck_coul.cu index 6f0d414825..2282532f4a 100644 --- a/lib/gpu/lal_buck_coul.cu +++ b/lib/gpu/lal_buck_coul.cu @@ -13,15 +13,15 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_buck_coul_long.cu b/lib/gpu/lal_buck_coul_long.cu index da3237a31f..469c235571 100644 --- a/lib/gpu/lal_buck_coul_long.cu +++ b/lib/gpu/lal_buck_coul_long.cu @@ -13,15 +13,15 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_charmm_long.cu b/lib/gpu/lal_charmm_long.cu index 244131f833..a797707057 100644 --- a/lib/gpu/lal_charmm_long.cu +++ b/lib/gpu/lal_charmm_long.cu @@ -13,15 +13,15 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_colloid.cu b/lib/gpu/lal_colloid.cu index 28a9809b19..437faff25b 100644 --- a/lib/gpu/lal_colloid.cu +++ b/lib/gpu/lal_colloid.cu @@ -13,12 +13,12 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_coul.cu b/lib/gpu/lal_coul.cu index 503e674c81..21d849bb6f 100644 --- a/lib/gpu/lal_coul.cu +++ b/lib/gpu/lal_coul.cu @@ -13,15 +13,15 @@ // email : ndtrung@umich.edu // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_coul_debye.cu b/lib/gpu/lal_coul_debye.cu index 464a1b18de..ab8bc5b961 100644 --- a/lib/gpu/lal_coul_debye.cu +++ b/lib/gpu/lal_coul_debye.cu @@ -13,15 +13,15 @@ // email : ndtrung@umich.edu // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_coul_dsf.cu b/lib/gpu/lal_coul_dsf.cu index 82c44cd382..147ac68552 100644 --- a/lib/gpu/lal_coul_dsf.cu +++ b/lib/gpu/lal_coul_dsf.cu @@ -13,15 +13,15 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_coul_long.cu b/lib/gpu/lal_coul_long.cu index 365195e00c..f97a039629 100644 --- a/lib/gpu/lal_coul_long.cu +++ b/lib/gpu/lal_coul_long.cu @@ -13,15 +13,15 @@ // email : a.kohlmeyer@temple.edu // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_coul_long_cs.cu b/lib/gpu/lal_coul_long_cs.cu index 3c34666131..1479157944 100644 --- a/lib/gpu/lal_coul_long_cs.cu +++ b/lib/gpu/lal_coul_long_cs.cu @@ -13,15 +13,15 @@ // email : ndactrung@gmail.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index 5bd306ea5b..aaf74ed28c 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -268,7 +268,7 @@ int DeviceT::init(Answer &ans, const bool charge, gpu_nbor=1; else if (_gpu_mode==Device::GPU_HYB_NEIGH) gpu_nbor=2; - #ifndef USE_CUDPP + #if !defined(USE_CUDPP) && !defined(USE_HIP_DEVICE_SORT) if (gpu_nbor==1) gpu_nbor=2; #endif @@ -341,7 +341,7 @@ int DeviceT::init_nbor(Neighbor *nbor, const int nlocal, gpu_nbor=1; else if (_gpu_mode==Device::GPU_HYB_NEIGH) gpu_nbor=2; - #ifndef USE_CUDPP + #if !defined(USE_CUDPP) && !defined(USE_HIP_DEVICE_SORT) if (gpu_nbor==1) gpu_nbor=2; #endif @@ -712,7 +712,7 @@ int DeviceT::compile_kernels() { gpu_lib_data.update_host(false); _ptx_arch=static_cast(gpu_lib_data[0])/100.0; - #ifndef USE_OPENCL + #if !(defined(USE_OPENCL) || defined(USE_HIP)) if (_ptx_arch>gpu->arch() || floor(_ptx_arch)arch())) return -4; #endif diff --git a/lib/gpu/lal_device.cu b/lib/gpu/lal_device.cu index 37d0758845..afc7a0b988 100644 --- a/lib/gpu/lal_device.cu +++ b/lib/gpu/lal_device.cu @@ -13,7 +13,7 @@ // email : brownw@ornl.gov // *************************************************************************** -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_preprocessor.h" #endif diff --git a/lib/gpu/lal_dipole_lj.cu b/lib/gpu/lal_dipole_lj.cu index 745bdb7f27..8ea49e7f60 100644 --- a/lib/gpu/lal_dipole_lj.cu +++ b/lib/gpu/lal_dipole_lj.cu @@ -13,16 +13,16 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; -texture mu_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); +_texture( mu_tex,float4); #else -texture pos_tex; -texture q_tex; -texture mu_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); +_texture_2d( mu_tex,int4); #endif #else diff --git a/lib/gpu/lal_dipole_lj_sf.cu b/lib/gpu/lal_dipole_lj_sf.cu index 9847e84823..9d753d9b63 100644 --- a/lib/gpu/lal_dipole_lj_sf.cu +++ b/lib/gpu/lal_dipole_lj_sf.cu @@ -13,17 +13,17 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; -texture mu_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); +_texture( mu_tex,float4); #else -texture pos_tex; -texture q_tex; -texture mu_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); +_texture_2d( mu_tex,int4); #endif #else diff --git a/lib/gpu/lal_dipole_long_lj.cu b/lib/gpu/lal_dipole_long_lj.cu index f888dece9b..95c3b7a3db 100644 --- a/lib/gpu/lal_dipole_long_lj.cu +++ b/lib/gpu/lal_dipole_long_lj.cu @@ -13,16 +13,16 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; -texture mu_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); +_texture( mu_tex,float4); #else -texture pos_tex; -texture q_tex; -texture mu_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); +_texture_2d( mu_tex,int4); #endif #else diff --git a/lib/gpu/lal_dpd.cu b/lib/gpu/lal_dpd.cu index 462401ad70..d97f430f77 100644 --- a/lib/gpu/lal_dpd.cu +++ b/lib/gpu/lal_dpd.cu @@ -13,14 +13,14 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture vel_tex; +_texture( pos_tex,float4); +_texture( vel_tex,float4); #else -texture pos_tex; -texture vel_tex; +_texture_2d( pos_tex,int4); +_texture_2d( vel_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_eam.cu b/lib/gpu/lal_eam.cu index 13440b7d45..9427b1832f 100644 --- a/lib/gpu/lal_eam.cu +++ b/lib/gpu/lal_eam.cu @@ -13,27 +13,27 @@ // email : brownw@ornl.gov nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture fp_tex; -texture rhor_sp1_tex; -texture rhor_sp2_tex; -texture frho_sp1_tex; -texture frho_sp2_tex; -texture z2r_sp1_tex; -texture z2r_sp2_tex; +_texture( pos_tex,float4); +_texture( fp_tex,float); +_texture( rhor_sp1_tex,float4); +_texture( rhor_sp2_tex,float4); +_texture( frho_sp1_tex,float4); +_texture( frho_sp2_tex,float4); +_texture( z2r_sp1_tex,float4); +_texture( z2r_sp2_tex,float4); #else -texture pos_tex; -texture fp_tex; -texture rhor_sp1_tex; -texture rhor_sp2_tex; -texture frho_sp1_tex; -texture frho_sp2_tex; -texture z2r_sp1_tex; -texture z2r_sp2_tex; +_texture( pos_tex,int4); +_texture( fp_tex,int2); +_texture( rhor_sp1_tex,int4); +_texture( rhor_sp2_tex,int4); +_texture( frho_sp1_tex,int4); +_texture( frho_sp2_tex,int4); +_texture( z2r_sp1_tex,int4); +_texture( z2r_sp2_tex,int4); #endif #else diff --git a/lib/gpu/lal_ellipsoid_extra.h b/lib/gpu/lal_ellipsoid_extra.h index 71668f5e02..e6122c7404 100644 --- a/lib/gpu/lal_ellipsoid_extra.h +++ b/lib/gpu/lal_ellipsoid_extra.h @@ -18,12 +18,14 @@ enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE}; -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex, quat_tex; +_texture( pos_tex, float4); +_texture( quat_tex,float4); #else -texture pos_tex, quat_tex; +_texture_2d( pos_tex,int4); +_texture_2d( quat_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_ellipsoid_nbor.cu b/lib/gpu/lal_ellipsoid_nbor.cu index cac77f5dd3..e6eedc7159 100644 --- a/lib/gpu/lal_ellipsoid_nbor.cu +++ b/lib/gpu/lal_ellipsoid_nbor.cu @@ -13,12 +13,12 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_preprocessor.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_gauss.cu b/lib/gpu/lal_gauss.cu index 98e71ea413..f9d3741537 100644 --- a/lib/gpu/lal_gauss.cu +++ b/lib/gpu/lal_gauss.cu @@ -13,12 +13,12 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_gayberne.cu b/lib/gpu/lal_gayberne.cu index cd1ee59fc6..5c035da004 100644 --- a/lib/gpu/lal_gayberne.cu +++ b/lib/gpu/lal_gayberne.cu @@ -13,7 +13,7 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_ellipsoid_extra.h" #endif diff --git a/lib/gpu/lal_gayberne_lj.cu b/lib/gpu/lal_gayberne_lj.cu index 7925b72784..eb9c797dc7 100644 --- a/lib/gpu/lal_gayberne_lj.cu +++ b/lib/gpu/lal_gayberne_lj.cu @@ -13,7 +13,7 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_ellipsoid_extra.h" #endif diff --git a/lib/gpu/lal_lj.cu b/lib/gpu/lal_lj.cu index 5838ac95cf..716346a83d 100644 --- a/lib/gpu/lal_lj.cu +++ b/lib/gpu/lal_lj.cu @@ -13,12 +13,12 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_lj96.cu b/lib/gpu/lal_lj96.cu index 8dd63ef920..aa06caa4ae 100644 --- a/lib/gpu/lal_lj96.cu +++ b/lib/gpu/lal_lj96.cu @@ -13,12 +13,12 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_lj_class2_long.cu b/lib/gpu/lal_lj_class2_long.cu index 41ceca35d7..4e1bf9c1f7 100644 --- a/lib/gpu/lal_lj_class2_long.cu +++ b/lib/gpu/lal_lj_class2_long.cu @@ -13,15 +13,15 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_lj_coul.cu b/lib/gpu/lal_lj_coul.cu index 5c7f0da46f..cd72f72d97 100644 --- a/lib/gpu/lal_lj_coul.cu +++ b/lib/gpu/lal_lj_coul.cu @@ -13,15 +13,15 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_lj_coul_debye.cu b/lib/gpu/lal_lj_coul_debye.cu index 91b105b3da..40b7046623 100644 --- a/lib/gpu/lal_lj_coul_debye.cu +++ b/lib/gpu/lal_lj_coul_debye.cu @@ -13,15 +13,15 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_lj_coul_long.cu b/lib/gpu/lal_lj_coul_long.cu index 0e25bb2dbc..6a09cc4b75 100644 --- a/lib/gpu/lal_lj_coul_long.cu +++ b/lib/gpu/lal_lj_coul_long.cu @@ -13,15 +13,15 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_lj_coul_msm.cu b/lib/gpu/lal_lj_coul_msm.cu index 3f73c6f47d..c8eaa47b3d 100644 --- a/lib/gpu/lal_lj_coul_msm.cu +++ b/lib/gpu/lal_lj_coul_msm.cu @@ -13,19 +13,19 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; -texture gcons_tex; -texture dgcons_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); +_texture( gcons_tex,float); +_texture( dgcons_tex,float); #else -texture pos_tex; -texture q_tex; -texture gcons_tex; -texture dgcons_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); +_texture( gcons_tex,int2); +_texture( dgcons_tex,int2); #endif #else diff --git a/lib/gpu/lal_lj_cubic.cu b/lib/gpu/lal_lj_cubic.cu index 683c6b2aac..b6a0768a36 100644 --- a/lib/gpu/lal_lj_cubic.cu +++ b/lib/gpu/lal_lj_cubic.cu @@ -13,12 +13,12 @@ // email : ndactrung@gmail.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_lj_dsf.cu b/lib/gpu/lal_lj_dsf.cu index 323576fe77..2475743ccc 100644 --- a/lib/gpu/lal_lj_dsf.cu +++ b/lib/gpu/lal_lj_dsf.cu @@ -13,15 +13,15 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_lj_expand.cu b/lib/gpu/lal_lj_expand.cu index 9281ad27bd..4496835588 100644 --- a/lib/gpu/lal_lj_expand.cu +++ b/lib/gpu/lal_lj_expand.cu @@ -13,13 +13,13 @@ // email : ibains@nvidia.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else diff --git a/lib/gpu/lal_lj_expand_coul_long.cu b/lib/gpu/lal_lj_expand_coul_long.cu index aa8f02be8c..e9de9bab27 100644 --- a/lib/gpu/lal_lj_expand_coul_long.cu +++ b/lib/gpu/lal_lj_expand_coul_long.cu @@ -13,15 +13,15 @@ // email : ndactrung@gmail.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_lj_gromacs.cu b/lib/gpu/lal_lj_gromacs.cu index 93dc3d9456..dcef79dc90 100644 --- a/lib/gpu/lal_lj_gromacs.cu +++ b/lib/gpu/lal_lj_gromacs.cu @@ -13,13 +13,13 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else diff --git a/lib/gpu/lal_lj_sdk.cu b/lib/gpu/lal_lj_sdk.cu index 01b2cdd18d..a11b1c7887 100644 --- a/lib/gpu/lal_lj_sdk.cu +++ b/lib/gpu/lal_lj_sdk.cu @@ -13,12 +13,12 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_lj_sdk_long.cu b/lib/gpu/lal_lj_sdk_long.cu index 5ff64b2254..e28fa19db4 100644 --- a/lib/gpu/lal_lj_sdk_long.cu +++ b/lib/gpu/lal_lj_sdk_long.cu @@ -13,15 +13,15 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_lj_tip4p_long.cpp b/lib/gpu/lal_lj_tip4p_long.cpp index d44edc8cbd..0b781300c7 100644 --- a/lib/gpu/lal_lj_tip4p_long.cpp +++ b/lib/gpu/lal_lj_tip4p_long.cpp @@ -23,7 +23,7 @@ const char *lj_tip4p=0; #include "lal_lj_tip4p_long.h" #include -using namespace LAMMPS_AL; +namespace LAMMPS_AL { #define LJTIP4PLongT LJ_TIP4PLong extern Device device; @@ -370,6 +370,5 @@ int** LJTIP4PLongT::compute(const int ago, const int inum_full, } - - template class LJ_TIP4PLong; +} diff --git a/lib/gpu/lal_lj_tip4p_long.cu b/lib/gpu/lal_lj_tip4p_long.cu index 147c460795..092513da4d 100644 --- a/lib/gpu/lal_lj_tip4p_long.cu +++ b/lib/gpu/lal_lj_tip4p_long.cu @@ -13,7 +13,7 @@ // email : thevsevak@gmail.com // *************************************************************************** -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifdef LAMMPS_SMALLBIG @@ -27,11 +27,11 @@ #define tagint int #endif #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif #else diff --git a/lib/gpu/lal_mie.cu b/lib/gpu/lal_mie.cu index 33018566eb..e2ede4d3a1 100644 --- a/lib/gpu/lal_mie.cu +++ b/lib/gpu/lal_mie.cu @@ -13,12 +13,12 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_morse.cu b/lib/gpu/lal_morse.cu index 0a14071d19..7e4e0e54fa 100644 --- a/lib/gpu/lal_morse.cu +++ b/lib/gpu/lal_morse.cu @@ -13,13 +13,13 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else diff --git a/lib/gpu/lal_neighbor_cpu.cu b/lib/gpu/lal_neighbor_cpu.cu index d005eb9f97..29141a8b90 100644 --- a/lib/gpu/lal_neighbor_cpu.cu +++ b/lib/gpu/lal_neighbor_cpu.cu @@ -13,7 +13,7 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_preprocessor.h" #endif diff --git a/lib/gpu/lal_neighbor_gpu.cu b/lib/gpu/lal_neighbor_gpu.cu index 83692a24e4..8a2b603217 100644 --- a/lib/gpu/lal_neighbor_gpu.cu +++ b/lib/gpu/lal_neighbor_gpu.cu @@ -14,7 +14,7 @@ // email : penwang@nvidia.com, brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_preprocessor.h" #ifdef LAMMPS_SMALLBIG #define tagint int @@ -27,9 +27,9 @@ #define tagint int #endif #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif __kernel void calc_cell_id(const numtyp4 *restrict pos, diff --git a/lib/gpu/lal_neighbor_shared.h b/lib/gpu/lal_neighbor_shared.h index 834ee8406d..5cfc4e4767 100644 --- a/lib/gpu/lal_neighbor_shared.h +++ b/lib/gpu/lal_neighbor_shared.h @@ -24,6 +24,10 @@ using namespace ucl_opencl; #include "geryon/nvc_kernel.h" #include "geryon/nvc_texture.h" using namespace ucl_cudart; +#elif defined(USE_HIP) +#include "geryon/hip_kernel.h" +#include "geryon/hip_texture.h" +using namespace ucl_hip; #else #include "geryon/nvd_kernel.h" #include "geryon/nvd_texture.h" diff --git a/lib/gpu/lal_pppm.cu b/lib/gpu/lal_pppm.cu index 24636b9a93..6a7408c720 100644 --- a/lib/gpu/lal_pppm.cu +++ b/lib/gpu/lal_pppm.cu @@ -13,15 +13,15 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_preprocessor.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture q_tex; +_texture( pos_tex,float4); +_texture( q_tex,float); #else -texture pos_tex; -texture q_tex; +_texture_2d( pos_tex,int4); +_texture( q_tex,int2); #endif // Allow PPPM to compile without atomics for NVIDIA 1.0 cards, error diff --git a/lib/gpu/lal_pppm.h b/lib/gpu/lal_pppm.h index 045423e079..bc5f216076 100644 --- a/lib/gpu/lal_pppm.h +++ b/lib/gpu/lal_pppm.h @@ -23,6 +23,8 @@ #include "geryon/ocl_texture.h" #elif defined(USE_CUDART) #include "geryon/nvc_texture.h" +#elif defined(USE_HIP) +#include "geryon/hip_texture.h" #else #include "geryon/nvd_texture.h" #endif diff --git a/lib/gpu/lal_precision.h b/lib/gpu/lal_precision.h index d5b1b9b6c0..7f82ba18aa 100644 --- a/lib/gpu/lal_precision.h +++ b/lib/gpu/lal_precision.h @@ -24,9 +24,11 @@ struct _lgpu_int2 { int x; int y; }; +#ifndef USE_HIP #ifndef int2 #define int2 _lgpu_int2 #endif +#endif struct _lgpu_float2 { float x; float y; diff --git a/lib/gpu/lal_preprocessor.h b/lib/gpu/lal_preprocessor.h index 566a451c21..cd95355ee4 100644 --- a/lib/gpu/lal_preprocessor.h +++ b/lib/gpu/lal_preprocessor.h @@ -1,4 +1,4 @@ -// ************************************************************************** +// ************************************************************************** // preprocessor.cu // ------------------- // W. Michael Brown (ORNL) @@ -60,6 +60,150 @@ // //*************************************************************************/ +#define _texture(name, type) texture name +#define _texture_2d(name, type) texture name + +// ------------------------------------------------------------------------- +// HIP DEFINITIONS +// ------------------------------------------------------------------------- + +#ifdef USE_HIP + #include + #ifdef __HIP_PLATFORM_HCC__ + #define mul24(x, y) __mul24(x, y) + #undef _texture + #undef _texture_2d + #define _texture(name, type) __device__ type* name + #define _texture_2d(name, type) __device__ type* name + #endif + #define GLOBAL_ID_X threadIdx.x+mul24(blockIdx.x,blockDim.x) + #define GLOBAL_ID_Y threadIdx.y+mul24(blockIdx.y,blockDim.y) + #define GLOBAL_SIZE_X mul24(gridDim.x,blockDim.x); + #define GLOBAL_SIZE_Y mul24(gridDim.y,blockDim.y); + #define THREAD_ID_X threadIdx.x + #define THREAD_ID_Y threadIdx.y + #define BLOCK_ID_X blockIdx.x + #define BLOCK_ID_Y blockIdx.y + #define BLOCK_SIZE_X blockDim.x + #define BLOCK_SIZE_Y blockDim.y + #define __kernel extern "C" __global__ + #ifdef __local + #undef __local + #endif + #define __local __shared__ + #define __global + #define restrict __restrict__ + #define atom_add atomicAdd + #define ucl_inline static __inline__ __device__ + + #define THREADS_PER_ATOM 4 + #define THREADS_PER_CHARGE 8 + #define BLOCK_NBOR_BUILD 128 + #define BLOCK_PAIR 256 + #define BLOCK_BIO_PAIR 256 + #define BLOCK_ELLIPSE 128 + #define MAX_SHARED_TYPES 11 + + #ifdef _SINGLE_SINGLE + ucl_inline double shfl_xor(double var, int laneMask, int width) { + #ifdef __HIP_PLATFORM_HCC__ + return __shfl_xor(var, laneMask, width); + #else + return __shfl_xor_sync(0xffffffff, var, laneMask, width); + #endif + } + #else + ucl_inline double shfl_xor(double var, int laneMask, int width) { + int2 tmp; + tmp.x = __double2hiint(var); + tmp.y = __double2loint(var); + #ifdef __HIP_PLATFORM_HCC__ + tmp.x = __shfl_xor(tmp.x,laneMask,width); + tmp.y = __shfl_xor(tmp.y,laneMask,width); + #else + tmp.x = __shfl_xor_sync(0xffffffff, tmp.x,laneMask,width); + tmp.y = __shfl_xor_sync(0xffffffff, tmp.y,laneMask,width); + #endif + return __hiloint2double(tmp.x,tmp.y); + } + #endif + + #ifdef __HIP_PLATFORM_HCC__ + #define ARCH 600 + #define WARP_SIZE 64 + #endif + + #ifdef __HIP_PLATFORM_NVCC__ + #define ARCH __CUDA_ARCH__ + #define WARP_SIZE 32 + #endif + + #define fast_mul(X,Y) (X)*(Y) + + #define MEM_THREADS WARP_SIZE + #define PPPM_BLOCK_1D 64 + #define BLOCK_CELL_2D 8 + #define BLOCK_CELL_ID 128 + #define MAX_BIO_SHARED_TYPES 128 + + #ifdef __HIP_PLATFORM_NVCC__ + #ifdef _DOUBLE_DOUBLE + #define fetch4(ans,i,pos_tex) { \ + int4 xy = tex1Dfetch(pos_tex,i*2); \ + int4 zt = tex1Dfetch(pos_tex,i*2+1); \ + ans.x=__hiloint2double(xy.y, xy.x); \ + ans.y=__hiloint2double(xy.w, xy.z); \ + ans.z=__hiloint2double(zt.y, zt.x); \ + ans.w=__hiloint2double(zt.w, zt.z); \ + } + #define fetch(ans,i,q_tex) { \ + int2 qt = tex1Dfetch(q_tex,i); \ + ans=__hiloint2double(qt.y, qt.x); \ + } + #else + #define fetch4(ans,i,pos_tex) ans=tex1Dfetch(pos_tex, i); + #define fetch(ans,i,q_tex) ans=tex1Dfetch(q_tex,i); + #endif + #else + #ifdef _DOUBLE_DOUBLE + #define fetch4(ans,i,pos_tex) (ans=*(((double4*)pos_tex) + i)) + #define fetch(ans,i,q_tex) (ans=*(((double *) q_tex) + i)) + #else + #define fetch4(ans,i,pos_tex) (ans=*(((float4*)pos_tex) + i)) + #define fetch(ans,i,q_tex) (ans=*(((float *) q_tex) + i)) + #endif + #endif + + #ifdef _DOUBLE_DOUBLE + #define ucl_exp exp + #define ucl_powr pow + #define ucl_atan atan + #define ucl_cbrt cbrt + #define ucl_ceil ceil + #define ucl_abs fabs + #define ucl_rsqrt rsqrt + #define ucl_sqrt sqrt + #define ucl_recip(x) ((numtyp)1.0/(x)) + + #else + #define ucl_atan atanf + #define ucl_cbrt cbrtf + #define ucl_ceil ceilf + #define ucl_abs fabsf + #define ucl_recip(x) ((numtyp)1.0/(x)) + #define ucl_rsqrt rsqrtf + #define ucl_sqrt sqrtf + + #ifdef NO_HARDWARE_TRANSCENDENTALS + #define ucl_exp expf + #define ucl_powr powf + #else + #define ucl_exp __expf + #define ucl_powr __powf + #endif + #endif +#endif + // ------------------------------------------------------------------------- // CUDA DEFINITIONS // ------------------------------------------------------------------------- diff --git a/lib/gpu/lal_re_squared.cu b/lib/gpu/lal_re_squared.cu index e238734074..cd525a1ade 100644 --- a/lib/gpu/lal_re_squared.cu +++ b/lib/gpu/lal_re_squared.cu @@ -13,7 +13,7 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_ellipsoid_extra.h" #endif diff --git a/lib/gpu/lal_re_squared_lj.cu b/lib/gpu/lal_re_squared_lj.cu index d69dae2461..b3c44febe7 100644 --- a/lib/gpu/lal_re_squared_lj.cu +++ b/lib/gpu/lal_re_squared_lj.cu @@ -13,7 +13,7 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_ellipsoid_extra.h" #endif diff --git a/lib/gpu/lal_soft.cu b/lib/gpu/lal_soft.cu index 831b986725..bccfa85ed5 100644 --- a/lib/gpu/lal_soft.cu +++ b/lib/gpu/lal_soft.cu @@ -13,12 +13,12 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_sw.cu b/lib/gpu/lal_sw.cu index 3b6de5a683..de36d29efb 100644 --- a/lib/gpu/lal_sw.cu +++ b/lib/gpu/lal_sw.cu @@ -13,19 +13,19 @@ // email : brownw@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture sw1_tex; -texture sw2_tex; -texture sw3_tex; +_texture( pos_tex,float4); +_texture( sw1_tex,float4); +_texture( sw2_tex,float4); +_texture( sw3_tex,float4); #else -texture pos_tex; -texture sw1_tex; -texture sw2_tex; -texture sw3_tex; +_texture_2d( pos_tex,int4); +_texture( sw1_tex,int4); +_texture( sw2_tex,int4); +_texture( sw3_tex,int4); #endif #else diff --git a/lib/gpu/lal_table.cu b/lib/gpu/lal_table.cu index 971b56d96e..8c0b52e05f 100644 --- a/lib/gpu/lal_table.cu +++ b/lib/gpu/lal_table.cu @@ -13,12 +13,12 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_tersoff.cu b/lib/gpu/lal_tersoff.cu index 2e29ca721b..d57efaf15c 100644 --- a/lib/gpu/lal_tersoff.cu +++ b/lib/gpu/lal_tersoff.cu @@ -13,23 +13,23 @@ // email : ndactrung@gmail.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_tersoff_extra.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture ts1_tex; -texture ts2_tex; -texture ts3_tex; -texture ts4_tex; -texture ts5_tex; +_texture( pos_tex,float4); +_texture( ts1_tex,float4); +_texture( ts2_tex,float4); +_texture( ts3_tex,float4); +_texture( ts4_tex,float4); +_texture( ts5_tex,float4); #else -texture pos_tex; -texture ts1_tex; -texture ts2_tex; -texture ts3_tex; -texture ts4_tex; -texture ts5_tex; +_texture_2d( pos_tex,int4); +_texture( ts1_tex,int4); +_texture( ts2_tex,int4); +_texture( ts3_tex,int4); +_texture( ts4_tex,int4); +_texture( ts5_tex,int4); #endif #else diff --git a/lib/gpu/lal_tersoff_extra.h b/lib/gpu/lal_tersoff_extra.h index 47d16678f0..7ee29751b7 100644 --- a/lib/gpu/lal_tersoff_extra.h +++ b/lib/gpu/lal_tersoff_extra.h @@ -16,7 +16,7 @@ #ifndef LAL_TERSOFF_EXTRA_H #define LAL_TERSOFF_EXTRA_H -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #else #endif diff --git a/lib/gpu/lal_tersoff_mod.cu b/lib/gpu/lal_tersoff_mod.cu index c85f5e08ca..da284f39ee 100644 --- a/lib/gpu/lal_tersoff_mod.cu +++ b/lib/gpu/lal_tersoff_mod.cu @@ -13,23 +13,23 @@ // email : ndactrung@gmail.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_tersoff_mod_extra.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture ts1_tex; -texture ts2_tex; -texture ts3_tex; -texture ts4_tex; -texture ts5_tex; +_texture( pos_tex,float4); +_texture( ts1_tex,float4); +_texture( ts2_tex,float4); +_texture( ts3_tex,float4); +_texture( ts4_tex,float4); +_texture( ts5_tex,float4); #else -texture pos_tex; -texture ts1_tex; -texture ts2_tex; -texture ts3_tex; -texture ts4_tex; -texture ts5_tex; +_texture_2d( pos_tex,int4); +_texture( ts1_tex,int4); +_texture( ts2_tex,int4); +_texture( ts3_tex,int4); +_texture( ts4_tex,int4); +_texture( ts5_tex,int4); #endif #else diff --git a/lib/gpu/lal_tersoff_mod_extra.h b/lib/gpu/lal_tersoff_mod_extra.h index a130d98488..fb658cb0da 100644 --- a/lib/gpu/lal_tersoff_mod_extra.h +++ b/lib/gpu/lal_tersoff_mod_extra.h @@ -16,7 +16,7 @@ #ifndef LAL_TERSOFF_MOD_EXTRA_H #define LAL_TERSOFF_MOD_EXTRA_H -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #else #endif diff --git a/lib/gpu/lal_tersoff_zbl.cu b/lib/gpu/lal_tersoff_zbl.cu index b574a529c0..a170715f57 100644 --- a/lib/gpu/lal_tersoff_zbl.cu +++ b/lib/gpu/lal_tersoff_zbl.cu @@ -13,25 +13,25 @@ // email : ndactrung@gmail.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_tersoff_zbl_extra.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture ts1_tex; -texture ts2_tex; -texture ts3_tex; -texture ts4_tex; -texture ts5_tex; -texture ts6_tex; +_texture( pos_tex,float4); +_texture( ts1_tex,float4); +_texture( ts2_tex,float4); +_texture( ts3_tex,float4); +_texture( ts4_tex,float4); +_texture( ts5_tex,float4); +_texture( ts6_tex,float4); #else -texture pos_tex; -texture ts1_tex; -texture ts2_tex; -texture ts3_tex; -texture ts4_tex; -texture ts5_tex; -texture ts6_tex; +_texture_2d( pos_tex,int4); +_texture( ts1_tex,int4); +_texture( ts2_tex,int4); +_texture( ts3_tex,int4); +_texture( ts4_tex,int4); +_texture( ts5_tex,int4); +_texture( ts6_tex,int4); #endif #else diff --git a/lib/gpu/lal_tersoff_zbl_extra.h b/lib/gpu/lal_tersoff_zbl_extra.h index 32c05a3716..9e5bcb10b4 100644 --- a/lib/gpu/lal_tersoff_zbl_extra.h +++ b/lib/gpu/lal_tersoff_zbl_extra.h @@ -16,7 +16,7 @@ #ifndef LAL_TERSOFF_ZBL_EXTRA_H #define LAL_TERSOFF_ZBL_EXTRA_H -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #else #endif diff --git a/lib/gpu/lal_ufm.cu b/lib/gpu/lal_ufm.cu index 51c4df3b5b..33d0f3c956 100644 --- a/lib/gpu/lal_ufm.cu +++ b/lib/gpu/lal_ufm.cu @@ -15,12 +15,12 @@ dekoning@ifi.unicamp.br ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_vashishta.cu b/lib/gpu/lal_vashishta.cu index 0da46c3b53..d13bc659e7 100644 --- a/lib/gpu/lal_vashishta.cu +++ b/lib/gpu/lal_vashishta.cu @@ -13,23 +13,23 @@ // email : andershaf@gmail.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture param1_tex; -texture param2_tex; -texture param3_tex; -texture param4_tex; -texture param5_tex; +_texture( pos_tex,float4); +_texture( param1_tex,float4); +_texture( param2_tex,float4); +_texture( param3_tex,float4); +_texture( param4_tex,float4); +_texture( param5_tex,float4); #else -texture pos_tex; -texture param1_tex; -texture param2_tex; -texture param3_tex; -texture param4_tex; -texture param5_tex; +_texture_2d( pos_tex,int4); +_texture( param1_tex,int4); +_texture( param2_tex,int4); +_texture( param3_tex,int4); +_texture( param4_tex,int4); +_texture( param5_tex,int4); #endif #else diff --git a/lib/gpu/lal_yukawa.cu b/lib/gpu/lal_yukawa.cu index a8d637ec97..5237549b0a 100644 --- a/lib/gpu/lal_yukawa.cu +++ b/lib/gpu/lal_yukawa.cu @@ -13,12 +13,12 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/lib/gpu/lal_yukawa_colloid.cu b/lib/gpu/lal_yukawa_colloid.cu index a3cbbbc11c..8c006a09be 100644 --- a/lib/gpu/lal_yukawa_colloid.cu +++ b/lib/gpu/lal_yukawa_colloid.cu @@ -13,15 +13,15 @@ // email : nguyentd@ornl.gov // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; -texture rad_tex; +_texture( pos_tex,float4); +_texture( rad_tex,float); #else -texture pos_tex; -texture rad_tex; +_texture_2d( pos_tex,int4); +_texture( rad_tex,int2); #endif #else diff --git a/lib/gpu/lal_zbl.cu b/lib/gpu/lal_zbl.cu index 33c850e134..fbedfe2de2 100644 --- a/lib/gpu/lal_zbl.cu +++ b/lib/gpu/lal_zbl.cu @@ -13,12 +13,12 @@ // email : ndactrung@gmail.com // ***************************************************************************/ -#ifdef NV_KERNEL +#if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE -texture pos_tex; +_texture( pos_tex,float4); #else -texture pos_tex; +_texture_2d( pos_tex,int4); #endif #else #define pos_tex x_ diff --git a/src/MAKE/OPTIONS/Makefile.hip b/src/MAKE/OPTIONS/Makefile.hip new file mode 100644 index 0000000000..12158a32cb --- /dev/null +++ b/src/MAKE/OPTIONS/Makefile.hip @@ -0,0 +1,120 @@ +# hip = MPI with HIP(clang) + +SHELL = /bin/sh + +# --------------------------------------------------------------------- +# compiler/linker settings +# specify flags and libraries needed for your compiler + +CC = mpicxx +CCFLAGS = -g -O3 +SHFLAGS = -fPIC +DEPFLAGS = -M + +HIP_PATH ?= $(wildcard /opt/rocm/hip) +LINK = $(HIP_PATH)/bin/hipcc +LINKFLAGS = -g -O3 $(shell mpicxx --showme:link) +LIB = +SIZE = size + +ARCHIVE = ar +ARFLAGS = -rc +SHLIBFLAGS = -shared + +# --------------------------------------------------------------------- +# LAMMPS-specific settings, all OPTIONAL +# specify settings for LAMMPS features you will use +# if you change any -D setting, do full re-compile after "make clean" + +# LAMMPS ifdef settings +# see possible settings in Section 2.2 (step 4) of manual + +LMP_INC = -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 + +# MPI library +# see discussion in Section 2.2 (step 5) of manual +# MPI wrapper compiler/linker can provide this info +# can point to dummy MPI library in src/STUBS as in Makefile.serial +# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts +# INC = path for mpi.h, MPI compiler settings +# PATH = path for MPI library +# LIB = name of MPI library + +MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 +MPI_PATH = +MPI_LIB = + +# FFT library +# see discussion in Section 2.2 (step 6) of manual +# can be left blank to use provided KISS FFT library +# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings +# PATH = path for FFT library +# LIB = name of FFT library + +FFT_INC = +FFT_PATH = +FFT_LIB = + +# JPEG and/or PNG library +# see discussion in Section 2.2 (step 7) of manual +# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC +# INC = path(s) for jpeglib.h and/or png.h +# PATH = path(s) for JPEG library and/or PNG library +# LIB = name(s) of JPEG library and/or PNG library + +JPG_INC = +JPG_PATH = +JPG_LIB = + +# --------------------------------------------------------------------- +# build rules and dependencies +# do not edit this section + +include Makefile.package.settings +include Makefile.package + +ifeq (nvcc,${HIP_PLATFORM}) + # fix nvcc can't handle -pthread flag + LINKFLAGS := $(subst -pthread,-Xcompiler -pthread,$(LINKFLAGS)) +endif + +EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC) +EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH) +EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB) +EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS) +EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS) + +# Path to src files + +vpath %.cpp .. +vpath %.h .. + +# Link target + +$(EXE): $(OBJ) $(EXTRA_LINK_DEPENDS) + $(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE) + $(SIZE) $(EXE) + +# Library targets + +lib: $(OBJ) $(EXTRA_LINK_DEPENDS) + $(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ) + +shlib: $(OBJ) $(EXTRA_LINK_DEPENDS) + $(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \ + $(OBJ) $(EXTRA_LIB) $(LIB) + +# Compilation rules + +%.o:%.cpp + $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $< + +# Individual dependencies + +depend : fastdep.exe $(SRC) + @./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1 + +fastdep.exe: ../DEPEND/fastdep.c + cc -O -o $@ $< + +sinclude .depend From 44178a335e37dbe33d4a10988baedb15afd22424 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 29 Jan 2020 13:56:34 -0700 Subject: [PATCH 018/577] Propagate rename to Kokkos styles --- src/KOKKOS/atom_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_angle_kokkos.cpp | 4 ++-- src/KOKKOS/atom_vec_angle_kokkos.h | 2 +- src/KOKKOS/atom_vec_atomic_kokkos.cpp | 4 ++-- src/KOKKOS/atom_vec_atomic_kokkos.h | 2 +- src/KOKKOS/atom_vec_bond_kokkos.cpp | 4 ++-- src/KOKKOS/atom_vec_bond_kokkos.h | 2 +- src/KOKKOS/atom_vec_charge_kokkos.cpp | 4 ++-- src/KOKKOS/atom_vec_charge_kokkos.h | 2 +- src/KOKKOS/atom_vec_dpd_kokkos.cpp | 4 ++-- src/KOKKOS/atom_vec_dpd_kokkos.h | 2 +- src/KOKKOS/atom_vec_full_kokkos.cpp | 4 ++-- src/KOKKOS/atom_vec_full_kokkos.h | 2 +- src/KOKKOS/atom_vec_hybrid_kokkos.cpp | 6 +++--- src/KOKKOS/atom_vec_hybrid_kokkos.h | 2 +- src/KOKKOS/atom_vec_molecular_kokkos.cpp | 4 ++-- src/KOKKOS/atom_vec_molecular_kokkos.h | 2 +- src/KOKKOS/atom_vec_sphere_kokkos.cpp | 4 ++-- src/KOKKOS/atom_vec_sphere_kokkos.h | 2 +- 19 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/KOKKOS/atom_kokkos.cpp b/src/KOKKOS/atom_kokkos.cpp index 4637a9a21c..49fdbb95bb 100644 --- a/src/KOKKOS/atom_kokkos.cpp +++ b/src/KOKKOS/atom_kokkos.cpp @@ -237,7 +237,7 @@ void AtomKokkos::grow(unsigned int mask){ sync(Device, mask); modified(Device, mask); memoryKK->grow_kokkos(k_special,special,nmax,maxspecial,"atom:special"); - avec->grow_reset(); + avec->grow_pointers(); sync(Host, mask); } } diff --git a/src/KOKKOS/atom_vec_angle_kokkos.cpp b/src/KOKKOS/atom_vec_angle_kokkos.cpp index 736e1c1fca..bbb5d2617d 100644 --- a/src/KOKKOS/atom_vec_angle_kokkos.cpp +++ b/src/KOKKOS/atom_vec_angle_kokkos.cpp @@ -98,7 +98,7 @@ void AtomVecAngleKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_angle_atom3,atomKK->angle_atom3,nmax,atomKK->angle_per_atom, "atom:angle_atom3"); - grow_reset(); + grow_pointers(); atomKK->sync(Host,ALL_MASK); if (atom->nextra_grow) @@ -110,7 +110,7 @@ void AtomVecAngleKokkos::grow(int n) reset local array ptrs ------------------------------------------------------------------------- */ -void AtomVecAngleKokkos::grow_reset() +void AtomVecAngleKokkos::grow_pointers() { tag = atomKK->tag; d_tag = atomKK->k_tag.d_view; diff --git a/src/KOKKOS/atom_vec_angle_kokkos.h b/src/KOKKOS/atom_vec_angle_kokkos.h index abdd48fce5..4fc71725b0 100644 --- a/src/KOKKOS/atom_vec_angle_kokkos.h +++ b/src/KOKKOS/atom_vec_angle_kokkos.h @@ -58,7 +58,7 @@ class AtomVecAngleKokkos : public AtomVecKokkos { int write_data_hybrid(FILE *, double *); bigint memory_usage(); - void grow_reset(); + void grow_pointers(); int pack_comm_kokkos(const int &n, const DAT::tdual_int_2d &k_sendlist, const int & iswap, const DAT::tdual_xfloat_2d &buf, diff --git a/src/KOKKOS/atom_vec_atomic_kokkos.cpp b/src/KOKKOS/atom_vec_atomic_kokkos.cpp index 4fec5740d6..7b657fa0d1 100644 --- a/src/KOKKOS/atom_vec_atomic_kokkos.cpp +++ b/src/KOKKOS/atom_vec_atomic_kokkos.cpp @@ -74,7 +74,7 @@ void AtomVecAtomicKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,3,"atom:v"); memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,3,"atom:f"); - grow_reset(); + grow_pointers(); atomKK->sync(Host,ALL_MASK); if (atom->nextra_grow) @@ -86,7 +86,7 @@ void AtomVecAtomicKokkos::grow(int n) reset local array ptrs ------------------------------------------------------------------------- */ -void AtomVecAtomicKokkos::grow_reset() +void AtomVecAtomicKokkos::grow_pointers() { tag = atomKK->tag; d_tag = atomKK->k_tag.d_view; diff --git a/src/KOKKOS/atom_vec_atomic_kokkos.h b/src/KOKKOS/atom_vec_atomic_kokkos.h index e4d2654e2c..212132ef60 100644 --- a/src/KOKKOS/atom_vec_atomic_kokkos.h +++ b/src/KOKKOS/atom_vec_atomic_kokkos.h @@ -48,7 +48,7 @@ class AtomVecAtomicKokkos : public AtomVecKokkos { void write_data(FILE *, int, double **); bigint memory_usage(); - void grow_reset(); + void grow_pointers(); int pack_border_kokkos(int n, DAT::tdual_int_2d k_sendlist, DAT::tdual_xfloat_2d buf,int iswap, int pbc_flag, int *pbc, ExecutionSpace space); diff --git a/src/KOKKOS/atom_vec_bond_kokkos.cpp b/src/KOKKOS/atom_vec_bond_kokkos.cpp index 74c05a506c..60ea024c08 100644 --- a/src/KOKKOS/atom_vec_bond_kokkos.cpp +++ b/src/KOKKOS/atom_vec_bond_kokkos.cpp @@ -84,7 +84,7 @@ void AtomVecBondKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_bond_type,atomKK->bond_type,nmax,atomKK->bond_per_atom,"atom:bond_type"); memoryKK->grow_kokkos(atomKK->k_bond_atom,atomKK->bond_atom,nmax,atomKK->bond_per_atom,"atom:bond_atom"); - grow_reset(); + grow_pointers(); atomKK->sync(Host,ALL_MASK); if (atom->nextra_grow) @@ -96,7 +96,7 @@ void AtomVecBondKokkos::grow(int n) reset local array ptrs ------------------------------------------------------------------------- */ -void AtomVecBondKokkos::grow_reset() +void AtomVecBondKokkos::grow_pointers() { tag = atomKK->tag; d_tag = atomKK->k_tag.d_view; diff --git a/src/KOKKOS/atom_vec_bond_kokkos.h b/src/KOKKOS/atom_vec_bond_kokkos.h index 7ec15450ef..f38ade8f64 100644 --- a/src/KOKKOS/atom_vec_bond_kokkos.h +++ b/src/KOKKOS/atom_vec_bond_kokkos.h @@ -52,7 +52,7 @@ class AtomVecBondKokkos : public AtomVecKokkos { int write_data_hybrid(FILE *, double *); bigint memory_usage(); - void grow_reset(); + void grow_pointers(); int pack_border_kokkos(int n, DAT::tdual_int_2d k_sendlist, DAT::tdual_xfloat_2d buf,int iswap, int pbc_flag, int *pbc, ExecutionSpace space); diff --git a/src/KOKKOS/atom_vec_charge_kokkos.cpp b/src/KOKKOS/atom_vec_charge_kokkos.cpp index 3f26b1e9ea..f50bc6bd62 100644 --- a/src/KOKKOS/atom_vec_charge_kokkos.cpp +++ b/src/KOKKOS/atom_vec_charge_kokkos.cpp @@ -79,7 +79,7 @@ void AtomVecChargeKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_q,atomKK->q,nmax,"atom:q"); - grow_reset(); + grow_pointers(); atomKK->sync(Host,ALL_MASK); if (atom->nextra_grow) @@ -91,7 +91,7 @@ void AtomVecChargeKokkos::grow(int n) reset local array ptrs ------------------------------------------------------------------------- */ -void AtomVecChargeKokkos::grow_reset() +void AtomVecChargeKokkos::grow_pointers() { tag = atomKK->tag; d_tag = atomKK->k_tag.d_view; diff --git a/src/KOKKOS/atom_vec_charge_kokkos.h b/src/KOKKOS/atom_vec_charge_kokkos.h index e9ff70bbe1..39d641b844 100644 --- a/src/KOKKOS/atom_vec_charge_kokkos.h +++ b/src/KOKKOS/atom_vec_charge_kokkos.h @@ -53,7 +53,7 @@ class AtomVecChargeKokkos : public AtomVecKokkos { int write_data_hybrid(FILE *, double *); bigint memory_usage(); - void grow_reset(); + void grow_pointers(); int pack_border_kokkos(int n, DAT::tdual_int_2d k_sendlist, DAT::tdual_xfloat_2d buf,int iswap, int pbc_flag, int *pbc, ExecutionSpace space); diff --git a/src/KOKKOS/atom_vec_dpd_kokkos.cpp b/src/KOKKOS/atom_vec_dpd_kokkos.cpp index 144ef26f19..2885c292c1 100644 --- a/src/KOKKOS/atom_vec_dpd_kokkos.cpp +++ b/src/KOKKOS/atom_vec_dpd_kokkos.cpp @@ -93,7 +93,7 @@ void AtomVecDPDKokkos::grow(int n) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); - grow_reset(); + grow_pointers(); atomKK->sync(Host,ALL_MASK); } @@ -101,7 +101,7 @@ void AtomVecDPDKokkos::grow(int n) reset local array ptrs ------------------------------------------------------------------------- */ -void AtomVecDPDKokkos::grow_reset() +void AtomVecDPDKokkos::grow_pointers() { tag = atomKK->tag; d_tag = atomKK->k_tag.d_view; diff --git a/src/KOKKOS/atom_vec_dpd_kokkos.h b/src/KOKKOS/atom_vec_dpd_kokkos.h index cec1b82357..e969a28cb8 100644 --- a/src/KOKKOS/atom_vec_dpd_kokkos.h +++ b/src/KOKKOS/atom_vec_dpd_kokkos.h @@ -61,7 +61,7 @@ class AtomVecDPDKokkos : public AtomVecKokkos { int write_data_hybrid(FILE *, double *); bigint memory_usage(); - void grow_reset(); + void grow_pointers(); int pack_comm_kokkos(const int &n, const DAT::tdual_int_2d &k_sendlist, const int & iswap, const DAT::tdual_xfloat_2d &buf, diff --git a/src/KOKKOS/atom_vec_full_kokkos.cpp b/src/KOKKOS/atom_vec_full_kokkos.cpp index 1fdbcbec8c..0f8aaade8a 100644 --- a/src/KOKKOS/atom_vec_full_kokkos.cpp +++ b/src/KOKKOS/atom_vec_full_kokkos.cpp @@ -123,7 +123,7 @@ void AtomVecFullKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_improper_atom4,atomKK->improper_atom4,nmax, atomKK->improper_per_atom,"atom:improper_atom4"); - grow_reset(); + grow_pointers(); atomKK->sync(Host,ALL_MASK); if (atom->nextra_grow) @@ -135,7 +135,7 @@ void AtomVecFullKokkos::grow(int n) reset local array ptrs ------------------------------------------------------------------------- */ -void AtomVecFullKokkos::grow_reset() +void AtomVecFullKokkos::grow_pointers() { tag = atomKK->tag; d_tag = atomKK->k_tag.d_view; diff --git a/src/KOKKOS/atom_vec_full_kokkos.h b/src/KOKKOS/atom_vec_full_kokkos.h index 33760a8b5f..a2d4fa9cf4 100644 --- a/src/KOKKOS/atom_vec_full_kokkos.h +++ b/src/KOKKOS/atom_vec_full_kokkos.h @@ -52,7 +52,7 @@ class AtomVecFullKokkos : public AtomVecKokkos { int write_data_hybrid(FILE *, double *); bigint memory_usage(); - void grow_reset(); + void grow_pointers(); int pack_border_kokkos(int n, DAT::tdual_int_2d k_sendlist, DAT::tdual_xfloat_2d buf,int iswap, int pbc_flag, int *pbc, ExecutionSpace space); diff --git a/src/KOKKOS/atom_vec_hybrid_kokkos.cpp b/src/KOKKOS/atom_vec_hybrid_kokkos.cpp index 40303051b2..8f8a0c8c00 100644 --- a/src/KOKKOS/atom_vec_hybrid_kokkos.cpp +++ b/src/KOKKOS/atom_vec_hybrid_kokkos.cpp @@ -163,7 +163,7 @@ void AtomVecHybridKokkos::grow(int n) // for sub-styles, do this in case // multiple sub-style reallocs of same array occurred - grow_reset(); + grow_pointers(); if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) @@ -174,7 +174,7 @@ void AtomVecHybridKokkos::grow(int n) reset local array ptrs ------------------------------------------------------------------------- */ -void AtomVecHybridKokkos::grow_reset() +void AtomVecHybridKokkos::grow_pointers() { tag = atomKK->tag; d_tag = atomKK->k_tag.d_view; @@ -216,7 +216,7 @@ void AtomVecHybridKokkos::grow_reset() d_angmom = atomKK->k_angmom.d_view; h_angmom = atomKK->k_angmom.h_view; - for (int k = 0; k < nstyles; k++) styles[k]->grow_reset(); + for (int k = 0; k < nstyles; k++) styles[k]->grow_pointers(); } /* ---------------------------------------------------------------------- diff --git a/src/KOKKOS/atom_vec_hybrid_kokkos.h b/src/KOKKOS/atom_vec_hybrid_kokkos.h index 4cfb186b17..02f9044d73 100644 --- a/src/KOKKOS/atom_vec_hybrid_kokkos.h +++ b/src/KOKKOS/atom_vec_hybrid_kokkos.h @@ -36,7 +36,7 @@ class AtomVecHybridKokkos : public AtomVecKokkos { void process_args(int, char **); void init(); void grow(int); - void grow_reset(); + void grow_pointers(); void copy(int, int, int); void clear_bonus(); void force_clear(int, size_t); diff --git a/src/KOKKOS/atom_vec_molecular_kokkos.cpp b/src/KOKKOS/atom_vec_molecular_kokkos.cpp index f3b4ae98ca..0c4bf483d3 100644 --- a/src/KOKKOS/atom_vec_molecular_kokkos.cpp +++ b/src/KOKKOS/atom_vec_molecular_kokkos.cpp @@ -121,7 +121,7 @@ void AtomVecMolecularKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_improper_atom4,atomKK->improper_atom4,nmax, atomKK->improper_per_atom,"atom:improper_atom4"); - grow_reset(); + grow_pointers(); atomKK->sync(Host,ALL_MASK); if (atom->nextra_grow) @@ -133,7 +133,7 @@ void AtomVecMolecularKokkos::grow(int n) reset local array ptrs ------------------------------------------------------------------------- */ -void AtomVecMolecularKokkos::grow_reset() +void AtomVecMolecularKokkos::grow_pointers() { tag = atomKK->tag; d_tag = atomKK->k_tag.d_view; diff --git a/src/KOKKOS/atom_vec_molecular_kokkos.h b/src/KOKKOS/atom_vec_molecular_kokkos.h index 06444510e0..cede4f42a8 100644 --- a/src/KOKKOS/atom_vec_molecular_kokkos.h +++ b/src/KOKKOS/atom_vec_molecular_kokkos.h @@ -58,7 +58,7 @@ class AtomVecMolecularKokkos : public AtomVecKokkos { int write_data_hybrid(FILE *, double *); bigint memory_usage(); - void grow_reset(); + void grow_pointers(); int pack_comm_kokkos(const int &n, const DAT::tdual_int_2d &k_sendlist, const int & iswap, const DAT::tdual_xfloat_2d &buf, diff --git a/src/KOKKOS/atom_vec_sphere_kokkos.cpp b/src/KOKKOS/atom_vec_sphere_kokkos.cpp index 67aaa32c21..35f93294a8 100644 --- a/src/KOKKOS/atom_vec_sphere_kokkos.cpp +++ b/src/KOKKOS/atom_vec_sphere_kokkos.cpp @@ -119,7 +119,7 @@ void AtomVecSphereKokkos::grow(int n) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax); - grow_reset(); + grow_pointers(); atomKK->sync(Host,ALL_MASK); } @@ -127,7 +127,7 @@ void AtomVecSphereKokkos::grow(int n) reset local array ptrs ------------------------------------------------------------------------- */ -void AtomVecSphereKokkos::grow_reset() +void AtomVecSphereKokkos::grow_pointers() { tag = atomKK->tag; d_tag = atomKK->k_tag.d_view; diff --git a/src/KOKKOS/atom_vec_sphere_kokkos.h b/src/KOKKOS/atom_vec_sphere_kokkos.h index 28c8a3c8f6..3f6d34e8b2 100644 --- a/src/KOKKOS/atom_vec_sphere_kokkos.h +++ b/src/KOKKOS/atom_vec_sphere_kokkos.h @@ -33,7 +33,7 @@ class AtomVecSphereKokkos : public AtomVecKokkos { ~AtomVecSphereKokkos() {} void init(); void grow(int); - void grow_reset(); + void grow_pointers(); void copy(int, int, int); int pack_comm(int, int *, double *, int, int *); int pack_comm_vel(int, int *, double *, int, int *); From 34778c4919d21fd12d8e9a5ff870c1862bb28157 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 29 Jan 2020 14:10:42 -0700 Subject: [PATCH 019/577] Restore virtual keyword for Kokkos package --- src/atom_vec.h | 66 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/atom_vec.h b/src/atom_vec.h index 94517f80ad..b34ee5adb4 100644 --- a/src/atom_vec.h +++ b/src/atom_vec.h @@ -74,41 +74,41 @@ class AtomVec : protected Pointers { virtual void force_clear(int, size_t) {} - void grow(int); + virtual void grow(int); virtual void grow_pointers() {} - void copy(int, int, int); + virtual void copy(int, int, int); virtual void copy_bonus(int, int, int) {} virtual void clear_bonus() {} - int pack_comm(int, int *, double *, int, int *); - int pack_comm_vel(int, int *, double *, int, int *); - void unpack_comm(int, int, double *); - void unpack_comm_vel(int, int, double *); + virtual int pack_comm(int, int *, double *, int, int *); + virtual int pack_comm_vel(int, int *, double *, int, int *); + virtual void unpack_comm(int, int, double *); + virtual void unpack_comm_vel(int, int, double *); virtual int pack_comm_bonus(int, int *, double *) {} virtual void unpack_comm_bonus(int, int, double *) {} - int pack_reverse(int, int, double *); - void unpack_reverse(int, int *, double *); + virtual int pack_reverse(int, int, double *); + virtual void unpack_reverse(int, int *, double *); - int pack_border(int, int *, double *, int, int *); - int pack_border_vel(int, int *, double *, int, int *); - void unpack_border(int, int, double *); - void unpack_border_vel(int, int, double *); + virtual int pack_border(int, int *, double *, int, int *); + virtual int pack_border_vel(int, int *, double *, int, int *); + virtual void unpack_border(int, int, double *); + virtual void unpack_border_vel(int, int, double *); virtual int pack_border_bonus(int, int *, double *) {} virtual int unpack_border_bonus(int, int, double *) {} - int pack_exchange(int, double *); - int unpack_exchange(double *); + virtual int pack_exchange(int, double *); + virtual int unpack_exchange(double *); virtual int pack_exchange_bonus(int, double *) {} virtual int unpack_exchange_bonus(int, double *) {} - int size_restart(); - int pack_restart(int, double *); - int unpack_restart(double *); + virtual int size_restart(); + virtual int pack_restart(int, double *); + virtual int unpack_restart(double *); virtual void pack_restart_pre(int) {} virtual void pack_restart_post(int) {} @@ -118,36 +118,36 @@ class AtomVec : protected Pointers { virtual int pack_restart_bonus(int, double *) {} virtual int unpack_restart_bonus(int, double *) {} - void create_atom(int, double *); + virtual void create_atom(int, double *); virtual void create_atom_post(int) {} - void data_atom(double *, imageint, char **); + virtual void data_atom(double *, imageint, char **); virtual void data_atom_post(int) {} virtual void data_atom_bonus(int, char **) {} virtual void data_body(int, int, int, int *, double *) {} - void pack_data(double **); - void write_data(FILE *, int, double **); + virtual void pack_data(double **); + virtual void write_data(FILE *, int, double **); virtual void pack_data_pre(int) {} virtual void pack_data_post(int) {} - void data_vel(int, char **); - void pack_vel(double **); - void write_vel(FILE *, int, double **); + virtual void data_vel(int, char **); + virtual void pack_vel(double **); + virtual void write_vel(FILE *, int, double **); - int pack_bond(tagint **); - void write_bond(FILE *, int, tagint **, int); - int pack_angle(tagint **); - void write_angle(FILE *, int, tagint **, int); - int pack_dihedral(tagint **); - void write_dihedral(FILE *, int, tagint **, int); - int pack_improper(tagint **); - void write_improper(FILE *, int, tagint **, int); + virtual int pack_bond(tagint **); + virtual void write_bond(FILE *, int, tagint **, int); + virtual int pack_angle(tagint **); + virtual void write_angle(FILE *, int, tagint **, int); + virtual int pack_dihedral(tagint **); + virtual void write_dihedral(FILE *, int, tagint **, int); + virtual int pack_improper(tagint **); + virtual void write_improper(FILE *, int, tagint **, int); virtual int property_atom(char *) {return -1;} virtual void pack_property_atom(int, double *, int, int) {} - bigint memory_usage(); + virtual bigint memory_usage(); virtual bigint memory_usage_bonus() {} protected: From d34f9af2914ff8aa3e214a022509979bb29b638d Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 30 Jan 2020 14:27:45 -0700 Subject: [PATCH 020/577] fixed bug with writing of data file velocities --- src/atom_vec.cpp | 64 +++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index 77ba68f651..08f9c54e56 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -1979,47 +1979,43 @@ void AtomVec::write_vel(FILE *fp, int n, double **buf) void *pdata; for (i = 0; i < n; i++) { - fprintf(fp,TAGINT_FORMAT " %-1.16e %-1.16e %-1.16e\n", - (tagint) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3]); + fprintf(fp,TAGINT_FORMAT,(tagint) ubuf(buf[i][0]).i); - if (ndata_vel) { - j = 4; - for (nn = 0; nn < ndata_vel; nn++) { - pdata = mdata_vel.pdata[nn]; - datatype = mdata_vel.datatype[nn]; - cols = mdata_vel.cols[nn]; - if (datatype == DOUBLE) { - if (cols == 0) { - double *vec = *((double **) pdata); + j = 1; + for (nn = 1; nn < ndata_vel; nn++) { + pdata = mdata_vel.pdata[nn]; + datatype = mdata_vel.datatype[nn]; + cols = mdata_vel.cols[nn]; + if (datatype == DOUBLE) { + if (cols == 0) { + double *vec = *((double **) pdata); + fprintf(fp," %-1.16e",buf[i][j++]); + } else { + double **array = *((double ***) pdata); + for (m = 0; m < cols; m++) fprintf(fp," %-1.16e",buf[i][j++]); - } else { - double **array = *((double ***) pdata); - for (m = 0; m < cols; m++) - fprintf(fp," %-1.16e",buf[i][j++]); - } - } else if (datatype == INT) { - if (cols == 0) { - int *vec = *((int **) pdata); + } + } else if (datatype == INT) { + if (cols == 0) { + int *vec = *((int **) pdata); + fprintf(fp," %d",(int) ubuf(buf[i][j++]).i); + } else { + int **array = *((int ***) pdata); + for (m = 0; m < cols; m++) fprintf(fp," %d",(int) ubuf(buf[i][j++]).i); - } else { - int **array = *((int ***) pdata); - for (m = 0; m < cols; m++) - fprintf(fp," %d",(int) ubuf(buf[i][j++]).i); - } - } else if (datatype == BIGINT) { - if (cols == 0) { - bigint *vec = *((bigint **) pdata); + } + } else if (datatype == BIGINT) { + if (cols == 0) { + bigint *vec = *((bigint **) pdata); + fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i); + } else { + bigint **array = *((bigint ***) pdata); + for (m = 0; m < cols; m++) fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i); - } else { - bigint **array = *((bigint ***) pdata); - for (m = 0; m < cols; m++) - fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i); - } } } } - - fprintf(fp,"\n"); + fprintf(fp,"\n"); } } From 9e8806bd2239d88a83b1c15b1724541b0e8f4d6d Mon Sep 17 00:00:00 2001 From: Vsevak Date: Fri, 31 Jan 2020 21:26:52 +0300 Subject: [PATCH 021/577] Addition to lib/gpu/README for HIP --- lib/gpu/README | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/gpu/README b/lib/gpu/README index 2d98749a40..969417a865 100644 --- a/lib/gpu/README +++ b/lib/gpu/README @@ -67,8 +67,8 @@ library requires installing the CUDA GPU driver and CUDA toolkit for your operating system. Installation of the CUDA SDK is not necessary. In addition to the LAMMPS library, the binary nvc_get_devices will also be built. This can be used to query the names and properties of GPU -devices on your system. A Makefile for OpenCL compilation is provided, -but support for OpenCL use is not currently provided by the developers. +devices on your system. A Makefile for OpenCL and ROCm HIP compilation +is provided, but support for it is not currently provided by the developers. Details of the implementation are provided in: ---- @@ -169,6 +169,25 @@ NOTE: The system-specific setting LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG, src/MAKE/Makefile.foo) should be consistent with that specified when building libgpu.a (i.e. by LMP_INC in the lib/gpu/Makefile.bar). + BUILDING FOR HIP FRAMEWORK + -------------------------------- +1. Install the latest ROCm framework (https://github.com/RadeonOpenCompute/ROCm). +2. GPU sorting requires installing hipcub +(https://github.com/ROCmSoftwarePlatform/hipCUB). The HIP CUDA-backend +additionally requires cub (https://nvlabs.github.io/cub). Download and +extract the cub directory to lammps/lib/gpu/ or specify an appropriate +path in lammps/lib/gpu/Makefile.hip. +3. In Makefile.hip it is possible to specify the target platform via +export HIP_PLATFORM=hcc or HIP_PLATFORM=nvcc as well as the target +architecture (gfx803, gfx900, gfx906 etc.) +4. If your MPI implementation does not support `mpicxx --showme` command, +it is required to specify the corresponding MPI compiler and linker flags +in lammps/lib/gpu/Makefile.hip and in lammps/src/MAKE/OPTIONS/Makefile.hip. +5. Building the GPU library (libgpu.a): + cd lammps/lib/gpu; make -f Makefile.hip -j +6. Building the LAMMPS executable (lmp_hip): + cd ../../src; make hip -j + EXAMPLE CONVENTIONAL BUILD PROCESS -------------------------------- From 33fc22b752c3652df832662a91a1e5fc887c9200 Mon Sep 17 00:00:00 2001 From: Vsevak Date: Mon, 3 Feb 2020 01:55:20 +0300 Subject: [PATCH 022/577] Fix echo in Makefile --- lib/gpu/Makefile.hip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gpu/Makefile.hip b/lib/gpu/Makefile.hip index 5c9f251004..1c8e0683ca 100644 --- a/lib/gpu/Makefile.hip +++ b/lib/gpu/Makefile.hip @@ -137,7 +137,7 @@ $(OBJ_DIR)/lal_%.o: lal_%.cpp $(CUHS) $(ALL_H) $(LIB_DIR)/libgpu.a: $(OBJS) $(AR) -crs $@ $(OBJS) - echo "export HIP_PLATFORM := $(HIP_PLATFORM)\n$(HIP_LIBS_TARGET)" > 'Makefile.lammps' + echo -e "export HIP_PLATFORM := $(HIP_PLATFORM)\n$(HIP_LIBS_TARGET)" > 'Makefile.lammps' # test app building From 5f68f3006f1eafaffdb13b3e85220b5d8ac0dd2a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 8 Feb 2020 15:12:26 -0500 Subject: [PATCH 023/577] replace Fix::box_change_xxx variables with Fix::box_change bitmask and add check to Domain::init() This allows a more specific tracking of whether multiple fixes are modifying the same box parameter and error out in that case. --- src/RIGID/fix_rigid_nh.cpp | 4 ++++ src/RIGID/fix_rigid_nh_small.cpp | 4 ++++ src/RIGID/fix_rigid_nph.cpp | 1 - src/RIGID/fix_rigid_nph_small.cpp | 1 - src/RIGID/fix_rigid_npt.cpp | 1 - src/RIGID/fix_rigid_npt_small.cpp | 1 - src/SHOCK/fix_msst.cpp | 15 +++++++++----- src/SRD/fix_srd.cpp | 11 ++++++---- src/USER-BOCS/fix_bocs.cpp | 8 ++++++-- src/USER-MISC/fix_npt_cauchy.cpp | 8 ++++++-- src/USER-OMP/fix_rigid_nph_omp.cpp | 1 - src/USER-OMP/fix_rigid_npt_omp.cpp | 1 - src/USER-QTB/fix_qbmsst.cpp | 12 ++++++----- src/USER-UEF/fix_nh_uef.cpp | 2 +- src/domain.cpp | 33 +++++++++++++++++++++++++++--- src/fix.cpp | 2 +- src/fix.h | 11 +++++++--- src/fix_balance.cpp | 2 +- src/fix_box_relax.cpp | 9 ++++++-- src/fix_deform.cpp | 8 ++++++-- src/fix_nh.cpp | 8 ++++++-- src/fix_press_berendsen.cpp | 6 ++++-- 22 files changed, 108 insertions(+), 41 deletions(-) diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index 6ffb997ffa..1df7f34532 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -106,6 +106,10 @@ FixRigidNH::FixRigidNH(LAMMPS *lmp, int narg, char **arg) : p_period[0] != p_period[2])) error->all(FLERR,"Invalid fix rigid npt/nph command pressure settings"); + if (p_flag[0]) box_change |= BOX_CHANGE_X; + if (p_flag[1]) box_change |= BOX_CHANGE_Y; + if (p_flag[2]) box_change |= BOX_CHANGE_Z; + if ((tstat_flag && t_period <= 0.0) || (p_flag[0] && p_period[0] <= 0.0) || (p_flag[1] && p_period[1] <= 0.0) || diff --git a/src/RIGID/fix_rigid_nh_small.cpp b/src/RIGID/fix_rigid_nh_small.cpp index 136796ce18..5b75640549 100644 --- a/src/RIGID/fix_rigid_nh_small.cpp +++ b/src/RIGID/fix_rigid_nh_small.cpp @@ -120,6 +120,10 @@ FixRigidNHSmall::FixRigidNHSmall(LAMMPS *lmp, int narg, char **arg) : p_period[0] != p_period[2])) error->all(FLERR,"Invalid fix rigid/small npt/nph command pressure settings"); + if (p_flag[0]) box_change |= BOX_CHANGE_X; + if (p_flag[1]) box_change |= BOX_CHANGE_Y; + if (p_flag[2]) box_change |= BOX_CHANGE_Z; + if ((tstat_flag && t_period <= 0.0) || (p_flag[0] && p_period[0] <= 0.0) || (p_flag[1] && p_period[1] <= 0.0) || diff --git a/src/RIGID/fix_rigid_nph.cpp b/src/RIGID/fix_rigid_nph.cpp index 706e08ec12..5c3b5390aa 100644 --- a/src/RIGID/fix_rigid_nph.cpp +++ b/src/RIGID/fix_rigid_nph.cpp @@ -33,7 +33,6 @@ FixRigidNPH::FixRigidNPH(LAMMPS *lmp, int narg, char **arg) : scalar_flag = 1; restart_global = 1; - box_change_size = 1; extscalar = 1; // error checks diff --git a/src/RIGID/fix_rigid_nph_small.cpp b/src/RIGID/fix_rigid_nph_small.cpp index 32ac58220d..7769ced807 100644 --- a/src/RIGID/fix_rigid_nph_small.cpp +++ b/src/RIGID/fix_rigid_nph_small.cpp @@ -33,7 +33,6 @@ FixRigidNPHSmall::FixRigidNPHSmall(LAMMPS *lmp, int narg, char **arg) : scalar_flag = 1; restart_global = 1; - box_change_size = 1; extscalar = 1; // error checks diff --git a/src/RIGID/fix_rigid_npt.cpp b/src/RIGID/fix_rigid_npt.cpp index 1f19fb4ec7..5f3fde669c 100644 --- a/src/RIGID/fix_rigid_npt.cpp +++ b/src/RIGID/fix_rigid_npt.cpp @@ -33,7 +33,6 @@ FixRigidNPT::FixRigidNPT(LAMMPS *lmp, int narg, char **arg) : scalar_flag = 1; restart_global = 1; - box_change_size = 1; extscalar = 1; // error checks diff --git a/src/RIGID/fix_rigid_npt_small.cpp b/src/RIGID/fix_rigid_npt_small.cpp index e8924be79f..d3bd5b8f57 100644 --- a/src/RIGID/fix_rigid_npt_small.cpp +++ b/src/RIGID/fix_rigid_npt_small.cpp @@ -33,7 +33,6 @@ FixRigidNPTSmall::FixRigidNPTSmall(LAMMPS *lmp, int narg, char **arg) : scalar_flag = 1; restart_global = 1; - box_change_size = 1; extscalar = 1; // error checks diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index 2e9f751824..67b2a7fb0f 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -46,7 +46,6 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : if (narg < 4) error->all(FLERR,"Illegal fix msst command"); restart_global = 1; - box_change_size = 1; time_integrate = 1; scalar_flag = 1; vector_flag = 1; @@ -78,10 +77,16 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) : dftb = 0; beta = 0.0; - if (strcmp(arg[3],"x") == 0) direction = 0; - else if (strcmp(arg[3],"y") == 0) direction = 1; - else if (strcmp(arg[3],"z") == 0) direction = 2; - else error->all(FLERR,"Illegal fix msst command"); + if (strcmp(arg[3],"x") == 0) { + direction = 0; + box_change |= BOX_CHANGE_X; + } else if (strcmp(arg[3],"y") == 0) { + direction = 1; + box_change |= BOX_CHANGE_Y; + } else if (strcmp(arg[3],"z") == 0) { + direction = 2; + box_change |= BOX_CHANGE_Z; + } else error->all(FLERR,"Illegal fix msst command"); velocity = force->numeric(FLERR,arg[4]); if (velocity < 0) error->all(FLERR,"Illegal fix msst command"); diff --git a/src/SRD/fix_srd.cpp b/src/SRD/fix_srd.cpp index d5eec91f50..d87851381f 100644 --- a/src/SRD/fix_srd.cpp +++ b/src/SRD/fix_srd.cpp @@ -375,13 +375,16 @@ void FixSRD::init() change_size = change_shape = deformflag = 0; if (domain->nonperiodic == 2) change_size = 1; + + Fix **fixes = modify->fix; for (int i = 0; i < modify->nfix; i++) { - if (modify->fix[i]->box_change_size) change_size = 1; - if (modify->fix[i]->box_change_shape) change_shape = 1; - if (strcmp(modify->fix[i]->style,"deform") == 0) { + if (fixes[i]->box_change & BOX_CHANGE_SIZE) change_size = 1; + if (fixes[i]->box_change & BOX_CHANGE_SHAPE) change_shape = 1; + if (strcmp(fixes[i]->style,"deform") == 0) { deformflag = 1; FixDeform *deform = (FixDeform *) modify->fix[i]; - if (deform->box_change_shape && deform->remapflag != Domain::V_REMAP) + if ((deform->box_change & BOX_CHANGE_SHAPE) + && deform->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix srd with inconsistent " "fix deform remap option"); } diff --git a/src/USER-BOCS/fix_bocs.cpp b/src/USER-BOCS/fix_bocs.cpp index adce231bf1..3543c2f156 100644 --- a/src/USER-BOCS/fix_bocs.cpp +++ b/src/USER-BOCS/fix_bocs.cpp @@ -292,8 +292,12 @@ FixBocs::FixBocs(LAMMPS *lmp, int narg, char **arg) : if (p_flag[i]) pstat_flag = 1; if (pstat_flag) { - if (p_flag[0] || p_flag[1] || p_flag[2]) box_change_size = 1; - if (p_flag[3] || p_flag[4] || p_flag[5]) box_change_shape = 1; + if (p_flag[0]) box_change |= BOX_CHANGE_X; + if (p_flag[1]) box_change |= BOX_CHANGE_Y; + if (p_flag[2]) box_change |= BOX_CHANGE_Z; + if (p_flag[3]) box_change |= BOX_CHANGE_YZ; + if (p_flag[4]) box_change |= BOX_CHANGE_XZ; + if (p_flag[5]) box_change |= BOX_CHANGE_XY; no_change_box = 1; if (allremap == 0) restart_pbc = 1; diff --git a/src/USER-MISC/fix_npt_cauchy.cpp b/src/USER-MISC/fix_npt_cauchy.cpp index 1b0deb5ae3..7a4a34bd00 100644 --- a/src/USER-MISC/fix_npt_cauchy.cpp +++ b/src/USER-MISC/fix_npt_cauchy.cpp @@ -492,8 +492,12 @@ FixNPTCauchy::FixNPTCauchy(LAMMPS *lmp, int narg, char **arg) : if (p_flag[i]) pstat_flag = 1; if (pstat_flag) { - if (p_flag[0] || p_flag[1] || p_flag[2]) box_change_size = 1; - if (p_flag[3] || p_flag[4] || p_flag[5]) box_change_shape = 1; + if (p_flag[0]) box_change |= BOX_CHANGE_X; + if (p_flag[1]) box_change |= BOX_CHANGE_Y; + if (p_flag[2]) box_change |= BOX_CHANGE_Z; + if (p_flag[3]) box_change |= BOX_CHANGE_YZ; + if (p_flag[4]) box_change |= BOX_CHANGE_XZ; + if (p_flag[5]) box_change |= BOX_CHANGE_XY; no_change_box = 1; if (allremap == 0) restart_pbc = 1; diff --git a/src/USER-OMP/fix_rigid_nph_omp.cpp b/src/USER-OMP/fix_rigid_nph_omp.cpp index 31d53868c8..ff192341e4 100644 --- a/src/USER-OMP/fix_rigid_nph_omp.cpp +++ b/src/USER-OMP/fix_rigid_nph_omp.cpp @@ -33,7 +33,6 @@ FixRigidNPHOMP::FixRigidNPHOMP(LAMMPS *lmp, int narg, char **arg) : scalar_flag = 1; restart_global = 1; - box_change_size = 1; extscalar = 1; // error checks diff --git a/src/USER-OMP/fix_rigid_npt_omp.cpp b/src/USER-OMP/fix_rigid_npt_omp.cpp index 1e7c139d52..6da51e6220 100644 --- a/src/USER-OMP/fix_rigid_npt_omp.cpp +++ b/src/USER-OMP/fix_rigid_npt_omp.cpp @@ -33,7 +33,6 @@ FixRigidNPTOMP::FixRigidNPTOMP(LAMMPS *lmp, int narg, char **arg) : scalar_flag = 1; restart_global = 1; - box_change_size = 1; extscalar = 1; // error checks diff --git a/src/USER-QTB/fix_qbmsst.cpp b/src/USER-QTB/fix_qbmsst.cpp index abbf1701b8..27b1dcd4df 100644 --- a/src/USER-QTB/fix_qbmsst.cpp +++ b/src/USER-QTB/fix_qbmsst.cpp @@ -45,13 +45,16 @@ FixQBMSST::FixQBMSST(LAMMPS *lmp, int narg, char **arg) : { if (narg < 5) error->all(FLERR,"Illegal fix qbmsst command"); - if ( strcmp(arg[3],"x") == 0 ) + if ( strcmp(arg[3],"x") == 0 ) { direction = 0; - else if ( strcmp(arg[3],"y") == 0 ) + box_change |= BOX_CHANGE_X; + } else if ( strcmp(arg[3],"y") == 0 ) { direction = 1; - else if ( strcmp(arg[3],"z") == 0 ) + box_change |= BOX_CHANGE_Y; + } else if ( strcmp(arg[3],"z") == 0 ) { direction = 2; - else { + box_change |= BOX_CHANGE_Z; + } else { error->all(FLERR,"Illegal fix qbmsst command"); } velocity = atof(arg[4]); @@ -64,7 +67,6 @@ FixQBMSST::FixQBMSST(LAMMPS *lmp, int narg, char **arg) : extvector = 0; nevery = 1; restart_global = 1; - box_change_size = 1; time_integrate = 1; scalar_flag = 1; vector_flag = 1; diff --git a/src/USER-UEF/fix_nh_uef.cpp b/src/USER-UEF/fix_nh_uef.cpp index 8873688eb7..5c98a2dc85 100644 --- a/src/USER-UEF/fix_nh_uef.cpp +++ b/src/USER-UEF/fix_nh_uef.cpp @@ -163,7 +163,7 @@ FixNHUef::FixNHUef(LAMMPS *lmp, int narg, char **arg) : // flag that I change the box here (in case of nvt) - box_change_shape = 1; + box_change |= BOX_CHANGE_SHAPE; // initialize the UEFBox class which computes the box at each step diff --git a/src/domain.cpp b/src/domain.cpp index e894682556..efa2ef00cf 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include "style_region.h" #include "atom.h" #include "atom_vec.h" @@ -133,13 +134,39 @@ void Domain::init() box_change_size = box_change_shape = box_change_domain = 0; + // flags for detecting, if multiple fixes try to change the + // same box size or shape parameter + + int box_change_x=0, box_change_y=0, box_change_z=0; + int box_change_yz=0, box_change_xz=0, box_change_xy=0; + Fix **fixes = modify->fix; + if (nonperiodic == 2) box_change_size = 1; for (int i = 0; i < modify->nfix; i++) { - if (modify->fix[i]->box_change_size) box_change_size = 1; - if (modify->fix[i]->box_change_shape) box_change_shape = 1; - if (modify->fix[i]->box_change_domain) box_change_domain = 1; + if (fixes[i]->box_change & Fix::BOX_CHANGE_SIZE) box_change_size = 1; + if (fixes[i]->box_change & Fix::BOX_CHANGE_SHAPE) box_change_shape = 1; + if (fixes[i]->box_change & Fix::BOX_CHANGE_DOMAIN) box_change_domain = 1; + if (fixes[i]->box_change & Fix::BOX_CHANGE_X) box_change_x++; + if (fixes[i]->box_change & Fix::BOX_CHANGE_Y) box_change_y++; + if (fixes[i]->box_change & Fix::BOX_CHANGE_Z) box_change_z++; + if (fixes[i]->box_change & Fix::BOX_CHANGE_YZ) box_change_yz++; + if (fixes[i]->box_change & Fix::BOX_CHANGE_XZ) box_change_xz++; + if (fixes[i]->box_change & Fix::BOX_CHANGE_XY) box_change_xy++; } + std::string mesg = "Must not have multiple fixes change box parameter "; + +#define CHECK_BOX_FIX_ERROR(par) \ + if (box_change_ ## par > 1) error->all(FLERR,(mesg + #par).c_str()) + + CHECK_BOX_FIX_ERROR(x); + CHECK_BOX_FIX_ERROR(y); + CHECK_BOX_FIX_ERROR(z); + CHECK_BOX_FIX_ERROR(yz); + CHECK_BOX_FIX_ERROR(xz); + CHECK_BOX_FIX_ERROR(xy); +#undef CHECK_BOX_FIX_ERROR + box_change = 0; if (box_change_size || box_change_shape || box_change_domain) box_change = 1; diff --git a/src/fix.cpp b/src/fix.cpp index d86acf0ae4..9c883a6897 100644 --- a/src/fix.cpp +++ b/src/fix.cpp @@ -58,7 +58,7 @@ Fix::Fix(LAMMPS *lmp, int /*narg*/, char **arg) : restart_global = restart_peratom = restart_file = 0; force_reneighbor = 0; - box_change_size = box_change_shape = box_change_domain = 0; + box_change = NO_BOX_CHANGE; thermo_energy = 0; thermo_virial = 0; rigid_flag = 0; diff --git a/src/fix.h b/src/fix.h index bcab6f289e..921778ae98 100644 --- a/src/fix.h +++ b/src/fix.h @@ -30,9 +30,14 @@ class Fix : protected Pointers { int restart_file; // 1 if Fix writes own restart file, 0 if not int force_reneighbor; // 1 if Fix forces reneighboring, 0 if not - int box_change_size; // 1 if Fix changes box size, 0 if not - int box_change_shape; // 1 if Fix changes box shape, 0 if not - int box_change_domain; // 1 if Fix changes proc sub-domains, 0 if not + int box_change; // >0 if Fix changes box size, shape, or sub-domains, 0 if not + enum { + NO_BOX_CHANGE = 0, BOX_CHANGE_ANY = 1<<0, BOX_CHANGE_DOMAIN = 1<<1, + BOX_CHANGE_X = 1<<2, BOX_CHANGE_Y = 1<<3, BOX_CHANGE_Z = 1<<4, + BOX_CHANGE_YZ = 1<<5, BOX_CHANGE_XZ = 1<<6, BOX_CHANGE_XY = 1<<7, + BOX_CHANGE_SIZE = BOX_CHANGE_X | BOX_CHANGE_Y | BOX_CHANGE_Z, + BOX_CHANGE_SHAPE = BOX_CHANGE_YZ | BOX_CHANGE_XZ | BOX_CHANGE_XY + }; bigint next_reneighbor; // next timestep to force a reneighboring int thermo_energy; // 1 if fix_modify enabled ThEng, 0 if not diff --git a/src/fix_balance.cpp b/src/fix_balance.cpp index 5ca1ec124a..b178cca83b 100644 --- a/src/fix_balance.cpp +++ b/src/fix_balance.cpp @@ -39,7 +39,7 @@ FixBalance::FixBalance(LAMMPS *lmp, int narg, char **arg) : { if (narg < 6) error->all(FLERR,"Illegal fix balance command"); - box_change_domain = 1; + box_change = BOX_CHANGE_DOMAIN; scalar_flag = 1; extscalar = 0; vector_flag = 1; diff --git a/src/fix_box_relax.cpp b/src/fix_box_relax.cpp index c19ea918b4..8d6111c0a0 100644 --- a/src/fix_box_relax.cpp +++ b/src/fix_box_relax.cpp @@ -218,8 +218,13 @@ FixBoxRelax::FixBoxRelax(LAMMPS *lmp, int narg, char **arg) : } else error->all(FLERR,"Illegal fix box/relax command"); } - if (p_flag[0] || p_flag[1] || p_flag[2]) box_change_size = 1; - if (p_flag[3] || p_flag[4] || p_flag[5]) box_change_shape = 1; + if (p_flag[0]) box_change |= BOX_CHANGE_X; + if (p_flag[1]) box_change |= BOX_CHANGE_Y; + if (p_flag[2]) box_change |= BOX_CHANGE_Z; + if (p_flag[3]) box_change |= BOX_CHANGE_YZ; + if (p_flag[4]) box_change |= BOX_CHANGE_XZ; + if (p_flag[5]) box_change |= BOX_CHANGE_XY; + if (allremap == 0) restart_pbc = 1; // error checks diff --git a/src/fix_deform.cpp b/src/fix_deform.cpp index 9d84c4bb62..4ecfa6f433 100644 --- a/src/fix_deform.cpp +++ b/src/fix_deform.cpp @@ -211,8 +211,12 @@ rfix(NULL), irregular(NULL), set(NULL) if (set[i].style == NONE) dimflag[i] = 0; else dimflag[i] = 1; - if (dimflag[0] || dimflag[1] || dimflag[2]) box_change_size = 1; - if (dimflag[3] || dimflag[4] || dimflag[5]) box_change_shape = 1; + if (dimflag[0]) box_change |= BOX_CHANGE_X; + if (dimflag[1]) box_change |= BOX_CHANGE_Y; + if (dimflag[2]) box_change |= BOX_CHANGE_Z; + if (dimflag[3]) box_change |= BOX_CHANGE_YZ; + if (dimflag[4]) box_change |= BOX_CHANGE_XZ; + if (dimflag[5]) box_change |= BOX_CHANGE_XY; // no tensile deformation on shrink-wrapped dims // b/c shrink wrap will change box-length diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index bb3fe7559c..e397e3367a 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -476,8 +476,12 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : if (p_flag[i]) pstat_flag = 1; if (pstat_flag) { - if (p_flag[0] || p_flag[1] || p_flag[2]) box_change_size = 1; - if (p_flag[3] || p_flag[4] || p_flag[5]) box_change_shape = 1; + if (p_flag[0]) box_change |= BOX_CHANGE_X; + if (p_flag[1]) box_change |= BOX_CHANGE_Y; + if (p_flag[2]) box_change |= BOX_CHANGE_Z; + if (p_flag[3]) box_change |= BOX_CHANGE_YZ; + if (p_flag[4]) box_change |= BOX_CHANGE_XZ; + if (p_flag[5]) box_change |= BOX_CHANGE_XY; no_change_box = 1; if (allremap == 0) restart_pbc = 1; diff --git a/src/fix_press_berendsen.cpp b/src/fix_press_berendsen.cpp index c090c554e2..184f02c440 100644 --- a/src/fix_press_berendsen.cpp +++ b/src/fix_press_berendsen.cpp @@ -40,8 +40,6 @@ FixPressBerendsen::FixPressBerendsen(LAMMPS *lmp, int narg, char **arg) : { if (narg < 5) error->all(FLERR,"Illegal fix press/berendsen command"); - box_change_size = 1; - // Berendsen barostat applied every step nevery = 1; @@ -204,6 +202,10 @@ FixPressBerendsen::FixPressBerendsen(LAMMPS *lmp, int narg, char **arg) : (p_flag[2] && p_period[2] <= 0.0)) error->all(FLERR,"Fix press/berendsen damping parameters must be > 0.0"); + if (p_flag[0]) box_change |= BOX_CHANGE_X; + if (p_flag[1]) box_change |= BOX_CHANGE_Y; + if (p_flag[2]) box_change |= BOX_CHANGE_Z; + // pstyle = ISO if XYZ coupling or XY coupling in 2d -> 1 dof // else pstyle = ANISO -> 3 dof From 8f3c94f33b3eb1fc2a6b4e722a3c30eece4fa831 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 8 Feb 2020 15:22:54 -0500 Subject: [PATCH 024/577] document new error message --- doc/src/Errors_messages.rst | 3 +++ src/domain.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/doc/src/Errors_messages.rst b/doc/src/Errors_messages.rst index bbe84de065..f89b5f5b88 100644 --- a/doc/src/Errors_messages.rst +++ b/doc/src/Errors_messages.rst @@ -5815,6 +5815,9 @@ Doc page with :doc:`WARNING messages ` Cannot use the temper command with only one processor partition. Use the -partition command-line option. +*Must not have multiple fixes change box parameter ...* + Self-explanatory. + *Must read Atoms before Angles* The Atoms section of a data file must come before an Angles section. diff --git a/src/domain.h b/src/domain.h index a0bda8ae72..0ce31a8b4a 100644 --- a/src/domain.h +++ b/src/domain.h @@ -282,6 +282,10 @@ E: Both sides of boundary must be periodic Cannot specify a boundary as periodic only on the lo or hi side. Must be periodic on both sides. +E: Must not have multiple fixes change box parameter ... + +Self-explanatory. + U: Box bounds are invalid The box boundaries specified in the read_data file are invalid. The From f82892c45a5ca45fa01856f4e031e3e9cec855da Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 8 Feb 2020 15:28:10 -0500 Subject: [PATCH 025/577] refactor one more fix --- src/SHOCK/fix_append_atoms.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/SHOCK/fix_append_atoms.cpp b/src/SHOCK/fix_append_atoms.cpp index 5e85b39076..1a6b128cd5 100644 --- a/src/SHOCK/fix_append_atoms.cpp +++ b/src/SHOCK/fix_append_atoms.cpp @@ -40,7 +40,6 @@ FixAppendAtoms::FixAppendAtoms(LAMMPS *lmp, int narg, char **arg) : { force_reneighbor = 1; next_reneighbor = -1; - box_change_size = 1; time_depend = 1; if (narg < 4) error->all(FLERR,"Illegal fix append/atoms command"); @@ -75,35 +74,41 @@ FixAppendAtoms::FixAppendAtoms(LAMMPS *lmp, int narg, char **arg) : if (strcmp(arg[iarg],"xlo") == 0) { error->all(FLERR,"Only zhi currently implemented for fix append/atoms"); xloflag = 1; + box_change |= BOX_CHANGE_X; iarg++; if (domain->boundary[0][0] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"xhi") == 0) { error->all(FLERR,"Only zhi currently implemented for fix append/atoms"); xhiflag = 1; + box_change |= BOX_CHANGE_X; iarg++; if (domain->boundary[0][1] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"ylo") == 0) { error->all(FLERR,"Only zhi currently implemented for fix append/atoms"); yloflag = 1; + box_change |= BOX_CHANGE_Y; iarg++; if (domain->boundary[1][0] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"yhi") == 0) { error->all(FLERR,"Only zhi currently implemented for fix append/atoms"); yhiflag = 1; + box_change |= BOX_CHANGE_Y; iarg++; if (domain->boundary[1][1] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"zlo") == 0) { error->all(FLERR,"Only zhi currently implemented for fix append/atoms"); zloflag = 1; + box_change |= BOX_CHANGE_Z; iarg++; if (domain->boundary[2][0] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"zhi") == 0) { zhiflag = 1; + box_change |= BOX_CHANGE_Z; iarg++; if (domain->boundary[2][1] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); From 1430d1cb126fa7df1bf35527a82760923e1cbb93 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 8 Feb 2020 15:30:13 -0500 Subject: [PATCH 026/577] ...and one more --- src/USER-UEF/fix_nh_uef.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-UEF/fix_nh_uef.cpp b/src/USER-UEF/fix_nh_uef.cpp index 5c98a2dc85..01e2081aca 100644 --- a/src/USER-UEF/fix_nh_uef.cpp +++ b/src/USER-UEF/fix_nh_uef.cpp @@ -244,7 +244,7 @@ void FixNHUef::init() for (int i=0; i < modify->nfix; i++) { if (strcmp(modify->fix[i]->id,id) != 0) - if (modify->fix[i]->box_change_shape != 0) + if ((modify->fix[i]->box_change & BOX_CHANGE_SHAPE) != 0) error->all(FLERR,"Can't use another fix which changes box shape with fix/nvt/npt/uef"); } From 994e1318dd1866201546e98f76064853edeb5731 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 17 Feb 2020 16:59:01 -0700 Subject: [PATCH 027/577] Commit JT 021720 - initial commit - added corrected Neel, new E and w calc. --- src/SPIN/pair_spin_neel.cpp | 131 +++++++++++++++++++++++++----------- src/SPIN/pair_spin_neel.h | 1 + 2 files changed, 91 insertions(+), 41 deletions(-) diff --git a/src/SPIN/pair_spin_neel.cpp b/src/SPIN/pair_spin_neel.cpp index 4a5d453de2..811276cac5 100644 --- a/src/SPIN/pair_spin_neel.cpp +++ b/src/SPIN/pair_spin_neel.cpp @@ -259,7 +259,8 @@ void PairSpinNeel::compute(int eflag, int vflag) } if (eflag) { - evdwl = (spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]); + // evdwl = (spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]); + evdwl = compute_neel_energy(i,j,rsq,eij,spi,spj); evdwl *= 0.5*hbar; } else evdwl = 0.0; @@ -365,65 +366,69 @@ void PairSpinNeel::compute_single_pair(int ii, double fmi[3]) /* ---------------------------------------------------------------------- */ -void PairSpinNeel::compute_neel(int i, int j, double rsq, double eij[3], double fmi[3], double spi[3], double spj[3]) +void PairSpinNeel::compute_neel(int i, int j, double rsq, double eij[3], double fmi[3], double spi[3], double spj[3]) { int *type = atom->type; int itype, jtype; itype = type[i]; jtype = type[j]; - double gij, q1ij, q2ij, ra; + double qr,gr,g1r,q1r,q2r,ra; double pdx, pdy, pdz; double pq1x, pq1y, pq1z; double pq2x, pq2y, pq2z; + double eij_si,eij_sj,si_sj,eij_si_2,eij_sj_3,coeff1; - // pseudo-dipolar component + // compute Neel's functions ra = rsq/g3[itype][jtype]/g3[itype][jtype]; - gij = 4.0*g1[itype][jtype]*ra; - gij *= (1.0-g2[itype][jtype]*ra); - gij *= exp(-ra); - - double scalar_eij_si = eij[0]*spi[0] + eij[1]*spi[1] + eij[2]*spi[2]; - double scalar_eij_sj = eij[0]*spj[0] + eij[1]*spj[1] + eij[2]*spj[2]; - double scalar_si_sj = spi[0]*spj[0] + spi[1]*spj[1] + spi[2]*spj[2]; - - double gij_eij_sj = gij*scalar_eij_sj; - double gij_3 = gij/3.0; - pdx = gij_eij_sj*eij[0] - gij_3*spj[0]; - pdy = gij_eij_sj*eij[1] - gij_3*spj[1]; - pdz = gij_eij_sj*eij[2] - gij_3*spj[2]; - - // pseudo-quadrupolar component + gr = 4.0*g1[itype][jtype]*ra; + gr *= (1.0-g2[itype][jtype]*ra); + gr *= exp(-ra); ra = rsq/q3[itype][jtype]/q3[itype][jtype]; - q1ij = 4.0*q1[itype][jtype]*ra; - q1ij *= (1.0-q2[itype][jtype]*ra); - q1ij *= exp(-ra); - q2ij = (-2.0*q1ij/9.0); + qr = 4.0*q1[itype][jtype]*ra; + qr *= (1.0-q2[itype][jtype]*ra); + qr *= exp(-ra); - double scalar_eij_si_2 = scalar_eij_si*scalar_eij_si; - pq1x = -(scalar_eij_si_2*scalar_eij_si_2 - scalar_si_sj/3.0)*spj[0]/3.0; - pq1y = -(scalar_eij_si_2*scalar_eij_si_2 - scalar_si_sj/3.0)*spj[1]/3.0; - pq1z = -(scalar_eij_si_2*scalar_eij_si_2 - scalar_si_sj/3.0)*spj[2]/3.0; + g1r = (gr + 12.0*qr/35.0); + q1r = 9.0*qr/5.0; + q2r = -2.0*qr/5.0; - double pqt1 = (scalar_eij_sj*scalar_eij_sj-scalar_si_sj/3.0); - pq1x += pqt1*(2.0*scalar_eij_si*eij[0] - spj[0]/3.0); - pq1y += pqt1*(2.0*scalar_eij_si*eij[1] - spj[1]/3.0); - pq1z += pqt1*(2.0*scalar_eij_si*eij[2] - spj[2]/3.0); + // pseudo-dipolar component + + eij_si = eij[0]*spi[0] + eij[1]*spi[1] + eij[2]*spi[2]; + eij_sj = eij[0]*spj[0] + eij[1]*spj[1] + eij[2]*spj[2]; + si_sj = spi[0]*spj[0] + spi[1]*spj[1] + spi[2]*spj[2]; - pq1x *= q1ij; - pq1y *= q1ij; - pq1z *= q1ij; + pdx = g1r*(eij_sj*eij[0] - spj[0]/3.0); + pdy = g1r*(eij_sj*eij[1] - spj[1]/3.0); + pdz = g1r*(eij_sj*eij[2] - spj[2]/3.0); - double scalar_eij_sj_3 = scalar_eij_sj*scalar_eij_sj*scalar_eij_sj; - pq2x = 3.0*scalar_eij_si_2*scalar_eij_sj*eij[0] + scalar_eij_sj_3*eij[0]; - pq2y = 3.0*scalar_eij_si_2*scalar_eij_sj*eij[1] + scalar_eij_sj_3*eij[1]; - pq2z = 3.0*scalar_eij_si_2*scalar_eij_sj*eij[2] + scalar_eij_sj_3*eij[2]; + // pseudo-quadrupolar components - pq2x *= q2ij; - pq2y *= q2ij; - pq2z *= q2ij; + eij_si_2 = eij_si*eij_si; + pq1x = -(eij_si_2 - si_sj/3.0)*spj[0]/3.0; + pq1y = -(eij_si_2 - si_sj/3.0)*spj[1]/3.0; + pq1z = -(eij_si_2 - si_sj/3.0)*spj[2]/3.0; + + coeff1 = (eij_sj*eij_sj-si_sj/3.0); + pq1x += coeff1*(2.0*eij_si*eij[0] - spj[0]/3.0); + pq1y += coeff1*(2.0*eij_si*eij[1] - spj[1]/3.0); + pq1z += coeff1*(2.0*eij_si*eij[2] - spj[2]/3.0); + + pq1x *= q1r; + pq1y *= q1r; + pq1z *= q1r; + + eij_sj_3 = eij_sj*eij_sj*eij_sj; + pq2x = 3.0*eij_si_2*eij_sj*eij[0] + eij_sj_3*eij[0]; + pq2y = 3.0*eij_si_2*eij_sj*eij[1] + eij_sj_3*eij[1]; + pq2z = 3.0*eij_si_2*eij_sj*eij[2] + eij_sj_3*eij[2]; + + pq2x *= q2r; + pq2y *= q2r; + pq2z *= q2r; // adding three contributions @@ -563,6 +568,50 @@ void PairSpinNeel::compute_neel_mech(int i, int j, double rsq, double eij[3], do fi[2] = pdz + pq1z + pq2z; } +/* ---------------------------------------------------------------------- */ + +double PairSpinNeel::compute_neel_energy(int i, int j, double rsq, double eij[3], double spi[3], double spj[3]) +{ + int *type = atom->type; + int itype, jtype; + itype = type[i]; + jtype = type[j]; + + double qr,gr,g1r,q1r,q2r,ra; + double epd,epq1,epq2; + double eij_si,eij_sj,si_sj; + double eij_si_2,eij_sj_2,eij_si_3,eij_sj_3; + + // compute Neel's functions + + ra = rsq/g3[itype][jtype]/g3[itype][jtype]; + gr = 4.0*g1[itype][jtype]*ra; + gr *= (1.0-g2[itype][jtype]*ra); + gr *= exp(-ra); + + ra = rsq/q3[itype][jtype]/q3[itype][jtype]; + qr = 4.0*q1[itype][jtype]*ra; + qr *= (1.0-q2[itype][jtype]*ra); + qr *= exp(-ra); + + g1r = (gr + 12.0*qr/35.0); + q1r = 9.0*qr/5.0; + q2r = -2.0*qr/5.0; + + eij_si = eij[0]*spi[0] + eij[1]*spi[1] + eij[2]*spi[2]; + eij_sj = eij[0]*spj[0] + eij[1]*spj[1] + eij[2]*spj[2]; + si_sj = spi[0]*spj[0] + spi[1]*spj[1] + spi[2]*spj[2]; + epd = g1r*(eij_si*eij_sj-si_sj/3.0); + eij_si_2 = eij_si*eij_si; + eij_sj_2 = eij_sj*eij_sj; + epq1 = q1r*(eij_si_2-si_sj/3.0)*(eij_sj_2-si_sj/3.0); + eij_si_3 = eij_si*eij_si*eij_si; + eij_sj_3 = eij_sj*eij_sj*eij_sj; + epq2 = q2r*(eij_si*eij_sj_3+eij_sj*eij_si_3); + + return (epd+epq1+epq2); +} + /* ---------------------------------------------------------------------- allocate all arrays ------------------------------------------------------------------------- */ diff --git a/src/SPIN/pair_spin_neel.h b/src/SPIN/pair_spin_neel.h index 5261a7f746..a39cf839c9 100644 --- a/src/SPIN/pair_spin_neel.h +++ b/src/SPIN/pair_spin_neel.h @@ -38,6 +38,7 @@ class PairSpinNeel : public PairSpin { void compute_neel(int, int, double, double *, double *, double *, double *); void compute_neel_mech(int, int, double, double *, double *, double *, double *); + double compute_neel_energy(int, int, double, double *, double *, double *); void write_restart(FILE *); void read_restart(FILE *); From a7878096f0e48c4fc9bce241094bc45225564462 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 17 Feb 2020 17:35:59 -0700 Subject: [PATCH 028/577] Commit2 JT 021720 - small change in energy - to do: check w and rework F --- src/SPIN/pair_spin_neel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SPIN/pair_spin_neel.cpp b/src/SPIN/pair_spin_neel.cpp index 811276cac5..6cf5d4843f 100644 --- a/src/SPIN/pair_spin_neel.cpp +++ b/src/SPIN/pair_spin_neel.cpp @@ -605,8 +605,8 @@ double PairSpinNeel::compute_neel_energy(int i, int j, double rsq, double eij[3] eij_si_2 = eij_si*eij_si; eij_sj_2 = eij_sj*eij_sj; epq1 = q1r*(eij_si_2-si_sj/3.0)*(eij_sj_2-si_sj/3.0); - eij_si_3 = eij_si*eij_si*eij_si; - eij_sj_3 = eij_sj*eij_sj*eij_sj; + eij_si_3 = eij_si*eij_si_2; + eij_sj_3 = eij_sj*eij_sj_2; epq2 = q2r*(eij_si*eij_sj_3+eij_sj*eij_si_3); return (epd+epq1+epq2); From b9a9bebd37e21692d8c732e47a2910794f9c3244 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 20 Feb 2020 12:48:44 -0700 Subject: [PATCH 029/577] delay change_box error check on per-atom restart data existing --- doc/src/change_box.rst | 40 ++++++++++++++++++++++++++++------------ src/change_box.cpp | 22 +++++++++++++++++++--- 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/doc/src/change_box.rst b/doc/src/change_box.rst index 02f06ac681..f481658849 100644 --- a/doc/src/change_box.rst +++ b/doc/src/change_box.rst @@ -147,24 +147,40 @@ new owning processors. .. note:: - The simulation box size/shape can be changed by arbitrarily - large amounts by this command. This is not a problem, except that the + The simulation box size/shape can be changed by arbitrarily large + amounts by this command. This is not a problem, except that the mapping of processors to the simulation box is not changed from its initial 3d configuration; see the :doc:`processors ` command. Thus, if the box size/shape changes dramatically, the - mapping of processors to the simulation box may not end up as optimal - as the initial mapping attempted to be. + mapping of processors to the simulation box may not end up as + optimal as the initial mapping attempted to be. You may wish to + re-balance the atoms by using the :doc:`balance ` command + if that is the case. .. note:: - Because the keywords used in this command are applied one at a - time to the simulation box and the atoms in it, care must be taken - with triclinic cells to avoid exceeding the limits on skew after each - transformation in the sequence. If skew is exceeded before the final - transformation this can be avoided by changing the order of the - sequence, or breaking the transformation into two or more smaller - transformations. For more information on the allowed limits for box - skew see the discussion on triclinic boxes on :doc:`Howto triclinic ` doc page. + You cannot use this command after reading a restart file (and + before a run is performed) if the restart file stored per-atom + information from a fix and any of the specified keywords change the + box size or shape or boundary conditions. This is because atoms + may be moved to new processors and the restart info will not + migrate with them. LAMMPS will generate an error if this could + happen. Only the *ortho* and *triclinic* keywords do not trigger + this error. One solution is to perform a "run 0" command before + using the change_box command. This clears the per-atom restart + data, whether it has been re-assigned to a new fix or not. + +.. note:: + + Because the keywords used in this command are applied one at a time + to the simulation box and the atoms in it, care must be taken with + triclinic cells to avoid exceeding the limits on skew after each + transformation in the sequence. If skew is exceeded before the + final transformation this can be avoided by changing the order of + the sequence, or breaking the transformation into two or more + smaller transformations. For more information on the allowed + limits for box skew see the discussion on triclinic boxes on + :doc:`Howto triclinic ` doc page. ---------- diff --git a/src/change_box.cpp b/src/change_box.cpp index 98119fb3bf..7ae49ca776 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -46,9 +46,6 @@ void ChangeBox::command(int narg, char **arg) if (domain->box_exist == 0) error->all(FLERR,"Change_box command before simulation box is defined"); if (narg < 2) error->all(FLERR,"Illegal change_box command"); - if (modify->nfix_restart_peratom) - error->all(FLERR,"Cannot change_box after " - "reading restart file with per-atom info"); if (comm->me == 0 && screen) fprintf(screen,"Changing box ...\n"); @@ -174,6 +171,21 @@ void ChangeBox::command(int narg, char **arg) if (nops == 0) error->all(FLERR,"Illegal change_box command"); + // move_atoms = 1 if need to move atoms to new procs after box changes + // anything other than ORTHO or TRICLINIC may cause atom movement + + int move_atoms = 0; + for (int m = 0; m < nops; m++) { + if (ops[m].style != ORTHO || ops[m].style != TRICLINIC) move_atoms = 1; + } + + // error if moving atoms and there is stored per-atom restart state + // disallowed b/c restart per-atom fix info will not move with atoms + + if (move_atoms && modify->nfix_restart_peratom) + error->all(FLERR,"Change_box parameter not allowed after " + "reading restart file with per-atom info"); + // read options from end of input line options(narg-iarg,&arg[iarg]); @@ -350,6 +362,10 @@ void ChangeBox::command(int narg, char **arg) if (domain->triclinic) domain->lamda2x(atom->nlocal); } + // done if don't need to move atoms + + if (!move_atoms) return; + // move atoms back inside simulation box and to new processors // use remap() instead of pbc() // in case box moved a long distance relative to atoms From 361f7bb0fd7e386d91a47436ec4dcf65a0b4eaac Mon Sep 17 00:00:00 2001 From: julient31 Date: Fri, 21 Feb 2020 12:07:42 -0700 Subject: [PATCH 030/577] Commit JT 022120 - added precession_spin management in compute_spin - to do: add it for pairs - make sure users only declare 1 precession/spin --- src/SPIN/compute_spin.cpp | 70 +++++++++++++++++++++++++++++++- src/SPIN/compute_spin.h | 14 +++++++ src/SPIN/fix_precession_spin.cpp | 10 +++++ src/SPIN/fix_precession_spin.h | 4 ++ 4 files changed, 96 insertions(+), 2 deletions(-) diff --git a/src/SPIN/compute_spin.cpp b/src/SPIN/compute_spin.cpp index 7ee2b5bcfc..0612e5720e 100644 --- a/src/SPIN/compute_spin.cpp +++ b/src/SPIN/compute_spin.cpp @@ -24,11 +24,15 @@ #include "compute_spin.h" #include #include +#include #include "atom.h" #include "error.h" +#include "fix_precession_spin.h" #include "force.h" #include "math_const.h" #include "memory.h" +#include "modify.h" +#include "pair_spin.h" #include "update.h" using namespace LAMMPS_NS; @@ -64,6 +68,50 @@ void ComputeSpin::init() { hbar = force->hplanck/MY_2PI; kb = force->boltz; + + // init length of vector of ptrs to Pair/Spin styles + + if (npairspin > 0) { + spin_pairs = new PairSpin*[npairspin]; + } + + // loop 2: fill vector with ptrs to Pair/Spin styles + + int count = 0; + if (npairspin == 1) { + count = 1; + spin_pairs[0] = (PairSpin *) force->pair_match("spin",0,0); + } else if (npairspin > 1) { + for (int i = 0; ipair_match("spin",0,i)) { + spin_pairs[count] = (PairSpin *) force->pair_match("spin",0,i); + count++; + } + } + } + + if (count != npairspin) + error->all(FLERR,"Incorrect number of spin pairs"); + + // set pair/spin and long/spin flags + + if (npairspin >= 1) pair_spin_flag = 1; + + for (int i = 0; ipair_match("spin/long",0,i)) { + long_spin_flag = 1; + } + } + + // ptrs FixPrecessionSpin classes + + int iforce; + for (iforce = 0; iforce < modify->nfix; iforce++) { + if (strstr(modify->fix[iforce]->style,"precession/spin")) { + precession_spin_flag = 1; + lockprecessionspin = (FixPrecessionSpin *) modify->fix[iforce]; + } + } } /* ---------------------------------------------------------------------- */ @@ -104,7 +152,24 @@ void ComputeSpin::compute_vector() mag[0] += sp[i][0]; mag[1] += sp[i][1]; mag[2] += sp[i][2]; - magenergy -= (sp[i][0]*fm[i][0] + sp[i][1]*fm[i][1] + sp[i][2]*fm[i][2]); + // magenergy -= (sp[i][0]*fm[i][0] + sp[i][1]*fm[i][1] + sp[i][2]*fm[i][2]); + + // update magnetic precession energies + + if (precession_spin_flag) { + magenergy -= lockprecessionspin->compute_zeeman_energy(sp[i]); + magenergy -= lockprecessionspin->compute_anisotropy_energy(sp[i]); + magenergy -= lockprecessionspin->compute_cubic_energy(sp[i]); + } + + // update magnetic pair interactions + + if (pair_spin_flag) { + for (int k = 0; k < npairspin; k++) { + // spin_pairs[k]->compute_single_pair(i,fmi); + } + } + tx = sp[i][1]*fm[i][2]-sp[i][2]*fm[i][1]; ty = sp[i][2]*fm[i][0]-sp[i][0]*fm[i][2]; tz = sp[i][0]*fm[i][1]-sp[i][1]*fm[i][0]; @@ -134,7 +199,8 @@ void ComputeSpin::compute_vector() vector[1] = magtot[1]; vector[2] = magtot[2]; vector[3] = magtot[3]; - vector[4] = magenergytot*hbar; + // vector[4] = magenergytot*hbar; + vector[4] = magenergytot; vector[5] = spintemperature; } diff --git a/src/SPIN/compute_spin.h b/src/SPIN/compute_spin.h index c5d55b84cb..2ff0ba8eee 100644 --- a/src/SPIN/compute_spin.h +++ b/src/SPIN/compute_spin.h @@ -32,7 +32,21 @@ class ComputeSpin : public Compute { void compute_vector(); private: + int pair_spin_flag; // magnetic pair flags + int long_spin_flag; // magnetic long-range flag + int precession_spin_flag; // magnetic precession flags + double kb,hbar; + + // pointers to magnetic fixes + + class FixPrecessionSpin *lockprecessionspin; + + // pointers to magnetic pair styles + + int npairs, npairspin; // # of pairs, and # of spin pairs + class Pair *pair; + class PairSpin **spin_pairs; // vector of spin pairs void allocate(); }; diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 2d55de33ea..f9307d7ad0 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -302,6 +302,16 @@ void FixPrecessionSpin::compute_zeeman(int i, double fmi[3]) /* ---------------------------------------------------------------------- */ +double FixPrecessionSpin::compute_zeeman_energy(double spi[4]) +{ + double energy = 0.0; + double scalar = nhx*spi[0]+nhy*spi[1]+nhz*spi[2]; + energy = hbar*H_field*spi[3]*scalar; + return energy; +} + +/* ---------------------------------------------------------------------- */ + void FixPrecessionSpin::compute_anisotropy(double spi[3], double fmi[3]) { double scalar = nax*spi[0] + nay*spi[1] + naz*spi[2]; diff --git a/src/SPIN/fix_precession_spin.h b/src/SPIN/fix_precession_spin.h index 6ece653ca7..3c809506c1 100644 --- a/src/SPIN/fix_precession_spin.h +++ b/src/SPIN/fix_precession_spin.h @@ -41,7 +41,11 @@ class FixPrecessionSpin : public Fix { int zeeman_flag, aniso_flag, cubic_flag; void compute_single_precession(int, double *, double *); + + // zeeman calculations + void compute_zeeman(int, double *); + double compute_zeeman_energy(double *); // uniaxial aniso calculations From 09d0df43e215e6ce646334b5b60c3e8e53ff85f0 Mon Sep 17 00:00:00 2001 From: julient31 Date: Fri, 21 Feb 2020 17:53:14 -0700 Subject: [PATCH 031/577] Commit JT 022120 - added message for only one precession/spin (+doc) - added a per pair/spin class emag table --- doc/src/fix_precession_spin.rst | 7 +++++- src/SPIN/compute_spin.cpp | 18 +++++++++++++- src/SPIN/fix_precession_spin.cpp | 9 +++++++ src/SPIN/pair_spin.cpp | 6 +++++ src/SPIN/pair_spin.h | 4 +++ src/SPIN/pair_spin_dipole_cut.cpp | 10 ++++++++ src/SPIN/pair_spin_dipole_long.cpp | 24 ++++++++++++++---- src/SPIN/pair_spin_dmi.cpp | 15 ++++++++++- src/SPIN/pair_spin_exchange.cpp | 40 ++++++++++++++++++++++++++++++ src/SPIN/pair_spin_exchange.h | 2 ++ src/SPIN/pair_spin_magelec.cpp | 14 +++++++++++ src/SPIN/pair_spin_neel.cpp | 14 +++++++++++ 12 files changed, 155 insertions(+), 8 deletions(-) diff --git a/doc/src/fix_precession_spin.rst b/doc/src/fix_precession_spin.rst index 9cd15119bd..2d23ed1037 100644 --- a/doc/src/fix_precession_spin.rst +++ b/doc/src/fix_precession_spin.rst @@ -82,6 +82,7 @@ function for the same parameters. .. image:: JPG/zeeman_langevin.jpg :align: center + :width: 600 The temperature effects are accounted for by connecting the spin :math:`i` to a thermal bath using a Langevin thermostat (see @@ -159,11 +160,15 @@ No information about this fix is written to :doc:`binary restart files Restrictions """""""""""" - The *precession/spin* style is part of the SPIN package. This style is only enabled if LAMMPS was built with this package, and if the atom\_style "spin" was declared. See the :doc:`Build package ` doc page for more info. +The *precession/spin* style can only be declared once. If more +than one precession type (for example combining an anisotropy and a Zeeman interactions) +has to be declared, they have to be chained in the same command +line (as shown in the examples above). + Related commands """""""""""""""" diff --git a/src/SPIN/compute_spin.cpp b/src/SPIN/compute_spin.cpp index 0612e5720e..8a71be019b 100644 --- a/src/SPIN/compute_spin.cpp +++ b/src/SPIN/compute_spin.cpp @@ -69,6 +69,22 @@ void ComputeSpin::init() hbar = force->hplanck/MY_2PI; kb = force->boltz; + // loop 1: obtain # of Pairs, and # of Pair/Spin styles + + if (force->pair_match("spin",0,0)) { // only one Pair/Spin style + pair = force->pair_match("spin",0,0); + npairs = pair->instance_total; + npairspin = 1; + } else if (force->pair_match("spin",0,1)) { // more than one Pair/Spin style + pair = force->pair_match("spin",0,1); + npairs = pair->instance_total; + for (int i = 0; ipair_match("spin",0,i)) { + npairspin ++; + } + } + } + // init length of vector of ptrs to Pair/Spin styles if (npairspin > 0) { @@ -166,7 +182,7 @@ void ComputeSpin::compute_vector() if (pair_spin_flag) { for (int k = 0; k < npairspin; k++) { - // spin_pairs[k]->compute_single_pair(i,fmi); + magenergy += spin_pairs[k]->emag[i]; } } diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index f9307d7ad0..57e4549718 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -197,6 +197,15 @@ void FixPrecessionSpin::init() error->all(FLERR,"Illegal precession/spin command"); } + // check that fix precession/spin is only declared once + + int iprec = 0; + for (int iforce = 0; iforce < modify->nfix; iforce++) + if (strstr(modify->fix[iforce]->style,"precession/spin")) iprec++; + if (iprec > 1) + error->all(FLERR,"precession/spin command can only be declared once"); + + varflag = CONSTANT; if (magfieldstyle != CONSTANT) varflag = EQUAL; diff --git a/src/SPIN/pair_spin.cpp b/src/SPIN/pair_spin.cpp index f167e3455c..01b8775eab 100644 --- a/src/SPIN/pair_spin.cpp +++ b/src/SPIN/pair_spin.cpp @@ -29,6 +29,7 @@ #include "fix.h" #include "force.h" #include "math_const.h" +#include "memory.h" #include "modify.h" #include "neighbor.h" #include "neigh_request.h" @@ -98,4 +99,9 @@ void PairSpin::init_style() if (ifix >=0) lattice_flag = ((FixNVESpin *) modify->fix[ifix])->lattice_flag; + // test emag list storing mag energies + // init. size of energy stacking lists + + nlocal_max = atom->nlocal; + memory->grow(emag,nlocal_max,"pair/spin:emag"); } diff --git a/src/SPIN/pair_spin.h b/src/SPIN/pair_spin.h index 34f12d8d59..c8292236a3 100644 --- a/src/SPIN/pair_spin.h +++ b/src/SPIN/pair_spin.h @@ -31,6 +31,10 @@ friend class FixNVESpin; virtual void compute(int, int) {} virtual void compute_single_pair(int, double *) {} + + // test emag list storing mag energies + int nlocal_max; // max value of nlocal (for size of lists) + double *emag; // energy list protected: double hbar; // Planck constant (eV.ps.rad-1) diff --git a/src/SPIN/pair_spin_dipole_cut.cpp b/src/SPIN/pair_spin_dipole_cut.cpp index a7372b480d..6029f8bdbb 100644 --- a/src/SPIN/pair_spin_dipole_cut.cpp +++ b/src/SPIN/pair_spin_dipole_cut.cpp @@ -64,6 +64,9 @@ PairSpinDipoleCut::~PairSpinDipoleCut() memory->destroy(setflag); memory->destroy(cut_spin_long); memory->destroy(cutsq); + + // test emag list storing mag energies + memory->destroy(emag); } } @@ -185,6 +188,13 @@ void PairSpinDipoleCut::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; + // test emag list storing mag energies + // checking size of emag + if (nlocal_max < nlocal) { // grow emag lists if necessary + nlocal_max = nlocal; + memory->grow(emag,nlocal_max,"pair/spin:emag"); + } + // computation of the exchange interaction // loop over atoms and their neighbors diff --git a/src/SPIN/pair_spin_dipole_long.cpp b/src/SPIN/pair_spin_dipole_long.cpp index 124522a9b9..7856035159 100644 --- a/src/SPIN/pair_spin_dipole_long.cpp +++ b/src/SPIN/pair_spin_dipole_long.cpp @@ -69,6 +69,9 @@ PairSpinDipoleLong::~PairSpinDipoleLong() memory->destroy(setflag); memory->destroy(cut_spin_long); memory->destroy(cutsq); + + // test emag list storing mag energies + memory->destroy(emag); } } @@ -212,6 +215,13 @@ void PairSpinDipoleLong::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; + // test emag list storing mag energies + // checking size of emag + if (nlocal_max < nlocal) { // grow emag lists if necessary + nlocal_max = nlocal; + memory->grow(emag,nlocal_max,"pair/spin:emag"); + } + pre1 = 2.0 * g_ewald / MY_PIS; pre2 = 4.0 * pow(g_ewald,3.0) / MY_PIS; pre3 = 8.0 * pow(g_ewald,5.0) / MY_PIS; @@ -221,16 +231,20 @@ void PairSpinDipoleLong::compute(int eflag, int vflag) for (ii = 0; ii < inum; ii++) { i = ilist[ii]; + itype = type[i]; + + jlist = firstneigh[i]; + jnum = numneigh[i]; xi[0] = x[i][0]; xi[1] = x[i][1]; xi[2] = x[i][2]; - jlist = firstneigh[i]; - jnum = numneigh[i]; spi[0] = sp[i][0]; spi[1] = sp[i][1]; spi[2] = sp[i][2]; spi[3] = sp[i][3]; - itype = type[i]; + + // test emag list storing mag energies + emag[i] = 0.0; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; @@ -294,9 +308,9 @@ void PairSpinDipoleLong::compute(int eflag, int vflag) if (eflag) { if (rsq <= local_cut2) { - evdwl -= spi[0]*fmi[0] + spi[1]*fmi[1] + - spi[2]*fmi[2]; + evdwl -= (spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]); evdwl *= 0.5*hbar; + emag[i] += evdwl; } } else evdwl = 0.0; diff --git a/src/SPIN/pair_spin_dmi.cpp b/src/SPIN/pair_spin_dmi.cpp index 04c2dc408d..266bc05da4 100644 --- a/src/SPIN/pair_spin_dmi.cpp +++ b/src/SPIN/pair_spin_dmi.cpp @@ -53,6 +53,9 @@ PairSpinDmi::~PairSpinDmi() memory->destroy(vmech_dmy); memory->destroy(vmech_dmz); memory->destroy(cutsq); + + // test emag list storing mag energies + memory->destroy(emag); } } @@ -191,6 +194,13 @@ void PairSpinDmi::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; + // test emag list storing mag energies + // checking size of emag + if (nlocal_max < nlocal) { // grow emag lists if necessary + nlocal_max = nlocal; + memory->grow(emag,nlocal_max,"pair/spin:emag"); + } + // dmi computation // loop over all atoms @@ -206,7 +216,9 @@ void PairSpinDmi::compute(int eflag, int vflag) spi[0] = sp[i][0]; spi[1] = sp[i][1]; spi[2] = sp[i][2]; - + + // test emag list storing mag energies + emag[i] = 0.0; // loop on neighbors @@ -260,6 +272,7 @@ void PairSpinDmi::compute(int eflag, int vflag) if (eflag) { evdwl -= (spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]); evdwl *= 0.5*hbar; + emag[i] += evdwl; } else evdwl = 0.0; if (evflag) ev_tally_xyz(i,j,nlocal,newton_pair, diff --git a/src/SPIN/pair_spin_exchange.cpp b/src/SPIN/pair_spin_exchange.cpp index 6eacb04ee3..d645515506 100644 --- a/src/SPIN/pair_spin_exchange.cpp +++ b/src/SPIN/pair_spin_exchange.cpp @@ -50,6 +50,9 @@ PairSpinExchange::~PairSpinExchange() memory->destroy(J2); memory->destroy(J3); memory->destroy(cutsq); // to be implemented + + // test emag list storing mag energies + memory->destroy(emag); } } @@ -176,6 +179,13 @@ void PairSpinExchange::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; + // test emag list storing mag energies + // checking size of emag + if (nlocal_max < nlocal) { // grow emag lists if necessary + nlocal_max = nlocal; + memory->grow(emag,nlocal_max,"pair/spin:emag"); + } + // computation of the exchange interaction // loop over atoms and their neighbors @@ -191,6 +201,9 @@ void PairSpinExchange::compute(int eflag, int vflag) spi[0] = sp[i][0]; spi[1] = sp[i][1]; spi[2] = sp[i][2]; + + // test emag list storing mag energies + emag[i] = 0.0; // loop on neighbors @@ -243,6 +256,10 @@ void PairSpinExchange::compute(int eflag, int vflag) if (eflag) { evdwl -= (spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]); evdwl *= 0.5*hbar; + // printf("test ex energy: %g \n",evdwl); + // evdwl = -0.5*compute_energy(i,j,rsq,spi,spj); + // printf("test ex energy: %g \n",evdwl); + emag[i] += evdwl; // evdwl *= hbar; } else evdwl = 0.0; @@ -385,6 +402,29 @@ void PairSpinExchange::compute_exchange_mech(int i, int j, double rsq, double ei fi[2] -= Jex_mech*eij[2]; } +/* ---------------------------------------------------------------------- + compute energy of spin pair i and j +------------------------------------------------------------------------- */ + +// double PairSpinExchange::compute_energy(int i, int j, double rsq, double spi[3], double spj[3]) +// { +// int *type = atom->type; +// int itype, jtype; +// double Jex, ra; +// double energy = 0.0; +// itype = type[i]; +// jtype = type[j]; +// +// Jex = J1_mech[itype][jtype]; +// ra = rsq/J3[itype][jtype]/J3[itype][jtype]; +// Jex = 4.0*Jex*ra; +// Jex *= (1.0-J2[itype][jtype]*ra); +// Jex *= exp(-ra); +// +// energy = Jex*(spi[0]*spj[0]+spi[1]*spj[1]+spi[2]*spj[2]); +// return energy; +// } + /* ---------------------------------------------------------------------- allocate all arrays ------------------------------------------------------------------------- */ diff --git a/src/SPIN/pair_spin_exchange.h b/src/SPIN/pair_spin_exchange.h index 19eafeb5ca..4e9e6bfac8 100644 --- a/src/SPIN/pair_spin_exchange.h +++ b/src/SPIN/pair_spin_exchange.h @@ -39,6 +39,8 @@ class PairSpinExchange : public PairSpin { void compute_exchange(int, int, double, double *, double *); void compute_exchange_mech(int, int, double, double *, double *, double *, double *); + // double compute_energy(int , int , double , double *, double *); + void write_restart(FILE *); void read_restart(FILE *); void write_restart_settings(FILE *); diff --git a/src/SPIN/pair_spin_magelec.cpp b/src/SPIN/pair_spin_magelec.cpp index fabad4ae4d..ef91ab764a 100644 --- a/src/SPIN/pair_spin_magelec.cpp +++ b/src/SPIN/pair_spin_magelec.cpp @@ -51,6 +51,9 @@ PairSpinMagelec::~PairSpinMagelec() memory->destroy(v_mey); memory->destroy(v_mez); memory->destroy(cutsq); // to be deteled + + // test emag list storing mag energies + memory->destroy(emag); } } @@ -185,6 +188,13 @@ void PairSpinMagelec::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; + // test emag list storing mag energies + // checking size of emag + if (nlocal_max < nlocal) { // grow emag lists if necessary + nlocal_max = nlocal; + memory->grow(emag,nlocal_max,"pair/spin:emag"); + } + // magneto-electric computation // loop over atoms and their neighbors @@ -200,6 +210,9 @@ void PairSpinMagelec::compute(int eflag, int vflag) spi[0] = sp[i][0]; spi[1] = sp[i][1]; spi[2] = sp[i][2]; + + // test emag list storing mag energies + emag[i] = 0.0; // loop on neighbors @@ -252,6 +265,7 @@ void PairSpinMagelec::compute(int eflag, int vflag) if (eflag) { evdwl -= (spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]); evdwl *= 0.5*hbar; + emag[i] += evdwl; } else evdwl = 0.0; if (evflag) ev_tally_xyz(i,j,nlocal,newton_pair, diff --git a/src/SPIN/pair_spin_neel.cpp b/src/SPIN/pair_spin_neel.cpp index 6cf5d4843f..e158906b75 100644 --- a/src/SPIN/pair_spin_neel.cpp +++ b/src/SPIN/pair_spin_neel.cpp @@ -54,6 +54,9 @@ PairSpinNeel::~PairSpinNeel() memory->destroy(q2); memory->destroy(q3); memory->destroy(cutsq); // to be deleted + + // test emag list storing mag energies + memory->destroy(emag); } } @@ -190,6 +193,13 @@ void PairSpinNeel::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; + // test emag list storing mag energies + // checking size of emag + if (nlocal_max < nlocal) { // grow emag lists if necessary + nlocal_max = nlocal; + memory->grow(emag,nlocal_max,"pair/spin:emag"); + } + // computation of the neel interaction // loop over atoms and their neighbors @@ -206,6 +216,9 @@ void PairSpinNeel::compute(int eflag, int vflag) spi[1] = sp[i][1]; spi[2] = sp[i][2]; + // test emag list storing mag energies + emag[i] = 0.0; + // loop on neighbors for (jj = 0; jj < jnum; jj++) { @@ -262,6 +275,7 @@ void PairSpinNeel::compute(int eflag, int vflag) // evdwl = (spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]); evdwl = compute_neel_energy(i,j,rsq,eij,spi,spj); evdwl *= 0.5*hbar; + emag[i] += evdwl; } else evdwl = 0.0; if (evflag) ev_tally_xyz(i,j,nlocal,newton_pair, From 674781fe0e77828cbb2a946670e55103451f7c55 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Mon, 24 Feb 2020 13:27:40 -0700 Subject: [PATCH 032/577] Add Kokkos version of compute orientorder/atom --- cmake/Modules/Packages/USER-PLUMED.cmake | 4 +- doc/Makefile | 3 + doc/lammps.1 | 11 +- doc/src/Build_extras.rst | 14 +- doc/src/Build_windows.rst | 28 +- doc/src/Eqs/centro_symmetry.jpg | Bin 4111 -> 0 bytes doc/src/Eqs/centro_symmetry.tex | 9 - doc/src/Eqs/cna_cutoff1.jpg | Bin 13431 -> 0 bytes doc/src/Eqs/cna_cutoff1.tex | 14 - doc/src/Eqs/cna_cutoff2.jpg | Bin 2518 -> 0 bytes doc/src/Eqs/cna_cutoff2.tex | 12 - doc/src/Eqs/cnp_cutoff.jpg | Bin 13431 -> 0 bytes doc/src/Eqs/cnp_cutoff.tex | 14 - doc/src/Eqs/cnp_cutoff2.jpg | Bin 2518 -> 0 bytes doc/src/Eqs/cnp_cutoff2.tex | 12 - doc/src/Eqs/cnp_eq.jpg | Bin 23959 -> 0 bytes doc/src/Eqs/cnp_eq.tex | 9 - doc/src/Eqs/compute_dpd.jpg | Bin 21381 -> 0 bytes doc/src/Eqs/compute_dpd.tex | 13 - doc/src/Eqs/compute_fep_bar.jpg | Bin 18106 -> 0 bytes doc/src/Eqs/compute_fep_bar.tex | 7 - doc/src/Eqs/compute_fep_fdti.jpg | Bin 15544 -> 0 bytes doc/src/Eqs/compute_fep_fdti.tex | 10 - doc/src/Eqs/compute_fep_fep.jpg | Bin 18055 -> 0 bytes doc/src/Eqs/compute_fep_fep.tex | 9 - doc/src/Eqs/compute_fep_lambda.jpg | Bin 10511 -> 0 bytes doc/src/Eqs/compute_fep_lambda.tex | 10 - doc/src/Eqs/compute_fep_ti.jpg | Bin 18149 -> 0 bytes doc/src/Eqs/compute_fep_ti.tex | 10 - doc/src/Eqs/compute_fep_u.jpg | Bin 9337 -> 0 bytes doc/src/Eqs/compute_fep_u.tex | 7 - doc/src/Eqs/compute_fep_vol.jpg | Bin 15209 -> 0 bytes doc/src/Eqs/compute_fep_vol.tex | 9 - doc/src/Eqs/compute_gyration.jpg | Bin 3658 -> 0 bytes doc/src/Eqs/compute_gyration.tex | 9 - doc/src/Eqs/compute_msd_nongauss.jpg | Bin 7277 -> 0 bytes doc/src/Eqs/compute_msd_nongauss.tex | 9 - doc/src/Eqs/compute_saed1.jpg | Bin 1471 -> 0 bytes doc/src/Eqs/compute_saed1.tex | 10 - doc/src/Eqs/compute_saed2.jpg | Bin 4911 -> 0 bytes doc/src/Eqs/compute_saed2.tex | 9 - doc/src/Eqs/compute_saed3.jpg | Bin 7048 -> 0 bytes doc/src/Eqs/compute_saed3.tex | 10 - doc/src/Eqs/compute_shape_parameters.jpg | Bin 7007 -> 0 bytes doc/src/Eqs/compute_shape_parameters.tex | 13 - doc/src/Eqs/compute_sna_atom1.jpg | Bin 19001 -> 0 bytes doc/src/Eqs/compute_sna_atom1.tex | 11 - doc/src/Eqs/compute_sna_atom2.jpg | Bin 17114 -> 0 bytes doc/src/Eqs/compute_sna_atom2.tex | 11 - doc/src/Eqs/compute_sna_atom3.jpg | Bin 19644 -> 0 bytes doc/src/Eqs/compute_sna_atom3.tex | 16 - doc/src/Eqs/compute_sna_atom4.jpg | Bin 35933 -> 0 bytes doc/src/Eqs/compute_sna_atom4.tex | 14 - doc/src/Eqs/compute_sna_atom5.jpg | Bin 14734 -> 0 bytes doc/src/Eqs/compute_sna_atom5.tex | 12 - doc/src/Eqs/compute_sna_atom6.jpg | Bin 17274 -> 0 bytes doc/src/Eqs/compute_sna_atom6.tex | 12 - doc/src/Eqs/compute_xrd1.jpg | Bin 2363 -> 0 bytes doc/src/Eqs/compute_xrd1.tex | 10 - doc/src/Eqs/compute_xrd2.jpg | Bin 4778 -> 0 bytes doc/src/Eqs/compute_xrd2.tex | 9 - doc/src/Eqs/compute_xrd3.jpg | Bin 4745 -> 0 bytes doc/src/Eqs/compute_xrd3.tex | 9 - doc/src/Eqs/compute_xrd4.jpg | Bin 2278 -> 0 bytes doc/src/Eqs/compute_xrd4.tex | 9 - doc/src/Eqs/compute_xrd5.jpg | Bin 7603 -> 0 bytes doc/src/Eqs/compute_xrd5.tex | 10 - doc/src/Eqs/fix_bond_react.jpg | Bin 2427 -> 0 bytes doc/src/Eqs/fix_bond_react.tex | 9 - doc/src/Eqs/fix_box_relax1.jpg | Bin 3375 -> 0 bytes doc/src/Eqs/fix_box_relax1.tex | 9 - doc/src/Eqs/fix_box_relax2.jpg | Bin 3029 -> 0 bytes doc/src/Eqs/fix_box_relax2.tex | 9 - doc/src/Eqs/fix_controller1.jpg | Bin 4832 -> 0 bytes doc/src/Eqs/fix_controller1.tex | 12 - doc/src/Eqs/fix_controller2.jpg | Bin 5571 -> 0 bytes doc/src/Eqs/fix_controller2.tex | 12 - doc/src/Eqs/fix_ehex_eom.jpg | Bin 3272 -> 0 bytes doc/src/Eqs/fix_ehex_eom.tex | 8 - doc/src/Eqs/fix_ehex_f.jpg | Bin 10352 -> 0 bytes doc/src/Eqs/fix_ehex_f.tex | 12 - doc/src/Eqs/fix_eos-cv.jpg | Bin 3016 -> 0 bytes doc/src/Eqs/fix_eos-cv.tex | 9 - doc/src/Eqs/fix_eos_table_rx.jpg | Bin 17367 -> 0 bytes doc/src/Eqs/fix_eos_table_rx.tex | 9 - doc/src/Eqs/fix_gcmc1.jpg | Bin 5617 -> 0 bytes doc/src/Eqs/fix_gcmc1.tex | 9 - doc/src/Eqs/fix_gcmc2.jpg | Bin 10626 -> 0 bytes doc/src/Eqs/fix_gcmc2.tex | 10 - doc/src/Eqs/fix_gcmc3.jpg | Bin 7437 -> 0 bytes doc/src/Eqs/fix_gcmc3.tex | 9 - doc/src/Eqs/fix_gld1.jpg | Bin 14274 -> 0 bytes doc/src/Eqs/fix_gld1.tex | 13 - doc/src/Eqs/fix_grem.jpg | Bin 6224 -> 0 bytes doc/src/Eqs/fix_grem.tex | 9 - .../fix_integration_spin_stdecomposition.tex | 40 - doc/src/Eqs/fix_lb_fluid_boltzmann.jpg | Bin 4643 -> 0 bytes doc/src/Eqs/fix_lb_fluid_boltzmann.tex | 14 - doc/src/Eqs/fix_lb_fluid_fluidforce.jpg | Bin 2358 -> 0 bytes doc/src/Eqs/fix_lb_fluid_fluidforce.tex | 14 - doc/src/Eqs/fix_lb_fluid_gammadefault.jpg | Bin 4793 -> 0 bytes doc/src/Eqs/fix_lb_fluid_gammadefault.tex | 14 - doc/src/Eqs/fix_lb_fluid_navierstokes.jpg | Bin 9311 -> 0 bytes doc/src/Eqs/fix_lb_fluid_navierstokes.tex | 16 - doc/src/Eqs/fix_lb_fluid_properties.jpg | Bin 3471 -> 0 bytes doc/src/Eqs/fix_lb_fluid_properties.tex | 17 - doc/src/Eqs/fix_lb_fluid_stress.jpg | Bin 2530 -> 0 bytes doc/src/Eqs/fix_lb_fluid_stress.tex | 14 - doc/src/Eqs/fix_lb_fluid_viscosity.jpg | Bin 6522 -> 0 bytes doc/src/Eqs/fix_lb_fluid_viscosity.tex | 14 - doc/src/Eqs/fix_mvv_dpd.jpg | Bin 26880 -> 0 bytes doc/src/Eqs/fix_mvv_dpd.tex | 21 - doc/src/Eqs/fix_nh1.jpg | Bin 68243 -> 0 bytes doc/src/Eqs/fix_nh1.tex | 36 - doc/src/Eqs/fix_nphug.jpg | Bin 7506 -> 0 bytes doc/src/Eqs/fix_nphug.tex | 9 - doc/src/Eqs/fix_orient_fcc.jpg | Bin 26005 -> 0 bytes doc/src/Eqs/fix_orient_fcc.tex | 30 - doc/src/Eqs/fix_pimd.jpg | Bin 14569 -> 0 bytes doc/src/Eqs/fix_pimd.tex | 17 - doc/src/Eqs/fix_rattle_constraints.jpg | Bin 4556 -> 0 bytes doc/src/Eqs/fix_rattle_constraints.tex | 9 - doc/src/Eqs/fix_rattle_rij.jpg | Bin 1812 -> 0 bytes doc/src/Eqs/fix_rattle_rij.tex | 8 - doc/src/Eqs/fix_rhok.jpg | Bin 18330 -> 0 bytes doc/src/Eqs/fix_rhok.tex | 11 - doc/src/Eqs/fix_rx.jpg | Bin 2427 -> 0 bytes doc/src/Eqs/fix_rx.tex | 9 - doc/src/Eqs/fix_rx_localTemp.jpg | Bin 16562 -> 0 bytes doc/src/Eqs/fix_rx_localTemp.tex | 9 - doc/src/Eqs/fix_rx_localTemp2.jpg | Bin 16284 -> 0 bytes doc/src/Eqs/fix_rx_localTemp2.tex | 9 - doc/src/Eqs/fix_rx_reaction.jpg | Bin 2896 -> 0 bytes doc/src/Eqs/fix_rx_reaction.tex | 9 - doc/src/Eqs/fix_rx_reactionRate.jpg | Bin 2939 -> 0 bytes doc/src/Eqs/fix_rx_reactionRate.tex | 9 - doc/src/Eqs/fix_spring_rg.jpg | Bin 16204 -> 0 bytes doc/src/Eqs/fix_spring_rg.tex | 19 - doc/src/Eqs/fix_ttm.jpg | Bin 5869 -> 0 bytes doc/src/Eqs/fix_ttm.tex | 15 - doc/src/Eqs/fix_ttm_blast.jpg | Bin 4449 -> 0 bytes doc/src/Eqs/fix_ttm_blast.tex | 13 - doc/src/Eqs/fix_ttm_blast1.jpg | Bin 8657 -> 0 bytes doc/src/Eqs/fix_ttm_blast1.tex | 13 - doc/src/Eqs/fix_ttm_ce.jpg | Bin 7446 -> 0 bytes doc/src/Eqs/fix_ttm_ce.tex | 13 - doc/src/Eqs/fix_ttm_mod.jpg | Bin 10179 -> 0 bytes doc/src/Eqs/fix_ttm_mod.tex | 15 - doc/src/Eqs/fix_wall_colloid.jpg | Bin 17879 -> 0 bytes doc/src/Eqs/fix_wall_colloid.tex | 14 - doc/src/Eqs/fix_wall_ees.jpg | Bin 106786 -> 0 bytes doc/src/Eqs/fix_wall_ees.tex | 10 - doc/src/Eqs/fix_wall_harmonic.jpg | Bin 2413 -> 0 bytes doc/src/Eqs/fix_wall_harmonic.tex | 9 - doc/src/Eqs/fix_wall_lj1043.jpg | Bin 10996 -> 0 bytes doc/src/Eqs/fix_wall_lj1043.tex | 12 - doc/src/Eqs/fix_wall_lj93.jpg | Bin 4883 -> 0 bytes doc/src/Eqs/fix_wall_lj93.tex | 11 - doc/src/Eqs/hexorder.jpg | Bin 16870 -> 0 bytes doc/src/Eqs/hexorder.tex | 8 - doc/src/Eqs/orientorder.jpg | Bin 34695 -> 0 bytes doc/src/Eqs/orientorder.tex | 12 - doc/src/Eqs/pair_adp.jpg | Bin 20391 -> 0 bytes doc/src/Eqs/pair_adp.tex | 16 - doc/src/Eqs/pair_agni.jpg | Bin 15178 -> 0 bytes doc/src/Eqs/pair_agni.tex | 18 - doc/src/Eqs/pair_airebo.jpg | Bin 9380 -> 0 bytes doc/src/Eqs/pair_airebo.tex | 11 - doc/src/Eqs/pair_atm.jpg | Bin 5474 -> 0 bytes doc/src/Eqs/pair_atm.tex | 9 - doc/src/Eqs/pair_beck.jpg | Bin 9451 -> 0 bytes doc/src/Eqs/pair_beck.tex | 11 - doc/src/Eqs/pair_body_rounded.jpg | Bin 146978 -> 0 bytes doc/src/Eqs/pair_body_rounded.tex | 13 - doc/src/Eqs/pair_coul_soft.jpg | Bin 11309 -> 0 bytes doc/src/Eqs/pair_coul_soft.tex | 10 - doc/src/Eqs/pair_lj_soft.jpg | Bin 17984 -> 0 bytes doc/src/Eqs/pair_lj_soft.tex | 15 - doc/src/Eqs/pair_morse_soft.jpg | Bin 20988 -> 0 bytes doc/src/Eqs/pair_morse_soft.tex | 13 - doc/src/Eqs/pair_nm.jpg | Bin 6304 -> 0 bytes doc/src/Eqs/pair_nm.tex | 10 - doc/src/Eqs/pair_srp1.jpg | Bin 3537 -> 0 bytes doc/src/Eqs/pair_srp1.tex | 9 - doc/src/Eqs/pair_srp2.jpg | Bin 5648 -> 0 bytes doc/src/Eqs/pair_srp2.tex | 10 - doc/src/Eqs/pair_sw.jpg | Bin 28707 -> 0 bytes doc/src/Eqs/pair_sw.tex | 18 - doc/src/Eqs/pair_tersoff.jpg | Bin 36139 -> 0 bytes doc/src/Eqs/pair_tersoff_1.jpg | Bin 36584 -> 0 bytes doc/src/Eqs/pair_tersoff_1.tex | 24 - doc/src/Eqs/pair_tersoff_2.jpg | Bin 13756 -> 0 bytes doc/src/Eqs/pair_tersoff_2.tex | 14 - doc/src/Eqs/pair_tersoff_mod.jpg | Bin 91727 -> 0 bytes doc/src/Eqs/pair_tersoff_mod.tex | 24 - doc/src/Eqs/pair_tersoff_mod_c.jpg | Bin 4211 -> 0 bytes doc/src/Eqs/pair_tersoff_mod_c.tex | 10 - doc/src/Eqs/pair_tersoff_zbl.jpg | Bin 392677 -> 0 bytes doc/src/Eqs/pair_tersoff_zbl.tex | 33 - doc/src/Eqs/pair_ufm.jpg | Bin 17830 -> 0 bytes doc/src/Eqs/pair_ufm.tex | 14 - doc/src/Eqs/pair_vashishta.jpg | Bin 73306 -> 0 bytes doc/src/Eqs/pair_vashishta.tex | 22 - doc/src/Eqs/pair_yukawa.jpg | Bin 2189 -> 0 bytes doc/src/Eqs/pair_yukawa.tex | 9 - doc/src/Eqs/pair_yukawa_colloid.jpg | Bin 3067 -> 0 bytes doc/src/Eqs/pair_yukawa_colloid.tex | 9 - doc/src/Eqs/pair_zbl.jpg | Bin 32209 -> 0 bytes doc/src/Eqs/pair_zbl.tex | 11 - doc/src/Eqs/pressure.jpg | Bin 4333 -> 0 bytes doc/src/Eqs/pressure.tex | 9 - doc/src/Eqs/pressure_tensor.jpg | Bin 5457 -> 0 bytes doc/src/Eqs/pressure_tensor.tex | 10 - doc/src/Eqs/ptm_rmsd.jpg | Bin 6833 -> 0 bytes doc/src/Eqs/ptm_rmsd.tex | 21 - doc/src/Install_linux.rst | 25 +- .../fix_integration_spin_stdecomposition.jpg | Bin doc/src/compute_centro_atom.rst | 35 +- doc/src/compute_cna_atom.rst | 17 +- doc/src/compute_cnp_atom.rst | 32 +- doc/src/compute_dpd.rst | 24 +- doc/src/compute_dpd_atom.rst | 18 +- doc/src/compute_entropy_atom.rst | 26 +- doc/src/compute_fep.rst | 56 +- doc/src/compute_gyration.rst | 31 +- doc/src/compute_gyration_chunk.rst | 20 +- doc/src/compute_gyration_shape.rst | 10 +- doc/src/compute_gyration_shape_chunk.rst | 10 +- doc/src/compute_hexorder_atom.rst | 33 +- doc/src/compute_msd_nongauss.rst | 6 +- doc/src/compute_orientorder_atom.rst | 72 +- doc/src/compute_pressure.rst | 13 +- doc/src/compute_ptm_atom.rst | 7 +- doc/src/compute_saed.rst | 140 +++- doc/src/compute_sna_atom.rst | 44 +- doc/src/compute_xrd.rst | 27 +- doc/src/fix_ave_correlate_long.rst | 23 +- doc/src/fix_bond_react.rst | 10 +- doc/src/fix_box_relax.rst | 25 +- doc/src/fix_controller.rst | 48 +- doc/src/fix_ehex.rst | 15 +- doc/src/fix_eos_cv.rst | 18 +- doc/src/fix_eos_table_rx.rst | 55 +- doc/src/fix_gcmc.rst | 46 +- doc/src/fix_gld.rst | 10 +- doc/src/fix_grem.rst | 38 +- doc/src/fix_hyper_global.rst | 84 ++- doc/src/fix_hyper_local.rst | 239 +++--- doc/src/fix_langevin_spin.rst | 15 +- doc/src/fix_lb_fluid.rst | 89 ++- doc/src/fix_mvv_dpd.rst | 10 +- doc/src/fix_nh.rst | 23 +- doc/src/fix_nphug.rst | 49 +- doc/src/fix_npt_cauchy.rst | 22 +- doc/src/fix_nve_spin.rst | 2 +- doc/src/fix_orient.rst | 18 +- doc/src/fix_pimd.rst | 7 +- doc/src/fix_rhok.rst | 8 +- doc/src/fix_rx.rst | 32 +- doc/src/fix_shake.rst | 13 +- doc/src/fix_spring_rg.rst | 18 +- doc/src/fix_ti_spring.rst | 18 +- doc/src/fix_ttm.rst | 34 +- doc/src/fix_wall.rst | 47 +- doc/src/fix_wall_ees.rst | 41 +- doc/src/fix_wall_region.rst | 52 +- doc/src/min_style.rst | 16 +- doc/src/pair_adp.rst | 84 ++- doc/src/pair_agni.rst | 40 +- doc/src/pair_airebo.rst | 115 +-- doc/src/pair_atm.rst | 114 +-- doc/src/pair_beck.rst | 40 +- doc/src/pair_body_nparticle.rst | 30 +- doc/src/pair_body_rounded_polygon.rst | 61 +- doc/src/pair_body_rounded_polyhedron.rst | 55 +- doc/src/pair_fep_soft.rst | 222 +++--- doc/src/pair_nm.rst | 43 +- doc/src/pair_srp.rst | 34 +- doc/src/pair_sw.rst | 52 +- doc/src/pair_tersoff.rst | 63 +- doc/src/pair_tersoff_mod.rst | 79 +- doc/src/pair_tersoff_zbl.rst | 84 ++- doc/src/pair_ufm.rst | 24 +- doc/src/pair_vashishta.rst | 62 +- doc/src/pair_yukawa.rst | 8 +- doc/src/pair_yukawa_colloid.rst | 26 +- doc/src/pair_zbl.rst | 35 +- doc/src/set.rst | 2 +- ....g++.1 => log.4Feb20.peptide-plumed.g++.1} | 34 +- ....g++.4 => log.4Feb20.peptide-plumed.g++.4} | 34 +- examples/USER/plumed/reference/p.log | 33 +- lib/gpu/lal_lj_tip4p_long.cpp | 25 +- lib/gpu/lal_lj_tip4p_long.cu | 326 +++++++- lib/plumed/Install.py | 4 +- lib/qmmm/Makefile.gfortran | 14 +- lib/qmmm/Makefile.ifort | 24 +- lib/qmmm/README | 13 +- src/GPU/pair_born_coul_long_gpu.cpp | 4 + src/GPU/pair_buck_coul_long_gpu.cpp | 4 + src/GPU/pair_lj_class2_coul_long_gpu.cpp | 4 + src/KOKKOS/Install.sh | 2 + .../compute_orientorder_atom_kokkos.cpp | 698 ++++++++++++++++++ src/KOKKOS/compute_orientorder_atom_kokkos.h | 150 ++++ src/KSPACE/pair_born_coul_long.cpp | 1 + src/KSPACE/pair_buck_long_coul_long.cpp | 1 + src/KSPACE/pair_coul_long.cpp | 1 + src/KSPACE/pair_lj_charmm_coul_long.cpp | 1 + src/KSPACE/pair_lj_charmmfsw_coul_long.cpp | 1 + src/KSPACE/pair_lj_cut_coul_long.cpp | 1 + src/KSPACE/pair_lj_long_coul_long.cpp | 1 + src/USER-PLUMED/fix_plumed.cpp | 5 +- src/compute_orientorder_atom.cpp | 2 + src/compute_orientorder_atom.h | 8 +- src/lmptype.h | 7 - src/modify.cpp | 14 + src/pair_coul_streitz.h | 1 - src/pair_lj96_cut.cpp | 1 + src/pair_mie_cut.cpp | 1 + src/reader_native.cpp | 10 +- src/set.cpp | 9 +- src/suffix.h | 19 +- src/version.h | 2 +- 322 files changed, 3229 insertions(+), 2663 deletions(-) delete mode 100644 doc/src/Eqs/centro_symmetry.jpg delete mode 100644 doc/src/Eqs/centro_symmetry.tex delete mode 100644 doc/src/Eqs/cna_cutoff1.jpg delete mode 100644 doc/src/Eqs/cna_cutoff1.tex delete mode 100644 doc/src/Eqs/cna_cutoff2.jpg delete mode 100644 doc/src/Eqs/cna_cutoff2.tex delete mode 100644 doc/src/Eqs/cnp_cutoff.jpg delete mode 100644 doc/src/Eqs/cnp_cutoff.tex delete mode 100644 doc/src/Eqs/cnp_cutoff2.jpg delete mode 100644 doc/src/Eqs/cnp_cutoff2.tex delete mode 100644 doc/src/Eqs/cnp_eq.jpg delete mode 100644 doc/src/Eqs/cnp_eq.tex delete mode 100644 doc/src/Eqs/compute_dpd.jpg delete mode 100644 doc/src/Eqs/compute_dpd.tex delete mode 100644 doc/src/Eqs/compute_fep_bar.jpg delete mode 100644 doc/src/Eqs/compute_fep_bar.tex delete mode 100644 doc/src/Eqs/compute_fep_fdti.jpg delete mode 100644 doc/src/Eqs/compute_fep_fdti.tex delete mode 100644 doc/src/Eqs/compute_fep_fep.jpg delete mode 100644 doc/src/Eqs/compute_fep_fep.tex delete mode 100644 doc/src/Eqs/compute_fep_lambda.jpg delete mode 100644 doc/src/Eqs/compute_fep_lambda.tex delete mode 100644 doc/src/Eqs/compute_fep_ti.jpg delete mode 100644 doc/src/Eqs/compute_fep_ti.tex delete mode 100644 doc/src/Eqs/compute_fep_u.jpg delete mode 100644 doc/src/Eqs/compute_fep_u.tex delete mode 100644 doc/src/Eqs/compute_fep_vol.jpg delete mode 100644 doc/src/Eqs/compute_fep_vol.tex delete mode 100644 doc/src/Eqs/compute_gyration.jpg delete mode 100644 doc/src/Eqs/compute_gyration.tex delete mode 100644 doc/src/Eqs/compute_msd_nongauss.jpg delete mode 100644 doc/src/Eqs/compute_msd_nongauss.tex delete mode 100644 doc/src/Eqs/compute_saed1.jpg delete mode 100644 doc/src/Eqs/compute_saed1.tex delete mode 100644 doc/src/Eqs/compute_saed2.jpg delete mode 100644 doc/src/Eqs/compute_saed2.tex delete mode 100644 doc/src/Eqs/compute_saed3.jpg delete mode 100644 doc/src/Eqs/compute_saed3.tex delete mode 100644 doc/src/Eqs/compute_shape_parameters.jpg delete mode 100644 doc/src/Eqs/compute_shape_parameters.tex delete mode 100644 doc/src/Eqs/compute_sna_atom1.jpg delete mode 100644 doc/src/Eqs/compute_sna_atom1.tex delete mode 100644 doc/src/Eqs/compute_sna_atom2.jpg delete mode 100644 doc/src/Eqs/compute_sna_atom2.tex delete mode 100644 doc/src/Eqs/compute_sna_atom3.jpg delete mode 100644 doc/src/Eqs/compute_sna_atom3.tex delete mode 100644 doc/src/Eqs/compute_sna_atom4.jpg delete mode 100644 doc/src/Eqs/compute_sna_atom4.tex delete mode 100644 doc/src/Eqs/compute_sna_atom5.jpg delete mode 100644 doc/src/Eqs/compute_sna_atom5.tex delete mode 100644 doc/src/Eqs/compute_sna_atom6.jpg delete mode 100644 doc/src/Eqs/compute_sna_atom6.tex delete mode 100644 doc/src/Eqs/compute_xrd1.jpg delete mode 100644 doc/src/Eqs/compute_xrd1.tex delete mode 100644 doc/src/Eqs/compute_xrd2.jpg delete mode 100644 doc/src/Eqs/compute_xrd2.tex delete mode 100644 doc/src/Eqs/compute_xrd3.jpg delete mode 100644 doc/src/Eqs/compute_xrd3.tex delete mode 100644 doc/src/Eqs/compute_xrd4.jpg delete mode 100644 doc/src/Eqs/compute_xrd4.tex delete mode 100644 doc/src/Eqs/compute_xrd5.jpg delete mode 100644 doc/src/Eqs/compute_xrd5.tex delete mode 100644 doc/src/Eqs/fix_bond_react.jpg delete mode 100644 doc/src/Eqs/fix_bond_react.tex delete mode 100644 doc/src/Eqs/fix_box_relax1.jpg delete mode 100644 doc/src/Eqs/fix_box_relax1.tex delete mode 100644 doc/src/Eqs/fix_box_relax2.jpg delete mode 100644 doc/src/Eqs/fix_box_relax2.tex delete mode 100644 doc/src/Eqs/fix_controller1.jpg delete mode 100644 doc/src/Eqs/fix_controller1.tex delete mode 100644 doc/src/Eqs/fix_controller2.jpg delete mode 100644 doc/src/Eqs/fix_controller2.tex delete mode 100644 doc/src/Eqs/fix_ehex_eom.jpg delete mode 100644 doc/src/Eqs/fix_ehex_eom.tex delete mode 100644 doc/src/Eqs/fix_ehex_f.jpg delete mode 100644 doc/src/Eqs/fix_ehex_f.tex delete mode 100644 doc/src/Eqs/fix_eos-cv.jpg delete mode 100644 doc/src/Eqs/fix_eos-cv.tex delete mode 100644 doc/src/Eqs/fix_eos_table_rx.jpg delete mode 100644 doc/src/Eqs/fix_eos_table_rx.tex delete mode 100644 doc/src/Eqs/fix_gcmc1.jpg delete mode 100644 doc/src/Eqs/fix_gcmc1.tex delete mode 100644 doc/src/Eqs/fix_gcmc2.jpg delete mode 100644 doc/src/Eqs/fix_gcmc2.tex delete mode 100644 doc/src/Eqs/fix_gcmc3.jpg delete mode 100644 doc/src/Eqs/fix_gcmc3.tex delete mode 100644 doc/src/Eqs/fix_gld1.jpg delete mode 100644 doc/src/Eqs/fix_gld1.tex delete mode 100644 doc/src/Eqs/fix_grem.jpg delete mode 100644 doc/src/Eqs/fix_grem.tex delete mode 100644 doc/src/Eqs/fix_integration_spin_stdecomposition.tex delete mode 100644 doc/src/Eqs/fix_lb_fluid_boltzmann.jpg delete mode 100755 doc/src/Eqs/fix_lb_fluid_boltzmann.tex delete mode 100644 doc/src/Eqs/fix_lb_fluid_fluidforce.jpg delete mode 100755 doc/src/Eqs/fix_lb_fluid_fluidforce.tex delete mode 100644 doc/src/Eqs/fix_lb_fluid_gammadefault.jpg delete mode 100755 doc/src/Eqs/fix_lb_fluid_gammadefault.tex delete mode 100644 doc/src/Eqs/fix_lb_fluid_navierstokes.jpg delete mode 100755 doc/src/Eqs/fix_lb_fluid_navierstokes.tex delete mode 100644 doc/src/Eqs/fix_lb_fluid_properties.jpg delete mode 100755 doc/src/Eqs/fix_lb_fluid_properties.tex delete mode 100644 doc/src/Eqs/fix_lb_fluid_stress.jpg delete mode 100755 doc/src/Eqs/fix_lb_fluid_stress.tex delete mode 100644 doc/src/Eqs/fix_lb_fluid_viscosity.jpg delete mode 100755 doc/src/Eqs/fix_lb_fluid_viscosity.tex delete mode 100644 doc/src/Eqs/fix_mvv_dpd.jpg delete mode 100644 doc/src/Eqs/fix_mvv_dpd.tex delete mode 100644 doc/src/Eqs/fix_nh1.jpg delete mode 100644 doc/src/Eqs/fix_nh1.tex delete mode 100644 doc/src/Eqs/fix_nphug.jpg delete mode 100644 doc/src/Eqs/fix_nphug.tex delete mode 100644 doc/src/Eqs/fix_orient_fcc.jpg delete mode 100644 doc/src/Eqs/fix_orient_fcc.tex delete mode 100644 doc/src/Eqs/fix_pimd.jpg delete mode 100644 doc/src/Eqs/fix_pimd.tex delete mode 100644 doc/src/Eqs/fix_rattle_constraints.jpg delete mode 100644 doc/src/Eqs/fix_rattle_constraints.tex delete mode 100644 doc/src/Eqs/fix_rattle_rij.jpg delete mode 100644 doc/src/Eqs/fix_rattle_rij.tex delete mode 100644 doc/src/Eqs/fix_rhok.jpg delete mode 100644 doc/src/Eqs/fix_rhok.tex delete mode 100644 doc/src/Eqs/fix_rx.jpg delete mode 100644 doc/src/Eqs/fix_rx.tex delete mode 100644 doc/src/Eqs/fix_rx_localTemp.jpg delete mode 100644 doc/src/Eqs/fix_rx_localTemp.tex delete mode 100644 doc/src/Eqs/fix_rx_localTemp2.jpg delete mode 100644 doc/src/Eqs/fix_rx_localTemp2.tex delete mode 100644 doc/src/Eqs/fix_rx_reaction.jpg delete mode 100644 doc/src/Eqs/fix_rx_reaction.tex delete mode 100644 doc/src/Eqs/fix_rx_reactionRate.jpg delete mode 100644 doc/src/Eqs/fix_rx_reactionRate.tex delete mode 100644 doc/src/Eqs/fix_spring_rg.jpg delete mode 100644 doc/src/Eqs/fix_spring_rg.tex delete mode 100644 doc/src/Eqs/fix_ttm.jpg delete mode 100644 doc/src/Eqs/fix_ttm.tex delete mode 100644 doc/src/Eqs/fix_ttm_blast.jpg delete mode 100644 doc/src/Eqs/fix_ttm_blast.tex delete mode 100644 doc/src/Eqs/fix_ttm_blast1.jpg delete mode 100644 doc/src/Eqs/fix_ttm_blast1.tex delete mode 100644 doc/src/Eqs/fix_ttm_ce.jpg delete mode 100644 doc/src/Eqs/fix_ttm_ce.tex delete mode 100644 doc/src/Eqs/fix_ttm_mod.jpg delete mode 100644 doc/src/Eqs/fix_ttm_mod.tex delete mode 100644 doc/src/Eqs/fix_wall_colloid.jpg delete mode 100644 doc/src/Eqs/fix_wall_colloid.tex delete mode 100644 doc/src/Eqs/fix_wall_ees.jpg delete mode 100644 doc/src/Eqs/fix_wall_ees.tex delete mode 100644 doc/src/Eqs/fix_wall_harmonic.jpg delete mode 100644 doc/src/Eqs/fix_wall_harmonic.tex delete mode 100644 doc/src/Eqs/fix_wall_lj1043.jpg delete mode 100644 doc/src/Eqs/fix_wall_lj1043.tex delete mode 100644 doc/src/Eqs/fix_wall_lj93.jpg delete mode 100644 doc/src/Eqs/fix_wall_lj93.tex delete mode 100644 doc/src/Eqs/hexorder.jpg delete mode 100644 doc/src/Eqs/hexorder.tex delete mode 100644 doc/src/Eqs/orientorder.jpg delete mode 100644 doc/src/Eqs/orientorder.tex delete mode 100644 doc/src/Eqs/pair_adp.jpg delete mode 100644 doc/src/Eqs/pair_adp.tex delete mode 100644 doc/src/Eqs/pair_agni.jpg delete mode 100644 doc/src/Eqs/pair_agni.tex delete mode 100644 doc/src/Eqs/pair_airebo.jpg delete mode 100644 doc/src/Eqs/pair_airebo.tex delete mode 100644 doc/src/Eqs/pair_atm.jpg delete mode 100644 doc/src/Eqs/pair_atm.tex delete mode 100644 doc/src/Eqs/pair_beck.jpg delete mode 100644 doc/src/Eqs/pair_beck.tex delete mode 100644 doc/src/Eqs/pair_body_rounded.jpg delete mode 100644 doc/src/Eqs/pair_body_rounded.tex delete mode 100644 doc/src/Eqs/pair_coul_soft.jpg delete mode 100644 doc/src/Eqs/pair_coul_soft.tex delete mode 100644 doc/src/Eqs/pair_lj_soft.jpg delete mode 100644 doc/src/Eqs/pair_lj_soft.tex delete mode 100644 doc/src/Eqs/pair_morse_soft.jpg delete mode 100644 doc/src/Eqs/pair_morse_soft.tex delete mode 100644 doc/src/Eqs/pair_nm.jpg delete mode 100644 doc/src/Eqs/pair_nm.tex delete mode 100644 doc/src/Eqs/pair_srp1.jpg delete mode 100644 doc/src/Eqs/pair_srp1.tex delete mode 100644 doc/src/Eqs/pair_srp2.jpg delete mode 100644 doc/src/Eqs/pair_srp2.tex delete mode 100644 doc/src/Eqs/pair_sw.jpg delete mode 100644 doc/src/Eqs/pair_sw.tex delete mode 100644 doc/src/Eqs/pair_tersoff.jpg delete mode 100644 doc/src/Eqs/pair_tersoff_1.jpg delete mode 100644 doc/src/Eqs/pair_tersoff_1.tex delete mode 100644 doc/src/Eqs/pair_tersoff_2.jpg delete mode 100644 doc/src/Eqs/pair_tersoff_2.tex delete mode 100644 doc/src/Eqs/pair_tersoff_mod.jpg delete mode 100644 doc/src/Eqs/pair_tersoff_mod.tex delete mode 100644 doc/src/Eqs/pair_tersoff_mod_c.jpg delete mode 100644 doc/src/Eqs/pair_tersoff_mod_c.tex delete mode 100644 doc/src/Eqs/pair_tersoff_zbl.jpg delete mode 100644 doc/src/Eqs/pair_tersoff_zbl.tex delete mode 100644 doc/src/Eqs/pair_ufm.jpg delete mode 100644 doc/src/Eqs/pair_ufm.tex delete mode 100644 doc/src/Eqs/pair_vashishta.jpg delete mode 100644 doc/src/Eqs/pair_vashishta.tex delete mode 100644 doc/src/Eqs/pair_yukawa.jpg delete mode 100644 doc/src/Eqs/pair_yukawa.tex delete mode 100644 doc/src/Eqs/pair_yukawa_colloid.jpg delete mode 100644 doc/src/Eqs/pair_yukawa_colloid.tex delete mode 100644 doc/src/Eqs/pair_zbl.jpg delete mode 100644 doc/src/Eqs/pair_zbl.tex delete mode 100644 doc/src/Eqs/pressure.jpg delete mode 100644 doc/src/Eqs/pressure.tex delete mode 100644 doc/src/Eqs/pressure_tensor.jpg delete mode 100644 doc/src/Eqs/pressure_tensor.tex delete mode 100644 doc/src/Eqs/ptm_rmsd.jpg delete mode 100644 doc/src/Eqs/ptm_rmsd.tex rename doc/src/{Eqs => JPG}/fix_integration_spin_stdecomposition.jpg (100%) rename examples/USER/plumed/{log.27Nov18.peptide-plumed.g++.1 => log.4Feb20.peptide-plumed.g++.1} (82%) rename examples/USER/plumed/{log.27Nov18.peptide-plumed.g++.4 => log.4Feb20.peptide-plumed.g++.4} (82%) create mode 100644 src/KOKKOS/compute_orientorder_atom_kokkos.cpp create mode 100644 src/KOKKOS/compute_orientorder_atom_kokkos.h diff --git a/cmake/Modules/Packages/USER-PLUMED.cmake b/cmake/Modules/Packages/USER-PLUMED.cmake index bf5c502d84..e10176f9fd 100644 --- a/cmake/Modules/Packages/USER-PLUMED.cmake +++ b/cmake/Modules/Packages/USER-PLUMED.cmake @@ -49,8 +49,8 @@ if(PKG_USER-PLUMED) message(STATUS "PLUMED download requested - we will build our own") include(ExternalProject) ExternalProject_Add(plumed_build - URL https://github.com/plumed/plumed2/releases/download/v2.5.3/plumed-src-2.5.3.tgz - URL_MD5 de30d6e7c2dcc0973298e24a6da24286 + URL https://github.com/plumed/plumed2/releases/download/v2.6.0/plumed-src-2.6.0.tgz + URL_MD5 204d2edae58d9b10ba3ad460cad64191 BUILD_IN_SOURCE 1 CONFIGURE_COMMAND /configure --prefix= ${CONFIGURE_REQUEST_PIC} diff --git a/doc/Makefile b/doc/Makefile index 82c099ff70..7fba611361 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -75,8 +75,11 @@ html: $(ANCHORCHECK) @rm -rf html/_sources @rm -rf html/PDF @rm -rf html/USER + @rm -rf html/JPG @cp -r src/PDF html/PDF @cp -r src/USER html/USER + @mkdir -p html/JPG + @cp `grep -A2 '\.\. image::' src/*.rst | grep ':target:' | sed -e 's,.*:target: JPG/,src/JPG/,' | sort | uniq` html/JPG/ @rm -rf html/PDF/.[sg]* @rm -rf html/USER/.[sg]* @rm -rf html/USER/*/.[sg]* diff --git a/doc/lammps.1 b/doc/lammps.1 index 492a600e9d..ee2299f4b5 100644 --- a/doc/lammps.1 +++ b/doc/lammps.1 @@ -1,4 +1,4 @@ -.TH LAMMPS "4 February 2020" "2020-02-04" +.TH LAMMPS "18 February 2020" "2020-02-18" .SH NAME .B LAMMPS \- Molecular Dynamics Simulator. @@ -11,13 +11,18 @@ or mpirun \-np 2 .B lmp - [OPTIONS] ... +\-in [OPTIONS] ... or .B lmp \-r2data file.restart file.data +or + +.B lmp +\-h + .SH DESCRIPTION .B LAMMPS is a classical molecular dynamics code, and an acronym for \fBL\fRarge-scale @@ -249,7 +254,7 @@ the chapter on errors in the manual gives some additional information about error messages, if possible. .SH COPYRIGHT -© 2003--2019 Sandia Corporation +© 2003--2020 Sandia Corporation This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index d2d47f694c..e1d3b52165 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -880,6 +880,9 @@ USER-PLUMED package Before building LAMMPS with this package, you must first build PLUMED. PLUMED can be built as part of the LAMMPS build or installed separately from LAMMPS using the generic `plumed installation instructions `_. +The USER-PLUMED package has been tested to work with Plumed versions +2.4.x, 2.5.x, and 2.6.x and will error out, when trying to run calculations +with a different version of the Plumed kernel. PLUMED can be linked into MD codes in three different modes: static, @@ -1212,13 +1215,10 @@ USER-QMMM package for a QM/MM simulation. You must also build Quantum ESPRESSO and create a new executable (pwqmmm.x) which links LAMMPS and Quantum ESPRESSO together. These are steps 3 and 4 described in the - lib/qmmm/README file. Unfortunately, the Quantum ESPRESSO developers - have been breaking the interface that the QM/MM code in LAMMPS is using, - so that currently (Summer 2018) using this feature requires either - correcting the library interface feature in recent Quantum ESPRESSO - releases, or using an outdated version of QE. The last version of - Quantum ESPRESSO known to work with this QM/MM interface was version - 5.4.1 from 2016. + lib/qmmm/README file. This requires a compatible Quantum espresso + and LAMMPS version. The current interface and makefiles have + last been verified to work in February 2020 with Quantum Espresso + versions 6.3 to 6.5. **CMake build**\ : diff --git a/doc/src/Build_windows.rst b/doc/src/Build_windows.rst index fd76f3ac80..264e4bf44f 100644 --- a/doc/src/Build_windows.rst +++ b/doc/src/Build_windows.rst @@ -17,9 +17,9 @@ General remarks LAMMPS is developed and tested primarily on Linux machines. The vast majority of HPC clusters and supercomputers today runs on Linux as well. -Thus portability to other platforms is desired, but not always achieved. +While portability to other platforms is desired, it is not always achieved. The LAMMPS developers strongly rely on LAMMPS users giving feedback and -providing assistance in resolving portability issues. This particularly +providing assistance in resolving portability issues. This is particularly true for compiling LAMMPS on Windows, since this platform has significant differences with some low-level functionality. @@ -31,18 +31,20 @@ Running Linux on Windows So before trying to build LAMMPS on Windows, please consider if using the pre-compiled Windows binary packages are sufficient for your needs (as an aside, those packages themselves are build on a Linux machine -using cross-compilers). If it is necessary for your to compile LAMMPS +using cross-compilers). If it is necessary for you to compile LAMMPS on a Windows machine (e.g. because it is your main desktop), please also -consider using a virtual machine software and run a Linux virtual machine, -or - if have a recently updated Windows 10 installation - consider using -the Windows subsystem for Linux, which allows to run a bash shell from -Ubuntu and from there on, you can pretty much use that shell like you -are running on an Ubuntu Linux machine (e.g. installing software via -apt-get). For more details on that, please see :doc:`this tutorial ` +consider using a virtual machine software and compile and run LAMMPS in +a Linux virtual machine, or - if you have a recently updated Windows 10 +installation - consider using the Windows subsystem for Linux. This +optional Windows feature allows you to run the bash shell from Ubuntu +from within Windows and from there on, you can pretty much use that +shell like you are running on an Ubuntu Linux machine (e.g. installing +software via apt-get and more). For more details on that, please +see :doc:`this tutorial ` .. _gnu: -Using GNU GCC ported to Windows +Using a GNU GCC ported to Windows ----------------------------------------- One option for compiling LAMMPS on Windows natively, that has been known @@ -83,13 +85,13 @@ traditional build system, but CMake has also been successfully tested using the mingw32-cmake and mingw64-cmake wrappers that are bundled with the cross-compiler environment on Fedora machines. A CMake preset selecting all packages compatible with this cross-compilation build -is provided. You likely need to disable the GPU package unless you +is provided. You will likely need to disable the GPU package unless you download and install the contents of the pre-compiled `OpenCL ICD loader library `_ into your MinGW64 cross-compiler environment. The cross-compilation currently will only produce non-MPI serial binaries. -Please keep in mind, though, that this only applies to compiling LAMMPS. -Whether the resulting binaries do work correctly is no tested by the +Please keep in mind, though, that this only applies to **compiling** LAMMPS. +Whether the resulting binaries do work correctly is not tested by the LAMMPS developers. We instead rely on the feedback of the users of these pre-compiled LAMMPS packages for Windows. We will try to resolve issues to the best of our abilities if we become aware of them. However diff --git a/doc/src/Eqs/centro_symmetry.jpg b/doc/src/Eqs/centro_symmetry.jpg deleted file mode 100644 index 1e89d11a11bea81ba00ddb2a65d62a3f2e0e2398..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4111 zcmb_fXHXN|(oQJS1rk6F5Cnn{>Z>9k(u+Wl7JBbU3lORp;H4wg5Fv<&2nMAHNDJM9 zlps}_385K^R1uISBA5H){pS9-f9}k;JF|0U_RM+q%9gTZEza^1Ofs2 zX9_r_0<-~)^b8CP^o(bQk&*En6FW20nQ*ePv9NP`ZJ9G69&d}bo5Njz%#EN z7XV1l0HmX5q+?=d`}dx+H3NY095;wb7<^TeN93BBD>E;js1_0(mwf@IU||)WQ_}c( zbnLpkqPC@*`=i`qLc{44fcf75>VRX}oKiRf`M;Uh=9I0vFe?Rawed@CA?Ghz!wi;F zV8X)Pw~?%ROe&(Z^NT#cwp<+Ts=pYt$V|>I)k#?$vTD28dBF|QzFO8@OrGqY&s)`K(2)ta_XMxwquvnf8q}W^f4NKWep4GIF z=ZGdJZe|nID+FK4!tT6P5&?U!j36P%-KYBC@?_S3xye`IW%s`pQ_mCoWeDW~O3!mj zMF(&gppyyKt|xkozi{_L9z=J$@?#!GK2ZWLVqy8iC7O=n!)&US1+LyJ=?><+yNaQV zA4erSH8-@CKX^MVA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eqs/centro_symmetry.tex deleted file mode 100644 index 8d9a9a33e6..0000000000 --- a/doc/src/Eqs/centro_symmetry.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - CS = \sum_{i = 1}^{N/2} | \vec{R}_i + \vec{R}_{i+N/2} |^2 -$$ - -\end{document} diff --git a/doc/src/Eqs/cna_cutoff1.jpg b/doc/src/Eqs/cna_cutoff1.jpg deleted file mode 100644 index fae5c6b636c0f818f8677fd7fce4f402cb03a95d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13431 zcmcI~2T)Vr)^F%ddQm}oB2xX+mEJ>ww9pAnIzm8@-UOs85JCr~_a+1g9h6=L=@6PU z=~bG5JnsG8z2En~`M;SrZ{9nZIkPh7oW0iGtL*h#d)?05E(55bDi9R_4h{}L_3j6_ z#R3!o1bF!P_;>_&Hv$3zLZW-bM0Xb@85zkvYDyX!YD#KqT82mWY3Ug0si_~ZKVW2L zW@Tliz0U#UU;#d2VP(1f0w5y>?BgWi;7|i@y8w>>H~_pm7I#ekb=?h%kB5sxeD_p` z3V?%$kAsVcM@&eFPfQ5_+|l>|0zzsUB6eCqd14N2I(h~LgO{$s_c?_UlO}{=mToy? z!1&y1kRB=_58d%yMD&@izLmR&XGn5Q?bq?!IRNoLc*z3(3>I)hVTu1|w+o-CR2vtm z6-I~JBz{LN5~$oPFpFLLff<;Ir@HVQm#@%5X1hz=Tvc-*od^=Z=|^ntmT3%Rt#R!N*lv(w@rlAZ^=#6Juq2v%Dp+!_sunUOgSC9e< zAd>j3+UB)?E1wUClE;7>532)=Q9*xI-lBp;TMHU_0!S>vlnKlA#&KCD5!+U?E+Xr+RBc) zb85MJ=@Qx5lDNTgINOdQ)%Ae`2%0xsO<@5&d$gt|@BQt|<<$5U7}YdNV4MvV4T%>; zuK+}V(MeCE@`R__FPg>SLh!`bm7tlZ8i|-|u~a4JT2ffz=jVLFkA+b>UUdzCBAp)0fcF&5otl*XM!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!1tTp#w8*PL(KT!4>c;N$w?vIXS4xw{Jmv8<2k;bmyXXZffXz1fJ9XIP4wCxR#ts?I+O!XFkw@tiHjPFJNH5luX?Bvs|ezx{L4>?t6 zr9OLP9xI!tg9UhJdulT$f(7Plx$bQ2UlZ1o`b;06u+C7hU@cVcHly>GoW`YEdJ-$S e#@TfEV#rwhl^R=S9~0)^AN=R1e@B_$&i)UDCAvod diff --git a/doc/src/Eqs/cna_cutoff1.tex b/doc/src/Eqs/cna_cutoff1.tex deleted file mode 100644 index f74166e608..0000000000 --- a/doc/src/Eqs/cna_cutoff1.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentclass[12pt,article]{article} - -\usepackage{indentfirst} -\usepackage{amsmath} - -\begin{document} - -\begin{eqnarray*} - r_{c}^{fcc} & = & \frac{1}{2} \left(\frac{\sqrt{2}}{2} + 1\right) \mathrm{a} \simeq 0.8536 \:\mathrm{a} \\ - r_{c}^{bcc} & = & \frac{1}{2}(\sqrt{2} + 1) \mathrm{a} \simeq 1.207 \:\mathrm{a} \\ - r_{c}^{hcp} & = & \frac{1}{2}\left(1+\sqrt{\frac{4+2x^{2}}{3}}\right) \mathrm{a} -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/cna_cutoff2.jpg b/doc/src/Eqs/cna_cutoff2.jpg deleted file mode 100644 index 744b61e9b45fd5401a745ab968d9faa607a88b19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2518 zcmbW3XE@sn8^-@+=^HDwc7i5Oj#{;fQcg=#qpGyE6^)hJt43;cSv7(~QR7hKXzd!u zsx4xc5VNSLy{Vwe(J$}E_rv?Uuj~2nJok0qU!T*l(^-I17pH>*n3$LV?K1(VlYk}w z0fE6_5aet?AP^{wl?8SN2ONHm6~V#9h2TISxOs$lxz7t+Kp^-;`2>(iVPRoz-iw%v zD2xzF7zbPwMc(6)&bz!u)yeO$^b@mGjlO9F%M%l?y399#EaoO{#ZD7)5W>*cd^e_Go$ zDzVy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;Mq`_!U1+I_>QALW`|P7@d2RTR?wp0?STDEi(I$uWTMoHogJ6s8ulzrylG{Ir z;cPWh_8BOK2JKos2OBbHD_1hg177lq)_CQplT#D^ePbP*0A&;>-Sx5B@(^lLp+Bvd zQl7kWsMydUVLXo@2UmrX71xNBsQsm?SuXQGW}frb7rXKv-7;EG5;_pS*GDf-8RvDk zH+9EZ$vC0-$Ea9x*x}Vd%TI+~Ckp)~d-=qi2Xj9H1CKYOKphXo|}}Vy6Ll46LTCl{AJ=Mu1#+em>eCDBqF(ubaZm5=9f+=f}CQJdh(qbPbJtv*pMY$SnT z&%XCEd}5>XV{JQ9A^F9kjYpkX*THcRYyoOXQ&*n~v+pP^qy2Mk&D2Nz+zbPje6mS> z9CQ#!!Ef%Fgx}O%C(0SM41OTQcL^>1X7Atj&L3qy8+?7I;O~gnEVfZR$(r0~0*2HX zdL`K4Rho>{ny*B)(|DCtMPFR{*n4_ohiK$BFUMkqnczvfNg=|3fYnzJo^Ox4?<4I{{>T2w#fhh diff --git a/doc/src/Eqs/cna_cutoff2.tex b/doc/src/Eqs/cna_cutoff2.tex deleted file mode 100644 index fcec31fd24..0000000000 --- a/doc/src/Eqs/cna_cutoff2.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentclass[12pt,article]{article} - -\usepackage{indentfirst} -\usepackage{amsmath} - -\begin{document} - -$$ - Rc + Rs > 2*{\rm cutoff} -$$ - -\end{document} diff --git a/doc/src/Eqs/cnp_cutoff.jpg b/doc/src/Eqs/cnp_cutoff.jpg deleted file mode 100644 index fae5c6b636c0f818f8677fd7fce4f402cb03a95d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13431 zcmcI~2T)Vr)^F%ddQm}oB2xX+mEJ>ww9pAnIzm8@-UOs85JCr~_a+1g9h6=L=@6PU z=~bG5JnsG8z2En~`M;SrZ{9nZIkPh7oW0iGtL*h#d)?05E(55bDi9R_4h{}L_3j6_ z#R3!o1bF!P_;>_&Hv$3zLZW-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+8tI>(NJx#A(ntW5 zeFm-n%ys2F7`{H`?%4Mvz8^NbHsr)k3;W{NF%~R|P$CGyfj}hK(!T{1=M1#CZ%l^5 zKkBxi58T2t;G1$3f2|7S^xA9&c4&o`y<)^mWy!@Dj|AK`-nY3kiPYyvrJSgZ%uTiF=CT>&(`|T*Nk)a;0%{WsUfpG1R*N%Q=6<=tF0X@yt7pGI zrS{k?G}Gj4S7%p~O)}!A&0Aa0fBz;Dy(VcU5-}&St0(;>`)vy~RUpnt+vhtC=w0oF zlQoLg2zVHX4%hy5#aI1s{Od&P7v79OHO>&+5Bx-2LKy}|OvKM3xwuSr0q`of`h zPhHP+aMQ`wMdN%P{84}=a=HWxt8#G+_1|;dvgJrPFgbZLQcfvLf>ewc=_B&Gq*$p> z|5vj3KcPZw|9&*u>ZGy)TVygH-S0~EL&U`A)R&!vC4bYOC~cRQzUGv0Gfmi8{Z~qf z_WFATeIxO_WU)*j$fk3}U& zcV)*#*%QR=-%MiuBclF?Mc+;0Zf&i7-f`mWcr;6EZtohYsn0$g{QY47atlyEeh!k< z0cLih0!1tTp#w8*PL(KT!4>c;N$w?vIXS4xw{Jmv8<2k;bmyXXZffXz1fJ9XIP4wCxR#ts?I+O!XFkw@tiHjPFJNH5luX?Bvs|ezx{L4>?t6 zr9OLP9xI!tg9UhJdulT$f(7Plx$bQ2UlZ1o`b;06u+C7hU@cVcHly>GoW`YEdJ-$S e#@TfEV#rwhl^R=S9~0)^AN=R1e@B_$&i)UDCAvod diff --git a/doc/src/Eqs/cnp_cutoff.tex b/doc/src/Eqs/cnp_cutoff.tex deleted file mode 100644 index f74166e608..0000000000 --- a/doc/src/Eqs/cnp_cutoff.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentclass[12pt,article]{article} - -\usepackage{indentfirst} -\usepackage{amsmath} - -\begin{document} - -\begin{eqnarray*} - r_{c}^{fcc} & = & \frac{1}{2} \left(\frac{\sqrt{2}}{2} + 1\right) \mathrm{a} \simeq 0.8536 \:\mathrm{a} \\ - r_{c}^{bcc} & = & \frac{1}{2}(\sqrt{2} + 1) \mathrm{a} \simeq 1.207 \:\mathrm{a} \\ - r_{c}^{hcp} & = & \frac{1}{2}\left(1+\sqrt{\frac{4+2x^{2}}{3}}\right) \mathrm{a} -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/cnp_cutoff2.jpg b/doc/src/Eqs/cnp_cutoff2.jpg deleted file mode 100644 index 744b61e9b45fd5401a745ab968d9faa607a88b19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2518 zcmbW3XE@sn8^-@+=^HDwc7i5Oj#{;fQcg=#qpGyE6^)hJt43;cSv7(~QR7hKXzd!u zsx4xc5VNSLy{Vwe(J$}E_rv?Uuj~2nJok0qU!T*l(^-I17pH>*n3$LV?K1(VlYk}w z0fE6_5aet?AP^{wl?8SN2ONHm6~V#9h2TISxOs$lxz7t+Kp^-;`2>(iVPRoz-iw%v zD2xzF7zbPwMc(6)&bz!u)yeO$^b@mGjlO9F%M%l?y399#EaoO{#ZD7)5W>*cd^e_Go$ zDzVy>A}pek8}n*iOUrPIp*+VYlAtKp=SG=$?ahIIl>S=+qJGW}VG*ows+L>wom)wO>zeFyiS05-&kr@IZ?=j} zrn_x#JQyzd+bhVk2r&jj}rjegsDF=2d0_hgy!Dzko@3%{G~& zdr;i)($rwI#5B_#XzeR%f5o2gIpa;oUSkmL`oF*yG zc+LnSPbSV6UcmNN_&3DOl|~Oz?8HY3J1$@Gy1Cm+Q(AFVzR^jHd&4rZ$WbOfoRYgz zD*g4cMmnjIpVxu1@bOn1QxM(~gM%WKe&g$8^b*Vrt`(dw-ij{<#`Ccq* zw6)X`Vd^QjW2>s=v8JhhHKjC#yuZg0I;WUZqJtWv`^0%T zo1gR4`0MVzuV4)2NkjR(QxilTU>oz^f}E3{jD$1Zn4xh~+v%V)dcs+9nB9X(0M>k<$AT#N(t+obf#V%ZKgg4tjt ztP6zNX=D4F5{{vKnS?9|%R=LcBczD;?j0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DCtMPFR{*n4_ohiK$BFUMkqnczvfNg=|3fYnzJo^Ox4?<4I{{>T2w#fhh diff --git a/doc/src/Eqs/cnp_cutoff2.tex b/doc/src/Eqs/cnp_cutoff2.tex deleted file mode 100644 index fcec31fd24..0000000000 --- a/doc/src/Eqs/cnp_cutoff2.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentclass[12pt,article]{article} - -\usepackage{indentfirst} -\usepackage{amsmath} - -\begin{document} - -$$ - Rc + Rs > 2*{\rm cutoff} -$$ - -\end{document} diff --git a/doc/src/Eqs/cnp_eq.jpg b/doc/src/Eqs/cnp_eq.jpg deleted file mode 100644 index d4213144424331690936b0fd96014ba8ea8eaca0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23959 zcmeIacUV)|*C>1tJ1RCnMF9~+h0uG8f`EV!r57OsA%q?vAcmG1dqV^S1eB=sCL&D` z%vcbqp(CI$3P~sengDuYNbU}nnfbl*-upiH`My8C=bOWG&Teb(z1BKwuf5kgEAU?P z-mN=ka>~~mf~>5d0}uqQhSmu{kRZqjEMEg20^jlw4D!pC^2eZ{)tX{Wf&ALrOYlSw62(McwEV6CO7LhGmwryIsbbU|075?)n zuwF=L{f6}$H*DCrb;E`YTltR-TfcSL^gkJZ_dB#{H6#b!5fqSymTeLc+$6wz3y56H zdm(@XSgsIQx&XrbOAtuT@)avrtzNTMNZ>yk1)ybuKN>dznG+CPwtU%&RV!Do5L~AQ z8aD|p-@RF7#i8RKTcksNQ(d_=;cl7H9vKmvr=Du+p{F~ISIH*Yeth={L(mYt_wdZ# z!%22tCeO0MG{w5?-(#8OXPQGG zccG^fjcr9R1ocm{EBOel+N<%b3m}mt=4E298HRoT6NUdC1Gzs@;0;3S1efOA1R|6r+!)Q@6uU$6(c_FzoS?)lbGd!s3 zbz*uwPEt!QcgS?b`CA#9l_`}&Lb7ces!#UwAXRD?oAjPhdq4xgxWa}o|&<@*WRU(-K;cW5OlvNBPkVkupN=LKN%f} zc=qT+;n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Usr=W3C>3 zExGil<00Tf4edb!hr&G__7%3{9QrQWHrBBE?pHV8me?BUwp-mSEv~&;Zyiu&^0+zS zUSz`{>WkPM56YR~L6;Uy7scjLj`$J+ZNm0_iEn~1_$Py6=ub-5L0nGg(!YysKszOI zgxG{G_FJ9C$xpOTG3eg88aBCR-arv8nRk0iGk|%4j$T|N_vN_*a7Z_T02Vxl;6wom z2>8$s#U{|k%_dljd%m{2$8RwB(p?3P6fKgl1Nxmj3bsSvK|VFC0RKIb2d!H~&yh-6 X*&M@?uTM@)HQ#144*tVd#T)ovcj-gp diff --git a/doc/src/Eqs/cnp_eq.tex b/doc/src/Eqs/cnp_eq.tex deleted file mode 100644 index e5f157e6ba..0000000000 --- a/doc/src/Eqs/cnp_eq.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - Q_{i} = \frac{1}{n_i}\sum_{j = 1}^{n_i} | \sum_{k = 1}^{n_{ij}} \vec{R}_{ik} + \vec{R}_{jk} |^2 -$$ - -\end{document} diff --git a/doc/src/Eqs/compute_dpd.jpg b/doc/src/Eqs/compute_dpd.jpg deleted file mode 100644 index 549f259c6cbbb89c8c6a8218b5b43af2a688ce3d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21381 zcmbq)WmFx(mhQnlA-KD{y99!}ySuvtPjEX(aChh69NgW59$bS%a1ZcuXWq=*ch{X? zue#P=UEOQd>aMP;{e9ow{l5IZ4M3NZl9d8LK|uim{vLq$HNcmDwEn-!doKV55sD28 z4GQWL;C&E441fYa!~CO5z<(74L^yaPWLRjJzqiHE0npIUFaRiMI4EcoSQG#N4jvZa z9~Tgju&_U2VB+B7=|GV2$*HKdbyL&QmwB`@mT2kNxq10*zk*ke-d6#L|L9s2@NhLk z>1hKy0 zL^Y5167jXSBav+V8~!suPgh?7nps!)D?wo|U;1a{)+QPN8Tt0fMfY7l z4w=E%qLD$!rmlDB*Tmc7fzFN#B7r}C2kvovd;ePb;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4 zv&S59#~g9T9C61SamORO7NM!G2w?|XReg78k6Ja;8sr-lDQVgo`wv4%2I%letfL9& z6lD-Cs~uk(o)bDB*xBu=mL z5HgbL!w*%@pia;7brgu29u=a|tcP9xpuGSj6VZn0F!aaU$`6w6><=S*H_Sfnrh^kD zJJ4xOe;Kym@T2w>&vUJ{_g60pJkJlSS8?}gSoEx2)wzSS_UY(g3x~WjnS>o1VoL4` zQiw|ZHAxL?M#!s)D`7?a_6n97CPXFJ%|Hy7 zuf@w7Iyq@;3# z>ovGUuUh!_x z>4pLkHW$!aNDW2YNq%TzAREgI&Es_N9uA`X1@ZSj>k+Q#9y3H+3sG9((c`;`$klyx zU3SQzuHr}zR;?Nu9ss}E0gpVBVVq?-8Kf*lf`!k!OB%9DcRrynUa}gs%2zPV5SbPEI`tMQuMOg4 z#M_3lL@>uLv6&;Sl4*b-*rP{;z!*`;aSDY!5+Q-m$;OItY_ucmreo-vr+%#kKph-B z&{8_E#$dA0ArgbTM98`~Ys&MUzKy)zYd>lDinoVm;;md;yRB*Nse2VyCq{M{oCXzp z3=RwgMo($f(LUt#2c8)hBBhZDv{H3@Y?Nt&#-}8qL`Z;_sQncjjQIL3&(hPPY^^$V z{{V=?eaty8u0t5`?pjAf0GP)$Lo3P1`s-TXRMpa-;#%@+WEnP)_!x?TWp7Vj-2VUwW)Vq2z-&hygR)|c0~kh(L&hGG zI7h}QVp00n)~WKa+XFaxp^dB7h~AdfY<;jIHD!%XB$V;@s;oO>bb i^KIDSDumbF^HCU2=|`-v3XIB^DZPN6cHfRT=l|JJtpx%A diff --git a/doc/src/Eqs/compute_dpd.tex b/doc/src/Eqs/compute_dpd.tex deleted file mode 100644 index e46b0b4dd6..0000000000 --- a/doc/src/Eqs/compute_dpd.tex +++ /dev/null @@ -1,13 +0,0 @@ -\documentstyle[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - U^{cond} = \displaystyle\sum_{i=1}^{N} u_{i}^{cond} \\ - U^{mech} = \displaystyle\sum_{i=1}^{N} u_{i}^{mech} \\ - U^{chem} = \displaystyle\sum_{i=1}^{N} u_{i}^{chem} \\ - U = \displaystyle\sum_{i=1}^{N} (u_{i}^{cond} + u_{i}^{mech} + u_{i}^{chem}) \\ - \theta_{avg} = (\frac{1}{N}\displaystyle\sum_{i=1}^{N} \frac{1}{\theta_{i}})^{-1} \\ -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/compute_fep_bar.jpg b/doc/src/Eqs/compute_fep_bar.jpg deleted file mode 100644 index 772ec9c0450a35c52b5b927cbf20e7d77e373c93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18106 zcmbum2V7H2w?4c>uTljCAu0+gy@LXg-U+=59BL9m5;_3_Q4|mmQ8|EuiWNkfQk53z zDk=&J5~L&?MUX%u5~B&>+rIC;?|Hv_?*0GIcfaAclP9xh_Fl7QX3ewK4BPLw7XV2o zJ4ZVJ0)YSy;2*F}74vtrwhndogxfi~*n&3zK+M4fg~jnm0ssb^l;CM^wbwr&aIfGi zfCmr;1OQzC2#ZLJbM>LfFR!W3nTuCHU3fNpZNGM9Erh3 zf@OZm92bd+{DlWWd^ROH3dFoFAkIxeMWurHEr<`qCSy<_W`S516BU*S0DNM<@{^(> zkRa9pu~>q)r!|Pp06<6#@ozZ%-*8eC9+VRRtZ{K^2`B_IY44$k!+Uj2O-=SXM5V?? zB_(OPhee>n5+e6n<1ley*faq6XPbZ30;GTGb}y)8BVAJ?BTYRmQ2qZ(|HqsED)oN` zzxwu{B{n?%(Pt337k}pcS@+L8+${hw*#vcS;m^GAD*(`u0|2|of94&y0RR$b0HA&B z-`XShYrG(nlH!hPYp15BYN4Vcw0|PZ1f9m1?Wwn2k;TQbpxCVjD9WEdnss%`n$pXBz7XY7(D8PH-I(P^2uYPk8_62^; zJU{5tKgT_Y!TbOC{C|D$6oWr`5>be~zp|}8z4t~WC#3ws;GFpN!4HT45`ZkQ8&C#R zfJ1;Lpa&QO$AII2E#L&e0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Wh<$bN5gnUikGHTE+NXjOcZafL;+4AIPSHH=?iF0T=gkW_ zzTo{kgcAnZBp(C&082t1Dc3IV#}-Bi0ThE z;|GqmmuANEt(!dTZkhcwv`Zj5n=hiRg5(CC<$@POC3-E8Bx$Y&tA)u!7tBY1yLV=& z&{m7Pw+Jb8Z%A64wkDTUoB7R3|o={32n zP*HsP*eY4zN|anx1h(GaR?I=#kZPp#1I>ulwF{ZI`=H|WYZm7C zS)u4c8v4_+vV7~c#MV040T2!6>C7xrJY>9ksWo%m4D#6EVh3;6buD047LWcsSo2 zN)u#9WKB$Vu4i}4Qx_N3r#C<*BR@DMsI-6n)p&O*mF7v@Ki}WMY(CD2Ns*aGmP^k0 z*ZSd;O%@ZI7t!2&g6h^if-t>m0X9e^tNCu7Hw&X=z-3vT&Tl6;5PIm~_be4g%AKUq zl&-hyN&ZP^-fCQTp2-+BsC3Wgdl*P|nK&|Qb9&PVWK^IlmCZwD)md$wHVBmm)W>H`0)90*oNQ#4~Heae59!$Z-Mxv>fF47 zTi(_^vx5{R=ONfMDTZxK<_@6`j+J~`&8+0~bTN%SETNW|eE64v3eIHt(VWuZ!uq+-6ZPYPu9}Y%wXUz)cs@U!BIgL~aN_0 = \left< \frac{1}{1 + \exp\left[\left(U_0 - U_1 + \Delta_0^1A \right) /kT \right]} \right>_1 \] - -\end{document} diff --git a/doc/src/Eqs/compute_fep_fdti.jpg b/doc/src/Eqs/compute_fep_fdti.jpg deleted file mode 100644 index ae8de241cc132dfbe0d932baf99a9e066ab178e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15544 zcmeIYcU)6Vw=cd!=tZh@3{nIQ5PCqGbV5LS3m}HjLI|M*2oOOL=|xaMK}AJH1Vp;h zJ2pg60YSQ`C}^UBkrIBJ=lPxYeeXHv-h1x(+&}M-+4(YiX7*ZZX02Ik?d(qO&I1Cr zRwyd~0)YTF;2*HN$m@wRH}`XNcCbR(S%NnJfY-(jA5LNs003e*Im+4EOxDv2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K)bu(w=Vnhw`cMoAH*PbW$aGWKsNf89i^@e}CCrP`dv@1m6QJ|<^+cS-WbiPTM< t>d2=4IOK0wi_Y0vH<1(V%>fB{{jEgEII%H diff --git a/doc/src/Eqs/compute_fep_fdti.tex b/doc/src/Eqs/compute_fep_fdti.tex deleted file mode 100644 index fdea6faa3d..0000000000 --- a/doc/src/Eqs/compute_fep_fdti.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\[ \Delta_0^1 A = \int_{\lambda=0}^{\lambda=1} \left( \frac{\partial - A(\lambda)}{\partial\lambda} \right)_\lambda \mathrm{d}\lambda -\approx \sum_{i=0}^{n-1} w_i \frac{A(\lambda_{i} + \delta) - - A(\lambda_i)}{\delta} \] - -\end{document} diff --git a/doc/src/Eqs/compute_fep_fep.jpg b/doc/src/Eqs/compute_fep_fep.jpg deleted file mode 100644 index d84a76b0ddfcca48421c272f9f7fe64a6ece5cd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18055 zcmbTc2V7Ilwl}=#U8E}rL6IUY^rA?lmjIzxA<_vUgr0yQu_8r8Q9<$1sEDYjC@l&| zq^pQX7myYd6p1935J?E%<~jGCbH4lD`+o2D4!^zmXZFnAGi%nY`L8vz`C)So*zWG^ z<_z%h@d2*jAFxT240dyHKzjQkoZUQ}zy|;z>FR+>#`13m08Da5ny-t!dT>any2v|# z9}okC0b>A&j80GS^mFzHz~tuSpq>sE+QR=ztT6z5695bwxO%Ir|11Ch2+2gJq-6jA zpEp?AG$uAZ8pNkSoP^6r*~({tSUw89h4}@ya2nV^5bxN+@&Ca3f0y|OKD32nFv&4s znXNXb#9(5!a2JU4vod2rEZ_m+yew2K4#XoM-kX$(L4lYJVtGt#WI6x{N^a$6#6~B8 z*a*auY5u+rAhrPjQOWp!!%_c+Gh*>zI|0A}o06S|iciQ;*NNVzZftFBrS2MwON!0N zFz}9yMn|T_s5@XWDUr$90Pv4KZ`A^1w`8jh3faQ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P5x7gXg!cF=-2O-`!6oO-#n=dbwu7!+hW`|;K_=R>o%{#tG zUQzxJ;<`m%|C>wPvWcFFKKKCs^mFlf+xPQn`{_229_m3@EcOGqPg1|SQqL%2WiyrN z2%4u$Fr#&kSSD!KzXsk=g|m!%ca^>tB%?1Z-iRq%r=hAVLTa&wpJy(#1~M*ri`-$a zu}t3+b+|_C*9;`hr5BQ)vviD*J@+E0U3s*MSD#=%nP}0Evbm7d7+x>>Irkh+$cAp- z!xi7SM996(d%qq}H)W157+$9h6!0MIFp&<-t}nLo<(*?bUE{_xiImcg@wJGU@*u@B zA#a7S3`$Hm58Vh(*)Iz6K8J)H+rvXt?R;BL&J^nKhi*9$Ti2PytELTDiQ;K+LsaYE zRpfub{CkUovPK0`KYmd4go8(Tlyz_VJMr-|L=r!l&+@TVx@I&Oh(fN?X#OdG86avs8Bl(IAOYmty1T MY<+(^D4-Aj+4S=w(EtDd diff --git a/doc/src/Eqs/compute_fep_fep.tex b/doc/src/Eqs/compute_fep_fep.tex deleted file mode 100644 index 718aad3c40..0000000000 --- a/doc/src/Eqs/compute_fep_fep.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\[ \Delta_0^1 A = \sum_{i=0}^{n-1} \Delta_{\lambda_i}^{\lambda_{i+1}} A = -- kT \sum_{i=0}^{n-1} \ln \left< \exp \left( - \frac{U(\lambda_{i+1}) - - U(\lambda_i)}{kT} \right) \right>_{\lambda_i} \] - -\end{document} diff --git a/doc/src/Eqs/compute_fep_lambda.jpg b/doc/src/Eqs/compute_fep_lambda.jpg deleted file mode 100644 index 5ef9e8b9f2fbce24c23d751f23986e87f2a16445..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10511 zcmbVx30#s}*Y5+)s5z#orB-U0DNcZzX^MzAp*W(I;e?3b00^0BrDkg8Y0|QjW|L)^ zl~bu{PFY!*LuQ&Oc*-UV8i)enKA!X5bKd*??)TmAeoK7#v-aBiS!?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KCpudeSg%_mMu zh{}`ZBss?a6RH4J|5w7^JMg!Od<)~R4C(sUf_0rfZ7W&P^=mlqEN|^6Mv7=BfXqJTVa;IHiS;h%s%3j7oBcSrHpi}kHPL9_cJYZ}(RMx}d} eF4J8-x_\lambda \mathrm{d}\lambda -\approx \sum_{i=0}^{n-1} w_i \left< \frac{U(\lambda_{i} + \delta) - - U(\lambda_i)}{\delta} \right>_{\lambda_i} \] - -\end{document} diff --git a/doc/src/Eqs/compute_fep_u.jpg b/doc/src/Eqs/compute_fep_u.jpg deleted file mode 100644 index 62df5dd0c03a6d20cca157cbc46053adb77ae90a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9337 zcmbVw30P8FyZ;6h6g6kf$~1E-Q=9-b(;NU%5oeT2LqJ6Y6hUxE8cb6w8@05wY_!SB z95c<;FQ>)l+)dw^WDz5_j&I9-~adW?6rTq>s@QV(_ZUcd;ax&AE4%q zC*lDJ1Oj-0KVW`9IgIGx5$PXD#uI&UU=*ESzeHcmhBH zMF0-i0051ilt2o?2Lm7xaUO>>X!tk(|Af@(348$nK>R^z zI|eg}4&qD@$BP6B3w$YvwW8Py7%I1b`JjRzUc7)~{=#eil=%y*7cl9uAhrgvGCw%b z1H{e%pr9P{4;=LmEMSU3JpsUjmyp6|#l#8>&FQNQZ5$mP48545c&0#L=})7xX?%vE z2al6LUp6m{0yGwUYX~|SW8;XySlU{F?*C2yYv*sN{~avE_AiNV0e{8}qSO92 z@9(jH^LS+d;P3HjJ4Tk?Mf|9GC&!t;Ln&d`$?O%uio3>TbA=f(4ce8Z#!8l7oq`QMZH z-yZl6wf>>Unm}eWlh5RWj|v5|jKz%s!_8%|1S}rckj4F$8Sn~t3-kdWfDu3nOajy3 zLWY2-Kr|tG5Cez_!~$Xqae%l$a1dWeAS4{J84?5GLWGcX$PP#z2;PAWGiuOh!p-a_6sM{0I3-I2^76H-ls0Uhr^u96Sxa8-5&K0ly9JfDgidAP@*W zgau+9f{dUc1c)re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MODySLa4XIm<#+Rfxd-_E+LaDoL1{FA|UKCleiO+C1Ala7N)m{yid zxg;&UgPZ)(?`v{6bMYg1NS}ZIRFTZDl6M(V$L{pRlpf;h+?k`- z4VQrw8PE9xDH-*1aer5rnd;!rtFpU)T*noDI#7IEJ1H-}PUjDjr1YVed-QkSq!48! zk3c>l@Aoe5o#G-Xeirmv;Yayn-j{saianH8Ipe$i#vV5x(YV^*KkbukF->aO1i~3&U)v#EX?Dny;^8YQ zg;nJguP)odVHNm*v)${q7Tdgs?>B*Rzm&dZcy||cJoAb`K4kH4r)*m%ZU5y<-yHpa E0H^3=VE_OC diff --git a/doc/src/Eqs/compute_fep_vol.tex b/doc/src/Eqs/compute_fep_vol.tex deleted file mode 100644 index 0301e39788..0000000000 --- a/doc/src/Eqs/compute_fep_vol.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\[ \Delta_0^1 A = - kT \sum_{i=0}^{n-1} \ln \frac{\left< V \exp \left( - - \frac{U(\lambda_{i+1}) - U(\lambda_i)}{kT} \right) -\right>_{\lambda_i}}{\left< V \right>_{\lambda_i}} \] - -\end{document} diff --git a/doc/src/Eqs/compute_gyration.jpg b/doc/src/Eqs/compute_gyration.jpg deleted file mode 100644 index 228544443459e2c13b9ba1e860d8abd5e02f9ffb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3658 zcmZ{nc{J3G_s2hD-?EIYjGe&@Lm_0zG75uaY%$0Z5i>FvvddnCF~}oJnn8BTmIswY zR3`gal0n&@vP)0%^*z7e_n+^1zW1JU|GD?P?)~GQbMKom#rOj7qb^%q20$PXV1D8N zV+KG1tjsJdEX=GYft8h&jh%;s{lxgVxjA_R_`qNRJ^=wi5phvLAu(YAfzvXl#Uv!8 zq@)BzW#wfh<;5kXBpELOZVtc+qy_>B0E{<)H~<2ePgpWlpshOL$r!n-KDz zlPKvRbY)wKd&wM_C_9K?*jpO4{JWLzC^L4hBmcQrw>vg*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&S{c**)Edv#NS(adKk0rzV@|yZMm+%F9W^yn9$JpS zjaZH=tckS|&L~k~@Bu{-I_H4-lE!qBW4`;wV$I)m|3RT5^``Cw3HZP+xU__&LJ7(z zS)5Ry>ObE^;rov;(eVoaU07!7OS%KO2KF@LPZ``Ax5<-NG&`X*5wyQ+>oZmTM>Sll z3W_NO1BWKV9zMbWp(mhJ(~{Zc(LfPmhW60gA3g~^%M6`lrU#moOL^=o#l(Lm^^>z8 zsiF7}I^f>kfCqISlS}5so)fxakr5-e@7/(5<(r(t)-r(0))^2>^2) - 1 -$$ - -\end{document} diff --git a/doc/src/Eqs/compute_saed1.jpg b/doc/src/Eqs/compute_saed1.jpg deleted file mode 100644 index 6bad3a6104904ff97ac5982d63f88cf68bb8b50f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1471 zcmV;w1wi`$*#F=F5K2Z#MgRc;0RTtG1Oo*G1Ox>I1qKHU2nPoT z2M-Gi2@DYr5)u&)5fKv>92XN58Wj-{7$F!M9UUJZ9}^cMBqAOp93CGY|G)qX2mnR^ zYyklg0RO}Q8vp?S0|5a60RR9100000000051_uNK0to-a05}i;0Rsd90|5jH01E&B z000010s{m91qKlk2NNMd79ufM2oxhSQDK3U)DY@iDN0h5r722Mm5=ov;eL_V%rg$L* zLs}A7q27>!RF!xR6!;&FYMnZ;KaJx;-!5dC(w8bkhos4KxbvmQmZX)a00{^vPk;uJ z000eC+?a7CJr(&enR(cbm!mCc1hU~mn<`24JQlRavkp{{T&TQ8L@n+%Ci~x28U>AxobFyo5(2xR>NKq=a%(N{Yc7^S?ee zD{Q4JD(WUpn8WKHBZcFaYjbR082O_+#Q6{$SOGF4rLyCGejqrNC-U->@v4_j zx_1u-dU~yS1@cQb8P8lMF)>lrm!!L{Zj}at_IQs0Kz>zqrBk}2)A&6^vaZK^y@@5jciQ0x&^{gSr{koLbctBOhg0E*b^nVDZ%wq3+`x`~eC#I%*B zB;+;RBV=>;-AU0P`g&9^wXptlVV~`f{{Vel@Y{n|D?yOfM{dXfbxAVdgm%FId%oh7 zHaGbC*S<+}n`(lI5OM3B`PDiQW59Ac97xeT$$i$-#Apu+Cu$xwvMc`CWPd61Kiyh? zolk7CKa}~O?yW!0r?y!i%6!lFR-fln+boaeK4<%@PxGnmmPhiRGyT=4`PJKG$*)%n zqcG+4_a?M5=PpwwNVh4b^pZy)%%!i%01YJhBYGPm&0N=1TpWPnEplSTn04EBOm#lm ze2wi1S_$#7_lAiF&a`PgB*1Q%E7#>q$fI6Ud%3@Ll)vcW!{1qVj`XhTliLA02;<{_ zA4_Mz$}oGt$5iUm74VLsdo$KQLflVL1v3>mmVRTZGJqJI^6i^ zeQY?f$s<}?28W%615@{V#$Jr}HICJ4vOjEcDx|+D`HmshQk5YgB>}PtQBwH(+S6*@ zyaR5fDN0h5r7AlnxSK{fak?e2>f%Ll?l}ee^3#cNr8vwO?jY?BG}1Zp2iNT%bwBB= z6)8$ml%*+E4x_=$Zf!z`jWJ^}kuo%?OP?*)*0i+pTrDLiX+Q;V1Cb|NKJTqgWHxxY z9xpz{d0{Gza)`Lnn?kt`D@jU%Ndw`tqoL@0R9{MQWnn!zv0~24`s3EDLa_ ZwGH{vQBfPKJt<03l%*+3Qk12C|Jj_WoCp8_ diff --git a/doc/src/Eqs/compute_saed1.tex b/doc/src/Eqs/compute_saed1.tex deleted file mode 100644 index 0db2f55ecd..0000000000 --- a/doc/src/Eqs/compute_saed1.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - I=\frac{F^{*}F}{N} -$$ - -\end{document} - diff --git a/doc/src/Eqs/compute_saed2.jpg b/doc/src/Eqs/compute_saed2.jpg deleted file mode 100644 index 2b3b0bc090cf91bfe079f17eee64c5644d24424e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4911 zcma)A2T&7Aw+_9D^xgy#kP;D45Rei;AOS%_C{mRohEN3QMG!%h8Ug{8UP6%`O6XjA zQ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%G1mazGsENn(k&w)fPokuG9``!%{S2C53#b@nSQ#3U z;cwdPU9s!5x!uA0)%26d_q9IuUzPgynnW=oFa4W26!w}-?FCHhix{= zc3}~2boy*#i1@o=N3ty`__o88vg-YWVjH6-Ld)CL`RM?PRwBp%t^T4cixaQWQ&r-w z?&3g-LQm8= zXC(5ms27DDS0*#AQ#`nOGyrv3|}OkKAC diff --git a/doc/src/Eqs/compute_saed2.tex b/doc/src/Eqs/compute_saed2.tex deleted file mode 100644 index d005602339..0000000000 --- a/doc/src/Eqs/compute_saed2.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - F(\mathbf{k})=\sum_{j=1}^{N}f_j(\theta)exp(2\pi i \mathbf{k}\cdot \mathbf{r}_j) -$$ -\end{document} - diff --git a/doc/src/Eqs/compute_saed3.jpg b/doc/src/Eqs/compute_saed3.jpg deleted file mode 100644 index 1bbc920908bd401adeaa2f1cce04dc2c40f3fd23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7048 zcmb_>XH*kP@Na0+q!+LBm>>iV2uhI}0zwj+1f&E60YL%;q>BP#p-Tw_Q0XNU=@3FM z(!2B$no^{91r(9Tz3;rw@16g7yXVY@Ei=E}otd4TJ)b)N3SdWRA+-QhR8#=OMFpJC z05kw}G_B?;R9RG19Dwt7fB=9BKyxADLdgFq7i?*1s2Qj(dJ*gZ zDjHfUYHE5qIvRSGixE`RG_(M^OB|f^KrU$pZk}uEhBh*Alf-de5Ze9KZEyS)u$+Qz zMdfvEd*9%=gltmV$mrNP1;FsH05!l_5(-TqLjEr#tmoh#lS`T5EX~)A*CCOt;K#u# zz_tpwx(F7+gb5cBg&2xe>5LGFeo0fh1T85!VGK8kYO+x)P1FEfjAvZ$Z@X#8M>&1zLMZ2!0MMc;G_W{HJv@8evJsG0p zSN)h5k(8|a>KZrs7paUv?OGh0S3bKsa)&|Wm}lVv`=@AJN?`xPZx)6TkEC8tjsJk2VLt{47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I=nJ>?`}IT}JEPEM z+gA1^z0yaSr-j{A&wriVOby`O7sATsUTBa+@`TP-$_wf`gBV=oQ=+;t~J&UYhEcI158UTlFU3^}YCU{-2f}l)Q z1}|Hrk{^&gA%S4BN!xZ|k0S2NGix9|0k@*<-ghx)iTL+(%%%^j_*%8x2;o5LW608EGE zZ-IjwRWk~~p3vLRs&DfKG*p&t_Q!u~y3$w9AS&=IHOiOA^#W3V*(LplW1EwPDaYGS zr{$FWx47#lS9*;JXS^G5PVJB83vt00Cv%Ziy>1$<)yyE3loIMr?&f@?_n3_%c#Wvh zY!AeWN+7q?PuLlfFUFx02E1%F3tiq1J4kZvkaFZj8JLVDK~cw zCzGG(ge9xU`bC`_c=6wkqcbH> zma)@3l|cJd;Otiq=T1kqg)VbC7X>zoI#5EGyFer+?6%jxxc@z%cfB}?rl}l?N}%zj z6~N3FEz>LhD$!U}(>mHGO`~QSq^;>=k*P_ZS(@42{}{=68)+YcL7@2IT5*I|Qvd*8 R>HoIF|Cs$xNy7Q`{{k5lX`uiB diff --git a/doc/src/Eqs/compute_saed3.tex b/doc/src/Eqs/compute_saed3.tex deleted file mode 100644 index 5988a620c7..0000000000 --- a/doc/src/Eqs/compute_saed3.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - f_j\left ( \frac{sin(\theta)}{\lambda} \right )=\sum_{i}^{5} -a_i exp\left ( -b_i \frac{sin^{2}(\theta)}{\lambda^{2}} \right ) -$$ -\end{document} - diff --git a/doc/src/Eqs/compute_shape_parameters.jpg b/doc/src/Eqs/compute_shape_parameters.jpg deleted file mode 100644 index 9e2374561b40690173497a2e1c9a28c869b0c819..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7007 zcmcJUbyQp1x9@id5G2JZUZ7AM3KaK3u?p@^aVSvSA;o&oBBxL&65NA3#hn({P@q_# zfg&whBroUO^M3D+-~Hp>_r`c@kD2_j*VyCxnQQI2=A0X|i1`MPJyl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Yd7xVjDQ-hO9PmMS;zpt;ff7ij$auw2|{Pms!_N<@VqR?9D>}Sxc_tRQu zpkX)h(|~DIe@2-1%go2wRlgP;#r!6o=NDfqTnyq#*ZU2(9t5BZU?j$XK}-#olEaN} zLh7K2>xnpnZ?GLVuBD&6*MSqBG)7A<_0wZ_7)}20l#4@vpPF@j_&F!9Wt+Vf*Pot9 zm97O4vHaYHBE>G`r^~FFAbK6)t7p^FDD7UQEeAzCC5qCri9O-{X2!_Z2{+vUhz zUenWMS<(oaUIz#)_#&QG^9~ymE`)~eJMmD!DjP4}qw+UgYG{WzG{Rnz$ zF;Z>NT_uwb#{7=F8zty_Tx_ntbEfso?dT7AWshxsM-G&opYmCSmsRAjg5t1Rtd))& zoHWZcfkctOAf4Vd<&D}5GtV5>`#ED5YVl6(T29oL?3u*^JGCb{SDjohbuT}69WRxm z-OhB$ZVWSTLL#Z(yCXv!R-fJW&7RHvL#ljM)8tXpl3^|93VE5l|Njql+ve2&0ib@5 ATmS$7 diff --git a/doc/src/Eqs/compute_sna_atom2.tex b/doc/src/Eqs/compute_sna_atom2.tex deleted file mode 100644 index 98d8f2efa6..0000000000 --- a/doc/src/Eqs/compute_sna_atom2.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[24pt]{article} - -\pagestyle{empty} - -\begin{document} - -\begin{eqnarray*} -u^j_{m,m'} = U^j_{m,m'}(0,0,0) + \sum_{r_{ii'} < R_{ii'}}{f_c(r_{ii'}) w_{i'} U^j_{m,m'}(\theta_0,\theta,\phi)} -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/compute_sna_atom3.jpg b/doc/src/Eqs/compute_sna_atom3.jpg deleted file mode 100644 index 41d6774e9c8ec8309c3be5ce151a8095a633098c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19644 zcmb@t2{@F|`#(IkkR-b(D*Iltlx-@>mSo>zlEl!M>|~gdeGMUmvdflb$T~5W5MnSf z7;DyHCK;0%0ARd)^Y$%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ITD43Xje*p0nmn25Exe*|y79i^eK5TwfDqjBuZAB6f}G}9 zrPF(7vux2No>%t*w>ojV7XcJ~Z3eR^0YAPe_t-OBw}G(%PS(b9sle;TJF)2anbH2D z{vw3MjIpd+@VHp626!O3?tdp4$^uwjr;6koEV81s7l9|H8doDVc^Qx^zqckN9)67nDq6hGJr4AH&x40{p^7^w~n z!4jzAXGt|VB%6c=!Fq7V{U{8p;qF#wG0WC0z|8f98N!`<@W@>c)&rk~E%7tLCmhkL zRul&aR%t51=8~#>{fJTc<$KPcl3I&?{O;XEvB@S+CB$%h59$RSjysG@L!VlCl{~-R zHC;~BO)XoHcfa{7|I|-Fu+f7iJ-Q+N~mc5c4R^qBYcN*!@JA{A#Mt^hitv zsWuC@@t-Y~;<&)f5ABDj7)A0R*&4Vg+Y*-bV>NRyHk$o>XWy0VilQbuNo#!5cVDHOJu5eGFMipwvhpw^9_6?hWy@tgIawV13Qt7(llCQ;6!7FS zRVG-ml=HDQv@J}ZWVV`PYPfGNw@sw)*2tWuzy$rw3NoRFw>L~n@fvP zsFXm|8_In1anh=eSHoZgrwFpeBOQGqL~Kd*n&gF(m4Z(h8L3t z_`sj6G_Q%ok%{OFF=~lu)RY(|*}-r{Cz&a{*`xDeIv47KLKM{U^G7cj6~Cn$nM%>1 zRIT62*c>!RK+i@WF3h~~^MfUajK|Uw;%Egf(oY-o#d)hG9)KBOQ7MlZkzFnYB|?;s zu>W1L?y+M-zjZV77eItN-q{u8dkP!FE|rf?C!NyWo^gST2)ZEWfMi#XnJ zo`JFP4W*z!MSZP{3c1@p)>r4M*dD@ekwlC95zhANU6%luZmsjCi)raDl&HfMJNyilc diff --git a/doc/src/Eqs/compute_sna_atom3.tex b/doc/src/Eqs/compute_sna_atom3.tex deleted file mode 100644 index 5e3212f7bd..0000000000 --- a/doc/src/Eqs/compute_sna_atom3.tex +++ /dev/null @@ -1,16 +0,0 @@ -\documentclass[24pt]{article} - -\pagestyle{empty} - -\begin{document} - -\newcommand{\hcoeff}[9]{H\!\!{\tiny\begin{array}{l}#1 #2 #3 \\ #4 #5 #6 \\ #7 #8 #9 \end{array}}} - -\begin{equation} -B_{j_1,j_2,j} = \\ -\sum_{m_1,m'_1=-j_1}^{j_1}\sum_{m_2,m'_2=-j_2}^{j_2}\sum_{m,m'=-j}^{j} (u^j_{m,m'})^* -\hcoeff{j}{m}{m'}{j_1}{\!m_1}{\!m'_1}{j_2}{m_2}{m'_2} -u^{j_1}_{m_1,m'_1} u^{j_2}_{m_2,m'_2} -\end{equation} - -\end{document} diff --git a/doc/src/Eqs/compute_sna_atom4.jpg b/doc/src/Eqs/compute_sna_atom4.jpg deleted file mode 100644 index 5d53943bf40b052fe5dc5193db04270c7069a1ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35933 zcmb@t2UHW^_AeepML>x3PE@2Ly&K3?zJgMvcOoEN2vq|_q9VP0ReBW>5CVi=6cb1& zN|i2HAVEMtWCDt#gz)0M@BQxj{nuUVz4hLISmf+EbLPzK)8?~3d!NI1hf9!Crp8x| zAuKE`kX+^;(b>Try!8vkjQWwlS`+aoLx?{ zy@i~Ba6BCd;LrP z{6`LFD#0xC{ZDznf67Nr{E@x>C5!)&BYn_+o(nNTg+_-5`1wbkR##P3J$>;8%FE}p zZFEGWPjJNPt0CT~@K98^XQa;!X4!we-=Di6JpU^Ar^V#d^z?M)|C#&$^Qk8wM_EK6$C%Qe5n#w7_Fu9wiyVaYpZP~1 zkfZ>}(f?V-l9~QFnB(!E_xvk8^5n?>D#5b&g!O;P5U)Q)58p$K{*2=Pr{hm0|4$YC zx%sdM!gB)R#j?oC!UH+N!@|nLa@YrfF*P~%ue$%d?w^C@2f$JtJ>b8s>Xw4H(+ zVPR!Ga+LMhv7^j}V7bG*4mrwmjQ5P%#p8U|o@{5s_|@+{EI%Q2si{}MW&${;;T3+L zokLJaSVUA>MpjNuT{GwzuLNPU+U}%%N+W$%2Ta#A79|psw!MO$Z8^h@^%%t zS6=8dqm~^o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ye&GYY?S2#aW`}*>hBOk@;gLMuRp3~+GS{Eww+2GLm*42gg z0v|q$pOs+rhgIfq&#N@ayE0AdtZj}tKYRJWAVQy4`OwW!s~t6Zv2#--)BF!ttO|*Z zEC_Q92Ci)e@{KgEPlZ~fW}14(YRr282|s901%?}&Hw-a diff --git a/doc/src/Eqs/compute_sna_atom4.tex b/doc/src/Eqs/compute_sna_atom4.tex deleted file mode 100644 index 3477d163e3..0000000000 --- a/doc/src/Eqs/compute_sna_atom4.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentclass[24pt]{article} - -\pagestyle{empty} - -\begin{document} - -\begin{eqnarray*} -\label{eqn:f_c} -f_c(r) & = & \frac{1}{2}(\cos(\pi \frac{r-r_{min0}}{R_{ii'}-r_{min0}}) + 1), r \leq R_{ii'} \\ -& = & 0, r > R_{ii'} -\end{eqnarray*} - - -\end{document} diff --git a/doc/src/Eqs/compute_sna_atom5.jpg b/doc/src/Eqs/compute_sna_atom5.jpg deleted file mode 100644 index 732731fe13becfbb3e5c6c003b87a90f3dceb287..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14734 zcmb`u2Ut_f);AtRL~5jjCK45Cp*JbUE+eh>g_+D+nJSA0(gm2ia#H_}c|bON^tlgVlwL=Xp0EkOO+>ez7=z;0OeAJt8i~ z+1lc`rW_({j`gy8Xf{mCEl5Bk92pLD=KX~my(ToCr>dm)yQQHe33Ay?y$8|dlj z9Y1#^G9c)u_xv&Yo+&CE zXqx=8_LJWl*{0|;`Uj8%j#^XPp`DcFM_XGdpDEpoNU-X5ato!dEmOn@F|5f@~ z$^TUaKOf%jfk+&NT!57E^GQGsNbvDX@a@wfaGoRr|E&9GbAKkj1N;XC4hbF>5*Fbx zv>t&R;N#~%aFAa>;2^If_-^y=Lk>y^NS@F?cSy>~U+`qKw87oq9v@b=XzYbKzX47e z2E^PG5|)vblUGntRa4hM7#W{7F*P%{{N=or^{*FfTwLAUJ$Nb#yb=@~ay2w8HZJ}~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b7>3dpqo&v&9u%Ks;Z C8)%9E diff --git a/doc/src/Eqs/compute_xrd1.tex b/doc/src/Eqs/compute_xrd1.tex deleted file mode 100644 index 6e749c768d..0000000000 --- a/doc/src/Eqs/compute_xrd1.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - I=Lp(\theta)\frac{F^{*}F}{N} -$$ - -\end{document} - diff --git a/doc/src/Eqs/compute_xrd2.jpg b/doc/src/Eqs/compute_xrd2.jpg deleted file mode 100644 index 1bcf0494ea804da23768d39ff195ac031609064f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4778 zcmaJ_XE5B4*8Z)&{6#N`-V$A;AbMvP!Rot2)aasjlBglt+Fd~qWz{IrR)US_B@x{s zAz4CLB?v;WH}k$9-kCf1zR#ICGiT13Ipx!N9x{Ra6<~(yL-YX<2m~1ZHGsSb=m6A| zR8&-y)PEf{H8l8ZXju>-m5XOZxi0wScuAAy> z;OAXmR7OA^mQYLX+@jlURPj}<$Zj&4>Vjma%Jzeq2?ICwL zEJgw6l01AQfnMU<#{$)N7?Z1>VM%Dr$4hKny8ekHN|D+HQE>|s6UT(z<&en9|GcXt zpGu8`a(o!tBRAjfa=WgbZpsLzm<3B&%3f?*X_abfp<9L#7D|(oQ&9-E_raqV_ z$pad$x=RK=Oy_bAOJ6o=I5hU#qu-|Olli^Je@W!|?9}TW1&y(`mVY~MJyV;5(*TmV zAO$gm-yT-sFT0odC)A+AoO?MxxDmPU_bVSTA zjgbaxtY$vvD9i;yeJ!80rNQ%;ihx&|6Pp9hjq4S^MH<}qW3vKbB~=nuqH3M>#552Q zfMe;}%}mCxySqVQor`-KiT46{O9dPw!-q_kCTU3%%&N`Kk3jH8hm!^zabeIc^QE1Q zB2Tx?OB{Y9TXI29<-1VgC-V<$)DdT*{RKHs`sSm*YK4yCz zX`v^_9lh82P!yJ1p`0AU9?-`ihZc6Nxwse>$&CTU9J|1?RM%(2Hl1*1+j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src/Eqs/compute_xrd2.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - F(\mathbf{k})=\sum_{j=1}^{N}f_j(\theta)exp(2\pi i \mathbf{k}\cdot \mathbf{r}_j) -$$ -\end{document} - diff --git a/doc/src/Eqs/compute_xrd3.jpg b/doc/src/Eqs/compute_xrd3.jpg deleted file mode 100644 index 19f7aa99b5f79024726f836e35358a98666436e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4745 zcma)AcQ71&(?30ka)OBHC7d47dkuH`Y0-ixiF2n#38Dm1gHw)(Aj;v0-fQ$OKT*$} z77-=7==Jr?JoCKoAI~4}?##~4es^|fcE7W;`?(K9muflQoC%&e^J?CkgM zbMbJo@vyM5v)yz6DDMFD0fz(xK)_88fCWGRASC)%j{gt|DG@Ol0pXq7S2bDy0TD3) z;cdoSBjv3N0U;4FfP@rCN5*-Np6juyk^LP8aWzlI``qTJaj4fj-X~#6k|t&^Ui+q` zRn<=1-~f026+U#HH!lM7y42cd5=u|cPQhw8uSJg<|iREZ|e+B1@aC8=?!54{MMsh9SWM!BFjey2McRkkIUv3gqFQ zLViWYQTr65P4`aV3SO5%_=$+vaul=O7i3L8(z7F(dJ@M-8okgtIWGQ?c|QafVe_J7 z@VD+i3M?cQ#C%D%qG>IY3>C7vnZ1!bcw;2fK&JmNWZv(zbZ?AhdDDrz8=8shz}3>J zHD*tN?Av7@op|-{XuD*7W)tO+Zl~jxF?s02adHAd<}O0Or}QcE|Eck7ib~N{}6xKpHt{YIAP#@GW|JK>x4E(;Qzx<>h;ldR?K+8=nwC4UPQdv{T$Ym9k8NixbykW-CC1^{GJ^XU;W71 zlwp^dwtUQkM<8IPw=0XOtN?_MJlWcHR8uEbhnFPrUbH8(Wo_AdsALVM_3aAN@x#{{ z$$4X}(NXM)bmOQy`&dM3L~Vk~y?F|yZtGfkirydmrE%jzCURezXmHqcUWdQ!2kPae zS7vqWM`a{c@C`m)+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)y<+ z?(E%JIX;0qCik+xAtApOohflFT2`A^M(Ndkb=U(D-c%b{5+{{_jKb zb!l6n=C_Kw&NW;kDe&hK2)KxZ)3@J?bZ<=$AOwc1$ytJy*FfShC{30{gUyrgna{WC zFH9ny1`dNb_bdWl0681jT!g<8h8B($5VrH60s#baS5vMU=s|3$G1RN1zd3o|g`Dx43EThAz&kOA_X)W*>pq**q-Hr>-H$~k_ z_H8`E5aM-yUL|B1tt;;@#zF2Y)S832g{Zar{+38q^IB|ObEq`}Efg#+gC?J(QRp2%T`3-R>7C`;^mkmmq zgAAMP!imKGFl2NVksRG;Y==2(m}#3|=ezS=QGJBJ@>vlQ6}yvK;#RGcMUE;asvkd*0ZnwF2S?aA$63@(@o zB!>_EnGSiQisxtCG&E$5#k%yP^7m&l0avPQOH&8`i*TUGqGnn8xxT$hsE^MrqSzh{ zRm-o>13NsQqYWWo8|0KbL>QyUysBlr2bZixC|wK@j&0O3#3(S-B#|L-dqXXij;t5P z*Qj4~i<$h(QO4_|1#1&R@-daaY|JxG@fRpBK+;zIBm^0l2%W&^@O(F;jQV^a8nnP9 ze#%bP&(}?H%HZ1G9=^D-Ybk?HP*Qf*Y>T4*`@Z+vBef1nSp$T0B9HXF8}}l diff --git a/doc/src/Eqs/compute_xrd3.tex b/doc/src/Eqs/compute_xrd3.tex deleted file mode 100644 index da0254134c..0000000000 --- a/doc/src/Eqs/compute_xrd3.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - Lp(\theta)=\frac{1+cos^{2}(2\theta)}{cos(\theta)sin^{2}(\theta)} -$$ -\end{document} - diff --git a/doc/src/Eqs/compute_xrd4.jpg b/doc/src/Eqs/compute_xrd4.jpg deleted file mode 100644 index 385bb1efd79314516233ae8db633d12e8c751412..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2278 zcmah~c{J1w7yeC*K_z2}_OT3E#y<9uN=V3vG(wsd`#xig7NVL-30cMr zqo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W!QVVhkSCRdLEz8hX2{2z_qX9c^Z7 zqM8~X^-z5;8V~yIguu|oL>2GmX@VYI-Hmyj$Q&!i85@q@7T^QV&{z^)I`unDtS%|RPTVu7LxUiNAr4%_cXmoy5dqv9Ve_U12B%Re%LTo)E zTwQIG)Li!5{d5rwY)JWH37K%1Sz2orOGuWA)-4qphMRUG zoIPI>Mzfh;epk(jI73i({ooLB8Gz&BYB}&xwe)xZ21}_-DEj8r8oi|6Ki vg6m%Gn&|o-J&Sa_cZ=kv&=4n{lzXrx`G_(j=k5e+>@IE3^?$AJCH~02=;t^s diff --git a/doc/src/Eqs/compute_xrd4.tex b/doc/src/Eqs/compute_xrd4.tex deleted file mode 100644 index d4deb7ca55..0000000000 --- a/doc/src/Eqs/compute_xrd4.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - \frac{sin(\theta)}{\lambda}=\frac{\left | \mathbf{k} \right |}{2} -$$ -\end{document} - diff --git a/doc/src/Eqs/compute_xrd5.jpg b/doc/src/Eqs/compute_xrd5.jpg deleted file mode 100644 index c6f0a2609a4a2abd4e5f6f93c910d2340d12265f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7603 zcmbVxcQjnx*Z*hj(Pz}?jES1)3?ZVA z-iZ>O#1pUQ`M$sP{_`tq{mxx$uXWG8d+)pV{hYJU-ur6mY7syOf2{c!Kte(S(73(; zS44mcfP##ioScl}nov+s+_*_YdGmVQxpj+*26%^_9(V@`WMF2$%fNV#2?%5XvE1X} z;Ns$9xXT0P;RLgDa&caL2Hc_q7?O;UkN^Q!T>y3f34rWc#kG?EHLk^ylaZ28UO#<8 z2OuFM2auDI-z23bzjOTt3F-Ac#SP$1dXNZ%l0GFP6OX8}v8@Ms91+gU3w|W&>6@Hi zf7dP|jYUeuoZPY(kC*0%H|?9Wo-uV%*ku_!Tt-hj;vcKaY%}9UT~fign%hr$ z>Y6!lxd@znjQN4AqHKy1ds|^uw)xh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O_%0Hn9zMr=k%m2^+KU9&Xwx{ipc;}IB5FKij@7+I!{ z2-D*o+?bwk2o4DTpYf`OK& zg7!h;1>$8q3x+RCeoh}`3k&gcsmb=10$!48!pQ8;DzBRb|B=&8ico}r6ITWb56U6U voOKOO4YfrpIKx`w+6H_Bf2o_0dKnr^Ur;!fqOCFdAEtjf|F0zNYWlwbp3`?L diff --git a/doc/src/Eqs/compute_xrd5.tex b/doc/src/Eqs/compute_xrd5.tex deleted file mode 100644 index 2d97a3288b..0000000000 --- a/doc/src/Eqs/compute_xrd5.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - f_j\left ( \frac{sin(\theta)}{\lambda} \right )=\sum_{i}^{4} -a_i exp\left ( -b_i \frac{sin^{2}(\theta)}{\lambda^{2}} \right )+c -$$ -\end{document} - diff --git a/doc/src/Eqs/fix_bond_react.jpg b/doc/src/Eqs/fix_bond_react.jpg deleted file mode 100644 index d63b983230c0c26a7bf9c50b38593bdd65196a35..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2427 zcmbuBS5(u962|`_^m0KG+A2jwA-KRI3km{WDUlE$h%_lm7ZPbJXy{582&j~>w9q0= zq(lf!su+j}QbGiz2umkYgAz&>-|qYU&C56EJ7?yc?_ticzp!Tk5feB94uC))ApE2N z_9S5NtNXuTcK`ysz;8eh2y_Zyzdum`2l!;e|G>+`$Ir!m;=x2tJOB)UI5{{@#0gy7 zU``$o2QR<}fr^QWpOWO4u*;&eCjj1GBd!B8l(&_- zm=EMhkUClXbJy-6;|rs&CmR+|h0P;O$1+?V-MFNd(KK+SYPZE*t3zD-jK05i%vbG> zOtm6G>nwG2U&r>2XN=mNm+_cDcanZcL#aKC^>-J26rd#TQ}OQB!VB4Y*-f>nBfVd* zs(>eKO*?NWCtV__6&qXQA#y>dXH$kp1-lhrPqTsG4+j3JXgBF!+3mzpyVNZB;OCAO zS9Q$H_g|=-qUKV|LvNNH z=P4i4V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ntAJu&;{&bl<gLkyem zj9d)+)8AeGDTksZRNgY`^N{NYT2#Wf;<7lRO$I--f+B_vEFVi$VxsAZS1)y*2{4j1 zW(BQLs(*$>>6$p#{m43!3jyV zXT$K*Zy!7Zi+darnzS6~yvWJ=mfN4EbJ}o|akPhqtTC~s>Q&8W+oXnNofo76O;jX) z2(;<%>a^bk^WD?(6PHNg{Ex>X>g%us1-#~zSSove>Eu+V9MkHqhTjZ#yFs=eu~%#k zv2~K4H+!~KGG)_ssd4Ho=EpcD?GhS7z9A$c?;mQUZJ+CLD!Rh*CI4>aP4TtkV7!Ig z#BB!~scwEZ2e&&qT(Q{ARgca*Zb$3dg=i^J{nJo>ewcnwqWsOf)wS diff --git a/doc/src/Eqs/fix_bond_react.tex b/doc/src/Eqs/fix_bond_react.tex deleted file mode 100644 index 9400656038..0000000000 --- a/doc/src/Eqs/fix_bond_react.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - k = AT^{n}e^{\frac{-E_{a}}{k_{B}T}} -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/fix_box_relax1.jpg b/doc/src/Eqs/fix_box_relax1.jpg deleted file mode 100644 index d425526046e14d2757882564421d996aa944efb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3375 zcmbu+_dnYU7YFcfB!n8VN~~y&OKa2Ch#IZXP*T^mLQ%0=p>}y}u1!=l)GDf~wf9!D zQq<~5?a>%*&7?OPr98dAJpaJ+KCjpL<(${&{BTZZPFDb4Q)9F-00M!48@~%Uod>Q1 ztY8QP0%rZ)SXo)wpj_ z<^FdA1h9Z1tbA-x{__HAQikk;>Xvu>W6ug*`%~D~HH#!I^M{6&b=;$;4b$&FoX!F4 z{|4&=zjBiQUoZ3Yp3#n@)x?dl9UXznu?M&~akt66gxZ~;jPspJyR;UD_ltIHn4&u; zbJq}kh{RXeplKSdayL(b#&;)6ls%J$OxIf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unqLj8A9+9an@-9#=60OPzd%OS0^HfqlOWgfoX-CUZ6&_4glH) P0M@PFzxcnPPG|oM(~esx diff --git a/doc/src/Eqs/fix_box_relax1.tex b/doc/src/Eqs/fix_box_relax1.tex deleted file mode 100644 index a332360666..0000000000 --- a/doc/src/Eqs/fix_box_relax1.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -E = U + P_t \left(V-V_0 \right) + E_{strain} -$$ - -\end{document} diff --git a/doc/src/Eqs/fix_box_relax2.jpg b/doc/src/Eqs/fix_box_relax2.jpg deleted file mode 100644 index 8fac42e0fa8305c2deb45e5043f865c3a9e35134..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3029 zcmb8xc{J3I769}$=lh8Uv!B3jT`W6ano zGEy^H#y+wn8Cy}3vCQlJ^OkeoAMbtcIrrRi?)~H5|1M{YGXn@;G((vIAP@+!_!9tU z5-wM!@*qv-bJ*i=cGXe1b z*&ILuOwxt_kLj?py%h>nUQwP_B$g#eXw@ku04tm0^6@HRPZj^oF=oNt(t5W-U7sXL z$(vq2t&SHD1S-rtoVmv1;|#6*T3XM8rx7hu8s979%vdVfuUHz?WL-|sf?z42j^wIfWVcSyew02kt#(nfIkdHkE_{mX=|K1!T~lX zqsLeM`wmvTfav=#!b!r-5=(O@z1EdY=`*{?vCpjV6)Sp5np#VKGfj&kK4os=238(v zKJMRDitigooX(cj6=JR_>26(#6{GdGE=C(HwAf7?TMK0f4_jIXzFjv}8k4?)({eYW z3-KeHH&@yzIl;f!M|N1xo>u($h(aVXXEnPw-u!;IcL_1CwMC8Sdr1uKSukDKwelsv@OB($S4>;ui0oy-3na-Tk4F5lC2vEX?SK@tLT$!iO`5#M2B+ zOIM@rPR(zt6-qni?whTLXFBmwl*VSeUSvC}P@Jb57FPVHl&&#gtmUxW?Fe7Oi7N{g zl|@cXbfrE4mm`SvJ>{I7tkdGvlaZq%RbT2CCs(oHzIV=km6b`eGN+Ov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ynY8eueXHh_s2rOfEtS4udkcE9H9=Jy_9P~&bH)}#N9Q;HYS@Jv!Vh)1V-vwX9%XM}qaKJk69jE1P{(xIi!5P=49 z+L4-2!^Zp0UAHP2kPT9(L z-v?8>#n=~Zm?}nl5clQ_11x$o9sLIS=3Jmc2B;PKFz=U?b;x76OXa1-V|%EZh4>U((S0=6L_XtHOJ4+(r56z3I*`zB0LY==!Ty_g&iLN}AxftK diff --git a/doc/src/Eqs/fix_box_relax2.tex b/doc/src/Eqs/fix_box_relax2.tex deleted file mode 100644 index bc9cddef4e..0000000000 --- a/doc/src/Eqs/fix_box_relax2.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -\mathbf P = P_t \mathbf I + {\mathbf S_t} \left( \mathbf h_0^{-1} \right)^t \mathbf h_{0d} -$$ - -\end{document} diff --git a/doc/src/Eqs/fix_controller1.jpg b/doc/src/Eqs/fix_controller1.jpg deleted file mode 100644 index 25f381543fda256370cc881e6b57e3b2fd38063b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4832 zcmZ`-XHXN`wod5Mi*zAKuL41W2vP+?RXFreM7lI7A#g$y6a)+Kq!)c1&I_19iHc%J8$ORH+Sus^=GZU*P3sy*|WdzZ1!v!z-?h_ZVCVbfdJ_5 z1vr}r7y}sT85kJo8Gk!QMn)!Pb{6K}#>K{Vj-7{#mzRf&hlfw#f*{{{5q=&Xp^HKy zVqzc=h)+;bT2fs4f;dS0tPjA(0C|pX~0rOGAF4y>W za?9k|9DwETGxY%{SPQ%S3Wfjf95J5i>HPzFzT229`;^cDWX*$z8u9mTLlPAi{&Sy_ zlM=dd&^6A(Vp|ldGp)AWanrp}vGS-%8o-Q(($&O~i|20L-LIKv@svM+t;2$Dq-B_U z!!Zt=CzCZ?7%-K&^T(Fs?Ce#g%3DHoI{7JwDHNyHf2ss}`l&+%G1E>&OHo)&`?(PI z8P;qK(5(!c*;6B2poLv)OQ%~j7e{R2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ccjT5OxohK3eKS2{(C z$eV~ba8ULF?6n=)l>8s9i;L?on`|K@HqD;?b?H@JZze_s*4%Pq5dv!+qAKnTxZ2$lO diff --git a/doc/src/Eqs/fix_controller1.tex b/doc/src/Eqs/fix_controller1.tex deleted file mode 100644 index 14f98fc303..0000000000 --- a/doc/src/Eqs/fix_controller1.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentclass[24pt]{article} - -\pagestyle{empty} -\Huge - -\begin{document} - -\begin{eqnarray*} -\frac{dc}{dt} &=&Ê -\alpha (K_p e + K_i \int_0^t e \, dt + K_d \frac{de}{dt} ) \\ -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/fix_controller2.jpg b/doc/src/Eqs/fix_controller2.jpg deleted file mode 100644 index 178fd5a67eb618a0929d9b1d52be195221071797..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5571 zcma)=XHe7Kwuk>n2}m<^2qaWd2&f<>R1u_zh~g_q6$#aZ8VD^^Ujc#8ML>#xU_rpp zBfSQs89;guRcQvKm+SlG&Yd}D?m5q%*&o*W&0e!+t-WXVIvYKk1uopyHP8iUXlMZa zKMOdU0JH&mS~@y9TKYd5Jv}`Gh=mdK2XVrnrbA*FGo1P%hSaElA`kjcP-aaoGmRSgUOl;uOcpli0l-HB|Q8h`X6}PNE*Xr z*b&8ttwP}M9P1Qn)$6xaL>;D2we4hRA9EmdR;#&RMgB_jD06t6v=fu{BTdJ;4>P$} zSHZc7nO;`j?9u?BJU#!K#Xpu9)+3+yCfUEoD5Vy4ZmBNzzNkkX_*a}e0R6n-&OC_) zAH!1o7ok+{(dh+el@VWTt#RV)$|t{`4#`W))%+>>-W@c4rBBMRo0OoptGJG(Yy6jC zJgU;V6bd8|HERDne~(r2w%4B=FY&{NA^g&IT@LR}64y6SaC3Y6czo!*+7(l|{fr^e z&PQDX5t(0h)(liFA-js#=e@BsCQ^?|-D=_AvoFskxF+drE!6}yL(hNxAipP%?xqmZ zqH{l03Q~;{Q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--- a/doc/src/Eqs/fix_ehex_eom.tex +++ /dev/null @@ -1,8 +0,0 @@ -\documentclass[12pt]{article} -\usepackage{amsmath} -\begin{document} - \begin{align*} - \dot{\mathbf r}_i &= \mathbf v_i, \\ - \dot{\mathbf v}_i &= \frac{\mathbf f_i}{m_i} + \frac{\mathbf g_i}{m_i}. - \end{align*} -\end{document} diff --git a/doc/src/Eqs/fix_ehex_f.jpg b/doc/src/Eqs/fix_ehex_f.jpg deleted file mode 100644 index b74a28d907d1682c3a95ba59cef84f6914ae7eba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10352 zcmcI~Wl&tr*6t7pkYE9V4-(`hcyM8jOTwRf%EwW^=h-Rs#8vkxnPXRkqOAOIE?7C`k+13WAM z6akO1ad2?3AOA6rA3w&$BgDu10}=v)CxoOVWMrfyq@?7OKq~U*v=pSI)Gw%M>FF66 z8Of=bS(zDFfeefc4;=ske1Q9-Y%DBNzyllr1YiLkVgKVB|Aoi6*f@BP@Ui|p1w8{` z;XJ~6goE=4_wf^aY`{O?#(7MNOZEbfoL?UQIrBRTGfEbL_b$N-y7Av9pU|)>s+or+ zbWsTkfn7rqb75l>5Ay*0fB2UL-13nAe}Zdv1S6S1#v9YCSmKb@a@#&Mrj9?+E2>%q z8?7ocgf!ck&05W;O9_`U4`lC2i)qg4w>}(r0du`q@KU`lbjIq=$pj5|2t(0$i|8NB z%)Ii$g6`|b<4^U02OsFZz>kZo^g%Q2X7OsQ31JGr*`>m>DvqTErHkcTyMd6_ufMIg z8od(JwNGZ}6J~lWt2R%%Sl;xg;P#&w*0nMDYSxXQ9K{A>WI5g%^_Z0S!dz_9Tgu|U zg#MIBSDj@Fse4CCs#D^c4fh#}5e@&vqZn-}{;lASe>#3>(ODF>_dNu-IxC!Szu&>d z$^1`nBH1?aVord@{sr<3bgaiZQW1$Yl#A}Yn~rVCeRE}j=QC%SRHB|r|09%7W#oGv z0M`mIbp6frdc&Ns`~yJejnf<>CiZ^n?Du4C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H?f4y>@cs4_i4>rS$Un!t?@-uRbCrQ+o+D zxJ|#4vmHtwQMU|1a%9Ax_%K$E?>kj}|B-CzjA?&@Xrz?*CQENIm}{4R=x#pvMu3`? z*oMWPn8$nh21uadFb$Job&Jlte;1wCVQ18PyqN!dE3D0MJ6+t6t|>1;b(SC<(Kw7l zvAYn8(3)80jg{#`_N{miioM)B@sHu3Q$H_C`wg_mS`#oj$ZYN2DkuXu z6~L2&m%$OPja4m)(%mQD^9oXbr&`1*b0lz4pdis7Ud55PB5H?NcHFdF@&6kCua*Dr z!8erCMOaW*(AmrcSF-a{_O4;W;a!WII{vhliPK5$F6~nR6%9I^vB0wYNbGf1p-X3H zp1Ix0*x(ks0}`sueREl zWQG|fUvszFro2>lA~(lJMb?@{Hy5L^ivAY$^o+b9Kz_sc$+AnV8U6UC6MtbTxZ*ml zr0VW&Utco9>Zi!+;EY+S2#5uKh}?V?$Y*uz@r&Bq{Y0^sOFH!2z6mV65o(gYKqu3h znRn1GWz%%wc1XNL$u8|G81lGGoxQ$RnOdlK*y+&q-ohR<^{Hn-NmWo;Cw$0` zX(k9lK?uA!#gpmTZ1cg2(O=+7PTa&V?(Uwj{4!@jtRvHhT<$3zTUEtvyMKJFuDfBK zddO8U1Zh$+9Y27#&Z9*vy%~Hpwcx+3*}DzlT9z@VzvdasDp-v4E+kKhZ5faq95w$f z%l#=g#lns0GVpqa8P^N!CbYtSbw+LQM7Dyc8BC@J;O+5LKHz zwe)*cdH)L56lu6`<1iciuFufs-*ozS|Ba&Qe19srtbrM3VnwO`yp$L`5BjDm9lbHvM{@yPqL7(=l-DEaZG>0O1!E0^It!K{XepN4|D$u D8v-&F diff --git a/doc/src/Eqs/fix_ehex_f.tex b/doc/src/Eqs/fix_ehex_f.tex deleted file mode 100644 index f6ffe1d720..0000000000 --- a/doc/src/Eqs/fix_ehex_f.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentclass[12pt]{article} -\usepackage{amsmath} -\begin{document} - \begin{equation*} - \mathbf g_i = - \begin{cases} \frac{m_i}{2} \frac{ F_{\Gamma_{k(\mathbf r_i)}}}{ K_{\Gamma_{k(\mathbf r_i)}}} - \left(\mathbf v_i - \mathbf v_{\Gamma_{k(\mathbf r_i)}} \right) & \mbox{$k(\mathbf r_i)> 0$ (inside a reservoir),} \\ - 0 & \mbox{otherwise, } - \end{cases} - \end{equation*} -\end{document} - diff --git a/doc/src/Eqs/fix_eos-cv.jpg b/doc/src/Eqs/fix_eos-cv.jpg deleted file mode 100644 index 37eeac8e2dfdefc78688b40a5f64393296eb5810..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3016 zcmaKuXE@u98pi*zYm`u1qzJ8DYQ<`T+C5sW^_sPnQlVHn1@eK&5M~qDL49p-pmftCy3!norfavLdH?q?I z*#Obe0}PB{CT<=vW~B?_NEYQ=cLRC(B&@Hh=v%tRVsbxCqT;e>vjEGVlh=ULJX6b@ zGU@+i1}FuyxRsH6SHmv*@vZ+74{PFaPlVj4$zjAH&Pb z#V<*HGZMHt*UfL_9AFUnYyD(1LTunch?4DqnjZW-GJNY*vvr9XcHH$-sY^pS12^I# zox1aFlr~Jm%x@SckeI%JXnJtY2Y0q14w@W&jAyoqU#@U^{v$EtILSV6i=4ZSp)k!- zt*5WP<1&I}_k63h(L^pC|tdafCLS38Ni!GOWLVk>SXsi9G)3nO)LJDJ|;_5D~TOLLhC%HlRjQAh% z&J~fiEx@zJAc=d?uUx*OnaQEm_{kyntw6Q7jk864!H4O(mcu*!rYX<4hb>~BbNddf zS#~RVQ1drqwZ)B+(I(bLhB99V5i)~aaiw%DKkReL&H;YKAgf5ITE9n_^UkupgZ@J) z6%TpbAXv2`y9qW9s~O7_phN!RLXehDUPA_L6b`3rthKEzBOTr<1NB4acmtOVCk zprnV-xxu~$*jKkTp4gK3@Hkkud3jcUO$8)hMtm!_zK0XWscS5H?|sIXY2OlQLM!{a zYGbEJ!3KK)ca>X&$3~_!^NkhK7$x}8t;lR)MJ;sPs=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oO|VLf->53lrrJUBcjnSro4uB^KYm0 z%9ofy<67H`NUmS-%@I#o4~PO3nM7TqO?2r#sMT#Z1k^H-Q)c9Kg&3BIj*$wge03UOd(RC5Z5I>+V-vph{KI!M%DMpg3NCS$7F3JeAVqO0^}^07-O#!!&7dT@ivnwrGTL+gK=?OHLz%ab*Do>AfKj7!2 zP48UN?Gm;6_(LRMrLX&l`54_Vv0hwKvDZ^6UV211~O#0lz9+^ipcZ z=ccAv3)Xvw#Yh0f<~u--cs9}g8~XmqgLo)7Eyzpa8~5LFle*Q5OHuFci=+QePP$41 z%Bw3a%dfZuNpEV;EX-so$Y`TTc4TI!{NtM4xjM)FM~)NI5y5*ev=#;fCjTI09ohav z5Y&HJVC}}Yzpt~a{}Lhq^ayX(itzXk+wgQ6AcAjgFPQqNfZWM9=v3_qV5n__*w4N> z$3&Q!$XYB;b&aXyMF1RtE_U1MXo{y0Grw5#Vn`?6Re^%H+B%?b_y7}&*$@imzA6ie hiNvaUU1yCo++#`_xI_b9&;R-8|FP_Ur8cyge*+l&tTF%q diff --git a/doc/src/Eqs/fix_eos-cv.tex b/doc/src/Eqs/fix_eos-cv.tex deleted file mode 100644 index e084bac9bc..0000000000 --- a/doc/src/Eqs/fix_eos-cv.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} -\pagestyle{empty} -\begin{document} - -$$ - u_{i} = u^{mech}_{i} + u^{cond}_{i} = C_{V} \theta_{i} -$$ - -\end{document} diff --git a/doc/src/Eqs/fix_eos_table_rx.jpg b/doc/src/Eqs/fix_eos_table_rx.jpg deleted file mode 100644 index 0172281b6ccfb25e31b923f8e0a2c7f027812caf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17367 zcmeHu2RNMFy7sHLAVlv$LNIzKL=r86=$+^-y3rXVdM5}GM2R4X-i<^jh#uV_L^tYa zGiUOB-`RU#d+&4p^Zoz6{{Q;V$vf9G@AIzrnYGq)uV<}wueGj0eM2n)*B>b;D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3 diff --git a/doc/src/Eqs/fix_gcmc1.tex b/doc/src/Eqs/fix_gcmc1.tex deleted file mode 100644 index c4b0d62527..0000000000 --- a/doc/src/Eqs/fix_gcmc1.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -\mu &=&\mu^{id} + \mu^{ex} -\end{eqnarray*} - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/fix_gcmc2.jpg b/doc/src/Eqs/fix_gcmc2.jpg deleted file mode 100644 index d054f584305d763e5b7baa8881a1f1a0d96f0a62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10626 zcmeHscUV)~w(p{MBV9lNDS}c$??pfaMWk$%CPcshAqJ#}VuA%hS_A|Hl%h1HNeL(* zy@-l*kWdrYs1!+1aS0)L(R0o|^?mog_uc>Q9xHQYWY#st8X5C9#-zWeF9Q2dpFDLE zU}6FQYsLl8iGZ^u8sP%~wzj}A001}vW+nlEg~2f~E+8HOu>Rr!;0WUz09Xo{{@z;1 z{I^!7!-Xt=1#vCL*myNopAvayVlwym1&RSUQu!a6D#{#(@9bKX%%Z~e0MHI|WqGFE{8b%~$sAJ1wc{U`mYfj>3yrw0Diz@HlUQv?6| zH1Kz{0}o(8oCpS%0q7fmp1ogSXkdt6;8kf&RW(4*{FE*0Pr${XU%dP;cK`UH;5`uj-ht|{G7mTro${uG5|9_6AM2Ry$6tDfHpR!U-WAjx9EX=GdY-~T5VY2Uz*p1P-g4u?sqQa>xV;XS7?G$z#AfM}77;xlCN6(OLGkD@Eo~iLJ$(a<6P72ftWTZ(?cDhbPR=f_-k0G%zJ3V*kkGL3 z2y|rB&0BG|;}h;Arf1yC%*wu>ll$m#aY<=e`ID!0^$qyOrspr3ySjUN`}$uEydE7J zpO~C_KTRN#mX?2C`S9`6DrM`-*Kgb3!5=$63oFM@ zxtN$EehSXd%63?tUBJwN!!t-wM&mlCka=2BZ6}wkrXyL{D|m!kL{5t+Px&d@F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k!_ksrCg3Y zC>LCR>~^@`!F1$@mv*EnM$8}@<3)kR(zwyy-MW%ucE*&tLXQcxjDK>NY(bY2=Wu`GX)aTg5Sp5`sL@gYON3RT)C{ABJ|`i+`dYT zMPK+Uq+=*iN<8K~MS>*NjZ2=F7;Zq;uy+>Dx_E$5Tcqtb_O_m?bL8*pW-<*X<`qgO zi$xSN72h(A|M+KJyZhdRE%ErL;}XvQGu^JI|89P| z#^xU~DU7oeQ~JceIq3fo1^#oiSo1~-JZ9GeVgKYI1Uir_`lAX*sm4pNL(Uh$^pj40 zGu=_L%FVH!;w@Pa?G~A*Sw8ka&G;(yGbO$&X(*+=X;yS$f2*uc1p^2!bPrr=K>2jo zJf24qe(yY$b=crQK>T~>%Gf~u)=O#}LQMEd58AAx&J>k}BH9V_Bp1Ztp+YWLe^6tG zFto9qFJPF9e0X66YjAS>$aywYr7N^flwbeFrO~pfNpY(i7(vk2ZTw0R&U)1G!v)Hb z3Qfc3Up9|q?d*`O(sEuzg!hF%icJs}K8FdR4dlXl3*tlx3+o$&V02HENe+q<(j$IP z)b(~=C_yKUOcOe_;rXn+l@F;uu6m>E?#zJPM}_APGr7eeWtcfeg7;{=A&}(JkE~&yT|olpnO2m6Ms6u zZsbY%(i1*xRTTrHG}e=j`oveb6%TSI?^>Z%U*oL4*Ni-r>N1fW4y%gpaXnv?Q4Z#= z@C-VJ$fb+@-q@Hps?6czJaIS{Amg;5jgL&r zL_D>q2BRH@vuw@%a;oRq+nVB3buU)d9F8mIcDIpwcxq?zKODAA{=XZ`Kcp-F)v#FT KQ~$&BP5&Rn=r-a2 diff --git a/doc/src/Eqs/fix_gcmc2.tex b/doc/src/Eqs/fix_gcmc2.tex deleted file mode 100644 index fc4d90355d..0000000000 --- a/doc/src/Eqs/fix_gcmc2.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -\mu^{id} &=& k T \ln{\rho \Lambda^3} \\ -&=& k T \ln{\frac{\phi P \Lambda^3}{k T}} -\end{eqnarray*} - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/fix_gcmc3.jpg b/doc/src/Eqs/fix_gcmc3.jpg deleted file mode 100644 index e87764afd9181dd6c4707c0a33b0a80abd2170d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7437 zcmeHLcT`i^x<4TxO+bnu9fQ(CFVd0`qzx)k1gROMgAh6aLJ?_#fQo>?PzFInL`0g@ zC{=VEq!@Zh00jg|lya1i+`!Cr)_d#SyY6~_y|tddlYR0fd+%?b-}ikv`vfYL1p{Qy#Y0LB9w0Ho;e001q8 z{M}p1@V$4j6#CtE*&j$Fupajg4Gq*$QVIxBbah8x_E2;~`zv8w1C>-1m6ZTJBqq?+ z&CerL;@Nw6N*=d|pJ{M@{;q7A@73^Uhb>7A;%Fj*P9fm|m=wWm) z{(=4;p{^1b|0@9@Iv9P}fpZBIiI$cTst#RxS;bg-9_ing}4lCr9jsw$j50v-|>5bBD72ZTue)595$ z5Vv5Tz)&A_fW*E>*URXzP<(%R@dH01@FN00BJd*uKO*oW0{{Oa z@VDCW2%t-x2)dR5XzReK3*P8Zbci=PP(n>n88~HNc8+mhaM5vKpFA*+jEdfv$O4`+ zuEew6T>}kbY0m*}7Qh8qghF5d12+W94Wab_;&jo*1UbOLH2Mj`0A*x4#LU9V#!es5 zc!aL*pil-zC==8EGLRU0KfuV%#B*Hb^dVkLS7ulcpX$|Hzp+Rf)V(-rHAFh0b~!kK zm5pEEn4r)}DQOv5Idu(9ty9`MhG&e7O-#*xwzj!wYj?@s!Oh*n)63h(HzYJHJOUFL zbuBR|IVJUa+U@K+Ik|av^9#!El~>%ad{Fi9X?;UuQ}eTy)~@cJ-oE~q1FwchM&IGb z#wR8T#D&GB_aBy5R>_~gY;JAufM37u^P)@6KWWj=e=_@TytwJS7#JC$jLiGIAPf=v z#JL%nj;kEvIc>@88pI1zy~@I8aO=0a7p#(MR-~hsgNNAoPpA`4lJ}_{F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@@ -1,13 +0,0 @@ -\documentclass[12pt]{article} - -\usepackage{amsmath} - -\begin{document} - -\begin{align*} - &{\bf F}_{j}(t) = {\bf F}^C_j(t)-\int \limits_{0}^{t} \Gamma_j(t-s) {\bf v}_j(s)~\text{d}s + {\bf F}^R_j(t) \\ - &\Gamma_j(t-s) = \sum \limits_{k=1}^{N_k} \frac{c_k}{\tau_k} e^{-(t-s)/\tau_k} \\ - &\langle{\bf F}^R_j(t),{\bf F}^R_j(s)\rangle = \text{k$_\text{B}$T} ~\Gamma_j(t-s) -\end{align*} - -\end{document} diff --git a/doc/src/Eqs/fix_grem.jpg b/doc/src/Eqs/fix_grem.jpg deleted file mode 100644 index 666b4344a6343e1aafefd29b85f5803ab2eac0ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6224 zcmYjV2QVC5*IuGz2|VlAsii59)@ zE)o&F*C6=3?|k$9|Cuvq?#w;+JTtdE=bm#pefa}G2hx112_PW>kO-3q0|1uF94UGBGjTxOw{y zGvgfwMkdC~HURZ?fE39X2?;&mvJ=1xAOT#(y8`*2P+q41l9G{MBe|N^r2~*$VUb=z zQBqJ*U-^(+jRE8ol=KYOIf1vt8C4BKZ*xgl!`y57$cmGB)J&T-4E zej9_5sQbR0H^|f67cn3px#jJudC$(x6=#ldtHuJyN1>l%6DE6U_*67d)wSZ z00d4&Uzs!`f9x7oZuJ^p_nyvd)KKaw?~(^>OO!~cuB_{R+w#I31c#~ga84B2Vvnfw zW|6Q**_*VN0LRETSnVf`Zzt&=NJR~{&kljcjZ_E{X}Hv2hQ6@L2cw zQO|?Cq4?>BT}cPIBR|xHT{VvQ;$>>VF)@BmM4-LWSDJ@tail85-}4(+g0(0}ql+#m zr?p067y1Q&Ky}9rhNM4gq50BLZ6G=KO((N9FvekraP!`uFI zhS%`>^HHDq8sp}W`QYgMF@&Lf_h*Q(vtY2+M*ZY%U(WHtw6qeB<`2n=i(*{oZo2Kp z1s*IufN&$xl6g-8O{vf{EuUk*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T0S*Pp>~=p^jxE-2k63 zdqk19ee>-@quR!zl@AY!fA!T6t5@ALvD!y}_C`b*QY}@cR3JujS=jlo`R8w7R+B^{7vjpDW7Rk|=XmbEncXk9nHf^AMH$c zdv0Y*9abpxy>S+((`lGvtJmoPAMkd#WxiI^329*_1&?a>f)Gu#hi;E73@cB)TqC)L zLTu&MM=ilj?Cj#I2>_x%``N&eaya6lddn4nOgfkqaiQozmNPiDrl;kbpy?}*a;!x2wXBpi_HSVk zOy)|aPfga{3We_prXE;Gj!8aUbJb|C1;zT8&%@a{j{5NDPn8f&IdkQPgj?ers`;2_Wb3ZO=h*QEszyL-KU#5~_cleaR z+UPnsx7Ipg>7O-rRwt8bBflF(uxePW_qZP&fa%cZ+h)EEl(?f7{Cx81L#g<0YgDYg z+9khk^$VX&K62@SpS{2BEYcg%`%YS-L3-bbB~0a1=_`>n<}>tPru^5WSrUdfK5HIs zKO7H~iHEhA?c2|Ia&*!Lkw$zT#+h~&^O`vR(`*GEmV`eZw?aN*>-F$AqNl0)E*SGe zt?yTb1f2{=0<~*+`=I|&>{|VnBo#AXEL diff --git a/doc/src/Eqs/fix_grem.tex b/doc/src/Eqs/fix_grem.tex deleted file mode 100644 index c00ea696a3..0000000000 --- a/doc/src/Eqs/fix_grem.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - T_{eff} = \lambda + \eta (H - H_0) -$$ - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/fix_integration_spin_stdecomposition.tex b/doc/src/Eqs/fix_integration_spin_stdecomposition.tex deleted file mode 100644 index 8c7baf296d..0000000000 --- a/doc/src/Eqs/fix_integration_spin_stdecomposition.tex +++ /dev/null @@ -1,40 +0,0 @@ -\documentclass[preview]{standalone} -\usepackage{varwidth} -\usepackage[utf8x]{inputenc} -\usepackage{amsmath,amssymb,amsthm,bm,tikz} -\usetikzlibrary{automata,arrows,shapes,snakes} -\begin{document} -\begin{varwidth}{50in} -\begin{tikzpicture} - -%Global -\node (v1) at (0,6.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{v} \leftarrow \bm{v}+L_v.\Delta t/2$ }; -\node (s1) at (0,4.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{s} \leftarrow \bm{s}+L_s.\Delta t/2$ }; -\node (r) at (0,3.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{r} \leftarrow \bm{r}+L_r.\Delta t$ }; -\node (s2) at (0,1.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{s} \leftarrow \bm{s}+L_s.\Delta t/2$ }; -\node (v2) at (0,0.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{v} \leftarrow \bm{v}+L_v.\Delta t/2$ }; - -\draw[line width=2pt, ->] (v1) -- (s1); -\draw[line width=2pt, ->] (s1) -- (r); -\draw[line width=2pt, ->] (r) -- (s2); -\draw[line width=2pt, ->] (s2) -- (v2); - -%Spin -\node (s01) at (6,6.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_0 \leftarrow \bm{s}_0+L_{s_0}.\Delta t/4$ }; -\node (sN1) at (6,4.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_{\rm N-1}\leftarrow\bm{s}_{\rm N-1}+L_{s_{\rm N-1}}.\Delta t/4$}; -\node (sN) at (6,3.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_{\rm N} \leftarrow \bm{s}_{\rm N}+L_{s_{\rm N}}.\Delta t/2$ }; -\node (sN2) at (6,1.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_{\rm N-1}\leftarrow\bm{s}_{\rm N-1}+L_{s_{\rm N-1}}.\Delta t/4$}; -\node (s02) at (6,0.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_0 \leftarrow \bm{s}_0+L_{s_0}.\Delta t/4$ }; - -\draw[line width=2pt,dashed, ->] (s01) -- (sN1); -\draw[line width=2pt, ->] (sN1) -- (sN); -\draw[line width=2pt, ->] (sN) -- (sN2); -\draw[line width=2pt,dashed, ->] (sN2) -- (s02); - -%from Global to Spin -\draw[line width=2pt, dashed, ->] (s1) -- (s01.west); -\draw[line width=2pt, dashed, ->] (s1) -- (s02.west); - -\end{tikzpicture} -\end{varwidth} -\end{document} diff --git a/doc/src/Eqs/fix_lb_fluid_boltzmann.jpg b/doc/src/Eqs/fix_lb_fluid_boltzmann.jpg deleted file mode 100644 index 9d82b40ecb009745f6b984f5092b42008a057380..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4643 zcma)=S2P@q5`cI0|JOUKEYXrE(M6YR5Ftb)h#spiR$Vp9PXw`QtWFXox_@;NEz7PJ zK?G~{vP#s|`_2Dy&%F=#ocql=^Dr}K%ELU&Tu)xl1DGD^=;;7}Kp^1ZZvk8r01yBr zIRym;IpuFfNl8gXO-Doh8%A2%Kj@elSy-4EnVDHRcsW_wKuvxq00|EI>kp`aqCqz01F{Pt=w0e}=_Kr%`) za!N`H+TS7nL{m^QQ?UqAv)+)o$7akf`;vxJ=&AQ}`$*Inhltz+qGJCq;^P)=<%Ya1Go7Ayn&qP)s!2WV(?@5)+Hu)9<&=7sMWAM8JzTc~ z-S+Xu|9}`?uXM?b3EydFy#}CqelY(B?C^Le4-#*QksvunI^8+-wHEj67`mgxHBSA^ z;;2SE}5)FP7gXrs&Lq)mjtd`jLV<%zmnGt~5v@u@mUjaE%{Mr25=}UCd6A;sv+U|9uJMhQ z9!)Ej{W*7LO^>cRUg!7}Hc2cPyY(KJko+{F{CP4z;|c|yJ)pb#xoz~WRn1NG zi=)?E!G+a0zpP^4D4_&!;-{9XIqa25jLnMTr~ZlM$>4)_6b4%6M4k9HL8f6S(Angz zR*-K;%+VKJ7eBRwWKhw|n5mpv*$28Xl!ovT^dw6qbE^wfu@ z7Y0E$OVL>{e@RP9xLKgE3{rTF zVR;Qf-lG04O!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/src/Eqs/fix_lb_fluid_boltzmann.tex b/doc/src/Eqs/fix_lb_fluid_boltzmann.tex deleted file mode 100755 index 4a6ca6fe01..0000000000 --- a/doc/src/Eqs/fix_lb_fluid_boltzmann.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -\left(\partial_t + e_{i\alpha}\partial_{\alpha}\right)f_i = -\frac{1}{\tau}\left(f_i - f_i^{eq}\right) + W_i -$$ - - -\end{document} - - - - diff --git a/doc/src/Eqs/fix_lb_fluid_fluidforce.jpg b/doc/src/Eqs/fix_lb_fluid_fluidforce.jpg deleted file mode 100644 index d3149616ca83c41015e7a5f4ad6d58aef98f8c2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2358 zcma)8Ydq5p8~!uPCSh9?EuL%+BMQ+;h{(pO&CF?3R8L`(V+U3$hjN_RR6C?)!J$_m}&3UD6NIQ9uRffOP<5WMlxx z^#Y`WfE@q^$;ruq!0QACgEz=4Lgd$>ym2E`5vB}>!<1n#gc@=SVzY)S47PR0R*mi3 zwY0PlTeQ*InrNh^mZnqyY=i(-z>J&r3Ry&vtU;pZ&sgKRWqR6;Yz(pCZnU)VpjIe zwNpt6?Z3`2sCpcP(B9@6_h!Lg62p-@u_Ifa=awKgy_D)!#an>!+G**$%4BoRxk#jqqprwr`HUQ z*jONOAF8DnuiExOjb5^f80uGqPfDmhpLgdcB@3det?3b(IWxmv8~^eYAFHaXin?== zClbZ(P?G|e{J61rv9OsVOLVK7JR0vZzON$ThYGdJV5j*3RJ9Y~9u!M{+YE<7<;Fp1 z<>8aX$_KR-uPEC`penfR@^~ChL{Qf!U@_>+`_REn=9%1u)X1m#lvFNi(2j~ZM~U7T z7;Q=}W9*iHoiIJZu9N~)4YMD9Qeec3e+Uo9i_u}rCvlX-6pl7JtP*)S{ku#2o%U6b z+xxz;t-;j2!@(FG{o&+Rq~hwi`l$b8`ESTM(DXFCM5{mPTFAYz(`v1di56H@ZFL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Ii#xn^xpc@}75#EPSV)l^7Ec*;Uwj zdWpLY$F!Ii<&Y3rK}1$agoL~9W`>)KzfA7YV7@rcS7XQ2Md#HUDBvpTw$XpAs%$!2 z=He@Su<2tcil=S%(Ws%fSi$ZN3XIl-pn9GO&%(ydw^vukF;ueW49S3?gN4A z{MchA?p*;JbL1=5>Ji^xJ0hp{DXqaFI<;zolIazMug%-p2DVunb=OK#g+sfboxVLH uf1?C@;YGG?xNvF=dEXcdrUlyA!T~@B>L>uNGO+}7*Z&h8ex(aH>A=6NUQ{0d diff --git a/doc/src/Eqs/fix_lb_fluid_fluidforce.tex b/doc/src/Eqs/fix_lb_fluid_fluidforce.tex deleted file mode 100755 index 8433c9264a..0000000000 --- a/doc/src/Eqs/fix_lb_fluid_fluidforce.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -{\bf F}_{j \alpha} = \gamma \left({\bf v}_n - {\bf u}_f \right) \zeta_{j\alpha} -$$ - - -\end{document} - - - - diff --git a/doc/src/Eqs/fix_lb_fluid_gammadefault.jpg b/doc/src/Eqs/fix_lb_fluid_gammadefault.jpg deleted file mode 100644 index cd10239c9b366fcd33c079aaa7e0ad1c4ea0e829..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4793 zcmcgwXHXMbw+&4xqJ*mS79oU$YeQ*Lq7XnqLnnZ6DGDJpA#_xfA`l266e&U=p$Gwt zp$j5Ks`MI~mw;D5ib(U)KJI<*&G-Jj`To3pX7-!H`E8P zu&@9SCkt>q1%LxM*x1?G**H!T2M5Qg(`PtOpTs#H9k!~rY-wiAjIlK+VlSavp6 z7S5AhJw5;n8#@aN8`mi|Hr~Gvu&}bR12|3r`DIQET;dcImesX#B8~{jUB2)8>Eqz=F$2K)H?%h3sD}bJLK6SegcI2ZHi}6%q9R7v+(dHZK8)2I zXl-unnWz364bp{_D@4kIcV5Ks74Z#PeBZUWbipHxPL?Z0W~KV0*P=+KJ4 z6V0>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I!Wn} zBy>x!M&GL9?}7I|lLIl+=^?&Mcik&2^$&OOQ2<79cl%`cRF9VsZ5i$1CRz>)p@E0C zQ!M^85u;n4g8$gzLBO6E!l@jPtOM}Wj-81(>1W4VBG8-U|0jx^av2m;iCn}*{UGLV zq!~l_G#A$$w0Qdy)DHkR2i+sK0PMj-fX7n1)b_Z2!>za0CbcwJ6q$T`s}6mdp$MCF z?J9enCE)mZ0^sTP(I2aaIZgx2tIwNje_p-{khx8%N=t%w2-299xwQc%lz8~Vxa0O4 zxv`bWMzhjR(j2_Nm)XQJq`sQf429#6<+JIDE19>@E9R;CB@Y=OwujS+wba0V@)?F! zr1IYA-J}#`lP}x&$OIF7u94GBK5_utGce_L_t(b#Z|cI&=n2xlWi0c>J7yF-9srKA z2=1CaQx(fn_AMktjnIxA%gW=cDo#7RvYI4ocTG;~O9vS1M4gSCH&?<-2P=74XY`=y z5y7_fMXlr$P{nQBYGOg1i(=eIzZ0jHJ0*)8z%jf*(9(CI2<2Ru=G z9_@S@DQCOXY_|MrkyvRjUl>2 z+YzWNQ+lVA`xomz1hRF)qd>?coF{Aa{iMozxct}DObuKfKx8oy8ycn(fO~oFu4>Sc z)}Coi758UCK}p4b>m?bSECiOP<5QBqhVubk1RRZ?49YS z{gQFXCy7%jnhTq~oOpM0X+Yh((tSk;DHLZmpph!d&KwI89kfIAlUggV8Fbg#6bwyz z908PeMHBh9xKc0Zt*q5gMVBfkwv*1netLtP<)%r`(phEH=+VcIkQAhdcD%(w5o}XM auTi#){XYQvl?&nk diff --git a/doc/src/Eqs/fix_lb_fluid_navierstokes.tex b/doc/src/Eqs/fix_lb_fluid_navierstokes.tex deleted file mode 100755 index 41ca4674e9..0000000000 --- a/doc/src/Eqs/fix_lb_fluid_navierstokes.tex +++ /dev/null @@ -1,16 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -\partial_t \rho + \partial_{\beta}\left(\rho u_{\beta}\right)= 0 -$$ -$$ -\partial_t\left(\rho u_{\alpha}\right) + \partial_{\beta}\left(\rho u_{\alpha} u_{\beta}\right) = \partial_{\beta}\sigma_{\alpha \beta} + F_{\alpha} + \partial_{\beta}\left(\eta_{\alpha \beta \gamma \nu}\partial_{\gamma} u_{\nu}\right) -$$ - -\end{document} - - - - diff --git a/doc/src/Eqs/fix_lb_fluid_properties.jpg b/doc/src/Eqs/fix_lb_fluid_properties.jpg deleted file mode 100644 index 3d70cd7667461b8f4f8c96c5d271ad2662e88bb5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3471 zcmaKuc{J4f8^^!XShF=`ow1HCS+YjRQe5&&wp-E+Zpjvvn6Wjo7L{S{SVy)jL#n}8 zLI@EidopGiCdN|sT`}_0{hfP$|J~Q;ocDRo`8?-&&Uwyr-k;9_?cfV=>_3*)mH-F@ z0xldL;9v|e2ROkT92{WIL*eA)Tr1w{oJMVO4N%s~sl#{=Mj77z#m9JB*400e*!TO2m|hr_ZQV4fqO!`t)6 z01(F!5cmj~6U+(ul>!2efH^oJT-?I)B3j24&hdz9JKPWph!%%C;?oq*n_s@-bQK+w znx5Y__-W|#Kg0T(ZVSe%PoNpS4 z>~p>9T3*$bje&fupOqznNl!01ZrPf*gyEDsW&(yPd(Q0DzY=@FSTxf7cmkCTj#^r# zQ+Ep9NL6Oef6ysN7J-AYfdU3u(82xl3A2qj>Gsgvi^(%NaztG8&;__ZidpWZ`@m(& z+>G7j(x`)X?dwk?MdHTW?Gh_!Fi$}(yK(5Bb-9R%Rig%LFj9usNzvjLmp^7_$Wy}Z zdh>S7kPt~nEva1|zdiiuQ9a8|Q1H12CYRm7B(WQH1(w=Mh%O{Xcf1uL{mf0W^ef%h z_Z4^jlX>$*a(k08u5<=S>D(xt`ne1RPa`T`>I~SEw5$`}vGP)G6Pnqm6JZ|@VKTDV z9S!^W$OGWCYHUMt1FWoT((6Ng5tp7dE2VkERNnBX%J1Q8+ofM5vm@_G1QbkyEMl5~`r-o$v`Hvy6sU3rzZ zYo6@6)>G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z9vLB;JXV8B*t?c9wRwzj$)IRs>O1SM2~WKHire42J5H2&~(c8Da}R@>vvh{64YU z>xV50{DD;{(aJMb8@M2?=wGAgZrRd7?uFMR-9T*zO#ruyMrtpH6~Q(Vocf0gb}PF1 zBMM#RLOk{x(&enC_!af*Fgb|=st5&@9vAD_mpU7z<%ZURl7wel57c>(3x?NZ$D2>g z4M`1*6dUhM^*q%`z5Zfd&2D^T-;!L_=5^9t&YFMl0$l-L6l3&kTlWWtv`-B0(cgA> zNf-lcFQd2sj|n+x4Y39lU1EMVF)6qi;C5xcq_JwE|2(LL#&gh+#J z-1x-}4l=-lu69b$JZ<0kCGic>t6R->?5X&p^fu zG;@i|v_-0?RC3(KW977!M|lU(NnYL67ZGb?b2kyQ1Sl+4*74At2&FG4;#eNh%L1t# z%PY3_Bf4+(A0S}*`Ey?%gvQI3c2qD!hB33@DZRcu>mcUY^+t+f(nw;)neQ^dfDGV5 zlaa@^1;UDbUsIWS|LI=32rIvpnB0UX_uYLal-?%sCVz_X5+hf6Q$US2eci*$r6F@@)7P+S5&4euWDt&;!bB;XBm%f+1yFG#&J8L zQTY9=a2M^9^X$)KmPsGCCSh*4WAAkYuvLKw&5ZD~!HRxOT;c}fiE>BGPMNsY%0iXS z*%ti$2~jwuc4bW8747_C^ttLN8X`F^`8^KcNy|wJCRodH-(sGm$%y;@FZGw6613=I z#=NB$Rl!UWu*G#h(G>!9`fkCNEhBj*y6Dno?{2OUn{UpjY>z6nS`WVqT4oCxLAZD< aPMXYX5pnj&dy|I(od188|2>L4p#K+iwsT4V diff --git a/doc/src/Eqs/fix_lb_fluid_properties.tex b/doc/src/Eqs/fix_lb_fluid_properties.tex deleted file mode 100755 index fe1290be12..0000000000 --- a/doc/src/Eqs/fix_lb_fluid_properties.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -\rho = \displaystyle\sum\limits_{i} f_i -$$ -$$ -\rho u_{\alpha} = \displaystyle\sum\limits_{i} f_i e_{i\alpha} -$$ - - -\end{document} - - - - diff --git a/doc/src/Eqs/fix_lb_fluid_stress.jpg b/doc/src/Eqs/fix_lb_fluid_stress.jpg deleted file mode 100644 index 8f730e9d70d773ed72f3e8814e22e776908edda0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2530 zcmbW3c{JOJ7RP^)SUQwOYfVslJBli!v6L#cM29!EwiWvl4N*zdlGfU>42?+brHW$O zu~rqeRTDvLPf4{D4O%2dtZ6NI=AU=Y`}4ieJ?H-Oz2|$s=l*s1ANaGtF{HJfH2?yE z0NcX?_@4kvKoAUpK)`~BO;Au!NLWln_z($E(Ia9|2}wz)1QdE)8ZLAEguE0KDyu9j zub`l$q;y(@Wpp$46H0Z|y)(RDjB;Na)VVVAqQcM=U_vZzHnisaFv zYCH4FSK~dv@uT+xqCS#`@`aVS*s_~F}?khHd!_!X2$*Y7NgFDH^!o` zn+hQVEiLsg4N&4-`@RMflB_u8v2%}YRlVbp*)B@%wRV}C8>+XZ#|v#0#NO1T$V7ls5m7ohH3V-Z%B+m}6X(0;d64M1s+J$w-*B?52Fpc?7cboS z+~?+RWpyp(=L}pOs^N~!X_-jDls9+Rk;6a_mhts0b%L?4L6=i~ZDw3VT^Cqj<-e8b z3KsvBO!vd+E0DUKOJl9yjP!>UcxlU}Nu086s)P(C)%dR+x z5htBZcdrbiwNn+?GP(Doc_<@xK?NyibJuC=T<`T$?_NU2q?5N+`q0bbx7(8wU361% z>DMxUE4WX^X$EnR`7S)vQX|{IFz$rv&~O=h`7dyopLgC-y_8rR*EAE$IU*cByGXV~ zmEDPzxGz<>Us=Kn7~lg#fAN7%&$%9_kbzs9%>4Qk@O$`U}9FYs&J4$Q7Ad3-eVcsQf#tn!2J- zN+T!)_XxL!*OkiM#s@zY4>W95y-V|-n@T^&Iv(ju zLZ0$dbZoBJ_A^m3gVmX!!nzv1jl9`?}q21*+S>gsV2-vb=_-`4W7GU&*EluMSl@bb_VerBF9B7f8{^|lUu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= zhOblig(8;Atj@tMTvo+ev3cm@F}bjvn^obs6R|*PX>$^2^=^%%FB=GQYvg#bzN4u< z2X4Dz6LeaV)$G3k#c`TstGrjJzEM`FBs@qN$wYgXPe3ae1ik`d{Npoq42Ky?VpKpJ YM16@nD2&oS`O5$1t^S|KSpH7`8;@LJDgXcg diff --git a/doc/src/Eqs/fix_mvv_dpd.tex b/doc/src/Eqs/fix_mvv_dpd.tex deleted file mode 100644 index 685d527763..0000000000 --- a/doc/src/Eqs/fix_mvv_dpd.tex +++ /dev/null @@ -1,21 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - v(t+\frac{\Delta t}{2}) = v(t) + \frac{\Delta t}{2}\cdot a(t), -$$ - -$$ - r(t+\Delta t) = r(t) + \Delta t\cdot v(t+\frac{\Delta t}{2}), -$$ - -$$ - a(t+\Delta t) = \frac{1}{m}\cdot F\left[ r(t+\Delta t), v(t) +\lambda \cdot \Delta t\cdot a(t)\right], -$$ - -$$ - v(t+\Delta t) = v(t+\frac{\Delta t}{2}) + \frac{\Delta t}{2}\cdot a(t+\Delta t) -$$ - -\end{document} diff --git a/doc/src/Eqs/fix_nh1.jpg b/doc/src/Eqs/fix_nh1.jpg deleted file mode 100644 index af07ea3a4b3a197d6b415937d1325a7c2a5a4a00..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68243 zcmbTd2Ut_V);79B=v8_r^j?%IH6YSNjG%M{Y0`v%bcIBbj)0(ofP&H#Y0`Ud3M$ei z2qd6_(h^bFnh@^xoco<~{_j5jz5o4&%+8zHGkedPvgTcDhNF*1c;MI>b1QQI27>{X z&>wKL%IaigYU+O84rOk2)(pA<0IZg0{e#go#{eKGIQ+Vu#VK(oXBTmX_W%vR1keK~ z0Kmg5EX3x5`9%NIK4uyhXVlYJd|6* z+b7Hm!U+(*78M@yH=PJ!9?!tPn1=Q*z7ACo!UBJ>??18fKl1z&8~?@LLBZZop1*Yt z@ecC-i-#bb5*gtGVfa}HCq?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Zs;4Q^+ZRI!Bty@q!KYv)#VQOUO~$L0qEG`f$lvZu|q4^w7h>NgJ{1FXgv za(CQHymT$e2Dx@-EHIQoiJX9Pa(!(Q zCYnSISV~HM?G~iiqEf9Em}g^pv@z*HyrQZ9xb;r*A=zNx9?w&z*%-@4X6(pL`?irAoYQIQKLR)FLJ{VD#C$ z3E5(W;O@N>OVAia(=OYYlG7fPJYyG$v}i9Wx^?*@^NLPmci;EuFVgWmk*qKG_Akr0 z1GcNs_!eJ)S=*=@uIk9UcN1!gG3I%?CI&<7IQH~Q!%@#%rIVvxpZav#l;cNJJjPFL zuC6y{Q~T;{-=#e5^$sjA zWNGkCkgp_$U5ThwHx+NA-W->pumZ{_nH+ M|Lj@p`)Brl01@tV+W-In diff --git a/doc/src/Eqs/fix_nh1.tex b/doc/src/Eqs/fix_nh1.tex deleted file mode 100644 index 3e780f2772..0000000000 --- a/doc/src/Eqs/fix_nh1.tex +++ /dev/null @@ -1,36 +0,0 @@ -\documentclass[24pt]{article} - -\pagestyle{empty} -\Huge - -\begin{document} - -\mathchardef\mhyphen="2D - -% The imaginary unit -\providecommand*{\iu}% - {\ensuremath{{\rm i}}} - - -\begin{eqnarray*} -\exp \left(\iu{} L \Delta t \right) &=&Ê -\exp \left(\iu{} L_{\rm T\mhyphen baro} \frac{\Delta t}{2} \right) -\exp \left(\iu{} L_{\rm T\mhyphen part} \frac{\Delta t}{2} \right) -\exp \left(\iu{} L_{\epsilon , 2} \frac{\Delta t}{2} \right) -\exp \left(\iu{} L_{2}^{(2)} \frac{\Delta t}{2} \right) \\ -&&\times \left[ -\exp \left(\iu{} L_{2}^{(1)} \frac{\Delta t}{2n} \right) -\exp \left(\iu{} L_{\epsilon , 1} \frac{\Delta t}{2n} \right) -\exp \left(\iu{} L_1 \frac{\Delta t}{n} \right) -\exp \left(\iu{} L_{\epsilon , 1} \frac{\Delta t}{2n} \right) -\exp \left(\iu{} L_{2}^{(1)} \frac{\Delta t}{2n} \right) -\right]^n \\ -&&\times -\exp \left(\iu{} L_{2}^{(2)} \frac{\Delta t}{2} \right) -\exp \left(\iu{} L_{\epsilon , 2} \frac{\Delta t}{2} \right) -\exp \left(\iu{} L_{\rm T\mhyphen part} \frac{\Delta t}{2} \right) -\exp \left(\iu{} L_{\rm T\mhyphen baro} \frac{\Delta t}{2} \right) \\ -&&+ \mathcal{O} \left(\Delta t^3 \right) -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/fix_nphug.jpg b/doc/src/Eqs/fix_nphug.jpg deleted file mode 100644 index a3a67e7b7bebc1e987f0cc415288967337770f2e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7506 zcmeHscTf||w{{Q&d?6qpAcSftD($7008v4zfWj-%mEL;^RhlBwi-2?~g3?2W06_`O z(2)>H=mDf8NDD~I^?vhx^WERQ|K9uGeRgJN&+N`QGiT44-SZp@ma+u6uBWA|1)!p$ z0_gl1016JE0k}#{LqkJ-_0M$m>Q!1gMtZtGU}j*r#>m3V%F4pb!otSE!^w7oo1KN_ zrr=F(US58Fem2fqLbv#Yc=-7FD7^p%dVuE@C>0e8fPw<>0H^@ee@y%_^8fHhEe-V* zD*8XWTGs(oG*r}AuFzA{(9&J|bA}3Vg_`CnEek81Ae;0J_FMO#m}bw=+xp5pFplN` z+xewuamqf6$t;-?5*Cs7FYTZFzD$_|(Eq!7DBu#U`QM9&?8W28eY#rLaB}3`F@evf zv~TofyYTmf0GKwIGAasilEzqd>%U^@JC}kjoI}R%dxzKEC3T&x{uLdrcEZy9F^mNf z4{DDJqS;|KUD%DQ8Ic`7CMM(L+ex=`8;O=WfM!ZppTv1Dgj? zG2I*qQ zu~JJd-~JM357%!lX&>F}gf2y!1>=6|#9S^>pWf9oE3IBcD}k+H(N=%>h`ZmWBJ!TQ zt9aH(KAbcxz0*W(FaN5DUq=7fi?l-ps{7f3e;Q~gYv`sbe9k@sPjCO>oN?zxBUv%C zj5(Rmat;$vlH={pFmm*@@f)Wx*5GN<2CYZZ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o zvuyOt|5HDjb-gLbZDbUrNERmU87tbcL!7d1B5QYZkW;zthlJL!t}~s^?K7sv5Ra@{ z+jq5ZqCW!!miv`_>Y$k%%Tkpnpn7&vjkZaYkLVqkyh4@C5FBUYR|#vDXU;aF>-$V% zrRJKwPf$ORt+7Q57OZPI*5_oEoIHKKwSE{BUQ6)b?!$HN4ROR5bQb@@Iy_K)+=&OR zY6f%WGUbFwX9RhxwQ8+~&a(wRc=$CX0xA!Qpvz=Pq%sV?uYG#V} zgl{mzln|wiFgD#8?LY#-%L_<*e>Db!L3|R|k*MN3 l)IEmWXwj+f8uS{bnm#3~_>$`@EuH@Rt^Pmy-un0Ce*n+&JX!z% diff --git a/doc/src/Eqs/fix_orient_fcc.tex b/doc/src/Eqs/fix_orient_fcc.tex deleted file mode 100644 index 5596848eb5..0000000000 --- a/doc/src/Eqs/fix_orient_fcc.tex +++ /dev/null @@ -1,30 +0,0 @@ -\newcommand{\br}{\mathbf{r}} - -\documentclass[12pt]{article} - -\begin{document} - -\begin{equation} - \xi_{i} = \sum_{j=1}^{12} \left| \br_{j} - \br_{j}^{\rm I} \right| -\end{equation} - -\begin{equation} - \xi_{\rm IJ} = \sum_{j=1}^{12} \left| \br_{j}^{\rm J} - \br_{j}^{\rm I} \right| -\end{equation} - -\begin{eqnarray} - \xi_{\rm low} &=& {\rm cutlo} \, \xi_{\rm IJ} \\ - \xi_{\rm high} &=& {\rm cuthi} \, \xi_{\rm IJ} -\end{eqnarray} - -\begin{eqnarray} - \omega_{i} &=& \frac{\pi}{2} - \frac{\xi_{i} - \xi_{\rm low}}{\xi_{\rm high} - \xi_{\rm low}} \\ - \mbox{\hspace*{72pt}} \nonumber \\ - u_{i} &=& 0 \mbox{\hspace{84pt} for } \xi_{i} < \xi_{\rm low} \nonumber \\ - &=& {\rm dE}\,\frac{1 - \cos(2 \omega_{i})}{2} - \mbox{\hspace{10pt} for } \xi_{\rm low} < \xi_{i} < \xi_{\rm high} \\ - &=& {\rm dE} \mbox{\hspace{80pt} for } \xi_{\rm high} < \xi_{i} - \nonumber -\end{eqnarray} -\end{document} diff --git a/doc/src/Eqs/fix_pimd.jpg b/doc/src/Eqs/fix_pimd.jpg deleted file mode 100644 index b6e8f5831b56a76003f81b74529d14e87405f8e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14569 zcmch-2T)Ycw=OzJ(jQ4c;s8TZRFdSJM3Nw=C}Bv-kOvutG{6u9l*|kR0+J<(NS2(D zG~}Ea7;?@zb2;aochCQxdtTM8x>axOs$FZR?%mz1*Xr-8((ak=-MwrlO&trlO{%rDtKFeZWjdP0h%` z$jr(L0)c25IJr65xLMdhY&VSnvb%sYf>r_oYQRkkfCWGRAiS;Owvzu>Zi^)%yhCvJ z_NnfD00Ge*0>V3Yh>7prqar4_eftg}5ivChDGdj$5U0}J2Xt>f(sK#J{TM`^>zTV^ zVn?{eCEmuQr5Bg#zI(6l;LxzBq%tHr<7N_Y_uuML09<#y_&*Ud;W~`! znkCYp?aqo6R_O;a%4aFTrRHJxnN5qcUu-^zr86;F1}F+jvUHlAR22pc@Y!OPrnuV` zcY#ws(>ecpDL6>64wx%j)r@z=Dsb8BW}7B!@b$=M6(FFHa0U=LoCgdlee9q%qAi7e zwj!9E(JpjYGv24?^`d7gMG>mFH38?QfZFYV-^kfyL%Ba-{O0~VE9)7b36@v7WJu@a z!>>uDMn@d-#LN`zPw5VdLXT5}J3cniA767d_?FnMwZN(Ou6cqRo4}B^0sll9?=qH8 zAI1)!s2Hyp_t7>(2a4l@*iQ?MP?!28-~3G(87FJ1SZY6IXi| zN^burWD2O90$#3oAu4H~>m^9@qJz-5e>upu`2}oIt-UbQl!?^X@`>5=yF8`9vtKLU zTd<(YTCvuQJ&LDXe%6~#+Okf1t18c15ZeQ>ck`IOgTTXO9ndaDb$D>)rwsf{59>o2>S3{AS)aGIlz{H2CIg+HfU#q~E z>)XhZc!`m?eu-qYt;kWaEi(A5F3y$0#S(FFV7t%oy!rZ@t_)B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jZnPrkjH%n=^6}R1jx~z9h|BbM!w?IjeX<^EiP}?v^yzK=R=T(?>#>K?N$`WzQ z4Jaqf-EsqTXXNl^TFy{$ERdPGP4qUR0SNZV)~KoVtK-_^TdI-mQX*Z5aIB7{-%Kyk zKofXjl6LW)>xZ$?x4oHAc#<)bm!+Xa`joEcIJS%TVN!hNHllzqiIoF5T1!Q2BB@5v z3Rknpe;+l1`w50acrfL=XIt$gi8w_HC>Z}W&xXS0nC;>Zr=a8qe}>M}G?awa^_eD^ z09gve?bNR20~OfimsZ1iYwzoQQ8s0q3#U=$vVp4h_W7Mgy;n~1^}QrK>%?DBeEpB) zbK?n3E0jF+RUvbO_!H2ao*Iv>6P;NP28)#F&0>%sZm5oAJ3a6aVLwuc+;BLO)p(3dQTpbu&P`qC-alB^WAwy2*{ElJ+Ef?qSBZUB!kYoP zXtqW+CydcYvfjU`jC9q9|0I`wmtp1xF{=5A0wwsOD&Vb9vzLi%o zqYkO$I`3yZ5FK<=X9M{D?jMaB^_S6*_c|M_noqAHk!OVU=^^ZQj@Xl13mn4OQ79~ zAh5r_^~nZSHU`h<0I@_LW^mg`!j|PmAYXP9#wi(;!>7xgo(+aRPUnZFeXxfIQb^P$ zCo@RKu~zjeIMSp>je|~ZQOYgwyc~wTanJA7#iljsc8+27EECF&*Pc`(qD|dbK9CMO z__-*uZbs@9@8^vGKbDP8y=~>2^@4>8w?&_dR<-zQnEnduEVJRgM?@`_l81^pzotc3 R@s9l8?JN8*U;Exn{15txq2B-i diff --git a/doc/src/Eqs/fix_pimd.tex b/doc/src/Eqs/fix_pimd.tex deleted file mode 100644 index 983fead8e4..0000000000 --- a/doc/src/Eqs/fix_pimd.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - Z = \int d{\bf q} d{\bf p} \cdot \textrm{exp} [ -\beta H_{eff} ] -$$ - -$$ - H_{eff} = \bigg(\sum_{i=1}^P \frac{p_i^2}{2m_i}\bigg) + V_{eff} -$$ - -$$ - V_{eff} = \sum_{i=1}^P \bigg[ \frac{mP}{2\beta^2 \hbar^2} (q_i - q_{i+1})^2 + \frac{1}{P} V(q_i)\bigg] -$$ - -\end{document} diff --git a/doc/src/Eqs/fix_rattle_constraints.jpg b/doc/src/Eqs/fix_rattle_constraints.jpg deleted file mode 100644 index 2ba86095cd3c3682160dedebb745413be563243b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4556 zcmcgwXHb({w|*(1qajr3B?zG@ND-tXEl3MZ3FT0wL!?Mmy7UqgiUkl7RFD=RAWb}U z5Je0mfZ{O}(a=St%H`a9&%gWQ&V1i|YtO9Nd-k5S_F8LZKhN4Hl#{;zFx3~>nsGqb(V{Zn@^aZn@5nBi%UR4 zKu|vMi4U{13k;> zt}Ym$V_>AGqi0}bW&(juPy9UvKulZ^31)6(9!UcgTMrZquaqGosgMtP$=>l6zXo>l zLlhcQ)N(Qlu>5US5BNQXhrtn;|DT##a=NKNG+pPsy7yFwF`Y!1Ri%?d6ju#MNL+m^ z793X~7bv>TPrDKQz^&;Oldc`>t%`&Cc!@Z2Z6Bpr6v2=HgC%~+Wd=f%gu#IY=sHm%UO&?OnS-#?`m zKqDroMPyua^{6K=RZc2Xh3{LiT$?eF$mZykJMg7Gn((+)mhySBLqDfNq~GTtsX z*(l&fupoeiS-htf6jWN}6T63b)$(K5f4=Clym0+m9K|&9w^rT3rv)N>a zglW$ehGO@-625%dKIztfE=Ey)l%o3rtOwf0#o7!V+01G6`p2K94|FESz#3ZUGq`94@ zK71rbXF+C!5XAP5YfRzL(4%WhzqOAv`3?uBo~Z<{8_(4r{Z*UY)#GL^A&y%4)x3tRUY)lY(QCVW$K(8*m{>W8 zYwdQlW#ad4$Gx5cvWlU}u(@LfWz8KPn9c+Boqmz7Hf}4>h8*v1&%7Bgq(r24t8ELj zb)TQ8OABV5pjy%VAI^DyY8tBOW4!=d=A*|x!D*+JodD1WA8X^SA#~)cxui0QY}cSt zU89)dn6!)T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P|a7>Lybq~W*RDW{yyFSxU7NT>(0P;y7ZeP+Js7F;PIb8 z#YkShox{afr;!|P8_rbfc0!lsl0j@PfbXkJhk2DU!$3a|s90kUH&DJMm?y%9&HjmR zZMPE{C8Sb!cMA#y2|i6Q9SIeMR3s8E4Q-}x(P?_+ytxw|RW zTok@wSImN2$4ia=_8HQBY~+9h8Yh+mh>>g(qrl->BY7m4t^_+_(jJxU(NyNFvOh%= zhU2UZV(?w?-Gw9=&f9}H(H`m>l*$|`DeizFKLpWfeuymSxcqfU`#qUDN3tc_ z3p4f|Lt^aEq4712ASs$Mq#C%!V~{8*#(*)ooFqp`)B({<@gWT&A7BKaBe!UDIjteh zvIXhhlHnl#=y*#(s`q-K!$J}jT2qFWIQuh^_;^vZ0R#>lva7Z*$kF``?$P6Q$p z*y=E!p_V;?f+YCOx@1c7Y*7jK1o>M~fL%!#00X6wLQRd%f;|joz(~4vlnHIHPX2FA z!$v$hj}{aP*yfQb^Ans)!nd$si@euII(w{fZoB-5i2t#EN&@^H)Ej_BQV%^PC~z5B z_i3W=3s?w4L4C-zOPqLFvM7AuKWKKf>9Fa+%?^tY(P4464u{XZMZNGq0L6bWcweqc Q$`BQ5uJjzddRqQ}0B&iL?f?J) diff --git a/doc/src/Eqs/fix_rhok.tex b/doc/src/Eqs/fix_rhok.tex deleted file mode 100644 index a468dfedc9..0000000000 --- a/doc/src/Eqs/fix_rhok.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} - U &=& \frac{1}{2} K (|\rho_{\vec{k}}| - a)^2 \\ - \rho_{\vec{k}} &=& \sum_j^N \exp(-i\vec{k} \cdot \vec{r}_j )/\sqrt{N} \\ - \vec{k} &=& (2\pi n_x /L_x , 2\pi n_y /L_y , 2\pi n_z/L_z ) -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/fix_rx.jpg b/doc/src/Eqs/fix_rx.jpg deleted file mode 100644 index d63b983230c0c26a7bf9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v=79={Do`3pZCb<{l6LVd?xM)b$H8Z(!R?(?0kNG zZzpc4aWf}RYo1uqJs9-Te21pxKy(OEDR>nzdzr_YZZ>1*ihGCN@{dM1-hGfDbs-@e zG~Q(I9a9T$aBkl9Tz>opS#Y@|hDquX7^|d~vT$_GO}|XtXKR6iE=uBp2lBKZ4MWeU zg<=V4pT1cK8JCPN9jA6TGO}9Ea*)l{(l^3lQPVYN7!#q7e0E%wI=57<5*e|LELr3# z#0cd3Vv3l~Q_SQEdKa9#{o=X%!$R!YKVNU~^jozwkgQsp#@#U(K%4Igc;xr4QRmDT zBjf_CApGeHvMpPQ4VWA_HeWOkwBL#N>%5`G-GMs6U51#Lg@8)jM`hKON{5ev)2Z+o zTM!o(iRNxDw9I1)sM2I-amuDigJnlKWugd-V@Z92+p%B2y)pLNf#2^BY7$v0`NumM zspr5INj~Se>H|4LZF+^hZpovRUZ%Q2SA?z)s!PZqLq_%TWg@nT#hL!)UD8}Art}bnnPq{%~_hps=cn8ntAJu&;{&bl<gLkyem zj9d)+)8AeGDTksZRNgY`^N{NYT2#Wf;<7lRO$I--f+B_vEFVi$VxsAZS1)y*2{4j1 zW(BQLs(*$>>6$p#{m43!3jyV zXT$K*Zy!7Zi+darnzS6~yvWJ=mfN4EbJ}o|akPhqtTC~s>Q&8W+oXnNofo76O;jX) z2(;<%>a^bk^WD?(6PHNg{Ex>X>g%us1-#~zSSove>Eu+V9MkHqhTjZ#yFs=eu~%#k zv2~K4H+!~KGG)_ssd4Ho=EpcD?GhS7z9A$c?;mQUZJ+CLD!Rh*CI4>aP4TtkV7!Ig z#BB!~scwEZ2e&&qT(Q{ARgca*Zb$3dg=i^J{nJo>ewcnwqWsOf)wS diff --git a/doc/src/Eqs/fix_rx.tex b/doc/src/Eqs/fix_rx.tex deleted file mode 100644 index 9400656038..0000000000 --- a/doc/src/Eqs/fix_rx.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - k = AT^{n}e^{\frac{-E_{a}}{k_{B}T}} -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/fix_rx_localTemp.jpg b/doc/src/Eqs/fix_rx_localTemp.jpg deleted file mode 100644 index 2b5147b93042028546e9fd67a3aec8e276d74ad7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16562 zcmeHs2UJwew&o#ckeq|i1j#uE$r&U|5`iY?oM{1x0t)_sfQaM_A~~yM5RlkNP9hna z*phnM|Hk>>y=(4$^VY04>sh^a_da!YSJnP%*EwJ9Ld+sofIAv0>M8&V3JUNT`2i5C z#1zVbPWAwxtqpJj0Dujkqeua$NR1kKp%Lo@pd)n@qz-B@(YMc@(WAyi!liZNdDACfPYj609t@G;0@RT?tm{440r%O05`w{ zXdr9dkhMNY{Q*)q07XC@Fa~}S6~rnYm!q$*rz9VryAQ85*u%z-*Ve<0FVNbPPk@)7 z50I7%^t85hvGZlJv2$>8mtj9_>tbhe0?V+Qh-mX`dn(#FI;jPF+ZhDw7}^HA*h+xe zuak#6)6WL2 zZ9M#ZWtjc^oWPRy*7hPcV6X^}jkOS%M?e5<&0`G~65s&~34z5#1jGgH1#FoA+&$R# zuf2QvdAt7JH`tcX&ehHh$?|-VXbA8z^ZjYi|5be=A^K~l{}6tpk4PIyMQ=N6UppnF z$o`yo9)4jSelf$p1Ou-qzlb#7AMB+0euD9L1O2ZZ`M-pgtTfnG()Q=rJ-q+ay@8$A z|J`i6I?4Vs+WjYwkp_QKkX<3;5C;cGn(yyN@gHINy#^VE$p8H{Xp#S9`hQS#z{v-$N6s;#0P*F8%RW{LqlN(P>E5{h*1zd03-4M69akV z`SaBC&jke)4IKj$3mXR)4{6YF2S7zZLqkPJ!@xjCo_C^zA@2j|#26%Z1>`YF^{la& zy~qS3Qu44_6ly<`>yICSglxPcad0Upsi?fsH&-J7#JEE zn>;i%vjyAPJ2*Ny`}q3#2LuKMM?H;>iH(a-NPYQRT6)H-%&h!^!lL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ojC)?6JR0U9OMdl zF%0EQo+;180FV}|#wd5=gToDUP~^9Rej?9O&d-`P^cK}mSYrHn-fEu`*C(X6{fYpDV)vuQ7lk8rg4s z7Sy_{1L4HhO8(Pw>6g1046uE4S7$G;bDc3 z>f3n}gbmIm7C} zI)de(iDWc|%d~K3gFkSDru)1)%1^4r{+uW(kd%0AgD&f}W8Q|LQEHx0r=$IKb&=R% zeMOZrUZg>y=eSXJ^x<10M%}JsW=F8>e8}V#dGb>(+4vfARQU{=7M}fqV|S({dkt+a z-1?Vn=5GbHf3ei`k9$ileC}23F-3UgI}AN7<j@(PtC;mq%(=STPIj#W!UZWVb)pQKP$!743bTxt~0%lDF$AQQJ z)z7MFEG=2%%G)am359I8hvVE8=%#Pfw+=LMW9!J`LoY(#?NX|U{x#J_5w1z5SySJ{C z5G|9*v7APQLl}};T}GY14J$)c&TCBKmKCEL*WJYlDM2zAVC!^~6kDz+rqjbFNId3w z8pfef5av$pCc}xg@KG~Xi;DO>WlhB(*TO7Ku9ZvWsK;^@yNFO&{)Sz@i}U;0H4xkN zRBy=CQ}%3KBR#EZxx-&;Z5?|q;jDX#3GXgXe>xr4uYcDZ11+^RZ}{TF7EM+Z2}Xpgt9)q`_nSkCq5oXNlVR}zSVD*-HuUD^CX-YidSgRD;icVY)LE>bYZ&?6tO!bU@{jiJ zG?uFYl>N6(Ub=8)EN3M5KnS$!M!G!mj|~lPR3cPj3wZGTXpq|a*o10g28D2l!y(|7 zj(G016zk=Aw&e#q7cS6XLUP`TE&N!(^F;H!LN`QHi3O*v_v@*)0)OhYx<4wK|EO&K PJpWeV{a@f9i<$ZlMh8*8 diff --git a/doc/src/Eqs/fix_rx_localTemp2.tex b/doc/src/Eqs/fix_rx_localTemp2.tex deleted file mode 100644 index 0b524adc00..0000000000 --- a/doc/src/Eqs/fix_rx_localTemp2.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - \omega_{Lucy}\left(r_{ij}\right) = \left( 1 + \frac{3r_{ij}}{r_c} \right) \left( 1 - \frac{r_{ij}}{r_c} \right)^3 -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/fix_rx_reaction.jpg b/doc/src/Eqs/fix_rx_reaction.jpg deleted file mode 100644 index e656cd8362ec846c0c1ebfc76f4bbe26934d4c32..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2896 zcmbu3_dC^(`^R4g2bpD^q^u%)ABC*Qst}GnLdedplTqIGPRFcsP$VlIIrh$0$vik# zah%R^?0t;$sh_@o!1wvQuKT*4*W z5O9v`0w)g#H-zb;W!@BZ24MWxp$V+t)!3!C`S=GXb1(PdUi}GB-r#G&Tg=L;A$Y?9 zJf~bW_1;*bP)jvUNjNqd#_|r~#(ttvZX$hn*simNT+#pRq1GfVttjS-$6U^HK&0(|ih3Dzm1S5MYH+*sMyVnO|vYKsW;dH!JdGBZ4uIUFN8-`9v5H!o5_#izg zNjBHE3e4(9RW5D5E-Yz!c0f*yt;lnfrV}gRy+2}~7+YIOQGuhSF44YQz4nq_Mp9`! z)%}#OZJ;=^NYmk4AdW;vwAANc3v+E;o!Z#2NoYUBlGTT-2>oY!R-~M*rr##3egdCQ z;|?4g()yfy?Y5b=*WX6@?%Y6zx|c^Y)OzPy>X#~*I#q`jGU+d5KxR@b7%X1VbbB*a z>S7Y~ux+MUQ=S1Vp$YZ{c~XW-9PL06cF;DBjENh?M0V@wy;9IK5bqR8bS)ITW7m^3 zw|B_4Hba~K&kv2x!Z{CqEJ4SF2BujoZ@ zhoWS76ewICS=eVl6SOlII}|YU^*JwwIQ&+3bGo6v#>T&;_G~fQN?wF4x`|>902zVo zJbgUBkXn1JomE&@W6~$Z*C5%({5nebxBtWX`~c*Oc$hPJGDm7Al^pWkarr3x`q`aq zS1Rzp?e}Igk6D8F@LYMM0Lp@|=_~I6?BOyM$m~RMbMZFV*CssptnjM`%^EElPh`q+ zl@UuYhpCo7m5R~sH!H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BHv7b4&-?JL?ju9iC?5W zJq(f@C-TT*6w>Xv8NK#~6fNjAiDJ_Q6A+X#6}WNqWN>B2u_l>6xpnPFmjg)5HmCl za)*4qD+*=GI}}^;0MF)l0fh@n-9z=*nrVqR`*cQ|O+aqrKMMMt3~3-*36*@4s@bX}rq zU2@LSr*!znkjgMdUHbjwyWwz%dP&Q5A&=(J#6*I%-g$~zsn47lel~UP>W9gf&pH8- z-S2$bqK^vv6yJ# zo|9^e;cpH;fp~>?L^f8+OAxlgivwqpwxHe4Z_#X4X6^1VVYHV74Lg2$Hia9IlqRX;Qo#=dZkudRWug2(331_;Q&=|Ek)#pwnKPq+iEA;G5*Cp@=};weksaUi0um zwvlx;3)T%~(6EYnqsjht$F!{tWB@>6rY=0NNnKVaJ3A*n12OO>$n&<+O*!Y@PU|PH zX!I?swI0uKuZ|WOwLrZ(xi07ns6~CCd&#z;a28k6fEV6ao zi9Zt^tk2(K6w3Id T8ENgxOTYc#^?xgdsnh=hi)57M diff --git a/doc/src/Eqs/fix_rx_reaction.tex b/doc/src/Eqs/fix_rx_reaction.tex deleted file mode 100644 index e9515f1326..0000000000 --- a/doc/src/Eqs/fix_rx_reaction.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - \nu_{A}A + \nu_{B}B \rightarrow \nu_{C}C -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/fix_rx_reactionRate.jpg b/doc/src/Eqs/fix_rx_reactionRate.jpg deleted file mode 100644 index cf79c36089111d89b90c3e9688a6f2decb345209..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2939 zcmbu3^;Z)N8-_P>gp+3ACN)r`1ZhThmq^`?=0}ZhqYS1kh-yX{rH$Kp-IG?*MLa0Ofzu|HaK$02K(p z2q*ypX#qDq04M-JL<|HF1O5kyjGTgmn3VEwD@X$Xk`NIANr1#8ME~B95|faT6M=w? z3;+sxCT3bX2p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uDQTjW<=M_F7as27g^J}$!@U`^KQiRLs;j^TaKSqq#!X7#SIqs?sn zwvNkZ&R^EtxepqXjE2#BrD$xrJ!0uRNuUS$nEXD@cT*^u1Q^K{3-@W8 z-4TzqS!OsibhPLy$JpByy3MCj#yluO5u*$2jJY}0;d58<{Wb39K3<076Fjswd}G+f zlQWXO)$xwUTk;7q{tfbLu)RFO4PaO%tU=@kaQyy};F}No&3lCP3uOB6HSPl8j=w$g zG$;%CDwbx7vV80P#>VdA4%} ze=f^@cf)wE*CO0|d@E?L@1#9rtXW>Z{7-0JGwTh2V=G9WI>Gt}eu*t_w*5fvIal|K zgG-jC7t|Mrjk>1uviizrJS`FWf0c&K&}CMZe+7U0SwFeILha!-8&@~#Fc@N%TQ9aa zM?m_!z!>p)R0n9xPHW4q>{!ZD$o0l}mGpH&sdB~EOZnO1-GRVs(<>(=Ilf_deEVkZ Ezr?<9zW@LL diff --git a/doc/src/Eqs/fix_rx_reactionRate.tex b/doc/src/Eqs/fix_rx_reactionRate.tex deleted file mode 100644 index 4974ece1cb..0000000000 --- a/doc/src/Eqs/fix_rx_reactionRate.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} -\pagestyle{empty} -\begin{document} - -\begin{eqnarray*} - r = k(T)[A]^{\nu_{A}}[B]^{\nu_{B}} -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/fix_spring_rg.jpg b/doc/src/Eqs/fix_spring_rg.jpg deleted file mode 100644 index 313844f5557f18d84727692f9a2bb85428526b0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16204 zcmd6OWmH>Tw{9o}+7~OOxCDxo;_gHt+0jS-7 z0C)2MMF1Y|!-o%X@$SFy@bK^nh#nE#gOrf)F%cQ*)2C#lWMt%&^i<@}Xer3ZsF|s0 z85n>-AUV}@*5{0@^o&5pyEXvfBb;YA7#tijz+ESR9)JVDz3<|_lmEp1V;|z;Ja}~f zukI57&cg>dxDW1o#K*_OC%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+EcB?}yM(V5viOy;@tC;yR)qYuzy^TmjTRe!t6~P)n^|6^# ztgvxZo9FDn4OcBz#e!kuj)nRTFO?EjFUbM{2e)d-`nP5M(dSUxeQkwkn*jzgzrBlr zv>-e0MOAb5EjP3PtM?2`F_~cg_HoHzC%22j^3E8KcQ(+!y3j!bjd91>Tx+Ru!m7{L zdr$gGB=$^qn{Y<%<8+&dTB5N`||q3F|pgixPs*q2uE6FSLlP`2KaG7#9b>%T}RlJ z>~N7?q`_j!=27??`PbyVP|QTAgV^=`Z|giz)EhZ2&Vl%0F(-vc?+FIs7!BfQ(%=Qe z@cVx}ov5l7Z?SA^vIiK~1UNGx;WGE_IrgQMd!AL$oWYnO3sQRl`oKz3{GYq?6J0^l zRI~39MIFvIp2FN=GXAm7>E&R+DhS}Fl@FY5sLZrNJUnEIo5V8-Cl@C_>W;;K9lE%5l$? zSQ2CTqltsWpKtuy?MtO%l!={Xu7L2x;r|@}U!mmaOqx?q$wos@#FOJg1x*QqWd<>* z67!CG0W!YS@EP|dm^C1m%Il^=`;BKi@LjnlweNfFAdcu{%oAss8sumiFK-8#4!>8! zgftl2z+U$Xy~o#Lc{d!zaBw4Bsles`@7(_16&%jT F{s$4=LgxSg diff --git a/doc/src/Eqs/fix_ttm.tex b/doc/src/Eqs/fix_ttm.tex deleted file mode 100644 index d5a3238f82..0000000000 --- a/doc/src/Eqs/fix_ttm.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - C_e \rho_e \frac{\partial T_e}{\partial t} = - \bigtriangledown (\kappa_e \bigtriangledown T_e) - - g_p (T_e - T_a) + g_s T_a' -$$ - -\end{document} - - - - diff --git a/doc/src/Eqs/fix_ttm_blast.jpg b/doc/src/Eqs/fix_ttm_blast.jpg deleted file mode 100644 index d4ffe05f129715572923fcd32c547b64aee902f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4449 zcmbtYXHXN`)=hu_0g;aMB0)L|Vn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f59B?Xr z&W06%Nw{Gn7#P6f^PLe)G)}w@;}_eIqmmFaBV68tr=|kcEOcCPGv4Y}M0{VMc`B3a zcx>Pzub&%n$fd+Prk3WuJC44R)_fJ6hSctYhpD}DL+9|PjM67hy+<#~vhYM6xq;MK z*v4M!;hXH#I@fYD6YlWxI=ak>Qx(>vaH2EYFUziChph{A2Y&DaYa^Wi{*E{74h8tm zT51Rl+I<&y@$~K^kx}c3uibVvooE+i#mCP!L+E|(1wZOy*Z?uBqq}Nl@~`+>oC$9& zJ3#uwuHBA%{dss9ld)y!Z2vg=Ls;s%6i7i|1T?cZcQ5vCN#8crd(}TDa?6kSPAg}l zcB8;VFJs=j4Zl@%S6-)iXoPVvIg<=Ud*Z zUhPJk3;EsQM!XEfs>$oZ@^r)Sa_l+LMBeA?W=*CurI&n^?9Sg$pSZ5=TNsV#q$2ol zX;XlynvwA+Z+)k~fTE8KFg+#}lL5twV755KxxeuPZLz{}?N!sq$@deBW0TJu?Y`=~ zN*kQlzp-NBbVnX7eALMs%|9~Chio!!mR*0>`vbK

    (}hGqx|Z)NFp{R{ZwpwB%~^ zaQ#M$`S4MI;)}-`S6M#s`RU_nMH8b-R}4T<(pW-eB|GZ`>V@5z`AQv}ns{r`6|~{R zblwNJ4JcyJ8!MKzkh0=X@Ruw8J+}YydBz8Um)EC--{rWk@cuUOP>#tReC>+r|MghC mr+V&ufTe(LVY70k&s8GbKQ#AWYxQ5G{O!{J`ClZ+r2hrW3%7It diff --git a/doc/src/Eqs/fix_ttm_blast1.tex b/doc/src/Eqs/fix_ttm_blast1.tex deleted file mode 100644 index 642afe4300..0000000000 --- a/doc/src/Eqs/fix_ttm_blast1.tex +++ /dev/null @@ -1,13 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - \nabla_x P_e = \left[\frac{C_e{}T_e(x)\lambda}{(x+\lambda)^2} + \frac{x}{x+\lambda}\frac{(C_e{}T_e)_{x+\Delta x}-(C_e{}T_e)_{x}}{\Delta x} \right] -$$ - -\end{document} - - - - diff --git a/doc/src/Eqs/fix_ttm_ce.jpg b/doc/src/Eqs/fix_ttm_ce.jpg deleted file mode 100644 index 4f439e31e6b22ed3268e19d3d06852801812f93a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7446 zcmd6MXHXMBw{|EIh)VAr2|{QJ2-2iVOB6`JP(>+`8YEN!ML?<)Lr6gBC82|W5JD9T zT|gkTgbs>SMG;g4uJ4`sety5cZ|>Y@XP!U1bDp!aXLrw@J)JpS0&qf2EldFn3=9DC ze+_U-2N(l@Ow7#8Ou&Bx1Om^noMUDA2adC6+0JosaC38UaB=bQiwf}Y3iEMs2}%hH zi-}1{Nbm?;0ACOXi;7E#pLPSzvH}blGZ`4T0H^N(q5uW}(?5xSBL4^f%rY}EFtYyZ zHQ)p=F#QLN%#18RwtpiS7@3#>K&~^~QY<_w7YyONuB?2j7^4_|X|Ni?EknRAFqUe3 z%N>`ACp3(m(g3XgF{}?b86rWT2>ky55k9HfdcmCus>Uj%WYw12_D0-#7P_Dnvd`J` z<7X#!vfKT>q0tCj)46n>DY z?vIr&lWczE*D~DD5vHBIgj8GAeChMgyN8arIKEm#i1`3`iNS?y{S9v2U$_73B_SHU z65h9co=*?t@kqPO3^vQQla1iZTyobMhKHEJJ!bZY7wzN+?c83C1S-C#kecO+TiPvk zX|`$A=2{2?yGm&(hyAJe|M>S{kiaizktvhK_}U8Ns&)M84qRS!^@SXE@HqgtWDgPi zG5R#+_2PAfbM5hE!e1K&+34&d$%rZ2qKqFg1K_`m;XS6_$2Jp*fbpIJ&7cJrKtsEAvWdVP@xUDq;mxEg`MrPEP(#l4yV_I_IiN043PxkwduwZP04VhN*}PcNd9U$C z-YVvH`;{?o79Cj1{iyDjLcIYTc^Dhse?j*tBOqRUnSWtxgZmRO%K<=u$O$3pb-^Bt zr7;Asr##>%f-vMyF`|%u8a=vHoJf6_VxVK3yllbp=FQTorsR`;$q>6#Z;VH)RK>VM zI3|C)D{BsgqMRtt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Av;X*T|;&LYBpEIGqkG% zzm7-ZVk=V9oD8FyOj4y4urSW<@=B)}6b4mZJ7NA8M4zF6>|1MIvIqG9v&sz6bHN_xlF2y9S?w23;V${;10z9b&ew^oO)p8~{l@#|P zf8Fb~XrX{m1@N6oFv`_qhd3Izl%V$ecyYeu#%9)f(XE$hO>A4T$**ozcNuf|gx$Gz zImq`AnO&Ck@I>Mo;4V)~jq_6(Ov@I1XMJ0Yv{)o>J}qx2<8wL|Vgb0?li1#B z8m$ijqo+;JmLm(pXHsbP*O%1lJ)fVpoF3VV#A;RdRBQGi8HEnDSGqiy9BsbMdF!er z{_>}2*1bxMF@)J1>^>u~nmpuMnu-Nu+sh|Yo>a4@6v3G^vz0>W^u>9(e z%?_2*(3h+Y2HAvZWJB4fb4@?kPKMv;93HWZC}!v-BYv8xc60ptpYmz8x`)dX=?in6 z5MD8+2SlA&e33-P3n9LAjnxX)@7B$wW8zdy)dTXYYECCM`YDlU%u?BuTxe+BRqq+p zdAqIsZGTRsH7E(06c4`e-h2t+ttB=mgOQQJjft_Lo8*aKwYL{&#-_bq zviwq7wKkPSY1^TaZQAeJC_=0OP1tW9122`5IziotK@A>xp|68V3(jg2U4aZW!W?&o<#1U^M5ew>w-y*0^u}7kscqf7fRJl<294=H^ZEuGF9YKI*_QjDuFFxL!_2 e9x3k-uj3>art;Na%logr{O{zC|9{=v>Hh_XG)$}j diff --git a/doc/src/Eqs/fix_ttm_mod.tex b/doc/src/Eqs/fix_ttm_mod.tex deleted file mode 100644 index d0a313e676..0000000000 --- a/doc/src/Eqs/fix_ttm_mod.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - C_e \rho_e \frac{\partial T_e}{\partial t} = - \bigtriangledown (\kappa_e \bigtriangledown T_e) - - g_p (T_e - T_a) + g_s T_a' + \theta (x-x_{surface})I_0 \exp(-x/l_{skin}) -$$ - -\end{document} - - - - diff --git a/doc/src/Eqs/fix_wall_colloid.jpg b/doc/src/Eqs/fix_wall_colloid.jpg deleted file mode 100644 index 8168d3a792d2e4dbf7d4df3e767771f61a57da84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17879 zcmd731yoznw#c9T`DSOWdv{LGy65EVd$#=cKKHZtD*!?TS$SE&qeqVbat|NC z{X9SlfQ5mHiHU*raKXaDdV-Dn6#Ib)aB!aC5)lv+6A=&*k&w}llf0lJB_g7DNkIh! z($Ue8kiTMlMaxJ-OGkU(2Ecg=sK5|-^oR&>-wB`rJOW@m4Dm3?zth8GF)=~)cqXb>A#F74!9eT{y$4HM;sN> zquZvY#?hntDzTP%|4ACU$=WL1_b|wxcgznfjx1-Xl>CHQhBU2cXd$bI($WV> z(wk*|I^`fW2($*IRW}O8Gb3 zVxaoq&RF+;*)xS-GRM3z9VCbZ*&b>t{qwplUi{p+6*B)0{=Vdy)*qz1?#aV+_3&Trk4dt-Oa*RJbl1t{VbBuF)zcjyZiL z>~KPrwFtbam>SW1o%yaMl7hi%6H~+?eIG#$Bp>!pFb}&)Lj->y)udY9`x)N>2=lggS>Nj~_SW zOtt0$z9lSGi7D*qJZ!HBs9Zoo)yoIGyL29GRzyT(YFaVK>L%~vc22DlTg?U=iU##T zl$B4k=rP6mSKmy`grL2cl|~+#9Ol(M8R&M5mYxH}l$j4NX`Gbwj&&Hef~QGR#@J9S zm!D>x6_jQkYjHq92KdvE1%@~(cYOGjmnKYlT-l)%0xa3WOZRdG$p)G|YM zVS~vOS;APChA8hRbuh!CaAy3Nc=Dd(ZVgg^K;w$a2`-YYM$jS^yZ(Z_mp(QCKmc*?t`%O)R&Q}*GY=C}`IncLLSp$ZT?Y5)@s z+A14D<7$O_)Zj%cIy6m~5ou7d6)RY%jVLnW5;(>O9}t)XZXwYqurbO;#VGR85T_$1 zQ8q!?2)A|UXPtG&=b_dEE@28yR>SvzA`X-&`I+|9Snid-$a7h;@BecO7hf;G5{|l? z(Y^;D-*P@8^G;pja`$^Rcj07KH)Kn!x9rxW*(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ex b/doc/src/Eqs/fix_wall_ees.tex deleted file mode 100644 index c8b62067a8..0000000000 --- a/doc/src/Eqs/fix_wall_ees.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ -E = \epsilon \left[ \frac{2 \sigma_{LJ}^{12} \left(7 r^5+14 r^3 \sigma_{n}^2+3 r \sigma_{n}^4\right) }{945 \left(r^2-\sigma_{n}^2\right)^7} -\frac{ \sigma_{LJ}^6 \left(2 r \sigma_{n}^3+\sigma_{n}^2 \left(r^2-\sigma_{n}^2\right)\log{ \left[\frac{r-\sigma_{n}}{r+\sigma_{n}}\right]}\right) }{12 \sigma_{n}^5 \left(r^2-\sigma_{n}^2\right)} \right]\qquad \sigma_n < r < r_c -$$ - - -\end{document} diff --git a/doc/src/Eqs/fix_wall_harmonic.jpg b/doc/src/Eqs/fix_wall_harmonic.jpg deleted file mode 100644 index 3c605690c36bf09017f735f8d933fbfed80c68a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2413 zcma)%dpOe#AI5(>Fdm`tAjXz$tfIVxlvBb=LI^pgtwKV}VZ@v&mZGSfD&&yIBV>wI zjyWrnXw0FBVQCZNp)}j8_mB7A_x*gY>;C6^U-y08;!*Jwu>CmR4iA7pAmG^60pfAM z8jyfMp-_m#mPklQNW!*B!M2c>k&)g8mse1L%fsP{%IYeLf2t|L;X5>UsA*`RP$)$e zG!~7-sv}WIaVsDr1sn!pK_ECF?f}#Q5CDe!?)Wbfk`O2i43gUV9@-9opkNRLECGf< zWPdw;yP*dW zq_ySuy0o8NoE5m%H>nwM>MnSIZAi6c4AMw^t3uJ9m5Zr&zbw7lM)_M|9-Zam!-#X~ z3>f#%e7}&+7}_xANAJ`y;a0kA#s7!YIVNd1I-aPREpM_BQTFnjfd`&KAM^X3R|;pf zMD|i3GZDVroE?mn-GXdEUSjVgHctmzc=LX)*WhAQAaO>NsJQMce{I=#xxl{XX$29> zi(K(tvc9-lk5J4Xf&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7PreU5 zQpzyzJX;ZeY_``kKbR$rVcS0&z?9{bC%iZ~TP1S8L9ns0ai&iw;}E%hvtL~=dC&w$ z_x^nS=maCfxN87+Skh2dRvy>8HJ~%JDK@gSGF0lBm5x0&%^jxCx3GfMqHd^kMKf^e z^&KXs=PF$YAIAvf*NtlIr4lSPi5=D8z%vbton#Pq%`G)NXPH=_(>Ff4)v0(tT(rg5 z`%S(`HkL*}QM7)1)m6iyG8gT3zs8WXUE^PF2Y!Go0WyUoIn&Gz0&VnCx$2$$M9qSi pnc4h2O{0JX+WF+8V4tc9 diff --git a/doc/src/Eqs/fix_wall_harmonic.tex b/doc/src/Eqs/fix_wall_harmonic.tex deleted file mode 100644 index 86dcb80a0e..0000000000 --- a/doc/src/Eqs/fix_wall_harmonic.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - E = \epsilon \hspace{0.1cm} (r - r_c)^2 \qquad r < r_c -$$ - -\end{document} diff --git a/doc/src/Eqs/fix_wall_lj1043.jpg b/doc/src/Eqs/fix_wall_lj1043.jpg deleted file mode 100644 index 303743bf3e84dd0631cc4f1976aea6eaeaf90a26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10996 zcmeHtXH-WNlr;gMZ-i(b)SKnl9G;{j)9q( zm6er>mV=9fg^P)WmF1=pKuiemyfcA=LkYNP0Wbk@0JyhJ+&1#Bxcw|1?j0P$+tT+G z0319V+&j2;hzRZy;FAJwYu~}e!zZA;2V|!bl;uz-yiZM|ZS3%ML`eLFlW!TPsMx!Y z&XK95n-z@F~hukAv3i3xI5*Gouv+r4mvl+<2QQ`D{V^c65_vgwy@4A{q3IT9MD3j8} z9W^u4|6K<)Yj@v@umB%C6b2QPk3Bguq8+RG=0^`9#N2DIrmSW|b-923Rkc1|C*LEM zs~c1%DjC0$h;7twX1lW-Sj{gw=|*ZuvsX|1iS9|1iWtSJuU6tb^${0765z&=Yc!Gu^nJrINnH{ZEkcj?e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XuYwpQd- yLb?l1{d9^!mCRKAAZ?4oD|$DS*wZ>pGGss!WLqVDIN@z_`Onw>ujPlE$^QYP=y_HE diff --git a/doc/src/Eqs/fix_wall_lj1043.tex b/doc/src/Eqs/fix_wall_lj1043.tex deleted file mode 100644 index 06fc4dd33e..0000000000 --- a/doc/src/Eqs/fix_wall_lj1043.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - E = 2 \pi \epsilon \left[ \frac{2}{5} \left(\frac{\sigma}{r}\right)^{10} - - \left(\frac{\sigma}{r}\right)^4 - - \frac{\sqrt(2)\sigma^3}{3\left(r+\left(0.61/\sqrt(2)\right)\sigma\right)^3}\right] - \qquad r < r_c -$$ - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/fix_wall_lj93.jpg b/doc/src/Eqs/fix_wall_lj93.jpg deleted file mode 100644 index 18e502cfbfeb8b63f4b9b0df3558f8192058273f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4883 zcmbW5cTm&K*2jO;fHXr@T0lTl5Tthkf)r6ukSZOd7^H;`5{lAE2uN=t0wT>&LKl=0 ziZnrb4_!J6gqD|kXP!HE-aqeWXLfdGch1g!&pCT$mpD$G2d+NU(AEG*NJs#!%LWjq z05yPujGUaDjN-DRprD`x(NcjfVW6R*rUf%FGJ+YvU?x^hHYR3v7BKi4?=^NVE(ip| z#CC)K1~)$^H-wwm3eZpi4kY;`Bw&Ep4siU-{=WhK0YrJZ2`Sa(q~=wCgq)OwjD(De zl9H0?SpG`Q+fO`lzh;I=L}1|QDHkPuE3Db zydA;e>I631+Fk8fb+z`HnpOd+*V?K79rAQ<3PTzQpgS;CMqPFv=`coZYWABR%Kb)b z32U?Lf#wX~TG#vFn!0eFw<}l2wAcg5kfHK>E%mBmS>^qZ7b#?P70>$n6M@>GZKEjh_K*kcf`r7BC;5L2_ zzB%^^Iv|@aoAhVETD>%Zf;}jukP`1up|sXp+{dR9(Kc1N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aY{mV;n|923? GiT?v;b4T$2 diff --git a/doc/src/Eqs/fix_wall_lj93.tex b/doc/src/Eqs/fix_wall_lj93.tex deleted file mode 100644 index 7372e55c15..0000000000 --- a/doc/src/Eqs/fix_wall_lj93.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ - E = \epsilon \left[ \frac{2}{15} \left(\frac{\sigma}{r}\right)^{9} - - \left(\frac{\sigma}{r}\right)^3 \right] - \qquad r < r_c -$$ - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/hexorder.jpg b/doc/src/Eqs/hexorder.jpg deleted file mode 100644 index dafa25cabec6733d1f5714501df3098b937a50a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16870 zcmcJ$30MDZKKo|}4CTK!}P+gqWyI0s^hJ&|*uR z5ETKHNf8qv4DHAyAVJC0icC_a5UNR1{6+V3zVEyD4ENk~?kygY#jdJdwf9p1zKwSLsV>|pd z*zDaGY=e6Tr~sOPI^aZz}SFbr3nGk`>X{dZS>G+Ykb`X_~4#dvMDynnxG4usd*=$aZ`deP{ z*EN63>*wTyaq$PyYv$hh$icXSb8<5(pF5EliOSe5sGMdX)@s0oTTL1DMD|SR4 ziaZt>k3MP-YGt(eC{*3?2WiJ?^mrRu{C}q5|KV-_@(y$2-*$}(hPM&Gi0TOFwHpE0 z@i%~~p*DcsUyPo?{6lYBH1_~=o)<(I`rGbN89o2k=l|tHB_I7$C4m-YGuQ0BW0y@t z;;|ERGU^j^A8LRWfCr2KbHEy~1(pB~z-qu1a0k`{KEP&x0_+0z0bxJ{5Dmlu$ABb& z37i2kfE?gw;4)AIaDdyuJ)i=34AcP)KqJr!yaqae9$)|v0iS_U00d-!9D~8&FuE8+ zj5&sYvBNCKtj4UxkT5=&EtnmceVCsxQJ8p4B8G`c#pGZvVu~;~F!wNzFi$a!n3tGN zOg~198OD6a%&1^hbX1H~tW*}O5LMQyc&P-a>{1C;iBdVLlB|-Zl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S#kWp34^IpqkeZBjY5;S&~4!GEH7{f)?{%#LcT-;2QuF9dS1#JQ`BdNfwPBR%aZAlG^1ednjYGG z+_{sOJx&8T;(VY~&R>M^n{^$=QD=h(QbQUEa(9gQGv&{&WUb^rA`pi^8ZUiGHl5a}Mcq z8%zYUW8mb#&5G-6nHyo$s&gZ!{~1lJxw@NY(yIQ@u!edehU@Zih~v`b!j0QBQTI__ z$6t=_y50ZetT3tKcb3NqVfaadHxNi2CYR~f^Pb5U0BmeOwgUO}O*5cu3jrmqB5_|I zZ7BduMs6u5U`Osw)V5Xbz=4&Fv<6@v+8VY9gA{UmaQ4Jrps-zp*(=(z6%=DmVau~S z;|Z_%Ff|pY=r0>g5C47sSO-|({K0B8gy@u#i`*>=`YepGE4}G1C%lQU=$gdoN)dVNo6Vj( tOGahx!s8`}+g?oG)S_jc4>oM|`1pT4m-j!s)c?8d`2Ris!SJua{|461KG^^O diff --git a/doc/src/Eqs/orientorder.tex b/doc/src/Eqs/orientorder.tex deleted file mode 100644 index a081a9eec3..0000000000 --- a/doc/src/Eqs/orientorder.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentclass[12pt]{article} -\begin{document} - -$$ - \bar{Y}_{lm} = \frac{1}{nnn}\sum_{j = 1}^{nnn} Y_{lm}( \theta( {\bf r}_{ij} ), \phi( {\bf r}_{ij} ) ) -$$ - -$$ - Q_l = \sqrt{\frac{4 \pi}{2 l + 1} \sum_{m = -l}^{m = l} \bar{Y}_{lm} \bar{Y}^*_{lm}} - $$ - -\end{document} diff --git a/doc/src/Eqs/pair_adp.jpg b/doc/src/Eqs/pair_adp.jpg deleted file mode 100644 index accae4716e01505ab7bb434125d9c1997e6ee3c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20391 zcmce-bzECdyDu6F6ew0IP@FbMad$5*TA)C2Z-O;=@Svr|6RfxwE5(Yt6-aO??(Ps= zf?j^_yZ5>K-1|BEocqsxR@SVQtodYS);!NV_MN-QyG6ibWq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$1foz5=hxtgjMQZ_OWWTQi~3exH^O79SVYT&joi!b`^|c3*yM+ z982kap&`p66Iu)w5~^Y?R3A1@)9}=50=s-4Z!aV^mg*hd0mAgqzk6mo`Fo^(rkfQD zj!89rXfZI4qjr^7``A?ZKrFfjRm`WeliFC+0#>BkOlcV#yfE{L`R1~qoasm4>O&{gF7@oKD3NQSP$vr|H{qOIO38Pn*}U z6KhVI!Pf}kIAhGkj{0P;{OX$OfY3UkJN}IT$t(-Kcqqv#2JgNe!LN9)_}_>S#t%j> st89)T7Tm7X>g=uQ4Oqv-W$oFQ=;$W@bzQ)fdByrqk^BF*H@choKfw!Uvj6}9 diff --git a/doc/src/Eqs/pair_beck.tex b/doc/src/Eqs/pair_beck.tex deleted file mode 100644 index dde6b6ef51..0000000000 --- a/doc/src/Eqs/pair_beck.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -$$ -E\left(r\right) = A \exp\left[-\alpha r - \beta r^6\right] - -\frac{B}{\left(r^2+a^2\right)^3} \left(1+\frac{2.709+3a^2}{r^2+a^2}\right) - \qquad r < R_c -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_body_rounded.jpg b/doc/src/Eqs/pair_body_rounded.jpg deleted file mode 100644 index e7136ddd20c2acea0e89fa8412497333f15cb541..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146978 zcmdqId010R*C!fOL;;D&Jmx4O5axL>!Ye2UNPs|?Ap!ydGJ^y~qKpCoj!FQTA_fQ{ z%!48#ND{)4QD#I15=3OuLq0Ra0nKkzX>pMxE2u` z5pyjf@(*1NEr5}^wcVlLEpm^)X~nH0j={F%r71|4giFO$40}f%>Qt6_xOYF4VM=IfCxYraMss9Ci1+4!{y&? zhDU@4{N46{bK05yn_s|$`tP>>n_K_+4}Sm1=vZzwHutM@H6X^H+Y4G;Iy62ul3UJG z%B4m9LjR_le$&y;Fbi%ug-Z(s{ga;jP5b?m{`i}Y<}$&p^Zj@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0F=$otgQlqV12CsoN5V4{h$Q{7zQZkzqV|bJ9 zVCj32cd^3utpYwJ5B4sU`{+6P)L~}H>HP|5UiZOzXm8Iwqnb`ui$8lgYf`e%mRg>Q z#RQ?1=|H(UKsA|QmjickoD9dPs|=gC4iF-X<{oc4g(>w7p6*U2>0_AlO)YR!)x2-G zf_uEp*t=#ezYH(JMvBsZwqzr3m>Snkl?EV9wW=K|h+up`)JHPO)?yLm!j5$&o$lCR z5Cc&R>l9SR2MGv~ypNXaB+a1*`(}6|+Umudl&sB0Feo{@5P#pkUsHF^ebxT9e5;gp ziQ-x(PnThCjnuVN!XGq)XwtS~ugtj`AKWN7=IB!+=koE}DJSP%om%7>?PNw!S`Md=bK50^oWx8`~yjdl%n{!RIs4y}XwD(_@ zo8Ek>5opZA=>xB8PO}m!-D*xVPjqs|SC8ko{q?8HzHp(kM&mn-Z(gI;7qg8gZh)g(D;CErD=JLQtuC_?v!hT3K#?$P r_c \\ - F_t &=& \mu k_n \delta_n - c_t v_t, \qquad \delta_n \le 0 \\ - &=& 0 \qquad \qquad \qquad \qquad \delta_n > 0 -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_coul_soft.jpg b/doc/src/Eqs/pair_coul_soft.jpg deleted file mode 100644 index dad9c745ba6bbb555427ca7b6fb448bc2853caed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11309 zcmbVw2V7HIv+oX_08#}N=}nFFKtK=#0wF*MH8e4X03n1Vl!Sz?s3@Q!c*KH;VgW@! z=>pObJ*e0K1q2eif+QA<63E+}^WAgKyZ3kR_ud_Td*{!rS!>PAT5HeD5)hJDT$ask01afw7Z*b3MjOS|E9$;02~Pbo|=04>FWN?|9?Wt#KdF<06_de zY3t~i6e5WCgE)c3NL=OfK&%!;S;b-!t2h}{5X9?NG3igd^$(dp@s3p-O{GPHGOIc# zMpL6#@c@Vqr7~kcEbas1yi{@w3&hVrY?#2Ll0hs0u^KgokOBY_@~eDC3^5MG79f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i=N(3m7`@txp3I_^cxCanQ&_DK-VSN zX0tJU!;ksPKOs@k%d4<60Q|AqgAy1jKozzZWMTp ziSMDwIEdy3=eNVRn%@iZMJl(Ij*Z#)ww|d>xBnwz@KDWfCfQs5?AM{_A7@Pjg7zt#$03O!~4dw3gPu z(DXT(@p%uB#$t4pWVLCs4o4bmjh(pq>-wF0I25{}_riJKRBZGi#g@HKjO~cWzK*RN z)2xwtDY@msFMxZWcRE*bzPK1(U){3`?w08;miS_$d#(EOAlCxiJ=>qu@wGE>n5#pu zZhp*YX)MD>d`KGO5PgtxUL_?qF`kXC8JH0?G-8aaqDSFi!Po5qxxMV2-^C%%BwsFu z@se??2pRO|N2F!ID4F1<8mT*~-29~Z$(5LbZG*(DETX{SKT7QN*CFHKXxf1#dJ}`I zB+q^c-PM2yzsJRF`#}fwUXFFHE=#&g_M}}jo8W3lj`VtQjF{t5tx>Y=tF>pzCkf7M z>8`_wJ6`|g8Nz>aocB8;A1*;v&ea$)}34dnw7E!lTn%Fk1-cH)Kr0eRed$lZw67wP%|I!{1 z-KTp>`%(6g3FE>lfw+8SqF*TPXh13_lB0<~IB*JqH5||Ba?l+4TK$vfJj*Z4rX9*j z`TqVuzs_;LZ{AvRua~=O;t4GsPKKOul^jQ=kb6^+jT diff --git a/doc/src/Eqs/pair_lj_soft.tex b/doc/src/Eqs/pair_lj_soft.tex deleted file mode 100644 index e32f11f0aa..0000000000 --- a/doc/src/Eqs/pair_lj_soft.tex +++ /dev/null @@ -1,15 +0,0 @@ -\documentstyle[12pt]{article} - -\begin{document} - -\[ -E = \lambda^n 4 \epsilon -\left\{ - \frac{1}{ \left[ \alpha_{\mathrm{LJ}} (1-\lambda)^2 + - \left( \displaystyle\frac{r}{\sigma} \right)^6 \right]^2 } - - \frac{1}{ \alpha_{\mathrm{LJ}} (1-\lambda)^2 + - \left( \displaystyle\frac{r}{\sigma} \right)^6 } -\right\} \qquad r < r_c - \] - -\end{document} diff --git a/doc/src/Eqs/pair_morse_soft.jpg b/doc/src/Eqs/pair_morse_soft.jpg deleted file mode 100644 index 9c8321eba798943de9ad293f80e95d946e872f95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20988 zcmd?RcQo8l*ET$Q@4XX5m*_+h>n<^k3@>$jwYkDsWT}PzaO&}#L7Q9V@}56 zac~S0Rou)XAg67a**JrhS1=Diw0yWLYvxjN`ga9D`j3&+0e{BPB47ye|L!d=O4I_sADtcRO=Uh>e_+E{2Sd{iYwq?1}f&-v%)%K*DZq3*zK{ z7!bTkR-MPZ_y{aG0yC0ciRQjzmWDHatgEZ{oO7-Uf?|Hy#~2=G7hYegk7TxS#Wyc4 zas&4sX28kQiOn${0tuIOaC8cW*yL$|DFy+(q&!a;{c3DTs zgxE${h1$mcpO}H?(Zf97c(R{0;}PO@c0Cjv(RiL8lmnLN@p@Ii4TAq+0Mw-Rp`OnG z{LJgE;%W=ws};`}$*jQ|J{DFFNIHO~6!8M4|4&0zV1+)U?U!sFJXEcsa3-?CQYPBxM{IF!!pL|Q##f;tfbV)0TvbCQYu>cA zzE<+#d(Lr;F(qVzU_KEb0ZJGF01_fJ0GW_VlcP&dhrz|%*45&VezA#&{ykrezg`Z( zFz@A0_U)akAzTV!;Q70d0-6qPJ-y9zKVknQpc7UDD$Wd22mQd%+r`LOaR7 zHIM^erM?V7kOK*b0}lu}2%MnF8>L6m2w3#^FV9Am8Gy` zeQdSZVG^=&#iV#5U|oETL%>ffq|NBeUjRt#P5Dn{$5u=V(tMYc;qxX9njd3{&9hNM zGu7-Lf{dSXp!!ydQfiCe1+?B%>_5bBK)eui5@~r3X`!*5UaAv!6o*TG3phM`s~}i& zxzZd@b1b)RkTU~kxvOnZnvegvPgA|_?G4Q1k4*fZ8}+lgnX-OF(@X4DSCO=~HxaG6 zg-eIi$zm&&UJbX^OE>#Zn7*keCH+BOFylRy#8siiXIu!W!bSLc>>~ARmAu;d?TPl) z=enF(C4CyLJrDwI(v8d*O{>Z7$4GPlqF>rYnOz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#?( zcyU?A1T3T-4Zq_A33%OhBb*?fcvJ6k0$}ACulwgUTSHZ^5N%EHHA-qmKRo^{&ns&3v(oO1SfSIlbmC-Qhfur qLLMb24xAIa-XVHlp#RLRi}99H|NWe?|8CCO|9}4fcnpC4PW)fvVu`x| diff --git a/doc/src/Eqs/pair_tersoff_mod.tex b/doc/src/Eqs/pair_tersoff_mod.tex deleted file mode 100644 index eafc4fdeeb..0000000000 --- a/doc/src/Eqs/pair_tersoff_mod.tex +++ /dev/null @@ -1,24 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} - E & = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ - V_{ij} & = & f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) \right] \\ - f_C(r) & = & \left\{ \begin{array} {r@{\quad:\quad}l} - 1 & r < R - D \\ - \frac{1}{2} - \frac{9}{16} \sin \left( \frac{\pi}{2} \frac{r-R}{D} \right) - \frac{1}{16} \sin \left( \frac{3\pi}{2} \frac{r-R}{D} \right) & - R-D < r < R + D \\ - 0 & r > R + D - \end{array} \right. \\ - f_R(r) & = & A \exp (-\lambda_1 r) \\ - f_A(r) & = & -B \exp (-\lambda_2 r) \\ - b_{ij} & = & \left( 1 + {\zeta_{ij}}^\eta \right)^{-\frac{1}{2n}} \\ - \zeta_{ij} & = & \sum_{k \neq i,j} f_C(r_{ik}) g(\theta_{ijk}) - \exp \left[ \alpha (r_{ij} - r_{ik})^\beta \right] \\ - g(\theta) & = & c_1 + g_o(\theta) g_a(\theta) \\ - g_o(\theta) & = & \frac{c_2 (h - \cos \theta)^2}{c_3 + (h - \cos \theta)^2} \\ - g_a(\theta) & = & 1 + c_4 \exp \left[ -c_5 (h - \cos \theta)^2 \right] \\ -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_tersoff_mod_c.jpg b/doc/src/Eqs/pair_tersoff_mod_c.jpg deleted file mode 100644 index 311ccc81ebaa809dea7da497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off_mod_c.tex deleted file mode 100644 index 8cea2d382c..0000000000 --- a/doc/src/Eqs/pair_tersoff_mod_c.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} -\pagestyle{empty} - -\begin{document} - -\begin{eqnarray*} - V_{ij} & = & f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) + c_0 \right] -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_tersoff_zbl.jpg b/doc/src/Eqs/pair_tersoff_zbl.jpg deleted file mode 100644 index 20d60d225689e11d7f347cfec1106a6e2356da05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 392677 zcmeFY2UJtrw>KJ^bdX*pD$+vlMIZ_S0z&8=A|NgFCIKT+q}L-|>Oo2f9jPKUp(s_l zfJc%bAWah$jMBb%&i(%Pj&Hngj5pqWW4!OaaTjCnJy~n*#r~~5_gud@*W~=&ISz2q z#L(CfKt%-rP*HvW=L8m7V|{(7g%!lm_>RHf4b0!&LqY{~SyL zGms*;Q)D^Mkgy1f{E;HRjfx1N$ke~clY?$nC|XA|C0Z~Lb;Rjhj00XhXlAs|NYDVo2S5lNXmTuU4G9xi&v1X zHRZ}lIfMcF06#zwzzYxva0grl+y>kN03y8L6wCmCesD;1n4gbt#O0fmx8x;r**M5k zPUf*FadZASOlyAaDYv~ z9)Jiq0vuCOQPESeQgKlUPywmLsHCZss5Gc_sSK#@P+3tqQr)HUp$ejkq(V?Vp-Q95 zrYfSUph8o%QoW=aqIyF$OSM9Ur`nr2K7y9Q)(M(S85;X zQ0f@!clq zDosAkbDAca9-1+lc^VweKFv?s3$$FcmuY2buhZV9wWal>4W*5xO{XoQt)=ax9j2Y9 z#nTdL&*)g`gz2Q|wCIfK9O!)LqUaLo^66^mI_O5|7U?$WjxJodz(E2!-RUFf6X~DPH_#8z&(UwvlNp#9fDB3u zh73*&K@4#W`3!Xo{S0#q+YHBy7a7GEwHP6c_ZXuYvly!wdl+XJHyM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ix|o-_p4XKj?gyIa<8|SlJd12 zdf}xJ9@0qfGtNEz=ZL`@yCKiVXYG5H)svKcFW%W%27)zJ$)dPF#-qQhDmo_wrc`Az zuFjbRl#Z8svcD(?T~1CjRmh}XiT1dms_wp5@0^Z_+FvSBbvbxENL$hkK51(@4W#)xV<(4?Ku6^?03QhO8 z$AlD#9VUd6JTgkWM4*Ztn%y3{CUOUE1GSX6jJS%pI@;Pr)9n2CV^gT7J<)S!w5@Eo z&(va^+o7TTq$r`}y+UsAW{d0LI+r^7V?!wb*x~ZZt{s!!~7?`&QFHyn!pR(rPZf2gwl7yhn%NOnl z`gGig2D39#SL|7CPO&pE9M)nV>RK((Kiuj?XhzJ + + LAMMPS_OMP_COMPAT + Workaround for backwards-incompatible changes regarding predetermined sharing modes in OpenMP 4.x. A value of 3 or 4 should be used, reflecting the version of the OpenMP spec that is implemented by the compiler. + +
    +
    3 (default except for known OMP 4.0 compilers)
    +
    4
    +
    + + LAMMPS_MEMALIGN controls the alignment of blocks of memory allocated by LAMMPS diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index 96bc0f5bd1..62b16d9a03 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -147,7 +147,8 @@ semantics, which are incompatible with the OpenMP 3.1 semantics used in LAMMPS (for maximal compatibility with compiler versions in use). LAMMPS will try to detect compilers that use OpenMP 4.0 semantics and change the directives accordingly, but if your compiler is not -detected, you may set the CMake variable ``-D LMP_OMP_COMPAT=4``. +detected, you may set the define ``-D LAMMPS_OMP_COMPAT=4`` in ``LMP_INC`` +or the CMake build command. ---------- diff --git a/src/omp_compat.h b/src/omp_compat.h index 8abf1c54bc..add429eea8 100644 --- a/src/omp_compat.h +++ b/src/omp_compat.h @@ -25,7 +25,7 @@ // so this is what LAMMPS primarily uses. For those compilers // that strictly implement OpenMP 4.0 (such as GCC 9.0), we // give up default(none). -#if LMP_OMP_COMPAT == 4 +#if LAMMPS_OMP_COMPAT == 4 # define LMP_SHARED(...) # define LMP_DEFAULT_NONE default(shared) #else From 62cb760ee2ea8172f621201f04417c9d60bf9474 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sun, 22 Mar 2020 14:42:29 -0600 Subject: [PATCH 061/577] cmake: remove LIB_SOURCES and LMP_SOURCES --- cmake/CMakeLists.txt | 30 ++++++++++++------------- cmake/Modules/Packages/CORESHELL.cmake | 2 +- cmake/Modules/Packages/GPU.cmake | 2 +- cmake/Modules/Packages/KOKKOS.cmake | 2 +- cmake/Modules/Packages/OPT.cmake | 2 +- cmake/Modules/Packages/QEQ.cmake | 2 +- cmake/Modules/Packages/USER-INTEL.cmake | 2 +- cmake/Modules/Packages/USER-OMP.cmake | 2 +- cmake/Modules/Packages/USER-SDPD.cmake | 4 +++- 9 files changed, 25 insertions(+), 23 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 4dd079eaae..eb5700b19d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -21,11 +21,6 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local" CACHE PATH "default install path" FORCE ) endif() -# To avoid conflicts with the conventional Makefile build system, we build everything here -file(GLOB LIB_SOURCES ${LAMMPS_SOURCE_DIR}/[^.]*.cpp) -file(GLOB LMP_SOURCES ${LAMMPS_SOURCE_DIR}/main.cpp) -list(REMOVE_ITEM LIB_SOURCES ${LMP_SOURCES}) - # Cmake modules/macros are in a subdirectory to keep this file cleaner set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules) @@ -110,8 +105,19 @@ endif() option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF) -if(NOT BUILD_EXE AND NOT BUILD_LIB) - message(FATAL_ERROR "You need to at least enable one of two following options: BUILD_LIB or BUILD_EXE") +if(BUILD_LIB) + file(GLOB MAIN_SOURCES ${LAMMPS_SOURCE_DIR}/main.cpp) + list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES}) + add_library(lammps ${ALL_SOURCES}) + if(BUILD_EXE) + add_executable(lmp ${MAIN_SOURCES}) + target_link_libraries(lmp PRIVATE lammps) + endif() +else() + if(NOT BUILD_EXE) + message(FATAL_ERROR "You need to at least enable one of two following options: BUILD_LIB or BUILD_EXE") + endif() + add_executable(lammps ${ALL_SOURCES}) endif() option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF) @@ -391,7 +397,7 @@ foreach(PKG ${DEFAULT_PACKAGES}) # detects styles in package and adds them to global list RegisterStyles(${${PKG}_SOURCES_DIR}) - list(APPEND LIB_SOURCES ${${PKG}_SOURCES}) + target_sources(lammps PRIVATE ${${PKG}_SOURCES}) include_directories(${${PKG}_SOURCES_DIR}) endif() @@ -533,7 +539,6 @@ if (${_index} GREATER -1) endif() list(REMOVE_DUPLICATES LAMMPS_LINK_LIBS) if(BUILD_LIB) - add_library(lammps ${LIB_SOURCES}) target_link_libraries(lammps ${LAMMPS_LINK_LIBS}) if(LAMMPS_DEPS) add_dependencies(lammps ${LAMMPS_DEPS}) @@ -579,15 +584,10 @@ if(BUILD_LIB) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) configure_file(FindLAMMPS.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindLAMMPS${LAMMPS_LIB_SUFFIX}.cmake @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindLAMMPS${LAMMPS_LIB_SUFFIX}.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/Modules) -else() - list(APPEND LMP_SOURCES ${LIB_SOURCES}) endif() if(BUILD_EXE) - add_executable(lmp ${LMP_SOURCES}) - if(BUILD_LIB) - target_link_libraries(lmp lammps) - else() + if(NOT BUILD_LIB) target_link_libraries(lmp ${LAMMPS_LINK_LIBS}) if(LAMMPS_DEPS) add_dependencies(lmp ${LAMMPS_DEPS}) diff --git a/cmake/Modules/Packages/CORESHELL.cmake b/cmake/Modules/Packages/CORESHELL.cmake index 591477c899..2afe2b8c1b 100644 --- a/cmake/Modules/Packages/CORESHELL.cmake +++ b/cmake/Modules/Packages/CORESHELL.cmake @@ -8,6 +8,6 @@ if(PKG_CORESHELL) get_property(CORESHELL_SOURCES GLOBAL PROPERTY CORESHELL_SOURCES) - list(APPEND LIB_SOURCES ${CORESHELL_SOURCES}) + target_sources(lammps PRIVATE ${CORESHELL_SOURCES}) include_directories(${CORESHELL_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index abbcb1f495..e8ca4d35ab 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -192,6 +192,6 @@ if(PKG_GPU) get_property(GPU_SOURCES GLOBAL PROPERTY GPU_SOURCES) - list(APPEND LIB_SOURCES ${GPU_SOURCES}) + target_sources(lammps PRIVATE ${GPU_SOURCES}) include_directories(${GPU_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/KOKKOS.cmake b/cmake/Modules/Packages/KOKKOS.cmake index 29beaca957..4b871ccb46 100644 --- a/cmake/Modules/Packages/KOKKOS.cmake +++ b/cmake/Modules/Packages/KOKKOS.cmake @@ -69,6 +69,6 @@ if(PKG_KOKKOS) get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES) - list(APPEND LIB_SOURCES ${KOKKOS_PKG_SOURCES}) + target_sources(lammps PRIVATE ${KOKKOS_PKG_SOURCES}) include_directories(${KOKKOS_PKG_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/OPT.cmake b/cmake/Modules/Packages/OPT.cmake index f2802c757b..02e3877c59 100644 --- a/cmake/Modules/Packages/OPT.cmake +++ b/cmake/Modules/Packages/OPT.cmake @@ -8,6 +8,6 @@ if(PKG_OPT) get_property(OPT_SOURCES GLOBAL PROPERTY OPT_SOURCES) - list(APPEND LIB_SOURCES ${OPT_SOURCES}) + target_sources(lammps PRIVATE ${OPT_SOURCES}) include_directories(${OPT_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/QEQ.cmake b/cmake/Modules/Packages/QEQ.cmake index 94cca30540..9b151c2610 100644 --- a/cmake/Modules/Packages/QEQ.cmake +++ b/cmake/Modules/Packages/QEQ.cmake @@ -15,6 +15,6 @@ if(PKG_QEQ) endforeach() get_property(QEQ_SOURCES GLOBAL PROPERTY QEQ_SOURCES) - list(APPEND LIB_SOURCES ${QEQ_SOURCES}) + target_sources(lammps PRIVATE ${QEQ_SOURCES}) include_directories(${QEQ_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/USER-INTEL.cmake b/cmake/Modules/Packages/USER-INTEL.cmake index d0941a0a12..7b08a7b459 100644 --- a/cmake/Modules/Packages/USER-INTEL.cmake +++ b/cmake/Modules/Packages/USER-INTEL.cmake @@ -108,6 +108,6 @@ if(PKG_USER-INTEL) RegisterIntegrateStyle(${USER-INTEL_SOURCES_DIR}/verlet_lrt_intel.h) endif() - list(APPEND LIB_SOURCES ${USER-INTEL_SOURCES}) + target_sources(lammps PRIVATE ${USER-INTEL_SOURCES}) include_directories(${USER-INTEL_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/USER-OMP.cmake b/cmake/Modules/Packages/USER-OMP.cmake index 668f42f10a..4b1a4b1571 100644 --- a/cmake/Modules/Packages/USER-OMP.cmake +++ b/cmake/Modules/Packages/USER-OMP.cmake @@ -37,6 +37,6 @@ if(PKG_USER-OMP) ${USER-OMP_SOURCES_DIR}/reaxc_valence_angles_omp.cpp) endif() - list(APPEND LIB_SOURCES ${USER-OMP_SOURCES}) + target_sources(lammps PRIVATE ${USER-OMP_SOURCES}) include_directories(${USER-OMP_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/USER-SDPD.cmake b/cmake/Modules/Packages/USER-SDPD.cmake index 530dcf2bd9..1105fbd7ce 100644 --- a/cmake/Modules/Packages/USER-SDPD.cmake +++ b/cmake/Modules/Packages/USER-SDPD.cmake @@ -5,7 +5,9 @@ if(PKG_USER-SDPD) get_property(hlist GLOBAL PROPERTY FIX) if(NOT PKG_RIGID) list(REMOVE_ITEM hlist ${USER-SDPD_SOURCES_DIR}/fix_rigid_meso.h) - list(REMOVE_ITEM LIB_SOURCES ${USER-SDPD_SOURCES_DIR}/fix_rigid_meso.cpp) + get_target_property(LAMMPS_SOURCES lammps SOURCES) + list(REMOVE_ITEM LAMMPS_SOURCES ${USER-SDPD_SOURCES_DIR}/fix_rigid_meso.cpp) + set_property(TARGET lammps PROPERTY SOURCES ${LAMMPS_SOURCES}) endif() set_property(GLOBAL PROPERTY FIX "${hlist}") From cd89a7c4b7edb877694e07a91edc558a94845f12 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sun, 22 Mar 2020 18:03:07 -0600 Subject: [PATCH 062/577] cmake: fix renamed target for exe --- cmake/CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index eb5700b19d..0fae7f55bf 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -105,12 +105,14 @@ endif() option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF) +file(GLOB ALL_SOURCES ${LAMMPS_SOURCE_DIR}/[^.]*.cpp) if(BUILD_LIB) file(GLOB MAIN_SOURCES ${LAMMPS_SOURCE_DIR}/main.cpp) list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES}) add_library(lammps ${ALL_SOURCES}) if(BUILD_EXE) add_executable(lmp ${MAIN_SOURCES}) + set(LAMMPS_EXE lmp) target_link_libraries(lmp PRIVATE lammps) endif() else() @@ -118,6 +120,7 @@ else() message(FATAL_ERROR "You need to at least enable one of two following options: BUILD_LIB or BUILD_EXE") endif() add_executable(lammps ${ALL_SOURCES}) + set(LAMMPS_EXE lammps) endif() option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF) @@ -588,14 +591,14 @@ endif() if(BUILD_EXE) if(NOT BUILD_LIB) - target_link_libraries(lmp ${LAMMPS_LINK_LIBS}) + target_link_libraries(${LAMMPS_EXE} ${LAMMPS_LINK_LIBS}) if(LAMMPS_DEPS) - add_dependencies(lmp ${LAMMPS_DEPS}) + add_dependencies(${LAMMPS_EXE} ${LAMMPS_DEPS}) endif() endif() - set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY}) - install(TARGETS lmp DESTINATION ${CMAKE_INSTALL_BINDIR}) + set_target_properties(${LAMMPS_EXE} PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY}) + install(TARGETS ${LAMMPS_EXE} DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES ${LAMMPS_DOC_DIR}/lammps.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 RENAME ${LAMMPS_BINARY}.1) endif() From 5828815b3ec50845be1a312056de559c05bbff1a Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sun, 22 Mar 2020 18:55:53 -0600 Subject: [PATCH 063/577] cmake: remove LAMMPS_LINK_LIBS --- cmake/CMakeLists.txt | 28 ++++++---------- cmake/Modules/Packages/COMPRESS.cmake | 3 +- cmake/Modules/Packages/GPU.cmake | 4 +-- cmake/Modules/Packages/KIM.cmake | 5 ++- cmake/Modules/Packages/KOKKOS.cmake | 6 ++-- cmake/Modules/Packages/KSPACE.cmake | 6 ++-- cmake/Modules/Packages/LATTE.cmake | 2 +- cmake/Modules/Packages/MESSAGE.cmake | 2 +- cmake/Modules/Packages/MSCG.cmake | 2 +- cmake/Modules/Packages/PYTHON.cmake | 2 +- cmake/Modules/Packages/USER-COLVARS.cmake | 4 +-- cmake/Modules/Packages/USER-INTEL.cmake | 6 ++-- cmake/Modules/Packages/USER-MOLFILE.cmake | 2 +- cmake/Modules/Packages/USER-NETCDF.cmake | 4 +-- cmake/Modules/Packages/USER-PLUMED.cmake | 8 ++--- cmake/Modules/Packages/USER-QMMM.cmake | 2 +- cmake/Modules/Packages/USER-QUIP.cmake | 2 +- cmake/Modules/Packages/USER-SCAFACOS.cmake | 38 +++++++++++----------- cmake/Modules/Packages/USER-VTK.cmake | 2 +- cmake/Modules/Packages/VORONOI.cmake | 2 +- 20 files changed, 60 insertions(+), 70 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 0fae7f55bf..9190374a2e 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -126,7 +126,6 @@ endif() option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF) include(GNUInstallDirs) -set(LAMMPS_LINK_LIBS) set(LAMMPS_DEPS) set(LAMMPS_API_DEFINES) @@ -173,7 +172,7 @@ if(PKG_USER-ADIOS) # script that defines the MPI::MPI_C target enable_language(C) find_package(ADIOS2 REQUIRED) - list(APPEND LAMMPS_LINK_LIBS adios2::adios2) + target_link_libraries(lammps PRIVATE adios2::adios2) endif() # do MPI detection after language activation, @@ -188,9 +187,8 @@ if(BUILD_MPI) include(MPI4WIN) else() find_package(MPI REQUIRED) - include_directories(${MPI_CXX_INCLUDE_PATH}) add_definitions(-DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1) - list(APPEND LAMMPS_LINK_LIBS ${MPI_CXX_LIBRARIES}) + target_link_libraries(lammps PRIVATE MPI::MPI_CXX) option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF) if(LAMMPS_LONGLONG_TO_LONG) add_definitions(-DLAMMPS_LONGLONG_TO_LONG) @@ -201,7 +199,7 @@ else() file(GLOB MPI_SOURCES ${LAMMPS_SOURCE_DIR}/STUBS/mpi.c) add_library(mpi_stubs STATIC ${MPI_SOURCES}) include_directories(${LAMMPS_SOURCE_DIR}/STUBS) - list(APPEND LAMMPS_LINK_LIBS mpi_stubs) + target_link_libraries(lammps PRIVATE mpi_stubs) endif() set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") @@ -284,8 +282,7 @@ option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND}) if(WITH_JPEG) find_package(JPEG REQUIRED) add_definitions(-DLAMMPS_JPEG) - include_directories(${JPEG_INCLUDE_DIR}) - list(APPEND LAMMPS_LINK_LIBS ${JPEG_LIBRARIES}) + target_link_libraries(lammps PRIVATE JPEG::JPEG) endif() find_package(PNG QUIET) @@ -298,8 +295,7 @@ endif() if(WITH_PNG) find_package(PNG REQUIRED) find_package(ZLIB REQUIRED) - include_directories(${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS}) - list(APPEND LAMMPS_LINK_LIBS ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) + target_link_libraries(lammps PRIVATE PNG::PNG ZLIB::ZLIB) add_definitions(-DLAMMPS_PNG) endif() @@ -376,7 +372,7 @@ include(CheckLibraryExists) # message(FATAL_ERROR "Could not find needed math function - ${FUNC}") # endif(NOT FOUND_${FUNC}_${MATH_LIBRARIES}) #endforeach(FUNC) -list(APPEND LAMMPS_LINK_LIBS ${MATH_LIBRARIES}) +target_link_libraries(lammps PRIVATE ${MATH_LIBRARIES}) ###################################### # Generate Basic Style files @@ -442,7 +438,7 @@ foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD) if(LAMMPS_USE_MPI4WIN) add_dependencies(${PKG_LIB} mpi4win_build) endif() - list(APPEND LAMMPS_LINK_LIBS ${PKG_LIB}) + target_link_libraries(lammps PRIVATE ${PKG_LIB}) if(PKG_LIB STREQUAL awpmd) target_include_directories(awpmd PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/awpmd/systems/interact ${LAMMPS_LIB_SOURCE_DIR}/awpmd/ivutils/include) elseif(PKG_LIB STREQUAL h5md) @@ -486,9 +482,9 @@ include(Packages/GPU) ###################################################################### if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") if(LAMMPS_USE_MPI4WIN) - list(APPEND LAMMPS_LINK_LIBS ${MPI4WIN_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${MPI4WIN_LIBRARIES}) endif() - list(APPEND LAMMPS_LINK_LIBS -lwsock32 -lpsapi) + target_link_libraries(lammps PRIVATE -lwsock32 -lpsapi) endif() ###################################################### @@ -538,11 +534,9 @@ list(APPEND LAMMPS_DEPS gitversion) get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) list (FIND LANGUAGES "Fortran" _index) if (${_index} GREATER -1) - list(APPEND LAMMPS_LINK_LIBS ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) endif() -list(REMOVE_DUPLICATES LAMMPS_LINK_LIBS) if(BUILD_LIB) - target_link_libraries(lammps ${LAMMPS_LINK_LIBS}) if(LAMMPS_DEPS) add_dependencies(lammps ${LAMMPS_DEPS}) endif() @@ -591,7 +585,6 @@ endif() if(BUILD_EXE) if(NOT BUILD_LIB) - target_link_libraries(${LAMMPS_EXE} ${LAMMPS_LINK_LIBS}) if(LAMMPS_DEPS) add_dependencies(${LAMMPS_EXE} ${LAMMPS_DEPS}) endif() @@ -736,7 +729,6 @@ if(BUILD_SHARED_LIBS) else() message(STATUS "Static library flags: ${CMAKE_STATIC_LINKER_FLAGS}") endif() -message(STATUS "Link libraries: ${LAMMPS_LINK_LIBS}") if(BUILD_MPI) message(STATUS "Using MPI with headers in ${MPI_CXX_INCLUDE_PATH} and these libraries: ${MPI_CXX_LIBRARIES};${MPI_Fortran_LIBRARIES}") endif() diff --git a/cmake/Modules/Packages/COMPRESS.cmake b/cmake/Modules/Packages/COMPRESS.cmake index 864b868865..ea5d5e37bd 100644 --- a/cmake/Modules/Packages/COMPRESS.cmake +++ b/cmake/Modules/Packages/COMPRESS.cmake @@ -1,5 +1,4 @@ if(PKG_COMPRESS) find_package(ZLIB REQUIRED) - include_directories(${ZLIB_INCLUDE_DIRS}) - list(APPEND LAMMPS_LINK_LIBS ${ZLIB_LIBRARIES}) + target_link_libraries(lammps PRIVATE ZLIB::ZLIB) endif() diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index e8ca4d35ab..427644f9c7 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -107,7 +107,7 @@ if(PKG_GPU) target_compile_definitions(gpu PRIVATE -DUSE_CUDPP) endif() - list(APPEND LAMMPS_LINK_LIBS gpu) + target_link_libraries(lammps PRIVATE gpu) if(LAMMPS_USE_MPI4WIN) add_dependencies(gpu mpi4win_build) endif() @@ -171,7 +171,7 @@ if(PKG_GPU) target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -D${OCL_TUNE}_OCL -DMPI_GERYON -DUCL_NO_EXIT) target_compile_definitions(gpu PRIVATE -DUSE_OPENCL) - list(APPEND LAMMPS_LINK_LIBS gpu) + target_link_libraries(lammps PRIVATE gpu) if(LAMMPS_USE_MPI4WIN) add_dependencies(gpu mpi4win_build) endif() diff --git a/cmake/Modules/Packages/KIM.cmake b/cmake/Modules/Packages/KIM.cmake index 617068ce13..002fbbcaed 100644 --- a/cmake/Modules/Packages/KIM.cmake +++ b/cmake/Modules/Packages/KIM.cmake @@ -2,8 +2,7 @@ if(PKG_KIM) set(KIM-API_MIN_VERSION 2.1) find_package(CURL) if(CURL_FOUND) - include_directories(${CURL_INCLUDE_DIRS}) - list(APPEND LAMMPS_LINK_LIBS ${CURL_LIBRARIES}) + target_link_libraries(lammps PRIVATE CURL::libcurl) add_definitions(-DLMP_KIM_CURL) set(LMP_DEBUG_CURL OFF CACHE STRING "Set libcurl verbose mode on/off. If on, it displays a lot of verbose information about its operations.") mark_as_advanced(LMP_DEBUG_CURL) @@ -62,6 +61,6 @@ if(PKG_KIM) else() find_package(KIM-API ${KIM-API_MIN_VERSION} REQUIRED) endif() - list(APPEND LAMMPS_LINK_LIBS "${KIM-API_LDFLAGS}") + target_link_libraries(lammps PRIVATE "${KIM-API_LDFLAGS}") include_directories(${KIM-API_INCLUDE_DIRS}) endif() diff --git a/cmake/Modules/Packages/KOKKOS.cmake b/cmake/Modules/Packages/KOKKOS.cmake index 4b871ccb46..58d2c139f6 100644 --- a/cmake/Modules/Packages/KOKKOS.cmake +++ b/cmake/Modules/Packages/KOKKOS.cmake @@ -5,7 +5,7 @@ if(PKG_KOKKOS) option(EXTERNAL_KOKKOS "Build against external kokkos library") if(EXTERNAL_KOKKOS) find_package(Kokkos REQUIRED) - list(APPEND LAMMPS_LINK_LIBS Kokkos::kokkos) + target_link_libraries(lammps PRIVATE Kokkos::kokkos) else() set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos) set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos) @@ -16,7 +16,7 @@ if(PKG_KOKKOS) ${LAMMPS_LIB_KOKKOS_SRC_DIR}/algorithms/src ${LAMMPS_LIB_KOKKOS_BIN_DIR}) include_directories(${Kokkos_INCLUDE_DIRS}) - list(APPEND LAMMPS_LINK_LIBS kokkos) + target_link_libraries(lammps PRIVATE kokkos) endif() add_definitions(-DLMP_KOKKOS) @@ -45,7 +45,7 @@ if(PKG_KOKKOS) if(KOKKOS_ENABLE_CUDA) if(NOT ${FFT} STREQUAL "KISS") add_definitions(-DFFT_CUFFT) - list(APPEND LAMMPS_LINK_LIBS cufft) + target_link_libraries(lammps PRIVATE cufft) endif() endif() endif() diff --git a/cmake/Modules/Packages/KSPACE.cmake b/cmake/Modules/Packages/KSPACE.cmake index 07612447f9..4f92a6963c 100644 --- a/cmake/Modules/Packages/KSPACE.cmake +++ b/cmake/Modules/Packages/KSPACE.cmake @@ -20,7 +20,7 @@ if(PKG_KSPACE) find_package(${FFTW} REQUIRED) add_definitions(-DFFT_FFTW3) include_directories(${${FFTW}_INCLUDE_DIRS}) - list(APPEND LAMMPS_LINK_LIBS ${${FFTW}_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${${FFTW}_LIBRARIES}) if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY) option(FFT_FFTW_THREADS "Use threaded FFTW library" ON) else() @@ -30,7 +30,7 @@ if(PKG_KSPACE) if(FFT_FFTW_THREADS) if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY) add_definitions(-DFFT_FFTW_THREADS) - list(APPEND LAMMPS_LINK_LIBS ${${FFTW}_OMP_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${${FFTW}_OMP_LIBRARIES}) else() message(FATAL_ERROR "Need OpenMP enabled FFTW3 library for FFT_THREADS") endif() @@ -43,7 +43,7 @@ if(PKG_KSPACE) add_definitions(-DFFT_MKL_THREADS) endif() include_directories(${MKL_INCLUDE_DIRS}) - list(APPEND LAMMPS_LINK_LIBS ${MKL_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${MKL_LIBRARIES}) else() # last option is KISSFFT add_definitions(-DFFT_KISS) diff --git a/cmake/Modules/Packages/LATTE.cmake b/cmake/Modules/Packages/LATTE.cmake index 9f665d7f0e..55d9b31797 100644 --- a/cmake/Modules/Packages/LATTE.cmake +++ b/cmake/Modules/Packages/LATTE.cmake @@ -36,5 +36,5 @@ if(PKG_LATTE) if(NOT LAPACK_FOUND) add_dependencies(latte_build linalg) endif() - list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES}) endif() diff --git a/cmake/Modules/Packages/MESSAGE.cmake b/cmake/Modules/Packages/MESSAGE.cmake index aff9c2964a..c28c50c507 100644 --- a/cmake/Modules/Packages/MESSAGE.cmake +++ b/cmake/Modules/Packages/MESSAGE.cmake @@ -27,6 +27,6 @@ if(PKG_MESSAGE) target_include_directories(cslib PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src/STUBS_ZMQ) endif() - list(APPEND LAMMPS_LINK_LIBS cslib) + target_link_libraries(lammps PRIVATE cslib) include_directories(${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src) endif() diff --git a/cmake/Modules/Packages/MSCG.cmake b/cmake/Modules/Packages/MSCG.cmake index 35f0c57449..e300ed6ae2 100644 --- a/cmake/Modules/Packages/MSCG.cmake +++ b/cmake/Modules/Packages/MSCG.cmake @@ -43,6 +43,6 @@ if(PKG_MSCG) message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIRS, or set DOWNLOAD_MSCG=ON to download it") endif() endif() - list(APPEND LAMMPS_LINK_LIBS ${MSCG_LIBRARIES} ${GSL_LIBRARIES} ${LAPACK_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${MSCG_LIBRARIES} GSL::gsl ${LAPACK_LIBRARIES}) include_directories(${MSCG_INCLUDE_DIRS}) endif() diff --git a/cmake/Modules/Packages/PYTHON.cmake b/cmake/Modules/Packages/PYTHON.cmake index 4f8959ae38..7d6e2999f7 100644 --- a/cmake/Modules/Packages/PYTHON.cmake +++ b/cmake/Modules/Packages/PYTHON.cmake @@ -2,5 +2,5 @@ if(PKG_PYTHON) find_package(PythonLibs REQUIRED) add_definitions(-DLMP_PYTHON) include_directories(${PYTHON_INCLUDE_DIR}) - list(APPEND LAMMPS_LINK_LIBS ${PYTHON_LIBRARY}) + target_link_libraries(lammps PRIVATE ${PYTHON_LIBRARY}) endif() diff --git a/cmake/Modules/Packages/USER-COLVARS.cmake b/cmake/Modules/Packages/USER-COLVARS.cmake index a112fbb6aa..2a337b9c8b 100644 --- a/cmake/Modules/Packages/USER-COLVARS.cmake +++ b/cmake/Modules/Packages/USER-COLVARS.cmake @@ -16,10 +16,10 @@ if(PKG_USER-COLVARS) add_library(colvars STATIC ${COLVARS_SOURCES}) target_include_directories(colvars PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/colvars) - list(APPEND LAMMPS_LINK_LIBS colvars) + target_link_libraries(lammps PRIVATE colvars) if(COLVARS_LEPTON) - list(APPEND LAMMPS_LINK_LIBS lepton) + target_link_libraries(lammps PRIVATE lepton) target_compile_options(colvars PRIVATE -DLEPTON) target_include_directories(colvars PUBLIC ${LEPTON_DIR}/include) endif() diff --git a/cmake/Modules/Packages/USER-INTEL.cmake b/cmake/Modules/Packages/USER-INTEL.cmake index 7b08a7b459..0a9b634bc7 100644 --- a/cmake/Modules/Packages/USER-INTEL.cmake +++ b/cmake/Modules/Packages/USER-INTEL.cmake @@ -25,7 +25,7 @@ if(PKG_USER-INTEL) if(INTEL_LRT_MODE STREQUAL "THREADS") if(Threads_FOUND) add_definitions(-DLMP_INTEL_USELRT) - list(APPEND LAMMPS_LINK_LIBS ${CMAKE_THREAD_LIBS_INIT}) + target_link_libraries(lammps PRIVATE Threads::Threads) else() message(FATAL_ERROR "Must have working threads library for Long-range thread support") endif() @@ -44,7 +44,7 @@ if(PKG_USER-INTEL) find_package(TBB QUIET) if(TBB_FOUND) - list(APPEND LAMMPS_LINK_LIBS ${TBB_MALLOC_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${TBB_MALLOC_LIBRARIES}) else() add_definitions(-DLMP_INTEL_NO_TBB) if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") @@ -55,7 +55,7 @@ if(PKG_USER-INTEL) find_package(MKL QUIET) if(MKL_FOUND) add_definitions(-DLMP_USE_MKL_RNG) - list(APPEND LAMMPS_LINK_LIBS ${MKL_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${MKL_LIBRARIES}) else() message(STATUS "Pair style dpd/intel will be faster with MKL libraries") endif() diff --git a/cmake/Modules/Packages/USER-MOLFILE.cmake b/cmake/Modules/Packages/USER-MOLFILE.cmake index 16ffc34994..cbba1eee7b 100644 --- a/cmake/Modules/Packages/USER-MOLFILE.cmake +++ b/cmake/Modules/Packages/USER-MOLFILE.cmake @@ -6,5 +6,5 @@ if(PKG_USER-MOLFILE) if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS}) endif() - list(APPEND LAMMPS_LINK_LIBS molfile) + target_link_libraries(lammps PRIVATE molfile) endif() diff --git a/cmake/Modules/Packages/USER-NETCDF.cmake b/cmake/Modules/Packages/USER-NETCDF.cmake index 921156f1e0..8d62f5f7ec 100644 --- a/cmake/Modules/Packages/USER-NETCDF.cmake +++ b/cmake/Modules/Packages/USER-NETCDF.cmake @@ -10,13 +10,13 @@ if(PKG_USER-NETCDF) if(NETCDF_FOUND) include_directories(${NETCDF_INCLUDE_DIRS}) - list(APPEND LAMMPS_LINK_LIBS ${NETCDF_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${NETCDF_LIBRARIES}) add_definitions(-DLMP_HAS_NETCDF) endif(NETCDF_FOUND) if(PNETCDF_FOUND) include_directories(${PNETCDF_INCLUDES}) - list(APPEND LAMMPS_LINK_LIBS ${PNETCDF_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${PNETCDF_LIBRARIES}) add_definitions(-DLMP_HAS_PNETCDF) endif(PNETCDF_FOUND) diff --git a/cmake/Modules/Packages/USER-PLUMED.cmake b/cmake/Modules/Packages/USER-PLUMED.cmake index 426ae2df2a..9669f1955c 100644 --- a/cmake/Modules/Packages/USER-PLUMED.cmake +++ b/cmake/Modules/Packages/USER-PLUMED.cmake @@ -70,12 +70,12 @@ if(PKG_USER-PLUMED) list(APPEND LAMMPS_DEPS plumed_build) if(PLUMED_MODE STREQUAL "STATIC") add_definitions(-D__PLUMED_WRAPPER_CXX=1) - list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumed.a ${PLUMED_LINK_LIBS} ${CMAKE_DL_LIBS}) + target_link_libraries(lammps ${PLUMED_INSTALL_DIR}/lib/libplumed.a ${PLUMED_LINK_LIBS} ${CMAKE_DL_LIBS}) elseif(PLUMED_MODE STREQUAL "SHARED") - list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumed${CMAKE_SHARED_LIBRARY_SUFFIX} ${PLUMED_INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_DL_LIBS}) + target_link_libraries(lammps PRIVATE ${PLUMED_INSTALL_DIR}/lib/libplumed${CMAKE_SHARED_LIBRARY_SUFFIX} ${PLUMED_INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_DL_LIBS}) elseif(PLUMED_MODE STREQUAL "RUNTIME") add_definitions(-D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=${PLUMED_INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}) - list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumedWrapper.a -rdynamic ${CMAKE_DL_LIBS}) + target_link_libraries(lammps PRIVATE ${PLUMED_INSTALL_DIR}/lib/libplumedWrapper.a -rdynamic ${CMAKE_DL_LIBS}) endif() set(PLUMED_INCLUDE_DIRS "${PLUMED_INSTALL_DIR}/include") else() @@ -90,7 +90,7 @@ if(PKG_USER-PLUMED) add_definitions(-D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}) include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime) endif() - list(APPEND LAMMPS_LINK_LIBS ${PLUMED_LOAD}) + target_link_libraries(lammps PRIVATE ${PLUMED_LOAD}) endif() include_directories(${PLUMED_INCLUDE_DIRS}) endif() diff --git a/cmake/Modules/Packages/USER-QMMM.cmake b/cmake/Modules/Packages/USER-QMMM.cmake index 544455868e..0f3fa93b2a 100644 --- a/cmake/Modules/Packages/USER-QMMM.cmake +++ b/cmake/Modules/Packages/USER-QMMM.cmake @@ -8,6 +8,6 @@ if(PKG_USER-QMMM) message(WARNING "It is recommended to use BUILD_SHARED_LIBS=yes with USER-QMMM") endif() add_library(qmmm STATIC ${LAMMPS_LIB_SOURCE_DIR}/qmmm/libqmmm.c) - list(APPEND LAMMPS_LINK_LIBS qmmm) + target_link_libraries(lammps PRIVATE qmmm) target_include_directories(qmmm PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/qmmm) endif() diff --git a/cmake/Modules/Packages/USER-QUIP.cmake b/cmake/Modules/Packages/USER-QUIP.cmake index 93096a2f54..52ba7e9c47 100644 --- a/cmake/Modules/Packages/USER-QUIP.cmake +++ b/cmake/Modules/Packages/USER-QUIP.cmake @@ -1,5 +1,5 @@ if(PKG_USER-QUIP) enable_language(Fortran) find_package(QUIP REQUIRED) - list(APPEND LAMMPS_LINK_LIBS ${QUIP_LIBRARIES} ${LAPACK_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${LAPACK_LIBRARIES}) endif() diff --git a/cmake/Modules/Packages/USER-SCAFACOS.cmake b/cmake/Modules/Packages/USER-SCAFACOS.cmake index 8bb9e63605..0fac1fe919 100644 --- a/cmake/Modules/Packages/USER-SCAFACOS.cmake +++ b/cmake/Modules/Packages/USER-SCAFACOS.cmake @@ -49,28 +49,28 @@ if(PKG_USER-SCAFACOS) set(SCAFACOS_INCLUDE_DIRS ${SCAFACOS_BUILD_DIR}/include) list(APPEND LAMMPS_DEPS scafacos_build) # list and order from pkg_config file of ScaFaCoS build - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_direct.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_ewald.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_fmm.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_p2nfft.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_p3m.a) - list(APPEND LAMMPS_LINK_LIBS ${GSL_LIBRARIES}) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_near.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_gridsort.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_resort.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_redist.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_common.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_pnfft.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_pfft.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_fftw3_mpi.a) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_fftw3.a) - list(APPEND LAMMPS_LINK_LIBS ${MPI_Fortran_LIBRARIES}) - list(APPEND LAMMPS_LINK_LIBS ${MPI_C_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_direct.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_ewald.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_fmm.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_p2nfft.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_p3m.a) + target_link_libraries(lammps PRIVATE ${GSL_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_near.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_gridsort.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_resort.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_redist.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_common.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_pnfft.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_pfft.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_fftw3_mpi.a) + target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_fftw3.a) + target_link_libraries(lammps PRIVATE ${MPI_Fortran_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${MPI_C_LIBRARIES}) else() find_package(PkgConfig REQUIRED) pkg_check_modules(SCAFACOS REQUIRED scafacos) - list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_LDFLAGS}) + target_link_libraries(lammps PRIVATE ${SCAFACOS_LDFLAGS}) endif() include_directories(${SCAFACOS_INCLUDE_DIRS}) endif() diff --git a/cmake/Modules/Packages/USER-VTK.cmake b/cmake/Modules/Packages/USER-VTK.cmake index d264577ca2..fb69f115b2 100644 --- a/cmake/Modules/Packages/USER-VTK.cmake +++ b/cmake/Modules/Packages/USER-VTK.cmake @@ -2,5 +2,5 @@ if(PKG_USER-VTK) find_package(VTK REQUIRED NO_MODULE) include(${VTK_USE_FILE}) add_definitions(-DLAMMPS_VTK) - list(APPEND LAMMPS_LINK_LIBS ${VTK_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${VTK_LIBRARIES}) endif() diff --git a/cmake/Modules/Packages/VORONOI.cmake b/cmake/Modules/Packages/VORONOI.cmake index 5418132034..f567c35597 100644 --- a/cmake/Modules/Packages/VORONOI.cmake +++ b/cmake/Modules/Packages/VORONOI.cmake @@ -39,5 +39,5 @@ if(PKG_VORONOI) endif() endif() include_directories(${VORO_INCLUDE_DIRS}) - list(APPEND LAMMPS_LINK_LIBS ${VORO_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${VORO_LIBRARIES}) endif() From 0e3f4f3de2bd7ad50a70353e9e749758796cb10d Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sun, 22 Mar 2020 19:07:23 -0600 Subject: [PATCH 064/577] cmake: remove LAMMPS_DEPS --- cmake/CMakeLists.txt | 12 +----------- cmake/Modules/MPI4WIN.cmake | 2 +- cmake/Modules/Packages/KIM.cmake | 2 +- cmake/Modules/Packages/LATTE.cmake | 2 +- cmake/Modules/Packages/MSCG.cmake | 2 +- cmake/Modules/Packages/USER-PLUMED.cmake | 2 +- cmake/Modules/Packages/USER-SCAFACOS.cmake | 2 +- cmake/Modules/Packages/USER-SMD.cmake | 2 +- cmake/Modules/Packages/VORONOI.cmake | 2 +- 9 files changed, 9 insertions(+), 19 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 9190374a2e..b9e8d5b919 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -126,7 +126,6 @@ endif() option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF) include(GNUInstallDirs) -set(LAMMPS_DEPS) set(LAMMPS_API_DEFINES) set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE @@ -526,7 +525,7 @@ add_custom_target(gitversion COMMAND ${CMAKE_COMMAND} -DLAMMPS_STYLE_HEADERS_DIR="${LAMMPS_STYLE_HEADERS_DIR}" -P ${CMAKE_CURRENT_SOURCE_DIR}/Modules/generate_lmpgitversion.cmake) set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${LAMMPS_STYLE_HEADERS_DIR}/gitversion.h) -list(APPEND LAMMPS_DEPS gitversion) +add_dependencies(lammps gitversion) ########################################### # Actually add executable and lib to build @@ -537,9 +536,6 @@ if (${_index} GREATER -1) target_link_libraries(lammps PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) endif() if(BUILD_LIB) - if(LAMMPS_DEPS) - add_dependencies(lammps ${LAMMPS_DEPS}) - endif() set(LAMMPS_CXX_HEADERS ${LAMMPS_SOURCE_DIR}/angle.h ${LAMMPS_SOURCE_DIR}/atom.h @@ -584,12 +580,6 @@ if(BUILD_LIB) endif() if(BUILD_EXE) - if(NOT BUILD_LIB) - if(LAMMPS_DEPS) - add_dependencies(${LAMMPS_EXE} ${LAMMPS_DEPS}) - endif() - endif() - set_target_properties(${LAMMPS_EXE} PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY}) install(TARGETS ${LAMMPS_EXE} DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES ${LAMMPS_DOC_DIR}/lammps.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 RENAME ${LAMMPS_BINARY}.1) diff --git a/cmake/Modules/MPI4WIN.cmake b/cmake/Modules/MPI4WIN.cmake index 1f3195041a..1fe6daada3 100644 --- a/cmake/Modules/MPI4WIN.cmake +++ b/cmake/Modules/MPI4WIN.cmake @@ -19,5 +19,5 @@ ExternalProject_get_property(mpi4win_build SOURCE_DIR) add_definitions(-DMPICH_SKIP_MPICXX) include_directories("${SOURCE_DIR}/include") set(MPI4WIN_LIBRARIES "${SOURCE_DIR}/lib/libmpi.a") -list(APPEND LAMMPS_DEPS mpi4win_build) +add_dependencies(lammps mpi4win_build) set(LAMMPS_USE_MPI4WIN ON) diff --git a/cmake/Modules/Packages/KIM.cmake b/cmake/Modules/Packages/KIM.cmake index 002fbbcaed..56fc1449fa 100644 --- a/cmake/Modules/Packages/KIM.cmake +++ b/cmake/Modules/Packages/KIM.cmake @@ -57,7 +57,7 @@ if(PKG_KIM) ExternalProject_get_property(kim_build INSTALL_DIR) set(KIM-API_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api) set(KIM-API_LDFLAGS ${INSTALL_DIR}/${_KIM_LIBDIR}/libkim-api${CMAKE_SHARED_LIBRARY_SUFFIX}) - list(APPEND LAMMPS_DEPS kim_build) + add_dependencies(lammps kim_build) else() find_package(KIM-API ${KIM-API_MIN_VERSION} REQUIRED) endif() diff --git a/cmake/Modules/Packages/LATTE.cmake b/cmake/Modules/Packages/LATTE.cmake index 55d9b31797..abadd1cd97 100644 --- a/cmake/Modules/Packages/LATTE.cmake +++ b/cmake/Modules/Packages/LATTE.cmake @@ -24,7 +24,7 @@ if(PKG_LATTE) -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} BUILD_BYPRODUCTS /${_LATTE_LIBDIR}/liblatte.a ) - list(APPEND LAMMPS_DEPS latte_build) + add_dependencies(lammps latte_build) ExternalProject_get_property(latte_build INSTALL_DIR) set(LATTE_LIBRARIES ${INSTALL_DIR}/${_LATTE_LIBDIR}/liblatte.a) else() diff --git a/cmake/Modules/Packages/MSCG.cmake b/cmake/Modules/Packages/MSCG.cmake index e300ed6ae2..2c63e69fa7 100644 --- a/cmake/Modules/Packages/MSCG.cmake +++ b/cmake/Modules/Packages/MSCG.cmake @@ -32,7 +32,7 @@ if(PKG_MSCG) set(MSCG_LIBRARIES ${BINARY_DIR}/libmscg.a) ExternalProject_get_property(mscg_build SOURCE_DIR) set(MSCG_INCLUDE_DIRS ${SOURCE_DIR}/src) - list(APPEND LAMMPS_DEPS mscg_build) + add_dependencies(lammps mscg_build) if(NOT LAPACK_FOUND) file(MAKE_DIRECTORY ${MSCG_INCLUDE_DIRS}) add_dependencies(mscg_build linalg) diff --git a/cmake/Modules/Packages/USER-PLUMED.cmake b/cmake/Modules/Packages/USER-PLUMED.cmake index 9669f1955c..2bca281fa8 100644 --- a/cmake/Modules/Packages/USER-PLUMED.cmake +++ b/cmake/Modules/Packages/USER-PLUMED.cmake @@ -67,7 +67,7 @@ if(PKG_USER-PLUMED) ) ExternalProject_get_property(plumed_build INSTALL_DIR) set(PLUMED_INSTALL_DIR ${INSTALL_DIR}) - list(APPEND LAMMPS_DEPS plumed_build) + add_dependencies(lammps plumed_build) if(PLUMED_MODE STREQUAL "STATIC") add_definitions(-D__PLUMED_WRAPPER_CXX=1) target_link_libraries(lammps ${PLUMED_INSTALL_DIR}/lib/libplumed.a ${PLUMED_LINK_LIBS} ${CMAKE_DL_LIBS}) diff --git a/cmake/Modules/Packages/USER-SCAFACOS.cmake b/cmake/Modules/Packages/USER-SCAFACOS.cmake index 0fac1fe919..ebd750c04b 100644 --- a/cmake/Modules/Packages/USER-SCAFACOS.cmake +++ b/cmake/Modules/Packages/USER-SCAFACOS.cmake @@ -47,7 +47,7 @@ if(PKG_USER-SCAFACOS) ExternalProject_get_property(scafacos_build INSTALL_DIR) set(SCAFACOS_BUILD_DIR ${INSTALL_DIR}) set(SCAFACOS_INCLUDE_DIRS ${SCAFACOS_BUILD_DIR}/include) - list(APPEND LAMMPS_DEPS scafacos_build) + add_dependencies(lammps scafacos_build) # list and order from pkg_config file of ScaFaCoS build target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs.a) target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_direct.a) diff --git a/cmake/Modules/Packages/USER-SMD.cmake b/cmake/Modules/Packages/USER-SMD.cmake index a868918e37..eed60ae8bd 100644 --- a/cmake/Modules/Packages/USER-SMD.cmake +++ b/cmake/Modules/Packages/USER-SMD.cmake @@ -16,7 +16,7 @@ if(PKG_USER-SMD) ) ExternalProject_get_property(Eigen3_build SOURCE_DIR) set(EIGEN3_INCLUDE_DIR ${SOURCE_DIR}) - list(APPEND LAMMPS_DEPS Eigen3_build) + add_dependencies(lammps Eigen3_build) else() find_package(Eigen3 NO_MODULE) mark_as_advanced(Eigen3_DIR) diff --git a/cmake/Modules/Packages/VORONOI.cmake b/cmake/Modules/Packages/VORONOI.cmake index f567c35597..d2bb185228 100644 --- a/cmake/Modules/Packages/VORONOI.cmake +++ b/cmake/Modules/Packages/VORONOI.cmake @@ -31,7 +31,7 @@ if(PKG_VORONOI) ExternalProject_get_property(voro_build SOURCE_DIR) set(VORO_LIBRARIES ${SOURCE_DIR}/src/libvoro++.a) set(VORO_INCLUDE_DIRS ${SOURCE_DIR}/src) - list(APPEND LAMMPS_DEPS voro_build) + add_dependencies(lammps voro_build) else() find_package(VORO) if(NOT VORO_FOUND) From 3076e267073f7501467933cb846a1b129373e2fb Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sun, 22 Mar 2020 19:20:00 -0600 Subject: [PATCH 065/577] cmake: create imported target for FFTW --- cmake/Modules/FindFFTW3.cmake | 28 +++++++++++++++++++++++---- cmake/Modules/FindFFTW3F.cmake | 30 ++++++++++++++++++++++++----- cmake/Modules/Packages/KSPACE.cmake | 5 ++--- 3 files changed, 51 insertions(+), 12 deletions(-) diff --git a/cmake/Modules/FindFFTW3.cmake b/cmake/Modules/FindFFTW3.cmake index 63752f85df..708ec49509 100644 --- a/cmake/Modules/FindFFTW3.cmake +++ b/cmake/Modules/FindFFTW3.cmake @@ -14,14 +14,34 @@ find_path(FFTW3_INCLUDE_DIR fftw3.h HINTS ${PC_FFTW3_INCLUDE_DIRS}) find_library(FFTW3_LIBRARY NAMES fftw3 HINTS ${PC_FFTW3_LIBRARY_DIRS}) find_library(FFTW3_OMP_LIBRARY NAMES fftw3_omp HINTS ${PC_FFTW3_LIBRARY_DIRS}) -set(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR}) -set(FFTW3_LIBRARIES ${FFTW3_LIBRARY}) -set(FFTW3_OMP_LIBRARIES ${FFTW3_OMP_LIBRARY}) - include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(FFTW3 DEFAULT_MSG FFTW3_LIBRARY FFTW3_INCLUDE_DIR) +# Copy the results to the output variables and target. +if(FFTW3_FOUND) + set(FFTW3_LIBRARIES ${FFTW3_LIBRARY} ) + set(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR} ) + + if(NOT TARGET FFTW3::FFTW3) + add_library(FFTW3::FFTW3 UNKNOWN IMPORTED) + set_target_properties(FFTW3::FFTW3 PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${FFTW3_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${FFTW3_INCLUDE_DIRS}") + endif() + if(FFTW3_OMP_LIBRARY) + set(FFTW3_OMP_LIBRARIES ${FFTW3_OMP_LIBRARY}) + if(NOT TARGET FFTW3::FFTW3_OMP) + add_library(FFTW3::FFTW3_OMP UNKNOWN IMPORTED) + set_target_properties(FFTW3::FFTW3_OMP PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${FFTW3_OMP_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${FFTW3_INCLUDE_DIRS}") + endif() + endif() +endif() + mark_as_advanced(FFTW3_INCLUDE_DIR FFTW3_LIBRARY FFTW3_OMP_LIBRARY) diff --git a/cmake/Modules/FindFFTW3F.cmake b/cmake/Modules/FindFFTW3F.cmake index c67aa5faf1..3dbcdaa04e 100644 --- a/cmake/Modules/FindFFTW3F.cmake +++ b/cmake/Modules/FindFFTW3F.cmake @@ -13,14 +13,34 @@ find_path(FFTW3F_INCLUDE_DIR fftw3.h HINTS ${PC_FFTW3F_INCLUDE_DIRS}) find_library(FFTW3F_LIBRARY NAMES fftw3f HINTS ${PC_FFTW3F_LIBRARY_DIRS}) find_library(FFTW3F_OMP_LIBRARY NAMES fftw3f_omp HINTS ${PC_FFTW3F_LIBRARY_DIRS}) -set(FFTW3F_INCLUDE_DIRS ${FFTW3F_INCLUDE_DIR}) -set(FFTW3F_LIBRARIES ${FFTW3F_LIBRARY}) -set(FFTW3F_OMP_LIBRARIES ${FFTW3F_OMP_LIBRARY}) - include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set FFTW3F_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(FFTW3F DEFAULT_MSG FFTW3F_LIBRARY FFTW3F_INCLUDE_DIR) -mark_as_advanced(FFTW3F_INCLUDE_DIR FFTW3F_LIBRARY) +# Copy the results to the output variables and target. +if(FFTW3F_FOUND) + set(FFTW3F_LIBRARIES ${FFTW3F_LIBRARY} ) + set(FFTW3F_INCLUDE_DIRS ${FFTW3F_INCLUDE_DIR} ) + + if(NOT TARGET FFTW3F::FFTW3F) + add_library(FFTW3F::FFTW3F UNKNOWN IMPORTED) + set_target_properties(FFTW3F::FFTW3F PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${FFTW3F_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${FFTW3F_INCLUDE_DIRS}") + endif() + if(FFTW3F_OMP_LIBRARY) + set(FFTW3F_OMP_LIBRARIES ${FFTW3F_OMP_LIBRARY}) + if(NOT TARGET FFTW3F::FFTW3F_OMP) + add_library(FFTW3F::FFTW3F_OMP UNKNOWN IMPORTED) + set_target_properties(FFTW3F::FFTW3F_OMP PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${FFTW3F_OMP_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${FFTW3F_INCLUDE_DIRS}") + endif() + endif() +endif() + +mark_as_advanced(FFTW3F_INCLUDE_DIR FFTW3F_LIBRARY FFTW3F_OMP_LIBRARY) diff --git a/cmake/Modules/Packages/KSPACE.cmake b/cmake/Modules/Packages/KSPACE.cmake index 4f92a6963c..db12787013 100644 --- a/cmake/Modules/Packages/KSPACE.cmake +++ b/cmake/Modules/Packages/KSPACE.cmake @@ -19,8 +19,7 @@ if(PKG_KSPACE) if(FFT STREQUAL "FFTW3") find_package(${FFTW} REQUIRED) add_definitions(-DFFT_FFTW3) - include_directories(${${FFTW}_INCLUDE_DIRS}) - target_link_libraries(lammps PRIVATE ${${FFTW}_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${FFTW}::${FFTW}) if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY) option(FFT_FFTW_THREADS "Use threaded FFTW library" ON) else() @@ -30,7 +29,7 @@ if(PKG_KSPACE) if(FFT_FFTW_THREADS) if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY) add_definitions(-DFFT_FFTW_THREADS) - target_link_libraries(lammps PRIVATE ${${FFTW}_OMP_LIBRARIES}) + target_link_libraries(lammps PRIVATE ${FFTW}::${FFTW}_OMP) else() message(FATAL_ERROR "Need OpenMP enabled FFTW3 library for FFT_THREADS") endif() From 591212af3ac3a6c0d5f9fce59199b39b279929e8 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sun, 22 Mar 2020 19:57:48 -0600 Subject: [PATCH 066/577] cmake: add back include path for now --- cmake/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index b9e8d5b919..c6d149e7d6 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -112,15 +112,17 @@ if(BUILD_LIB) add_library(lammps ${ALL_SOURCES}) if(BUILD_EXE) add_executable(lmp ${MAIN_SOURCES}) - set(LAMMPS_EXE lmp) target_link_libraries(lmp PRIVATE lammps) + set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY}) + install(TARGETS lmp DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() else() if(NOT BUILD_EXE) message(FATAL_ERROR "You need to at least enable one of two following options: BUILD_LIB or BUILD_EXE") endif() add_executable(lammps ${ALL_SOURCES}) - set(LAMMPS_EXE lammps) + set_target_properties(lammps PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY}) + install(TARGETS lammps DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF) @@ -186,6 +188,7 @@ if(BUILD_MPI) include(MPI4WIN) else() find_package(MPI REQUIRED) + include_directories(${MPI_CXX_INCLUDE_PATH}) add_definitions(-DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1) target_link_libraries(lammps PRIVATE MPI::MPI_CXX) option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF) @@ -580,8 +583,6 @@ if(BUILD_LIB) endif() if(BUILD_EXE) - set_target_properties(${LAMMPS_EXE} PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY}) - install(TARGETS ${LAMMPS_EXE} DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES ${LAMMPS_DOC_DIR}/lammps.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 RENAME ${LAMMPS_BINARY}.1) endif() From a42f7163d222367003c291e7c307521966c9a266 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sun, 22 Mar 2020 21:29:15 -0600 Subject: [PATCH 067/577] cmake: move include up --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index c6d149e7d6..ae80996196 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -105,6 +105,7 @@ endif() option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF) +include(GNUInstallDirs) file(GLOB ALL_SOURCES ${LAMMPS_SOURCE_DIR}/[^.]*.cpp) if(BUILD_LIB) file(GLOB MAIN_SOURCES ${LAMMPS_SOURCE_DIR}/main.cpp) @@ -126,7 +127,6 @@ else() endif() option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF) -include(GNUInstallDirs) set(LAMMPS_API_DEFINES) From 6ee25db32a46c80da89a69ccfa667e283404ff3a Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 23 Mar 2020 08:00:51 -0600 Subject: [PATCH 068/577] cmake: fftw needs to be public due to DSO --- cmake/Modules/Packages/KSPACE.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/Packages/KSPACE.cmake b/cmake/Modules/Packages/KSPACE.cmake index db12787013..2a586dccf3 100644 --- a/cmake/Modules/Packages/KSPACE.cmake +++ b/cmake/Modules/Packages/KSPACE.cmake @@ -19,7 +19,7 @@ if(PKG_KSPACE) if(FFT STREQUAL "FFTW3") find_package(${FFTW} REQUIRED) add_definitions(-DFFT_FFTW3) - target_link_libraries(lammps PRIVATE ${FFTW}::${FFTW}) + target_link_libraries(lammps PUBLIC ${FFTW}::${FFTW}) if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY) option(FFT_FFTW_THREADS "Use threaded FFTW library" ON) else() From 9b8266173faff9ab80e77461be42e566e658491e Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 23 Mar 2020 08:23:16 -0600 Subject: [PATCH 069/577] cmake: JPEG imported target is >=cmake-3.12 only --- cmake/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index ae80996196..6dd80d3253 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -284,7 +284,12 @@ option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND}) if(WITH_JPEG) find_package(JPEG REQUIRED) add_definitions(-DLAMMPS_JPEG) - target_link_libraries(lammps PRIVATE JPEG::JPEG) + if(CMAKE_VERSION VERSION_LESS 3.12) + include_directories(${JPEG_INCLUDE_DIR}) + target_link_libraries(lammps PRIVATE ${JPEG_LIBRARIES}) + else() + target_link_libraries(lammps PRIVATE JPEG::JPEG) + endif() endif() find_package(PNG QUIET) From d92b9ba8d0c38de37c1699dbcaecfce7931766db Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 23 Mar 2020 08:51:29 -0600 Subject: [PATCH 070/577] cmake: mpi needs to be public due to DSO --- cmake/CMakeLists.txt | 2 +- cmake/Modules/Packages/USER-PLUMED.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 6dd80d3253..362cce94db 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -190,7 +190,7 @@ if(BUILD_MPI) find_package(MPI REQUIRED) include_directories(${MPI_CXX_INCLUDE_PATH}) add_definitions(-DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1) - target_link_libraries(lammps PRIVATE MPI::MPI_CXX) + target_link_libraries(lammps PUBLIC MPI::MPI_CXX) option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF) if(LAMMPS_LONGLONG_TO_LONG) add_definitions(-DLAMMPS_LONGLONG_TO_LONG) diff --git a/cmake/Modules/Packages/USER-PLUMED.cmake b/cmake/Modules/Packages/USER-PLUMED.cmake index 2bca281fa8..a6cd20adbb 100644 --- a/cmake/Modules/Packages/USER-PLUMED.cmake +++ b/cmake/Modules/Packages/USER-PLUMED.cmake @@ -70,7 +70,7 @@ if(PKG_USER-PLUMED) add_dependencies(lammps plumed_build) if(PLUMED_MODE STREQUAL "STATIC") add_definitions(-D__PLUMED_WRAPPER_CXX=1) - target_link_libraries(lammps ${PLUMED_INSTALL_DIR}/lib/libplumed.a ${PLUMED_LINK_LIBS} ${CMAKE_DL_LIBS}) + target_link_libraries(lammps PRIVATE ${PLUMED_INSTALL_DIR}/lib/libplumed.a ${PLUMED_LINK_LIBS} ${CMAKE_DL_LIBS}) elseif(PLUMED_MODE STREQUAL "SHARED") target_link_libraries(lammps PRIVATE ${PLUMED_INSTALL_DIR}/lib/libplumed${CMAKE_SHARED_LIBRARY_SUFFIX} ${PLUMED_INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_DL_LIBS}) elseif(PLUMED_MODE STREQUAL "RUNTIME") From 0f00bb1ca6c08c3d5fcc14857f2a629fd9c8292d Mon Sep 17 00:00:00 2001 From: david-castillo Date: Mon, 23 Mar 2020 16:48:08 +0100 Subject: [PATCH 071/577] Added new argument r0stop to fix restrain bond Added new fix restrain lowerbound harmonic --- doc/src/fix_restrain.rst | 33 +++++++++- src/fix_restrain.cpp | 133 ++++++++++++++++++++++++++++++++++++--- src/fix_restrain.h | 4 +- 3 files changed, 160 insertions(+), 10 deletions(-) diff --git a/doc/src/fix_restrain.rst b/doc/src/fix_restrain.rst index 3965cee04d..9b9beaa5ac 100644 --- a/doc/src/fix_restrain.rst +++ b/doc/src/fix_restrain.rst @@ -17,10 +17,18 @@ Syntax .. parsed-literal:: - *bond* args = atom1 atom2 Kstart Kstop r0 + *bond* args = atom1 atom2 Kstart Kstop r0start r0stop atom1,atom2 = IDs of 2 atoms in bond Kstart,Kstop = restraint coefficients at start/end of run (energy units) - r0 = equilibrium bond distance (distance units) + r0start = equilibrium bond distance at start of run (distance units) + r0stop = equilibrium bond distance at end of run (distance units). If not + specified it's assumed to be equal to r0start + *lbond* args = atom1 atom2 Kstart Kstop r0start r0stop + atom1,atom2 = IDs of 2 atoms in bond + Kstart,Kstop = restraint coefficients at start/end of run (energy units) + r0start = equilibrium bond distance at start of run (distance units) + r0stop = equilibrium bond distance at end of run (distance units). If not + specified it's assumed to be equal to r0start *angle* args = atom1 atom2 atom3 Kstart Kstop theta0 atom1,atom2,atom3 = IDs of 3 atoms in angle, atom2 = middle atom Kstart,Kstop = restraint coefficients at start/end of run (energy units) @@ -38,6 +46,7 @@ Examples .. code-block:: LAMMPS fix holdem all restrain bond 45 48 2000.0 2000.0 2.75 + fix holdem all restrain lbond 45 48 2000.0 2000.0 2.75 fix holdem all restrain dihedral 1 2 3 4 2000.0 2000.0 120.0 fix holdem all restrain bond 45 48 2000.0 2000.0 2.75 dihedral 1 2 3 4 2000.0 2000.0 120.0 fix texas_holdem all restrain dihedral 1 2 3 4 0.0 2000.0 120.0 dihedral 1 2 3 5 0.0 2000.0 -120.0 dihedral 1 2 3 6 0.0 2000.0 0.0 @@ -141,6 +150,26 @@ is included in :math:`K`. ---------- +The *lbond* keyword applies a lowerbound bond restraint to the specified atoms +using the same functional form used by the :doc:`bond_style harmonic ` command if the distance between +the atoms is smaller than the equilibrium bond distance and 0 otherwise. The potential associated with +the restraint is + +.. math:: + + E = K (r - r_0)^2 if r < r_0 + E = 0 if r >= r_0 + +with the following coefficients: + +* :math:`K` (energy/distance\^2) +* :math:`r_0` (distance) + +:math:`K` and :math:`r_0` are specified with the fix. Note that the usual 1/2 factor +is included in :math:`K`. + +---------- + The *angle* keyword applies an angle restraint to the specified atoms using the same functional form used by the :doc:`angle_style harmonic ` command. The potential associated with the restraint is diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index 5a0d4fb662..5f65d7069b 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -34,7 +34,7 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; -enum{BOND,ANGLE,DIHEDRAL}; +enum{BOND,LBOUND,ANGLE,DIHEDRAL}; #define TOLERANCE 0.05 #define SMALL 0.001 @@ -45,7 +45,7 @@ enum{BOND,ANGLE,DIHEDRAL}; FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), rstyle(NULL), mult(NULL), ids(NULL), kstart(NULL), kstop(NULL), target(NULL), - cos_target(NULL), sin_target(NULL) + deqstart(NULL), deqstop(NULL), cos_target(NULL), sin_target(NULL) { if (narg < 4) error->all(FLERR,"Illegal fix restrain command"); @@ -72,6 +72,8 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : memory->grow(kstart,maxrestrain,"restrain:kstart"); memory->grow(kstop,maxrestrain,"restrain:kstop"); memory->grow(target,maxrestrain,"restrain:target"); + memory->grow(deqstart,maxrestrain,"restrain:deqstart"); + memory->grow(deqstop,maxrestrain,"restrain:deqstop"); memory->grow(cos_target,maxrestrain,"restrain:cos_target"); memory->grow(sin_target,maxrestrain,"restrain:sin_target"); } @@ -83,8 +85,29 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : ids[nrestrain][1] = force->inumeric(FLERR,arg[iarg+2]); kstart[nrestrain] = force->numeric(FLERR,arg[iarg+3]); kstop[nrestrain] = force->numeric(FLERR,arg[iarg+4]); - target[nrestrain] = force->numeric(FLERR,arg[iarg+5]); - iarg += 6; + deqstart[nrestrain] = force->numeric(FLERR,arg[iarg+5]); + if (iarg+6 == narg) { + deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+5]); + iarg += 6; + } else { + deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+6]); + iarg += 7; + } + } else if (strcmp(arg[iarg],"lbound") == 0) { + if (iarg+6 > narg) error->all(FLERR,"Illegal fix restrain command"); + rstyle[nrestrain] = LBOUND; + ids[nrestrain][0] = force->inumeric(FLERR,arg[iarg+1]); + ids[nrestrain][1] = force->inumeric(FLERR,arg[iarg+2]); + kstart[nrestrain] = force->numeric(FLERR,arg[iarg+3]); + kstop[nrestrain] = force->numeric(FLERR,arg[iarg+4]); + deqstart[nrestrain] = force->numeric(FLERR,arg[iarg+5]); + if (iarg+6 == narg) { + deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+5]); + iarg += 6; + } else { + deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+6]); + iarg += 7; + } } else if (strcmp(arg[iarg],"angle") == 0) { if (iarg+7 > narg) error->all(FLERR,"Illegal fix restrain command"); rstyle[nrestrain] = ANGLE; @@ -139,6 +162,8 @@ FixRestrain::~FixRestrain() memory->destroy(kstart); memory->destroy(kstop); memory->destroy(target); + memory->destroy(deqstart); + memory->destroy(deqstop); memory->destroy(cos_target); memory->destroy(sin_target); } @@ -192,11 +217,13 @@ void FixRestrain::post_force(int /*vflag*/) energy = 0.0; ebond = 0.0; + elbound = 0.0; eangle = 0.0; edihed = 0.0; for (int m = 0; m < nrestrain; m++) if (rstyle[m] == BOND) restrain_bond(m); + else if (rstyle[m] == LBOUND) restrain_lbound(m); else if (rstyle[m] == ANGLE) restrain_angle(m); else if (rstyle[m] == DIHEDRAL) restrain_dihedral(m); } @@ -233,6 +260,7 @@ void FixRestrain::restrain_bond(int m) double delta = update->ntimestep - update->beginstep; if (delta != 0.0) delta /= update->endstep - update->beginstep; double k = kstart[m] + delta * (kstop[m] - kstart[m]); + double deq = deqstart[m] + delta * (deqstop[m] - deqstart[m]); i1 = atom->map(ids[m][0]); i2 = atom->map(ids[m][1]); @@ -269,7 +297,7 @@ void FixRestrain::restrain_bond(int m) rsq = delx*delx + dely*dely + delz*delz; r = sqrt(rsq); - dr = r - target[m]; + dr = r - deq; rk = k * dr; // force & energy @@ -277,7 +305,7 @@ void FixRestrain::restrain_bond(int m) if (r > 0.0) fbond = -2.0*rk/r; else fbond = 0.0; - ebond += rk*dr; + ebond += rk*dr; energy += rk*dr; // apply force to each of 2 atoms @@ -295,6 +323,94 @@ void FixRestrain::restrain_bond(int m) } } +/* ---------------------------------------------------------------------- + apply harmonic lower-bound bond restraints +---------------------------------------------------------------------- */ + +void FixRestrain::restrain_lbound(int m) +{ + int i1,i2; + double delx,dely,delz,fbond; + double rsq,r,dr,rk; + + double **x = atom->x; + double **f = atom->f; + int nlocal = atom->nlocal; + int newton_bond = force->newton_bond; + + double delta = update->ntimestep - update->beginstep; + if (delta != 0.0) delta /= update->endstep - update->beginstep; + double k = kstart[m] + delta * (kstop[m] - kstart[m]); + double deq = deqstart[m] + delta * (deqstop[m] - deqstart[m]); + + i1 = atom->map(ids[m][0]); + i2 = atom->map(ids[m][1]); + + // newton_bond on: only processor owning i2 computes restraint + // newton_bond off: only processors owning either of i1,i2 computes restraint + + if (newton_bond) { + if (i2 == -1 || i2 >= nlocal) return; + if (i1 == -1) { + char str[128]; + sprintf(str, + "Restrain atoms %d %d missing on proc %d at step " BIGINT_FORMAT, + ids[m][0],ids[m][1], + comm->me,update->ntimestep); + error->one(FLERR,str); + } + } else { + if ((i1 == -1 || i1 >= nlocal) && (i2 == -1 || i2 >= nlocal)) return; + if (i1 == -1 || i2 == -1) { + char str[128]; + sprintf(str, + "Restrain atoms %d %d missing on proc %d at step " BIGINT_FORMAT, + ids[m][0],ids[m][1], + comm->me,update->ntimestep); + error->one(FLERR,str); + } + } + + delx = x[i1][0] - x[i2][0]; + dely = x[i1][1] - x[i2][1]; + delz = x[i1][2] - x[i2][2]; + domain->minimum_image(delx,dely,delz); + + rsq = delx*delx + dely*dely + delz*delz; + r = sqrt(rsq); + dr = r - deq; + rk = k * dr; + + // force & energy + + if (dr < 0) { + if (r > 0.0) fbond = -2.0*rk/r; + else fbond = 0.0; + + elbound += rk*dr; + energy += rk*dr; + } else { + fbond = 0.0; + + elbound += 0.0; + energy += 0.0; + } + + // apply force to each of 2 atoms + + if (newton_bond || i1 < nlocal) { + f[i1][0] += delx*fbond; + f[i1][1] += dely*fbond; + f[i1][2] += delz*fbond; + } + + if (newton_bond || i2 < nlocal) { + f[i2][0] -= delx*fbond; + f[i2][1] -= dely*fbond; + f[i2][2] -= delz*fbond; + } +} + /* ---------------------------------------------------------------------- apply harmonic angle restraints ---------------------------------------------------------------------- */ @@ -655,9 +771,12 @@ double FixRestrain::compute_vector(int n) MPI_Allreduce(&ebond,&ebond_all,1,MPI_DOUBLE,MPI_SUM,world); return ebond_all; } else if (n == 1) { + MPI_Allreduce(&elbound,&elbound_all,1,MPI_DOUBLE,MPI_SUM,world); + return elbound_all; + } else if (n == 3) { MPI_Allreduce(&eangle,&eangle_all,1,MPI_DOUBLE,MPI_SUM,world); return eangle_all; - } else if (n == 2) { + } else if (n == 4) { MPI_Allreduce(&edihed,&edihed_all,1,MPI_DOUBLE,MPI_SUM,world); return edihed_all; } else { diff --git a/src/fix_restrain.h b/src/fix_restrain.h index 4572905d46..3497b7daf5 100644 --- a/src/fix_restrain.h +++ b/src/fix_restrain.h @@ -44,14 +44,16 @@ class FixRestrain : public Fix { int *rstyle; int *mult; int **ids; - double *kstart,*kstop,*target; + double *kstart,*kstop,*deqstart,*deqstop,*target; double *cos_target,*sin_target; double energy,energy_all; double ebond,ebond_all; + double elbound,elbound_all; double eangle,eangle_all; double edihed,edihed_all; void restrain_bond(int); + void restrain_lbound(int); void restrain_angle(int); void restrain_dihedral(int); }; From 6209479797e29df62dd17476127e30a64d73d08f Mon Sep 17 00:00:00 2001 From: david-castillo Date: Mon, 23 Mar 2020 17:57:58 +0100 Subject: [PATCH 072/577] Removed some tabs Changed mathjax for multiline formula --- doc/src/fix_restrain.rst | 9 ++++++--- src/fix_restrain.cpp | 16 ++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/doc/src/fix_restrain.rst b/doc/src/fix_restrain.rst index 9b9beaa5ac..110b26680d 100644 --- a/doc/src/fix_restrain.rst +++ b/doc/src/fix_restrain.rst @@ -150,16 +150,19 @@ is included in :math:`K`. ---------- -The *lbond* keyword applies a lowerbound bond restraint to the specified atoms +The *lbond* keyword applies a lower bound bond restraint to the specified atoms using the same functional form used by the :doc:`bond_style harmonic ` command if the distance between the atoms is smaller than the equilibrium bond distance and 0 otherwise. The potential associated with the restraint is .. math:: - E = K (r - r_0)^2 if r < r_0 - E = 0 if r >= r_0 + E = K (r - r_0)^2 ,if\;r < r_0 +.. math:: + + E = 0 \qquad\quad\quad ,if\;r \ge r_0 + with the following coefficients: * :math:`K` (energy/distance\^2) diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index 5f65d7069b..a6793a36be 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -87,11 +87,11 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : kstop[nrestrain] = force->numeric(FLERR,arg[iarg+4]); deqstart[nrestrain] = force->numeric(FLERR,arg[iarg+5]); if (iarg+6 == narg) { - deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+5]); - iarg += 6; + deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+5]); + iarg += 6; } else { - deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+6]); - iarg += 7; + deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+6]); + iarg += 7; } } else if (strcmp(arg[iarg],"lbound") == 0) { if (iarg+6 > narg) error->all(FLERR,"Illegal fix restrain command"); @@ -102,11 +102,11 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : kstop[nrestrain] = force->numeric(FLERR,arg[iarg+4]); deqstart[nrestrain] = force->numeric(FLERR,arg[iarg+5]); if (iarg+6 == narg) { - deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+5]); - iarg += 6; + deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+5]); + iarg += 6; } else { - deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+6]); - iarg += 7; + deqstop[nrestrain] = force->numeric(FLERR,arg[iarg+6]); + iarg += 7; } } else if (strcmp(arg[iarg],"angle") == 0) { if (iarg+7 > narg) error->all(FLERR,"Illegal fix restrain command"); From e76afb33edc939ee63d2033e750d186bc2799c5a Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 23 Mar 2020 12:06:58 -0600 Subject: [PATCH 073/577] cmake: update to new target_link_libraries() signature --- cmake/CMakeLists.txt | 8 ++++---- cmake/Modules/Packages/GPU.cmake | 4 ++-- cmake/Modules/Packages/USER-H5MD.cmake | 2 +- cmake/pkgconfig/liblammps.pc.in | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 362cce94db..cc9b3fc56a 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -457,14 +457,14 @@ foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD) endforeach() if(PKG_USER-AWPMD) - target_link_libraries(awpmd ${LAPACK_LIBRARIES}) + target_link_libraries(awpmd PRIVATE ${LAPACK_LIBRARIES}) endif() if(PKG_USER-ATC) if(LAMMPS_SIZES STREQUAL BIGBIG) message(FATAL_ERROR "The USER-ATC Package is not compatible with -DLAMMPS_BIGBIG") endif() - target_link_libraries(atc ${LAPACK_LIBRARIES}) + target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES}) endif() include(Packages/USER-H5MD) @@ -599,7 +599,7 @@ if(BUILD_TOOLS) if(CMAKE_GENERATOR_SUPPORT_FORTRAN) enable_language(Fortran) add_executable(chain.x ${LAMMPS_TOOLS_DIR}/chain.f) - target_link_libraries(chain.x ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) + target_link_libraries(chain.x PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) install(TARGETS chain.x DESTINATION ${CMAKE_INSTALL_BINDIR}) else() message(WARNING "CMake build doesn't support fortran, skipping building 'chain.x'") @@ -609,7 +609,7 @@ if(BUILD_TOOLS) get_filename_component(MSI2LMP_SOURCE_DIR ${LAMMPS_TOOLS_DIR}/msi2lmp/src ABSOLUTE) file(GLOB MSI2LMP_SOURCES ${MSI2LMP_SOURCE_DIR}/[^.]*.c) add_executable(msi2lmp ${MSI2LMP_SOURCES}) - target_link_libraries(msi2lmp m) + target_link_libraries(msi2lmp PRIVATE ${MATH_LIBRARIES}) install(TARGETS msi2lmp DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES ${LAMMPS_DOC_DIR}/msi2lmp.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) endif() diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index 427644f9c7..95bb525dd5 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -99,7 +99,7 @@ if(PKG_GPU) add_library(gpu STATIC ${GPU_LIB_SOURCES} ${GPU_LIB_CUDPP_SOURCES} ${GPU_OBJS}) - target_link_libraries(gpu ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY}) + target_link_libraries(gpu PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY}) target_include_directories(gpu PRIVATE ${LAMMPS_LIB_BINARY_DIR}/gpu ${CUDA_INCLUDE_DIRS}) target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT ${GPU_CUDA_MPS_FLAGS}) if(CUDPP_OPT) @@ -166,7 +166,7 @@ if(PKG_GPU) ) add_library(gpu STATIC ${GPU_LIB_SOURCES}) - target_link_libraries(gpu ${OpenCL_LIBRARIES}) + target_link_libraries(gpu PRIVATE ${OpenCL_LIBRARIES}) target_include_directories(gpu PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/gpu ${OpenCL_INCLUDE_DIRS}) target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -D${OCL_TUNE}_OCL -DMPI_GERYON -DUCL_NO_EXIT) target_compile_definitions(gpu PRIVATE -DUSE_OPENCL) diff --git a/cmake/Modules/Packages/USER-H5MD.cmake b/cmake/Modules/Packages/USER-H5MD.cmake index 40ea7b7444..1e3fcf82ce 100644 --- a/cmake/Modules/Packages/USER-H5MD.cmake +++ b/cmake/Modules/Packages/USER-H5MD.cmake @@ -2,7 +2,7 @@ if(PKG_USER-H5MD) enable_language(C) find_package(HDF5 REQUIRED) - target_link_libraries(h5md ${HDF5_LIBRARIES}) + target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES}) target_include_directories(h5md PRIVATE ${HDF5_INCLUDE_DIRS}) include_directories(${HDF5_INCLUDE_DIRS}) endif() diff --git a/cmake/pkgconfig/liblammps.pc.in b/cmake/pkgconfig/liblammps.pc.in index a8710ca224..a89f992c4a 100644 --- a/cmake/pkgconfig/liblammps.pc.in +++ b/cmake/pkgconfig/liblammps.pc.in @@ -22,7 +22,7 @@ # CMakeLists.txt: # find_package(PkgConfig) # pkg_check_modules(LAMMPS IMPORTED_TARGET lammps) -# target_link_libraries( PkgConfig::LAMMPS) +# target_link_libraries( PRIVATE PkgConfig::LAMMPS) prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ From 572502b33d86a7b834dbbe5d646dee42c65e00e9 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 09:35:57 -0600 Subject: [PATCH 074/577] cmake: add_definitions() -> target_compile_definitions() --- cmake/CMakeLists.txt | 20 ++++++++++---------- cmake/Modules/MPI4WIN.cmake | 2 +- cmake/Modules/Packages/KIM.cmake | 6 +++--- cmake/Modules/Packages/KOKKOS.cmake | 4 ++-- cmake/Modules/Packages/KSPACE.cmake | 14 +++++++------- cmake/Modules/Packages/PYTHON.cmake | 2 +- cmake/Modules/Packages/USER-INTEL.cmake | 12 ++++++------ cmake/Modules/Packages/USER-NETCDF.cmake | 6 +++--- cmake/Modules/Packages/USER-OMP.cmake | 2 +- cmake/Modules/Packages/USER-PLUMED.cmake | 8 ++++---- cmake/Modules/Packages/USER-VTK.cmake | 2 +- 11 files changed, 39 insertions(+), 39 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index cc9b3fc56a..b1d90af045 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -189,11 +189,11 @@ if(BUILD_MPI) else() find_package(MPI REQUIRED) include_directories(${MPI_CXX_INCLUDE_PATH}) - add_definitions(-DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1) + target_compile_definitions(lammps PRIVATE -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1) target_link_libraries(lammps PUBLIC MPI::MPI_CXX) option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF) if(LAMMPS_LONGLONG_TO_LONG) - add_definitions(-DLAMMPS_LONGLONG_TO_LONG) + target_compile_definitions(lammps PRIVATE -DLAMMPS_LONGLONG_TO_LONG) endif() endif() else() @@ -209,7 +209,7 @@ set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall) set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES}) validate_option(LAMMPS_SIZES LAMMPS_SIZES_VALUES) string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES) -add_definitions(-DLAMMPS_${LAMMPS_SIZES}) +target_compile_definitions(lammps PRIVATE -DLAMMPS_${LAMMPS_SIZES}) set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES} -DLAMMPS_${LAMMPS_SIZES}") # posix_memalign is not available on Windows @@ -219,12 +219,12 @@ else() set(LAMMPS_MEMALIGN "64" CACHE STRING "enables the use of the posix_memalign() call instead of malloc() when large chunks or memory are allocated by LAMMPS. Set to 0 to disable") endif() if(NOT ${LAMMPS_MEMALIGN} STREQUAL "0") - add_definitions(-DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN}) + target_compile_definitions(lammps PRIVATE -DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN}) endif() option(LAMMPS_EXCEPTIONS "enable the use of C++ exceptions for error messages (useful for library interface)" OFF) if(LAMMPS_EXCEPTIONS) - add_definitions(-DLAMMPS_EXCEPTIONS) + target_compile_definitions(lammps PUBLIC -DLAMMPS_EXCEPTIONS) set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES} -DLAMMPS_EXCEPTIONS") endif() @@ -283,7 +283,7 @@ find_package(JPEG QUIET) option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND}) if(WITH_JPEG) find_package(JPEG REQUIRED) - add_definitions(-DLAMMPS_JPEG) + target_compile_definitions(lammps PRIVATE -DLAMMPS_JPEG) if(CMAKE_VERSION VERSION_LESS 3.12) include_directories(${JPEG_INCLUDE_DIR}) target_link_libraries(lammps PRIVATE ${JPEG_LIBRARIES}) @@ -303,7 +303,7 @@ if(WITH_PNG) find_package(PNG REQUIRED) find_package(ZLIB REQUIRED) target_link_libraries(lammps PRIVATE PNG::PNG ZLIB::ZLIB) - add_definitions(-DLAMMPS_PNG) + target_compile_definitions(lammps PRIVATE -DLAMMPS_PNG) endif() find_program(GZIP_EXECUTABLE gzip) @@ -313,7 +313,7 @@ if(WITH_GZIP) if(NOT GZIP_FOUND) message(FATAL_ERROR "gzip executable not found") endif() - add_definitions(-DLAMMPS_GZIP) + target_compile_definitions(lammps PRIVATE -DLAMMPS_GZIP) endif() find_program(FFMPEG_EXECUTABLE ffmpeg) @@ -323,7 +323,7 @@ if(WITH_FFMPEG) if(NOT FFMPEG_FOUND) message(FATAL_ERROR "ffmpeg executable not found") endif() - add_definitions(-DLAMMPS_FFMPEG) + target_compile_definitions(lammps PRIVATE -DLAMMPS_FFMPEG) endif() if(BUILD_SHARED_LIBS) @@ -413,7 +413,7 @@ endforeach() # packages that need defines set foreach(PKG MPIIO) if(PKG_${PKG}) - add_definitions(-DLMP_${PKG}) + target_compile_definitions(lammps PRIVATE -DLMP_${PKG}) endif() endforeach() diff --git a/cmake/Modules/MPI4WIN.cmake b/cmake/Modules/MPI4WIN.cmake index 1fe6daada3..a02adca77d 100644 --- a/cmake/Modules/MPI4WIN.cmake +++ b/cmake/Modules/MPI4WIN.cmake @@ -16,7 +16,7 @@ else() endif() ExternalProject_get_property(mpi4win_build SOURCE_DIR) -add_definitions(-DMPICH_SKIP_MPICXX) +target_compile_definitions(lammps PRIVATE -DMPICH_SKIP_MPICXX) include_directories("${SOURCE_DIR}/include") set(MPI4WIN_LIBRARIES "${SOURCE_DIR}/lib/libmpi.a") add_dependencies(lammps mpi4win_build) diff --git a/cmake/Modules/Packages/KIM.cmake b/cmake/Modules/Packages/KIM.cmake index 56fc1449fa..7d349f496b 100644 --- a/cmake/Modules/Packages/KIM.cmake +++ b/cmake/Modules/Packages/KIM.cmake @@ -3,16 +3,16 @@ if(PKG_KIM) find_package(CURL) if(CURL_FOUND) target_link_libraries(lammps PRIVATE CURL::libcurl) - add_definitions(-DLMP_KIM_CURL) + target_compile_definitions(lammps PRIVATE -DLMP_KIM_CURL) set(LMP_DEBUG_CURL OFF CACHE STRING "Set libcurl verbose mode on/off. If on, it displays a lot of verbose information about its operations.") mark_as_advanced(LMP_DEBUG_CURL) if(LMP_DEBUG_CURL) - add_definitions(-DLMP_DEBUG_CURL) + target_compile_definitions(lammps PRIVATE -DLMP_DEBUG_CURL) endif() set(LMP_NO_SSL_CHECK OFF CACHE STRING "Tell libcurl to not verify the peer. If on, the connection succeeds regardless of the names in the certificate. Insecure - Use with caution!") mark_as_advanced(LMP_NO_SSL_CHECK) if(LMP_NO_SSL_CHECK) - add_definitions(-DLMP_NO_SSL_CHECK) + target_compile_definitions(lammps PRIVATE -DLMP_NO_SSL_CHECK) endif() endif() find_package(KIM-API QUIET) diff --git a/cmake/Modules/Packages/KOKKOS.cmake b/cmake/Modules/Packages/KOKKOS.cmake index 58d2c139f6..34c924790e 100644 --- a/cmake/Modules/Packages/KOKKOS.cmake +++ b/cmake/Modules/Packages/KOKKOS.cmake @@ -18,7 +18,7 @@ if(PKG_KOKKOS) include_directories(${Kokkos_INCLUDE_DIRS}) target_link_libraries(lammps PRIVATE kokkos) endif() - add_definitions(-DLMP_KOKKOS) + target_compile_definitions(lammps PRIVATE -DLMP_KOKKOS) set(KOKKOS_PKG_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/KOKKOS) set(KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/kokkos.cpp @@ -44,7 +44,7 @@ if(PKG_KOKKOS) ${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp) if(KOKKOS_ENABLE_CUDA) if(NOT ${FFT} STREQUAL "KISS") - add_definitions(-DFFT_CUFFT) + target_compile_definitions(lammps PRIVATE -DFFT_CUFFT) target_link_libraries(lammps PRIVATE cufft) endif() endif() diff --git a/cmake/Modules/Packages/KSPACE.cmake b/cmake/Modules/Packages/KSPACE.cmake index 2a586dccf3..e2a42f3981 100644 --- a/cmake/Modules/Packages/KSPACE.cmake +++ b/cmake/Modules/Packages/KSPACE.cmake @@ -3,7 +3,7 @@ if(PKG_KSPACE) set(FFTW "FFTW3") if(FFT_SINGLE) set(FFTW "FFTW3F") - add_definitions(-DFFT_SINGLE) + target_compile_definitions(lammps PUBLIC -DFFT_SINGLE) endif() find_package(${FFTW} QUIET) if(${FFTW}_FOUND) @@ -18,7 +18,7 @@ if(PKG_KSPACE) if(FFT STREQUAL "FFTW3") find_package(${FFTW} REQUIRED) - add_definitions(-DFFT_FFTW3) + target_compile_definitions(lammps PUBLIC -DFFT_FFTW3) target_link_libraries(lammps PUBLIC ${FFTW}::${FFTW}) if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY) option(FFT_FFTW_THREADS "Use threaded FFTW library" ON) @@ -28,7 +28,7 @@ if(PKG_KSPACE) if(FFT_FFTW_THREADS) if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY) - add_definitions(-DFFT_FFTW_THREADS) + target_compile_definitions(lammps PRIVATE -DFFT_FFTW_THREADS) target_link_libraries(lammps PRIVATE ${FFTW}::${FFTW}_OMP) else() message(FATAL_ERROR "Need OpenMP enabled FFTW3 library for FFT_THREADS") @@ -36,16 +36,16 @@ if(PKG_KSPACE) endif() elseif(FFT STREQUAL "MKL") find_package(MKL REQUIRED) - add_definitions(-DFFT_MKL) + target_compile_definitions(lammps PRIVATE -DFFT_MKL) option(FFT_MKL_THREADS "Use threaded MKL FFT" ON) if(FFT_MKL_THREADS) - add_definitions(-DFFT_MKL_THREADS) + target_compile_definitions(lammps PRIVATE -DFFT_MKL_THREADS) endif() include_directories(${MKL_INCLUDE_DIRS}) target_link_libraries(lammps PRIVATE ${MKL_LIBRARIES}) else() # last option is KISSFFT - add_definitions(-DFFT_KISS) + target_compile_definitions(lammps PRIVATE -DFFT_KISS) endif() set(FFT_PACK "array" CACHE STRING "Optimization for FFT") @@ -54,6 +54,6 @@ if(PKG_KSPACE) validate_option(FFT_PACK FFT_PACK_VALUES) if(NOT FFT_PACK STREQUAL "array") string(TOUPPER ${FFT_PACK} FFT_PACK) - add_definitions(-DFFT_PACK_${FFT_PACK}) + target_compile_definitions(lammps PRIVATE -DFFT_PACK_${FFT_PACK}) endif() endif() diff --git a/cmake/Modules/Packages/PYTHON.cmake b/cmake/Modules/Packages/PYTHON.cmake index 7d6e2999f7..4611fddb98 100644 --- a/cmake/Modules/Packages/PYTHON.cmake +++ b/cmake/Modules/Packages/PYTHON.cmake @@ -1,6 +1,6 @@ if(PKG_PYTHON) find_package(PythonLibs REQUIRED) - add_definitions(-DLMP_PYTHON) + target_compile_definitions(lammps PRIVATE -DLMP_PYTHON) include_directories(${PYTHON_INCLUDE_DIR}) target_link_libraries(lammps PRIVATE ${PYTHON_LIBRARY}) endif() diff --git a/cmake/Modules/Packages/USER-INTEL.cmake b/cmake/Modules/Packages/USER-INTEL.cmake index 0a9b634bc7..96a897297f 100644 --- a/cmake/Modules/Packages/USER-INTEL.cmake +++ b/cmake/Modules/Packages/USER-INTEL.cmake @@ -4,7 +4,7 @@ if(PKG_USER-INTEL) message(FATAL_ERROR "immintrin.h header not found, Intel package won't work without it") endif() - add_definitions(-DLMP_USER_INTEL) + target_compile_definitions(lammps PRIVATE -DLMP_USER_INTEL) set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by USER-INTEL (cpu or knl)") set(INTEL_ARCH_VALUES cpu knl) @@ -24,14 +24,14 @@ if(PKG_USER-INTEL) string(TOUPPER ${INTEL_LRT_MODE} INTEL_LRT_MODE) if(INTEL_LRT_MODE STREQUAL "THREADS") if(Threads_FOUND) - add_definitions(-DLMP_INTEL_USELRT) + target_compile_definitions(lammps PRIVATE -DLMP_INTEL_USELRT) target_link_libraries(lammps PRIVATE Threads::Threads) else() message(FATAL_ERROR "Must have working threads library for Long-range thread support") endif() endif() if(INTEL_LRT_MODE STREQUAL "C++11") - add_definitions(-DLMP_INTEL_USERLRT -DLMP_INTEL_LRT11) + target_compile_definitions(lammps PRIVATE -DLMP_INTEL_USERLRT -DLMP_INTEL_LRT11) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") @@ -46,7 +46,7 @@ if(PKG_USER-INTEL) if(TBB_FOUND) target_link_libraries(lammps PRIVATE ${TBB_MALLOC_LIBRARIES}) else() - add_definitions(-DLMP_INTEL_NO_TBB) + target_compile_definitions(lammps PRIVATE -DLMP_INTEL_NO_TBB) if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") message(WARNING "USER-INTEL with Intel compilers should use TBB malloc libraries") endif() @@ -54,7 +54,7 @@ if(PKG_USER-INTEL) find_package(MKL QUIET) if(MKL_FOUND) - add_definitions(-DLMP_USE_MKL_RNG) + target_compile_definitions(lammps PRIVATE -DLMP_USE_MKL_RNG) target_link_libraries(lammps PRIVATE ${MKL_LIBRARIES}) else() message(STATUS "Pair style dpd/intel will be faster with MKL libraries") @@ -71,7 +71,7 @@ if(PKG_USER-INTEL) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -xHost -qopenmp -qoffload") set(MIC_OPTIONS "-qoffload-option,mic,compiler,\"-fp-model fast=2 -mGLOB_default_function_attrs=\\\"gather_scatter_loop_unroll=4\\\"\"") add_compile_options(-xMIC-AVX512 -qoffload -fno-alias -ansi-alias -restrict -qoverride-limits ${MIC_OPTIONS}) - add_definitions(-DLMP_INTEL_OFFLOAD) + target_compile_definitions(lammps PRIVATE -DLMP_INTEL_OFFLOAD) else() if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") include(CheckCXXCompilerFlag) diff --git a/cmake/Modules/Packages/USER-NETCDF.cmake b/cmake/Modules/Packages/USER-NETCDF.cmake index 8d62f5f7ec..2c12d2b799 100644 --- a/cmake/Modules/Packages/USER-NETCDF.cmake +++ b/cmake/Modules/Packages/USER-NETCDF.cmake @@ -11,14 +11,14 @@ if(PKG_USER-NETCDF) if(NETCDF_FOUND) include_directories(${NETCDF_INCLUDE_DIRS}) target_link_libraries(lammps PRIVATE ${NETCDF_LIBRARIES}) - add_definitions(-DLMP_HAS_NETCDF) + target_compile_definitions(lammps PRIVATE -DLMP_HAS_NETCDF) endif(NETCDF_FOUND) if(PNETCDF_FOUND) include_directories(${PNETCDF_INCLUDES}) target_link_libraries(lammps PRIVATE ${PNETCDF_LIBRARIES}) - add_definitions(-DLMP_HAS_PNETCDF) + target_compile_definitions(lammps PRIVATE -DLMP_HAS_PNETCDF) endif(PNETCDF_FOUND) - add_definitions(-DNC_64BIT_DATA=0x0020) + target_compile_definitions(lammps PRIVATE -DNC_64BIT_DATA=0x0020) endif() diff --git a/cmake/Modules/Packages/USER-OMP.cmake b/cmake/Modules/Packages/USER-OMP.cmake index 4b1a4b1571..91f0467a17 100644 --- a/cmake/Modules/Packages/USER-OMP.cmake +++ b/cmake/Modules/Packages/USER-OMP.cmake @@ -6,7 +6,7 @@ if(PKG_USER-OMP) ${USER-OMP_SOURCES_DIR}/fix_nh_omp.cpp ${USER-OMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp ${USER-OMP_SOURCES_DIR}/domain_omp.cpp) - add_definitions(-DLMP_USER_OMP) + target_compile_definitions(lammps PRIVATE -DLMP_USER_OMP) set_property(GLOBAL PROPERTY "OMP_SOURCES" "${USER-OMP_SOURCES}") # detects styles which have USER-OMP version diff --git a/cmake/Modules/Packages/USER-PLUMED.cmake b/cmake/Modules/Packages/USER-PLUMED.cmake index a6cd20adbb..cfd187ed9d 100644 --- a/cmake/Modules/Packages/USER-PLUMED.cmake +++ b/cmake/Modules/Packages/USER-PLUMED.cmake @@ -69,12 +69,12 @@ if(PKG_USER-PLUMED) set(PLUMED_INSTALL_DIR ${INSTALL_DIR}) add_dependencies(lammps plumed_build) if(PLUMED_MODE STREQUAL "STATIC") - add_definitions(-D__PLUMED_WRAPPER_CXX=1) + target_compile_definitions(lammps PRIVATE -D__PLUMED_WRAPPER_CXX=1) target_link_libraries(lammps PRIVATE ${PLUMED_INSTALL_DIR}/lib/libplumed.a ${PLUMED_LINK_LIBS} ${CMAKE_DL_LIBS}) elseif(PLUMED_MODE STREQUAL "SHARED") target_link_libraries(lammps PRIVATE ${PLUMED_INSTALL_DIR}/lib/libplumed${CMAKE_SHARED_LIBRARY_SUFFIX} ${PLUMED_INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_DL_LIBS}) elseif(PLUMED_MODE STREQUAL "RUNTIME") - add_definitions(-D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=${PLUMED_INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}) + target_compile_definitions(lammps PRIVATE -D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=${PLUMED_INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}) target_link_libraries(lammps PRIVATE ${PLUMED_INSTALL_DIR}/lib/libplumedWrapper.a -rdynamic ${CMAKE_DL_LIBS}) endif() set(PLUMED_INCLUDE_DIRS "${PLUMED_INSTALL_DIR}/include") @@ -82,12 +82,12 @@ if(PKG_USER-PLUMED) find_package(PkgConfig REQUIRED) pkg_check_modules(PLUMED REQUIRED plumed) if(PLUMED_MODE STREQUAL "STATIC") - add_definitions(-D__PLUMED_WRAPPER_CXX=1) + target_compile_definitions(lammps PRIVATE -D__PLUMED_WRAPPER_CXX=1) include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static) elseif(PLUMED_MODE STREQUAL "SHARED") include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared) elseif(PLUMED_MODE STREQUAL "RUNTIME") - add_definitions(-D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}) + target_compile_definitions(lammps PRIVATE -D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}) include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime) endif() target_link_libraries(lammps PRIVATE ${PLUMED_LOAD}) diff --git a/cmake/Modules/Packages/USER-VTK.cmake b/cmake/Modules/Packages/USER-VTK.cmake index fb69f115b2..61defcbf82 100644 --- a/cmake/Modules/Packages/USER-VTK.cmake +++ b/cmake/Modules/Packages/USER-VTK.cmake @@ -1,6 +1,6 @@ if(PKG_USER-VTK) find_package(VTK REQUIRED NO_MODULE) include(${VTK_USE_FILE}) - add_definitions(-DLAMMPS_VTK) + target_compile_definitions(lammps PRIVATE -DLAMMPS_VTK) target_link_libraries(lammps PRIVATE ${VTK_LIBRARIES}) endif() From f2ab654662fbba0a43a3919d13bb48590d8d08a9 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 10:41:19 -0600 Subject: [PATCH 075/577] cmake: some include_directories() -> target_include_directories() --- cmake/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index b1d90af045..aaafd9c3f6 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -165,7 +165,7 @@ endif() ###################################################### # packages with special compiler needs or external libs ###################################################### -include_directories(${LAMMPS_SOURCE_DIR}) +target_include_directories(lammps PRIVATE ${LAMMPS_SOURCE_DIR}) if(PKG_USER-ADIOS) # The search for ADIOS2 must come before MPI because @@ -200,7 +200,7 @@ else() enable_language(C) file(GLOB MPI_SOURCES ${LAMMPS_SOURCE_DIR}/STUBS/mpi.c) add_library(mpi_stubs STATIC ${MPI_SOURCES}) - include_directories(${LAMMPS_SOURCE_DIR}/STUBS) + target_include_directories(mpi_stubs PUBLIC ${LAMMPS_SOURCE_DIR}/STUBS) target_link_libraries(lammps PRIVATE mpi_stubs) endif() @@ -285,7 +285,7 @@ if(WITH_JPEG) find_package(JPEG REQUIRED) target_compile_definitions(lammps PRIVATE -DLAMMPS_JPEG) if(CMAKE_VERSION VERSION_LESS 3.12) - include_directories(${JPEG_INCLUDE_DIR}) + target_include_directories(lammps PRIVATE ${JPEG_INCLUDE_DIR}) target_link_libraries(lammps PRIVATE ${JPEG_LIBRARIES}) else() target_link_libraries(lammps PRIVATE JPEG::JPEG) @@ -404,7 +404,7 @@ foreach(PKG ${DEFAULT_PACKAGES}) RegisterStyles(${${PKG}_SOURCES_DIR}) target_sources(lammps PRIVATE ${${PKG}_SOURCES}) - include_directories(${${PKG}_SOURCES_DIR}) + target_include_directories(lammps PRIVATE ${${PKG}_SOURCES_DIR}) endif() RegisterPackages(${${PKG}_SOURCES_DIR}) @@ -504,7 +504,7 @@ set(LAMMPS_STYLE_HEADERS_DIR ${CMAKE_CURRENT_BINARY_DIR}/styles) GenerateStyleHeaders(${LAMMPS_STYLE_HEADERS_DIR}) GeneratePackagesHeaders(${LAMMPS_STYLE_HEADERS_DIR}) -include_directories(${LAMMPS_STYLE_HEADERS_DIR}) +target_include_directories(lammps PRIVATE ${LAMMPS_STYLE_HEADERS_DIR}) ###################################### # Generate lmpinstalledpkgs.h From 31930139c6a5ffcb956ec7da462df330590b3a77 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 10:49:13 -0600 Subject: [PATCH 076/577] USER-SMD.cmake: use Eigen3 imported target --- cmake/Modules/Packages/USER-SMD.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/Packages/USER-SMD.cmake b/cmake/Modules/Packages/USER-SMD.cmake index eed60ae8bd..9d2c48fe1d 100644 --- a/cmake/Modules/Packages/USER-SMD.cmake +++ b/cmake/Modules/Packages/USER-SMD.cmake @@ -15,7 +15,7 @@ if(PKG_USER-SMD) CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" ) ExternalProject_get_property(Eigen3_build SOURCE_DIR) - set(EIGEN3_INCLUDE_DIR ${SOURCE_DIR}) + target_include_directories(lammps ${SOURCE_DIR}) add_dependencies(lammps Eigen3_build) else() find_package(Eigen3 NO_MODULE) @@ -23,6 +23,6 @@ if(PKG_USER-SMD) if(NOT EIGEN3_FOUND) message(FATAL_ERROR "Eigen3 not found, help CMake to find it by setting EIGEN3_INCLUDE_DIR, or set DOWNLOAD_EIGEN3=ON to download it") endif() + target_link_libraries(lammps PRIVATE Eigen3::Eigen) endif() - include_directories(${EIGEN3_INCLUDE_DIR}) endif() From 9b244b14a6f00f14237e51b3124cda8b420d63a8 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 10:56:49 -0600 Subject: [PATCH 077/577] atc: needs lammps.h --- cmake/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index aaafd9c3f6..a93f1ee42a 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -465,6 +465,7 @@ if(PKG_USER-ATC) message(FATAL_ERROR "The USER-ATC Package is not compatible with -DLAMMPS_BIGBIG") endif() target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES}) + target_include_directories(atc PRIVATE ${LAMMPS_SOURCE_DIR}) endif() include(Packages/USER-H5MD) From 51eb865d6342ec32cd1262635a86d78802f75c7c Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 11:05:25 -0600 Subject: [PATCH 078/577] VORONOI.cmake: use VORO imported target --- cmake/Modules/FindVORO.cmake | 16 +++++++++++++--- cmake/Modules/Packages/VORONOI.cmake | 7 +++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cmake/Modules/FindVORO.cmake b/cmake/Modules/FindVORO.cmake index b0cccbcd1d..3f0fe98ff1 100644 --- a/cmake/Modules/FindVORO.cmake +++ b/cmake/Modules/FindVORO.cmake @@ -10,13 +10,23 @@ find_path(VORO_INCLUDE_DIR voro++.hh PATH_SUFFIXES voro++) find_library(VORO_LIBRARY NAMES voro++) -set(VORO_LIBRARIES ${VORO_LIBRARY}) -set(VORO_INCLUDE_DIRS ${VORO_INCLUDE_DIR}) - include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set VORO_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(VORO DEFAULT_MSG VORO_LIBRARY VORO_INCLUDE_DIR) +# Copy the results to the output variables and target. +if(VORO_FOUND) + set(VORO_LIBRARIES ${VORO_LIBRARY}) + set(VORO_INCLUDE_DIRS ${VORO_INCLUDE_DIR}) + + if(NOT TARGET VORO::VORO) + add_library(VORO::VORO UNKNOWN IMPORTED) + set_target_properties(VORO::VORO PROPERTIES + IMPORTED_LOCATION "${VORO_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${VORO_INCLUDE_DIR}") + endif() +endif() + mark_as_advanced(VORO_INCLUDE_DIR VORO_LIBRARY ) diff --git a/cmake/Modules/Packages/VORONOI.cmake b/cmake/Modules/Packages/VORONOI.cmake index d2bb185228..e7f2b6b46d 100644 --- a/cmake/Modules/Packages/VORONOI.cmake +++ b/cmake/Modules/Packages/VORONOI.cmake @@ -29,15 +29,14 @@ if(PKG_VORONOI) BUILD_BYPRODUCTS /src/libvoro++.a ) ExternalProject_get_property(voro_build SOURCE_DIR) - set(VORO_LIBRARIES ${SOURCE_DIR}/src/libvoro++.a) - set(VORO_INCLUDE_DIRS ${SOURCE_DIR}/src) + target_link_libraries(lammps PRIVATE ${SOURCE_DIR}/src/libvoro++.a) + target_include_directories(lammps PRIVATE ${SOURCE_DIR}/src) add_dependencies(lammps voro_build) else() find_package(VORO) if(NOT VORO_FOUND) message(FATAL_ERROR "Voro++ library not found. Help CMake to find it by setting VORO_LIBRARY and VORO_INCLUDE_DIR, or set DOWNLOAD_VORO=ON to download it") endif() + target_link_libraries(lammps PRIVATE VORO::VORO) endif() - include_directories(${VORO_INCLUDE_DIRS}) - target_link_libraries(lammps PRIVATE ${VORO_LIBRARIES}) endif() From 4736402dd944d773a081fbf7cc6933010644da64 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 11:07:45 -0600 Subject: [PATCH 079/577] cmake: atc needs mpi itself --- cmake/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index a93f1ee42a..0001f37fce 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -202,6 +202,7 @@ else() add_library(mpi_stubs STATIC ${MPI_SOURCES}) target_include_directories(mpi_stubs PUBLIC ${LAMMPS_SOURCE_DIR}/STUBS) target_link_libraries(lammps PRIVATE mpi_stubs) + add_library(MPI::MPI_CXX ALIAS mpi_stubs) endif() set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") @@ -464,7 +465,7 @@ if(PKG_USER-ATC) if(LAMMPS_SIZES STREQUAL BIGBIG) message(FATAL_ERROR "The USER-ATC Package is not compatible with -DLAMMPS_BIGBIG") endif() - target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES}) + target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES} MPI::MPI_CXX) target_include_directories(atc PRIVATE ${LAMMPS_SOURCE_DIR}) endif() From 33a57ed21592615a752021c789df4db142747edd Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 11:36:21 -0600 Subject: [PATCH 080/577] cmake: some more include_directories() -> target_include_directories() --- cmake/Modules/MPI4WIN.cmake | 2 +- cmake/Modules/Packages/CORESHELL.cmake | 2 +- cmake/Modules/Packages/GPU.cmake | 2 +- cmake/Modules/Packages/KIM.cmake | 2 +- cmake/Modules/Packages/KOKKOS.cmake | 4 ++-- cmake/Modules/Packages/KSPACE.cmake | 2 +- cmake/Modules/Packages/MESSAGE.cmake | 2 +- cmake/Modules/Packages/OPT.cmake | 2 +- cmake/Modules/Packages/PYTHON.cmake | 2 +- cmake/Modules/Packages/QEQ.cmake | 2 +- cmake/Modules/Packages/USER-H5MD.cmake | 1 - cmake/Modules/Packages/USER-INTEL.cmake | 2 +- cmake/Modules/Packages/USER-OMP.cmake | 2 +- cmake/Modules/Packages/USER-PLUMED.cmake | 2 +- cmake/Modules/Packages/USER-SDPD.cmake | 2 +- 15 files changed, 15 insertions(+), 16 deletions(-) diff --git a/cmake/Modules/MPI4WIN.cmake b/cmake/Modules/MPI4WIN.cmake index a02adca77d..4447289668 100644 --- a/cmake/Modules/MPI4WIN.cmake +++ b/cmake/Modules/MPI4WIN.cmake @@ -17,7 +17,7 @@ endif() ExternalProject_get_property(mpi4win_build SOURCE_DIR) target_compile_definitions(lammps PRIVATE -DMPICH_SKIP_MPICXX) -include_directories("${SOURCE_DIR}/include") +target_include_directories(lammps PRIVATE "${SOURCE_DIR}/include") set(MPI4WIN_LIBRARIES "${SOURCE_DIR}/lib/libmpi.a") add_dependencies(lammps mpi4win_build) set(LAMMPS_USE_MPI4WIN ON) diff --git a/cmake/Modules/Packages/CORESHELL.cmake b/cmake/Modules/Packages/CORESHELL.cmake index 2afe2b8c1b..e550b1989f 100644 --- a/cmake/Modules/Packages/CORESHELL.cmake +++ b/cmake/Modules/Packages/CORESHELL.cmake @@ -9,5 +9,5 @@ if(PKG_CORESHELL) get_property(CORESHELL_SOURCES GLOBAL PROPERTY CORESHELL_SOURCES) target_sources(lammps PRIVATE ${CORESHELL_SOURCES}) - include_directories(${CORESHELL_SOURCES_DIR}) + target_include_directories(lammps PRIVATE ${CORESHELL_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index 95bb525dd5..cd359068e7 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -193,5 +193,5 @@ if(PKG_GPU) get_property(GPU_SOURCES GLOBAL PROPERTY GPU_SOURCES) target_sources(lammps PRIVATE ${GPU_SOURCES}) - include_directories(${GPU_SOURCES_DIR}) + target_include_directories(lammps PRIVATE ${GPU_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/KIM.cmake b/cmake/Modules/Packages/KIM.cmake index 7d349f496b..5a4b12956e 100644 --- a/cmake/Modules/Packages/KIM.cmake +++ b/cmake/Modules/Packages/KIM.cmake @@ -62,5 +62,5 @@ if(PKG_KIM) find_package(KIM-API ${KIM-API_MIN_VERSION} REQUIRED) endif() target_link_libraries(lammps PRIVATE "${KIM-API_LDFLAGS}") - include_directories(${KIM-API_INCLUDE_DIRS}) + target_include_directories(lammps PRIVATE ${KIM-API_INCLUDE_DIRS}) endif() diff --git a/cmake/Modules/Packages/KOKKOS.cmake b/cmake/Modules/Packages/KOKKOS.cmake index 34c924790e..083b55840c 100644 --- a/cmake/Modules/Packages/KOKKOS.cmake +++ b/cmake/Modules/Packages/KOKKOS.cmake @@ -15,7 +15,7 @@ if(PKG_KOKKOS) ${LAMMPS_LIB_KOKKOS_SRC_DIR}/containers/src ${LAMMPS_LIB_KOKKOS_SRC_DIR}/algorithms/src ${LAMMPS_LIB_KOKKOS_BIN_DIR}) - include_directories(${Kokkos_INCLUDE_DIRS}) + target_include_directories(lammps PRIVATE ${Kokkos_INCLUDE_DIRS}) target_link_libraries(lammps PRIVATE kokkos) endif() target_compile_definitions(lammps PRIVATE -DLMP_KOKKOS) @@ -70,5 +70,5 @@ if(PKG_KOKKOS) get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES) target_sources(lammps PRIVATE ${KOKKOS_PKG_SOURCES}) - include_directories(${KOKKOS_PKG_SOURCES_DIR}) + target_include_directories(lammps PRIVATE ${KOKKOS_PKG_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/KSPACE.cmake b/cmake/Modules/Packages/KSPACE.cmake index e2a42f3981..184a70f746 100644 --- a/cmake/Modules/Packages/KSPACE.cmake +++ b/cmake/Modules/Packages/KSPACE.cmake @@ -41,7 +41,7 @@ if(PKG_KSPACE) if(FFT_MKL_THREADS) target_compile_definitions(lammps PRIVATE -DFFT_MKL_THREADS) endif() - include_directories(${MKL_INCLUDE_DIRS}) + target_include_directories(lammps PRIVATE ${MKL_INCLUDE_DIRS}) target_link_libraries(lammps PRIVATE ${MKL_LIBRARIES}) else() # last option is KISSFFT diff --git a/cmake/Modules/Packages/MESSAGE.cmake b/cmake/Modules/Packages/MESSAGE.cmake index c28c50c507..54d9f3eef7 100644 --- a/cmake/Modules/Packages/MESSAGE.cmake +++ b/cmake/Modules/Packages/MESSAGE.cmake @@ -28,5 +28,5 @@ if(PKG_MESSAGE) endif() target_link_libraries(lammps PRIVATE cslib) - include_directories(${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src) + target_include_directories(lammps PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src) endif() diff --git a/cmake/Modules/Packages/OPT.cmake b/cmake/Modules/Packages/OPT.cmake index 02e3877c59..5d006bfd58 100644 --- a/cmake/Modules/Packages/OPT.cmake +++ b/cmake/Modules/Packages/OPT.cmake @@ -9,5 +9,5 @@ if(PKG_OPT) get_property(OPT_SOURCES GLOBAL PROPERTY OPT_SOURCES) target_sources(lammps PRIVATE ${OPT_SOURCES}) - include_directories(${OPT_SOURCES_DIR}) + target_include_directories(lammps PRIVATE ${OPT_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/PYTHON.cmake b/cmake/Modules/Packages/PYTHON.cmake index 4611fddb98..b2451ebbdf 100644 --- a/cmake/Modules/Packages/PYTHON.cmake +++ b/cmake/Modules/Packages/PYTHON.cmake @@ -1,6 +1,6 @@ if(PKG_PYTHON) find_package(PythonLibs REQUIRED) target_compile_definitions(lammps PRIVATE -DLMP_PYTHON) - include_directories(${PYTHON_INCLUDE_DIR}) + target_include_directories(lammps PRIVATE ${PYTHON_INCLUDE_DIR}) target_link_libraries(lammps PRIVATE ${PYTHON_LIBRARY}) endif() diff --git a/cmake/Modules/Packages/QEQ.cmake b/cmake/Modules/Packages/QEQ.cmake index 9b151c2610..d69fb23440 100644 --- a/cmake/Modules/Packages/QEQ.cmake +++ b/cmake/Modules/Packages/QEQ.cmake @@ -16,5 +16,5 @@ if(PKG_QEQ) get_property(QEQ_SOURCES GLOBAL PROPERTY QEQ_SOURCES) target_sources(lammps PRIVATE ${QEQ_SOURCES}) - include_directories(${QEQ_SOURCES_DIR}) + target_include_directories(lammps PRIVATE ${QEQ_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/USER-H5MD.cmake b/cmake/Modules/Packages/USER-H5MD.cmake index 1e3fcf82ce..cf5623f46d 100644 --- a/cmake/Modules/Packages/USER-H5MD.cmake +++ b/cmake/Modules/Packages/USER-H5MD.cmake @@ -4,5 +4,4 @@ if(PKG_USER-H5MD) find_package(HDF5 REQUIRED) target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES}) target_include_directories(h5md PRIVATE ${HDF5_INCLUDE_DIRS}) - include_directories(${HDF5_INCLUDE_DIRS}) endif() diff --git a/cmake/Modules/Packages/USER-INTEL.cmake b/cmake/Modules/Packages/USER-INTEL.cmake index 96a897297f..d81f793f50 100644 --- a/cmake/Modules/Packages/USER-INTEL.cmake +++ b/cmake/Modules/Packages/USER-INTEL.cmake @@ -109,5 +109,5 @@ if(PKG_USER-INTEL) endif() target_sources(lammps PRIVATE ${USER-INTEL_SOURCES}) - include_directories(${USER-INTEL_SOURCES_DIR}) + target_include_directories(lammps PRIVATE ${USER-INTEL_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/USER-OMP.cmake b/cmake/Modules/Packages/USER-OMP.cmake index 91f0467a17..42f91495d5 100644 --- a/cmake/Modules/Packages/USER-OMP.cmake +++ b/cmake/Modules/Packages/USER-OMP.cmake @@ -38,5 +38,5 @@ if(PKG_USER-OMP) endif() target_sources(lammps PRIVATE ${USER-OMP_SOURCES}) - include_directories(${USER-OMP_SOURCES_DIR}) + target_include_directories(lammps PRIVATE ${USER-OMP_SOURCES_DIR}) endif() diff --git a/cmake/Modules/Packages/USER-PLUMED.cmake b/cmake/Modules/Packages/USER-PLUMED.cmake index cfd187ed9d..75b2db2f93 100644 --- a/cmake/Modules/Packages/USER-PLUMED.cmake +++ b/cmake/Modules/Packages/USER-PLUMED.cmake @@ -92,5 +92,5 @@ if(PKG_USER-PLUMED) endif() target_link_libraries(lammps PRIVATE ${PLUMED_LOAD}) endif() - include_directories(${PLUMED_INCLUDE_DIRS}) + target_include_directories(lammps PRIVATE ${PLUMED_INCLUDE_DIRS}) endif() diff --git a/cmake/Modules/Packages/USER-SDPD.cmake b/cmake/Modules/Packages/USER-SDPD.cmake index 1105fbd7ce..750194bcc6 100644 --- a/cmake/Modules/Packages/USER-SDPD.cmake +++ b/cmake/Modules/Packages/USER-SDPD.cmake @@ -11,5 +11,5 @@ if(PKG_USER-SDPD) endif() set_property(GLOBAL PROPERTY FIX "${hlist}") - include_directories(${USER-SDPD_SOURCES_DIR}) + target_include_directories(lammps PRIVATE ${USER-SDPD_SOURCES_DIR}) endif() From d8b6d10f3b9d65f99232980510011ace2db068a6 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 11:42:36 -0600 Subject: [PATCH 081/577] MSCG.cmake: create an use imported target --- cmake/Modules/FindMSCG.cmake | 16 +++++++++++++--- cmake/Modules/Packages/MSCG.cmake | 12 ++++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/cmake/Modules/FindMSCG.cmake b/cmake/Modules/FindMSCG.cmake index 311ff78038..b301303dbe 100644 --- a/cmake/Modules/FindMSCG.cmake +++ b/cmake/Modules/FindMSCG.cmake @@ -10,13 +10,23 @@ find_path(MSCG_INCLUDE_DIR mscg.h PATH_SUFFIXES mscg) find_library(MSCG_LIBRARY NAMES mscg) -set(MSCG_LIBRARIES ${MSCG_LIBRARY}) -set(MSCG_INCLUDE_DIRS ${MSCG_INCLUDE_DIR}) - include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set MSCG_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(MSCG DEFAULT_MSG MSCG_LIBRARY MSCG_INCLUDE_DIR) +# Copy the results to the output variables and target. +if(MSCG_FOUND) + set(MSCG_LIBRARIES ${MSCG_LIBRARY}) + set(MSCG_INCLUDE_DIRS ${MSCG_INCLUDE_DIR}) + + if(NOT TARGET MSCG::MSCG) + add_library(MSCG::MSCG UNKNOWN IMPORTED) + set_target_properties(MSCG::MSCG PROPERTIES + IMPORTED_LOCATION "${MSCG_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${MSCG_INCLUDE_DIR}") + endif() +endif() + mark_as_advanced(MSCG_INCLUDE_DIR MSCG_LIBRARY ) diff --git a/cmake/Modules/Packages/MSCG.cmake b/cmake/Modules/Packages/MSCG.cmake index 2c63e69fa7..750a1a8c37 100644 --- a/cmake/Modules/Packages/MSCG.cmake +++ b/cmake/Modules/Packages/MSCG.cmake @@ -29,12 +29,17 @@ if(PKG_MSCG) BUILD_BYPRODUCTS /libmscg.a ) ExternalProject_get_property(mscg_build BINARY_DIR) - set(MSCG_LIBRARIES ${BINARY_DIR}/libmscg.a) ExternalProject_get_property(mscg_build SOURCE_DIR) set(MSCG_INCLUDE_DIRS ${SOURCE_DIR}/src) + if(NOT TARGET MSCG::MSCG) + add_library(MSCG::MSCG UNKNOWN IMPORTED) + set_target_properties(MSCG::MSCG PROPERTIES + IMPORTED_LOCATION "${BINARY_DIR}/libmscg.a" + INTERFACE_INCLUDE_DIRECTORIES "${MSCG_INCLUDE_DIRS}") + endif() add_dependencies(lammps mscg_build) if(NOT LAPACK_FOUND) - file(MAKE_DIRECTORY ${MSCG_INCLUDE_DIRS}) + file(MAKE_DIRECTORY ) add_dependencies(mscg_build linalg) endif() else() @@ -43,6 +48,5 @@ if(PKG_MSCG) message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIRS, or set DOWNLOAD_MSCG=ON to download it") endif() endif() - target_link_libraries(lammps PRIVATE ${MSCG_LIBRARIES} GSL::gsl ${LAPACK_LIBRARIES}) - include_directories(${MSCG_INCLUDE_DIRS}) + target_link_libraries(lammps PRIVATE MSCG::MSCG GSL::gsl ${LAPACK_LIBRARIES}) endif() From 72c94f0fbf7c70c18fb44820247fe2b83667efb6 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 11:49:24 -0600 Subject: [PATCH 082/577] USER-SCAFACOS.cmake: use imported pkg-config target --- cmake/Modules/Packages/USER-SCAFACOS.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/Packages/USER-SCAFACOS.cmake b/cmake/Modules/Packages/USER-SCAFACOS.cmake index ebd750c04b..6725472c07 100644 --- a/cmake/Modules/Packages/USER-SCAFACOS.cmake +++ b/cmake/Modules/Packages/USER-SCAFACOS.cmake @@ -46,7 +46,7 @@ if(PKG_USER-SCAFACOS) ) ExternalProject_get_property(scafacos_build INSTALL_DIR) set(SCAFACOS_BUILD_DIR ${INSTALL_DIR}) - set(SCAFACOS_INCLUDE_DIRS ${SCAFACOS_BUILD_DIR}/include) + target_include_directories(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/include) add_dependencies(lammps scafacos_build) # list and order from pkg_config file of ScaFaCoS build target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs.a) @@ -69,8 +69,7 @@ if(PKG_USER-SCAFACOS) target_link_libraries(lammps PRIVATE ${MPI_C_LIBRARIES}) else() find_package(PkgConfig REQUIRED) - pkg_check_modules(SCAFACOS REQUIRED scafacos) - target_link_libraries(lammps PRIVATE ${SCAFACOS_LDFLAGS}) + pkg_check_modules(SCAFACOS REQUIRED IMPORTED_TARGET scafacos) + target_link_libraries(lammps PRIVATE PkgConfig::SCAFACOS) endif() - include_directories(${SCAFACOS_INCLUDE_DIRS}) endif() From d19f112c754e8345813e23d1743bca837c87d27b Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 12:18:10 -0600 Subject: [PATCH 083/577] MSCG.cmake: fix up imported target --- cmake/Modules/Packages/MSCG.cmake | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cmake/Modules/Packages/MSCG.cmake b/cmake/Modules/Packages/MSCG.cmake index 750a1a8c37..f4bac7d422 100644 --- a/cmake/Modules/Packages/MSCG.cmake +++ b/cmake/Modules/Packages/MSCG.cmake @@ -31,15 +31,11 @@ if(PKG_MSCG) ExternalProject_get_property(mscg_build BINARY_DIR) ExternalProject_get_property(mscg_build SOURCE_DIR) set(MSCG_INCLUDE_DIRS ${SOURCE_DIR}/src) - if(NOT TARGET MSCG::MSCG) - add_library(MSCG::MSCG UNKNOWN IMPORTED) - set_target_properties(MSCG::MSCG PROPERTIES - IMPORTED_LOCATION "${BINARY_DIR}/libmscg.a" - INTERFACE_INCLUDE_DIRECTORIES "${MSCG_INCLUDE_DIRS}") - endif() + target_include_directories(lammps PRIVATE ${MSCG_INCLUDE_DIRS}) + target_link_libraries(lammps PRIVATE "${BINARY_DIR}/libmscg.a") add_dependencies(lammps mscg_build) if(NOT LAPACK_FOUND) - file(MAKE_DIRECTORY ) + file(MAKE_DIRECTORY ${MSCG_INCLUDE_DIRS}) add_dependencies(mscg_build linalg) endif() else() @@ -47,6 +43,7 @@ if(PKG_MSCG) if(NOT MSCG_FOUND) message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIRS, or set DOWNLOAD_MSCG=ON to download it") endif() + target_link_libraries(lammps PRIVATE MSCG::MSCG) endif() - target_link_libraries(lammps PRIVATE MSCG::MSCG GSL::gsl ${LAPACK_LIBRARIES}) + target_link_libraries(lammps PRIVATE GSL::gsl ${LAPACK_LIBRARIES}) endif() From f5279a291e93195054e4099ef0fec0ccb5f61093 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 12:23:39 -0600 Subject: [PATCH 084/577] USER-QUIP.cmake: create and use imported target --- cmake/Modules/FindQUIP.cmake | 13 +++++++++++-- cmake/Modules/Packages/USER-QUIP.cmake | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/FindQUIP.cmake b/cmake/Modules/FindQUIP.cmake index b6d87d11fa..277cfae49e 100644 --- a/cmake/Modules/FindQUIP.cmake +++ b/cmake/Modules/FindQUIP.cmake @@ -7,12 +7,21 @@ find_library(QUIP_LIBRARY NAMES quip) -set(QUIP_LIBRARIES ${QUIP_LIBRARY}) - include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set QUIP_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(QUIP DEFAULT_MSG QUIP_LIBRARY) +# Copy the results to the output variables and target. +if(QUIP_FOUND) + set(QUIP_LIBRARIES ${QUIP_LIBRARY}) + + if(NOT TARGET QUIP::QUIP) + add_library(QUIP::QUIP UNKNOWN IMPORTED) + set_target_properties(QUIP::QUIP PROPERTIES + IMPORTED_LOCATION "${QUIP_LIBRARY}") + endif() +endif() + mark_as_advanced(QUIP_LIBRARY) diff --git a/cmake/Modules/Packages/USER-QUIP.cmake b/cmake/Modules/Packages/USER-QUIP.cmake index 52ba7e9c47..4f41f9ef98 100644 --- a/cmake/Modules/Packages/USER-QUIP.cmake +++ b/cmake/Modules/Packages/USER-QUIP.cmake @@ -1,5 +1,5 @@ if(PKG_USER-QUIP) enable_language(Fortran) find_package(QUIP REQUIRED) - target_link_libraries(lammps PRIVATE ${LAPACK_LIBRARIES}) + target_link_libraries(lammps PRIVATE QUIP::QUIP ${LAPACK_LIBRARIES}) endif() From 99d4a226b5d0f74927b118dbd1bb4b90edaa7606 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 12:33:36 -0600 Subject: [PATCH 085/577] USER-NETCDF.cmake: create and use imported targets --- cmake/Modules/FindNetCDF.cmake | 16 ++++++++++++++-- cmake/Modules/FindPNetCDF.cmake | 9 +++++++++ cmake/Modules/Packages/USER-NETCDF.cmake | 6 ++---- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/cmake/Modules/FindNetCDF.cmake b/cmake/Modules/FindNetCDF.cmake index 2a992b6b3b..7f0ee93520 100644 --- a/cmake/Modules/FindNetCDF.cmake +++ b/cmake/Modules/FindNetCDF.cmake @@ -112,11 +112,23 @@ NetCDF_check_interface (F90 netcdf.mod netcdff) #export accumulated results to internal varS that rest of project can depend on list (APPEND NetCDF_libs "${NETCDF_C_LIBRARIES}") -set (NETCDF_LIBRARIES ${NetCDF_libs}) -set (NETCDF_INCLUDE_DIRS ${NetCDF_includes}) # handle the QUIETLY and REQUIRED arguments and set NETCDF_FOUND to TRUE if # all listed variables are TRUE include (FindPackageHandleStandardArgs) find_package_handle_standard_args (NetCDF DEFAULT_MSG NETCDF_LIBRARIES NETCDF_INCLUDE_DIRS NETCDF_HAS_INTERFACES) + +# Copy the results to the output variables and target. +if(NetCDF_FOUND) + set (NETCDF_LIBRARIES ${NetCDF_libs}) + set (NETCDF_INCLUDE_DIRS ${NetCDF_includes}) + + if(NOT TARGET NetCDF::NetCDF) + add_library(NetCDF::NetCDF UNKNOWN IMPORTED) + set_target_properties(NetCDF::NetCDF PROPERTIES + IMPORTED_LOCATION "${NETCDF_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${NetCDF_includes}" + INTERFACE_LINK_LIBRARIES "${NETCDF_LIBRARIES}") + endif() +endif() diff --git a/cmake/Modules/FindPNetCDF.cmake b/cmake/Modules/FindPNetCDF.cmake index bc3a5f9538..e501e9af49 100644 --- a/cmake/Modules/FindPNetCDF.cmake +++ b/cmake/Modules/FindPNetCDF.cmake @@ -53,3 +53,12 @@ include (FindPackageHandleStandardArgs) find_package_handle_standard_args (PNetCDF DEFAULT_MSG PNETCDF_LIBRARIES PNETCDF_INCLUDES) mark_as_advanced (PNETCDF_LIBRARIES PNETCDF_INCLUDES) + +if(PNetCDF_FOUND) + if(NOT TARGET PNetCDF::PNetCDF) + add_library(PNetCDF::PNetCDF UNKNOWN IMPORTED) + set_target_properties(PNetCDF::PNetCDF PROPERTIES + IMPORTED_LOCATION "${PNETCDF_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${PNETCDF_INCLUDES}") + endif() +endif() diff --git a/cmake/Modules/Packages/USER-NETCDF.cmake b/cmake/Modules/Packages/USER-NETCDF.cmake index 2c12d2b799..a149c7357d 100644 --- a/cmake/Modules/Packages/USER-NETCDF.cmake +++ b/cmake/Modules/Packages/USER-NETCDF.cmake @@ -9,14 +9,12 @@ if(PKG_USER-NETCDF) endif(NETCDF_FOUND) if(NETCDF_FOUND) - include_directories(${NETCDF_INCLUDE_DIRS}) - target_link_libraries(lammps PRIVATE ${NETCDF_LIBRARIES}) + target_link_libraries(lammps PRIVATE NetCDF::NetCDF) target_compile_definitions(lammps PRIVATE -DLMP_HAS_NETCDF) endif(NETCDF_FOUND) if(PNETCDF_FOUND) - include_directories(${PNETCDF_INCLUDES}) - target_link_libraries(lammps PRIVATE ${PNETCDF_LIBRARIES}) + target_link_libraries(lammps PRIVATE PNetCDF::PNetCDF) target_compile_definitions(lammps PRIVATE -DLMP_HAS_PNETCDF) endif(PNETCDF_FOUND) From 5eb77f2e9a2c3045f0b5c080ce7ef07a6eb903d2 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 14:29:14 -0600 Subject: [PATCH 086/577] FindNetCDF.cmake: fix target --- cmake/Modules/FindNetCDF.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/FindNetCDF.cmake b/cmake/Modules/FindNetCDF.cmake index 7f0ee93520..5c8caa9208 100644 --- a/cmake/Modules/FindNetCDF.cmake +++ b/cmake/Modules/FindNetCDF.cmake @@ -112,6 +112,8 @@ NetCDF_check_interface (F90 netcdf.mod netcdff) #export accumulated results to internal varS that rest of project can depend on list (APPEND NetCDF_libs "${NETCDF_C_LIBRARIES}") +set (NETCDF_LIBRARIES ${NetCDF_libs}) +set (NETCDF_INCLUDE_DIRS ${NetCDF_includes}) # handle the QUIETLY and REQUIRED arguments and set NETCDF_FOUND to TRUE if # all listed variables are TRUE @@ -121,14 +123,11 @@ find_package_handle_standard_args (NetCDF # Copy the results to the output variables and target. if(NetCDF_FOUND) - set (NETCDF_LIBRARIES ${NetCDF_libs}) - set (NETCDF_INCLUDE_DIRS ${NetCDF_includes}) - if(NOT TARGET NetCDF::NetCDF) add_library(NetCDF::NetCDF UNKNOWN IMPORTED) set_target_properties(NetCDF::NetCDF PROPERTIES IMPORTED_LOCATION "${NETCDF_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${NetCDF_includes}" + INTERFACE_INCLUDE_DIRECTORIES "${NETCDF_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "${NETCDF_LIBRARIES}") endif() endif() From 0da108f06fe2b7372a0ade40378b4368edbaa257 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 24 Mar 2020 14:50:38 -0600 Subject: [PATCH 087/577] cmake: remove last include_directories() call --- cmake/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 0001f37fce..3569ffc555 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -188,7 +188,6 @@ if(BUILD_MPI) include(MPI4WIN) else() find_package(MPI REQUIRED) - include_directories(${MPI_CXX_INCLUDE_PATH}) target_compile_definitions(lammps PRIVATE -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1) target_link_libraries(lammps PUBLIC MPI::MPI_CXX) option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF) From b8464da71ffbe6c1697b2c2071924d75c2ea30d0 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 25 Mar 2020 07:45:21 -0600 Subject: [PATCH 088/577] cmake: remove FindLAMMPS.cmake --- cmake/CMakeLists.txt | 2 -- cmake/FindLAMMPS.cmake.in | 48 --------------------------------------- 2 files changed, 50 deletions(-) delete mode 100644 cmake/FindLAMMPS.cmake.in diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 3569ffc555..02d7b50f1b 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -584,8 +584,6 @@ if(BUILD_LIB) install(FILES ${LAMMPS_CXX_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps) configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - configure_file(FindLAMMPS.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindLAMMPS${LAMMPS_LIB_SUFFIX}.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindLAMMPS${LAMMPS_LIB_SUFFIX}.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/Modules) endif() if(BUILD_EXE) diff --git a/cmake/FindLAMMPS.cmake.in b/cmake/FindLAMMPS.cmake.in deleted file mode 100644 index 586df83c2d..0000000000 --- a/cmake/FindLAMMPS.cmake.in +++ /dev/null @@ -1,48 +0,0 @@ -# - Find liblammps -# Find the native liblammps headers and libraries. -# -# The following variables will set: -# LAMMPS_INCLUDE_DIRS - where to find lammps/library.h, etc. -# LAMMPS_LIBRARIES - List of libraries when using lammps. -# LAMMPS_API_DEFINES - lammps library api defines -# LAMMPS_VERSION - lammps library version -# LAMMPS_FOUND - True if liblammps found. -# -# In addition a LAMMPS::LAMMPS imported target is getting created. -# -# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator -# http://lammps.sandia.gov, Sandia National Laboratories -# Steve Plimpton, sjplimp@sandia.gov -# -# Copyright (2003) Sandia Corporation. Under the terms of Contract -# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains -# certain rights in this software. This software is distributed under -# the GNU General Public License. -# -# See the README file in the top-level LAMMPS directory. -# - -find_package(PkgConfig) - -pkg_check_modules(PC_LAMMPS liblammps@LAMMPS_LIB_SUFFIX@) -find_path(LAMMPS_INCLUDE_DIR lammps/library.h HINTS ${PC_LAMMPS_INCLUDE_DIRS} @CMAKE_INSTALL_FULL_INCLUDEDIR@) - -set(LAMMPS_VERSION @LAMMPS_VERSION@) -set(LAMMPS_API_DEFINES @LAMMPS_API_DEFINES@) - -find_library(LAMMPS_LIBRARY NAMES lammps@LAMMPS_LIB_SUFFIX@ HINTS ${PC_LAMMPS_LIBRARY_DIRS} @CMAKE_INSTALL_FULL_LIBDIR@) - -set(LAMMPS_INCLUDE_DIRS "${LAMMPS_INCLUDE_DIR}") -set(LAMMPS_LIBRARIES "${LAMMPS_LIBRARY}") - -include(FindPackageHandleStandardArgs) -# handle the QUIETLY and REQUIRED arguments and set LAMMPS_FOUND to TRUE -# if all listed variables are TRUE -find_package_handle_standard_args(LAMMPS REQUIRED_VARS LAMMPS_LIBRARY LAMMPS_INCLUDE_DIR VERSION_VAR LAMMPS_VERSION) - -mark_as_advanced(LAMMPS_INCLUDE_DIR LAMMPS_LIBRARY) - -if(LAMMPS_FOUND AND NOT TARGET LAMMPS::LAMMPS) - add_library(LAMMPS::LAMMPS UNKNOWN IMPORTED) - set_target_properties(LAMMPS::LAMMPS PROPERTIES IMPORTED_LOCATION "${LAMMPS_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${LAMMPS_INCLUDE_DIR}" INTERFACE_COMPILE_DEFINITIONS "${LAMMPS_API_DEFINES}") -endif() From 0e9f65e0219b86d959ba66c948a6951c8003d80b Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 25 Mar 2020 08:43:57 -0600 Subject: [PATCH 089/577] cmake: add exported target --- cmake/CMakeLists.txt | 9 +++++++-- cmake/LAMMPSConfig.cmake.in | 5 +++++ cmake/pkgconfig/liblammps.pc.in | 8 +------- 3 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 cmake/LAMMPSConfig.cmake.in diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 02d7b50f1b..97bb00e250 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -26,7 +26,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules) include(LAMMPSUtils) -get_lammps_version(${LAMMPS_SOURCE_DIR}/version.h LAMMPS_VERSION) +get_lammps_version(${LAMMPS_SOURCE_DIR}/version.h PROJECT_VERSION) include(PreventInSourceBuilds) @@ -579,11 +579,16 @@ if(BUILD_LIB) set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_LIB_SUFFIX}) set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION}) - install(TARGETS lammps LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS lammps EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES ${LAMMPS_SOURCE_DIR}/library.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps) install(FILES ${LAMMPS_CXX_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps) configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(EXPORT LAMMPS_Targets FILE LAMMPS_Targets.cmake NAMESPACE LAMMPS:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS) + include(CMakePackageConfigHelpers) + configure_file(LAMMPSConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfig.cmake @ONLY) + write_basic_package_version_file("LAMMPSConfigVersion.cmake" VERSION ${PROJECT_VERSION} COMPATIBILITY ExactVersion) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfigVersion.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS) endif() if(BUILD_EXE) diff --git a/cmake/LAMMPSConfig.cmake.in b/cmake/LAMMPSConfig.cmake.in new file mode 100644 index 0000000000..0dacfc2089 --- /dev/null +++ b/cmake/LAMMPSConfig.cmake.in @@ -0,0 +1,5 @@ +include(CMakeFindDependencyMacro) +if(@BUILD_MPI@) + find_dependency(MPI REQUIRED CXX) +endif() +include("${CMAKE_CURRENT_LIST_DIR}/LAMMPS_Targets.cmake") diff --git a/cmake/pkgconfig/liblammps.pc.in b/cmake/pkgconfig/liblammps.pc.in index a89f992c4a..96dab89161 100644 --- a/cmake/pkgconfig/liblammps.pc.in +++ b/cmake/pkgconfig/liblammps.pc.in @@ -18,12 +18,6 @@ # myapp_CFLAGS = $(LAMMPS_CFLAGS) # myapp_LDADD = $(LAMMPS_LIBS) -# Use this in CMake: -# CMakeLists.txt: -# find_package(PkgConfig) -# pkg_check_modules(LAMMPS IMPORTED_TARGET lammps) -# target_link_libraries( PRIVATE PkgConfig::LAMMPS) - prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ @@ -31,7 +25,7 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ Name: liblammps@LAMMPS_MACHINE@ Description: Large-scale Atomic/Molecular Massively Parallel Simulator Library URL: http://lammps.sandia.gov -Version: @LAMMPS_VERSION@ +Version: @PROJECT_VERSION@ Requires: Libs: -L${libdir} -llammps@LAMMPS_LIB_SUFFIX@ Libs.private: -lm From ee3249676e726d5173d8b1efdf1f63c6b72ea2e3 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 25 Mar 2020 09:09:59 -0600 Subject: [PATCH 090/577] cmake: use OpenMP imported target --- cmake/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 97bb00e250..befbe4ecda 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -255,8 +255,7 @@ if(BUILD_OMP) if(NOT HAVE_OMP_H_INCLUDE) message(FATAL_ERROR "Cannot find required 'omp.h' header file") endif() - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX) endif() if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE) From 58c9c4c64bc02d279b163cfb766ca6a4060f107d Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 25 Mar 2020 10:14:42 -0600 Subject: [PATCH 091/577] USER-H5MD.cmake: make hdf5 incldir public --- cmake/Modules/Packages/USER-H5MD.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/Packages/USER-H5MD.cmake b/cmake/Modules/Packages/USER-H5MD.cmake index cf5623f46d..2893f7903c 100644 --- a/cmake/Modules/Packages/USER-H5MD.cmake +++ b/cmake/Modules/Packages/USER-H5MD.cmake @@ -3,5 +3,5 @@ if(PKG_USER-H5MD) find_package(HDF5 REQUIRED) target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES}) - target_include_directories(h5md PRIVATE ${HDF5_INCLUDE_DIRS}) + target_include_directories(h5md PUBLIC ${HDF5_INCLUDE_DIRS}) endif() From 2571b6058e82315fc7031b083b34fb05b9da06cc Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 25 Mar 2020 11:26:19 -0600 Subject: [PATCH 092/577] LATTE.cmake: create and use imported target --- cmake/Modules/FindLATTE.cmake | 13 +++++++++++-- cmake/Modules/Packages/LATTE.cmake | 10 +++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cmake/Modules/FindLATTE.cmake b/cmake/Modules/FindLATTE.cmake index 74d5173bf0..ac5c639b79 100644 --- a/cmake/Modules/FindLATTE.cmake +++ b/cmake/Modules/FindLATTE.cmake @@ -7,12 +7,21 @@ find_library(LATTE_LIBRARY NAMES latte) -set(LATTE_LIBRARIES ${LATTE_LIBRARY}) - include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LATTE_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(LATTE DEFAULT_MSG LATTE_LIBRARY) +# Copy the results to the output variables and target. +if(LATTE_FOUND) + set(LATTE_LIBRARIES ${LATTE_LIBRARY}) + + if(NOT TARGET LATTE::latte) + add_library(LATTE::latte UNKNOWN IMPORTED) + set_target_properties(LATTE::latte PROPERTIES + IMPORTED_LOCATION "${LATTE_LIBRARY}") + endif() +endif() + mark_as_advanced(LATTE_LIBRARY) diff --git a/cmake/Modules/Packages/LATTE.cmake b/cmake/Modules/Packages/LATTE.cmake index abadd1cd97..20944db1a9 100644 --- a/cmake/Modules/Packages/LATTE.cmake +++ b/cmake/Modules/Packages/LATTE.cmake @@ -26,15 +26,15 @@ if(PKG_LATTE) ) add_dependencies(lammps latte_build) ExternalProject_get_property(latte_build INSTALL_DIR) - set(LATTE_LIBRARIES ${INSTALL_DIR}/${_LATTE_LIBDIR}/liblatte.a) + target_link_libraries(lammps PRIVATE ${INSTALL_DIR}/${_LATTE_LIBDIR}/liblatte.a ${LAPACK_LIBRARIES}) + if(NOT LAPACK_FOUND) + add_dependencies(latte_build linalg) + endif() else() find_package(LATTE) if(NOT LATTE_FOUND) message(FATAL_ERROR "LATTE library not found, help CMake to find it by setting LATTE_LIBRARY, or set DOWNLOAD_LATTE=ON to download it") endif() + target_link_libraries(lammps PRIVATE LATTE::latte) endif() - if(NOT LAPACK_FOUND) - add_dependencies(latte_build linalg) - endif() - target_link_libraries(lammps PRIVATE ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES}) endif() From 299f79c91932edbb870ae8f14df5f5f1610344ff Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 25 Mar 2020 13:55:31 -0600 Subject: [PATCH 093/577] Remove deprecated Kokkos code --- src/KOKKOS/comm_kokkos.cpp | 42 +++++++++++++++--------------- src/KOKKOS/fft3d_kokkos.cpp | 8 +++--- src/KOKKOS/gridcomm_kokkos.cpp | 8 +++--- src/KOKKOS/kokkos_type.h | 2 +- src/KOKKOS/pack_kokkos.h | 16 ++++++------ src/KOKKOS/pair_kokkos.h | 18 ++++++++----- src/KOKKOS/pair_snap_kokkos_impl.h | 7 +++-- src/KOKKOS/remap_kokkos.cpp | 4 +-- 8 files changed, 57 insertions(+), 48 deletions(-) diff --git a/src/KOKKOS/comm_kokkos.cpp b/src/KOKKOS/comm_kokkos.cpp index a1ece37efd..628b0b668a 100644 --- a/src/KOKKOS/comm_kokkos.cpp +++ b/src/KOKKOS/comm_kokkos.cpp @@ -205,7 +205,7 @@ void CommKokkos::forward_comm_device(int dummy) } n = avec->pack_comm_kokkos(sendnum[iswap],k_sendlist, iswap,k_buf_send,pbc_flag[iswap],pbc[iswap]); - DeviceType::fence(); + DeviceType().fence(); if (n) { MPI_Send(k_buf_send.view().data(), n,MPI_DOUBLE,sendproc[iswap],0,world); @@ -224,14 +224,14 @@ void CommKokkos::forward_comm_device(int dummy) } n = avec->pack_comm_vel_kokkos(sendnum[iswap],k_sendlist,iswap, k_buf_send,pbc_flag[iswap],pbc[iswap]); - DeviceType::fence(); + DeviceType().fence(); if (n) { MPI_Send(k_buf_send.view().data(),n, MPI_DOUBLE,sendproc[iswap],0,world); } if (size_forward_recv[iswap]) MPI_Wait(&request,MPI_STATUS_IGNORE); avec->unpack_comm_vel_kokkos(recvnum[iswap],firstrecv[iswap],k_buf_recv); - DeviceType::fence(); + DeviceType().fence(); } else { if (size_forward_recv[iswap]) MPI_Irecv(k_buf_recv.view().data(), @@ -239,26 +239,26 @@ void CommKokkos::forward_comm_device(int dummy) recvproc[iswap],0,world,&request); n = avec->pack_comm_kokkos(sendnum[iswap],k_sendlist,iswap, k_buf_send,pbc_flag[iswap],pbc[iswap]); - DeviceType::fence(); + DeviceType().fence(); if (n) MPI_Send(k_buf_send.view().data(),n, MPI_DOUBLE,sendproc[iswap],0,world); if (size_forward_recv[iswap]) MPI_Wait(&request,MPI_STATUS_IGNORE); avec->unpack_comm_kokkos(recvnum[iswap],firstrecv[iswap],k_buf_recv); - DeviceType::fence(); + DeviceType().fence(); } } else { if (!ghost_velocity) { if (sendnum[iswap]) n = avec->pack_comm_self(sendnum[iswap],k_sendlist,iswap, firstrecv[iswap],pbc_flag[iswap],pbc[iswap]); - DeviceType::fence(); + DeviceType().fence(); } else { n = avec->pack_comm_vel_kokkos(sendnum[iswap],k_sendlist,iswap, k_buf_send,pbc_flag[iswap],pbc[iswap]); - DeviceType::fence(); + DeviceType().fence(); avec->unpack_comm_vel_kokkos(recvnum[iswap],firstrecv[iswap],k_buf_send); - DeviceType::fence(); + DeviceType().fence(); } } } @@ -334,7 +334,7 @@ void CommKokkos::reverse_comm_device() size_reverse_recv[iswap],MPI_DOUBLE, sendproc[iswap],0,world,&request); n = avec->pack_reverse_kokkos(recvnum[iswap],firstrecv[iswap],k_buf_send); - DeviceType::fence(); + DeviceType().fence(); if (n) MPI_Send(k_buf_send.view().data(),n, MPI_DOUBLE,recvproc[iswap],0,world); @@ -342,7 +342,7 @@ void CommKokkos::reverse_comm_device() } avec->unpack_reverse_kokkos(sendnum[iswap],k_sendlist,iswap, k_buf_recv); - DeviceType::fence(); + DeviceType().fence(); } else { if (sendnum[iswap]) n = avec->unpack_reverse_self(sendnum[iswap],k_sendlist,iswap, @@ -410,7 +410,7 @@ void CommKokkos::forward_comm_pair_device(Pair *pair) n = pairKKBase->pack_forward_comm_kokkos(sendnum[iswap],k_sendlist, iswap,k_buf_send_pair,pbc_flag[iswap],pbc[iswap]); - DeviceType::fence(); + DeviceType().fence(); // exchange with another proc // if self, set recv buffer to send buffer @@ -445,7 +445,7 @@ void CommKokkos::forward_comm_pair_device(Pair *pair) // unpack buffer pairKKBase->unpack_forward_comm_kokkos(recvnum[iswap],firstrecv[iswap],k_buf_recv_pair); - DeviceType::fence(); + DeviceType().fence(); } } @@ -647,7 +647,7 @@ void CommKokkos::exchange_device() k_exchange_sendlist,k_exchange_copylist, ExecutionSpaceFromDevice::space, dim,lo,hi); - DeviceType::fence(); + DeviceType().fence(); } else { while (i < nlocal) { if (x[i][dim] < lo || x[i][dim] >= hi) { @@ -671,7 +671,7 @@ void CommKokkos::exchange_device() atom->nlocal=avec-> unpack_exchange_kokkos(k_buf_send,nrecv,atom->nlocal,dim,lo,hi, ExecutionSpaceFromDevice::space); - DeviceType::fence(); + DeviceType().fence(); } } else { MPI_Sendrecv(&nsend,1,MPI_INT,procneigh[dim][0],0, @@ -704,7 +704,7 @@ void CommKokkos::exchange_device() atom->nlocal = avec-> unpack_exchange_kokkos(k_buf_recv,nrecv,atom->nlocal,dim,lo,hi, ExecutionSpaceFromDevice::space); - DeviceType::fence(); + DeviceType().fence(); } } @@ -964,13 +964,13 @@ void CommKokkos::borders_device() { n = avec-> pack_border_vel_kokkos(nsend,k_sendlist,k_buf_send,iswap, pbc_flag[iswap],pbc[iswap],exec_space); - DeviceType::fence(); + DeviceType().fence(); } else { n = avec-> pack_border_kokkos(nsend,k_sendlist,k_buf_send,iswap, pbc_flag[iswap],pbc[iswap],exec_space); - DeviceType::fence(); + DeviceType().fence(); } // swap atoms with other proc @@ -1000,21 +1000,21 @@ void CommKokkos::borders_device() { if (sendproc[iswap] != me) { avec->unpack_border_vel_kokkos(nrecv,atom->nlocal+atom->nghost, k_buf_recv,exec_space); - DeviceType::fence(); + DeviceType().fence(); } else { avec->unpack_border_vel_kokkos(nrecv,atom->nlocal+atom->nghost, k_buf_send,exec_space); - DeviceType::fence(); + DeviceType().fence(); } } else { if (sendproc[iswap] != me) { avec->unpack_border_kokkos(nrecv,atom->nlocal+atom->nghost, k_buf_recv,exec_space); - DeviceType::fence(); + DeviceType().fence(); } else { avec->unpack_border_kokkos(nrecv,atom->nlocal+atom->nghost, k_buf_send,exec_space); - DeviceType::fence(); + DeviceType().fence(); } } // set all pointers & counters diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index 26e6e93ad9..bedd15df93 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -230,7 +230,7 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, cufftExec(plan->plan_fast,d_data.data(),d_data.data(),flag); #else typename FFT_AT::t_FFT_DATA_1d d_tmp = - typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_in.dimension_0()); + typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_in.extent(0)); kiss_fft_functor f; if (flag == -1) f = kiss_fft_functor(d_data,d_tmp,plan->cfg_fast_forward,length); @@ -238,7 +238,7 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, f = kiss_fft_functor(d_data,d_tmp,plan->cfg_fast_backward,length); Kokkos::parallel_for(total/length,f); d_data = d_tmp; - d_tmp = typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_in.dimension_0()); + d_tmp = typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_in.extent(0)); #endif @@ -281,7 +281,7 @@ void FFT3dKokkos::fft_3d_kokkos(typename FFT_AT::t_FFT_DATA_1d d_in, f = kiss_fft_functor(d_data,d_tmp,plan->cfg_mid_backward,length); Kokkos::parallel_for(total/length,f); d_data = d_tmp; - d_tmp = typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_in.dimension_0()); + d_tmp = typename FFT_AT::t_FFT_DATA_1d(Kokkos::view_alloc("fft_3d:tmp",Kokkos::WithoutInitializing),d_in.extent(0)); #endif // 2nd mid-remap to prepare for 3rd FFTs @@ -864,7 +864,7 @@ void FFT3dKokkos::fft_3d_1d_only_kokkos(typename FFT_AT::t_FFT_DATA_ cufftExec(plan->plan_slow,d_data.data(),d_data.data(),flag); #else kiss_fft_functor f; - typename FFT_AT::t_FFT_DATA_1d d_tmp = typename FFT_AT::t_FFT_DATA_1d("fft_3d:tmp",d_data.dimension_0()); + typename FFT_AT::t_FFT_DATA_1d d_tmp = typename FFT_AT::t_FFT_DATA_1d("fft_3d:tmp",d_data.extent(0)); if (flag == -1) { f = kiss_fft_functor(d_data,d_tmp,plan->cfg_fast_forward,length1); Kokkos::parallel_for(total1/length1,f); diff --git a/src/KOKKOS/gridcomm_kokkos.cpp b/src/KOKKOS/gridcomm_kokkos.cpp index f1ccffe20d..bdf816b647 100644 --- a/src/KOKKOS/gridcomm_kokkos.cpp +++ b/src/KOKKOS/gridcomm_kokkos.cpp @@ -524,7 +524,7 @@ void GridCommKokkos::forward_comm(KSpace *kspace, int which) kspaceKKBase->pack_forward_kspace_kokkos(which,k_buf2,swap[m].npack,k_packlist,m); else kspaceKKBase->pack_forward_kspace_kokkos(which,k_buf1,swap[m].npack,k_packlist,m); - DeviceType::fence(); + DeviceType().fence(); if (swap[m].sendproc != me) { FFT_SCALAR* buf1; @@ -552,7 +552,7 @@ void GridCommKokkos::forward_comm(KSpace *kspace, int which) } kspaceKKBase->unpack_forward_kspace_kokkos(which,k_buf2,swap[m].nunpack,k_unpacklist,m); - DeviceType::fence(); + DeviceType().fence(); } } @@ -574,7 +574,7 @@ void GridCommKokkos::reverse_comm(KSpace *kspace, int which) kspaceKKBase->pack_reverse_kspace_kokkos(which,k_buf2,swap[m].nunpack,k_unpacklist,m); else kspaceKKBase->pack_reverse_kspace_kokkos(which,k_buf1,swap[m].nunpack,k_unpacklist,m); - DeviceType::fence(); + DeviceType().fence(); if (swap[m].recvproc != me) { FFT_SCALAR* buf1; @@ -602,7 +602,7 @@ void GridCommKokkos::reverse_comm(KSpace *kspace, int which) } kspaceKKBase->unpack_reverse_kspace_kokkos(which,k_buf2,swap[m].npack,k_packlist,m); - DeviceType::fence(); + DeviceType().fence(); } } diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index d21b9eecd2..2e68cc0405 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -1012,7 +1012,7 @@ void memset_kokkos (ViewType &view) { #else Kokkos::parallel_for(view.span()*sizeof(typename ViewType::value_type)/4, f); #endif - ViewType::execution_space::fence(); + ViewType::execution_space().fence(); } struct params_lj_coul { diff --git a/src/KOKKOS/pack_kokkos.h b/src/KOKKOS/pack_kokkos.h index 62e7960999..400048b1f0 100644 --- a/src/KOKKOS/pack_kokkos.h +++ b/src/KOKKOS/pack_kokkos.h @@ -86,7 +86,7 @@ static void pack_3d(typename FFT_AT::t_FFT_SCALAR_1d_um d_data, int data_offset, const int nfast = plan->nfast; pack_3d_functor f(d_buf,buf_offset,d_data,data_offset,plan); Kokkos::parallel_for(nslow*nmid*nfast,f); - DeviceType::fence(); + DeviceType().fence(); } /* ---------------------------------------------------------------------- @@ -140,7 +140,7 @@ static void unpack_3d(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int buf_offset, const int nfast = plan->nfast; unpack_3d_functor f(d_buf,buf_offset,d_data,data_offset,plan); Kokkos::parallel_for(nslow*nmid*nfast,f); - DeviceType::fence(); + DeviceType().fence(); } /* ---------------------------------------------------------------------- @@ -195,7 +195,7 @@ static void unpack_3d_permute1_1(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int const int nfast = plan->nfast; unpack_3d_permute1_1_functor f(d_buf,buf_offset,d_data,data_offset,plan); Kokkos::parallel_for(nslow*nmid*nfast,f); - DeviceType::fence(); + DeviceType().fence(); } /* ---------------------------------------------------------------------- unpack from buf -> data, one axis permutation, 2 values/element @@ -249,7 +249,7 @@ static void unpack_3d_permute1_2(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int const int nfast = plan->nfast; unpack_3d_permute1_2_functor f(d_buf,buf_offset,d_data,data_offset,plan); Kokkos::parallel_for(nslow*nmid*nfast,f); - DeviceType::fence(); + DeviceType().fence(); } /* ---------------------------------------------------------------------- @@ -305,7 +305,7 @@ static void unpack_3d_permute1_n(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int const int nfast = plan->nfast; unpack_3d_permute1_n_functor f(d_buf,buf_offset,d_data,data_offset,plan); Kokkos::parallel_for(nslow*nmid*nfast,f); - DeviceType::fence(); + DeviceType().fence(); } /* ---------------------------------------------------------------------- @@ -358,7 +358,7 @@ static void unpack_3d_permute2_1(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int const int nfast = plan->nfast; unpack_3d_permute2_1_functor f(d_buf,buf_offset,d_data,data_offset,plan); Kokkos::parallel_for(nslow*nmid*nfast,f); - DeviceType::fence(); + DeviceType().fence(); } /* ---------------------------------------------------------------------- @@ -412,7 +412,7 @@ static void unpack_3d_permute2_2(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int const int nfast = plan->nfast; unpack_3d_permute2_2_functor f(d_buf,buf_offset,d_data,data_offset,plan); Kokkos::parallel_for(nslow*nmid*nfast,f); - DeviceType::fence(); + DeviceType().fence(); } /* ---------------------------------------------------------------------- unpack from buf -> data, two axis permutation, nqty values/element @@ -466,7 +466,7 @@ static void unpack_3d_permute2_n(typename FFT_AT::t_FFT_SCALAR_1d_um d_buf, int const int nfast = plan->nfast; unpack_3d_permute2_n_functor f(d_buf,buf_offset,d_data,data_offset,plan); Kokkos::parallel_for(nslow*nmid*nfast,f); - DeviceType::fence(); + DeviceType().fence(); } }; diff --git a/src/KOKKOS/pair_kokkos.h b/src/KOKKOS/pair_kokkos.h index 52a05b3991..d501324960 100644 --- a/src/KOKKOS/pair_kokkos.h +++ b/src/KOKKOS/pair_kokkos.h @@ -444,7 +444,7 @@ struct PairComputeFunctor { ev.evdwl += fev.evdwl; if (c.eflag_atom) - d_eatom(i,0) += fev.evdwl; + d_eatom(i) += fev.evdwl; if (c.vflag_global) { ev.v[0] += fev.v[0]; @@ -554,7 +554,7 @@ struct PairComputeFunctor { } if (c.eflag_atom) - d_eatom(i,0) += fev.evdwl + fev.ecoul; + d_eatom(i) += fev.evdwl + fev.ecoul; if (c.vflag_global) { ev.v[0] += fev.v[0]; @@ -850,8 +850,14 @@ EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename Kokkos::Impl::enable } template -int GetTeamSize(FunctorStyle& functor, int team_size, int vector_length) { - int team_size_max = Kokkos::TeamPolicy<>::team_size_max(functor); +int GetTeamSize(FunctorStyle& functor, int inum, int reduce_flag, int team_size, int vector_length) { + int team_size_max; + if (reduce_flag) { + EV_FLOAT ev; + team_size_max = Kokkos::TeamPolicy<>(inum,Kokkos::AUTO).team_size_max(functor,ev,Kokkos::ParallelReduceTag()); + } else { + team_size_max = Kokkos::TeamPolicy<>(inum,Kokkos::AUTO).team_size_max(functor,Kokkos::ParallelForTag()); + } #ifdef KOKKOS_ENABLE_CUDA if(team_size*vector_length > team_size_max) @@ -877,13 +883,13 @@ EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename Kokkos::Impl::enable if(fpair->atom->ntypes > MAX_TYPES_STACKPARAMS) { PairComputeFunctor ff(fpair,list); - atoms_per_team = GetTeamSize(ff, atoms_per_team, vector_length); + atoms_per_team = GetTeamSize(ff, list->inum, (fpair->eflag || fpair->vflag), atoms_per_team, vector_length); Kokkos::TeamPolicy > policy(list->inum,atoms_per_team,vector_length); if (fpair->eflag || fpair->vflag) Kokkos::parallel_reduce(policy,ff,ev); else Kokkos::parallel_for(policy,ff); } else { PairComputeFunctor ff(fpair,list); - atoms_per_team = GetTeamSize(ff, atoms_per_team, vector_length); + atoms_per_team = GetTeamSize(ff, list->inum, (fpair->eflag || fpair->vflag), atoms_per_team, vector_length); Kokkos::TeamPolicy > policy(list->inum,atoms_per_team,vector_length); if (fpair->eflag || fpair->vflag) Kokkos::parallel_reduce(policy,ff,ev); else Kokkos::parallel_for(policy,ff); diff --git a/src/KOKKOS/pair_snap_kokkos_impl.h b/src/KOKKOS/pair_snap_kokkos_impl.h index d807f149a9..d4e5535614 100644 --- a/src/KOKKOS/pair_snap_kokkos_impl.h +++ b/src/KOKKOS/pair_snap_kokkos_impl.h @@ -182,11 +182,14 @@ void PairSNAPKokkos::compute(int eflag_in, int vflag_in) if (max_neighs(k_list), Kokkos::Experimental::Max(max_neighs)); + Kokkos::parallel_reduce("PairSNAPKokkos::find_max_neighs",inum, FindMaxNumNeighs(k_list), Kokkos::Max(max_neighs)); + + int chunk_size = MIN(2000,inum); + chunk_offset = 0; int vector_length = 1; int team_size = 1; - int team_size_max = Kokkos::TeamPolicy::team_size_max(*this); + int team_size_max = Kokkos::TeamPolicy(chunk_size,Kokkos::AUTO).team_size_max(*this,Kokkos::ParallelForTag()); #ifdef KOKKOS_ENABLE_CUDA team_size = 32;//max_neighs; if (team_size*vector_length > team_size_max) diff --git a/src/KOKKOS/remap_kokkos.cpp b/src/KOKKOS/remap_kokkos.cpp index c809aa034c..0d1ce46d7d 100644 --- a/src/KOKKOS/remap_kokkos.cpp +++ b/src/KOKKOS/remap_kokkos.cpp @@ -120,7 +120,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d // post all recvs into scratch space for (irecv = 0; irecv < plan->nrecv; irecv++) { - FFT_SCALAR* scratch = d_scratch.ptr_on_device() + plan->recv_bufloc[irecv]; + FFT_SCALAR* scratch = d_scratch.data() + plan->recv_bufloc[irecv]; MPI_Irecv(scratch,plan->recv_size[irecv], MPI_FFT_SCALAR,plan->recv_proc[irecv],0, plan->comm,&plan->request[irecv]); @@ -132,7 +132,7 @@ void RemapKokkos::remap_3d_kokkos(typename FFT_AT::t_FFT_SCALAR_1d d int in_offset = plan->send_offset[isend]; plan->pack(d_in,in_offset, plan->d_sendbuf,0,&plan->packplan[isend]); - MPI_Send(plan->d_sendbuf.ptr_on_device(),plan->send_size[isend],MPI_FFT_SCALAR, + MPI_Send(plan->d_sendbuf.data(),plan->send_size[isend],MPI_FFT_SCALAR, plan->send_proc[isend],0,plan->comm); } From 7a09636f9a80c486aa7f7afbc55c78d28664ce03 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 5 Feb 2020 14:36:39 -0700 Subject: [PATCH 094/577] Fix compile issue in pair_kokkos.h --- src/KOKKOS/pair_kokkos.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/KOKKOS/pair_kokkos.h b/src/KOKKOS/pair_kokkos.h index d501324960..c9f375de4b 100644 --- a/src/KOKKOS/pair_kokkos.h +++ b/src/KOKKOS/pair_kokkos.h @@ -852,12 +852,11 @@ EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename Kokkos::Impl::enable template int GetTeamSize(FunctorStyle& functor, int inum, int reduce_flag, int team_size, int vector_length) { int team_size_max; - if (reduce_flag) { - EV_FLOAT ev; - team_size_max = Kokkos::TeamPolicy<>(inum,Kokkos::AUTO).team_size_max(functor,ev,Kokkos::ParallelReduceTag()); - } else { + + if (reduce_flag) + team_size_max = Kokkos::TeamPolicy<>(inum,Kokkos::AUTO).team_size_max(functor,Kokkos::ParallelReduceTag()); + else team_size_max = Kokkos::TeamPolicy<>(inum,Kokkos::AUTO).team_size_max(functor,Kokkos::ParallelForTag()); - } #ifdef KOKKOS_ENABLE_CUDA if(team_size*vector_length > team_size_max) From 4eebcdfc0db5b6afbf6fa9a7dffb5f6ebd0e11d3 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 5 Feb 2020 16:35:43 -0700 Subject: [PATCH 095/577] Fix runtime issue in Kokkos --- src/KOKKOS/atom_vec_angle_kokkos.cpp | 6 +++--- src/KOKKOS/atom_vec_atomic_kokkos.cpp | 6 +++--- src/KOKKOS/atom_vec_bond_kokkos.cpp | 6 +++--- src/KOKKOS/atom_vec_charge_kokkos.cpp | 6 +++--- src/KOKKOS/atom_vec_dpd_kokkos.cpp | 6 +++--- src/KOKKOS/atom_vec_full_kokkos.cpp | 6 +++--- src/KOKKOS/atom_vec_molecular_kokkos.cpp | 6 +++--- src/KOKKOS/atom_vec_sphere_kokkos.cpp | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/KOKKOS/atom_vec_angle_kokkos.cpp b/src/KOKKOS/atom_vec_angle_kokkos.cpp index 736e1c1fca..5b934e2434 100644 --- a/src/KOKKOS/atom_vec_angle_kokkos.cpp +++ b/src/KOKKOS/atom_vec_angle_kokkos.cpp @@ -74,9 +74,9 @@ void AtomVecAngleKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_mask,atomKK->mask,nmax,"atom:mask"); memoryKK->grow_kokkos(atomKK->k_image,atomKK->image,nmax,"atom:image"); - memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,3,"atom:x"); - memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,3,"atom:v"); - memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,3,"atom:f"); + memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,"atom:x"); + memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,"atom:v"); + memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,"atom:f"); memoryKK->grow_kokkos(atomKK->k_molecule,atomKK->molecule,nmax,"atom:molecule"); memoryKK->grow_kokkos(atomKK->k_nspecial,atomKK->nspecial,nmax,3,"atom:nspecial"); diff --git a/src/KOKKOS/atom_vec_atomic_kokkos.cpp b/src/KOKKOS/atom_vec_atomic_kokkos.cpp index 4fec5740d6..df30b50dd0 100644 --- a/src/KOKKOS/atom_vec_atomic_kokkos.cpp +++ b/src/KOKKOS/atom_vec_atomic_kokkos.cpp @@ -70,9 +70,9 @@ void AtomVecAtomicKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_mask,atomKK->mask,nmax,"atom:mask"); memoryKK->grow_kokkos(atomKK->k_image,atomKK->image,nmax,"atom:image"); - memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,3,"atom:x"); - memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,3,"atom:v"); - memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,3,"atom:f"); + memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,"atom:x"); + memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,"atom:v"); + memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,"atom:f"); grow_reset(); atomKK->sync(Host,ALL_MASK); diff --git a/src/KOKKOS/atom_vec_bond_kokkos.cpp b/src/KOKKOS/atom_vec_bond_kokkos.cpp index 4475131d77..b614d94bce 100644 --- a/src/KOKKOS/atom_vec_bond_kokkos.cpp +++ b/src/KOKKOS/atom_vec_bond_kokkos.cpp @@ -73,9 +73,9 @@ void AtomVecBondKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_mask,atomKK->mask,nmax,"atom:mask"); memoryKK->grow_kokkos(atomKK->k_image,atomKK->image,nmax,"atom:image"); - memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,3,"atom:x"); - memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,3,"atom:v"); - memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,3,"atom:f"); + memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,"atom:x"); + memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,"atom:v"); + memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,"atom:f"); memoryKK->grow_kokkos(atomKK->k_molecule,atomKK->molecule,nmax,"atom:molecule"); memoryKK->grow_kokkos(atomKK->k_nspecial,atomKK->nspecial,nmax,3,"atom:nspecial"); diff --git a/src/KOKKOS/atom_vec_charge_kokkos.cpp b/src/KOKKOS/atom_vec_charge_kokkos.cpp index 3f26b1e9ea..a9cee3aca8 100644 --- a/src/KOKKOS/atom_vec_charge_kokkos.cpp +++ b/src/KOKKOS/atom_vec_charge_kokkos.cpp @@ -73,9 +73,9 @@ void AtomVecChargeKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_mask,atomKK->mask,nmax,"atom:mask"); memoryKK->grow_kokkos(atomKK->k_image,atomKK->image,nmax,"atom:image"); - memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,3,"atom:x"); - memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,3,"atom:v"); - memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,3,"atom:f"); + memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,"atom:x"); + memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,"atom:v"); + memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,"atom:f"); memoryKK->grow_kokkos(atomKK->k_q,atomKK->q,nmax,"atom:q"); diff --git a/src/KOKKOS/atom_vec_dpd_kokkos.cpp b/src/KOKKOS/atom_vec_dpd_kokkos.cpp index 144ef26f19..dfc122b1ef 100644 --- a/src/KOKKOS/atom_vec_dpd_kokkos.cpp +++ b/src/KOKKOS/atom_vec_dpd_kokkos.cpp @@ -75,9 +75,9 @@ void AtomVecDPDKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_mask,atomKK->mask,nmax,"atom:mask"); memoryKK->grow_kokkos(atomKK->k_image,atomKK->image,nmax,"atom:image"); - memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,3,"atom:x"); - memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,3,"atom:v"); - memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,3,"atom:f"); + memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,"atom:x"); + memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,"atom:v"); + memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,"atom:f"); memoryKK->grow_kokkos(atomKK->k_rho,atomKK->rho,nmax,"atom:rho"); diff --git a/src/KOKKOS/atom_vec_full_kokkos.cpp b/src/KOKKOS/atom_vec_full_kokkos.cpp index 1fdbcbec8c..b5239867fb 100644 --- a/src/KOKKOS/atom_vec_full_kokkos.cpp +++ b/src/KOKKOS/atom_vec_full_kokkos.cpp @@ -73,9 +73,9 @@ void AtomVecFullKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_mask,atomKK->mask,nmax,"atom:mask"); memoryKK->grow_kokkos(atomKK->k_image,atomKK->image,nmax,"atom:image"); - memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,3,"atom:x"); - memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,3,"atom:v"); - memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,3,"atom:f"); + memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,"atom:x"); + memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,"atom:v"); + memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,"atom:f"); memoryKK->grow_kokkos(atomKK->k_q,atomKK->q,nmax,"atom:q"); memoryKK->grow_kokkos(atomKK->k_molecule,atomKK->molecule,nmax,"atom:molecule"); diff --git a/src/KOKKOS/atom_vec_molecular_kokkos.cpp b/src/KOKKOS/atom_vec_molecular_kokkos.cpp index f3b4ae98ca..fec0183971 100644 --- a/src/KOKKOS/atom_vec_molecular_kokkos.cpp +++ b/src/KOKKOS/atom_vec_molecular_kokkos.cpp @@ -73,9 +73,9 @@ void AtomVecMolecularKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_mask,atomKK->mask,nmax,"atom:mask"); memoryKK->grow_kokkos(atomKK->k_image,atomKK->image,nmax,"atom:image"); - memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,3,"atom:x"); - memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,3,"atom:v"); - memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,3,"atom:f"); + memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,"atom:x"); + memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,"atom:v"); + memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,"atom:f"); memoryKK->grow_kokkos(atomKK->k_molecule,atomKK->molecule,nmax,"atom:molecule"); memoryKK->grow_kokkos(atomKK->k_nspecial,atomKK->nspecial,nmax,3,"atom:nspecial"); diff --git a/src/KOKKOS/atom_vec_sphere_kokkos.cpp b/src/KOKKOS/atom_vec_sphere_kokkos.cpp index 67aaa32c21..31f8180b4c 100644 --- a/src/KOKKOS/atom_vec_sphere_kokkos.cpp +++ b/src/KOKKOS/atom_vec_sphere_kokkos.cpp @@ -107,9 +107,9 @@ void AtomVecSphereKokkos::grow(int n) memoryKK->grow_kokkos(atomKK->k_mask,atomKK->mask,nmax,"atom:mask"); memoryKK->grow_kokkos(atomKK->k_image,atomKK->image,nmax,"atom:image"); - memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,3,"atom:x"); - memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,3,"atom:v"); - memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,3,"atom:f"); + memoryKK->grow_kokkos(atomKK->k_x,atomKK->x,nmax,"atom:x"); + memoryKK->grow_kokkos(atomKK->k_v,atomKK->v,nmax,"atom:v"); + memoryKK->grow_kokkos(atomKK->k_f,atomKK->f,nmax,"atom:f"); memoryKK->grow_kokkos(atomKK->k_radius,atomKK->radius,nmax,"atom:radius"); memoryKK->grow_kokkos(atomKK->k_rmass,atomKK->rmass,nmax,"atom:rmass"); memoryKK->grow_kokkos(atomKK->k_omega,atomKK->omega,nmax,3,"atom:omega"); From 1e7e9369dab0d5310d80e7c26458fa9fa78911e6 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Thu, 6 Feb 2020 08:44:58 -0700 Subject: [PATCH 096/577] Fix runtime error in Kokkos package --- src/KOKKOS/kokkos_type.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index 2e68cc0405..3ba6318d41 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -980,17 +980,9 @@ typedef struct ArrayTypes HAT; template void buffer_view(BufferView &buf, DualView &view, const size_t n0, - const size_t n1 = 0, - const size_t n2 = 0, - const size_t n3 = 0, - const size_t n4 = 0, - const size_t n5 = 0, - const size_t n6 = 0, - const size_t n7 = 0) { + const size_t n1) { - buf = BufferView( - view.template view().data(), - n0,n1,n2,n3,n4,n5,n6,n7); + buf = BufferView(view.template view().data(),n0,n1); } From 0025dfe1e3fd79bb557048143ccb48296549337c Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Thu, 6 Feb 2020 09:35:04 -0700 Subject: [PATCH 097/577] Update Kokkos CUDA minimum verison --- doc/src/Speed_kokkos.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/Speed_kokkos.rst b/doc/src/Speed_kokkos.rst index 6658957006..ab8444b845 100644 --- a/doc/src/Speed_kokkos.rst +++ b/doc/src/Speed_kokkos.rst @@ -38,7 +38,7 @@ compatible with specific hardware. .. note:: To build with Kokkos support for NVIDIA GPUs, NVIDIA CUDA - software version 7.5 or later must be installed on your system. See + software version 9.0 or later must be installed on your system. See the discussion for the :doc:`GPU package ` for details of how to check and do this. From e298978da0f758b44644d82859cd701ae7923469 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 25 Mar 2020 13:58:12 -0600 Subject: [PATCH 098/577] Change Kokkos::Impl to std namespace --- src/KOKKOS/atom_kokkos.h | 16 ++++++++-------- src/KOKKOS/fix_qeq_reax_kokkos.cpp | 6 +++--- src/KOKKOS/fix_rx_kokkos.cpp | 6 +++--- src/KOKKOS/fix_shardlow_kokkos.cpp | 6 +++--- src/KOKKOS/pair_buck_coul_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_buck_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_buck_kokkos.cpp | 6 +++--- src/KOKKOS/pair_coul_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_coul_debye_kokkos.cpp | 6 +++--- src/KOKKOS/pair_coul_dsf_kokkos.cpp | 6 +++--- src/KOKKOS/pair_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_coul_wolf_kokkos.cpp | 6 +++--- src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp | 12 ++++++------ src/KOKKOS/pair_eam_alloy_kokkos.cpp | 6 +++--- src/KOKKOS/pair_eam_fs_kokkos.cpp | 6 +++--- src/KOKKOS/pair_eam_kokkos.cpp | 6 +++--- src/KOKKOS/pair_exp6_rx_kokkos.cpp | 6 +++--- src/KOKKOS/pair_gran_hooke_history_kokkos.cpp | 6 +++--- src/KOKKOS/pair_kokkos.h | 4 ++-- ...air_lj_charmm_coul_charmm_implicit_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_class2_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_cut_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_expand_kokkos.cpp | 6 +++--- .../pair_lj_gromacs_coul_gromacs_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_gromacs_kokkos.cpp | 6 +++--- src/KOKKOS/pair_lj_sdk_kokkos.cpp | 6 +++--- src/KOKKOS/pair_morse_kokkos.cpp | 6 +++--- src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp | 6 +++--- src/KOKKOS/pair_reaxc_kokkos.cpp | 6 +++--- src/KOKKOS/pair_snap_kokkos_impl.h | 6 +++--- src/KOKKOS/pair_sw_kokkos.cpp | 6 +++--- src/KOKKOS/pair_table_kokkos.cpp | 6 +++--- src/KOKKOS/pair_table_rx_kokkos.cpp | 6 +++--- src/KOKKOS/pair_tersoff_kokkos.cpp | 6 +++--- src/KOKKOS/pair_tersoff_mod_kokkos.cpp | 6 +++--- src/KOKKOS/pair_tersoff_zbl_kokkos.cpp | 6 +++--- src/KOKKOS/pair_vashishta_kokkos.cpp | 6 +++--- src/KOKKOS/pair_yukawa_kokkos.cpp | 6 +++--- src/KOKKOS/pair_zbl_kokkos.cpp | 6 +++--- src/KOKKOS/sna_kokkos_impl.h | 2 +- 48 files changed, 149 insertions(+), 149 deletions(-) diff --git a/src/KOKKOS/atom_kokkos.h b/src/KOKKOS/atom_kokkos.h index a83b299ebd..0ae032032a 100644 --- a/src/KOKKOS/atom_kokkos.h +++ b/src/KOKKOS/atom_kokkos.h @@ -83,32 +83,32 @@ class SortFunctor { ViewType source; Kokkos::View dest; IndexView index; - SortFunctor(ViewType src, typename Kokkos::Impl::enable_if::type ind):source(src),index(ind){ + SortFunctor(ViewType src, typename std::enable_if::type ind):source(src),index(ind){ dest = Kokkos::View("",src.extent(0)); } - SortFunctor(ViewType src, typename Kokkos::Impl::enable_if::type ind):source(src),index(ind){ + SortFunctor(ViewType src, typename std::enable_if::type ind):source(src),index(ind){ dest = Kokkos::View("",src.extent(0),src.extent(1)); } - SortFunctor(ViewType src, typename Kokkos::Impl::enable_if::type ind):source(src),index(ind){ + SortFunctor(ViewType src, typename std::enable_if::type ind):source(src),index(ind){ dest = Kokkos::View("",src.extent(0),src.extent(1),src.extent(2)); } - SortFunctor(ViewType src, typename Kokkos::Impl::enable_if::type ind):source(src),index(ind){ + SortFunctor(ViewType src, typename std::enable_if::type ind):source(src),index(ind){ dest = Kokkos::View("",src.extent(0),src.extent(1),src.extent(2),src.extent(3)); } KOKKOS_INLINE_FUNCTION - void operator()(const typename Kokkos::Impl::enable_if::type& i) { + void operator()(const typename std::enable_if::type& i) { dest(i) = source(index(i)); } - void operator()(const typename Kokkos::Impl::enable_if::type& i) { + void operator()(const typename std::enable_if::type& i) { for(int j=0;j::type& i) { + void operator()(const typename std::enable_if::type& i) { for(int j=0;j::type& i) { + void operator()(const typename std::enable_if::type& i) { for(int j=0;j::init() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->fix = 1; diff --git a/src/KOKKOS/fix_rx_kokkos.cpp b/src/KOKKOS/fix_rx_kokkos.cpp index e06fc14585..dcb1ac0b71 100644 --- a/src/KOKKOS/fix_rx_kokkos.cpp +++ b/src/KOKKOS/fix_rx_kokkos.cpp @@ -146,10 +146,10 @@ void FixRxKokkos::init() int neighflag = lmp->kokkos->neighflag; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/fix_shardlow_kokkos.cpp b/src/KOKKOS/fix_shardlow_kokkos.cpp index 9bd8594341..c6ad47501a 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.cpp +++ b/src/KOKKOS/fix_shardlow_kokkos.cpp @@ -132,10 +132,10 @@ void FixShardlowKokkos::init() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; // neighbor->requests[irequest]->pair = 0; // neighbor->requests[irequest]->fix = 1; diff --git a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp index 2a72617525..97154f7604 100644 --- a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp @@ -296,10 +296,10 @@ void PairBuckCoulCutKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp index fdf395684a..a55c6b25f6 100644 --- a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp @@ -456,10 +456,10 @@ void PairBuckCoulLongKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_buck_kokkos.cpp b/src/KOKKOS/pair_buck_kokkos.cpp index 375d0dc1ea..76ff246be4 100644 --- a/src/KOKKOS/pair_buck_kokkos.cpp +++ b/src/KOKKOS/pair_buck_kokkos.cpp @@ -218,10 +218,10 @@ void PairBuckKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_coul_cut_kokkos.cpp b/src/KOKKOS/pair_coul_cut_kokkos.cpp index 5a1a6eefac..210144040c 100644 --- a/src/KOKKOS/pair_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_coul_cut_kokkos.cpp @@ -220,10 +220,10 @@ void PairCoulCutKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_coul_debye_kokkos.cpp b/src/KOKKOS/pair_coul_debye_kokkos.cpp index 8dd7e4f3d2..46a7df7cb1 100644 --- a/src/KOKKOS/pair_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_coul_debye_kokkos.cpp @@ -265,10 +265,10 @@ void PairCoulDebyeKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index 836b12ba39..f7bf8fb5d1 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -202,10 +202,10 @@ void PairCoulDSFKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_coul_long_kokkos.cpp b/src/KOKKOS/pair_coul_long_kokkos.cpp index 84b89c6373..19a40dad0b 100644 --- a/src/KOKKOS/pair_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_coul_long_kokkos.cpp @@ -416,10 +416,10 @@ void PairCoulLongKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.cpp b/src/KOKKOS/pair_coul_wolf_kokkos.cpp index 3ca8f16a79..f3ffdc6069 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_wolf_kokkos.cpp @@ -203,10 +203,10 @@ void PairCoulWolfKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index 21fd32a2c8..1ddf950fd7 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -87,10 +87,10 @@ void PairDPDfdtEnergyKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; @@ -125,10 +125,10 @@ void PairDPDfdtEnergyKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index 48bf63386a..87bb5dddf2 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -302,10 +302,10 @@ void PairEAMAlloyKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index 6536dd745a..37fab42d4b 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -302,10 +302,10 @@ void PairEAMFSKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp index 3358fe709c..06e26301a4 100644 --- a/src/KOKKOS/pair_eam_kokkos.cpp +++ b/src/KOKKOS/pair_eam_kokkos.cpp @@ -296,10 +296,10 @@ void PairEAMKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.cpp b/src/KOKKOS/pair_exp6_rx_kokkos.cpp index f3f63c98b2..4d72c85029 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.cpp +++ b/src/KOKKOS/pair_exp6_rx_kokkos.cpp @@ -118,10 +118,10 @@ void PairExp6rxKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp index 5071bae32f..9e65c0589e 100644 --- a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp +++ b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp @@ -86,10 +86,10 @@ void PairGranHookeHistoryKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; diff --git a/src/KOKKOS/pair_kokkos.h b/src/KOKKOS/pair_kokkos.h index c9f375de4b..41922b7349 100644 --- a/src/KOKKOS/pair_kokkos.h +++ b/src/KOKKOS/pair_kokkos.h @@ -841,7 +841,7 @@ struct PairComputeFunctor { // pair_compute_neighlist will match - either the dummy version // or the real one further below. template -EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename Kokkos::Impl::enable_if*>::type list) { +EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename std::enable_if*>::type list) { EV_FLOAT ev; (void) fpair; (void) list; @@ -869,7 +869,7 @@ int GetTeamSize(FunctorStyle& functor, int inum, int reduce_flag, int team_size, // Submit ParallelFor for NEIGHFLAG=HALF,HALFTHREAD,FULL,N2 template -EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename Kokkos::Impl::enable_if<(NEIGHFLAG&PairStyle::EnabledNeighFlags) != 0, NeighListKokkos*>::type list) { +EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename std::enable_if<(NEIGHFLAG&PairStyle::EnabledNeighFlags) != 0, NeighListKokkos*>::type list) { EV_FLOAT ev; if (!fpair->lmp->kokkos->neigh_thread_set) diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp index ae6cb61b60..86786be6f2 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp @@ -462,10 +462,10 @@ void PairLJCharmmCoulCharmmImplicitKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp index 9cdef267e2..3bc7cf5425 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp @@ -464,10 +464,10 @@ void PairLJCharmmCoulCharmmKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp index 441070248d..4285d16bed 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp @@ -471,10 +471,10 @@ void PairLJCharmmCoulLongKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp index 1f7642e965..f338575ff6 100644 --- a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp @@ -298,10 +298,10 @@ void PairLJClass2CoulCutKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp index c88ff9378e..3e62b57fdc 100644 --- a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp @@ -453,10 +453,10 @@ void PairLJClass2CoulLongKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_class2_kokkos.cpp b/src/KOKKOS/pair_lj_class2_kokkos.cpp index 9900e7361f..76406c4410 100644 --- a/src/KOKKOS/pair_lj_class2_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_kokkos.cpp @@ -236,10 +236,10 @@ void PairLJClass2Kokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp index 1601e4a4b2..094c25471c 100644 --- a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp @@ -289,10 +289,10 @@ void PairLJCutCoulCutKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp index 6e7d1eeb8b..8d1f650061 100644 --- a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp @@ -318,10 +318,10 @@ void PairLJCutCoulDebyeKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp index b7dc7cc26d..bd1754df9a 100644 --- a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp @@ -311,10 +311,10 @@ void PairLJCutCoulDSFKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp index 122d59af82..fa53850b07 100644 --- a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp @@ -452,10 +452,10 @@ void PairLJCutCoulLongKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_kokkos.cpp index df750b7524..3770e8f816 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_kokkos.cpp @@ -230,10 +230,10 @@ void PairLJCutKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_expand_kokkos.cpp b/src/KOKKOS/pair_lj_expand_kokkos.cpp index 38bebc364f..c46e0d47e4 100644 --- a/src/KOKKOS/pair_lj_expand_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_kokkos.cpp @@ -238,10 +238,10 @@ void PairLJExpandKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp index a46a5c0441..1bef3f0a27 100644 --- a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp @@ -447,10 +447,10 @@ void PairLJGromacsCoulGromacsKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp index 23ed5e5595..cfc65c883b 100644 --- a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp @@ -285,10 +285,10 @@ void PairLJGromacsKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_lj_sdk_kokkos.cpp b/src/KOKKOS/pair_lj_sdk_kokkos.cpp index 25f081d255..cb99de3cd9 100644 --- a/src/KOKKOS/pair_lj_sdk_kokkos.cpp +++ b/src/KOKKOS/pair_lj_sdk_kokkos.cpp @@ -268,10 +268,10 @@ void PairLJSDKKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_morse_kokkos.cpp b/src/KOKKOS/pair_morse_kokkos.cpp index d3e3042a34..799278bf9e 100644 --- a/src/KOKKOS/pair_morse_kokkos.cpp +++ b/src/KOKKOS/pair_morse_kokkos.cpp @@ -247,10 +247,10 @@ void PairMorseKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp index 75247859ed..3b7a738026 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp @@ -99,10 +99,10 @@ void PairMultiLucyRXKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_reaxc_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp index d0ad1f1b09..18144bb653 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -147,10 +147,10 @@ void PairReaxCKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_snap_kokkos_impl.h b/src/KOKKOS/pair_snap_kokkos_impl.h index d4e5535614..ad850981cc 100644 --- a/src/KOKKOS/pair_snap_kokkos_impl.h +++ b/src/KOKKOS/pair_snap_kokkos_impl.h @@ -91,10 +91,10 @@ void PairSNAPKokkos::init_style() int irequest = neighbor->request(this,instance_me); neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == HALF || neighflag == HALFTHREAD) { // still need atomics, even though using a full neigh list neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index e85afa362f..3ce99fe629 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -610,10 +610,10 @@ void PairSWKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; // always request a full neighbor list diff --git a/src/KOKKOS/pair_table_kokkos.cpp b/src/KOKKOS/pair_table_kokkos.cpp index 5ee24ad479..7311e4ec05 100644 --- a/src/KOKKOS/pair_table_kokkos.cpp +++ b/src/KOKKOS/pair_table_kokkos.cpp @@ -514,10 +514,10 @@ void PairTableKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index daebeda8db..cd7aa373ed 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -1268,10 +1268,10 @@ void PairTableRXKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_tersoff_kokkos.cpp b/src/KOKKOS/pair_tersoff_kokkos.cpp index b360b20ef3..d068ac0412 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_kokkos.cpp @@ -88,10 +88,10 @@ void PairTersoffKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) error->all(FLERR,"Cannot (yet) use full neighbor list style with tersoff/kk"); diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp index 81ef486999..5eb23d498a 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp @@ -88,10 +88,10 @@ void PairTersoffMODKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) error->all(FLERR,"Cannot (yet) use full neighbor list style with tersoff/mod/kk"); diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp index 4593f32e36..2648689fad 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp @@ -101,10 +101,10 @@ void PairTersoffZBLKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) error->all(FLERR,"Cannot (yet) use full neighbor list style with tersoff/zbl/kk"); diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index 614d3334d5..ddb0688e03 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -585,10 +585,10 @@ void PairVashishtaKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; // always request a full neighbor list diff --git a/src/KOKKOS/pair_yukawa_kokkos.cpp b/src/KOKKOS/pair_yukawa_kokkos.cpp index 6dfffd4a54..a1838c9ef6 100644 --- a/src/KOKKOS/pair_yukawa_kokkos.cpp +++ b/src/KOKKOS/pair_yukawa_kokkos.cpp @@ -120,10 +120,10 @@ void PairYukawaKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/pair_zbl_kokkos.cpp b/src/KOKKOS/pair_zbl_kokkos.cpp index 5697dd5b00..7a476e4a14 100644 --- a/src/KOKKOS/pair_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_zbl_kokkos.cpp @@ -92,10 +92,10 @@ void PairZBLKokkos::init_style() int irequest = neighbor->nrequest - 1; neighbor->requests[irequest]-> - kokkos_host = Kokkos::Impl::is_same::value && - !Kokkos::Impl::is_same::value; + kokkos_host = std::is_same::value && + !std::is_same::value; neighbor->requests[irequest]-> - kokkos_device = Kokkos::Impl::is_same::value; + kokkos_device = std::is_same::value; if (neighflag == FULL) { neighbor->requests[irequest]->full = 1; diff --git a/src/KOKKOS/sna_kokkos_impl.h b/src/KOKKOS/sna_kokkos_impl.h index dcedf333e5..c6c8bbb421 100644 --- a/src/KOKKOS/sna_kokkos_impl.h +++ b/src/KOKKOS/sna_kokkos_impl.h @@ -1643,7 +1643,7 @@ double SNAKokkos::memory_usage() } #endif bytes += natom * idxu_max * sizeof(double) * 2; // ulisttot - if (!Kokkos::Impl::is_same::value) + if (!std::is_same::value) bytes += natom * idxu_max * sizeof(double) * 2; // ulisttot_lr bytes += natom * idxz_max * sizeof(double) * 2; // zlist From 0252d8c21073512b6dd8b85d8c21cef8eeabd175 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 11 Mar 2020 12:17:53 -0600 Subject: [PATCH 099/577] Fix compile for UVM --- src/KOKKOS/angle_charmm_kokkos.h | 6 ++-- src/KOKKOS/angle_class2_kokkos.cpp | 6 ++-- src/KOKKOS/angle_cosine_kokkos.cpp | 6 ++-- src/KOKKOS/angle_harmonic_kokkos.cpp | 6 ++-- src/KOKKOS/bond_class2_kokkos.h | 6 ++-- src/KOKKOS/bond_fene_kokkos.cpp | 6 ++-- src/KOKKOS/bond_harmonic_kokkos.h | 6 ++-- src/KOKKOS/dihedral_charmm_kokkos.cpp | 2 +- src/KOKKOS/dihedral_charmm_kokkos.h | 8 ++--- src/KOKKOS/dihedral_class2_kokkos.cpp | 6 ++-- src/KOKKOS/dihedral_harmonic_kokkos.cpp | 6 ++-- src/KOKKOS/dihedral_opls_kokkos.cpp | 6 ++-- src/KOKKOS/fix_qeq_reax_kokkos.h | 4 +-- src/KOKKOS/fix_rx_kokkos.cpp | 6 ++-- src/KOKKOS/improper_class2_kokkos.cpp | 8 ++--- src/KOKKOS/improper_class2_kokkos.h | 2 +- src/KOKKOS/improper_harmonic_kokkos.h | 6 ++-- src/KOKKOS/kokkos_type.h | 14 ++++++++ src/KOKKOS/pair_coul_dsf_kokkos.cpp | 8 ++--- src/KOKKOS/pair_coul_wolf_kokkos.cpp | 8 ++--- src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp | 12 +++---- src/KOKKOS/pair_eam_alloy_kokkos.h | 16 ++++----- src/KOKKOS/pair_eam_fs_kokkos.h | 16 ++++----- src/KOKKOS/pair_eam_kokkos.h | 16 ++++----- src/KOKKOS/pair_exp6_rx_kokkos.cpp | 16 ++++----- src/KOKKOS/pair_gran_hooke_history_kokkos.cpp | 6 ++-- src/KOKKOS/pair_kokkos.h | 12 +++---- src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp | 8 ++--- src/KOKKOS/pair_reaxc_kokkos.cpp | 10 +++--- src/KOKKOS/pair_reaxc_kokkos.h | 36 +++++++++---------- src/KOKKOS/pair_snap_kokkos.h | 8 ++--- src/KOKKOS/pair_sw_kokkos.h | 12 +++---- src/KOKKOS/pair_table_rx_kokkos.cpp | 26 +++++++------- src/KOKKOS/pair_tersoff_kokkos.h | 12 +++---- src/KOKKOS/pair_tersoff_mod_kokkos.h | 12 +++---- src/KOKKOS/pair_tersoff_zbl_kokkos.h | 12 +++---- src/KOKKOS/pair_vashishta_kokkos.cpp | 10 +++--- src/KOKKOS/pppm_kokkos.cpp | 2 +- src/KOKKOS/sna_kokkos.h | 4 +-- 39 files changed, 194 insertions(+), 178 deletions(-) diff --git a/src/KOKKOS/angle_charmm_kokkos.h b/src/KOKKOS/angle_charmm_kokkos.h index e168160562..865439b83a 100644 --- a/src/KOKKOS/angle_charmm_kokkos.h +++ b/src/KOKKOS/angle_charmm_kokkos.h @@ -63,13 +63,13 @@ class AngleCharmmKokkos : public AngleCharmm { typedef ArrayTypes AT; typename AT::t_x_array_randomread x; - typename Kokkos::View > f; + typename Kokkos::View::value,Kokkos::MemoryTraits > f; typename AT::t_int_2d anglelist; Kokkos::DualView k_eatom; Kokkos::DualView k_vatom; - Kokkos::View > d_eatom; - Kokkos::View > d_vatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom; int nlocal,newton_bond; int eflag,vflag; diff --git a/src/KOKKOS/angle_class2_kokkos.cpp b/src/KOKKOS/angle_class2_kokkos.cpp index 809ce7e7dd..57563b959f 100644 --- a/src/KOKKOS/angle_class2_kokkos.cpp +++ b/src/KOKKOS/angle_class2_kokkos.cpp @@ -158,7 +158,7 @@ KOKKOS_INLINE_FUNCTION void AngleClass2Kokkos::operator()(TagAngleClass2Compute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = anglelist(n,0); const int i2 = anglelist(n,1); @@ -495,8 +495,8 @@ void AngleClass2Kokkos::ev_tally(EV_FLOAT &ev, const int i, const in F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.template view(); - Kokkos::View > v_vatom = k_vatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.template view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/angle_cosine_kokkos.cpp b/src/KOKKOS/angle_cosine_kokkos.cpp index da0ff398f1..65c4c1475a 100644 --- a/src/KOKKOS/angle_cosine_kokkos.cpp +++ b/src/KOKKOS/angle_cosine_kokkos.cpp @@ -141,7 +141,7 @@ KOKKOS_INLINE_FUNCTION void AngleCosineKokkos::operator()(TagAngleCosineCompute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = anglelist(n,0); const int i2 = anglelist(n,1); @@ -284,8 +284,8 @@ void AngleCosineKokkos::ev_tally(EV_FLOAT &ev, const int i, const in F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.template view(); - Kokkos::View > v_vatom = k_vatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.template view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/angle_harmonic_kokkos.cpp b/src/KOKKOS/angle_harmonic_kokkos.cpp index fc274bb894..4b8a87ece7 100644 --- a/src/KOKKOS/angle_harmonic_kokkos.cpp +++ b/src/KOKKOS/angle_harmonic_kokkos.cpp @@ -142,7 +142,7 @@ KOKKOS_INLINE_FUNCTION void AngleHarmonicKokkos::operator()(TagAngleHarmonicCompute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = anglelist(n,0); const int i2 = anglelist(n,1); @@ -302,8 +302,8 @@ void AngleHarmonicKokkos::ev_tally(EV_FLOAT &ev, const int i, const F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.template view(); - Kokkos::View > v_vatom = k_vatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.template view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/bond_class2_kokkos.h b/src/KOKKOS/bond_class2_kokkos.h index a31ae4b8ae..b3c1d5f682 100644 --- a/src/KOKKOS/bond_class2_kokkos.h +++ b/src/KOKKOS/bond_class2_kokkos.h @@ -63,13 +63,13 @@ class BondClass2Kokkos : public BondClass2 { class NeighborKokkos *neighborKK; typename AT::t_x_array_randomread x; - typename Kokkos::View > f; + typename Kokkos::View::value,Kokkos::MemoryTraits > f; typename AT::t_int_2d bondlist; Kokkos::DualView k_eatom; Kokkos::DualView k_vatom; - Kokkos::View > d_eatom; - Kokkos::View > d_vatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom; int nlocal,newton_bond; int eflag,vflag; diff --git a/src/KOKKOS/bond_fene_kokkos.cpp b/src/KOKKOS/bond_fene_kokkos.cpp index 361bb61f7e..5f1e9d3ddc 100644 --- a/src/KOKKOS/bond_fene_kokkos.cpp +++ b/src/KOKKOS/bond_fene_kokkos.cpp @@ -166,7 +166,7 @@ void BondFENEKokkos::operator()(TagBondFENECompute > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = bondlist(n,0); const int i2 = bondlist(n,1); @@ -320,8 +320,8 @@ void BondFENEKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.view(); - Kokkos::View > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/bond_harmonic_kokkos.h b/src/KOKKOS/bond_harmonic_kokkos.h index 2bf12f3766..b5bee7e909 100644 --- a/src/KOKKOS/bond_harmonic_kokkos.h +++ b/src/KOKKOS/bond_harmonic_kokkos.h @@ -63,13 +63,13 @@ class BondHarmonicKokkos : public BondHarmonic { typedef ArrayTypes AT; typename AT::t_x_array_randomread x; - typename Kokkos::View > f; + typename Kokkos::View::value,Kokkos::MemoryTraits > f; typename AT::t_int_2d bondlist; Kokkos::DualView k_eatom; Kokkos::DualView k_vatom; - Kokkos::View > d_eatom; - Kokkos::View > d_vatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom; int nlocal,newton_bond; int eflag,vflag; diff --git a/src/KOKKOS/dihedral_charmm_kokkos.cpp b/src/KOKKOS/dihedral_charmm_kokkos.cpp index 94fd0b9bb7..939834d096 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.cpp +++ b/src/KOKKOS/dihedral_charmm_kokkos.cpp @@ -201,7 +201,7 @@ KOKKOS_INLINE_FUNCTION void DihedralCharmmKokkos::operator()(TagDihedralCharmmCompute, const int &n, EVM_FLOAT& evm) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = dihedrallist(n,0); const int i2 = dihedrallist(n,1); diff --git a/src/KOKKOS/dihedral_charmm_kokkos.h b/src/KOKKOS/dihedral_charmm_kokkos.h index 449f934533..21bb6fd2e1 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.h +++ b/src/KOKKOS/dihedral_charmm_kokkos.h @@ -134,13 +134,13 @@ class DihedralCharmmKokkos : public DihedralCharmm { Kokkos::DualView k_eatom; Kokkos::DualView k_vatom; - Kokkos::View > d_eatom; - Kokkos::View > d_vatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom; Kokkos::DualView k_eatom_pair; Kokkos::DualView k_vatom_pair; - Kokkos::View > d_eatom_pair; - Kokkos::View > d_vatom_pair; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom_pair; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom_pair; int nlocal,newton_bond; int eflag,vflag; diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index 0310053b5e..60daca3137 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -197,7 +197,7 @@ KOKKOS_INLINE_FUNCTION void DihedralClass2Kokkos::operator()(TagDihedralClass2Compute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = dihedrallist(n,0); const int i2 = dihedrallist(n,1); @@ -1015,8 +1015,8 @@ void DihedralClass2Kokkos::ev_tally(EV_FLOAT &ev, const int i1, cons F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.view(); - Kokkos::View > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/dihedral_harmonic_kokkos.cpp b/src/KOKKOS/dihedral_harmonic_kokkos.cpp index dd77bc605b..0ed739ef38 100644 --- a/src/KOKKOS/dihedral_harmonic_kokkos.cpp +++ b/src/KOKKOS/dihedral_harmonic_kokkos.cpp @@ -158,7 +158,7 @@ KOKKOS_INLINE_FUNCTION void DihedralHarmonicKokkos::operator()(TagDihedralHarmonicCompute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = dihedrallist(n,0); const int i2 = dihedrallist(n,1); @@ -414,8 +414,8 @@ void DihedralHarmonicKokkos::ev_tally(EV_FLOAT &ev, const int i1, co F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.view(); - Kokkos::View > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/dihedral_opls_kokkos.cpp b/src/KOKKOS/dihedral_opls_kokkos.cpp index 825d106e04..0f510e01ad 100644 --- a/src/KOKKOS/dihedral_opls_kokkos.cpp +++ b/src/KOKKOS/dihedral_opls_kokkos.cpp @@ -157,7 +157,7 @@ KOKKOS_INLINE_FUNCTION void DihedralOPLSKokkos::operator()(TagDihedralOPLSCompute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = dihedrallist(n,0); const int i2 = dihedrallist(n,1); @@ -419,8 +419,8 @@ void DihedralOPLSKokkos::ev_tally(EV_FLOAT &ev, const int i1, const F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.view(); - Kokkos::View > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/fix_qeq_reax_kokkos.h b/src/KOKKOS/fix_qeq_reax_kokkos.h index cd69aa9283..55dec64d33 100644 --- a/src/KOKKOS/fix_qeq_reax_kokkos.h +++ b/src/KOKKOS/fix_qeq_reax_kokkos.h @@ -200,8 +200,8 @@ class FixQEqReaxKokkos : public FixQEqReax { HAT::t_ffloat_2d h_s_hist, h_t_hist; typename AT::t_ffloat_2d_randomread r_s_hist, r_t_hist; - Kokkos::Experimental::ScatterView dup_o; - Kokkos::Experimental::ScatterView ndup_o; + Kokkos::Experimental::ScatterView::value, Kokkos::Experimental::ScatterSum, Kokkos::Experimental::ScatterDuplicated> dup_o; + Kokkos::Experimental::ScatterView::value, Kokkos::Experimental::ScatterSum, Kokkos::Experimental::ScatterNonDuplicated> ndup_o; void init_shielding_k(); void init_hist(); diff --git a/src/KOKKOS/fix_rx_kokkos.cpp b/src/KOKKOS/fix_rx_kokkos.cpp index dcb1ac0b71..9271cf1b88 100644 --- a/src/KOKKOS/fix_rx_kokkos.cpp +++ b/src/KOKKOS/fix_rx_kokkos.cpp @@ -1908,7 +1908,7 @@ void FixRxKokkos::operator()(Tag_FixRxKokkos_firstPairOperator::value> > AtomicViewType; + typedef Kokkos::View< E_FLOAT*, typename DAT::t_efloat_1d::array_layout, typename KKDevice::value, Kokkos::MemoryTraits< AtomicF< NEIGHFLAG >::value> > AtomicViewType; AtomicViewType a_dpdThetaLocal = d_dpdThetaLocal; AtomicViewType a_sumWeights = d_sumWeights; @@ -2083,8 +2083,8 @@ void FixRxKokkos::computeLocalTemperature() { // Create an atomic view of sumWeights and dpdThetaLocal. Only needed // for Half/thread scenarios. - //typedef Kokkos::View< E_FLOAT*, typename DAT::t_efloat_1d::array_layout, DeviceType, Kokkos::MemoryTraits< AtomicF< NEIGHFLAG >::value> > AtomicViewType; - typedef Kokkos::View< E_FLOAT*, typename DAT::t_efloat_1d::array_layout, DeviceType, Kokkos::MemoryTraits< AtomicF< NEIGHFLAG >::value> > AtomicViewType; + //typedef Kokkos::View< E_FLOAT*, typename DAT::t_efloat_1d::array_layout, typename KKDevice::value, Kokkos::MemoryTraits< AtomicF< NEIGHFLAG >::value> > AtomicViewType; + typedef Kokkos::View< E_FLOAT*, typename DAT::t_efloat_1d::array_layout, typename KKDevice::value, Kokkos::MemoryTraits< AtomicF< NEIGHFLAG >::value> > AtomicViewType; AtomicViewType a_dpdThetaLocal = d_dpdThetaLocal; AtomicViewType a_sumWeights = d_sumWeights; diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index defd5e16f5..888f526c76 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -188,7 +188,7 @@ KOKKOS_INLINE_FUNCTION void ImproperClass2Kokkos::operator()(TagImproperClass2Compute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; int i, j, k; F_FLOAT delr[3][3],rmag[3],rinvmag[3],rmag2[3]; @@ -660,7 +660,7 @@ KOKKOS_INLINE_FUNCTION void ImproperClass2Kokkos::operator()(TagImproperClass2AngleAngle, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; int i,j,k; F_FLOAT eimproper; @@ -1010,8 +1010,8 @@ void ImproperClass2Kokkos::ev_tally(EV_FLOAT &ev, const int i1, cons F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.view(); - Kokkos::View > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/improper_class2_kokkos.h b/src/KOKKOS/improper_class2_kokkos.h index 0fbfab2beb..11212249e7 100644 --- a/src/KOKKOS/improper_class2_kokkos.h +++ b/src/KOKKOS/improper_class2_kokkos.h @@ -75,7 +75,7 @@ class ImproperClass2Kokkos : public ImproperClass2 { class NeighborKokkos *neighborKK; typename AT::t_x_array_randomread x; - typename Kokkos::View > f; + typename Kokkos::View::value,Kokkos::MemoryTraits > f; typename AT::t_int_2d improperlist; DAT::tdual_efloat_1d k_eatom; diff --git a/src/KOKKOS/improper_harmonic_kokkos.h b/src/KOKKOS/improper_harmonic_kokkos.h index 23ae0c7110..fb44081928 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.h +++ b/src/KOKKOS/improper_harmonic_kokkos.h @@ -64,13 +64,13 @@ class ImproperHarmonicKokkos : public ImproperHarmonic { class NeighborKokkos *neighborKK; typename AT::t_x_array_randomread x; - typename Kokkos::View > f; + typename Kokkos::View::value,Kokkos::MemoryTraits > f; typename AT::t_int_2d improperlist; Kokkos::DualView k_eatom; Kokkos::DualView k_vatom; - Kokkos::View > d_eatom; - Kokkos::View > d_vatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom; int nlocal,newton_bond; int eflag,vflag; diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index 3ba6318d41..b1d17b45c3 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -163,6 +163,20 @@ t_scalar3 operator * typedef Kokkos::DefaultExecutionSpace LMPDeviceType; typedef Kokkos::HostSpace::execution_space LMPHostType; + +// Need to use Cuda UVM memory space for Host execution space + +template +class KKDevice { +public: +#if defined(KOKKOS_ENABLE_CUDA) && defined(KOKKOS_ENABLE_CUDA_UVM) + typedef Kokkos::Device value; +#else + typedef Kokkos::Device value; +#endif +}; + + // set ExecutionSpace stuct with variable "space" template diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index f7bf8fb5d1..cabdcfd455 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -227,8 +227,8 @@ KOKKOS_INLINE_FUNCTION void PairCoulDSFKokkos::operator()(TagPairCoulDSFKernelA, const int &ii, EV_FLOAT& ev) const { // The f array is atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; - Kokkos::View::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); const int i = d_ilist[ii]; const X_FLOAT xtmp = x(i,0); @@ -323,8 +323,8 @@ void PairCoulDSFKokkos::ev_tally(EV_FLOAT &ev, const int &i, const i const int VFLAG = vflag_either; // The eatom and vatom arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (EFLAG) { if (eflag_atom) { diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.cpp b/src/KOKKOS/pair_coul_wolf_kokkos.cpp index f3ffdc6069..45c4ec3f22 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_wolf_kokkos.cpp @@ -228,8 +228,8 @@ KOKKOS_INLINE_FUNCTION void PairCoulWolfKokkos::operator()(TagPairCoulWolfKernelA, const int &ii, EV_FLOAT& ev) const { // The f array is atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; - Kokkos::View::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); const int i = d_ilist[ii]; const X_FLOAT xtmp = x(i,0); @@ -325,8 +325,8 @@ void PairCoulWolfKokkos::ev_tally(EV_FLOAT &ev, const int &i, const const int VFLAG = vflag_either; // The eatom and vatom arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (EFLAG) { if (eflag_atom) { diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index 1ddf950fd7..3a1e02037a 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -389,7 +389,7 @@ KOKKOS_INLINE_FUNCTION void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeSplit, const int &ii, EV_FLOAT& ev) const { // The f array is atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; int i,j,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; @@ -473,9 +473,9 @@ KOKKOS_INLINE_FUNCTION void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeNoSplit, const int &ii, EV_FLOAT& ev) const { // These array are atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; - Kokkos::View::value> > a_duCond = d_duCond; - Kokkos::View::value> > a_duMech = d_duMech; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_duCond = d_duCond; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_duMech = d_duMech; int i,j,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; @@ -697,8 +697,8 @@ void PairDPDfdtEnergyKokkos::ev_tally(EV_FLOAT &ev, const int &i, co const int VFLAG = vflag_either; // The eatom and vatom arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (EFLAG) { if (eflag_atom) { diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.h b/src/KOKKOS/pair_eam_alloy_kokkos.h index e1dd9ab47d..5796bdd1d4 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.h +++ b/src/KOKKOS/pair_eam_alloy_kokkos.h @@ -129,14 +129,14 @@ class PairEAMAlloyKokkos : public PairEAM, public KokkosBase { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_rho; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_rho; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; DAT::tdual_ffloat_1d k_rho; DAT::tdual_ffloat_1d k_fp; diff --git a/src/KOKKOS/pair_eam_fs_kokkos.h b/src/KOKKOS/pair_eam_fs_kokkos.h index e93977869e..64e1c78d56 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.h +++ b/src/KOKKOS/pair_eam_fs_kokkos.h @@ -129,14 +129,14 @@ class PairEAMFSKokkos : public PairEAM, public KokkosBase { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_rho; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_rho; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; DAT::tdual_ffloat_1d k_rho; DAT::tdual_ffloat_1d k_fp; diff --git a/src/KOKKOS/pair_eam_kokkos.h b/src/KOKKOS/pair_eam_kokkos.h index 3bf89c549a..20bac4ed16 100644 --- a/src/KOKKOS/pair_eam_kokkos.h +++ b/src/KOKKOS/pair_eam_kokkos.h @@ -126,14 +126,14 @@ class PairEAMKokkos : public PairEAM, public KokkosBase { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_rho; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_rho; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; DAT::tdual_ffloat_1d k_rho; DAT::tdual_ffloat_1d k_fp; diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.cpp b/src/KOKKOS/pair_exp6_rx_kokkos.cpp index 4d72c85029..800ea81fa5 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.cpp +++ b/src/KOKKOS/pair_exp6_rx_kokkos.cpp @@ -442,9 +442,9 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxCompute::value> > a_f = f; - Kokkos::View::value> > a_uCG = uCG; - Kokkos::View::value> > a_uCGnew = uCGnew; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_uCG = uCG; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_uCGnew = uCGnew; int i,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,evdwlOld,fpair; @@ -1183,9 +1183,9 @@ KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::vectorized_operator(const int &ii, EV_FLOAT& ev) const { // These arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; - Kokkos::View::value> > a_uCG = uCG; - Kokkos::View::value> > a_uCGnew = uCGnew; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_uCG = uCG; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_uCGnew = uCGnew; int tid = 0; #ifndef KOKKOS_ENABLE_CUDA @@ -2562,8 +2562,8 @@ void PairExp6rxKokkos::ev_tally(EV_FLOAT &ev, const int &i, const in const int VFLAG = vflag_either; // The eatom and vatom arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (EFLAG) { if (eflag_atom) { diff --git a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp index 9e65c0589e..8797aab71e 100644 --- a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp +++ b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp @@ -320,8 +320,8 @@ KOKKOS_INLINE_FUNCTION void PairGranHookeHistoryKokkos::operator()(TagPairGranHookeHistoryCompute, const int ii, EV_FLOAT &ev) const { // The f and torque arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; - Kokkos::View::value> > a_torque = torque; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_torque = torque; const int i = d_ilist[ii]; const X_FLOAT xtmp = x(i,0); @@ -549,7 +549,7 @@ void PairGranHookeHistoryKokkos::ev_tally_xyz_atom(EV_FLOAT &ev, int F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const { - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); F_FLOAT v[6]; diff --git a/src/KOKKOS/pair_kokkos.h b/src/KOKKOS/pair_kokkos.h index 41922b7349..54035c54eb 100644 --- a/src/KOKKOS/pair_kokkos.h +++ b/src/KOKKOS/pair_kokkos.h @@ -66,17 +66,17 @@ struct PairComputeFunctor { // The force array is atomic for Half/Thread neighbor style //Kokkos::View::value> > f; - Kokkos::Experimental::ScatterView::value > dup_f; + // typename KKDevice::value,Kokkos::MemoryTraits::value> > f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,NeedDup::value > dup_f; // The eatom and vatom arrays are atomic for Half/Thread neighbor style //Kokkos::View::value> > eatom; - Kokkos::Experimental::ScatterView::value > dup_eatom; + // typename KKDevice::value,Kokkos::MemoryTraits::value> > eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,NeedDup::value > dup_eatom; //Kokkos::View::value> > vatom; - Kokkos::Experimental::ScatterView::value > dup_vatom; + // typename KKDevice::value,Kokkos::MemoryTraits::value> > vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,NeedDup::value > dup_vatom; diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp index 3b7a738026..1c125b4dc0 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp @@ -270,7 +270,7 @@ KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXCompute, const int &ii, EV_FLOAT& ev) const { // The f array is atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; int i,jj,jnum,itype,jtype,itable; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,evdwlOld,fpair; @@ -532,7 +532,7 @@ void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXComputeLoca // The rho array is atomic for Half/Thread neighbor style - Kokkos::View::value> > a_rho = rho; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_rho = rho; const int i = d_ilist[ii]; @@ -771,8 +771,8 @@ void PairMultiLucyRXKokkos::ev_tally(EV_FLOAT &ev, const int &i, con const int VFLAG = vflag_either; // The eatom and vatom arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (EFLAG) { if (eflag_atom) { diff --git a/src/KOKKOS/pair_reaxc_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp index 18144bb653..302ecbafd9 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -2477,7 +2477,7 @@ void PairReaxCKokkos::operator()(PairReaxComputeAngular::value,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access::value>(); - Kokkos::View::value> > a_Cdbo = d_Cdbo; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_Cdbo = d_Cdbo; auto v_CdDelta = ScatterViewHelper::value,decltype(dup_CdDelta),decltype(ndup_CdDelta)>::get(dup_CdDelta,ndup_CdDelta); auto a_CdDelta = v_CdDelta.template access::value>(); @@ -2792,7 +2792,7 @@ void PairReaxCKokkos::operator()(PairReaxComputeTorsion::value,decltype(dup_CdDelta),decltype(ndup_CdDelta)>::get(dup_CdDelta,ndup_CdDelta); auto a_CdDelta = v_CdDelta.template access::value>(); - Kokkos::View::value> > a_Cdbo = d_Cdbo; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_Cdbo = d_Cdbo; //auto a_Cdbo = dup_Cdbo.template access::value>(); // in reaxc_torsion_angles: j = i, k = j, i = k; @@ -3311,9 +3311,9 @@ template KOKKOS_INLINE_FUNCTION void PairReaxCKokkos::operator()(PairReaxUpdateBond, const int &ii) const { - Kokkos::View::value> > a_Cdbo = d_Cdbo; - Kokkos::View::value> > a_Cdbopi = d_Cdbopi; - Kokkos::View::value> > a_Cdbopi2 = d_Cdbopi2; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_Cdbo = d_Cdbo; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_Cdbopi = d_Cdbopi; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_Cdbopi2 = d_Cdbopi2; //auto a_Cdbo = dup_Cdbo.template access::value>(); //auto a_Cdbopi = dup_Cdbopi.template access::value>(); //auto a_Cdbopi2 = dup_Cdbopi2.template access::value>(); diff --git a/src/KOKKOS/pair_reaxc_kokkos.h b/src/KOKKOS/pair_reaxc_kokkos.h index 783ea33c4e..93ca4468ec 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.h +++ b/src/KOKKOS/pair_reaxc_kokkos.h @@ -399,25 +399,25 @@ class PairReaxCKokkos : public PairReaxC { typename AT::t_ffloat_2d_dl d_C1dbopi2, d_C2dbopi2, d_C3dbopi2, d_C4dbopi2; typename AT::t_ffloat_2d_dl d_Cdbo, d_Cdbopi, d_Cdbopi2, d_dDeltap_self; - Kokkos::Experimental::ScatterView dup_total_bo; - Kokkos::Experimental::ScatterView dup_CdDelta; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView dup_dDeltap_self; - Kokkos::Experimental::ScatterView dup_Cdbo; - Kokkos::Experimental::ScatterView dup_Cdbopi; - Kokkos::Experimental::ScatterView dup_Cdbopi2; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_total_bo; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_CdDelta; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_dDeltap_self; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_Cdbo; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_Cdbopi; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_Cdbopi2; - Kokkos::Experimental::ScatterView ndup_total_bo; - Kokkos::Experimental::ScatterView ndup_CdDelta; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_vatom; - Kokkos::Experimental::ScatterView ndup_dDeltap_self; - Kokkos::Experimental::ScatterView ndup_Cdbo; - Kokkos::Experimental::ScatterView ndup_Cdbopi; - Kokkos::Experimental::ScatterView ndup_Cdbopi2; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_total_bo; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_CdDelta; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_dDeltap_self; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_Cdbo; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_Cdbopi; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_Cdbopi2; int need_dup; diff --git a/src/KOKKOS/pair_snap_kokkos.h b/src/KOKKOS/pair_snap_kokkos.h index b57ef2d9e5..1fbb537f35 100644 --- a/src/KOKKOS/pair_snap_kokkos.h +++ b/src/KOKKOS/pair_snap_kokkos.h @@ -181,10 +181,10 @@ inline double dist2(double* x,double* y); typename AT::t_int_1d_randomread type; int need_dup; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; friend void pair_virial_fdotr_compute(PairSNAPKokkos*); diff --git a/src/KOKKOS/pair_sw_kokkos.h b/src/KOKKOS/pair_sw_kokkos.h index 1a3f0b862f..2fc7f93c12 100644 --- a/src/KOKKOS/pair_sw_kokkos.h +++ b/src/KOKKOS/pair_sw_kokkos.h @@ -135,12 +135,12 @@ class PairSWKokkos : public PairSW { typename AT::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; typename AT::t_int_1d_randomread d_type2frho; typename AT::t_int_2d_randomread d_type2rhor; diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index cd7aa373ed..687489791e 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -284,11 +284,11 @@ ev_tally( F_FLOAT delx, F_FLOAT dely, F_FLOAT delz, Kokkos::View::t_virial_array::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& v_vatom, Kokkos::View::t_efloat_1d::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& v_eatom) { if (eflag) { @@ -399,15 +399,15 @@ compute_item( typename ArrayTypes::t_ffloat_2d const& d_cutsq, Kokkos::View::t_f_array::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& f, Kokkos::View::t_efloat_1d::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& uCG, Kokkos::View::t_efloat_1d::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& uCGnew, int isite1, int isite2, typename PairTableRXKokkos::TableDeviceConst const& d_table_const, @@ -418,11 +418,11 @@ compute_item( int vflag_atom, Kokkos::View::t_virial_array::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& v_vatom, Kokkos::View::t_efloat_1d::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& v_eatom) { EV_FLOAT ev; auto i = d_ilist(ii); @@ -544,14 +544,16 @@ static void compute_all_items( typename ArrayTypes::t_ffloat_2d d_cutsq, Kokkos::View::t_f_array::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > f, Kokkos::View::t_efloat_1d::array_layout, - DeviceType,Kokkos::MemoryTraits::value> > uCG, + typename KKDevice::value, + Kokkos::MemoryTraits::value> > uCG, Kokkos::View::t_efloat_1d::array_layout, - DeviceType,Kokkos::MemoryTraits::value> > uCGnew, + typename KKDevice::value, + Kokkos::MemoryTraits::value> > uCGnew, int isite1, int isite2, typename PairTableRXKokkos::TableDeviceConst d_table_const, int eflag, @@ -561,11 +563,11 @@ static void compute_all_items( int vflag_atom, Kokkos::View::t_virial_array::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > v_vatom, Kokkos::View::t_efloat_1d::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > v_eatom) { if (eflag || vflag) { Kokkos::parallel_reduce(inum, diff --git a/src/KOKKOS/pair_tersoff_kokkos.h b/src/KOKKOS/pair_tersoff_kokkos.h index 7d41fe2346..0c57e21a6c 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.h +++ b/src/KOKKOS/pair_tersoff_kokkos.h @@ -202,12 +202,12 @@ class PairTersoffKokkos : public PairTersoff { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; typedef Kokkos::DualView tdual_ffloat_2d_n7; typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread; diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.h b/src/KOKKOS/pair_tersoff_mod_kokkos.h index 889e1eadfa..b47f11e029 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.h +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.h @@ -202,12 +202,12 @@ class PairTersoffMODKokkos : public PairTersoffMOD { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; typedef Kokkos::DualView tdual_ffloat_2d_n7; typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread; diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.h b/src/KOKKOS/pair_tersoff_zbl_kokkos.h index 0c7fa2e963..bed2564da5 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.h +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.h @@ -207,12 +207,12 @@ class PairTersoffZBLKokkos : public PairTersoffZBL { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; typedef Kokkos::DualView tdual_ffloat_2d_n7; typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread; diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index ddb0688e03..84887fa1f0 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -234,7 +234,7 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeHalf::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; F_FLOAT delr1[3],delr2[3],fj[3],fk[3]; F_FLOAT evdwl = 0.0; @@ -780,8 +780,8 @@ void PairVashishtaKokkos::ev_tally(EV_FLOAT &ev, const int &i, const // The eatom and vatom arrays are atomic for half/thread neighbor list - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (eflag_atom) { @@ -856,8 +856,8 @@ void PairVashishtaKokkos::ev_tally3(EV_FLOAT &ev, const int &i, cons // The eatom and vatom arrays are atomic for half/thread neighbor list - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (eflag_atom) { epairthird = THIRD * (evdwl + ecoul); diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 08a0c18f9c..b0f6f393cf 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -1670,7 +1670,7 @@ KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_make_rho_atomic, const int &i) const { // The density_brick array is atomic for Half/Thread neighbor style - Kokkos::View > a_density_brick = d_density_brick; + Kokkos::View::value,Kokkos::MemoryTraits > a_density_brick = d_density_brick; int nx = d_part2grid(i,0); int ny = d_part2grid(i,1); diff --git a/src/KOKKOS/sna_kokkos.h b/src/KOKKOS/sna_kokkos.h index a6d9db3218..b7162cf8d6 100644 --- a/src/KOKKOS/sna_kokkos.h +++ b/src/KOKKOS/sna_kokkos.h @@ -89,7 +89,7 @@ class SNAKokkos { public: typedef Kokkos::View t_sna_1i; typedef Kokkos::View t_sna_1d; - typedef Kokkos::View > t_sna_1d_atomic; + typedef Kokkos::View::value, Kokkos::MemoryTraits > t_sna_1d_atomic; typedef Kokkos::View t_sna_2i; typedef Kokkos::View t_sna_2d; typedef Kokkos::View t_sna_2d_ll; @@ -99,7 +99,7 @@ public: typedef Kokkos::View t_sna_5d; typedef Kokkos::View t_sna_1c; - typedef Kokkos::View > t_sna_1c_atomic; + typedef Kokkos::View::value, Kokkos::MemoryTraits > t_sna_1c_atomic; typedef Kokkos::View t_sna_2c; typedef Kokkos::View t_sna_2c_ll; typedef Kokkos::View t_sna_2c_lr; From 60864e38d1d5f34db0ff379bf71eab0da0ca1ed0 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 25 Mar 2020 14:08:39 -0600 Subject: [PATCH 100/577] Update Kokkos library in LAMMPS to v3.0 --- lib/kokkos/BUILD.md | 323 + lib/kokkos/CHANGELOG.md | 40 + lib/kokkos/CMakeLists.txt | 317 +- lib/kokkos/CONTRIBUTING.md | 14 + lib/kokkos/Copyright.txt | 11 +- lib/kokkos/LICENSE | 11 +- lib/kokkos/Makefile.kokkos | 132 +- lib/kokkos/Makefile.targets | 2 + lib/kokkos/README | 193 - lib/kokkos/README.md | 299 + lib/kokkos/algorithms/CMakeLists.txt | 24 +- lib/kokkos/algorithms/src/CMakeLists.txt | 27 +- lib/kokkos/algorithms/src/Kokkos_Random.hpp | 2917 ++++----- lib/kokkos/algorithms/src/Kokkos_Sort.hpp | 651 +- .../algorithms/unit_tests/CMakeLists.txt | 39 +- lib/kokkos/algorithms/unit_tests/TestCuda.cpp | 55 +- lib/kokkos/algorithms/unit_tests/TestHPX.cpp | 53 +- .../algorithms/unit_tests/TestOpenMP.cpp | 51 +- lib/kokkos/algorithms/unit_tests/TestROCm.cpp | 64 +- .../algorithms/unit_tests/TestRandom.hpp | 495 +- .../algorithms/unit_tests/TestSerial.cpp | 54 +- lib/kokkos/algorithms/unit_tests/TestSort.hpp | 292 +- .../algorithms/unit_tests/TestThreads.cpp | 54 +- .../algorithms/unit_tests/UnitTestMain.cpp | 16 +- lib/kokkos/benchmarks/atomic/main.cpp | 210 +- .../benchmarks/bytes_and_flops/bench.hpp | 72 +- .../bytes_and_flops/bench_stride.hpp | 131 +- .../bytes_and_flops/bench_unroll_stride.hpp | 199 +- .../benchmarks/bytes_and_flops/main.cpp | 56 +- lib/kokkos/benchmarks/gather/gather.hpp | 55 +- .../benchmarks/gather/gather_unroll.hpp | 248 +- lib/kokkos/benchmarks/gather/main.cpp | 54 +- lib/kokkos/benchmarks/gups/gups-kokkos.cc | 11 +- .../benchmarks/policy_performance/main.cpp | 179 +- .../policy_performance/policy_perf_test.hpp | 570 +- .../policy_performance/script_sample_usage.sh | 2 +- lib/kokkos/benchmarks/stream/stream-kokkos.cc | 11 +- lib/kokkos/bin/hpcbind | 2 +- lib/kokkos/bin/nvcc_wrapper | 79 +- lib/kokkos/cm_generate_makefile.bash | 339 ++ lib/kokkos/cmake/KokkosConfig.cmake.in | 28 +- lib/kokkos/cmake/KokkosConfigCommon.cmake.in | 87 + lib/kokkos/cmake/KokkosCore_config.h.in | 89 + .../cmake/Makefile.generate_cmake_settings | 8 - lib/kokkos/cmake/Modules/FindHWLOC.cmake | 20 - lib/kokkos/cmake/Modules/FindMemkind.cmake | 20 - lib/kokkos/cmake/Modules/FindQthreads.cmake | 20 - lib/kokkos/cmake/Modules/FindTPLCUDA.cmake | 13 + lib/kokkos/cmake/Modules/FindTPLHPX.cmake | 15 + lib/kokkos/cmake/Modules/FindTPLHWLOC.cmake | 1 + lib/kokkos/cmake/Modules/FindTPLLIBDL.cmake | 1 + lib/kokkos/cmake/Modules/FindTPLLIBNUMA.cmake | 1 + lib/kokkos/cmake/Modules/FindTPLLIBRT.cmake | 1 + lib/kokkos/cmake/Modules/FindTPLMEMKIND.cmake | 1 + lib/kokkos/cmake/Modules/FindTPLPTHREAD.cmake | 17 + lib/kokkos/cmake/README.md | 331 + lib/kokkos/cmake/compile_tests/clang_omp.cpp | 9 + lib/kokkos/cmake/compile_tests/pthread.cpp | 10 + lib/kokkos/cmake/cray.cmake | 9 + lib/kokkos/cmake/deps/CUDA.cmake | 2 +- lib/kokkos/cmake/deps/CUSPARSE.cmake | 2 +- lib/kokkos/cmake/deps/HWLOC.cmake | 2 +- lib/kokkos/cmake/deps/Pthread.cmake | 4 +- lib/kokkos/cmake/deps/QTHREADS.cmake | 69 - lib/kokkos/cmake/fake_tribits.cmake | 338 ++ lib/kokkos/cmake/gnu.cmake | 23 + lib/kokkos/cmake/intel.cmake | 30 + lib/kokkos/cmake/kokkos_arch.cmake | 438 ++ lib/kokkos/cmake/kokkos_build.cmake | 261 - lib/kokkos/cmake/kokkos_compiler_id.cmake | 80 + lib/kokkos/cmake/kokkos_corner_cases.cmake | 35 + lib/kokkos/cmake/kokkos_enable_devices.cmake | 61 + lib/kokkos/cmake/kokkos_enable_options.cmake | 92 + lib/kokkos/cmake/kokkos_functions.cmake | 1023 ++-- lib/kokkos/cmake/kokkos_install.cmake | 42 + lib/kokkos/cmake/kokkos_options.cmake | 419 -- lib/kokkos/cmake/kokkos_pick_cxx_std.cmake | 46 + lib/kokkos/cmake/kokkos_settings.cmake | 259 - lib/kokkos/cmake/kokkos_test_cxx_std.cmake | 144 + lib/kokkos/cmake/kokkos_tpls.cmake | 47 + lib/kokkos/cmake/kokkos_tribits.cmake | 392 ++ lib/kokkos/cmake/pgi.cmake | 8 + lib/kokkos/cmake/tpls/FindTPLCUSPARSE.cmake | 2 +- lib/kokkos/cmake/tpls/FindTPLHWLOC.cmake | 2 +- lib/kokkos/cmake/tpls/FindTPLPthread.cmake | 2 +- lib/kokkos/cmake/tpls/FindTPLQTHREADS.cmake | 69 - lib/kokkos/cmake/tribits.cmake | 531 -- lib/kokkos/containers/CMakeLists.txt | 23 +- .../performance_tests/CMakeLists.txt | 87 +- .../containers/performance_tests/TestCuda.cpp | 48 +- .../performance_tests/TestDynRankView.hpp | 159 +- .../performance_tests/TestGlobal2LocalIds.hpp | 142 +- .../containers/performance_tests/TestHPX.cpp | 68 +- .../containers/performance_tests/TestMain.cpp | 14 +- .../performance_tests/TestOpenMP.cpp | 79 +- .../containers/performance_tests/TestROCm.cpp | 38 +- .../performance_tests/TestScatterView.hpp | 112 +- .../performance_tests/TestThreads.cpp | 55 +- .../TestUnorderedMapPerformance.hpp | 100 +- lib/kokkos/containers/src/CMakeLists.txt | 81 +- lib/kokkos/containers/src/Kokkos_Bitset.hpp | 348 +- lib/kokkos/containers/src/Kokkos_DualView.hpp | 814 +-- .../containers/src/Kokkos_DynRankView.hpp | 3134 +++++----- .../containers/src/Kokkos_DynamicView.hpp | 701 +-- .../containers/src/Kokkos_ErrorReporter.hpp | 111 +- .../containers/src/Kokkos_Functional.hpp | 85 +- .../containers/src/Kokkos_OffsetView.hpp | 3562 +++++------ .../containers/src/Kokkos_ScatterView.hpp | 1517 +++-- .../containers/src/Kokkos_StaticCrsGraph.hpp | 412 +- .../containers/src/Kokkos_UnorderedMap.hpp | 615 +- lib/kokkos/containers/src/Kokkos_Vector.hpp | 298 +- .../src/impl/Kokkos_Bitset_impl.hpp | 60 +- .../src/impl/Kokkos_Functional_impl.hpp | 113 +- .../impl/Kokkos_StaticCrsGraph_factory.hpp | 253 +- .../src/impl/Kokkos_UnorderedMap_impl.cpp | 105 +- .../src/impl/Kokkos_UnorderedMap_impl.hpp | 169 +- .../containers/unit_tests/CMakeLists.txt | 169 +- .../containers/unit_tests/TestBitset.hpp | 189 +- .../containers/unit_tests/TestDualView.hpp | 259 +- .../containers/unit_tests/TestDynViewAPI.hpp | 2295 +++---- .../unit_tests/TestDynViewAPI_generic.hpp | 20 +- .../unit_tests/TestDynViewAPI_rank12345.hpp | 20 +- .../unit_tests/TestDynViewAPI_rank67.hpp | 20 +- .../containers/unit_tests/TestDynamicView.hpp | 247 +- .../unit_tests/TestErrorReporter.hpp | 146 +- .../containers/unit_tests/TestOffsetView.hpp | 917 ++- .../containers/unit_tests/TestScatterView.hpp | 776 +-- .../unit_tests/TestStaticCrsGraph.hpp | 300 +- .../unit_tests/TestUnorderedMap.hpp | 280 +- .../containers/unit_tests/TestVector.hpp | 229 +- .../TestViewCtorPropEmbeddedDim.hpp | 173 +- .../containers/unit_tests/UnitTestMain.cpp | 17 +- .../unit_tests/cuda/TestCuda_BitSet.cpp | 16 +- .../unit_tests/cuda/TestCuda_Category.hpp | 26 +- .../unit_tests/cuda/TestCuda_DualView.cpp | 16 +- .../cuda/TestCuda_DynRankViewAPI_generic.cpp | 16 +- .../TestCuda_DynRankViewAPI_rank12345.cpp | 16 +- .../cuda/TestCuda_DynRankViewAPI_rank67.cpp | 16 +- .../unit_tests/cuda/TestCuda_DynamicView.cpp | 16 +- .../cuda/TestCuda_ErrorReporter.cpp | 16 +- .../unit_tests/cuda/TestCuda_OffsetView.cpp | 16 +- .../unit_tests/cuda/TestCuda_ScatterView.cpp | 16 +- .../cuda/TestCuda_StaticCrsGraph.cpp | 16 +- .../unit_tests/cuda/TestCuda_UnorderedMap.cpp | 16 +- .../unit_tests/cuda/TestCuda_Vector.cpp | 16 +- .../cuda/TestCuda_ViewCtorPropEmbeddedDim.cpp | 16 +- .../unit_tests/hpx/TestHPX_BitSet.cpp | 16 +- .../unit_tests/hpx/TestHPX_Category.hpp | 26 +- .../unit_tests/hpx/TestHPX_DualView.cpp | 16 +- .../hpx/TestHPX_DynRankViewAPI_generic.cpp | 16 +- .../hpx/TestHPX_DynRankViewAPI_rank12345.cpp | 16 +- .../hpx/TestHPX_DynRankViewAPI_rank67.cpp | 16 +- .../unit_tests/hpx/TestHPX_DynamicView.cpp | 16 +- .../unit_tests/hpx/TestHPX_ErrorReporter.cpp | 16 +- .../unit_tests/hpx/TestHPX_OffsetView.cpp | 16 +- .../unit_tests/hpx/TestHPX_ScatterView.cpp | 16 +- .../unit_tests/hpx/TestHPX_StaticCrsGraph.cpp | 16 +- .../unit_tests/hpx/TestHPX_UnorderedMap.cpp | 16 +- .../unit_tests/hpx/TestHPX_Vector.cpp | 16 +- .../hpx/TestHPX_ViewCtorPropEmbeddedDim.cpp | 16 +- .../unit_tests/openmp/TestOpenMP_BitSet.cpp | 16 +- .../unit_tests/openmp/TestOpenMP_Category.hpp | 26 +- .../unit_tests/openmp/TestOpenMP_DualView.cpp | 16 +- .../TestOpenMP_DynRankViewAPI_generic.cpp | 16 +- .../TestOpenMP_DynRankViewAPI_rank12345.cpp | 16 +- .../TestOpenMP_DynRankViewAPI_rank67.cpp | 16 +- .../openmp/TestOpenMP_DynamicView.cpp | 16 +- .../openmp/TestOpenMP_ErrorReporter.cpp | 16 +- .../openmp/TestOpenMP_OffsetView.cpp | 16 +- .../openmp/TestOpenMP_ScatterView.cpp | 16 +- .../openmp/TestOpenMP_StaticCrsGraph.cpp | 16 +- .../openmp/TestOpenMP_UnorderedMap.cpp | 16 +- .../unit_tests/openmp/TestOpenMP_Vector.cpp | 16 +- .../TestOpenMP_ViewCtorPropEmbeddedDim.cpp | 16 +- .../unit_tests/rocm/TestROCm_BitSet.cpp | 16 +- .../unit_tests/rocm/TestROCm_Category.hpp | 26 +- .../unit_tests/rocm/TestROCm_DualView.cpp | 16 +- .../rocm/TestROCm_DynRankViewAPI_generic.cpp | 16 +- .../TestROCm_DynRankViewAPI_rank12345.cpp | 16 +- .../rocm/TestROCm_DynRankViewAPI_rank67.cpp | 16 +- .../unit_tests/rocm/TestROCm_DynamicView.cpp | 16 +- .../rocm/TestROCm_ErrorReporter.cpp | 16 +- .../unit_tests/rocm/TestROCm_ScatterView.cpp | 16 +- .../rocm/TestROCm_StaticCrsGraph.cpp | 16 +- .../unit_tests/rocm/TestROCm_UnorderedMap.cpp | 16 +- .../unit_tests/rocm/TestROCm_Vector.cpp | 16 +- .../rocm/TestROCm_ViewCtorPropEmbeddedDim.cpp | 16 +- .../unit_tests/serial/TestSerial_BitSet.cpp | 16 +- .../unit_tests/serial/TestSerial_Category.hpp | 26 +- .../unit_tests/serial/TestSerial_DualView.cpp | 16 +- .../TestSerial_DynRankViewAPI_generic.cpp | 16 +- .../TestSerial_DynRankViewAPI_rank12345.cpp | 16 +- .../TestSerial_DynRankViewAPI_rank67.cpp | 16 +- .../serial/TestSerial_DynamicView.cpp | 16 +- .../serial/TestSerial_ErrorReporter.cpp | 16 +- .../serial/TestSerial_OffsetView.cpp | 16 +- .../serial/TestSerial_ScatterView.cpp | 16 +- .../serial/TestSerial_StaticCrsGraph.cpp | 16 +- .../serial/TestSerial_UnorderedMap.cpp | 16 +- .../unit_tests/serial/TestSerial_Vector.cpp | 16 +- .../TestSerial_ViewCtorPropEmbeddedDim.cpp | 16 +- .../unit_tests/threads/TestThreads_BitSet.cpp | 16 +- .../threads/TestThreads_Category.hpp | 26 +- .../threads/TestThreads_DualView.cpp | 16 +- .../TestThreads_DynRankViewAPI_generic.cpp | 16 +- .../TestThreads_DynRankViewAPI_rank12345.cpp | 16 +- .../TestThreads_DynRankViewAPI_rank67.cpp | 16 +- .../threads/TestThreads_DynamicView.cpp | 16 +- .../threads/TestThreads_ErrorReporter.cpp | 16 +- .../threads/TestThreads_OffsetView.cpp | 16 +- .../threads/TestThreads_ScatterView.cpp | 16 +- .../threads/TestThreads_StaticCrsGraph.cpp | 16 +- .../threads/TestThreads_UnorderedMap.cpp | 16 +- .../unit_tests/threads/TestThreads_Vector.cpp | 16 +- .../TestThreads_ViewCtorPropEmbeddedDim.cpp | 16 +- lib/kokkos/core/CMakeLists.txt | 25 +- lib/kokkos/core/cmake/KokkosCore_config.h.in | 3 +- lib/kokkos/core/perf_test/CMakeLists.txt | 80 +- .../core/perf_test/PerfTestBlasKernels.hpp | 252 +- lib/kokkos/core/perf_test/PerfTestDriver.hpp | 555 +- .../core/perf_test/PerfTestGramSchmidt.cpp | 274 +- lib/kokkos/core/perf_test/PerfTestHexGrad.cpp | 385 +- lib/kokkos/core/perf_test/PerfTestMDRange.hpp | 748 +-- lib/kokkos/core/perf_test/PerfTestMain.cpp | 31 +- .../core/perf_test/PerfTest_Category.hpp | 22 +- .../perf_test/PerfTest_CustomReduction.cpp | 128 +- .../PerfTest_ExecSpacePartitioning.cpp | 986 +-- .../core/perf_test/PerfTest_ViewAllocate.cpp | 125 +- .../core/perf_test/PerfTest_ViewCopy.hpp | 268 +- .../core/perf_test/PerfTest_ViewCopy_a123.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_a45.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_a6.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_a7.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_a8.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_b123.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_b45.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_b6.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_b7.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_b8.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_c123.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_c45.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_c6.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_c7.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_c8.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_d123.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_d45.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_d6.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_d7.cpp | 19 +- .../core/perf_test/PerfTest_ViewCopy_d8.cpp | 19 +- .../core/perf_test/PerfTest_ViewFill.hpp | 232 +- .../core/perf_test/PerfTest_ViewFill_123.cpp | 19 +- .../core/perf_test/PerfTest_ViewFill_45.cpp | 19 +- .../core/perf_test/PerfTest_ViewFill_6.cpp | 19 +- .../core/perf_test/PerfTest_ViewFill_7.cpp | 19 +- .../core/perf_test/PerfTest_ViewFill_8.cpp | 19 +- .../core/perf_test/PerfTest_ViewResize.hpp | 381 +- .../perf_test/PerfTest_ViewResize_123.cpp | 19 +- .../core/perf_test/PerfTest_ViewResize_45.cpp | 19 +- .../core/perf_test/PerfTest_ViewResize_6.cpp | 19 +- .../core/perf_test/PerfTest_ViewResize_7.cpp | 19 +- .../core/perf_test/PerfTest_ViewResize_8.cpp | 19 +- lib/kokkos/core/perf_test/test_atomic.cpp | 454 +- lib/kokkos/core/perf_test/test_mempool.cpp | 352 +- lib/kokkos/core/perf_test/test_taskdag.cpp | 254 +- lib/kokkos/core/src/CMakeLists.txt | 205 +- .../src/Cuda/KokkosExp_Cuda_IterateTile.hpp | 1769 +++--- .../KokkosExp_Cuda_IterateTile_Refactor.hpp | 3248 +++++----- lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp | 1106 ++-- .../core/src/Cuda/Kokkos_Cuda_Alloc.hpp | 119 +- .../Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp | 1153 ++-- ...uda_Atomic_Intrinsics_Restore_Builtins.hpp | 10 +- .../Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp | 706 ++- .../core/src/Cuda/Kokkos_Cuda_Error.hpp | 91 +- .../core/src/Cuda/Kokkos_Cuda_Instance.cpp | 834 +-- .../core/src/Cuda/Kokkos_Cuda_Instance.hpp | 209 +- .../src/Cuda/Kokkos_Cuda_KernelLaunch.hpp | 593 +- .../core/src/Cuda/Kokkos_Cuda_Locks.cpp | 45 +- .../core/src/Cuda/Kokkos_Cuda_Locks.hpp | 92 +- .../core/src/Cuda/Kokkos_Cuda_Parallel.hpp | 3926 ++++++------ .../core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp | 1163 ++-- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp | 28 +- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp | 1115 ++-- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp | 1175 ++-- .../core/src/Cuda/Kokkos_Cuda_UniqueToken.hpp | 121 +- .../src/Cuda/Kokkos_Cuda_Vectorization.hpp | 482 +- .../Kokkos_Cuda_Version_9_8_Compatibility.hpp | 123 +- lib/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp | 324 +- .../src/Cuda/Kokkos_Cuda_ViewCopyETIAvail.hpp | 18 +- .../src/Cuda/Kokkos_Cuda_ViewCopyETIDecl.hpp | 18 +- .../src/Cuda/Kokkos_Cuda_WorkGraphPolicy.hpp | 111 +- .../core/src/Cuda/Kokkos_Cuda_abort.hpp | 40 +- lib/kokkos/core/src/HPX/Kokkos_HPX.cpp | 31 +- .../Kokkos_HPX_ChunkedRoundRobinExecutor.hpp | 208 + lib/kokkos/core/src/HPX/Kokkos_HPX_Task.cpp | 17 +- lib/kokkos/core/src/HPX/Kokkos_HPX_Task.hpp | 81 +- .../src/HPX/Kokkos_HPX_ViewCopyETIAvail.hpp | 18 +- .../src/HPX/Kokkos_HPX_ViewCopyETIDecl.hpp | 18 +- .../src/HPX/Kokkos_HPX_WorkGraphPolicy.hpp | 36 +- .../core/src/KokkosExp_MDRangePolicy.hpp | 731 +-- lib/kokkos/core/src/Kokkos_AnonymousSpace.hpp | 74 +- lib/kokkos/core/src/Kokkos_Array.hpp | 406 +- lib/kokkos/core/src/Kokkos_Atomic.hpp | 118 +- lib/kokkos/core/src/Kokkos_Complex.hpp | 1032 ++-- lib/kokkos/core/src/Kokkos_Concepts.hpp | 420 +- lib/kokkos/core/src/Kokkos_CopyViews.hpp | 4444 ++++++++------ lib/kokkos/core/src/Kokkos_Core.hpp | 149 +- lib/kokkos/core/src/Kokkos_Core_fwd.hpp | 322 +- lib/kokkos/core/src/Kokkos_Crs.hpp | 329 +- lib/kokkos/core/src/Kokkos_Cuda.hpp | 173 +- lib/kokkos/core/src/Kokkos_CudaSpace.hpp | 924 ++- lib/kokkos/core/src/Kokkos_ExecPolicy.hpp | 1086 ++-- lib/kokkos/core/src/Kokkos_Extents.hpp | 110 +- lib/kokkos/core/src/Kokkos_Future.hpp | 491 +- lib/kokkos/core/src/Kokkos_HBWSpace.hpp | 268 +- lib/kokkos/core/src/Kokkos_HPX.hpp | 1002 ++-- lib/kokkos/core/src/Kokkos_HostSpace.hpp | 243 +- lib/kokkos/core/src/Kokkos_Layout.hpp | 327 +- lib/kokkos/core/src/Kokkos_Macros.hpp | 682 ++- lib/kokkos/core/src/Kokkos_MasterLock.hpp | 20 +- lib/kokkos/core/src/Kokkos_MemoryPool.hpp | 1132 ++-- lib/kokkos/core/src/Kokkos_MemoryTraits.hpp | 109 +- lib/kokkos/core/src/Kokkos_NumericTraits.hpp | 424 +- lib/kokkos/core/src/Kokkos_OpenMP.hpp | 139 +- lib/kokkos/core/src/Kokkos_OpenMPTarget.hpp | 83 +- .../core/src/Kokkos_OpenMPTargetSpace.hpp | 215 +- lib/kokkos/core/src/Kokkos_Pair.hpp | 319 +- lib/kokkos/core/src/Kokkos_Parallel.hpp | 404 +- .../core/src/Kokkos_Parallel_Reduce.hpp | 1141 ++-- .../core/src/Kokkos_PointerOwnership.hpp | 16 +- .../src/Kokkos_Profiling_ProfileSection.hpp | 175 +- lib/kokkos/core/src/Kokkos_Qthreads.hpp | 77 +- lib/kokkos/core/src/Kokkos_ROCm.hpp | 169 +- lib/kokkos/core/src/Kokkos_ROCmSpace.hpp | 617 +- lib/kokkos/core/src/Kokkos_ScratchSpace.hpp | 186 +- lib/kokkos/core/src/Kokkos_Serial.hpp | 1551 +++-- lib/kokkos/core/src/Kokkos_TaskPolicy.hpp | 20 +- lib/kokkos/core/src/Kokkos_TaskScheduler.hpp | 731 +-- .../core/src/Kokkos_TaskScheduler_fwd.hpp | 157 +- lib/kokkos/core/src/Kokkos_Threads.hpp | 117 +- lib/kokkos/core/src/Kokkos_Timer.hpp | 41 +- lib/kokkos/core/src/Kokkos_UniqueToken.hpp | 44 +- lib/kokkos/core/src/Kokkos_Vectorization.hpp | 14 +- lib/kokkos/core/src/Kokkos_View.hpp | 3723 ++++++------ .../core/src/Kokkos_WorkGraphPolicy.hpp | 200 +- lib/kokkos/core/src/Kokkos_hwloc.hpp | 34 +- lib/kokkos/core/src/Makefile | 117 - .../core/src/Makefile.generate_build_files | 125 - .../core/src/Makefile.generate_header_lists | 32 - .../core/src/OpenMP/Kokkos_OpenMP_Exec.cpp | 402 +- .../core/src/OpenMP/Kokkos_OpenMP_Exec.hpp | 316 +- .../src/OpenMP/Kokkos_OpenMP_Parallel.hpp | 2182 ++++--- .../core/src/OpenMP/Kokkos_OpenMP_Task.cpp | 80 +- .../core/src/OpenMP/Kokkos_OpenMP_Task.hpp | 306 +- .../core/src/OpenMP/Kokkos_OpenMP_Team.hpp | 408 +- .../OpenMP/Kokkos_OpenMP_ViewCopyETIAvail.hpp | 18 +- .../OpenMP/Kokkos_OpenMP_ViewCopyETIDecl.hpp | 18 +- .../OpenMP/Kokkos_OpenMP_WorkGraphPolicy.hpp | 80 +- .../OpenMPTarget/Kokkos_OpenMPTargetSpace.cpp | 290 +- .../OpenMPTarget/Kokkos_OpenMPTarget_Exec.cpp | 245 +- .../OpenMPTarget/Kokkos_OpenMPTarget_Exec.hpp | 872 +-- .../Kokkos_OpenMPTarget_Parallel.hpp | 1108 ++-- .../OpenMPTarget/Kokkos_OpenMPTarget_Task.cpp | 233 +- .../OpenMPTarget/Kokkos_OpenMPTarget_Task.hpp | 334 +- .../core/src/Qthreads/Kokkos_QthreadsExec.cpp | 444 +- .../core/src/Qthreads/Kokkos_QthreadsExec.hpp | 610 +- .../src/Qthreads/Kokkos_Qthreads_Parallel.hpp | 985 +-- .../src/Qthreads/Kokkos_Qthreads_Task.cpp | 222 +- .../src/Qthreads/Kokkos_Qthreads_Task.hpp | 122 +- .../Kokkos_Qthreads_TaskPolicy.hpp.old | 2 +- .../Qthreads/Kokkos_Qthreads_TaskQueue.hpp | 296 +- .../Kokkos_Qthreads_TaskQueue_impl.hpp | 305 +- .../KokkosExp_ROCm_IterateTile_Refactor.hpp | 3212 +++++----- .../core/src/ROCm/Kokkos_ROCm_Atomic.hpp | 784 +-- .../core/src/ROCm/Kokkos_ROCm_Config.hpp | 11 +- lib/kokkos/core/src/ROCm/Kokkos_ROCm_Exec.cpp | 86 +- lib/kokkos/core/src/ROCm/Kokkos_ROCm_Exec.hpp | 210 +- lib/kokkos/core/src/ROCm/Kokkos_ROCm_Impl.cpp | 726 ++- .../core/src/ROCm/Kokkos_ROCm_Invoke.hpp | 118 +- lib/kokkos/core/src/ROCm/Kokkos_ROCm_Join.hpp | 32 +- .../core/src/ROCm/Kokkos_ROCm_Parallel.hpp | 2559 ++++---- .../core/src/ROCm/Kokkos_ROCm_Reduce.hpp | 160 +- .../core/src/ROCm/Kokkos_ROCm_ReduceScan.hpp | 491 +- lib/kokkos/core/src/ROCm/Kokkos_ROCm_Scan.hpp | 305 +- .../core/src/ROCm/Kokkos_ROCm_Space.cpp | 685 ++- lib/kokkos/core/src/ROCm/Kokkos_ROCm_Task.cpp | 118 +- lib/kokkos/core/src/ROCm/Kokkos_ROCm_Task.hpp | 487 +- lib/kokkos/core/src/ROCm/Kokkos_ROCm_Tile.hpp | 604 +- .../src/ROCm/Kokkos_ROCm_Vectorization.hpp | 570 +- .../src/ROCm/Kokkos_ROCm_ViewCopyETIAvail.hpp | 18 +- .../src/ROCm/Kokkos_ROCm_ViewCopyETIDecl.hpp | 18 +- lib/kokkos/core/src/ROCm/hc_math_std.hpp | 382 +- .../Serial/Kokkos_Serial_ViewCopyETIAvail.hpp | 18 +- .../Serial/Kokkos_Serial_ViewCopyETIDecl.hpp | 18 +- .../core/src/Threads/Kokkos_ThreadsExec.cpp | 818 ++- .../core/src/Threads/Kokkos_ThreadsExec.hpp | 807 +-- .../src/Threads/Kokkos_ThreadsExec_base.cpp | 162 +- .../core/src/Threads/Kokkos_ThreadsTeam.hpp | 1411 +++-- .../src/Threads/Kokkos_Threads_Parallel.hpp | 1380 ++--- .../Kokkos_Threads_ViewCopyETIAvail.hpp | 18 +- .../Kokkos_Threads_ViewCopyETIDecl.hpp | 18 +- .../Kokkos_Threads_WorkGraphPolicy.hpp | 103 +- lib/kokkos/core/src/dummy.cpp | 10 + ...TIInst_int64_t_double_LayoutLeft_Rank1.cpp | 33 +- ...TIInst_int64_t_double_LayoutLeft_Rank2.cpp | 33 +- ...TIInst_int64_t_double_LayoutLeft_Rank3.cpp | 34 +- ...TIInst_int64_t_double_LayoutLeft_Rank4.cpp | 35 +- ...TIInst_int64_t_double_LayoutLeft_Rank5.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank8.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank1.cpp | 33 +- ...IInst_int64_t_double_LayoutRight_Rank2.cpp | 34 +- ...IInst_int64_t_double_LayoutRight_Rank3.cpp | 35 +- ...IInst_int64_t_double_LayoutRight_Rank4.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank5.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank8.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank1.cpp | 34 +- ...Inst_int64_t_double_LayoutStride_Rank2.cpp | 35 +- ...Inst_int64_t_double_LayoutStride_Rank3.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank4.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank5.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank8.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank1.cpp | 33 +- ...ETIInst_int64_t_float_LayoutLeft_Rank2.cpp | 33 +- ...ETIInst_int64_t_float_LayoutLeft_Rank3.cpp | 33 +- ...ETIInst_int64_t_float_LayoutLeft_Rank4.cpp | 34 +- ...ETIInst_int64_t_float_LayoutLeft_Rank5.cpp | 35 +- ...ETIInst_int64_t_float_LayoutLeft_Rank8.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank1.cpp | 33 +- ...TIInst_int64_t_float_LayoutRight_Rank2.cpp | 33 +- ...TIInst_int64_t_float_LayoutRight_Rank3.cpp | 34 +- ...TIInst_int64_t_float_LayoutRight_Rank4.cpp | 35 +- ...TIInst_int64_t_float_LayoutRight_Rank5.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank8.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank1.cpp | 33 +- ...IInst_int64_t_float_LayoutStride_Rank2.cpp | 34 +- ...IInst_int64_t_float_LayoutStride_Rank3.cpp | 35 +- ...IInst_int64_t_float_LayoutStride_Rank4.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank5.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank8.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank1.cpp | 33 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank2.cpp | 34 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank3.cpp | 35 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank4.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank5.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank8.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank1.cpp | 34 +- ...Inst_int64_t_int64_t_LayoutRight_Rank2.cpp | 35 +- ...Inst_int64_t_int64_t_LayoutRight_Rank3.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank4.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank5.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank8.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank1.cpp | 35 +- ...nst_int64_t_int64_t_LayoutStride_Rank2.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank3.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank4.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank5.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank8.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank1.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank2.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank3.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank4.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank5.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank8.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank1.cpp | 33 +- ...yETIInst_int64_t_int_LayoutRight_Rank2.cpp | 33 +- ...yETIInst_int64_t_int_LayoutRight_Rank3.cpp | 33 +- ...yETIInst_int64_t_int_LayoutRight_Rank4.cpp | 33 +- ...yETIInst_int64_t_int_LayoutRight_Rank5.cpp | 34 +- ...yETIInst_int64_t_int_LayoutRight_Rank8.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank1.cpp | 33 +- ...ETIInst_int64_t_int_LayoutStride_Rank2.cpp | 33 +- ...ETIInst_int64_t_int_LayoutStride_Rank3.cpp | 33 +- ...ETIInst_int64_t_int_LayoutStride_Rank4.cpp | 34 +- ...ETIInst_int64_t_int_LayoutStride_Rank5.cpp | 35 +- ...ETIInst_int64_t_int_LayoutStride_Rank8.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank1.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank2.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank3.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank4.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank5.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank8.cpp | 35 +- ...pyETIInst_int_double_LayoutRight_Rank1.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank2.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank3.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank4.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank5.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank8.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank1.cpp | 33 +- ...yETIInst_int_double_LayoutStride_Rank2.cpp | 33 +- ...yETIInst_int_double_LayoutStride_Rank3.cpp | 33 +- ...yETIInst_int_double_LayoutStride_Rank4.cpp | 33 +- ...yETIInst_int_double_LayoutStride_Rank5.cpp | 34 +- ...yETIInst_int_double_LayoutStride_Rank8.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank1.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank2.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank3.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank4.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank5.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank8.cpp | 34 +- ...opyETIInst_int_float_LayoutRight_Rank1.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank2.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank3.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank4.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank5.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank8.cpp | 35 +- ...pyETIInst_int_float_LayoutStride_Rank1.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank2.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank3.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank4.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank5.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank8.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank1.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank2.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank3.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank4.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank5.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank8.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank1.cpp | 33 +- ...yETIInst_int_int64_t_LayoutRight_Rank2.cpp | 33 +- ...yETIInst_int_int64_t_LayoutRight_Rank3.cpp | 33 +- ...yETIInst_int_int64_t_LayoutRight_Rank4.cpp | 33 +- ...yETIInst_int_int64_t_LayoutRight_Rank5.cpp | 34 +- ...yETIInst_int_int64_t_LayoutRight_Rank8.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank1.cpp | 33 +- ...ETIInst_int_int64_t_LayoutStride_Rank2.cpp | 33 +- ...ETIInst_int_int64_t_LayoutStride_Rank3.cpp | 33 +- ...ETIInst_int_int64_t_LayoutStride_Rank4.cpp | 34 +- ...ETIInst_int_int64_t_LayoutStride_Rank5.cpp | 35 +- ...ETIInst_int_int64_t_LayoutStride_Rank8.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank1.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank2.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank3.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank4.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank5.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank8.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank1.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank2.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank3.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank4.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank5.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank8.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank1.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank2.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank3.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank4.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank5.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank8.cpp | 34 +- ...TIInst_int64_t_double_LayoutLeft_Rank1.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank2.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank3.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank4.cpp | 37 +- ...TIInst_int64_t_double_LayoutLeft_Rank5.cpp | 37 +- ...TIInst_int64_t_double_LayoutLeft_Rank8.cpp | 37 +- ...IInst_int64_t_double_LayoutRight_Rank1.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank2.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank3.cpp | 37 +- ...IInst_int64_t_double_LayoutRight_Rank4.cpp | 37 +- ...IInst_int64_t_double_LayoutRight_Rank5.cpp | 37 +- ...IInst_int64_t_double_LayoutRight_Rank8.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank1.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank2.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank3.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank4.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank5.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank8.cpp | 37 +- ...ETIInst_int64_t_float_LayoutLeft_Rank1.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank2.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank3.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank4.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank5.cpp | 37 +- ...ETIInst_int64_t_float_LayoutLeft_Rank8.cpp | 37 +- ...TIInst_int64_t_float_LayoutRight_Rank1.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank2.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank3.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank4.cpp | 37 +- ...TIInst_int64_t_float_LayoutRight_Rank5.cpp | 37 +- ...TIInst_int64_t_float_LayoutRight_Rank8.cpp | 37 +- ...IInst_int64_t_float_LayoutStride_Rank1.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank2.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank3.cpp | 37 +- ...IInst_int64_t_float_LayoutStride_Rank4.cpp | 37 +- ...IInst_int64_t_float_LayoutStride_Rank5.cpp | 37 +- ...IInst_int64_t_float_LayoutStride_Rank8.cpp | 37 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank1.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank2.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank3.cpp | 37 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank4.cpp | 37 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank5.cpp | 37 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank8.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank1.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank2.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank3.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank4.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank5.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank8.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank1.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank2.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank3.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank4.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank5.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank8.cpp | 37 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank1.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank2.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank3.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank4.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank5.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank8.cpp | 37 +- ...yETIInst_int64_t_int_LayoutRight_Rank1.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank2.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank3.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank4.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank5.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank8.cpp | 37 +- ...ETIInst_int64_t_int_LayoutStride_Rank1.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank2.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank3.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank4.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank5.cpp | 37 +- ...ETIInst_int64_t_int_LayoutStride_Rank8.cpp | 37 +- ...opyETIInst_int_double_LayoutLeft_Rank1.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank2.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank3.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank4.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank5.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank8.cpp | 37 +- ...pyETIInst_int_double_LayoutRight_Rank1.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank2.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank3.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank4.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank5.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank8.cpp | 37 +- ...yETIInst_int_double_LayoutStride_Rank1.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank2.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank3.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank4.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank5.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank8.cpp | 37 +- ...CopyETIInst_int_float_LayoutLeft_Rank1.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank2.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank3.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank4.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank5.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank8.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank1.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank2.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank3.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank4.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank5.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank8.cpp | 37 +- ...pyETIInst_int_float_LayoutStride_Rank1.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank2.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank3.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank4.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank5.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank8.cpp | 37 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank1.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank2.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank3.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank4.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank5.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank8.cpp | 37 +- ...yETIInst_int_int64_t_LayoutRight_Rank1.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank2.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank3.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank4.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank5.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank8.cpp | 37 +- ...ETIInst_int_int64_t_LayoutStride_Rank1.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank2.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank3.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank4.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank5.cpp | 37 +- ...ETIInst_int_int64_t_LayoutStride_Rank8.cpp | 37 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank1.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank2.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank3.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank4.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank5.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank8.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank1.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank2.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank3.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank4.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank5.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank8.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank1.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank2.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank3.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank4.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank5.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank8.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank1.cpp | 34 +- ...TIInst_int64_t_double_LayoutLeft_Rank2.cpp | 35 +- ...TIInst_int64_t_double_LayoutLeft_Rank3.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank4.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank5.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank8.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank1.cpp | 35 +- ...IInst_int64_t_double_LayoutRight_Rank2.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank3.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank4.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank5.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank8.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank1.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank2.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank3.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank4.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank5.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank8.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank1.cpp | 33 +- ...ETIInst_int64_t_float_LayoutLeft_Rank2.cpp | 34 +- ...ETIInst_int64_t_float_LayoutLeft_Rank3.cpp | 35 +- ...ETIInst_int64_t_float_LayoutLeft_Rank4.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank5.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank8.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank1.cpp | 34 +- ...TIInst_int64_t_float_LayoutRight_Rank2.cpp | 35 +- ...TIInst_int64_t_float_LayoutRight_Rank3.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank4.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank5.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank8.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank1.cpp | 35 +- ...IInst_int64_t_float_LayoutStride_Rank2.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank3.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank4.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank5.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank8.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank1.cpp | 35 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank2.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank3.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank4.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank5.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank8.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank1.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank2.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank3.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank4.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank5.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank8.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank1.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank2.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank3.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank4.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank5.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank8.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank1.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank2.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank3.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank4.cpp | 34 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank5.cpp | 35 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank8.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank1.cpp | 33 +- ...yETIInst_int64_t_int_LayoutRight_Rank2.cpp | 33 +- ...yETIInst_int64_t_int_LayoutRight_Rank3.cpp | 34 +- ...yETIInst_int64_t_int_LayoutRight_Rank4.cpp | 35 +- ...yETIInst_int64_t_int_LayoutRight_Rank5.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank8.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank1.cpp | 33 +- ...ETIInst_int64_t_int_LayoutStride_Rank2.cpp | 34 +- ...ETIInst_int64_t_int_LayoutStride_Rank3.cpp | 35 +- ...ETIInst_int64_t_int_LayoutStride_Rank4.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank5.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank8.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank1.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank2.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank3.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank4.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank5.cpp | 34 +- ...opyETIInst_int_double_LayoutLeft_Rank8.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank1.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank2.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank3.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank4.cpp | 34 +- ...pyETIInst_int_double_LayoutRight_Rank5.cpp | 35 +- ...pyETIInst_int_double_LayoutRight_Rank8.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank1.cpp | 33 +- ...yETIInst_int_double_LayoutStride_Rank2.cpp | 33 +- ...yETIInst_int_double_LayoutStride_Rank3.cpp | 34 +- ...yETIInst_int_double_LayoutStride_Rank4.cpp | 35 +- ...yETIInst_int_double_LayoutStride_Rank5.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank8.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank1.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank2.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank3.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank4.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank5.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank8.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank1.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank2.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank3.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank4.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank5.cpp | 34 +- ...opyETIInst_int_float_LayoutRight_Rank8.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank1.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank2.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank3.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank4.cpp | 34 +- ...pyETIInst_int_float_LayoutStride_Rank5.cpp | 35 +- ...pyETIInst_int_float_LayoutStride_Rank8.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank1.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank2.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank3.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank4.cpp | 34 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank5.cpp | 35 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank8.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank1.cpp | 33 +- ...yETIInst_int_int64_t_LayoutRight_Rank2.cpp | 33 +- ...yETIInst_int_int64_t_LayoutRight_Rank3.cpp | 34 +- ...yETIInst_int_int64_t_LayoutRight_Rank4.cpp | 35 +- ...yETIInst_int_int64_t_LayoutRight_Rank5.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank8.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank1.cpp | 33 +- ...ETIInst_int_int64_t_LayoutStride_Rank2.cpp | 34 +- ...ETIInst_int_int64_t_LayoutStride_Rank3.cpp | 35 +- ...ETIInst_int_int64_t_LayoutStride_Rank4.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank5.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank8.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank1.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank2.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank3.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank4.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank5.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank8.cpp | 34 +- ...wCopyETIInst_int_int_LayoutRight_Rank1.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank2.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank3.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank4.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank5.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank8.cpp | 35 +- ...CopyETIInst_int_int_LayoutStride_Rank1.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank2.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank3.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank4.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank5.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank8.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank1.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank2.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank3.cpp | 37 +- ...TIInst_int64_t_double_LayoutLeft_Rank4.cpp | 37 +- ...TIInst_int64_t_double_LayoutLeft_Rank5.cpp | 37 +- ...TIInst_int64_t_double_LayoutLeft_Rank8.cpp | 37 +- ...IInst_int64_t_double_LayoutRight_Rank1.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank2.cpp | 37 +- ...IInst_int64_t_double_LayoutRight_Rank3.cpp | 37 +- ...IInst_int64_t_double_LayoutRight_Rank4.cpp | 37 +- ...IInst_int64_t_double_LayoutRight_Rank5.cpp | 37 +- ...IInst_int64_t_double_LayoutRight_Rank8.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank1.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank2.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank3.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank4.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank5.cpp | 37 +- ...Inst_int64_t_double_LayoutStride_Rank8.cpp | 37 +- ...ETIInst_int64_t_float_LayoutLeft_Rank1.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank2.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank3.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank4.cpp | 37 +- ...ETIInst_int64_t_float_LayoutLeft_Rank5.cpp | 37 +- ...ETIInst_int64_t_float_LayoutLeft_Rank8.cpp | 37 +- ...TIInst_int64_t_float_LayoutRight_Rank1.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank2.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank3.cpp | 37 +- ...TIInst_int64_t_float_LayoutRight_Rank4.cpp | 37 +- ...TIInst_int64_t_float_LayoutRight_Rank5.cpp | 37 +- ...TIInst_int64_t_float_LayoutRight_Rank8.cpp | 37 +- ...IInst_int64_t_float_LayoutStride_Rank1.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank2.cpp | 37 +- ...IInst_int64_t_float_LayoutStride_Rank3.cpp | 37 +- ...IInst_int64_t_float_LayoutStride_Rank4.cpp | 37 +- ...IInst_int64_t_float_LayoutStride_Rank5.cpp | 37 +- ...IInst_int64_t_float_LayoutStride_Rank8.cpp | 37 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank1.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank2.cpp | 37 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank3.cpp | 37 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank4.cpp | 37 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank5.cpp | 37 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank8.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank1.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank2.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank3.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank4.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank5.cpp | 37 +- ...Inst_int64_t_int64_t_LayoutRight_Rank8.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank1.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank2.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank3.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank4.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank5.cpp | 37 +- ...nst_int64_t_int64_t_LayoutStride_Rank8.cpp | 37 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank1.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank2.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank3.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank4.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank5.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank8.cpp | 37 +- ...yETIInst_int64_t_int_LayoutRight_Rank1.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank2.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank3.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank4.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank5.cpp | 37 +- ...yETIInst_int64_t_int_LayoutRight_Rank8.cpp | 37 +- ...ETIInst_int64_t_int_LayoutStride_Rank1.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank2.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank3.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank4.cpp | 37 +- ...ETIInst_int64_t_int_LayoutStride_Rank5.cpp | 37 +- ...ETIInst_int64_t_int_LayoutStride_Rank8.cpp | 37 +- ...opyETIInst_int_double_LayoutLeft_Rank1.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank2.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank3.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank4.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank5.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank8.cpp | 37 +- ...pyETIInst_int_double_LayoutRight_Rank1.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank2.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank3.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank4.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank5.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank8.cpp | 37 +- ...yETIInst_int_double_LayoutStride_Rank1.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank2.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank3.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank4.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank5.cpp | 37 +- ...yETIInst_int_double_LayoutStride_Rank8.cpp | 37 +- ...CopyETIInst_int_float_LayoutLeft_Rank1.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank2.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank3.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank4.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank5.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank8.cpp | 37 +- ...opyETIInst_int_float_LayoutRight_Rank1.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank2.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank3.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank4.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank5.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank8.cpp | 37 +- ...pyETIInst_int_float_LayoutStride_Rank1.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank2.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank3.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank4.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank5.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank8.cpp | 37 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank1.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank2.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank3.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank4.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank5.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank8.cpp | 37 +- ...yETIInst_int_int64_t_LayoutRight_Rank1.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank2.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank3.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank4.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank5.cpp | 37 +- ...yETIInst_int_int64_t_LayoutRight_Rank8.cpp | 37 +- ...ETIInst_int_int64_t_LayoutStride_Rank1.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank2.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank3.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank4.cpp | 37 +- ...ETIInst_int_int64_t_LayoutStride_Rank5.cpp | 37 +- ...ETIInst_int_int64_t_LayoutStride_Rank8.cpp | 37 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank1.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank2.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank3.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank4.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank5.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank8.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank1.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank2.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank3.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank4.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank5.cpp | 36 +- ...wCopyETIInst_int_int_LayoutRight_Rank8.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank1.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank2.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank3.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank4.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank5.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank8.cpp | 37 +- ...TIInst_int64_t_double_LayoutLeft_Rank1.cpp | 34 +- ...TIInst_int64_t_double_LayoutLeft_Rank2.cpp | 35 +- ...TIInst_int64_t_double_LayoutLeft_Rank3.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank4.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank5.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank8.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank1.cpp | 35 +- ...IInst_int64_t_double_LayoutRight_Rank2.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank3.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank4.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank5.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank8.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank1.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank2.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank3.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank4.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank5.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank8.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank1.cpp | 33 +- ...ETIInst_int64_t_float_LayoutLeft_Rank2.cpp | 34 +- ...ETIInst_int64_t_float_LayoutLeft_Rank3.cpp | 35 +- ...ETIInst_int64_t_float_LayoutLeft_Rank4.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank5.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank8.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank1.cpp | 34 +- ...TIInst_int64_t_float_LayoutRight_Rank2.cpp | 35 +- ...TIInst_int64_t_float_LayoutRight_Rank3.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank4.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank5.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank8.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank1.cpp | 35 +- ...IInst_int64_t_float_LayoutStride_Rank2.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank3.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank4.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank5.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank8.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank1.cpp | 35 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank2.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank3.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank4.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank5.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank8.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank1.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank2.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank3.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank4.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank5.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank8.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank1.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank2.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank3.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank4.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank5.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank8.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank1.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank2.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank3.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank4.cpp | 34 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank5.cpp | 35 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank8.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank1.cpp | 33 +- ...yETIInst_int64_t_int_LayoutRight_Rank2.cpp | 33 +- ...yETIInst_int64_t_int_LayoutRight_Rank3.cpp | 34 +- ...yETIInst_int64_t_int_LayoutRight_Rank4.cpp | 35 +- ...yETIInst_int64_t_int_LayoutRight_Rank5.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank8.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank1.cpp | 33 +- ...ETIInst_int64_t_int_LayoutStride_Rank2.cpp | 34 +- ...ETIInst_int64_t_int_LayoutStride_Rank3.cpp | 35 +- ...ETIInst_int64_t_int_LayoutStride_Rank4.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank5.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank8.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank1.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank2.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank3.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank4.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank5.cpp | 34 +- ...opyETIInst_int_double_LayoutLeft_Rank8.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank1.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank2.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank3.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank4.cpp | 34 +- ...pyETIInst_int_double_LayoutRight_Rank5.cpp | 35 +- ...pyETIInst_int_double_LayoutRight_Rank8.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank1.cpp | 33 +- ...yETIInst_int_double_LayoutStride_Rank2.cpp | 33 +- ...yETIInst_int_double_LayoutStride_Rank3.cpp | 34 +- ...yETIInst_int_double_LayoutStride_Rank4.cpp | 35 +- ...yETIInst_int_double_LayoutStride_Rank5.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank8.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank1.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank2.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank3.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank4.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank5.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank8.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank1.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank2.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank3.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank4.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank5.cpp | 34 +- ...opyETIInst_int_float_LayoutRight_Rank8.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank1.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank2.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank3.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank4.cpp | 34 +- ...pyETIInst_int_float_LayoutStride_Rank5.cpp | 35 +- ...pyETIInst_int_float_LayoutStride_Rank8.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank1.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank2.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank3.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank4.cpp | 34 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank5.cpp | 35 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank8.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank1.cpp | 33 +- ...yETIInst_int_int64_t_LayoutRight_Rank2.cpp | 33 +- ...yETIInst_int_int64_t_LayoutRight_Rank3.cpp | 34 +- ...yETIInst_int_int64_t_LayoutRight_Rank4.cpp | 35 +- ...yETIInst_int_int64_t_LayoutRight_Rank5.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank8.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank1.cpp | 33 +- ...ETIInst_int_int64_t_LayoutStride_Rank2.cpp | 34 +- ...ETIInst_int_int64_t_LayoutStride_Rank3.cpp | 35 +- ...ETIInst_int_int64_t_LayoutStride_Rank4.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank5.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank8.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank1.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank2.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank3.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank4.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank5.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank8.cpp | 34 +- ...wCopyETIInst_int_int_LayoutRight_Rank1.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank2.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank3.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank4.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank5.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank8.cpp | 35 +- ...CopyETIInst_int_int_LayoutStride_Rank1.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank2.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank3.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank4.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank5.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank8.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank1.cpp | 35 +- ...TIInst_int64_t_double_LayoutLeft_Rank2.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank3.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank4.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank5.cpp | 36 +- ...TIInst_int64_t_double_LayoutLeft_Rank8.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank1.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank2.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank3.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank4.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank5.cpp | 36 +- ...IInst_int64_t_double_LayoutRight_Rank8.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank1.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank2.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank3.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank4.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank5.cpp | 36 +- ...Inst_int64_t_double_LayoutStride_Rank8.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank1.cpp | 34 +- ...ETIInst_int64_t_float_LayoutLeft_Rank2.cpp | 35 +- ...ETIInst_int64_t_float_LayoutLeft_Rank3.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank4.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank5.cpp | 36 +- ...ETIInst_int64_t_float_LayoutLeft_Rank8.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank1.cpp | 35 +- ...TIInst_int64_t_float_LayoutRight_Rank2.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank3.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank4.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank5.cpp | 36 +- ...TIInst_int64_t_float_LayoutRight_Rank8.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank1.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank2.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank3.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank4.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank5.cpp | 36 +- ...IInst_int64_t_float_LayoutStride_Rank8.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank1.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank2.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank3.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank4.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank5.cpp | 36 +- ...IInst_int64_t_int64_t_LayoutLeft_Rank8.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank1.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank2.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank3.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank4.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank5.cpp | 36 +- ...Inst_int64_t_int64_t_LayoutRight_Rank8.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank1.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank2.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank3.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank4.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank5.cpp | 36 +- ...nst_int64_t_int64_t_LayoutStride_Rank8.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank1.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank2.cpp | 33 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank3.cpp | 34 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank4.cpp | 35 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank5.cpp | 36 +- ...pyETIInst_int64_t_int_LayoutLeft_Rank8.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank1.cpp | 33 +- ...yETIInst_int64_t_int_LayoutRight_Rank2.cpp | 34 +- ...yETIInst_int64_t_int_LayoutRight_Rank3.cpp | 35 +- ...yETIInst_int64_t_int_LayoutRight_Rank4.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank5.cpp | 36 +- ...yETIInst_int64_t_int_LayoutRight_Rank8.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank1.cpp | 34 +- ...ETIInst_int64_t_int_LayoutStride_Rank2.cpp | 35 +- ...ETIInst_int64_t_int_LayoutStride_Rank3.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank4.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank5.cpp | 36 +- ...ETIInst_int64_t_int_LayoutStride_Rank8.cpp | 36 +- ...opyETIInst_int_double_LayoutLeft_Rank1.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank2.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank3.cpp | 33 +- ...opyETIInst_int_double_LayoutLeft_Rank4.cpp | 34 +- ...opyETIInst_int_double_LayoutLeft_Rank5.cpp | 35 +- ...opyETIInst_int_double_LayoutLeft_Rank8.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank1.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank2.cpp | 33 +- ...pyETIInst_int_double_LayoutRight_Rank3.cpp | 34 +- ...pyETIInst_int_double_LayoutRight_Rank4.cpp | 35 +- ...pyETIInst_int_double_LayoutRight_Rank5.cpp | 36 +- ...pyETIInst_int_double_LayoutRight_Rank8.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank1.cpp | 33 +- ...yETIInst_int_double_LayoutStride_Rank2.cpp | 34 +- ...yETIInst_int_double_LayoutStride_Rank3.cpp | 35 +- ...yETIInst_int_double_LayoutStride_Rank4.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank5.cpp | 36 +- ...yETIInst_int_double_LayoutStride_Rank8.cpp | 36 +- ...CopyETIInst_int_float_LayoutLeft_Rank1.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank2.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank3.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank4.cpp | 33 +- ...CopyETIInst_int_float_LayoutLeft_Rank5.cpp | 34 +- ...CopyETIInst_int_float_LayoutLeft_Rank8.cpp | 36 +- ...opyETIInst_int_float_LayoutRight_Rank1.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank2.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank3.cpp | 33 +- ...opyETIInst_int_float_LayoutRight_Rank4.cpp | 34 +- ...opyETIInst_int_float_LayoutRight_Rank5.cpp | 35 +- ...opyETIInst_int_float_LayoutRight_Rank8.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank1.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank2.cpp | 33 +- ...pyETIInst_int_float_LayoutStride_Rank3.cpp | 34 +- ...pyETIInst_int_float_LayoutStride_Rank4.cpp | 35 +- ...pyETIInst_int_float_LayoutStride_Rank5.cpp | 36 +- ...pyETIInst_int_float_LayoutStride_Rank8.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank1.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank2.cpp | 33 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank3.cpp | 34 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank4.cpp | 35 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank5.cpp | 36 +- ...pyETIInst_int_int64_t_LayoutLeft_Rank8.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank1.cpp | 33 +- ...yETIInst_int_int64_t_LayoutRight_Rank2.cpp | 34 +- ...yETIInst_int_int64_t_LayoutRight_Rank3.cpp | 35 +- ...yETIInst_int_int64_t_LayoutRight_Rank4.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank5.cpp | 36 +- ...yETIInst_int_int64_t_LayoutRight_Rank8.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank1.cpp | 34 +- ...ETIInst_int_int64_t_LayoutStride_Rank2.cpp | 35 +- ...ETIInst_int_int64_t_LayoutStride_Rank3.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank4.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank5.cpp | 36 +- ...ETIInst_int_int64_t_LayoutStride_Rank8.cpp | 36 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank1.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank2.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank3.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank4.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank5.cpp | 33 +- ...ewCopyETIInst_int_int_LayoutLeft_Rank8.cpp | 35 +- ...wCopyETIInst_int_int_LayoutRight_Rank1.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank2.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank3.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank4.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank5.cpp | 33 +- ...wCopyETIInst_int_int_LayoutRight_Rank8.cpp | 36 +- ...CopyETIInst_int_int_LayoutStride_Rank1.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank2.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank3.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank4.cpp | 33 +- ...CopyETIInst_int_int_LayoutStride_Rank5.cpp | 34 +- ...CopyETIInst_int_int_LayoutStride_Rank8.cpp | 36 +- .../Kokkos_ViewFillCopyETIAvail_Macros.hpp | 2016 +++++-- .../Kokkos_ViewFillCopyETIDecl_Macros.hpp | 1728 ++++-- lib/kokkos/core/src/impl/CMakeLists.txt | 36 +- .../src/impl/KokkosExp_Host_IterateTile.hpp | 3677 ++++++------ .../core/src/impl/KokkosExp_ViewMapping.hpp | 19 +- .../core/src/impl/Kokkos_AnalyzePolicy.hpp | 303 +- .../core/src/impl/Kokkos_Atomic_Assembly.hpp | 117 +- .../Kokkos_Atomic_Compare_Exchange_Strong.hpp | 522 +- .../Kokkos_Atomic_Compare_Exchange_Weak.hpp | 371 +- .../core/src/impl/Kokkos_Atomic_Decrement.hpp | 122 +- .../core/src/impl/Kokkos_Atomic_Exchange.hpp | 432 +- .../core/src/impl/Kokkos_Atomic_Fetch_Add.hpp | 389 +- .../core/src/impl/Kokkos_Atomic_Fetch_And.hpp | 117 +- .../core/src/impl/Kokkos_Atomic_Fetch_Or.hpp | 117 +- .../core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp | 316 +- .../core/src/impl/Kokkos_Atomic_Generic.hpp | 428 +- .../core/src/impl/Kokkos_Atomic_Increment.hpp | 128 +- .../core/src/impl/Kokkos_Atomic_Load.hpp | 185 +- .../src/impl/Kokkos_Atomic_Memory_Order.hpp | 55 +- .../core/src/impl/Kokkos_Atomic_Store.hpp | 189 +- .../core/src/impl/Kokkos_Atomic_View.hpp | 368 +- .../core/src/impl/Kokkos_Atomic_Windows.hpp | 372 +- lib/kokkos/core/src/impl/Kokkos_BitOps.hpp | 139 +- .../core/src/impl/Kokkos_CPUDiscovery.cpp | 55 +- .../core/src/impl/Kokkos_CPUDiscovery.hpp | 15 +- lib/kokkos/core/src/impl/Kokkos_ChaseLev.hpp | 205 +- lib/kokkos/core/src/impl/Kokkos_ClockTic.hpp | 46 +- .../core/src/impl/Kokkos_ConcurrentBitset.hpp | 384 +- lib/kokkos/core/src/impl/Kokkos_Core.cpp | 954 +-- lib/kokkos/core/src/impl/Kokkos_EBO.hpp | 223 +- lib/kokkos/core/src/impl/Kokkos_Error.cpp | 171 +- lib/kokkos/core/src/impl/Kokkos_Error.hpp | 199 +- .../core/src/impl/Kokkos_ExecPolicy.cpp | 28 +- .../src/impl/Kokkos_FixedBufferMemoryPool.hpp | 140 +- .../core/src/impl/Kokkos_FunctorAdapter.hpp | 2726 +++++---- .../core/src/impl/Kokkos_FunctorAnalysis.hpp | 1127 ++-- lib/kokkos/core/src/impl/Kokkos_HBWSpace.cpp | 324 +- .../core/src/impl/Kokkos_HostBarrier.cpp | 94 +- .../core/src/impl/Kokkos_HostBarrier.hpp | 235 +- lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp | 553 +- .../src/impl/Kokkos_HostSpace_deepcopy.cpp | 101 +- .../src/impl/Kokkos_HostSpace_deepcopy.hpp | 20 +- .../core/src/impl/Kokkos_HostThreadTeam.cpp | 285 +- .../core/src/impl/Kokkos_HostThreadTeam.hpp | 1332 ++-- lib/kokkos/core/src/impl/Kokkos_LIFO.hpp | 171 +- .../core/src/impl/Kokkos_LinkedListNode.hpp | 109 +- .../core/src/impl/Kokkos_MemoryPool.cpp | 95 +- .../src/impl/Kokkos_MemoryPoolAllocator.hpp | 53 +- .../core/src/impl/Kokkos_MemorySpace.hpp | 110 + .../core/src/impl/Kokkos_Memory_Fence.hpp | 69 +- .../src/impl/Kokkos_MultipleTaskQueue.hpp | 513 +- lib/kokkos/core/src/impl/Kokkos_OldMacros.hpp | 70 +- .../core/src/impl/Kokkos_OptionalRef.hpp | 87 +- .../core/src/impl/Kokkos_PhysicalLayout.hpp | 43 +- .../src/impl/Kokkos_Profiling_DeviceInfo.hpp | 85 +- .../src/impl/Kokkos_Profiling_Interface.cpp | 378 +- .../src/impl/Kokkos_Profiling_Interface.hpp | 170 +- lib/kokkos/core/src/impl/Kokkos_Serial.cpp | 163 +- .../core/src/impl/Kokkos_Serial_Task.cpp | 20 +- .../core/src/impl/Kokkos_Serial_Task.hpp | 191 +- .../impl/Kokkos_Serial_WorkGraphPolicy.hpp | 83 +- .../core/src/impl/Kokkos_SharedAlloc.cpp | 382 +- .../core/src/impl/Kokkos_SharedAlloc.hpp | 427 +- .../src/impl/Kokkos_SimpleTaskScheduler.hpp | 564 +- .../core/src/impl/Kokkos_SingleTaskQueue.hpp | 123 +- lib/kokkos/core/src/impl/Kokkos_Spinwait.cpp | 155 +- lib/kokkos/core/src/impl/Kokkos_Spinwait.hpp | 78 +- .../core/src/impl/Kokkos_Stacktrace.cpp | 247 + .../core/src/impl/Kokkos_Stacktrace.hpp | 45 + lib/kokkos/core/src/impl/Kokkos_Tags.hpp | 44 +- lib/kokkos/core/src/impl/Kokkos_TaskBase.hpp | 229 +- lib/kokkos/core/src/impl/Kokkos_TaskNode.hpp | 546 +- .../core/src/impl/Kokkos_TaskPolicyData.hpp | 105 +- lib/kokkos/core/src/impl/Kokkos_TaskQueue.hpp | 155 +- .../core/src/impl/Kokkos_TaskQueueCommon.hpp | 366 +- .../impl/Kokkos_TaskQueueMemoryManager.hpp | 173 +- .../src/impl/Kokkos_TaskQueueMultiple.hpp | 163 +- .../impl/Kokkos_TaskQueueMultiple_impl.hpp | 20 +- .../core/src/impl/Kokkos_TaskQueue_impl.hpp | 443 +- .../core/src/impl/Kokkos_TaskResult.hpp | 101 +- .../core/src/impl/Kokkos_TaskTeamMember.hpp | 43 +- lib/kokkos/core/src/impl/Kokkos_Timer.hpp | 28 +- lib/kokkos/core/src/impl/Kokkos_Traits.hpp | 549 +- lib/kokkos/core/src/impl/Kokkos_Utilities.hpp | 460 +- .../core/src/impl/Kokkos_VLAEmulation.hpp | 164 +- lib/kokkos/core/src/impl/Kokkos_ViewArray.hpp | 826 +-- lib/kokkos/core/src/impl/Kokkos_ViewCtor.hpp | 248 +- .../src/impl/Kokkos_ViewFillCopyETIAvail.hpp | 96 +- .../src/impl/Kokkos_ViewFillCopyETIDecl.hpp | 115 +- .../core/src/impl/Kokkos_ViewLayoutTiled.hpp | 1732 ++++-- .../core/src/impl/Kokkos_ViewMapping.hpp | 5342 +++++++++-------- lib/kokkos/core/src/impl/Kokkos_ViewTile.hpp | 252 +- .../core/src/impl/Kokkos_ViewUniformType.hpp | 116 +- .../core/src/impl/Kokkos_Volatile_Load.hpp | 163 +- lib/kokkos/core/src/impl/Kokkos_hwloc.cpp | 725 +-- lib/kokkos/core/src/kokkos.pc.in | 18 +- lib/kokkos/core/unit_test/CMakeLists.txt | 915 +-- lib/kokkos/core/unit_test/Makefile | 57 +- lib/kokkos/core/unit_test/TestAggregate.hpp | 114 +- lib/kokkos/core/unit_test/TestAtomic.hpp | 427 +- .../core/unit_test/TestAtomicOperations.hpp | 728 +-- .../TestAtomicOperations_complexdouble.hpp | 33 +- .../TestAtomicOperations_complexfloat.hpp | 33 +- .../unit_test/TestAtomicOperations_double.hpp | 37 +- .../unit_test/TestAtomicOperations_float.hpp | 37 +- .../unit_test/TestAtomicOperations_int.hpp | 58 +- .../TestAtomicOperations_longint.hpp | 58 +- .../TestAtomicOperations_longlongint.hpp | 58 +- .../TestAtomicOperations_unsignedint.hpp | 58 +- .../TestAtomicOperations_unsignedlongint.hpp | 58 +- lib/kokkos/core/unit_test/TestAtomicViews.hpp | 1505 ++--- lib/kokkos/core/unit_test/TestCXX11.hpp | 389 +- .../core/unit_test/TestCXX11Deduction.hpp | 65 +- .../core/unit_test/TestCompilerMacros.hpp | 74 +- lib/kokkos/core/unit_test/TestComplex.hpp | 356 +- .../core/unit_test/TestConcurrentBitset.hpp | 152 +- lib/kokkos/core/unit_test/TestCrs.hpp | 157 +- lib/kokkos/core/unit_test/TestDeepCopy.hpp | 223 +- .../unit_test/TestDefaultDeviceTypeInit.hpp | 380 +- .../core/unit_test/TestFunctorAnalysis.hpp | 161 +- lib/kokkos/core/unit_test/TestHWLOC.cpp | 25 +- lib/kokkos/core/unit_test/TestHostBarrier.cpp | 13 +- lib/kokkos/core/unit_test/TestInit.hpp | 35 +- .../core/unit_test/TestLocalDeepCopy.hpp | 1527 ++--- lib/kokkos/core/unit_test/TestMDRange.hpp | 3875 ++++++------ lib/kokkos/core/unit_test/TestMDRange_a.hpp | 24 +- lib/kokkos/core/unit_test/TestMDRange_b.hpp | 24 +- lib/kokkos/core/unit_test/TestMDRange_c.hpp | 30 +- lib/kokkos/core/unit_test/TestMDRange_d.hpp | 40 +- lib/kokkos/core/unit_test/TestMDRange_e.hpp | 24 +- lib/kokkos/core/unit_test/TestMemoryPool.hpp | 665 +- .../core/unit_test/TestPolicyConstruction.hpp | 1081 ++-- lib/kokkos/core/unit_test/TestRange.hpp | 414 +- lib/kokkos/core/unit_test/TestReduce.hpp | 461 +- .../unit_test/TestReduceCombinatorical.hpp | 699 ++- .../core/unit_test/TestReduceDeviceView.hpp | 180 +- lib/kokkos/core/unit_test/TestReducers.hpp | 919 +-- lib/kokkos/core/unit_test/TestReducers_a.hpp | 18 +- lib/kokkos/core/unit_test/TestReducers_b.hpp | 18 +- lib/kokkos/core/unit_test/TestReducers_c.hpp | 18 +- lib/kokkos/core/unit_test/TestReducers_d.hpp | 19 +- lib/kokkos/core/unit_test/TestResize.hpp | 397 +- lib/kokkos/core/unit_test/TestScan.hpp | 112 +- lib/kokkos/core/unit_test/TestSharedAlloc.hpp | 154 +- .../unit_test/TestStackTrace.cpp} | 42 +- lib/kokkos/core/unit_test/TestStackTrace.hpp | 169 + .../unit_test/TestStackTrace_f0.cpp} | 45 +- .../unit_test/TestStackTrace_f1.cpp} | 45 +- .../unit_test/TestStackTrace_f2.cpp} | 49 +- .../core/unit_test/TestStackTrace_f3.cpp | 62 + .../core/unit_test/TestStackTrace_f4.cpp | 53 + .../core/unit_test/TestTaskScheduler.hpp | 888 ++- .../unit_test/TestTaskScheduler_single.hpp | 62 +- lib/kokkos/core/unit_test/TestTeam.hpp | 1205 ++-- .../core/unit_test/TestTeamTeamSize.hpp | 237 +- lib/kokkos/core/unit_test/TestTeamVector.hpp | 1025 ++-- .../core/unit_test/TestTeamVectorRange.hpp | 417 +- .../unit_test/TestTemplateMetaFunctions.hpp | 161 +- lib/kokkos/core/unit_test/TestTile.hpp | 141 +- lib/kokkos/core/unit_test/TestUniqueToken.hpp | 138 +- lib/kokkos/core/unit_test/TestUtilities.hpp | 407 +- lib/kokkos/core/unit_test/TestViewAPI.hpp | 2211 +++---- lib/kokkos/core/unit_test/TestViewAPI_a.hpp | 20 +- lib/kokkos/core/unit_test/TestViewAPI_b.hpp | 24 +- lib/kokkos/core/unit_test/TestViewAPI_c.hpp | 22 +- lib/kokkos/core/unit_test/TestViewAPI_d.hpp | 30 +- lib/kokkos/core/unit_test/TestViewAPI_e.hpp | 204 +- lib/kokkos/core/unit_test/TestViewCopy.hpp | 174 +- .../unit_test/TestViewCtorPropEmbeddedDim.hpp | 113 +- .../TestViewLayoutStrideAssignment.hpp | 1092 ++-- .../core/unit_test/TestViewLayoutTiled.hpp | 2107 ++++--- .../core/unit_test/TestViewMapping_a.hpp | 1629 ++--- .../core/unit_test/TestViewMapping_b.hpp | 235 +- .../unit_test/TestViewMapping_subview.hpp | 233 +- lib/kokkos/core/unit_test/TestViewOfClass.hpp | 87 +- lib/kokkos/core/unit_test/TestViewResize.hpp | 58 + .../core/unit_test/TestViewSpaceAssign.hpp | 42 +- lib/kokkos/core/unit_test/TestViewSubview.hpp | 2403 +++++--- lib/kokkos/core/unit_test/TestView_64bit.hpp | 119 +- lib/kokkos/core/unit_test/TestWorkGraph.hpp | 99 +- lib/kokkos/core/unit_test/UnitTestMain.cpp | 15 +- .../core/unit_test/UnitTestMainInit.cpp | 19 +- .../unit_test/UnitTest_PushFinalizeHook.cpp | 67 +- .../UnitTest_PushFinalizeHook_terminate.cpp | 33 +- .../unit_test/config/cmaketest/CMakeLists.txt | 1 - .../configuration/test-code/CMakeLists.txt | 44 + .../configuration/test-code/Makefile | 46 + .../configuration/test-code/main.cpp | 6 + .../configuration/test-code/test_config.bash | 7 + .../test-code/test_config_arch_list.bash | 45 + .../test-code/test_config_device_list.bash | 45 + .../test-code/test_config_options_list.bash | 49 + .../test-code/test_config_run.bash | 111 + .../cuda/TestCudaHostPinned_Category.hpp | 28 +- .../cuda/TestCudaHostPinned_SharedAlloc.cpp | 19 +- .../cuda/TestCudaHostPinned_ViewAPI_a.cpp | 11 +- .../cuda/TestCudaHostPinned_ViewAPI_b.cpp | 11 +- .../cuda/TestCudaHostPinned_ViewAPI_c.cpp | 11 +- .../cuda/TestCudaHostPinned_ViewAPI_d.cpp | 11 +- .../cuda/TestCudaHostPinned_ViewAPI_e.cpp | 11 +- .../cuda/TestCudaHostPinned_ViewCopy.cpp | 11 +- .../cuda/TestCudaHostPinned_ViewMapping_a.cpp | 12 +- .../cuda/TestCudaHostPinned_ViewMapping_b.cpp | 12 +- ...TestCudaHostPinned_ViewMapping_subview.cpp | 12 +- .../unit_test/cuda/TestCudaUVM_Category.hpp | 25 +- .../cuda/TestCudaUVM_SharedAlloc.cpp | 19 +- .../unit_test/cuda/TestCudaUVM_ViewAPI_a.cpp | 11 +- .../unit_test/cuda/TestCudaUVM_ViewAPI_b.cpp | 11 +- .../unit_test/cuda/TestCudaUVM_ViewAPI_c.cpp | 11 +- .../unit_test/cuda/TestCudaUVM_ViewAPI_d.cpp | 11 +- .../unit_test/cuda/TestCudaUVM_ViewAPI_e.cpp | 11 +- .../unit_test/cuda/TestCudaUVM_ViewCopy.cpp | 11 +- .../cuda/TestCudaUVM_ViewMapping_a.cpp | 12 +- .../cuda/TestCudaUVM_ViewMapping_b.cpp | 12 +- .../cuda/TestCudaUVM_ViewMapping_subview.cpp | 12 +- ...estCuda_AtomicOperations_complexdouble.cpp | 16 +- ...TestCuda_AtomicOperations_complexfloat.cpp | 16 +- .../cuda/TestCuda_AtomicOperations_double.cpp | 16 +- .../cuda/TestCuda_AtomicOperations_float.cpp | 16 +- .../cuda/TestCuda_AtomicOperations_int.cpp | 16 +- .../TestCuda_AtomicOperations_longint.cpp | 16 +- .../TestCuda_AtomicOperations_longlongint.cpp | 16 +- .../TestCuda_AtomicOperations_unsignedint.cpp | 16 +- ...tCuda_AtomicOperations_unsignedlongint.cpp | 16 +- .../unit_test/cuda/TestCuda_AtomicViews.cpp | 16 +- .../core/unit_test/cuda/TestCuda_Atomics.cpp | 12 +- .../core/unit_test/cuda/TestCuda_Category.hpp | 25 +- .../core/unit_test/cuda/TestCuda_Complex.cpp | 16 +- .../core/unit_test/cuda/TestCuda_Crs.cpp | 11 +- .../cuda/TestCuda_DebugPinUVMSpace.cpp | 131 + .../cuda/TestCuda_DebugSerialExecution.cpp | 197 + .../cuda/TestCuda_DeepCopyAlignment.cpp | 14 +- .../cuda/TestCuda_FunctorAnalysis.cpp | 47 + .../core/unit_test/cuda/TestCuda_Init.cpp | 21 +- .../unit_test/cuda/TestCuda_InterOp_Init.cpp | 50 +- .../cuda/TestCuda_InterOp_Streams.cpp | 236 +- .../unit_test/cuda/TestCuda_LocalDeepCopy.cpp | 12 +- .../unit_test/cuda/TestCuda_MDRange_a.cpp | 16 +- .../unit_test/cuda/TestCuda_MDRange_b.cpp | 16 +- .../unit_test/cuda/TestCuda_MDRange_c.cpp | 16 +- .../unit_test/cuda/TestCuda_MDRange_d.cpp | 16 +- .../unit_test/cuda/TestCuda_MDRange_e.cpp | 16 +- .../core/unit_test/cuda/TestCuda_Other.cpp | 27 +- .../unit_test/cuda/TestCuda_RangePolicy.cpp | 16 +- .../unit_test/cuda/TestCuda_Reducers_a.cpp | 11 +- .../unit_test/cuda/TestCuda_Reducers_b.cpp | 11 +- .../unit_test/cuda/TestCuda_Reducers_c.cpp | 11 +- .../unit_test/cuda/TestCuda_Reducers_d.cpp | 11 +- .../unit_test/cuda/TestCuda_Reductions.cpp | 11 +- .../cuda/TestCuda_Reductions_DeviceView.cpp | 11 +- .../core/unit_test/cuda/TestCuda_Scan.cpp | 16 +- .../unit_test/cuda/TestCuda_SharedAlloc.cpp | 19 +- .../core/unit_test/cuda/TestCuda_Spaces.cpp | 505 +- .../unit_test/cuda/TestCuda_SubView_a.cpp | 77 +- .../unit_test/cuda/TestCuda_SubView_b.cpp | 35 +- .../unit_test/cuda/TestCuda_SubView_c01.cpp | 18 +- .../unit_test/cuda/TestCuda_SubView_c02.cpp | 19 +- .../unit_test/cuda/TestCuda_SubView_c03.cpp | 19 +- .../unit_test/cuda/TestCuda_SubView_c04.cpp | 18 +- .../unit_test/cuda/TestCuda_SubView_c05.cpp | 19 +- .../unit_test/cuda/TestCuda_SubView_c06.cpp | 19 +- .../unit_test/cuda/TestCuda_SubView_c07.cpp | 18 +- .../unit_test/cuda/TestCuda_SubView_c08.cpp | 19 +- .../unit_test/cuda/TestCuda_SubView_c09.cpp | 19 +- .../unit_test/cuda/TestCuda_SubView_c10.cpp | 18 +- .../unit_test/cuda/TestCuda_SubView_c11.cpp | 19 +- .../unit_test/cuda/TestCuda_SubView_c12.cpp | 19 +- .../unit_test/cuda/TestCuda_SubView_c13.cpp | 18 +- .../core/unit_test/cuda/TestCuda_Task.cpp | 16 +- .../core/unit_test/cuda/TestCuda_Team.cpp | 85 +- .../cuda/TestCuda_TeamReductionScan.cpp | 63 +- .../unit_test/cuda/TestCuda_TeamScratch.cpp | 61 +- .../unit_test/cuda/TestCuda_TeamTeamSize.cpp | 11 +- .../cuda/TestCuda_TeamVectorRange.cpp | 17 +- .../unit_test/cuda/TestCuda_UniqueToken.cpp | 16 +- .../unit_test/cuda/TestCuda_ViewAPI_a.cpp | 11 +- .../unit_test/cuda/TestCuda_ViewAPI_b.cpp | 11 +- .../unit_test/cuda/TestCuda_ViewAPI_c.cpp | 11 +- .../unit_test/cuda/TestCuda_ViewAPI_d.cpp | 11 +- .../unit_test/cuda/TestCuda_ViewAPI_e.cpp | 11 +- .../TestCuda_ViewLayoutStrideAssignment.cpp | 12 +- .../unit_test/cuda/TestCuda_ViewMapping_a.cpp | 12 +- .../unit_test/cuda/TestCuda_ViewMapping_b.cpp | 12 +- .../cuda/TestCuda_ViewMapping_subview.cpp | 12 +- .../unit_test/cuda/TestCuda_ViewOfClass.cpp | 12 +- .../unit_test/cuda/TestCuda_ViewResize.cpp | 46 + .../unit_test/cuda/TestCuda_View_64bit.cpp | 11 +- .../unit_test/cuda/TestCuda_WorkGraph.cpp | 15 +- .../default/TestDefaultDeviceType.cpp | 39 +- .../default/TestDefaultDeviceTypeInit_1.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_10.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_11.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_12.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_13.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_14.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_15.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_16.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_2.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_3.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_4.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_5.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_6.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_7.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_8.cpp | 2 +- .../default/TestDefaultDeviceTypeInit_9.cpp | 2 +- .../default/TestDefaultDeviceTypeResize.cpp | 18 +- .../TestDefaultDeviceType_Category.hpp | 27 +- .../default/TestDefaultDeviceType_a1.cpp | 19 +- .../default/TestDefaultDeviceType_a2.cpp | 19 +- .../default/TestDefaultDeviceType_a3.cpp | 19 +- .../default/TestDefaultDeviceType_b1.cpp | 18 +- .../default/TestDefaultDeviceType_b2.cpp | 18 +- .../default/TestDefaultDeviceType_b3.cpp | 18 +- .../default/TestDefaultDeviceType_c1.cpp | 20 +- .../default/TestDefaultDeviceType_c2.cpp | 20 +- .../default/TestDefaultDeviceType_c3.cpp | 20 +- .../default/TestDefaultDeviceType_d.cpp | 39 +- ...TestHPX_AtomicOperations_complexdouble.cpp | 46 + .../TestHPX_AtomicOperations_complexfloat.cpp | 46 + .../hpx/TestHPX_AtomicOperations_double.cpp | 16 +- .../hpx/TestHPX_AtomicOperations_float.cpp | 16 +- .../hpx/TestHPX_AtomicOperations_int.cpp | 16 +- .../hpx/TestHPX_AtomicOperations_longint.cpp | 16 +- .../TestHPX_AtomicOperations_longlongint.cpp | 16 +- .../TestHPX_AtomicOperations_unsignedint.cpp | 16 +- ...stHPX_AtomicOperations_unsignedlongint.cpp | 16 +- .../unit_test/hpx/TestHPX_AtomicViews.cpp | 16 +- .../core/unit_test/hpx/TestHPX_Atomics.cpp | 12 +- .../core/unit_test/hpx/TestHPX_Category.hpp | 25 +- .../core/unit_test/hpx/TestHPX_Complex.cpp | 16 +- lib/kokkos/core/unit_test/hpx/TestHPX_Crs.cpp | 11 +- .../hpx/TestHPX_DeepCopyAlignment.cpp | 46 + .../unit_test/hpx/TestHPX_FunctorAnalysis.cpp | 47 + .../core/unit_test/hpx/TestHPX_Init.cpp | 21 +- .../core/unit_test/hpx/TestHPX_InterOp.cpp | 21 +- .../unit_test/hpx/TestHPX_LocalDeepCopy.cpp | 46 + .../core/unit_test/hpx/TestHPX_MDRange_a.cpp | 16 +- .../core/unit_test/hpx/TestHPX_MDRange_b.cpp | 16 +- .../core/unit_test/hpx/TestHPX_MDRange_c.cpp | 16 +- .../core/unit_test/hpx/TestHPX_MDRange_d.cpp | 16 +- .../core/unit_test/hpx/TestHPX_MDRange_e.cpp | 16 +- .../core/unit_test/hpx/TestHPX_Other.cpp | 11 +- .../unit_test/hpx/TestHPX_RangePolicy.cpp | 16 +- .../core/unit_test/hpx/TestHPX_Reducers_a.cpp | 11 +- .../core/unit_test/hpx/TestHPX_Reducers_b.cpp | 11 +- .../core/unit_test/hpx/TestHPX_Reducers_c.cpp | 11 +- .../core/unit_test/hpx/TestHPX_Reducers_d.cpp | 11 +- .../core/unit_test/hpx/TestHPX_Reductions.cpp | 11 +- .../hpx/TestHPX_Reductions_DeviceView.cpp | 46 + .../core/unit_test/hpx/TestHPX_Scan.cpp | 16 +- .../unit_test/hpx/TestHPX_SharedAlloc.cpp | 19 +- .../core/unit_test/hpx/TestHPX_SubView_a.cpp | 68 +- .../core/unit_test/hpx/TestHPX_SubView_b.cpp | 35 +- .../unit_test/hpx/TestHPX_SubView_c01.cpp | 18 +- .../unit_test/hpx/TestHPX_SubView_c02.cpp | 19 +- .../unit_test/hpx/TestHPX_SubView_c03.cpp | 19 +- .../unit_test/hpx/TestHPX_SubView_c04.cpp | 18 +- .../unit_test/hpx/TestHPX_SubView_c05.cpp | 19 +- .../unit_test/hpx/TestHPX_SubView_c06.cpp | 19 +- .../unit_test/hpx/TestHPX_SubView_c07.cpp | 18 +- .../unit_test/hpx/TestHPX_SubView_c08.cpp | 19 +- .../unit_test/hpx/TestHPX_SubView_c09.cpp | 19 +- .../unit_test/hpx/TestHPX_SubView_c10.cpp | 18 +- .../unit_test/hpx/TestHPX_SubView_c11.cpp | 19 +- .../unit_test/hpx/TestHPX_SubView_c12.cpp | 19 +- .../unit_test/hpx/TestHPX_SubView_c13.cpp | 18 +- .../core/unit_test/hpx/TestHPX_Task.cpp | 16 +- .../core/unit_test/hpx/TestHPX_Team.cpp | 58 +- .../hpx/TestHPX_TeamReductionScan.cpp | 64 +- .../unit_test/hpx/TestHPX_TeamScratch.cpp | 57 +- .../unit_test/hpx/TestHPX_TeamTeamSize.cpp | 46 + .../unit_test/hpx/TestHPX_TeamVectorRange.cpp | 17 +- .../unit_test/hpx/TestHPX_UniqueToken.cpp | 16 +- .../core/unit_test/hpx/TestHPX_ViewAPI_a.cpp | 11 +- .../core/unit_test/hpx/TestHPX_ViewAPI_b.cpp | 11 +- .../core/unit_test/hpx/TestHPX_ViewAPI_c.cpp | 11 +- .../core/unit_test/hpx/TestHPX_ViewAPI_d.cpp | 11 +- .../core/unit_test/hpx/TestHPX_ViewAPI_e.cpp | 11 +- .../TestHPX_ViewLayoutStrideAssignment.cpp | 46 + .../unit_test/hpx/TestHPX_ViewMapping_a.cpp | 12 +- .../unit_test/hpx/TestHPX_ViewMapping_b.cpp | 12 +- .../hpx/TestHPX_ViewMapping_subview.cpp | 12 +- .../unit_test/hpx/TestHPX_ViewOfClass.cpp | 12 +- .../core/unit_test/hpx/TestHPX_ViewResize.cpp | 46 + .../core/unit_test/hpx/TestHPX_View_64bit.cpp | 11 +- .../core/unit_test/hpx/TestHPX_WorkGraph.cpp | 15 +- .../core/unit_test/openmp/TestOpenMP.hpp | 33 +- ...tOpenMP_AtomicOperations_complexdouble.cpp | 16 +- ...stOpenMP_AtomicOperations_complexfloat.cpp | 16 +- .../TestOpenMP_AtomicOperations_double.cpp | 16 +- .../TestOpenMP_AtomicOperations_float.cpp | 16 +- .../TestOpenMP_AtomicOperations_int.cpp | 16 +- .../TestOpenMP_AtomicOperations_longint.cpp | 16 +- ...estOpenMP_AtomicOperations_longlongint.cpp | 16 +- ...estOpenMP_AtomicOperations_unsignedint.cpp | 16 +- ...penMP_AtomicOperations_unsignedlongint.cpp | 16 +- .../openmp/TestOpenMP_AtomicViews.cpp | 16 +- .../unit_test/openmp/TestOpenMP_Atomics.cpp | 12 +- .../unit_test/openmp/TestOpenMP_Category.hpp | 25 +- .../unit_test/openmp/TestOpenMP_Complex.cpp | 16 +- .../core/unit_test/openmp/TestOpenMP_Crs.cpp | 11 +- .../openmp/TestOpenMP_DeepCopyAlignment.cpp | 11 +- .../openmp/TestOpenMP_FunctorAnalysis.cpp | 47 + .../core/unit_test/openmp/TestOpenMP_Init.cpp | 21 +- .../unit_test/openmp/TestOpenMP_InterOp.cpp | 45 +- .../openmp/TestOpenMP_LocalDeepCopy.cpp | 12 +- .../unit_test/openmp/TestOpenMP_MDRange_a.cpp | 16 +- .../unit_test/openmp/TestOpenMP_MDRange_b.cpp | 16 +- .../unit_test/openmp/TestOpenMP_MDRange_c.cpp | 16 +- .../unit_test/openmp/TestOpenMP_MDRange_d.cpp | 16 +- .../unit_test/openmp/TestOpenMP_MDRange_e.cpp | 16 +- .../unit_test/openmp/TestOpenMP_Other.cpp | 119 +- .../openmp/TestOpenMP_RangePolicy.cpp | 16 +- .../openmp/TestOpenMP_Reducers_a.cpp | 11 +- .../openmp/TestOpenMP_Reducers_b.cpp | 11 +- .../openmp/TestOpenMP_Reducers_c.cpp | 11 +- .../openmp/TestOpenMP_Reducers_d.cpp | 11 +- .../openmp/TestOpenMP_Reductions.cpp | 11 +- .../TestOpenMP_Reductions_DeviceView.cpp | 11 +- .../core/unit_test/openmp/TestOpenMP_Scan.cpp | 16 +- .../openmp/TestOpenMP_SharedAlloc.cpp | 19 +- .../unit_test/openmp/TestOpenMP_SubView_a.cpp | 77 +- .../unit_test/openmp/TestOpenMP_SubView_b.cpp | 35 +- .../openmp/TestOpenMP_SubView_c01.cpp | 18 +- .../openmp/TestOpenMP_SubView_c02.cpp | 19 +- .../openmp/TestOpenMP_SubView_c03.cpp | 19 +- .../openmp/TestOpenMP_SubView_c04.cpp | 18 +- .../openmp/TestOpenMP_SubView_c05.cpp | 19 +- .../openmp/TestOpenMP_SubView_c06.cpp | 19 +- .../openmp/TestOpenMP_SubView_c07.cpp | 18 +- .../openmp/TestOpenMP_SubView_c08.cpp | 19 +- .../openmp/TestOpenMP_SubView_c09.cpp | 19 +- .../openmp/TestOpenMP_SubView_c10.cpp | 18 +- .../openmp/TestOpenMP_SubView_c11.cpp | 19 +- .../openmp/TestOpenMP_SubView_c12.cpp | 19 +- .../openmp/TestOpenMP_SubView_c13.cpp | 18 +- .../core/unit_test/openmp/TestOpenMP_Task.cpp | 16 +- .../core/unit_test/openmp/TestOpenMP_Team.cpp | 85 +- .../openmp/TestOpenMP_TeamReductionScan.cpp | 64 +- .../openmp/TestOpenMP_TeamScratch.cpp | 61 +- .../openmp/TestOpenMP_TeamTeamSize.cpp | 12 +- .../openmp/TestOpenMP_TeamVectorRange.cpp | 17 +- .../openmp/TestOpenMP_UniqueToken.cpp | 16 +- .../unit_test/openmp/TestOpenMP_ViewAPI_a.cpp | 11 +- .../unit_test/openmp/TestOpenMP_ViewAPI_b.cpp | 11 +- .../unit_test/openmp/TestOpenMP_ViewAPI_c.cpp | 11 +- .../unit_test/openmp/TestOpenMP_ViewAPI_d.cpp | 11 +- .../unit_test/openmp/TestOpenMP_ViewAPI_e.cpp | 11 +- .../TestOpenMP_ViewLayoutStrideAssignment.cpp | 12 +- .../openmp/TestOpenMP_ViewMapping_a.cpp | 12 +- .../openmp/TestOpenMP_ViewMapping_b.cpp | 12 +- .../openmp/TestOpenMP_ViewMapping_subview.cpp | 12 +- .../openmp/TestOpenMP_ViewOfClass.cpp | 12 +- .../openmp/TestOpenMP_ViewResize.cpp | 46 + .../openmp/TestOpenMP_View_64bit.cpp | 11 +- .../unit_test/openmp/TestOpenMP_WorkGraph.cpp | 15 +- .../openmptarget/TestOpenMPTarget.hpp | 41 +- ...PTarget_AtomicOperations_complexdouble.cpp | 16 +- ...MPTarget_AtomicOperations_complexfloat.cpp | 16 +- ...stOpenMPTarget_AtomicOperations_double.cpp | 16 +- ...estOpenMPTarget_AtomicOperations_float.cpp | 16 +- .../TestOpenMPTarget_AtomicOperations_int.cpp | 16 +- ...tOpenMPTarget_AtomicOperations_longint.cpp | 16 +- ...nMPTarget_AtomicOperations_longlongint.cpp | 16 +- ...nMPTarget_AtomicOperations_unsignedint.cpp | 16 +- ...arget_AtomicOperations_unsignedlongint.cpp | 16 +- .../TestOpenMPTarget_AtomicViews.cpp | 16 +- .../openmptarget/TestOpenMPTarget_Atomics.cpp | 12 +- .../TestOpenMPTarget_Category.hpp | 25 +- .../openmptarget/TestOpenMPTarget_Complex.cpp | 16 +- .../TestOpenMPTarget_DeepCopyAlignment.cpp | 11 +- .../openmptarget/TestOpenMPTarget_Init.cpp | 21 +- .../TestOpenMPTarget_MDRange_a.cpp | 16 +- .../TestOpenMPTarget_MDRange_b.cpp | 16 +- .../TestOpenMPTarget_MDRange_c.cpp | 16 +- .../TestOpenMPTarget_MDRange_d.cpp | 16 +- .../TestOpenMPTarget_MDRange_e.cpp | 16 +- .../openmptarget/TestOpenMPTarget_Other.cpp | 23 +- .../TestOpenMPTarget_RangePolicy.cpp | 16 +- .../TestOpenMPTarget_Reducers_a.cpp | 11 +- .../TestOpenMPTarget_Reducers_b.cpp | 11 +- .../TestOpenMPTarget_Reducers_c.cpp | 11 +- .../TestOpenMPTarget_Reducers_d.cpp | 11 +- .../TestOpenMPTarget_Reductions.cpp | 11 +- .../openmptarget/TestOpenMPTarget_Scan.cpp | 16 +- .../TestOpenMPTarget_SharedAlloc.cpp | 20 +- .../TestOpenMPTarget_SubView_a.cpp | 77 +- .../TestOpenMPTarget_SubView_b.cpp | 35 +- .../TestOpenMPTarget_SubView_c01.cpp | 18 +- .../TestOpenMPTarget_SubView_c02.cpp | 19 +- .../TestOpenMPTarget_SubView_c03.cpp | 19 +- .../TestOpenMPTarget_SubView_c04.cpp | 18 +- .../TestOpenMPTarget_SubView_c05.cpp | 19 +- .../TestOpenMPTarget_SubView_c06.cpp | 19 +- .../TestOpenMPTarget_SubView_c07.cpp | 18 +- .../TestOpenMPTarget_SubView_c08.cpp | 19 +- .../TestOpenMPTarget_SubView_c09.cpp | 19 +- .../TestOpenMPTarget_SubView_c10.cpp | 18 +- .../TestOpenMPTarget_SubView_c11.cpp | 19 +- .../TestOpenMPTarget_SubView_c12.cpp | 19 +- .../openmptarget/TestOpenMPTarget_Team.cpp | 58 +- .../TestOpenMPTarget_TeamReductionScan.cpp | 64 +- .../TestOpenMPTarget_TeamScratch.cpp | 57 +- .../TestOpenMPTarget_ViewAPI_a.cpp | 11 +- .../TestOpenMPTarget_ViewAPI_b.cpp | 11 +- .../TestOpenMPTarget_ViewAPI_c.cpp | 11 +- .../TestOpenMPTarget_ViewAPI_d.cpp | 11 +- .../TestOpenMPTarget_ViewAPI_e.cpp | 11 +- .../TestOpenMPTarget_ViewMapping_a.cpp | 12 +- .../TestOpenMPTarget_ViewMapping_b.cpp | 12 +- .../TestOpenMPTarget_ViewMapping_subview.cpp | 12 +- .../TestOpenMPTarget_ViewOfClass.cpp | 12 +- ...threads_AtomicOperations_complexdouble.cpp | 16 +- ...qthreads_AtomicOperations_complexfloat.cpp | 16 +- .../TestQqthreads_AtomicOperations_double.cpp | 16 +- .../TestQqthreads_AtomicOperations_float.cpp | 16 +- .../TestQqthreads_AtomicOperations_int.cpp | 16 +- ...TestQqthreads_AtomicOperations_longint.cpp | 16 +- ...Qqthreads_AtomicOperations_longlongint.cpp | 16 +- ...Qqthreads_AtomicOperations_unsignedint.cpp | 16 +- ...reads_AtomicOperations_unsignedlongint.cpp | 16 +- .../qthreads/TestQqthreads_MDRange_a.cpp | 16 +- .../qthreads/TestQqthreads_MDRange_b.cpp | 16 +- .../qthreads/TestQqthreads_MDRange_c.cpp | 16 +- .../qthreads/TestQqthreads_MDRange_d.cpp | 16 +- .../qthreads/TestQqthreads_MDRange_e.cpp | 16 +- .../qthreads/TestQqthreads_ViewAPI_a.cpp | 11 +- .../qthreads/TestQqthreads_ViewAPI_b.cpp | 11 +- .../qthreads/TestQqthreads_ViewAPI_c.cpp | 11 +- .../qthreads/TestQqthreads_ViewAPI_d.cpp | 11 +- .../qthreads/TestQqthreads_ViewAPI_e.cpp | 11 +- .../core/unit_test/qthreads/TestQthreads.hpp | 42 +- .../qthreads/TestQthreads_Atomics.cpp | 28 +- .../qthreads/TestQthreads_Category.hpp | 25 +- .../qthreads/TestQthreads_Complex.cpp | 5 +- .../TestQthreads_DeepCopyAlignment.cpp | 11 +- .../unit_test/qthreads/TestQthreads_Other.cpp | 57 +- .../qthreads/TestQthreads_Reductions.cpp | 49 +- .../qthreads/TestQthreads_SubView_a.cpp | 46 +- .../qthreads/TestQthreads_SubView_b.cpp | 19 +- .../qthreads/TestQthreads_SubView_c01.cpp | 16 +- .../qthreads/TestQthreads_SubView_c02.cpp | 16 +- .../qthreads/TestQthreads_SubView_c03.cpp | 16 +- .../qthreads/TestQthreads_SubView_c04.cpp | 16 +- .../qthreads/TestQthreads_SubView_c05.cpp | 16 +- .../qthreads/TestQthreads_SubView_c06.cpp | 16 +- .../qthreads/TestQthreads_SubView_c07.cpp | 16 +- .../qthreads/TestQthreads_SubView_c08.cpp | 16 +- .../qthreads/TestQthreads_SubView_c09.cpp | 16 +- .../qthreads/TestQthreads_SubView_c10.cpp | 16 +- .../qthreads/TestQthreads_SubView_c11.cpp | 16 +- .../qthreads/TestQthreads_SubView_c12.cpp | 16 +- .../qthreads/TestQthreads_SubView_c13.cpp | 16 +- .../unit_test/qthreads/TestQthreads_Team.cpp | 41 +- .../qthreads/TestQthreads_ViewAPI_a.cpp | 16 +- .../qthreads/TestQthreads_ViewAPI_b.cpp | 34 +- .../rocm/TestROCmHostPinned_Category.hpp | 25 +- .../rocm/TestROCmHostPinned_SharedAlloc.cpp | 19 +- .../rocm/TestROCmHostPinned_ViewAPI_a.cpp | 11 +- .../rocm/TestROCmHostPinned_ViewAPI_b.cpp | 11 +- .../rocm/TestROCmHostPinned_ViewAPI_c.cpp | 11 +- .../rocm/TestROCmHostPinned_ViewAPI_d.cpp | 11 +- .../rocm/TestROCmHostPinned_ViewAPI_e.cpp | 11 +- .../rocm/TestROCmHostPinned_ViewCopy.cpp | 11 +- .../rocm/TestROCmHostPinned_ViewMapping_a.cpp | 12 +- .../rocm/TestROCmHostPinned_ViewMapping_b.cpp | 12 +- ...TestROCmHostPinned_ViewMapping_subview.cpp | 12 +- .../rocm/TestROCmHostPinned_View_64bit.cpp | 11 +- .../rocm/TestROCm_AtomicOperations_double.cpp | 16 +- .../rocm/TestROCm_AtomicOperations_float.cpp | 16 +- .../rocm/TestROCm_AtomicOperations_int.cpp | 16 +- .../TestROCm_AtomicOperations_longint.cpp | 16 +- .../TestROCm_AtomicOperations_longlongint.cpp | 16 +- .../TestROCm_AtomicOperations_unsignedint.cpp | 16 +- ...tROCm_AtomicOperations_unsignedlongint.cpp | 16 +- .../unit_test/rocm/TestROCm_AtomicViews.cpp | 16 +- .../core/unit_test/rocm/TestROCm_Atomics.cpp | 12 +- .../core/unit_test/rocm/TestROCm_Category.hpp | 25 +- .../core/unit_test/rocm/TestROCm_Complex.cpp | 16 +- .../core/unit_test/rocm/TestROCm_Crs.cpp | 16 +- .../rocm/TestROCm_DeepCopyAlignment.cpp | 11 +- .../core/unit_test/rocm/TestROCm_Init.cpp | 21 +- .../rocm/TestROCm_MDRangeReduce_a.cpp | 22 +- .../rocm/TestROCm_MDRangeReduce_b.cpp | 22 +- .../rocm/TestROCm_MDRangeReduce_c.cpp | 22 +- .../rocm/TestROCm_MDRangeReduce_d.cpp | 22 +- .../rocm/TestROCm_MDRangeReduce_e.cpp | 22 +- .../unit_test/rocm/TestROCm_MDRange_a.cpp | 16 +- .../unit_test/rocm/TestROCm_MDRange_b.cpp | 16 +- .../unit_test/rocm/TestROCm_MDRange_c.cpp | 16 +- .../unit_test/rocm/TestROCm_MDRange_d.cpp | 16 +- .../unit_test/rocm/TestROCm_MDRange_e.cpp | 16 +- .../core/unit_test/rocm/TestROCm_Other.cpp | 25 +- .../unit_test/rocm/TestROCm_RangePolicy.cpp | 16 +- .../unit_test/rocm/TestROCm_Reducers_a.cpp | 11 +- .../unit_test/rocm/TestROCm_Reducers_b.cpp | 11 +- .../unit_test/rocm/TestROCm_Reducers_c.cpp | 11 +- .../unit_test/rocm/TestROCm_Reducers_d.cpp | 11 +- .../unit_test/rocm/TestROCm_Reductions.cpp | 11 +- .../core/unit_test/rocm/TestROCm_Scan.cpp | 16 +- .../unit_test/rocm/TestROCm_SharedAlloc.cpp | 20 +- .../core/unit_test/rocm/TestROCm_Spaces.cpp | 245 +- .../unit_test/rocm/TestROCm_SubView_a.cpp | 77 +- .../unit_test/rocm/TestROCm_SubView_b.cpp | 35 +- .../unit_test/rocm/TestROCm_SubView_c01.cpp | 18 +- .../unit_test/rocm/TestROCm_SubView_c02.cpp | 19 +- .../unit_test/rocm/TestROCm_SubView_c03.cpp | 19 +- .../unit_test/rocm/TestROCm_SubView_c04.cpp | 18 +- .../unit_test/rocm/TestROCm_SubView_c05.cpp | 19 +- .../unit_test/rocm/TestROCm_SubView_c06.cpp | 19 +- .../unit_test/rocm/TestROCm_SubView_c07.cpp | 18 +- .../unit_test/rocm/TestROCm_SubView_c08.cpp | 19 +- .../unit_test/rocm/TestROCm_SubView_c09.cpp | 19 +- .../unit_test/rocm/TestROCm_SubView_c10.cpp | 18 +- .../unit_test/rocm/TestROCm_SubView_c11.cpp | 19 +- .../unit_test/rocm/TestROCm_SubView_c12.cpp | 19 +- .../unit_test/rocm/TestROCm_SubView_c13.cpp | 18 +- .../core/unit_test/rocm/TestROCm_Team.cpp | 58 +- .../rocm/TestROCm_TeamReductionScan.cpp | 63 +- .../unit_test/rocm/TestROCm_TeamScratch.cpp | 61 +- .../unit_test/rocm/TestROCm_TeamTeamSize.cpp | 11 +- .../unit_test/rocm/TestROCm_ViewAPI_a.cpp | 11 +- .../unit_test/rocm/TestROCm_ViewAPI_b.cpp | 11 +- .../unit_test/rocm/TestROCm_ViewAPI_c.cpp | 11 +- .../unit_test/rocm/TestROCm_ViewAPI_d.cpp | 11 +- .../unit_test/rocm/TestROCm_ViewAPI_e.cpp | 11 +- .../unit_test/rocm/TestROCm_ViewMapping_a.cpp | 12 +- .../unit_test/rocm/TestROCm_ViewMapping_b.cpp | 12 +- .../rocm/TestROCm_ViewMapping_subview.cpp | 12 +- .../unit_test/rocm/TestROCm_ViewOfClass.cpp | 12 +- ...tSerial_AtomicOperations_complexdouble.cpp | 16 +- ...stSerial_AtomicOperations_complexfloat.cpp | 16 +- .../TestSerial_AtomicOperations_double.cpp | 16 +- .../TestSerial_AtomicOperations_float.cpp | 16 +- .../TestSerial_AtomicOperations_int.cpp | 16 +- .../TestSerial_AtomicOperations_longint.cpp | 16 +- ...estSerial_AtomicOperations_longlongint.cpp | 16 +- ...estSerial_AtomicOperations_unsignedint.cpp | 16 +- ...erial_AtomicOperations_unsignedlongint.cpp | 16 +- .../serial/TestSerial_AtomicViews.cpp | 16 +- .../unit_test/serial/TestSerial_Atomics.cpp | 12 +- .../unit_test/serial/TestSerial_Category.hpp | 25 +- .../unit_test/serial/TestSerial_Complex.cpp | 16 +- .../core/unit_test/serial/TestSerial_Crs.cpp | 11 +- .../serial/TestSerial_DeepCopyAlignment.cpp | 11 +- .../serial/TestSerial_FunctorAnalysis.cpp | 47 + .../core/unit_test/serial/TestSerial_Init.cpp | 21 +- .../serial/TestSerial_LocalDeepCopy.cpp | 12 +- .../unit_test/serial/TestSerial_MDRange_a.cpp | 16 +- .../unit_test/serial/TestSerial_MDRange_b.cpp | 16 +- .../unit_test/serial/TestSerial_MDRange_c.cpp | 16 +- .../unit_test/serial/TestSerial_MDRange_d.cpp | 16 +- .../unit_test/serial/TestSerial_MDRange_e.cpp | 16 +- .../unit_test/serial/TestSerial_Other.cpp | 27 +- .../serial/TestSerial_RangePolicy.cpp | 16 +- .../serial/TestSerial_Reducers_a.cpp | 11 +- .../serial/TestSerial_Reducers_b.cpp | 11 +- .../serial/TestSerial_Reducers_c.cpp | 11 +- .../serial/TestSerial_Reducers_d.cpp | 11 +- .../serial/TestSerial_Reductions.cpp | 11 +- .../TestSerial_Reductions_DeviceView.cpp | 11 +- .../core/unit_test/serial/TestSerial_Scan.cpp | 16 +- .../serial/TestSerial_SharedAlloc.cpp | 19 +- .../unit_test/serial/TestSerial_SubView_a.cpp | 77 +- .../unit_test/serial/TestSerial_SubView_b.cpp | 35 +- .../serial/TestSerial_SubView_c01.cpp | 18 +- .../serial/TestSerial_SubView_c02.cpp | 19 +- .../serial/TestSerial_SubView_c03.cpp | 19 +- .../serial/TestSerial_SubView_c04.cpp | 18 +- .../serial/TestSerial_SubView_c05.cpp | 19 +- .../serial/TestSerial_SubView_c06.cpp | 19 +- .../serial/TestSerial_SubView_c07.cpp | 18 +- .../serial/TestSerial_SubView_c08.cpp | 19 +- .../serial/TestSerial_SubView_c09.cpp | 19 +- .../serial/TestSerial_SubView_c10.cpp | 18 +- .../serial/TestSerial_SubView_c11.cpp | 19 +- .../serial/TestSerial_SubView_c12.cpp | 19 +- .../serial/TestSerial_SubView_c13.cpp | 18 +- .../core/unit_test/serial/TestSerial_Task.cpp | 16 +- .../core/unit_test/serial/TestSerial_Team.cpp | 85 +- .../serial/TestSerial_TeamReductionScan.cpp | 64 +- .../serial/TestSerial_TeamScratch.cpp | 61 +- .../serial/TestSerial_TeamTeamSize.cpp | 11 +- .../serial/TestSerial_TeamVectorRange.cpp | 17 +- .../serial/TestSerial_UniqueToken.cpp | 46 + .../unit_test/serial/TestSerial_ViewAPI_a.cpp | 11 +- .../unit_test/serial/TestSerial_ViewAPI_b.cpp | 11 +- .../unit_test/serial/TestSerial_ViewAPI_c.cpp | 11 +- .../unit_test/serial/TestSerial_ViewAPI_d.cpp | 11 +- .../unit_test/serial/TestSerial_ViewAPI_e.cpp | 12 +- .../TestSerial_ViewLayoutStrideAssignment.cpp | 12 +- .../serial/TestSerial_ViewMapping_a.cpp | 12 +- .../serial/TestSerial_ViewMapping_b.cpp | 12 +- .../serial/TestSerial_ViewMapping_subview.cpp | 12 +- .../serial/TestSerial_ViewOfClass.cpp | 12 +- .../serial/TestSerial_ViewResize.cpp | 46 + .../serial/TestSerial_View_64bit.cpp | 11 +- .../unit_test/serial/TestSerial_WorkGraph.cpp | 15 +- lib/kokkos/core/unit_test/standalone/Makefile | 7 +- .../unit_test/standalone/UnitTestMainInit.cpp | 23 +- ...Threads_AtomicOperations_complexdouble.cpp | 16 +- ...tThreads_AtomicOperations_complexfloat.cpp | 16 +- .../TestThreads_AtomicOperations_double.cpp | 16 +- .../TestThreads_AtomicOperations_float.cpp | 16 +- .../TestThreads_AtomicOperations_int.cpp | 16 +- .../TestThreads_AtomicOperations_longint.cpp | 16 +- ...stThreads_AtomicOperations_longlongint.cpp | 16 +- ...stThreads_AtomicOperations_unsignedint.cpp | 16 +- ...reads_AtomicOperations_unsignedlongint.cpp | 16 +- .../threads/TestThreads_AtomicViews.cpp | 16 +- .../unit_test/threads/TestThreads_Atomics.cpp | 12 +- .../threads/TestThreads_Category.hpp | 25 +- .../unit_test/threads/TestThreads_Complex.cpp | 16 +- .../unit_test/threads/TestThreads_Crs.cpp | 15 +- .../threads/TestThreads_DeepCopyAlignment.cpp | 11 +- .../threads/TestThreads_FunctorAnalysis.cpp | 47 + .../unit_test/threads/TestThreads_Init.cpp | 21 +- .../threads/TestThreads_LocalDeepCopy.cpp | 12 +- .../threads/TestThreads_MDRange_a.cpp | 16 +- .../threads/TestThreads_MDRange_b.cpp | 16 +- .../threads/TestThreads_MDRange_c.cpp | 16 +- .../threads/TestThreads_MDRange_d.cpp | 16 +- .../threads/TestThreads_MDRange_e.cpp | 16 +- .../unit_test/threads/TestThreads_Other.cpp | 27 +- .../threads/TestThreads_RangePolicy.cpp | 16 +- .../threads/TestThreads_Reducers_a.cpp | 11 +- .../threads/TestThreads_Reducers_b.cpp | 11 +- .../threads/TestThreads_Reducers_c.cpp | 11 +- .../threads/TestThreads_Reducers_d.cpp | 11 +- .../threads/TestThreads_Reductions.cpp | 11 +- .../TestThreads_Reductions_DeviceView.cpp | 11 +- .../unit_test/threads/TestThreads_Scan.cpp | 16 +- .../threads/TestThreads_SharedAlloc.cpp | 19 +- .../threads/TestThreads_SubView_a.cpp | 77 +- .../threads/TestThreads_SubView_b.cpp | 35 +- .../threads/TestThreads_SubView_c01.cpp | 18 +- .../threads/TestThreads_SubView_c02.cpp | 19 +- .../threads/TestThreads_SubView_c03.cpp | 19 +- .../threads/TestThreads_SubView_c04.cpp | 18 +- .../threads/TestThreads_SubView_c05.cpp | 19 +- .../threads/TestThreads_SubView_c06.cpp | 19 +- .../threads/TestThreads_SubView_c07.cpp | 18 +- .../threads/TestThreads_SubView_c08.cpp | 19 +- .../threads/TestThreads_SubView_c09.cpp | 19 +- .../threads/TestThreads_SubView_c10.cpp | 18 +- .../threads/TestThreads_SubView_c11.cpp | 19 +- .../threads/TestThreads_SubView_c12.cpp | 19 +- .../threads/TestThreads_SubView_c13.cpp | 18 +- .../unit_test/threads/TestThreads_Team.cpp | 85 +- .../threads/TestThreads_TeamReductionScan.cpp | 64 +- .../threads/TestThreads_TeamScratch.cpp | 61 +- .../threads/TestThreads_TeamTeamSize.cpp | 13 +- .../threads/TestThreads_TeamVectorRange.cpp | 17 +- .../threads/TestThreads_UniqueToken.cpp | 46 + .../threads/TestThreads_ViewAPI_a.cpp | 11 +- .../threads/TestThreads_ViewAPI_b.cpp | 11 +- .../threads/TestThreads_ViewAPI_c.cpp | 11 +- .../threads/TestThreads_ViewAPI_d.cpp | 11 +- .../threads/TestThreads_ViewAPI_e.cpp | 11 +- ...TestThreads_ViewLayoutStrideAssignment.cpp | 12 +- .../threads/TestThreads_ViewMapping_a.cpp | 12 +- .../threads/TestThreads_ViewMapping_b.cpp | 12 +- .../TestThreads_ViewMapping_subview.cpp | 12 +- .../threads/TestThreads_ViewOfClass.cpp | 12 +- .../threads/TestThreads_ViewResize.cpp | 46 + .../threads/TestThreads_View_64bit.cpp | 11 +- .../threads/TestThreads_WorkGraph.cpp | 15 +- lib/kokkos/example/CMakeLists.txt | 28 +- .../CMakeLists.txt | 0 .../cmake_example.cpp | 17 +- .../foo.f | 0 .../build_cmake_installed/CMakeLists.txt | 42 + .../cmake_example.cpp} | 70 +- .../example/build_cmake_installed/foo.f | 4 + lib/kokkos/example/common/VectorImport.hpp | 294 - lib/kokkos/example/common/WrapMPI.hpp | 103 - lib/kokkos/example/feint/CMakeLists.txt | 18 - lib/kokkos/example/feint/ElemFunctor.hpp | 485 -- lib/kokkos/example/feint/Makefile | 71 - lib/kokkos/example/feint/feint.hpp | 165 - lib/kokkos/example/feint/feint_cuda.cpp | 67 - lib/kokkos/example/feint/feint_hpx.cpp | 67 - lib/kokkos/example/feint/feint_rocm.cpp | 67 - lib/kokkos/example/feint/feint_threads.cpp | 67 - lib/kokkos/example/fenl/CGSolve.hpp | 300 - lib/kokkos/example/fenl/CMakeLists.txt | 17 - lib/kokkos/example/fenl/Makefile | 50 - lib/kokkos/example/fenl/fenl.cpp | 181 - lib/kokkos/example/fenl/fenl.hpp | 89 - lib/kokkos/example/fenl/fenl_functors.hpp | 1173 ---- lib/kokkos/example/fenl/fenl_impl.hpp | 598 -- lib/kokkos/example/fenl/main.cpp | 367 -- lib/kokkos/example/fixture/BoxElemFixture.hpp | 355 -- lib/kokkos/example/fixture/BoxElemPart.cpp | 413 -- lib/kokkos/example/fixture/BoxElemPart.hpp | 320 - lib/kokkos/example/fixture/CMakeLists.txt | 13 - lib/kokkos/example/fixture/HexElement.hpp | 270 - lib/kokkos/example/fixture/Main.cpp | 307 - lib/kokkos/example/fixture/Makefile | 46 - lib/kokkos/example/fixture/TestFixture.hpp | 156 - .../example/global_2_local_ids/CMakeLists.txt | 17 - lib/kokkos/example/global_2_local_ids/G2L.hpp | 266 - .../example/global_2_local_ids/G2L_Main.cpp | 158 - .../example/global_2_local_ids/Makefile | 46 - lib/kokkos/example/grow_array/CMakeLists.txt | 14 - lib/kokkos/example/grow_array/Makefile | 46 - lib/kokkos/example/grow_array/grow_array.hpp | 257 - lib/kokkos/example/grow_array/main.cpp | 110 - lib/kokkos/example/make_buildlink/main.cpp | 13 +- lib/kokkos/example/md_skeleton/CMakeLists.txt | 16 - lib/kokkos/example/md_skeleton/Makefile | 46 - lib/kokkos/example/md_skeleton/README | 3 - lib/kokkos/example/md_skeleton/force.cpp | 184 - lib/kokkos/example/md_skeleton/main.cpp | 205 - lib/kokkos/example/md_skeleton/neighbor.cpp | 430 -- lib/kokkos/example/md_skeleton/setup.cpp | 271 - lib/kokkos/example/md_skeleton/system.h | 92 - lib/kokkos/example/md_skeleton/types.h | 118 - .../example/multi_fem/BoxMeshFixture.hpp | 610 -- .../example/multi_fem/BoxMeshPartition.cpp | 381 -- .../example/multi_fem/BoxMeshPartition.hpp | 210 - lib/kokkos/example/multi_fem/CMakeLists.txt | 16 - lib/kokkos/example/multi_fem/Explicit.hpp | 452 -- .../example/multi_fem/ExplicitFunctors.hpp | 1471 ----- lib/kokkos/example/multi_fem/FEMesh.hpp | 86 - lib/kokkos/example/multi_fem/HexElement.hpp | 268 - .../multi_fem/HexExplicitFunctions.hpp | 443 -- lib/kokkos/example/multi_fem/Implicit.hpp | 341 -- .../example/multi_fem/ImplicitFunctors.hpp | 585 -- lib/kokkos/example/multi_fem/LinAlgBLAS.hpp | 567 -- lib/kokkos/example/multi_fem/Makefile | 49 - lib/kokkos/example/multi_fem/Nonlinear.hpp | 573 -- .../multi_fem/NonlinearElement_Cuda.hpp | 390 -- .../example/multi_fem/NonlinearFunctors.hpp | 482 -- lib/kokkos/example/multi_fem/ParallelComm.hpp | 167 - .../example/multi_fem/ParallelDataMap.hpp | 517 -- .../example/multi_fem/ParallelMachine.cpp | 178 - .../example/multi_fem/ParallelMachine.hpp | 118 - .../example/multi_fem/SparseLinearSystem.hpp | 404 -- .../multi_fem/SparseLinearSystemFill.hpp | 276 - .../multi_fem/SparseLinearSystem_Cuda.hpp | 164 - .../example/multi_fem/TestBoxMeshFixture.hpp | 242 - .../multi_fem/TestBoxMeshPartition.cpp | 172 - lib/kokkos/example/multi_fem/TestCuda.cpp | 188 - lib/kokkos/example/multi_fem/TestHost.cpp | 142 - .../example/multi_fem/TestHybridFEM.cpp | 348 -- .../example/query_device/CMakeLists.txt | 10 +- .../example/query_device/query_device.cpp | 58 +- lib/kokkos/example/sort_array/CMakeLists.txt | 14 - lib/kokkos/example/sort_array/Makefile | 46 - lib/kokkos/example/sort_array/main.cpp | 95 - lib/kokkos/example/sort_array/sort_array.hpp | 190 - .../tutorial/01_hello_world/CMakeLists.txt | 9 +- .../tutorial/01_hello_world/hello_world.cpp | 36 +- .../01_hello_world_lambda/CMakeLists.txt | 17 +- .../hello_world_lambda.cpp | 31 +- .../tutorial/02_simple_reduce/CMakeLists.txt | 9 +- .../02_simple_reduce/simple_reduce.cpp | 46 +- .../02_simple_reduce_lambda/CMakeLists.txt | 17 +- .../simple_reduce_lambda.cpp | 49 +- .../tutorial/03_simple_view/CMakeLists.txt | 9 +- .../example/tutorial/03_simple_view/Makefile | 2 +- .../tutorial/03_simple_view/simple_view.cpp | 56 +- .../03_simple_view_lambda/CMakeLists.txt | 6 +- .../simple_view_lambda.cpp | 78 +- .../04_simple_memoryspaces/CMakeLists.txt | 5 +- .../simple_memoryspaces.cpp | 44 +- .../tutorial/05_simple_atomics/CMakeLists.txt | 6 +- .../05_simple_atomics/simple_atomics.cpp | 76 +- .../06_simple_mdrangepolicy/CMakeLists.txt | 6 +- .../simple_mdrangepolicy.cpp | 130 +- .../01_data_layouts/CMakeLists.txt | 5 +- .../01_data_layouts/data_layouts.cpp | 72 +- .../02_memory_traits/CMakeLists.txt | 5 +- .../02_memory_traits/memory_traits.cpp | 86 +- .../Advanced_Views/03_subviews/CMakeLists.txt | 5 +- .../Advanced_Views/03_subviews/subviews.cpp | 108 +- .../04_dualviews/CMakeLists.txt | 5 +- .../Advanced_Views/04_dualviews/dual_view.cpp | 201 +- .../05_NVIDIA_UVM/CMakeLists.txt | 14 +- .../05_NVIDIA_UVM/uvm_example.cpp | 91 +- .../overlapping_deepcopy.cpp | 127 +- .../tutorial/Advanced_Views/CMakeLists.txt | 12 +- .../01_random_numbers/random_numbers.cpp | 164 +- lib/kokkos/example/tutorial/CMakeLists.txt | 22 +- .../01_thread_teams/CMakeLists.txt | 5 +- .../01_thread_teams/thread_teams.cpp | 67 +- .../01_thread_teams_lambda/CMakeLists.txt | 13 +- .../thread_teams_lambda.cpp | 53 +- .../02_nested_parallel_for/CMakeLists.txt | 5 +- .../nested_parallel_for.cpp | 81 +- .../03_vectorization/CMakeLists.txt | 10 +- .../03_vectorization/vectorization.cpp | 150 +- .../04_team_scan/CMakeLists.txt | 6 +- .../04_team_scan/team_scan.cpp | 151 +- .../Hierarchical_Parallelism/CMakeLists.txt | 10 +- .../tutorial/launch_bounds/CMakeLists.txt | 5 +- .../launch_bounds/launch_bounds_reduce.cpp | 197 +- .../example/virtual_functions/classes.cpp | 22 +- .../example/virtual_functions/classes.hpp | 48 +- lib/kokkos/example/virtual_functions/main.cpp | 42 +- lib/kokkos/generate_makefile.bash | 100 +- lib/kokkos/master_history.txt | 1 + 2169 files changed, 121406 insertions(+), 126492 deletions(-) create mode 100644 lib/kokkos/BUILD.md create mode 100644 lib/kokkos/CONTRIBUTING.md delete mode 100644 lib/kokkos/README create mode 100644 lib/kokkos/README.md create mode 100755 lib/kokkos/cm_generate_makefile.bash create mode 100644 lib/kokkos/cmake/KokkosConfigCommon.cmake.in create mode 100644 lib/kokkos/cmake/KokkosCore_config.h.in delete mode 100644 lib/kokkos/cmake/Makefile.generate_cmake_settings delete mode 100644 lib/kokkos/cmake/Modules/FindHWLOC.cmake delete mode 100644 lib/kokkos/cmake/Modules/FindMemkind.cmake delete mode 100644 lib/kokkos/cmake/Modules/FindQthreads.cmake create mode 100644 lib/kokkos/cmake/Modules/FindTPLCUDA.cmake create mode 100644 lib/kokkos/cmake/Modules/FindTPLHPX.cmake create mode 100644 lib/kokkos/cmake/Modules/FindTPLHWLOC.cmake create mode 100644 lib/kokkos/cmake/Modules/FindTPLLIBDL.cmake create mode 100644 lib/kokkos/cmake/Modules/FindTPLLIBNUMA.cmake create mode 100644 lib/kokkos/cmake/Modules/FindTPLLIBRT.cmake create mode 100644 lib/kokkos/cmake/Modules/FindTPLMEMKIND.cmake create mode 100644 lib/kokkos/cmake/Modules/FindTPLPTHREAD.cmake create mode 100644 lib/kokkos/cmake/README.md create mode 100644 lib/kokkos/cmake/compile_tests/clang_omp.cpp create mode 100644 lib/kokkos/cmake/compile_tests/pthread.cpp create mode 100644 lib/kokkos/cmake/cray.cmake delete mode 100644 lib/kokkos/cmake/deps/QTHREADS.cmake create mode 100644 lib/kokkos/cmake/fake_tribits.cmake create mode 100644 lib/kokkos/cmake/gnu.cmake create mode 100644 lib/kokkos/cmake/intel.cmake create mode 100644 lib/kokkos/cmake/kokkos_arch.cmake delete mode 100644 lib/kokkos/cmake/kokkos_build.cmake create mode 100644 lib/kokkos/cmake/kokkos_compiler_id.cmake create mode 100644 lib/kokkos/cmake/kokkos_corner_cases.cmake create mode 100644 lib/kokkos/cmake/kokkos_enable_devices.cmake create mode 100644 lib/kokkos/cmake/kokkos_enable_options.cmake create mode 100644 lib/kokkos/cmake/kokkos_install.cmake delete mode 100644 lib/kokkos/cmake/kokkos_options.cmake create mode 100644 lib/kokkos/cmake/kokkos_pick_cxx_std.cmake delete mode 100644 lib/kokkos/cmake/kokkos_settings.cmake create mode 100644 lib/kokkos/cmake/kokkos_test_cxx_std.cmake create mode 100644 lib/kokkos/cmake/kokkos_tpls.cmake create mode 100644 lib/kokkos/cmake/kokkos_tribits.cmake create mode 100644 lib/kokkos/cmake/pgi.cmake delete mode 100644 lib/kokkos/cmake/tpls/FindTPLQTHREADS.cmake delete mode 100644 lib/kokkos/cmake/tribits.cmake create mode 100644 lib/kokkos/core/src/HPX/Kokkos_HPX_ChunkedRoundRobinExecutor.hpp delete mode 100644 lib/kokkos/core/src/Makefile delete mode 100644 lib/kokkos/core/src/Makefile.generate_build_files delete mode 100644 lib/kokkos/core/src/Makefile.generate_header_lists create mode 100644 lib/kokkos/core/src/dummy.cpp create mode 100644 lib/kokkos/core/src/impl/Kokkos_MemorySpace.hpp create mode 100644 lib/kokkos/core/src/impl/Kokkos_Stacktrace.cpp create mode 100644 lib/kokkos/core/src/impl/Kokkos_Stacktrace.hpp rename lib/kokkos/{example/feint/feint_fwd.hpp => core/unit_test/TestStackTrace.cpp} (69%) create mode 100644 lib/kokkos/core/unit_test/TestStackTrace.hpp rename lib/kokkos/{example/feint/feint_openmp.cpp => core/unit_test/TestStackTrace_f0.cpp} (67%) rename lib/kokkos/{example/fixture/TestFixture.cpp => core/unit_test/TestStackTrace_f1.cpp} (69%) rename lib/kokkos/{example/feint/feint_serial.cpp => core/unit_test/TestStackTrace_f2.cpp} (67%) create mode 100644 lib/kokkos/core/unit_test/TestStackTrace_f3.cpp create mode 100644 lib/kokkos/core/unit_test/TestStackTrace_f4.cpp create mode 100644 lib/kokkos/core/unit_test/TestViewResize.hpp create mode 100644 lib/kokkos/core/unit_test/configuration/test-code/CMakeLists.txt create mode 100644 lib/kokkos/core/unit_test/configuration/test-code/Makefile create mode 100644 lib/kokkos/core/unit_test/configuration/test-code/main.cpp create mode 100755 lib/kokkos/core/unit_test/configuration/test-code/test_config.bash create mode 100755 lib/kokkos/core/unit_test/configuration/test-code/test_config_arch_list.bash create mode 100755 lib/kokkos/core/unit_test/configuration/test-code/test_config_device_list.bash create mode 100755 lib/kokkos/core/unit_test/configuration/test-code/test_config_options_list.bash create mode 100755 lib/kokkos/core/unit_test/configuration/test-code/test_config_run.bash create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_DebugPinUVMSpace.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_DebugSerialExecution.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_FunctorAnalysis.cpp create mode 100644 lib/kokkos/core/unit_test/cuda/TestCuda_ViewResize.cpp create mode 100644 lib/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_complexdouble.cpp create mode 100644 lib/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_complexfloat.cpp create mode 100644 lib/kokkos/core/unit_test/hpx/TestHPX_DeepCopyAlignment.cpp create mode 100644 lib/kokkos/core/unit_test/hpx/TestHPX_FunctorAnalysis.cpp create mode 100644 lib/kokkos/core/unit_test/hpx/TestHPX_LocalDeepCopy.cpp create mode 100644 lib/kokkos/core/unit_test/hpx/TestHPX_Reductions_DeviceView.cpp create mode 100644 lib/kokkos/core/unit_test/hpx/TestHPX_TeamTeamSize.cpp create mode 100644 lib/kokkos/core/unit_test/hpx/TestHPX_ViewLayoutStrideAssignment.cpp create mode 100644 lib/kokkos/core/unit_test/hpx/TestHPX_ViewResize.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_FunctorAnalysis.cpp create mode 100644 lib/kokkos/core/unit_test/openmp/TestOpenMP_ViewResize.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_FunctorAnalysis.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_UniqueToken.cpp create mode 100644 lib/kokkos/core/unit_test/serial/TestSerial_ViewResize.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_FunctorAnalysis.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_UniqueToken.cpp create mode 100644 lib/kokkos/core/unit_test/threads/TestThreads_ViewResize.cpp rename lib/kokkos/example/{cmake_build => build_cmake_in_tree}/CMakeLists.txt (100%) rename lib/kokkos/example/{cmake_build => build_cmake_in_tree}/cmake_example.cpp (85%) rename lib/kokkos/example/{cmake_build => build_cmake_in_tree}/foo.f (100%) create mode 100644 lib/kokkos/example/build_cmake_installed/CMakeLists.txt rename lib/kokkos/example/{feint/main.cpp => build_cmake_installed/cmake_example.cpp} (55%) create mode 100644 lib/kokkos/example/build_cmake_installed/foo.f delete mode 100644 lib/kokkos/example/common/VectorImport.hpp delete mode 100644 lib/kokkos/example/common/WrapMPI.hpp delete mode 100644 lib/kokkos/example/feint/CMakeLists.txt delete mode 100644 lib/kokkos/example/feint/ElemFunctor.hpp delete mode 100644 lib/kokkos/example/feint/Makefile delete mode 100644 lib/kokkos/example/feint/feint.hpp delete mode 100644 lib/kokkos/example/feint/feint_cuda.cpp delete mode 100644 lib/kokkos/example/feint/feint_hpx.cpp delete mode 100644 lib/kokkos/example/feint/feint_rocm.cpp delete mode 100644 lib/kokkos/example/feint/feint_threads.cpp delete mode 100644 lib/kokkos/example/fenl/CGSolve.hpp delete mode 100644 lib/kokkos/example/fenl/CMakeLists.txt delete mode 100644 lib/kokkos/example/fenl/Makefile delete mode 100644 lib/kokkos/example/fenl/fenl.cpp delete mode 100644 lib/kokkos/example/fenl/fenl.hpp delete mode 100644 lib/kokkos/example/fenl/fenl_functors.hpp delete mode 100644 lib/kokkos/example/fenl/fenl_impl.hpp delete mode 100644 lib/kokkos/example/fenl/main.cpp delete mode 100644 lib/kokkos/example/fixture/BoxElemFixture.hpp delete mode 100644 lib/kokkos/example/fixture/BoxElemPart.cpp delete mode 100644 lib/kokkos/example/fixture/BoxElemPart.hpp delete mode 100644 lib/kokkos/example/fixture/CMakeLists.txt delete mode 100644 lib/kokkos/example/fixture/HexElement.hpp delete mode 100644 lib/kokkos/example/fixture/Main.cpp delete mode 100644 lib/kokkos/example/fixture/Makefile delete mode 100644 lib/kokkos/example/fixture/TestFixture.hpp delete mode 100644 lib/kokkos/example/global_2_local_ids/CMakeLists.txt delete mode 100644 lib/kokkos/example/global_2_local_ids/G2L.hpp delete mode 100644 lib/kokkos/example/global_2_local_ids/G2L_Main.cpp delete mode 100644 lib/kokkos/example/global_2_local_ids/Makefile delete mode 100644 lib/kokkos/example/grow_array/CMakeLists.txt delete mode 100644 lib/kokkos/example/grow_array/Makefile delete mode 100644 lib/kokkos/example/grow_array/grow_array.hpp delete mode 100644 lib/kokkos/example/grow_array/main.cpp delete mode 100644 lib/kokkos/example/md_skeleton/CMakeLists.txt delete mode 100644 lib/kokkos/example/md_skeleton/Makefile delete mode 100644 lib/kokkos/example/md_skeleton/README delete mode 100644 lib/kokkos/example/md_skeleton/force.cpp delete mode 100644 lib/kokkos/example/md_skeleton/main.cpp delete mode 100644 lib/kokkos/example/md_skeleton/neighbor.cpp delete mode 100644 lib/kokkos/example/md_skeleton/setup.cpp delete mode 100644 lib/kokkos/example/md_skeleton/system.h delete mode 100644 lib/kokkos/example/md_skeleton/types.h delete mode 100644 lib/kokkos/example/multi_fem/BoxMeshFixture.hpp delete mode 100644 lib/kokkos/example/multi_fem/BoxMeshPartition.cpp delete mode 100644 lib/kokkos/example/multi_fem/BoxMeshPartition.hpp delete mode 100644 lib/kokkos/example/multi_fem/CMakeLists.txt delete mode 100644 lib/kokkos/example/multi_fem/Explicit.hpp delete mode 100644 lib/kokkos/example/multi_fem/ExplicitFunctors.hpp delete mode 100644 lib/kokkos/example/multi_fem/FEMesh.hpp delete mode 100644 lib/kokkos/example/multi_fem/HexElement.hpp delete mode 100644 lib/kokkos/example/multi_fem/HexExplicitFunctions.hpp delete mode 100644 lib/kokkos/example/multi_fem/Implicit.hpp delete mode 100644 lib/kokkos/example/multi_fem/ImplicitFunctors.hpp delete mode 100644 lib/kokkos/example/multi_fem/LinAlgBLAS.hpp delete mode 100644 lib/kokkos/example/multi_fem/Makefile delete mode 100644 lib/kokkos/example/multi_fem/Nonlinear.hpp delete mode 100644 lib/kokkos/example/multi_fem/NonlinearElement_Cuda.hpp delete mode 100644 lib/kokkos/example/multi_fem/NonlinearFunctors.hpp delete mode 100644 lib/kokkos/example/multi_fem/ParallelComm.hpp delete mode 100644 lib/kokkos/example/multi_fem/ParallelDataMap.hpp delete mode 100644 lib/kokkos/example/multi_fem/ParallelMachine.cpp delete mode 100644 lib/kokkos/example/multi_fem/ParallelMachine.hpp delete mode 100644 lib/kokkos/example/multi_fem/SparseLinearSystem.hpp delete mode 100644 lib/kokkos/example/multi_fem/SparseLinearSystemFill.hpp delete mode 100644 lib/kokkos/example/multi_fem/SparseLinearSystem_Cuda.hpp delete mode 100644 lib/kokkos/example/multi_fem/TestBoxMeshFixture.hpp delete mode 100644 lib/kokkos/example/multi_fem/TestBoxMeshPartition.cpp delete mode 100644 lib/kokkos/example/multi_fem/TestCuda.cpp delete mode 100644 lib/kokkos/example/multi_fem/TestHost.cpp delete mode 100644 lib/kokkos/example/multi_fem/TestHybridFEM.cpp delete mode 100644 lib/kokkos/example/sort_array/CMakeLists.txt delete mode 100644 lib/kokkos/example/sort_array/Makefile delete mode 100644 lib/kokkos/example/sort_array/main.cpp delete mode 100644 lib/kokkos/example/sort_array/sort_array.hpp diff --git a/lib/kokkos/BUILD.md b/lib/kokkos/BUILD.md new file mode 100644 index 0000000000..c4d6c98365 --- /dev/null +++ b/lib/kokkos/BUILD.md @@ -0,0 +1,323 @@ +![Kokkos](https://avatars2.githubusercontent.com/u/10199860?s=200&v=4) + +# Installing and Using Kokkos + +## Kokkos Philosophy +Kokkos provides a modern CMake style build system. +As C++ continues to develop for C++20 and beyond, CMake is likely to provide the most robust support +for C++. Applications heavily leveraging Kokkos are strongly encouraged to use a CMake build system. + +You can either use Kokkos as an installed package (encouraged) or use Kokkos in-tree in your project. +Modern CMake is exceedingly simple at a high-level (with the devil in the details). +Once Kokkos is installed In your `CMakeLists.txt` simply use: +```` +find_package(Kokkos REQUIRED) +```` +Then for every executable or library in your project: +```` +target_link_libraries(myTarget Kokkos::kokkos) +```` +That's it! There is no checking Kokkos preprocessor, compiler, or linker flags. +Kokkos propagates all the necesssary flags to your project. +This means not only is linking to Kokkos easy, but Kokkos itself can actually configure compiler and linker flags for *your* +project. If building in-tree, there is no `find_package` and you link with `target_link_libraries(kokkos)`. + + +## Configuring CMake +A very basic installation is done with: +```` +cmake ${srcdir} \ + -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_INSTALL_PREFIX=${my_install_folder} +```` +which builds and installed a default Kokkos when you run `make install`. +There are numerous device backends, options, and architecture-specific optimizations that can be configured, e.g. +```` +cmake ${srcdir} \ + -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_INSTALL_PREFIX=${my_install_folder} \ + -DKokkos_ENABLE_OPENMP=On +```` +which activates the OpenMP backend. All of the options controlling device backends, options, architectures, and third-party libraries (TPLs) are given below. + +## Spack +An alternative to manually building with the CMake is to use the Spack package manager. +To do so, download the `kokkos-spack` git repo and add to the package list: +```` +spack repo add $path-to-kokkos-spack +```` +A basic installation would be done as: +```` +spack install kokkos +```` +Spack allows options and and compilers to be tuned in the install command. +```` +spack install kokkos@3.0 %gcc@7.3.0 +openmp +```` +This example illustrates the three most common parameters to Spack: +* Variants: specified with, e.g. `+openmp`, this activates (or deactivates with, e.g. `~openmp`) certain options. +* Version: immediately following `kokkos` the `@version` can specify a particular Kokkos to build +* Compiler: a default compiler will be chosen if not specified, but an exact compiler version can be given with the `%`option. + +For a complete list of Kokkos options, run: +```` +spack info kokkos +```` + +#### Spack Development +Spack currently installs packages to a location determined by a unique hash. This hash name is not really "human readable". +Generally, Spack usage should never really require you to reference the computer-generated unique install folder. +If you must know, you can locate Spack Kokkos installations with: +```` +spack find -p kokkos ... +```` +where `...` is the unique spec identifying the particular Kokkos configuration and version. + +A better way to use Spack for doing Kokkos development is the DIY feature of Spack. +If you wish to develop Kokkos itself, go to the Kokkos source folder: +```` +spack diy -u cmake kokkos@diy ... +```` +where `...` is a Spack spec identifying the exact Kokkos configuration. +This then creates a `spack-build` directory where you can run `make`. + +If doing development on a downstream project, you can do almost exactly the same thing. +```` +spack diy -u cmake ${myproject}@${myversion} ... ^kokkos... +```` +where the `...` are the specs for your project and the desired Kokkos configuration. +Again, a `spack-build` directory will be created where you can run `make`. + +Spack has a few idiosyncracies that make building outside of Spack annoying related to Spack forcing use of a compiler wrapper. This can be worked around by having a `-DSpack_WORKAROUND=On` given your CMake. Then add the block of code to your CMakeLists.txt: + +```` +if (Spack_WORKAROUND) + set(SPACK_CXX $ENV{SPACK_CXX}) + if(SPACK_CXX) + set(CMAKE_CXX_COMPILER ${SPACK_CXX} CACHE STRING "the C++ compiler" FORCE) + set(ENV{CXX} ${SPACK_CXX}) + endif() +endif() +```` + +# Kokkos Keyword Listing + +## Device Backends +Device backends can be enabled by specifiying `-DKokkos_ENABLE_X`. + +* Kokkos_ENABLE_CUDA + * Whether to build CUDA backend + * BOOL Default: OFF +* Kokkos_ENABLE_HPX + * Whether to build HPX backend (experimental) + * BOOL Default: OFF +* Kokkos_ENABLE_OPENMP + * Whether to build OpenMP backend + * BOOL Default: OFF +* Kokkos_ENABLE_PTHREAD + * Whether to build Pthread backend + * BOOL Default: OFF +* Kokkos_ENABLE_SERIAL + * Whether to build serial backend + * BOOL Default: ON + +## Enable Options +Options can be enabled by specifiying `-DKokkos_ENABLE_X`. + +* Kokkos_ENABLE_AGGRESSIVE_VECTORIZATION + * Whether to aggressively vectorize loops + * BOOL Default: OFF +* Kokkos_ENABLE_COMPILER_WARNINGS + * Whether to print all compiler warnings + * BOOL Default: OFF +* Kokkos_ENABLE_CUDA_CONSTEXPR + * Whether to activate experimental relaxed constexpr functions + * BOOL Default: OFF +* Kokkos_ENABLE_CUDA_LAMBDA + * Whether to activate experimental lambda features + * BOOL Default: OFF +* Kokkos_ENABLE_CUDA_LDG_INTRINSIC + * Whether to use CUDA LDG intrinsics + * BOOL Default: OFF +* Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE + * Whether to enable relocatable device code (RDC) for CUDA + * BOOL Default: OFF +* Kokkos_ENABLE_CUDA_UVM + * Whether to use unified memory (UM) by default for CUDA + * BOOL Default: OFF +* Kokkos_ENABLE_DEBUG + * Whether to activate extra debug features - may increase compile times + * BOOL Default: OFF +* Kokkos_ENABLE_DEBUG_BOUNDS_CHECK + * Whether to use bounds checking - will increase runtime + * BOOL Default: OFF +* Kokkos_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK + * Debug check on dual views + * BOOL Default: OFF +* Kokkos_ENABLE_DEPRECATED_CODE + * Whether to enable deprecated code + * BOOL Default: OFF +* Kokkos_ENABLE_HPX_ASYNC_DISPATCH + * Whether HPX supports asynchronous dispatch + * BOOL Default: OFF +* Kokkos_ENABLE_LARGE_MEM_TESTS + * Whether to perform extra large memory tests + * BOOL_Default: OFF +* Kokkos_ENABLE_PROFILING + * Whether to create bindings for profiling tools + * BOOL Default: ON +* Kokkos_ENABLE_PROFILING_LOAD_PRINT + * Whether to print information about which profiling tools gotloaded + * BOOL Default: OFF +* Kokkos_ENABLE_TESTS + * Whether to build serial backend + * BOOL Default: OFF + +## Other Options +* Kokkos_CXX_STANDARD + * The C++ standard for Kokkos to use: c++11, c++14, c++17, or c++20. This should be given in CMake style as 11, 14, 17, or 20. + * STRING Default: 11 + +## Third-party Libraries (TPLs) +The following options control enabling TPLs: +* Kokkos_ENABLE_HPX + * Whether to enable the HPX library + * BOOL Default: OFF +* Kokkos_ENABLE_HWLOC + * Whether to enable the HWLOC library + * BOOL Default: Off +* Kokkos_ENABLE_LIBNUMA + * Whether to enable the LIBNUMA library + * BOOL Default: Off +* Kokkos_ENABLE_MEMKIND + * Whether to enable the MEMKIND library + * BOOL Default: Off +* Kokkos_ENABLE_LIBDL + * Whether to enable the LIBDL library + * BOOL Default: On +* Kokkos_ENABLE_LIBRT + * Whether to enable the LIBRT library + * BOOL Default: Off + +The following options control finding and configuring non-CMake TPLs: +* Kokkos_CUDA_DIR or CUDA_ROOT + * Location of CUDA install prefix for libraries + * PATH Default: +* Kokkos_HWLOC_DIR or HWLOC_ROOT + * Location of HWLOC install prefix + * PATH Default: +* Kokkos_LIBNUMA_DIR or LIBNUMA_ROOT + * Location of LIBNUMA install prefix + * PATH Default: +* Kokkos_MEMKIND_DIR or MEMKIND_ROOT + * Location of MEMKIND install prefix + * PATH Default: +* Kokkos_LIBDL_DIR or LIBDL_ROOT + * Location of LIBDL install prefix + * PATH Default: +* Kokkos_LIBRT_DIR or LIBRT_ROOT + * Location of LIBRT install prefix + * PATH Default: + +The following options control `find_package` paths for CMake-based TPLs: +* HPX_DIR or HPX_ROOT + * Location of HPX prefix (ROOT) or CMake config file (DIR) + * PATH Default: + +## Architecture Keywords +Architecture-specific optimizations can be enabled by specifiying `-DKokkos_ARCH_X`. + +* Kokkos_ARCH_AMDAVX + * Whether to optimize for the AMDAVX architecture + * BOOL Default: OFF +* Kokkos_ARCH_ARMV80 + * Whether to optimize for the ARMV80 architecture + * BOOL Default: OFF +* Kokkos_ARCH_ARMV81 + * Whether to optimize for the ARMV81 architecture + * BOOL Default: OFF +* Kokkos_ARCH_ARMV8_THUNDERX + * Whether to optimize for the ARMV8_THUNDERX architecture + * BOOL Default: OFF +* Kokkos_ARCH_ARMV8_TX2 + * Whether to optimize for the ARMV8_TX2 architecture + * BOOL Default: OFF +* Kokkos_ARCH_BDW + * Whether to optimize for the BDW architecture + * BOOL Default: OFF +* Kokkos_ARCH_BGQ + * Whether to optimize for the BGQ architecture + * BOOL Default: OFF +* Kokkos_ARCH_EPYC + * Whether to optimize for the EPYC architecture + * BOOL Default: OFF +* Kokkos_ARCH_HSW + * Whether to optimize for the HSW architecture + * BOOL Default: OFF +* Kokkos_ARCH_KEPLER30 + * Whether to optimize for the KEPLER30 architecture + * BOOL Default: OFF +* Kokkos_ARCH_KEPLER32 + * Whether to optimize for the KEPLER32 architecture + * BOOL Default: OFF +* Kokkos_ARCH_KEPLER35 + * Whether to optimize for the KEPLER35 architecture + * BOOL Default: OFF +* Kokkos_ARCH_KEPLER37 + * Whether to optimize for the KEPLER37 architecture + * BOOL Default: OFF +* Kokkos_ARCH_KNC + * Whether to optimize for the KNC architecture + * BOOL Default: OFF +* Kokkos_ARCH_KNL + * Whether to optimize for the KNL architecture + * BOOL Default: OFF +* Kokkos_ARCH_MAXWELL50 + * Whether to optimize for the MAXWELL50 architecture + * BOOL Default: OFF +* Kokkos_ARCH_MAXWELL52 + * Whether to optimize for the MAXWELL52 architecture + * BOOL Default: OFF +* Kokkos_ARCH_MAXWELL53 + * Whether to optimize for the MAXWELL53 architecture + * BOOL Default: OFF +* Kokkos_ARCH_PASCAL60 + * Whether to optimize for the PASCAL60 architecture + * BOOL Default: OFF +* Kokkos_ARCH_PASCAL61 + * Whether to optimize for the PASCAL61 architecture + * BOOL Default: OFF +* Kokkos_ARCH_POWER7 + * Whether to optimize for the POWER7 architecture + * BOOL Default: OFF +* Kokkos_ARCH_POWER8 + * Whether to optimize for the POWER8 architecture + * BOOL Default: OFF +* Kokkos_ARCH_POWER9 + * Whether to optimize for the POWER9 architecture + * BOOL Default: OFF +* Kokkos_ARCH_SKX + * Whether to optimize for the SKX architecture + * BOOL Default: OFF +* Kokkos_ARCH_SNB + * Whether to optimize for the SNB architecture + * BOOL Default: OFF +* Kokkos_ARCH_TURING75 + * Whether to optimize for the TURING75 architecture + * BOOL Default: OFF +* Kokkos_ARCH_VOLTA70 + * Whether to optimize for the VOLTA70 architecture + * BOOL Default: OFF +* Kokkos_ARCH_VOLTA72 + * Whether to optimize for the VOLTA72 architecture + * BOOL Default: OFF +* Kokkos_ARCH_WSM + * Whether to optimize for the WSM architecture + * BOOL Default: OFF + +##### [LICENSE](https://github.com/kokkos/kokkos/blob/devel/LICENSE) + +[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) + +Under the terms of Contract DE-NA0003525 with NTESS, +the U.S. Government retains certain rights in this software. diff --git a/lib/kokkos/CHANGELOG.md b/lib/kokkos/CHANGELOG.md index 8d196e2c35..459aeb3d2e 100644 --- a/lib/kokkos/CHANGELOG.md +++ b/lib/kokkos/CHANGELOG.md @@ -1,5 +1,45 @@ # Change Log +## [3.0.00](https://github.com/kokkos/kokkos/tree/3.0.00) (2020-01-27) +[Full Changelog](https://github.com/kokkos/kokkos/compare/2.9.00...3.0.00) + +**Implemented enhancements:** + +- BuildSystem: Standalone Modern CMake Support [\#2104](https://github.com/kokkos/kokkos/issues/2104) +- StyleFormat: ClangFormat Style [\#2157](https://github.com/kokkos/kokkos/issues/2157) +- Documentation: Document build system and CMake philosophy [\#2263](https://github.com/kokkos/kokkos/issues/2263) +- BuildSystem: Add Alias with Namespace Kokkos:: to Interal Libraries [\#2530](https://github.com/kokkos/kokkos/issues/2530) +- BuildSystem: Universal Kokkos find\_package [\#2099](https://github.com/kokkos/kokkos/issues/2099) +- BuildSystem: Dropping support for Kokkos\_{DEVICES,OPTIONS,ARCH} in CMake [\#2329](https://github.com/kokkos/kokkos/issues/2329) +- BuildSystem: Set Kokkos\_DEVICES and Kokkos\_ARCH variables in exported CMake configuration [\#2193](https://github.com/kokkos/kokkos/issues/2193) +- BuildSystem: Drop support for CUDA 7 and CUDA 8 [\#2489](https://github.com/kokkos/kokkos/issues/2489) +- BuildSystem: Drop CMake option SEPARATE\_TESTS [\#2266](https://github.com/kokkos/kokkos/issues/2266) +- BuildSystem: Support expt-relaxed-constexpr same as expt-extended-lambda [\#2411](https://github.com/kokkos/kokkos/issues/2411) +- BuildSystem: Add Xnvlink to command line options allowed in nvcc\_wrapper [\#2197](https://github.com/kokkos/kokkos/issues/2197) +- BuildSystem: Install Kokkos config files and target files to lib/cmake/Kokkos [\#2162](https://github.com/kokkos/kokkos/issues/2162) +- BuildSystem: nvcc\_wrappers and c++ 14 [\#2035](https://github.com/kokkos/kokkos/issues/2035) +- BuildSystem: Kokkos version major/version minor \(Feature request\) [\#1930](https://github.com/kokkos/kokkos/issues/1930) +- BuildSystem: CMake namespaces \(and other modern cmake cleanup\) [\#1924](https://github.com/kokkos/kokkos/issues/1924) +- BuildSystem: Remove capability to install Kokkos via GNU Makefiles [\#2332](https://github.com/kokkos/kokkos/issues/2332) +- Documentation: Remove PDF ProgrammingGuide in Kokkos replace with link [\#2244](https://github.com/kokkos/kokkos/issues/2244) +- View: Add Method to Resize View without Initialization [\#2048](https://github.com/kokkos/kokkos/issues/2048) +- Vector: implement “insert†method for Kokkos\_Vector \(as a serial function on host\) [\#2437](https://github.com/kokkos/kokkos/issues/2437) + +**Fixed bugs:** + +- ParallelScan: Kokkos::parallel\scan fix race condition seen in inter-block fence [\#2681](https://github.com/kokkos/kokkos/issues/2681) +- OffsetView: Kokkos::OffsetView missing constructor which takes pointer [\#2247](https://github.com/kokkos/kokkos/issues/2247) +- OffsetView: Kokkos::OffsetView: allow offset=0 [\#2246](https://github.com/kokkos/kokkos/issues/2246) +- DeepCopy: Missing DeepCopy instrumentation in Kokkos [\#2522](https://github.com/kokkos/kokkos/issues/2522) +- nvcc\_wrapper: --host-only fails with mutiple -W\* flags [\#2484](https://github.com/kokkos/kokkos/issues/2484) +- nvcc\_wrapper: taking first -std option is counterintuitive [\#2553](https://github.com/kokkos/kokkos/issues/2553) +- Subview: Error taking subviews of views with static_extents of min rank [\#2448](https://github.com/kokkos/kokkos/issues/2448) +- TeamPolicy: reducers with valuetypes without += broken on CUDA [\#2410](https://github.com/kokkos/kokkos/issues/2410) +- Libs: Fix inconsistency of Kokkos library names in Kokkos and Trilinos [\#1902](https://github.com/kokkos/kokkos/issues/1902) +- Complex: operator\>\> for complex\ uses std::ostream, not std::istream [\#2313](https://github.com/kokkos/kokkos/issues/2313) +- Macros: Restrict not honored for non-intel compilers [\#1922](https://github.com/kokkos/kokkos/issues/1922) + + ## [2.9.00](https://github.com/kokkos/kokkos/tree/2.9.00) (2019-06-24) [Full Changelog](https://github.com/kokkos/kokkos/compare/2.8.00...2.9.00) diff --git a/lib/kokkos/CMakeLists.txt b/lib/kokkos/CMakeLists.txt index 236f523aec..6a4451b2e7 100644 --- a/lib/kokkos/CMakeLists.txt +++ b/lib/kokkos/CMakeLists.txt @@ -1,128 +1,218 @@ -# Is this a build as part of Trilinos? +# We want to determine if options are given with the wrong case +# In order to detect which arguments are given to compare against +# the list of valid arguments, at the beginning here we need to +# form a list of all the given variables. If it begins with any +# case of KoKkOS, we add it to the list. + + +GET_CMAKE_PROPERTY(_variableNames VARIABLES) +SET(KOKKOS_GIVEN_VARIABLES) +FOREACH (var ${_variableNames}) + STRING(TOUPPER ${var} UC_VAR) + STRING(FIND ${UC_VAR} KOKKOS IDX) + IF (${IDX} EQUAL 0) + LIST(APPEND KOKKOS_GIVEN_VARIABLES ${var}) + ENDIF() +ENDFOREACH() + +# Basic initialization (Used in KOKKOS_SETTINGS) +SET(Kokkos_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +SET(KOKKOS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +SET(KOKKOS_SRC_PATH ${Kokkos_SOURCE_DIR}) +SET(KOKKOS_PATH ${Kokkos_SOURCE_DIR}) +SET(KOKKOS_TOP_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}) + +# Needed to simplify syntax of if statements +CMAKE_POLICY(SET CMP0054 NEW) + +# Is this a build as part of Trilinos? IF(COMMAND TRIBITS_PACKAGE_DECL) - SET(KOKKOS_HAS_TRILINOS ON CACHE BOOL "") + SET(KOKKOS_HAS_TRILINOS ON) ELSE() - SET(KOKKOS_HAS_TRILINOS OFF CACHE BOOL "") + SET(KOKKOS_HAS_TRILINOS OFF) ENDIF() -IF(NOT KOKKOS_HAS_TRILINOS) - cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_functions.cmake) +INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_pick_cxx_std.cmake) - # Define Project Name if this is a standalone build - IF(NOT DEFINED ${PROJECT_NAME}) - project(Kokkos CXX) +SET(KOKKOS_ENABLED_OPTIONS) #exported in config file +SET(KOKKOS_ENABLED_DEVICES) #exported in config file +SET(KOKKOS_ENABLED_TPLS) #exported in config file +SET(KOKKOS_ENABLED_ARCH_LIST) #exported in config file + +#These are helper flags used for sanity checks during config +#Certain features should depend on other features being configured first +SET(KOKKOS_CFG_DAG_NONE On) #sentinel to indicate no dependencies +SET(KOKKOS_CFG_DAG_DEVICES_DONE Off) +SET(KOKKOS_CFG_DAG_OPTIONS_DONE Off) +SET(KOKKOS_CFG_DAG_ARCH_DONE Off) +SET(KOKKOS_CFG_DAG_CXX_STD_DONE Off) +SET(KOKKOS_CFG_DAG_COMPILER_ID_DONE Off) +FUNCTION(KOKKOS_CFG_DEPENDS SUCCESSOR PRECURSOR) + SET(PRE_FLAG KOKKOS_CFG_DAG_${PRECURSOR}) + SET(POST_FLAG KOKKOS_CFG_DAG_${SUCCESSOR}) + IF (NOT ${PRE_FLAG}) + MESSAGE(FATAL_ERROR "Bad CMake refactor: feature ${SUCCESSOR} cannot be configured until ${PRECURSOR} is configured") ENDIF() + GLOBAL_SET(${POST_FLAG} On) +ENDFUNCTION() - # Basic initialization (Used in KOKKOS_SETTINGS) - set(KOKKOS_SRC_PATH ${Kokkos_SOURCE_DIR}) - set(KOKKOS_PATH ${KOKKOS_SRC_PATH}) - #------------ COMPILER AND FEATURE CHECKS ------------------------------------ - include(${KOKKOS_SRC_PATH}/cmake/kokkos_functions.cmake) - set_kokkos_cxx_compiler() - set_kokkos_cxx_standard() +LIST(APPEND CMAKE_MODULE_PATH cmake/Modules) - #------------ GET OPTIONS AND KOKKOS_SETTINGS -------------------------------- - # Add Kokkos' modules to CMake's module path. - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${Kokkos_SOURCE_DIR}/cmake/Modules/") +IF(NOT KOKKOS_HAS_TRILINOS) + cmake_minimum_required(VERSION 3.10 FATAL_ERROR) + set(CMAKE_DISABLE_SOURCE_CHANGES ON) + set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) + IF (Spack_WORKAROUND) + #if we are explicitly using Spack for development, + #nuke the Spack compiler + SET(SPACK_CXX $ENV{SPACK_CXX}) + IF(SPACK_CXX) + SET(CMAKE_CXX_COMPILER ${SPACK_CXX} CACHE STRING "the C++ compiler" FORCE) + SET(ENV{CXX} ${SPACK_CXX}) + ENDIF() + ENDif() + IF(NOT DEFINED ${PROJECT_NAME}) + PROJECT(Kokkos CXX) + ENDIF() +ENDIF() - set(KOKKOS_CMAKE_VERBOSE True) - include(${KOKKOS_SRC_PATH}/cmake/kokkos_options.cmake) +IF (NOT CMAKE_SIZEOF_VOID_P) + STRING(FIND ${CMAKE_CXX_COMPILER} nvcc_wrapper FIND_IDX) + IF (NOT FIND_IDX STREQUAL -1) + MESSAGE(FATAL_ERROR "Kokkos did not configure correctly and failed to validate compiler. The most likely cause is CUDA linkage using nvcc_wrapper. Please ensure your CUDA environment is correctly configured.") + ELSE() + MESSAGE(FATAL_ERROR "Kokkos did not configure correctly and failed to validate compiler. The most likely cause is linkage errors during CMake compiler validation. Please consult the CMake error log shown below for the exact error during compiler validation") + ENDIF() +ELSEIF (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + MESSAGE(FATAL_ERROR "Kokkos assumes a 64-bit build; i.e., 8-byte pointers, but found ${CMAKE_SIZEOF_VOID_P}-byte pointers instead") +ENDIF() - include(${KOKKOS_SRC_PATH}/cmake/kokkos_settings.cmake) - #------------ GENERATE HEADER AND SOURCE FILES ------------------------------- - execute_process( - COMMAND ${KOKKOS_SETTINGS} make -f ${KOKKOS_SRC_PATH}/cmake/Makefile.generate_cmake_settings CXX=${CMAKE_CXX_COMPILER} PREFIX=${CMAKE_INSTALL_PREFIX} generate_build_settings - WORKING_DIRECTORY "${Kokkos_BINARY_DIR}" - OUTPUT_FILE ${Kokkos_BINARY_DIR}/core_src_make.out - RESULT_VARIABLE GEN_SETTINGS_RESULT - ) - if (GEN_SETTINGS_RESULT) - message(FATAL_ERROR "Kokkos settings generation failed:\n" - "${KOKKOS_SETTINGS} make -f ${KOKKOS_SRC_PATH}/cmake/Makefile.generate_cmake_settings CXX=${CMAKE_CXX_COMPILER} generate_build_settings") - endif() - include(${Kokkos_BINARY_DIR}/kokkos_generated_settings.cmake) - install(FILES ${Kokkos_BINARY_DIR}/kokkos_generated_settings.cmake DESTINATION lib/cmake/Kokkos) - install(FILES ${Kokkos_BINARY_DIR}/kokkos_generated_settings.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}) - string(REPLACE " " ";" KOKKOS_TPL_INCLUDE_DIRS "${KOKKOS_GMAKE_TPL_INCLUDE_DIRS}") - string(REPLACE " " ";" KOKKOS_TPL_LIBRARY_DIRS "${KOKKOS_GMAKE_TPL_LIBRARY_DIRS}") - string(REPLACE " " ";" KOKKOS_TPL_LIBRARY_NAMES "${KOKKOS_GMAKE_TPL_LIBRARY_NAMES}") - list(REMOVE_ITEM KOKKOS_TPL_INCLUDE_DIRS "") - list(REMOVE_ITEM KOKKOS_TPL_LIBRARY_DIRS "") - list(REMOVE_ITEM KOKKOS_TPL_LIBRARY_NAMES "") - set_kokkos_srcs(KOKKOS_SRC ${KOKKOS_SRC}) +set(Kokkos_VERSION_MAJOR 3) +set(Kokkos_VERSION_MINOR 0) +set(Kokkos_VERSION_PATCH 0) +set(Kokkos_VERSION "${Kokkos_VERSION_MAJOR}.${Kokkos_VERSION_MINOR}.${Kokkos_VERSION_PATCH}") - #------------ NOW BUILD ------------------------------------------------------ - include(${KOKKOS_SRC_PATH}/cmake/kokkos_build.cmake) +IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0") + MESSAGE(STATUS "Setting policy CMP0074 to use _ROOT variables") + CMAKE_POLICY(SET CMP0074 NEW) +ENDIF() - #------------ Add in Fake Tribits Handling to allow unit test builds- -------- +# Load either the real TriBITS or a TriBITS wrapper +# for certain utility functions that are universal (like GLOBAL_SET) +INCLUDE(${KOKKOS_SRC_PATH}/cmake/fake_tribits.cmake) - include(${KOKKOS_SRC_PATH}/cmake/tribits.cmake) +IF (Kokkos_ENABLE_CUDA AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14.0") + #If we are building CUDA, we have tricked CMake because we declare a CXX project + #If the default C++ standard for a given compiler matches the requested + #standard, then CMake just omits the -std flag in later versions of CMake + #This breaks CUDA compilation (CUDA compiler can have a different default + #-std then the underlying host compiler by itself). Setting this variable + #forces CMake to always add the -std flag even if it thinks it doesn't need it + GLOBAL_SET(CMAKE_CXX_STANDARD_DEFAULT 98) +ENDIF() - TRIBITS_PACKAGE_DECL(Kokkos) +# These are the variables we will append to as we go +# I really wish these were regular variables +# but scoping issues can make it difficult +GLOBAL_RESET(KOKKOS_COMPILE_OPTIONS) +GLOBAL_RESET(KOKKOS_LINK_OPTIONS) +GLOBAL_RESET(KOKKOS_CUDA_OPTIONS) +GLOBAL_RESET(KOKKOS_CUDAFE_OPTIONS) +GLOBAL_RESET(KOKKOS_XCOMPILER_OPTIONS) +# We need to append text here for making sure TPLs +# we import are available for an installed Kokkos +GLOBAL_RESET(KOKKOS_TPL_EXPORTS) +# We need these for controlling the exact -std flag +GLOBAL_RESET(KOKKOS_DONT_ALLOW_EXTENSIONS) +GLOBAL_RESET(KOKKOS_USE_CXX_EXTENSIONS) +GLOBAL_RESET(KOKKOS_CXX_STANDARD_FEATURE) - ADD_SUBDIRECTORY(core) - ADD_SUBDIRECTORY(containers) - ADD_SUBDIRECTORY(algorithms) +# Include a set of Kokkos-specific wrapper functions that +# will either call raw CMake or TriBITS +# These are functions like KOKKOS_INCLUDE_DIRECTORIES +INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_tribits.cmake) + +# The build environment setup goes in the following steps +# 1) Check all the enable options. This includes checking Kokkos_DEVICES +# 2) Check the compiler ID (type and version) +# 3) Check the CXX standard and select important CXX flags +# 4) Check for any third-party libraries (TPLs) like hwloc +# 5) Check if optimizing for a particular architecture and add arch-specific flags +KOKKOS_SETUP_BUILD_ENVIRONMENT() + +# Finish off the build +# 6) Recurse into subdirectories and configure individual libraries +# 7) Export and install targets + +OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF) +# Workaround for building position independent code. +IF(BUILD_SHARED_LIBS) + SET(CMAKE_POSITION_INDEPENDENT_CODE ON) +ENDIF() + +SET(KOKKOS_EXT_LIBRARIES Kokkos::kokkos Kokkos::kokkoscore Kokkos::kokkoscontainers Kokkos::kokkosalgorithms) +SET(KOKKOS_INT_LIBRARIES kokkos kokkoscore kokkoscontainers kokkosalgorithms) +SET_PROPERTY(GLOBAL PROPERTY KOKKOS_INT_LIBRARIES ${KOKKOS_INT_LIBRARIES}) + +GET_DIRECTORY_PROPERTY(HAS_PARENT PARENT_DIRECTORY) +IF (KOKKOS_HAS_TRILINOS) + SET(TRILINOS_INCDIR ${CMAKE_INSTALL_PREFIX}/${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}) + SET(KOKKOS_HEADER_DIR ${TRILINOS_INCDIR}) + SET(KOKKOS_IS_SUBDIRECTORY TRUE) +ELSEIF(HAS_PARENT) + SET(KOKKOS_HEADER_DIR "include/kokkos") + SET(KOKKOS_IS_SUBDIRECTORY TRUE) ELSE() + SET(KOKKOS_HEADER_DIR "${CMAKE_INSTALL_INCLUDEDIR}") + SET(KOKKOS_IS_SUBDIRECTORY FALSE) +ENDIF() + + + #------------------------------------------------------------------------------ # # A) Forward declare the package so that certain options are also defined for # subpackages -# -TRIBITS_PACKAGE_DECL(Kokkos) # ENABLE_SHADOWING_WARNINGS) +## This restores the old behavior of ProjectCompilerPostConfig.cmake +# It sets the CMAKE_CXX_FLAGS globally to those used by Kokkos +# We must do this before KOKKOS_PACKAGE_DECL +IF (KOKKOS_HAS_TRILINOS) + # Overwrite the old flags at the top-level + # Because Tribits doesn't use lists, it uses spaces for the list of CXX flags + # we have to match the annoying behavior + STRING(REPLACE ";" " " KOKKOSCORE_COMPILE_OPTIONS "${KOKKOS_COMPILE_OPTIONS}") + STRING(REPLACE ";" " " KOKKOSCORE_CUDA_OPTIONS "${KOKKOS_CUDA_OPTIONS}") + FOREACH(CUDAFE_FLAG ${KOKKOS_CUDAFE_OPTIONS}) + SET(KOKKOSCORE_CUDAFE_OPTIONS "${KOKKOSCORE_CUDAFE_OPTIONS} -Xcudafe ${CUDAFE_FLAG}") + ENDFOREACH() + FOREACH(XCOMP_FLAG ${KOKKOS_XCOMPILER_OPTIONS}) + SET(KOKKOSCORE_XCOMPILER_OPTIONS "${KOKKOSCORE_XCOMPILER_OPTIONS} -Xcompiler ${XCOMP_FLAG}") + ENDFOREACH() + SET(KOKKOSCORE_CXX_FLAGS "${KOKKOSCORE_COMPILE_OPTIONS} ${CMAKE_CXX${KOKKOS_CXX_STANDARD}_STANDARD_COMPILE_OPTION} ${KOKKOSCORE_CUDA_OPTIONS} ${KOKKOSCORE_CUDAFE_OPTIONS} ${KOKKOSCORE_XCOMPILER_OPTIONS}") + # Both parent scope and this package + # In ProjectCompilerPostConfig.cmake, we capture the "global" flags Trilinos wants in + # TRILINOS_TOPLEVEL_CXX_FLAGS + SET(CMAKE_CXX_FLAGS "${TRILINOS_TOPLEVEL_CXX_FLAGS} ${KOKKOSCORE_CXX_FLAGS}" PARENT_SCOPE) + SET(CMAKE_CXX_FLAGS "${TRILINOS_TOPLEVEL_CXX_FLAGS} ${KOKKOSCORE_CXX_FLAGS}") + #CMAKE_CXX_FLAGS will get added to Kokkos and Kokkos dependencies automatically here + #These flags get set up in KOKKOS_PACKAGE_DECL, which means they + #must be configured before KOKKOS_PACKAGE_DECL +ENDIF() + +KOKKOS_PACKAGE_DECL() #------------------------------------------------------------------------------ # -# B) Install Kokkos' build files +# D) Process the subpackages (subdirectories) for Kokkos # -# If using the Makefile-generated files, then need to set things up. -# Here, assume that TriBITS has been run from ProjectCompilerPostConfig.cmake -# and already generated KokkosCore_config.h and kokkos_generated_settings.cmake -# in the previously define Kokkos_GEN_DIR -# We need to copy them over to the correct place and source the cmake file - -if(NOT KOKKOS_LEGACY_TRIBITS) - set(Kokkos_GEN_DIR ${CMAKE_BINARY_DIR}) - file(COPY "${Kokkos_GEN_DIR}/KokkosCore_config.h" - DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" USE_SOURCE_PERMISSIONS) - install(FILES "${Kokkos_GEN_DIR}/KokkosCore_config.h" - DESTINATION include) - file(COPY "${Kokkos_GEN_DIR}/kokkos_generated_settings.cmake" - DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" USE_SOURCE_PERMISSIONS) - - include(${CMAKE_CURRENT_BINARY_DIR}/kokkos_generated_settings.cmake) - # Sources come from makefile-generated kokkos_generated_settings.cmake file - # Enable using the individual sources if needed - set_kokkos_srcs(KOKKOS_SRC ${KOKKOS_SRC}) -endif () - - -#------------------------------------------------------------------------------ -# -# C) Install Kokkos' executable scripts -# - -# nvcc_wrapper is Kokkos' wrapper for NVIDIA's NVCC CUDA compiler. -# Kokkos needs nvcc_wrapper in order to build. Other libraries and -# executables also need nvcc_wrapper. Thus, we need to install it. -# If the argument of DESTINATION is a relative path, CMake computes it -# as relative to ${CMAKE_INSTALL_PATH}. - -INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bin/nvcc_wrapper DESTINATION bin) - - -#------------------------------------------------------------------------------ -# -# D) Process the subpackages for Kokkos -# - -TRIBITS_PROCESS_SUBPACKAGES() +KOKKOS_PROCESS_SUBPACKAGES() #------------------------------------------------------------------------------ @@ -130,10 +220,39 @@ TRIBITS_PROCESS_SUBPACKAGES() # E) If Kokkos itself is enabled, process the Kokkos package # -TRIBITS_PACKAGE_DEF() +KOKKOS_PACKAGE_DEF() +KOKKOS_EXCLUDE_AUTOTOOLS_FILES() +KOKKOS_PACKAGE_POSTPROCESS() -TRIBITS_EXCLUDE_AUTOTOOLS_FILES() - -TRIBITS_PACKAGE_POSTPROCESS() +#We are ready to configure the header +CONFIGURE_FILE(cmake/KokkosCore_config.h.in KokkosCore_config.h @ONLY) +IF (NOT KOKKOS_HAS_TRILINOS) + ADD_LIBRARY(kokkos INTERFACE) + #Make sure in-tree projects can reference this as Kokkos:: + #to match the installed target names + ADD_LIBRARY(Kokkos::kokkos ALIAS kokkos) + TARGET_LINK_LIBRARIES(kokkos INTERFACE kokkoscore kokkoscontainers kokkosalgorithms) + KOKKOS_INTERNAL_ADD_LIBRARY_INSTALL(kokkos) +ENDIF() +INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_install.cmake) + +# nvcc_wrapper is Kokkos' wrapper for NVIDIA's NVCC CUDA compiler. +# Kokkos needs nvcc_wrapper in order to build. Other libraries and +# executables also need nvcc_wrapper. Thus, we need to install it. +# If the argument of DESTINATION is a relative path, CMake computes it +# as relative to ${CMAKE_INSTALL_PATH}. +INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bin/nvcc_wrapper DESTINATION ${CMAKE_INSTALL_BINDIR}) +INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/KokkosCore_config.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + +# Finally - if we are a subproject - make sure the enabled devices are visible +IF (HAS_PARENT) + FOREACH(DEV Kokkos_ENABLED_DEVICES) + #I would much rather not make these cache variables or global properties, but I can't + #make any guarantees on whether PARENT_SCOPE is good enough to make + #these variables visible where I need them + SET(Kokkos_ENABLE_${DEV} ON PARENT_SCOPE) + SET_PROPERTY(GLOBAL PROPERTY Kokkos_ENABLE_${DEV} ON) + ENDFOREACH() ENDIF() diff --git a/lib/kokkos/CONTRIBUTING.md b/lib/kokkos/CONTRIBUTING.md new file mode 100644 index 0000000000..b4f3057cef --- /dev/null +++ b/lib/kokkos/CONTRIBUTING.md @@ -0,0 +1,14 @@ +# Contributing to Kokkos + +## Pull Requests +We actively welcome pull requests. +1. Fork the repo and create your branch from `develop`. +2. If you've added code that should be tested, add tests. +3. If you've changed APIs, update the documentation. +4. Ensure the test suite passes. + +## Issues +We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue. + +## License +By contributing to Kokkos, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree. diff --git a/lib/kokkos/Copyright.txt b/lib/kokkos/Copyright.txt index 50b76995af..06184796b2 100644 --- a/lib/kokkos/Copyright.txt +++ b/lib/kokkos/Copyright.txt @@ -1,10 +1,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR diff --git a/lib/kokkos/LICENSE b/lib/kokkos/LICENSE index c68a8a2a9f..c6f17087d5 100644 --- a/lib/kokkos/LICENSE +++ b/lib/kokkos/LICENSE @@ -1,10 +1,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Kokkos is licensed under 3-clause BSD terms of use: @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR diff --git a/lib/kokkos/Makefile.kokkos b/lib/kokkos/Makefile.kokkos index e9ad57f0ae..fd96e14bb5 100644 --- a/lib/kokkos/Makefile.kokkos +++ b/lib/kokkos/Makefile.kokkos @@ -23,14 +23,16 @@ KOKKOS_DEBUG ?= "no" KOKKOS_USE_TPLS ?= "" # Options: c++11,c++14,c++1y,c++17,c++1z,c++2a KOKKOS_CXX_STANDARD ?= "c++11" -# Options: aggressive_vectorization,disable_profiling,enable_deprecated_code,disable_deprecated_code,enable_large_mem_tests +# Options: aggressive_vectorization,disable_profiling,enable_deprecated_code,disable_deprecated_code,enable_large_mem_tests,disable_complex_align KOKKOS_OPTIONS ?= "" # Option for setting ETI path KOKKOS_ETI_PATH ?= ${KOKKOS_PATH}/core/src/eti KOKKOS_CMAKE ?= "no" +KOKKOS_TRIBITS ?= "no" +KOKKOS_STANDALONE_CMAKE ?= "no" # Default settings specific options. -# Options: force_uvm,use_ldg,rdc,enable_lambda +# Options: force_uvm,use_ldg,rdc,enable_lambda,enable_constexpr KOKKOS_CUDA_OPTIONS ?= "enable_lambda" # Default settings specific options. @@ -47,7 +49,8 @@ kokkos_has_string=$(if $(findstring $2,$1),1,0) # Will return a 1 if /path/to/file exists kokkos_path_exists=$(if $(wildcard $1),1,0) -# Check for general settings. +# Check for general settings + KOKKOS_INTERNAL_ENABLE_DEBUG := $(call kokkos_has_string,$(KOKKOS_DEBUG),yes) KOKKOS_INTERNAL_ENABLE_CXX11 := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++11) KOKKOS_INTERNAL_ENABLE_CXX14 := $(call kokkos_has_string,$(KOKKOS_CXX_STANDARD),c++14) @@ -67,6 +70,7 @@ KOKKOS_INTERNAL_OPT_RANGE_AGGRESSIVE_VECTORIZATION := $(call kokkos_has_string,$ KOKKOS_INTERNAL_DISABLE_PROFILING := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_profiling) KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_deprecated_code) KOKKOS_INTERNAL_ENABLE_DEPRECATED_CODE := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_deprecated_code) +KOKKOS_INTERNAL_DISABLE_COMPLEX_ALIGN := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_complex_align) KOKKOS_INTERNAL_DISABLE_DUALVIEW_MODIFY_CHECK := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_dualview_modify_check) KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_PRINT := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_profile_load_print) KOKKOS_INTERNAL_ENABLE_LARGE_MEM_TESTS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_large_mem_tests) @@ -74,6 +78,7 @@ KOKKOS_INTERNAL_CUDA_USE_LDG := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS), KOKKOS_INTERNAL_CUDA_USE_UVM := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),force_uvm) KOKKOS_INTERNAL_CUDA_USE_RELOC := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),rdc) KOKKOS_INTERNAL_CUDA_USE_LAMBDA := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),enable_lambda) +KOKKOS_INTERNAL_CUDA_USE_CONSTEXPR := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),enable_constexpr) KOKKOS_INTERNAL_HPX_ENABLE_ASYNC_DISPATCH := $(call kokkos_has_string,$(KOKKOS_HPX_OPTIONS),enable_async_dispatch) KOKKOS_INTERNAL_ENABLE_ETI := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_eti) @@ -123,7 +128,7 @@ KOKKOS_INTERNAL_COMPILER_INTEL := $(call kokkos_has_string,$(KOKKOS_CXX_VE KOKKOS_INTERNAL_COMPILER_PGI := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),PGI) KOKKOS_INTERNAL_COMPILER_XL := $(strip $(shell $(CXX) -qversion 2>&1 | grep XL | wc -l)) KOKKOS_INTERNAL_COMPILER_CRAY := $(strip $(shell $(CXX) -craype-verbose 2>&1 | grep "CC-" | wc -l)) -KOKKOS_INTERNAL_COMPILER_NVCC := $(strip $(shell export OMPI_CXX=$(OMPI_CXX); export MPICH_CXX=$(MPICH_CXX); $(CXX) --version 2>&1 | grep nvcc | wc -l)) +KOKKOS_INTERNAL_COMPILER_NVCC := $(strip $(shell export OMPI_CXX=$(OMPI_CXX); export MPICH_CXX=$(MPICH_CXX); echo "$(shell $(CXX) --version 2>&1 | grep nvcc | wc -l)>0" | bc)) KOKKOS_INTERNAL_COMPILER_CLANG := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),clang) KOKKOS_INTERNAL_COMPILER_APPLE_CLANG := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),Apple LLVM) KOKKOS_INTERNAL_COMPILER_HCC := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),HCC) @@ -383,10 +388,10 @@ endif # Generating the list of Flags. -#CPPFLAGS is now unused KOKKOS_CPPFLAGS = +KOKKOS_LIBDIRS = ifneq ($(KOKKOS_CMAKE), yes) - KOKKOS_CXXFLAGS = -I./ -I$(KOKKOS_PATH)/core/src -I$(KOKKOS_PATH)/containers/src -I$(KOKKOS_PATH)/algorithms/src -I$(KOKKOS_ETI_PATH) + KOKKOS_CPPFLAGS = -I./ -I$(KOKKOS_PATH)/core/src -I$(KOKKOS_PATH)/containers/src -I$(KOKKOS_PATH)/algorithms/src -I$(KOKKOS_ETI_PATH) endif KOKKOS_TPL_INCLUDE_DIRS = KOKKOS_TPL_LIBRARY_DIRS = @@ -399,7 +404,7 @@ endif KOKKOS_LIBS = -ldl KOKKOS_TPL_LIBRARY_NAMES += dl ifneq ($(KOKKOS_CMAKE), yes) - KOKKOS_LDFLAGS = -L$(shell pwd) + KOKKOS_LIBDIRS = -L$(shell pwd) # CXXLDFLAGS is used together with CXXFLAGS in a combined compile/link command KOKKOS_CXXLDFLAGS = -L$(shell pwd) endif @@ -492,28 +497,38 @@ ifeq ($(KOKKOS_INTERNAL_USE_ISA_POWERPCBE), 1) tmp := $(call kokkos_append_header,"\#endif") endif +#only add the c++ standard flags if this is not CMake tmp := $(call kokkos_append_header,"/* General Settings */") ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX11), 1) +ifneq ($(KOKKOS_STANDALONE_CMAKE), yes) KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX11_FLAG) +endif tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CXX11") endif ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX14), 1) +ifneq ($(KOKKOS_STANDALONE_CMAKE), yes) KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX14_FLAG) +endif tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CXX14") endif ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX1Y), 1) + #I cannot make CMake add this in a good way - so add it here KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX1Y_FLAG) tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CXX14") endif ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX17), 1) +ifneq ($(KOKKOS_STANDALONE_CMAKE), yes) KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX17_FLAG) +endif tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CXX17") endif ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX1Z), 1) + #I cannot make CMake add this in a good way - so add it here KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX1Z_FLAG) tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CXX17") endif ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX2A), 1) + #I cannot make CMake add this in a good way - so add it here KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX2A_FLAG) tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CXX20") endif @@ -531,23 +546,26 @@ ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1) tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK") endif endif +ifeq ($(KOKKOS_INTERNAL_DISABLE_COMPLEX_ALIGN), 0) + tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_COMPLEX_ALIGN") +endif ifeq ($(KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_PRINT), 1) tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_PROFILING_LOAD_PRINT") endif ifeq ($(KOKKOS_INTERNAL_USE_HWLOC), 1) - ifneq ($(HWLOC_PATH),) - ifneq ($(KOKKOS_CMAKE), yes) - KOKKOS_CXXFLAGS += -I$(HWLOC_PATH)/include + ifneq ($(KOKKOS_CMAKE), yes) + ifneq ($(HWLOC_PATH),) + KOKKOS_CPPFLAGS += -I$(HWLOC_PATH)/include + KOKKOS_LIBDIRS += -L$(HWLOC_PATH)/lib + KOKKOS_CXXLDFLAGS += -L$(HWLOC_PATH)/lib + KOKKOS_TPL_INCLUDE_DIRS += $(HWLOC_PATH)/include + KOKKOS_TPL_LIBRARY_DIRS += $(HWLOC_PATH)/lib endif - KOKKOS_LDFLAGS += -L$(HWLOC_PATH)/lib - KOKKOS_CXXLDFLAGS += -L$(HWLOC_PATH)/lib - KOKKOS_TPL_INCLUDE_DIRS += $(HWLOC_PATH)/include - KOKKOS_TPL_LIBRARY_DIRS += $(HWLOC_PATH)/lib + KOKKOS_LIBS += -lhwloc + KOKKOS_TPL_LIBRARY_NAMES += hwloc endif - KOKKOS_LIBS += -lhwloc - KOKKOS_TPL_LIBRARY_NAMES += hwloc tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_HWLOC") endif @@ -558,17 +576,17 @@ ifeq ($(KOKKOS_INTERNAL_USE_LIBRT), 1) endif ifeq ($(KOKKOS_INTERNAL_USE_MEMKIND), 1) - ifneq ($(MEMKIND_PATH),) - ifneq ($(KOKKOS_CMAKE), yes) - KOKKOS_CXXFLAGS += -I$(MEMKIND_PATH)/include + ifneq ($(KOKKOS_CMAKE), yes) + ifneq ($(MEMKIND_PATH),) + KOKKOS_CPPFLAGS += -I$(MEMKIND_PATH)/include + KOKKOS_LIBDIRS += -L$(MEMKIND_PATH)/lib + KOKKOS_CXXLDFLAGS += -L$(MEMKIND_PATH)/lib + KOKKOS_TPL_INCLUDE_DIRS += $(MEMKIND_PATH)/include + KOKKOS_TPL_LIBRARY_DIRS += $(MEMKIND_PATH)/lib endif - KOKKOS_LDFLAGS += -L$(MEMKIND_PATH)/lib - KOKKOS_CXXLDFLAGS += -L$(MEMKIND_PATH)/lib - KOKKOS_TPL_INCLUDE_DIRS += $(MEMKIND_PATH)/include - KOKKOS_TPL_LIBRARY_DIRS += $(MEMKIND_PATH)/lib + KOKKOS_LIBS += -lmemkind -lnuma + KOKKOS_TPL_LIBRARY_NAMES += memkind numa endif - KOKKOS_LIBS += -lmemkind -lnuma - KOKKOS_TPL_LIBRARY_NAMES += memkind numa tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_HBWSPACE") endif @@ -580,9 +598,6 @@ ifeq ($(KOKKOS_INTERNAL_USE_HPX), 0) ifeq ($(KOKKOS_INTERNAL_ENABLE_DEPRECATED_CODE), 1) tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_DEPRECATED_CODE") endif - ifeq ($(KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE), 0) - tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_DEPRECATED_CODE") - endif endif ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1) @@ -648,6 +663,21 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) endif endif + ifeq ($(KOKKOS_INTERNAL_CUDA_USE_CONSTEXPR), 1) + ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1) + ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_NVCC_VERSION) -ge 80; echo $$?),0) + tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CUDA_CONSTEXPR") + KOKKOS_CXXFLAGS += -expt-relaxed-constexpr + else + $(warning Warning: Cuda relaxed constexpr support was requested but NVCC version is too low. This requires NVCC for Cuda version 8.0 or higher. Disabling relaxed constexpr support now.) + endif + endif + + ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) + tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CUDA_CONSTEXPR") + endif + endif + ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1) tmp := $(call kokkos_append_header,"\#define KOKKOS_IMPL_CUDA_CLANG_WORKAROUND") endif @@ -1089,15 +1119,13 @@ ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1) endif KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp) ifneq ($(CUDA_PATH),) - ifneq ($(KOKKOS_CMAKE), yes) - KOKKOS_CXXFLAGS += -I$(CUDA_PATH)/include - endif + KOKKOS_CPPLAGS += -I$(CUDA_PATH)/include ifeq ($(call kokkos_path_exists,$(CUDA_PATH)/lib64), 1) - KOKKOS_LDFLAGS += -L$(CUDA_PATH)/lib64 + KOKKOS_LIBDIRS += -L$(CUDA_PATH)/lib64 KOKKOS_CXXLDFLAGS += -L$(CUDA_PATH)/lib64 KOKKOS_TPL_LIBRARY_DIRS += $(CUDA_PATH)/lib64 else ifeq ($(call kokkos_path_exists,$(CUDA_PATH)/lib), 1) - KOKKOS_LDFLAGS += -L$(CUDA_PATH)/lib + KOKKOS_LIBDIRS += -L$(CUDA_PATH)/lib KOKKOS_CXXLDFLAGS += -L$(CUDA_PATH)/lib KOKKOS_TPL_LIBRARY_DIRS += $(CUDA_PATH)/lib else @@ -1153,17 +1181,17 @@ endif ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1) KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Qthreads/*.cpp) KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Qthreads/*.hpp) - ifneq ($(QTHREADS_PATH),) - ifneq ($(KOKKOS_CMAKE), yes) - KOKKOS_CXXFLAGS += -I$(QTHREADS_PATH)/include + ifneq ($(KOKKOS_CMAKE), yes) + ifneq ($(QTHREADS_PATH),) + KOKKOS_CPPFLAGS += -I$(QTHREADS_PATH)/include + KOKKOS_LIBDIRS += -L$(QTHREADS_PATH)/lib + KOKKOS_CXXLDFLAGS += -L$(QTHREADS_PATH)/lib + KOKKOS_TPL_INCLUDE_DIRS += $(QTHREADS_PATH)/include + KOKKOS_TPL_LIBRARY_DIRS += $(QTHREADS_PATH)/lib64 endif - KOKKOS_LDFLAGS += -L$(QTHREADS_PATH)/lib - KOKKOS_CXXLDFLAGS += -L$(QTHREADS_PATH)/lib - KOKKOS_TPL_INCLUDE_DIRS += $(QTHREADS_PATH)/include - KOKKOS_TPL_LIBRARY_DIRS += $(QTHREADS_PATH)/lib64 + KOKKOS_LIBS += -lqthread + KOKKOS_TPL_LIBRARY_NAMES += qthread endif - KOKKOS_LIBS += -lqthread - KOKKOS_TPL_LIBRARY_NAMES += qthread endif ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1) @@ -1173,21 +1201,21 @@ ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1) ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1) KOKKOS_CXXFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --cflags hpx_application_debug) KOKKOS_CXXLDFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --libs hpx_application_debug) - KOKKOS_LDFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --libs hpx_application_debug) + KOKKOS_LIBS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --libs hpx_application_debug) else KOKKOS_CXXFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --cflags hpx_application) KOKKOS_CXXLDFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --libs hpx_application) - KOKKOS_LDFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --libs hpx_application) + KOKKOS_LIBS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --libs hpx_application) endif else ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1) KOKKOS_CXXFLAGS += $(shell pkg-config --cflags hpx_application_debug) KOKKOS_CXXLDFLAGS += $(shell pkg-config --libs hpx_application_debug) - KOKKOS_LDFLAGS += $(shell pkg-config --libs hpx_application_debug) + KOKKOS_LIBS += $(shell pkg-config --libs hpx_application_debug) else KOKKOS_CXXFLAGS += $(shell pkg-config --cflags hpx_application) KOKKOS_CXXLDFLAGS += $(shell pkg-config --libs hpx_application) - KOKKOS_LDFLAGS += $(shell pkg-config --libs hpx_application) + KOKKOS_LIBS += $(shell pkg-config --libs hpx_application) endif endif KOKKOS_TPL_LIBRARY_NAMES += hpx @@ -1248,4 +1276,16 @@ libkokkos.a: $(KOKKOS_OBJ_LINK) $(KOKKOS_SRC) $(KOKKOS_HEADERS) ar cr libkokkos.a $(KOKKOS_OBJ_LINK) ranlib libkokkos.a +print-cxx-flags: + echo "$(KOKKOS_CXXFLAGS)" + KOKKOS_LINK_DEPENDS=libkokkos.a + +#we have carefully separated LDFLAGS from LIBS and LIBDIRS +#we have also separated CPPFLAGS from CXXFLAGS +#if this is not cmake, for backwards compatibility +#we just jam everything together into the CXXFLAGS and LDFLAGS +ifneq ($(KOKKOS_CMAKE), yes) + KOKKOS_CXXFLAGS += $(KOKKOS_CPPFLAGS) + KOKKOS_LDFLAGS += $(KOKKOS_LIBDIRS) +endif diff --git a/lib/kokkos/Makefile.targets b/lib/kokkos/Makefile.targets index e7d5a3c907..0a1f522016 100644 --- a/lib/kokkos/Makefile.targets +++ b/lib/kokkos/Makefile.targets @@ -6,6 +6,8 @@ Kokkos_CPUDiscovery.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_CPUDiscovery.cpp Kokkos_Error.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_Error.cpp $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_Error.cpp +Kokkos_Stacktrace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_Stacktrace.cpp + $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_Stacktrace.cpp Kokkos_ExecPolicy.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_ExecPolicy.cpp $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_ExecPolicy.cpp Kokkos_HostSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_HostSpace.cpp diff --git a/lib/kokkos/README b/lib/kokkos/README deleted file mode 100644 index cb6ceb5581..0000000000 --- a/lib/kokkos/README +++ /dev/null @@ -1,193 +0,0 @@ -Kokkos Core implements a programming model in C++ for writing performance portable -applications targeting all major HPC platforms. For that purpose it provides -abstractions for both parallel execution of code and data management. -Kokkos is designed to target complex node architectures with N-level memory -hierarchies and multiple types of execution resources. It currently can use -OpenMP, Pthreads and CUDA as backend programming models. - -Kokkos Core is part of the Kokkos C++ Performance Portability Programming EcoSystem, -which also provides math kernels (https://github.com/kokkos/kokkos-kernels), as well as -profiling and debugging tools (https://github.com/kokkos/kokkos-tools). - -# Learning about Kokkos - -A programming guide can be found on the Wiki, the API reference is under development. - -For questions find us on Slack: https://kokkosteam.slack.com or open a github issue. - -For non-public questions send an email to -crtrott(at)sandia.gov - -A separate repository with extensive tutorial material can be found under -https://github.com/kokkos/kokkos-tutorials. - -Furthermore, the 'example/tutorial' directory provides step by step tutorial -examples which explain many of the features of Kokkos. They work with -simple Makefiles. To build with g++ and OpenMP simply type 'make' -in the 'example/tutorial' directory. This will build all examples in the -subfolders. To change the build options refer to the Programming Guide -in the compilation section. - -To learn more about Kokkos consider watching one of our presentations: -* GTC 2015: - - http://on-demand.gputechconf.com/gtc/2015/video/S5166.html - - http://on-demand.gputechconf.com/gtc/2015/presentation/S5166-H-Carter-Edwards.pdf - - -# Contributing to Kokkos - -We are open and try to encourage contributions from external developers. -To do so please first open an issue describing the contribution and then issue -a pull request against the develop branch. For larger features it may be good -to get guidance from the core development team first through the github issue. - -Note that Kokkos Core is licensed under standard 3-clause BSD terms of use. -Which means contributing to Kokkos allows anyone else to use your contributions -not just for public purposes but also for closed source commercial projects. -For specifics see the LICENSE file contained in the repository or distribution. - -# Requirements - -### Primary tested compilers on X86 are: - * GCC 4.8.4 - * GCC 4.9.3 - * GCC 5.1.0 - * GCC 5.5.0 - * GCC 6.1.0 - * GCC 7.2.0 - * GCC 7.3.0 - * GCC 8.1.0 - * Intel 15.0.2 - * Intel 16.0.1 - * Intel 17.0.1 - * Intel 17.4.196 - * Intel 18.2.128 - * Clang 3.6.1 - * Clang 3.7.1 - * Clang 3.8.1 - * Clang 3.9.0 - * Clang 4.0.0 - * Clang 6.0.0 for CUDA (CUDA Toolkit 9.0) - * Clang 7.0.0 for CUDA (CUDA Toolkit 9.1) - * PGI 18.7 - * NVCC 7.5 for CUDA (with gcc 4.8.4) - * NVCC 8.0.44 for CUDA (with gcc 5.3.0) - * NVCC 9.1 for CUDA (with gcc 6.1.0) - * NVCC 9.2 for CUDA (with gcc 7.2.0) - * NVCC 10.0 for CUDA (with gcc 7.4.0) - -### Primary tested compilers on Power 8 are: - * GCC 6.4.0 (OpenMP,Serial) - * GCC 7.2.0 (OpenMP,Serial) - * IBM XL 16.1.0 (OpenMP, Serial) - * NVCC 9.2.88 for CUDA (with gcc 7.2.0 and XL 16.1.0) - -### Primary tested compilers on Intel KNL are: - * Intel 16.4.258 (with gcc 4.7.2) - * Intel 17.2.174 (with gcc 4.9.3) - * Intel 18.2.199 (with gcc 4.9.3) - -### Primary tested compilers on ARM (Cavium ThunderX2) - * GCC 7.2.0 - * ARM/Clang 18.4.0 - -### Other compilers working: - * X86: - - Cygwin 2.1.0 64bit with gcc 4.9.3 - - GCC 8.1.0 (not warning free) - -### Known non-working combinations: - * Power8: - - Pthreads backend - * ARM - - Pthreads backend - - -Primary tested compiler are passing in release mode -with warnings as errors. They also are tested with a comprehensive set of -backend combinations (i.e. OpenMP, Pthreads, Serial, OpenMP+Serial, ...). -We are using the following set of flags: -GCC: -Wall -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits - -Wignored-qualifiers -Wempty-body -Wclobbered -Wuninitialized -Intel: -Wall -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits -Wuninitialized -Clang: -Wall -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits -Wuninitialized -NVCC: -Wall -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits -Wuninitialized - -Other compilers are tested occasionally, in particular when pushing from develop to -master branch, without -Werror and only for a select set of backends. - -# Running Unit Tests - -To run the unit tests create a build directory and run the following commands - -KOKKOS_PATH/generate_makefile.bash -make build-test -make test - -Run KOKKOS_PATH/generate_makefile.bash --help for more detailed options such as -changing the device type for which to build. - -# Installing the library - -To install Kokkos as a library create a build directory and run the following - -KOKKOS_PATH/generate_makefile.bash --prefix=INSTALL_PATH -make kokkoslib -make install - -KOKKOS_PATH/generate_makefile.bash --help for more detailed options such as -changing the device type for which to build. - -Note that in many cases it is preferable to build Kokkos inline with an -application. The main reason is that you may otherwise need many different -configurations of Kokkos installed depending on the required compile time -features an application needs. For example there is only one default -execution space, which means you need different installations to have OpenMP -or Pthreads as the default space. Also for the CUDA backend there are certain -choices, such as allowing relocatable device code, which must be made at -installation time. Building Kokkos inline uses largely the same process -as compiling an application against an installed Kokkos library. See for -example benchmarks/bytes_and_flops/Makefile which can be used with an installed -library and for an inline build. - -### CMake - -Kokkos supports being build as part of a CMake applications. An example can -be found in example/cmake_build. - -# Kokkos and CUDA UVM - -Kokkos does support UVM as a specific memory space called CudaUVMSpace. -Allocations made with that space are accessible from host and device. -You can tell Kokkos to use that as the default space for Cuda allocations. -In either case UVM comes with a number of restrictions: -(i) You can't access allocations on the host while a kernel is potentially -running. This will lead to segfaults. To avoid that you either need to -call Kokkos::Cuda::fence() (or just Kokkos::fence()), after kernels, or -you can set the environment variable CUDA_LAUNCH_BLOCKING=1. -Furthermore in multi socket multi GPU machines without NVLINK, UVM defaults -to using zero copy allocations for technical reasons related to using multiple -GPUs from the same process. If an executable doesn't do that (e.g. each -MPI rank of an application uses a single GPU [can be the same GPU for -multiple MPI ranks]) you can set CUDA_MANAGED_FORCE_DEVICE_ALLOC=1. -This will enforce proper UVM allocations, but can lead to errors if -more than a single GPU is used by a single process. - - -# Citing Kokkos - -If you publish work which mentions Kokkos, please cite the following paper: - -@article{CarterEdwards20143202, -title = "Kokkos: Enabling manycore performance portability through polymorphic memory access patterns ", -journal = "Journal of Parallel and Distributed Computing ", -volume = "74", -number = "12", -pages = "3202 - 3216", -year = "2014", -note = "Domain-Specific Languages and High-Level Frameworks for High-Performance Computing ", -issn = "0743-7315", -doi = "https://doi.org/10.1016/j.jpdc.2014.07.003", -url = "http://www.sciencedirect.com/science/article/pii/S0743731514001257", -author = "H. Carter Edwards and Christian R. Trott and Daniel Sunderland" -} diff --git a/lib/kokkos/README.md b/lib/kokkos/README.md new file mode 100644 index 0000000000..322dabfdab --- /dev/null +++ b/lib/kokkos/README.md @@ -0,0 +1,299 @@ +![Kokkos](https://avatars2.githubusercontent.com/u/10199860?s=200&v=4) + +# Kokkos: Core Libraries + +Kokkos Core implements a programming model in C++ for writing performance portable +applications targeting all major HPC platforms. For that purpose it provides +abstractions for both parallel execution of code and data management. +Kokkos is designed to target complex node architectures with N-level memory +hierarchies and multiple types of execution resources. It currently can use +CUDA, HPX, OpenMP and Pthreads as backend programming models with several other +backends in development. + +Kokkos Core is part of the Kokkos C++ Performance Portability Programming EcoSystem, +which also provides math kernels (https://github.com/kokkos/kokkos-kernels), as well as +profiling and debugging tools (https://github.com/kokkos/kokkos-tools). + +# Learning about Kokkos + +A programming guide can be found on the Wiki, the API reference is under development. + +For questions find us on Slack: https://kokkosteam.slack.com or open a github issue. + +For non-public questions send an email to +crtrott(at)sandia.gov + +A separate repository with extensive tutorial material can be found under +https://github.com/kokkos/kokkos-tutorials. + +Furthermore, the 'example/tutorial' directory provides step by step tutorial +examples which explain many of the features of Kokkos. They work with +simple Makefiles. To build with g++ and OpenMP simply type 'make' +in the 'example/tutorial' directory. This will build all examples in the +subfolders. To change the build options refer to the Programming Guide +in the compilation section. + +To learn more about Kokkos consider watching one of our presentations: +* GTC 2015: + - http://on-demand.gputechconf.com/gtc/2015/video/S5166.html + - http://on-demand.gputechconf.com/gtc/2015/presentation/S5166-H-Carter-Edwards.pdf + + +# Contributing to Kokkos + +We are open and try to encourage contributions from external developers. +To do so please first open an issue describing the contribution and then issue +a pull request against the develop branch. For larger features it may be good +to get guidance from the core development team first through the github issue. + +Note that Kokkos Core is licensed under standard 3-clause BSD terms of use. +Which means contributing to Kokkos allows anyone else to use your contributions +not just for public purposes but also for closed source commercial projects. +For specifics see the LICENSE file contained in the repository or distribution. + +# Requirements + +### Primary tested compilers on X86 are: +* GCC 4.8.4 +* GCC 4.9.3 +* GCC 5.1.0 +* GCC 5.4.0 +* GCC 5.5.0 +* GCC 6.1.0 +* GCC 7.2.0 +* GCC 7.3.0 +* GCC 8.1.0 +* Intel 15.0.2 +* Intel 16.0.1 +* Intel 17.0.1 +* Intel 17.4.196 +* Intel 18.2.128 +* Clang 3.6.1 +* Clang 3.7.1 +* Clang 3.8.1 +* Clang 3.9.0 +* Clang 4.0.0 +* Clang 6.0.0 for CUDA (CUDA Toolkit 9.0) +* Clang 7.0.0 for CUDA (CUDA Toolkit 9.1) +* Clang 8.0.0 for CUDA (CUDA Toolkit 9.2) +* PGI 18.7 +* NVCC 9.1 for CUDA (with gcc 6.1.0) +* NVCC 9.2 for CUDA (with gcc 7.2.0) +* NVCC 10.0 for CUDA (with gcc 7.4.0) +* NVCC 10.1 for CUDA (with gcc 7.4.0) + +### Primary tested compilers on Power 8 are: +* GCC 6.4.0 (OpenMP,Serial) +* GCC 7.2.0 (OpenMP,Serial) +* IBM XL 16.1.0 (OpenMP, Serial) +* NVCC 9.2.88 for CUDA (with gcc 7.2.0 and XL 16.1.0) + +### Primary tested compilers on Intel KNL are: +* Intel 16.4.258 (with gcc 4.7.2) +* Intel 17.2.174 (with gcc 4.9.3) +* Intel 18.2.199 (with gcc 4.9.3) + +### Primary tested compilers on ARM (Cavium ThunderX2) +* GCC 7.2.0 +* ARM/Clang 18.4.0 + +### Other compilers working: +* X86: + * Cygwin 2.1.0 64bit with gcc 4.9.3 + * GCC 8.1.0 (not warning free) + +### Known non-working combinations: +* Power8: + * Pthreads backend +* ARM + * Pthreads backend + + +Primary tested compiler are passing in release mode +with warnings as errors. They also are tested with a comprehensive set of +backend combinations (i.e. OpenMP, Pthreads, Serial, OpenMP+Serial, ...). +We are using the following set of flags: +* GCC: + ```` + -Wall -Wshadow -pedantic + -Werror -Wsign-compare -Wtype-limits + -Wignored-qualifiers -Wempty-body + -Wclobbered -Wuninitialized + ```` +* Intel: + ```` + -Wall -Wshadow -pedantic + -Werror -Wsign-compare -Wtype-limits + -Wuninitialized + ```` +* Clang: + ```` + -Wall -Wshadow -pedantic + -Werror -Wsign-compare -Wtype-limits + -Wuninitialized + ```` + +* NVCC: + ```` + -Wall -Wshadow -pedantic + -Werror -Wsign-compare -Wtype-limits + -Wuninitialized + ```` + +Other compilers are tested occasionally, in particular when pushing from develop to +master branch. These are tested less rigorously without `-Werror` and only for a select set of backends. + +# Building and Installing Kokkos +Kokkos provide a CMake build system and a raw Makefile build system. +The CMake build system is strongly encouraged and will be the most rigorously supported in future releases. +Full details are given in the [build instructions](BUILD.md). Basic setups are shown here: + +## CMake + +The best way to install Kokkos is using the CMake build system. Assuming Kokkos lives in `$srcdir`: +```` +cmake $srcdir \ + -DCMAKE_CXX_COMPILER=$path_to_compiler \ + -DCMAKE_INSTALL_PREFIX=$path_to_install \ + -DKokkos_ENABLE_OPENMP=On \ + -DKokkos_ARCH_HSW=On \ + -DKokkos_ENABLE_HWLOC=On \ + -DKokkos_HWLOC_DIR=$path_to_hwloc +```` +then simply type `make install`. The Kokkos CMake package will then be installed in `$path_to_install` to be used by downstream packages. + +To validate the Kokkos build, configure with +```` + -DKokkos_ENABLE_TESTS=On +```` +and run `make test` after completing the build. + +For your CMake project using Kokkos, code such as the following: + +```` +find_package(Kokkos) +... +target_link_libraries(myTarget Kokkos::kokkos) +```` +should be added to your CMakeLists.txt. Your configure should additionally include +```` +-DKokkos_DIR=$path_to_install/cmake/lib/Kokkos +```` +or +```` +-DKokkos_ROOT=$path_to_install +```` +for the install location given above. + +## Spack +An alternative to manually building with the CMake is to use the Spack package manager. +To do so, download the `kokkos-spack` git repo and add to the package list: +```` +spack repo add $path-to-kokkos-spack +```` +A basic installation would be done as: +```` +spack install kokkos +```` +Spack allows options and and compilers to be tuned in the install command. +```` +spack install kokkos@3.0 %gcc@7.3.0 +openmp +```` +This example illustrates the three most common parameters to Spack: +* Variants: specified with, e.g. `+openmp`, this activates (or deactivates with, e.g. `~openmp`) certain options. +* Version: immediately following `kokkos` the `@version` can specify a particular Kokkos to build +* Compiler: a default compiler will be chosen if not specified, but an exact compiler version can be given with the `%`option. + +For a complete list of Kokkos options, run: +```` +spack info kokkos +```` +Spack currently installs packages to a location determined by a unique hash. This hash name is not really "human readable". +Generally, Spack usage should never really require you to reference the computer-generated unique install folder. +More details are given in the [build instructions](BUILD.md). If you must know, you can locate Spack Kokkos installations with: +```` +spack find -p kokkos ... +```` +where `...` is the unique spec identifying the particular Kokkos configuration and version. + + +## Raw Makefile +A bash script is provided to generate raw makefiles. +To install Kokkos as a library create a build directory and run the following +```` +$KOKKOS_PATH/generate_makefile.bash --prefix=$path_to_install +```` +Once the Makefile is generated, run: +```` +make kokkoslib +make install +```` +To additionally run the unit tests: +```` +make build-test +make test +```` +Run `generate_makefile.bash --help` for more detailed options such as +changing the device type for which to build. + +## Inline Builds vs. Installed Package +For individual projects, it may be preferable to build Kokkos inline rather than link to an installed package. +The main reason is that you may otherwise need many different +configurations of Kokkos installed depending on the required compile time +features an application needs. For example there is only one default +execution space, which means you need different installations to have OpenMP +or Pthreads as the default space. Also for the CUDA backend there are certain +choices, such as allowing relocatable device code, which must be made at +installation time. Building Kokkos inline uses largely the same process +as compiling an application against an installed Kokkos library. + +For CMake, this means copying over the Kokkos source code into your project and adding `add_subdirectory(kokkos)` to your CMakeLists.txt. + +For raw Makefiles, see the example benchmarks/bytes_and_flops/Makefile which can be used with an installed library and or an inline build. + +# Kokkos and CUDA UVM + +Kokkos does support UVM as a specific memory space called CudaUVMSpace. +Allocations made with that space are accessible from host and device. +You can tell Kokkos to use that as the default space for Cuda allocations. +In either case UVM comes with a number of restrictions: +* You can't access allocations on the host while a kernel is potentially +running. This will lead to segfaults. To avoid that you either need to +call Kokkos::Cuda::fence() (or just Kokkos::fence()), after kernels, or +you can set the environment variable CUDA_LAUNCH_BLOCKING=1. +* In multi socket multi GPU machines without NVLINK, UVM defaults +to using zero copy allocations for technical reasons related to using multiple +GPUs from the same process. If an executable doesn't do that (e.g. each +MPI rank of an application uses a single GPU [can be the same GPU for +multiple MPI ranks]) you can set CUDA_MANAGED_FORCE_DEVICE_ALLOC=1. +This will enforce proper UVM allocations, but can lead to errors if +more than a single GPU is used by a single process. + + +# Citing Kokkos + +If you publish work which mentions Kokkos, please cite the following paper: + +```` +@article{CarterEdwards20143202, + title = "Kokkos: Enabling manycore performance portability through polymorphic memory access patterns ", + journal = "Journal of Parallel and Distributed Computing ", + volume = "74", + number = "12", + pages = "3202 - 3216", + year = "2014", + note = "Domain-Specific Languages and High-Level Frameworks for High-Performance Computing ", + issn = "0743-7315", + doi = "https://doi.org/10.1016/j.jpdc.2014.07.003", + url = "http://www.sciencedirect.com/science/article/pii/S0743731514001257", + author = "H. Carter Edwards and Christian R. Trott and Daniel Sunderland" +} +```` + +##### [LICENSE](https://github.com/kokkos/kokkos/blob/master/LICENSE) + +[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) + +Under the terms of Contract DE-NA0003525 with NTESS, +the U.S. Government retains certain rights in this software. + diff --git a/lib/kokkos/algorithms/CMakeLists.txt b/lib/kokkos/algorithms/CMakeLists.txt index 507c9f2fdb..38747c152c 100644 --- a/lib/kokkos/algorithms/CMakeLists.txt +++ b/lib/kokkos/algorithms/CMakeLists.txt @@ -1,12 +1,12 @@ - - -TRIBITS_SUBPACKAGE(Algorithms) - -IF(KOKKOS_HAS_TRILINOS) - ADD_SUBDIRECTORY(src) -ENDIF() - -TRIBITS_ADD_TEST_DIRECTORIES(unit_tests) -#TRIBITS_ADD_TEST_DIRECTORIES(performance_tests) - -TRIBITS_SUBPACKAGE_POSTPROCESS() + + +KOKKOS_SUBPACKAGE(Algorithms) + +ADD_SUBDIRECTORY(src) + +KOKKOS_ADD_TEST_DIRECTORIES(unit_tests) + +KOKKOS_SUBPACKAGE_POSTPROCESS() + + + diff --git a/lib/kokkos/algorithms/src/CMakeLists.txt b/lib/kokkos/algorithms/src/CMakeLists.txt index dfbf3323c2..5afd319fcc 100644 --- a/lib/kokkos/algorithms/src/CMakeLists.txt +++ b/lib/kokkos/algorithms/src/CMakeLists.txt @@ -1,8 +1,9 @@ -TRIBITS_CONFIGURE_FILE(${PACKAGE_NAME}_config.h) +KOKKOS_CONFIGURE_FILE(${PACKAGE_NAME}_config.h) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +#I have to leave these here for tribits +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) #----------------------------------------------------------------------------- @@ -12,10 +13,18 @@ LIST(APPEND HEADERS ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}_config.h) #----------------------------------------------------------------------------- -TRIBITS_ADD_LIBRARY( - kokkosalgorithms - HEADERS ${HEADERS} - SOURCES ${SOURCES} - DEPLIBS - ) +# We have to pass the sources in here for Tribits +# These will get ignored for standalone CMake and a true interface library made +KOKKOS_ADD_INTERFACE_LIBRARY( + kokkosalgorithms + HEADERS ${HEADERS} + SOURCES ${SOURCES} +) +KOKKOS_LIB_INCLUDE_DIRECTORIES(kokkosalgorithms + ${KOKKOS_TOP_BUILD_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + + diff --git a/lib/kokkos/algorithms/src/Kokkos_Random.hpp b/lib/kokkos/algorithms/src/Kokkos_Random.hpp index da781de4fe..078db18edd 100644 --- a/lib/kokkos/algorithms/src/Kokkos_Random.hpp +++ b/lib/kokkos/algorithms/src/Kokkos_Random.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -59,6 +60,7 @@ namespace Kokkos { +// clang-format off /*Template functions to get equidistributed random numbers from a generator for a specific Scalar type template @@ -229,1019 +231,979 @@ namespace Kokkos { ViewType::value_type start, ViewType::value_type end); */ +// clang-format on - template - struct rand; +template +struct rand; +template +struct rand { + KOKKOS_INLINE_FUNCTION + static short max() { return 127; } + KOKKOS_INLINE_FUNCTION + static short draw(Generator& gen) { + return short((gen.rand() & 0xff + 256) % 256); + } + KOKKOS_INLINE_FUNCTION + static short draw(Generator& gen, const char& range) { + return char(gen.rand(range)); + } + KOKKOS_INLINE_FUNCTION + static short draw(Generator& gen, const char& start, const char& end) { + return char(gen.rand(start, end)); + } +}; - template - struct rand { +template +struct rand { + KOKKOS_INLINE_FUNCTION + static short max() { return 32767; } + KOKKOS_INLINE_FUNCTION + static short draw(Generator& gen) { + return short((gen.rand() & 0xffff + 65536) % 32768); + } + KOKKOS_INLINE_FUNCTION + static short draw(Generator& gen, const short& range) { + return short(gen.rand(range)); + } + KOKKOS_INLINE_FUNCTION + static short draw(Generator& gen, const short& start, const short& end) { + return short(gen.rand(start, end)); + } +}; - KOKKOS_INLINE_FUNCTION - static short max(){return 127;} - KOKKOS_INLINE_FUNCTION - static short draw(Generator& gen) - {return short((gen.rand()&0xff+256)%256);} - KOKKOS_INLINE_FUNCTION - static short draw(Generator& gen, const char& range) - {return char(gen.rand(range));} - KOKKOS_INLINE_FUNCTION - static short draw(Generator& gen, const char& start, const char& end) - {return char(gen.rand(start,end));} +template +struct rand { + KOKKOS_INLINE_FUNCTION + static int max() { return Generator::MAX_RAND; } + KOKKOS_INLINE_FUNCTION + static int draw(Generator& gen) { return gen.rand(); } + KOKKOS_INLINE_FUNCTION + static int draw(Generator& gen, const int& range) { return gen.rand(range); } + KOKKOS_INLINE_FUNCTION + static int draw(Generator& gen, const int& start, const int& end) { + return gen.rand(start, end); + } +}; - }; +template +struct rand { + KOKKOS_INLINE_FUNCTION + static unsigned int max() { return Generator::MAX_URAND; } + KOKKOS_INLINE_FUNCTION + static unsigned int draw(Generator& gen) { return gen.urand(); } + KOKKOS_INLINE_FUNCTION + static unsigned int draw(Generator& gen, const unsigned int& range) { + return gen.urand(range); + } + KOKKOS_INLINE_FUNCTION + static unsigned int draw(Generator& gen, const unsigned int& start, + const unsigned int& end) { + return gen.urand(start, end); + } +}; - template - struct rand { - KOKKOS_INLINE_FUNCTION - static short max(){return 32767;} - KOKKOS_INLINE_FUNCTION - static short draw(Generator& gen) - {return short((gen.rand()&0xffff+65536)%32768);} - KOKKOS_INLINE_FUNCTION - static short draw(Generator& gen, const short& range) - {return short(gen.rand(range));} - KOKKOS_INLINE_FUNCTION - static short draw(Generator& gen, const short& start, const short& end) - {return short(gen.rand(start,end));} +template +struct rand { + KOKKOS_INLINE_FUNCTION + static long max() { + // FIXME (mfh 26 Oct 2014) It would be better to select the + // return value at compile time, using something like enable_if. + return sizeof(long) == 4 ? static_cast(Generator::MAX_RAND) + : static_cast(Generator::MAX_RAND64); + } + KOKKOS_INLINE_FUNCTION + static long draw(Generator& gen) { + // FIXME (mfh 26 Oct 2014) It would be better to select the + // return value at compile time, using something like enable_if. + return sizeof(long) == 4 ? static_cast(gen.rand()) + : static_cast(gen.rand64()); + } + KOKKOS_INLINE_FUNCTION + static long draw(Generator& gen, const long& range) { + // FIXME (mfh 26 Oct 2014) It would be better to select the + // return value at compile time, using something like enable_if. + return sizeof(long) == 4 + ? static_cast(gen.rand(static_cast(range))) + : static_cast(gen.rand64(range)); + } + KOKKOS_INLINE_FUNCTION + static long draw(Generator& gen, const long& start, const long& end) { + // FIXME (mfh 26 Oct 2014) It would be better to select the + // return value at compile time, using something like enable_if. + return sizeof(long) == 4 + ? static_cast( + gen.rand(static_cast(start), static_cast(end))) + : static_cast(gen.rand64(start, end)); + } +}; - }; +template +struct rand { + KOKKOS_INLINE_FUNCTION + static unsigned long max() { + // FIXME (mfh 26 Oct 2014) It would be better to select the + // return value at compile time, using something like enable_if. + return sizeof(unsigned long) == 4 + ? static_cast(Generator::MAX_URAND) + : static_cast(Generator::MAX_URAND64); + } + KOKKOS_INLINE_FUNCTION + static unsigned long draw(Generator& gen) { + // FIXME (mfh 26 Oct 2014) It would be better to select the + // return value at compile time, using something like enable_if. + return sizeof(unsigned long) == 4 + ? static_cast(gen.urand()) + : static_cast(gen.urand64()); + } + KOKKOS_INLINE_FUNCTION + static unsigned long draw(Generator& gen, const unsigned long& range) { + // FIXME (mfh 26 Oct 2014) It would be better to select the + // return value at compile time, using something like enable_if. + return sizeof(unsigned long) == 4 + ? static_cast( + gen.urand(static_cast(range))) + : static_cast(gen.urand64(range)); + } + KOKKOS_INLINE_FUNCTION + static unsigned long draw(Generator& gen, const unsigned long& start, + const unsigned long& end) { + // FIXME (mfh 26 Oct 2014) It would be better to select the + // return value at compile time, using something like enable_if. + return sizeof(unsigned long) == 4 + ? static_cast( + gen.urand(static_cast(start), + static_cast(end))) + : static_cast(gen.urand64(start, end)); + } +}; - template - struct rand { - KOKKOS_INLINE_FUNCTION - static int max(){return Generator::MAX_RAND;} - KOKKOS_INLINE_FUNCTION - static int draw(Generator& gen) - {return gen.rand();} - KOKKOS_INLINE_FUNCTION - static int draw(Generator& gen, const int& range) - {return gen.rand(range);} - KOKKOS_INLINE_FUNCTION - static int draw(Generator& gen, const int& start, const int& end) - {return gen.rand(start,end);} +// NOTE (mfh 26 oct 2014) This is a partial specialization for long +// long, a C99 / C++11 signed type which is guaranteed to be at +// least 64 bits. Do NOT write a partial specialization for +// int64_t!!! This is just a typedef! It could be either long or +// long long. We don't know which a priori, and I've seen both. +// The types long and long long are guaranteed to differ, so it's +// always safe to specialize for both. +template +struct rand { + KOKKOS_INLINE_FUNCTION + static long long max() { + // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. + return Generator::MAX_RAND64; + } + KOKKOS_INLINE_FUNCTION + static long long draw(Generator& gen) { + // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. + return gen.rand64(); + } + KOKKOS_INLINE_FUNCTION + static long long draw(Generator& gen, const long long& range) { + // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. + return gen.rand64(range); + } + KOKKOS_INLINE_FUNCTION + static long long draw(Generator& gen, const long long& start, + const long long& end) { + // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. + return gen.rand64(start, end); + } +}; - }; +// NOTE (mfh 26 oct 2014) This is a partial specialization for +// unsigned long long, a C99 / C++11 unsigned type which is +// guaranteed to be at least 64 bits. Do NOT write a partial +// specialization for uint64_t!!! This is just a typedef! It could +// be either unsigned long or unsigned long long. We don't know +// which a priori, and I've seen both. The types unsigned long and +// unsigned long long are guaranteed to differ, so it's always safe +// to specialize for both. +template +struct rand { + KOKKOS_INLINE_FUNCTION + static unsigned long long max() { + // FIXME (mfh 26 Oct 2014) It's legal for unsigned long long to be > 64 + // bits. + return Generator::MAX_URAND64; + } + KOKKOS_INLINE_FUNCTION + static unsigned long long draw(Generator& gen) { + // FIXME (mfh 26 Oct 2014) It's legal for unsigned long long to be > 64 + // bits. + return gen.urand64(); + } + KOKKOS_INLINE_FUNCTION + static unsigned long long draw(Generator& gen, + const unsigned long long& range) { + // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. + return gen.urand64(range); + } + KOKKOS_INLINE_FUNCTION + static unsigned long long draw(Generator& gen, + const unsigned long long& start, + const unsigned long long& end) { + // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. + return gen.urand64(start, end); + } +}; - template - struct rand { - KOKKOS_INLINE_FUNCTION - static unsigned int max () { - return Generator::MAX_URAND; +template +struct rand { + KOKKOS_INLINE_FUNCTION + static float max() { return 1.0f; } + KOKKOS_INLINE_FUNCTION + static float draw(Generator& gen) { return gen.frand(); } + KOKKOS_INLINE_FUNCTION + static float draw(Generator& gen, const float& range) { + return gen.frand(range); + } + KOKKOS_INLINE_FUNCTION + static float draw(Generator& gen, const float& start, const float& end) { + return gen.frand(start, end); + } +}; + +template +struct rand { + KOKKOS_INLINE_FUNCTION + static double max() { return 1.0; } + KOKKOS_INLINE_FUNCTION + static double draw(Generator& gen) { return gen.drand(); } + KOKKOS_INLINE_FUNCTION + static double draw(Generator& gen, const double& range) { + return gen.drand(range); + } + KOKKOS_INLINE_FUNCTION + static double draw(Generator& gen, const double& start, const double& end) { + return gen.drand(start, end); + } +}; + +template +struct rand > { + KOKKOS_INLINE_FUNCTION + static Kokkos::complex max() { + return Kokkos::complex(1.0, 1.0); + } + KOKKOS_INLINE_FUNCTION + static Kokkos::complex draw(Generator& gen) { + const float re = gen.frand(); + const float im = gen.frand(); + return Kokkos::complex(re, im); + } + KOKKOS_INLINE_FUNCTION + static Kokkos::complex draw(Generator& gen, + const Kokkos::complex& range) { + const float re = gen.frand(real(range)); + const float im = gen.frand(imag(range)); + return Kokkos::complex(re, im); + } + KOKKOS_INLINE_FUNCTION + static Kokkos::complex draw(Generator& gen, + const Kokkos::complex& start, + const Kokkos::complex& end) { + const float re = gen.frand(real(start), real(end)); + const float im = gen.frand(imag(start), imag(end)); + return Kokkos::complex(re, im); + } +}; + +template +struct rand > { + KOKKOS_INLINE_FUNCTION + static Kokkos::complex max() { + return Kokkos::complex(1.0, 1.0); + } + KOKKOS_INLINE_FUNCTION + static Kokkos::complex draw(Generator& gen) { + const double re = gen.drand(); + const double im = gen.drand(); + return Kokkos::complex(re, im); + } + KOKKOS_INLINE_FUNCTION + static Kokkos::complex draw(Generator& gen, + const Kokkos::complex& range) { + const double re = gen.drand(real(range)); + const double im = gen.drand(imag(range)); + return Kokkos::complex(re, im); + } + KOKKOS_INLINE_FUNCTION + static Kokkos::complex draw(Generator& gen, + const Kokkos::complex& start, + const Kokkos::complex& end) { + const double re = gen.drand(real(start), real(end)); + const double im = gen.drand(imag(start), imag(end)); + return Kokkos::complex(re, im); + } +}; + +template +class Random_XorShift64_Pool; + +template +class Random_XorShift64 { + private: + uint64_t state_; + const int state_idx_; + friend class Random_XorShift64_Pool; + + public: + typedef DeviceType device_type; + + enum { MAX_URAND = 0xffffffffU }; + enum { MAX_URAND64 = 0xffffffffffffffffULL - 1 }; + enum { MAX_RAND = static_cast(0xffffffff / 2) }; + enum { MAX_RAND64 = static_cast(0xffffffffffffffffLL / 2 - 1) }; + + KOKKOS_INLINE_FUNCTION + Random_XorShift64(uint64_t state, int state_idx = 0) + : state_(state == 0 ? uint64_t(1318319) : state), state_idx_(state_idx) {} + + KOKKOS_INLINE_FUNCTION + uint32_t urand() { + state_ ^= state_ >> 12; + state_ ^= state_ << 25; + state_ ^= state_ >> 27; + + uint64_t tmp = state_ * 2685821657736338717ULL; + tmp = tmp >> 16; + return static_cast(tmp & MAX_URAND); + } + + KOKKOS_INLINE_FUNCTION + uint64_t urand64() { + state_ ^= state_ >> 12; + state_ ^= state_ << 25; + state_ ^= state_ >> 27; + return (state_ * 2685821657736338717ULL) - 1; + } + + KOKKOS_INLINE_FUNCTION + uint32_t urand(const uint32_t& range) { + const uint32_t max_val = (MAX_URAND / range) * range; + uint32_t tmp = urand(); + while (tmp >= max_val) tmp = urand(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + uint32_t urand(const uint32_t& start, const uint32_t& end) { + return urand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + uint64_t urand64(const uint64_t& range) { + const uint64_t max_val = (MAX_URAND64 / range) * range; + uint64_t tmp = urand64(); + while (tmp >= max_val) tmp = urand64(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + uint64_t urand64(const uint64_t& start, const uint64_t& end) { + return urand64(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + int rand() { return static_cast(urand() / 2); } + + KOKKOS_INLINE_FUNCTION + int rand(const int& range) { + const int max_val = (MAX_RAND / range) * range; + int tmp = rand(); + while (tmp >= max_val) tmp = rand(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + int rand(const int& start, const int& end) { + return rand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + int64_t rand64() { return static_cast(urand64() / 2); } + + KOKKOS_INLINE_FUNCTION + int64_t rand64(const int64_t& range) { + const int64_t max_val = (MAX_RAND64 / range) * range; + int64_t tmp = rand64(); + while (tmp >= max_val) tmp = rand64(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + int64_t rand64(const int64_t& start, const int64_t& end) { + return rand64(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + float frand() { return 1.0f * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + float frand(const float& range) { return range * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + float frand(const float& start, const float& end) { + return frand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + double drand() { return 1.0 * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + double drand(const double& range) { return range * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + double drand(const double& start, const double& end) { + return drand(end - start) + start; + } + + // Marsaglia polar method for drawing a standard normal distributed random + // number + KOKKOS_INLINE_FUNCTION + double normal() { + double S = 2.0; + double U; + while (S >= 1.0) { + U = 2.0 * drand() - 1.0; + const double V = 2.0 * drand() - 1.0; + S = U * U + V * V; } - KOKKOS_INLINE_FUNCTION - static unsigned int draw (Generator& gen) { - return gen.urand (); - } - KOKKOS_INLINE_FUNCTION - static unsigned int draw(Generator& gen, const unsigned int& range) { - return gen.urand (range); - } - KOKKOS_INLINE_FUNCTION - static unsigned int - draw (Generator& gen, const unsigned int& start, const unsigned int& end) { - return gen.urand (start, end); - } - }; + return U * std::sqrt(-2.0 * log(S) / S); + } - template - struct rand { - KOKKOS_INLINE_FUNCTION - static long max () { - // FIXME (mfh 26 Oct 2014) It would be better to select the - // return value at compile time, using something like enable_if. - return sizeof (long) == 4 ? - static_cast (Generator::MAX_RAND) : - static_cast (Generator::MAX_RAND64); - } - KOKKOS_INLINE_FUNCTION - static long draw (Generator& gen) { - // FIXME (mfh 26 Oct 2014) It would be better to select the - // return value at compile time, using something like enable_if. - return sizeof (long) == 4 ? - static_cast (gen.rand ()) : - static_cast (gen.rand64 ()); - } - KOKKOS_INLINE_FUNCTION - static long draw (Generator& gen, const long& range) { - // FIXME (mfh 26 Oct 2014) It would be better to select the - // return value at compile time, using something like enable_if. - return sizeof (long) == 4 ? - static_cast (gen.rand (static_cast (range))) : - static_cast (gen.rand64 (range)); - } - KOKKOS_INLINE_FUNCTION - static long draw (Generator& gen, const long& start, const long& end) { - // FIXME (mfh 26 Oct 2014) It would be better to select the - // return value at compile time, using something like enable_if. - return sizeof (long) == 4 ? - static_cast (gen.rand (static_cast (start), - static_cast (end))) : - static_cast (gen.rand64 (start, end)); - } - }; + KOKKOS_INLINE_FUNCTION + double normal(const double& mean, const double& std_dev = 1.0) { + return mean + normal() * std_dev; + } +}; - template - struct rand { - KOKKOS_INLINE_FUNCTION - static unsigned long max () { - // FIXME (mfh 26 Oct 2014) It would be better to select the - // return value at compile time, using something like enable_if. - return sizeof (unsigned long) == 4 ? - static_cast (Generator::MAX_URAND) : - static_cast (Generator::MAX_URAND64); - } - KOKKOS_INLINE_FUNCTION - static unsigned long draw (Generator& gen) { - // FIXME (mfh 26 Oct 2014) It would be better to select the - // return value at compile time, using something like enable_if. - return sizeof (unsigned long) == 4 ? - static_cast (gen.urand ()) : - static_cast (gen.urand64 ()); - } - KOKKOS_INLINE_FUNCTION - static unsigned long draw(Generator& gen, const unsigned long& range) { - // FIXME (mfh 26 Oct 2014) It would be better to select the - // return value at compile time, using something like enable_if. - return sizeof (unsigned long) == 4 ? - static_cast (gen.urand (static_cast (range))) : - static_cast (gen.urand64 (range)); - } - KOKKOS_INLINE_FUNCTION - static unsigned long - draw (Generator& gen, const unsigned long& start, const unsigned long& end) { - // FIXME (mfh 26 Oct 2014) It would be better to select the - // return value at compile time, using something like enable_if. - return sizeof (unsigned long) == 4 ? - static_cast (gen.urand (static_cast (start), - static_cast (end))) : - static_cast (gen.urand64 (start, end)); - } - }; +template +class Random_XorShift64_Pool { + private: + typedef View lock_type; + typedef View state_data_type; + lock_type locks_; + state_data_type state_; + int num_states_; - // NOTE (mfh 26 oct 2014) This is a partial specialization for long - // long, a C99 / C++11 signed type which is guaranteed to be at - // least 64 bits. Do NOT write a partial specialization for - // int64_t!!! This is just a typedef! It could be either long or - // long long. We don't know which a priori, and I've seen both. - // The types long and long long are guaranteed to differ, so it's - // always safe to specialize for both. - template - struct rand { - KOKKOS_INLINE_FUNCTION - static long long max () { - // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. - return Generator::MAX_RAND64; - } - KOKKOS_INLINE_FUNCTION - static long long draw (Generator& gen) { - // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. - return gen.rand64 (); - } - KOKKOS_INLINE_FUNCTION - static long long draw (Generator& gen, const long long& range) { - // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. - return gen.rand64 (range); - } - KOKKOS_INLINE_FUNCTION - static long long draw (Generator& gen, const long long& start, const long long& end) { - // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. - return gen.rand64 (start, end); - } - }; + public: + typedef Random_XorShift64 generator_type; + typedef DeviceType device_type; - // NOTE (mfh 26 oct 2014) This is a partial specialization for - // unsigned long long, a C99 / C++11 unsigned type which is - // guaranteed to be at least 64 bits. Do NOT write a partial - // specialization for uint64_t!!! This is just a typedef! It could - // be either unsigned long or unsigned long long. We don't know - // which a priori, and I've seen both. The types unsigned long and - // unsigned long long are guaranteed to differ, so it's always safe - // to specialize for both. - template - struct rand { - KOKKOS_INLINE_FUNCTION - static unsigned long long max () { - // FIXME (mfh 26 Oct 2014) It's legal for unsigned long long to be > 64 bits. - return Generator::MAX_URAND64; - } - KOKKOS_INLINE_FUNCTION - static unsigned long long draw (Generator& gen) { - // FIXME (mfh 26 Oct 2014) It's legal for unsigned long long to be > 64 bits. - return gen.urand64 (); - } - KOKKOS_INLINE_FUNCTION - static unsigned long long draw (Generator& gen, const unsigned long long& range) { - // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. - return gen.urand64 (range); - } - KOKKOS_INLINE_FUNCTION - static unsigned long long - draw (Generator& gen, const unsigned long long& start, const unsigned long long& end) { - // FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits. - return gen.urand64 (start, end); - } - }; - - template - struct rand { - KOKKOS_INLINE_FUNCTION - static float max(){return 1.0f;} - KOKKOS_INLINE_FUNCTION - static float draw(Generator& gen) - {return gen.frand();} - KOKKOS_INLINE_FUNCTION - static float draw(Generator& gen, const float& range) - {return gen.frand(range);} - KOKKOS_INLINE_FUNCTION - static float draw(Generator& gen, const float& start, const float& end) - {return gen.frand(start,end);} - - }; - - template - struct rand { - KOKKOS_INLINE_FUNCTION - static double max(){return 1.0;} - KOKKOS_INLINE_FUNCTION - static double draw(Generator& gen) - {return gen.drand();} - KOKKOS_INLINE_FUNCTION - static double draw(Generator& gen, const double& range) - {return gen.drand(range);} - KOKKOS_INLINE_FUNCTION - static double draw(Generator& gen, const double& start, const double& end) - {return gen.drand(start,end);} - - }; - - template - struct rand > { - KOKKOS_INLINE_FUNCTION - static Kokkos::complex max () { - return Kokkos::complex (1.0, 1.0); - } - KOKKOS_INLINE_FUNCTION - static Kokkos::complex draw (Generator& gen) { - const float re = gen.frand (); - const float im = gen.frand (); - return Kokkos::complex (re, im); - } - KOKKOS_INLINE_FUNCTION - static Kokkos::complex draw (Generator& gen, const Kokkos::complex& range) { - const float re = gen.frand (real (range)); - const float im = gen.frand (imag (range)); - return Kokkos::complex (re, im); - } - KOKKOS_INLINE_FUNCTION - static Kokkos::complex draw (Generator& gen, const Kokkos::complex& start, const Kokkos::complex& end) { - const float re = gen.frand (real (start), real (end)); - const float im = gen.frand (imag (start), imag (end)); - return Kokkos::complex (re, im); - } - }; - - template - struct rand > { - KOKKOS_INLINE_FUNCTION - static Kokkos::complex max () { - return Kokkos::complex (1.0, 1.0); - } - KOKKOS_INLINE_FUNCTION - static Kokkos::complex draw (Generator& gen) { - const double re = gen.drand (); - const double im = gen.drand (); - return Kokkos::complex (re, im); - } - KOKKOS_INLINE_FUNCTION - static Kokkos::complex draw (Generator& gen, const Kokkos::complex& range) { - const double re = gen.drand (real (range)); - const double im = gen.drand (imag (range)); - return Kokkos::complex (re, im); - } - KOKKOS_INLINE_FUNCTION - static Kokkos::complex draw (Generator& gen, const Kokkos::complex& start, const Kokkos::complex& end) { - const double re = gen.drand (real (start), real (end)); - const double im = gen.drand (imag (start), imag (end)); - return Kokkos::complex (re, im); - } - }; - - template - class Random_XorShift64_Pool; - - template - class Random_XorShift64 { - private: - uint64_t state_; - const int state_idx_; - friend class Random_XorShift64_Pool; - public: - - typedef DeviceType device_type; - - enum {MAX_URAND = 0xffffffffU}; - enum {MAX_URAND64 = 0xffffffffffffffffULL-1}; - enum {MAX_RAND = static_cast(0xffffffff/2)}; - enum {MAX_RAND64 = static_cast(0xffffffffffffffffLL/2-1)}; - - KOKKOS_INLINE_FUNCTION - Random_XorShift64 (uint64_t state, int state_idx = 0) - : state_(state==0?uint64_t(1318319):state),state_idx_(state_idx){} - - KOKKOS_INLINE_FUNCTION - uint32_t urand() { - state_ ^= state_ >> 12; - state_ ^= state_ << 25; - state_ ^= state_ >> 27; - - uint64_t tmp = state_ * 2685821657736338717ULL; - tmp = tmp>>16; - return static_cast(tmp&MAX_URAND); - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64() { - state_ ^= state_ >> 12; - state_ ^= state_ << 25; - state_ ^= state_ >> 27; - return (state_ * 2685821657736338717ULL) - 1; - } - - KOKKOS_INLINE_FUNCTION - uint32_t urand(const uint32_t& range) { - const uint32_t max_val = (MAX_URAND/range)*range; - uint32_t tmp = urand(); - while(tmp>=max_val) - tmp = urand(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - uint32_t urand(const uint32_t& start, const uint32_t& end ) { - return urand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64(const uint64_t& range) { - const uint64_t max_val = (MAX_URAND64/range)*range; - uint64_t tmp = urand64(); - while(tmp>=max_val) - tmp = urand64(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64(const uint64_t& start, const uint64_t& end ) { - return urand64(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - int rand() { - return static_cast(urand()/2); - } - - KOKKOS_INLINE_FUNCTION - int rand(const int& range) { - const int max_val = (MAX_RAND/range)*range; - int tmp = rand(); - while(tmp>=max_val) - tmp = rand(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - int rand(const int& start, const int& end ) { - return rand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64() { - return static_cast(urand64()/2); - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64(const int64_t& range) { - const int64_t max_val = (MAX_RAND64/range)*range; - int64_t tmp = rand64(); - while(tmp>=max_val) - tmp = rand64(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64(const int64_t& start, const int64_t& end ) { - return rand64(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - float frand() { - return 1.0f * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - float frand(const float& range) { - return range * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - float frand(const float& start, const float& end ) { - return frand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - double drand() { - return 1.0 * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - double drand(const double& range) { - return range * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - double drand(const double& start, const double& end ) { - return drand(end-start)+start; - } - - //Marsaglia polar method for drawing a standard normal distributed random number - KOKKOS_INLINE_FUNCTION - double normal() { - double S = 2.0; - double U; - while(S>=1.0) { - U = 2.0*drand() - 1.0; - const double V = 2.0*drand() - 1.0; - S = U*U+V*V; - } - return U*std::sqrt(-2.0*log(S)/S); - } - - KOKKOS_INLINE_FUNCTION - double normal(const double& mean, const double& std_dev=1.0) { - return mean + normal()*std_dev; - } - - }; - - template - class Random_XorShift64_Pool { - private: - typedef View lock_type; - typedef View state_data_type; - lock_type locks_; - state_data_type state_; - int num_states_; - - public: - typedef Random_XorShift64 generator_type; - typedef DeviceType device_type; - - KOKKOS_INLINE_FUNCTION - Random_XorShift64_Pool() { - num_states_ = 0; - } - Random_XorShift64_Pool(uint64_t seed) { - num_states_ = 0; + KOKKOS_INLINE_FUNCTION + Random_XorShift64_Pool() { num_states_ = 0; } + Random_XorShift64_Pool(uint64_t seed) { + num_states_ = 0; #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - init(seed,DeviceType::max_hardware_threads()); + init(seed, DeviceType::max_hardware_threads()); #else - init(seed,DeviceType::impl_max_hardware_threads()); + init(seed, DeviceType::impl_max_hardware_threads()); #endif + } + + KOKKOS_INLINE_FUNCTION + Random_XorShift64_Pool(const Random_XorShift64_Pool& src) + : locks_(src.locks_), state_(src.state_), num_states_(src.num_states_) {} + + KOKKOS_INLINE_FUNCTION + Random_XorShift64_Pool operator=(const Random_XorShift64_Pool& src) { + locks_ = src.locks_; + state_ = src.state_; + num_states_ = src.num_states_; + return *this; + } + + void init(uint64_t seed, int num_states) { + if (seed == 0) seed = uint64_t(1318319); + + num_states_ = num_states; + + locks_ = lock_type("Kokkos::Random_XorShift64::locks", num_states_); + state_ = state_data_type("Kokkos::Random_XorShift64::state", num_states_); + + typename state_data_type::HostMirror h_state = create_mirror_view(state_); + typename lock_type::HostMirror h_lock = create_mirror_view(locks_); + + // Execute on the HostMirror's default execution space. + Random_XorShift64 + gen(seed, 0); + for (int i = 0; i < 17; i++) gen.rand(); + for (int i = 0; i < num_states_; i++) { + int n1 = gen.rand(); + int n2 = gen.rand(); + int n3 = gen.rand(); + int n4 = gen.rand(); + h_state(i) = (((static_cast(n1)) & 0xffff) << 00) | + (((static_cast(n2)) & 0xffff) << 16) | + (((static_cast(n3)) & 0xffff) << 32) | + (((static_cast(n4)) & 0xffff) << 48); + h_lock(i) = 0; } + deep_copy(state_, h_state); + deep_copy(locks_, h_lock); + } - KOKKOS_INLINE_FUNCTION - Random_XorShift64_Pool(const Random_XorShift64_Pool& src): - locks_(src.locks_), - state_(src.state_), - num_states_(src.num_states_) - {} - - KOKKOS_INLINE_FUNCTION - Random_XorShift64_Pool operator = (const Random_XorShift64_Pool& src) { - locks_ = src.locks_; - state_ = src.state_; - num_states_ = src.num_states_; - return *this; - } - - void init(uint64_t seed, int num_states) { - if(seed==0) - seed = uint64_t(1318319); - - num_states_ = num_states; - - locks_ = lock_type("Kokkos::Random_XorShift64::locks",num_states_); - state_ = state_data_type("Kokkos::Random_XorShift64::state",num_states_); - - typename state_data_type::HostMirror h_state = create_mirror_view(state_); - typename lock_type::HostMirror h_lock = create_mirror_view(locks_); - - // Execute on the HostMirror's default execution space. - Random_XorShift64 gen(seed,0); - for(int i = 0; i < 17; i++) - gen.rand(); - for(int i = 0; i < num_states_; i++) { - int n1 = gen.rand(); - int n2 = gen.rand(); - int n3 = gen.rand(); - int n4 = gen.rand(); - h_state(i) = (((static_cast(n1)) & 0xffff)<<00) | - (((static_cast(n2)) & 0xffff)<<16) | - (((static_cast(n3)) & 0xffff)<<32) | - (((static_cast(n4)) & 0xffff)<<48); - h_lock(i) = 0; - } - deep_copy(state_,h_state); - deep_copy(locks_,h_lock); - } - - KOKKOS_INLINE_FUNCTION - Random_XorShift64 get_state() const { + KOKKOS_INLINE_FUNCTION + Random_XorShift64 get_state() const { #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - const int i = DeviceType::hardware_thread_id();; + const int i = DeviceType::hardware_thread_id(); + ; #else - const int i = DeviceType::impl_hardware_thread_id();; + const int i = DeviceType::impl_hardware_thread_id(); + ; #endif - return Random_XorShift64(state_(i),i); - } + return Random_XorShift64(state_(i), i); + } - // NOTE: state_idx MUST be unique and less than num_states - KOKKOS_INLINE_FUNCTION - Random_XorShift64 get_state(const int state_idx) const { - return Random_XorShift64(state_(state_idx),state_idx); - } + // NOTE: state_idx MUST be unique and less than num_states + KOKKOS_INLINE_FUNCTION + Random_XorShift64 get_state(const int state_idx) const { + return Random_XorShift64(state_(state_idx), state_idx); + } - KOKKOS_INLINE_FUNCTION - void free_state(const Random_XorShift64& state) const { - state_(state.state_idx_) = state.state_; + KOKKOS_INLINE_FUNCTION + void free_state(const Random_XorShift64& state) const { + state_(state.state_idx_) = state.state_; + } +}; + +template +class Random_XorShift1024_Pool; + +template +class Random_XorShift1024 { + private: + int p_; + const int state_idx_; + uint64_t state_[16]; + friend class Random_XorShift1024_Pool; + + public: + typedef Random_XorShift1024_Pool pool_type; + typedef DeviceType device_type; + + enum { MAX_URAND = 0xffffffffU }; + enum { MAX_URAND64 = 0xffffffffffffffffULL - 1 }; + enum { MAX_RAND = static_cast(0xffffffffU / 2) }; + enum { MAX_RAND64 = static_cast(0xffffffffffffffffULL / 2 - 1) }; + + KOKKOS_INLINE_FUNCTION + Random_XorShift1024(const typename pool_type::state_data_type& state, int p, + int state_idx = 0) + : p_(p), state_idx_(state_idx) { + for (int i = 0; i < 16; i++) state_[i] = state(state_idx, i); + } + + KOKKOS_INLINE_FUNCTION + uint32_t urand() { + uint64_t state_0 = state_[p_]; + uint64_t state_1 = state_[p_ = (p_ + 1) & 15]; + state_1 ^= state_1 << 31; + state_1 ^= state_1 >> 11; + state_0 ^= state_0 >> 30; + uint64_t tmp = (state_[p_] = state_0 ^ state_1) * 1181783497276652981ULL; + tmp = tmp >> 16; + return static_cast(tmp & MAX_URAND); + } + + KOKKOS_INLINE_FUNCTION + uint64_t urand64() { + uint64_t state_0 = state_[p_]; + uint64_t state_1 = state_[p_ = (p_ + 1) & 15]; + state_1 ^= state_1 << 31; + state_1 ^= state_1 >> 11; + state_0 ^= state_0 >> 30; + return ((state_[p_] = state_0 ^ state_1) * 1181783497276652981LL) - 1; + } + + KOKKOS_INLINE_FUNCTION + uint32_t urand(const uint32_t& range) { + const uint32_t max_val = (MAX_URAND / range) * range; + uint32_t tmp = urand(); + while (tmp >= max_val) tmp = urand(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + uint32_t urand(const uint32_t& start, const uint32_t& end) { + return urand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + uint64_t urand64(const uint64_t& range) { + const uint64_t max_val = (MAX_URAND64 / range) * range; + uint64_t tmp = urand64(); + while (tmp >= max_val) tmp = urand64(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + uint64_t urand64(const uint64_t& start, const uint64_t& end) { + return urand64(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + int rand() { return static_cast(urand() / 2); } + + KOKKOS_INLINE_FUNCTION + int rand(const int& range) { + const int max_val = (MAX_RAND / range) * range; + int tmp = rand(); + while (tmp >= max_val) tmp = rand(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + int rand(const int& start, const int& end) { + return rand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + int64_t rand64() { return static_cast(urand64() / 2); } + + KOKKOS_INLINE_FUNCTION + int64_t rand64(const int64_t& range) { + const int64_t max_val = (MAX_RAND64 / range) * range; + int64_t tmp = rand64(); + while (tmp >= max_val) tmp = rand64(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + int64_t rand64(const int64_t& start, const int64_t& end) { + return rand64(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + float frand() { return 1.0f * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + float frand(const float& range) { return range * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + float frand(const float& start, const float& end) { + return frand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + double drand() { return 1.0 * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + double drand(const double& range) { return range * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + double drand(const double& start, const double& end) { + return frand(end - start) + start; + } + + // Marsaglia polar method for drawing a standard normal distributed random + // number + KOKKOS_INLINE_FUNCTION + double normal() { + double S = 2.0; + double U; + while (S >= 1.0) { + U = 2.0 * drand() - 1.0; + const double V = 2.0 * drand() - 1.0; + S = U * U + V * V; } + return U * std::sqrt(-2.0 * log(S) / S); + } + + KOKKOS_INLINE_FUNCTION + double normal(const double& mean, const double& std_dev = 1.0) { + return mean + normal() * std_dev; + } +}; + +template +class Random_XorShift1024_Pool { + private: + typedef View int_view_type; + typedef View state_data_type; + + int_view_type locks_; + state_data_type state_; + int_view_type p_; + int num_states_; + friend class Random_XorShift1024; + + public: + typedef Random_XorShift1024 generator_type; + + typedef DeviceType device_type; + + KOKKOS_INLINE_FUNCTION + Random_XorShift1024_Pool() { num_states_ = 0; } + + inline Random_XorShift1024_Pool(uint64_t seed) { + num_states_ = 0; +#ifdef KOKKOS_ENABLE_DEPRECATED_CODE + init(seed, DeviceType::max_hardware_threads()); +#else + init(seed, DeviceType::impl_max_hardware_threads()); +#endif + } + + KOKKOS_INLINE_FUNCTION + Random_XorShift1024_Pool(const Random_XorShift1024_Pool& src) + : locks_(src.locks_), + state_(src.state_), + p_(src.p_), + num_states_(src.num_states_) {} + + KOKKOS_INLINE_FUNCTION + Random_XorShift1024_Pool operator=(const Random_XorShift1024_Pool& src) { + locks_ = src.locks_; + state_ = src.state_; + p_ = src.p_; + num_states_ = src.num_states_; + return *this; + } + + inline void init(uint64_t seed, int num_states) { + if (seed == 0) seed = uint64_t(1318319); + num_states_ = num_states; + locks_ = int_view_type("Kokkos::Random_XorShift1024::locks", num_states_); + state_ = state_data_type("Kokkos::Random_XorShift1024::state", num_states_); + p_ = int_view_type("Kokkos::Random_XorShift1024::p", num_states_); + + typename state_data_type::HostMirror h_state = create_mirror_view(state_); + typename int_view_type::HostMirror h_lock = create_mirror_view(locks_); + typename int_view_type::HostMirror h_p = create_mirror_view(p_); + + // Execute on the HostMirror's default execution space. + Random_XorShift64 + gen(seed, 0); + for (int i = 0; i < 17; i++) gen.rand(); + for (int i = 0; i < num_states_; i++) { + for (int j = 0; j < 16; j++) { + int n1 = gen.rand(); + int n2 = gen.rand(); + int n3 = gen.rand(); + int n4 = gen.rand(); + h_state(i, j) = (((static_cast(n1)) & 0xffff) << 00) | + (((static_cast(n2)) & 0xffff) << 16) | + (((static_cast(n3)) & 0xffff) << 32) | + (((static_cast(n4)) & 0xffff) << 48); + } + h_p(i) = 0; + h_lock(i) = 0; + } + deep_copy(state_, h_state); + deep_copy(locks_, h_lock); + } + + KOKKOS_INLINE_FUNCTION + Random_XorShift1024 get_state() const { +#ifdef KOKKOS_ENABLE_DEPRECATED_CODE + const int i = DeviceType::hardware_thread_id(); +#else + const int i = DeviceType::impl_hardware_thread_id(); +#endif + return Random_XorShift1024(state_, p_(i), i); }; + // NOTE: state_idx MUST be unique and less than num_states + KOKKOS_INLINE_FUNCTION + Random_XorShift1024 get_state(const int state_idx) const { + return Random_XorShift1024(state_, p_(state_idx), state_idx); + } - template - class Random_XorShift1024_Pool; - - template - class Random_XorShift1024 { - private: - int p_; - const int state_idx_; - uint64_t state_[16]; - friend class Random_XorShift1024_Pool; - public: - - typedef Random_XorShift1024_Pool pool_type; - typedef DeviceType device_type; - - enum {MAX_URAND = 0xffffffffU}; - enum {MAX_URAND64 = 0xffffffffffffffffULL-1}; - enum {MAX_RAND = static_cast(0xffffffffU/2)}; - enum {MAX_RAND64 = static_cast(0xffffffffffffffffULL/2-1)}; - - KOKKOS_INLINE_FUNCTION - Random_XorShift1024 (const typename pool_type::state_data_type& state, int p, int state_idx = 0): - p_(p),state_idx_(state_idx){ - for(int i=0 ; i<16; i++) - state_[i] = state(state_idx,i); - } - - KOKKOS_INLINE_FUNCTION - uint32_t urand() { - uint64_t state_0 = state_[ p_ ]; - uint64_t state_1 = state_[ p_ = ( p_ + 1 ) & 15 ]; - state_1 ^= state_1 << 31; - state_1 ^= state_1 >> 11; - state_0 ^= state_0 >> 30; - uint64_t tmp = ( state_[ p_ ] = state_0 ^ state_1 ) * 1181783497276652981ULL; - tmp = tmp>>16; - return static_cast(tmp&MAX_URAND); - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64() { - uint64_t state_0 = state_[ p_ ]; - uint64_t state_1 = state_[ p_ = ( p_ + 1 ) & 15 ]; - state_1 ^= state_1 << 31; - state_1 ^= state_1 >> 11; - state_0 ^= state_0 >> 30; - return (( state_[ p_ ] = state_0 ^ state_1 ) * 1181783497276652981LL) - 1; - } - - KOKKOS_INLINE_FUNCTION - uint32_t urand(const uint32_t& range) { - const uint32_t max_val = (MAX_URAND/range)*range; - uint32_t tmp = urand(); - while(tmp>=max_val) - tmp = urand(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - uint32_t urand(const uint32_t& start, const uint32_t& end ) { - return urand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64(const uint64_t& range) { - const uint64_t max_val = (MAX_URAND64/range)*range; - uint64_t tmp = urand64(); - while(tmp>=max_val) - tmp = urand64(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64(const uint64_t& start, const uint64_t& end ) { - return urand64(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - int rand() { - return static_cast(urand()/2); - } - - KOKKOS_INLINE_FUNCTION - int rand(const int& range) { - const int max_val = (MAX_RAND/range)*range; - int tmp = rand(); - while(tmp>=max_val) - tmp = rand(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - int rand(const int& start, const int& end ) { - return rand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64() { - return static_cast(urand64()/2); - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64(const int64_t& range) { - const int64_t max_val = (MAX_RAND64/range)*range; - int64_t tmp = rand64(); - while(tmp>=max_val) - tmp = rand64(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64(const int64_t& start, const int64_t& end ) { - return rand64(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - float frand() { - return 1.0f * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - float frand(const float& range) { - return range * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - float frand(const float& start, const float& end ) { - return frand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - double drand() { - return 1.0 * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - double drand(const double& range) { - return range * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - double drand(const double& start, const double& end ) { - return frand(end-start)+start; - } - - //Marsaglia polar method for drawing a standard normal distributed random number - KOKKOS_INLINE_FUNCTION - double normal() { - double S = 2.0; - double U; - while(S>=1.0) { - U = 2.0*drand() - 1.0; - const double V = 2.0*drand() - 1.0; - S = U*U+V*V; - } - return U*std::sqrt(-2.0*log(S)/S); - } - - KOKKOS_INLINE_FUNCTION - double normal(const double& mean, const double& std_dev=1.0) { - return mean + normal()*std_dev; - } - }; - - - template - class Random_XorShift1024_Pool { - private: - typedef View int_view_type; - typedef View state_data_type; - - int_view_type locks_; - state_data_type state_; - int_view_type p_; - int num_states_; - friend class Random_XorShift1024; - - public: - typedef Random_XorShift1024 generator_type; - - typedef DeviceType device_type; - - KOKKOS_INLINE_FUNCTION - Random_XorShift1024_Pool() { - num_states_ = 0; - } - - inline - Random_XorShift1024_Pool(uint64_t seed){ - num_states_ = 0; -#ifdef KOKKOS_ENABLE_DEPRECATED_CODE - init(seed,DeviceType::max_hardware_threads()); -#else - init(seed,DeviceType::impl_max_hardware_threads()); -#endif - } - - KOKKOS_INLINE_FUNCTION - Random_XorShift1024_Pool(const Random_XorShift1024_Pool& src): - locks_(src.locks_), - state_(src.state_), - p_(src.p_), - num_states_(src.num_states_) - {} - - KOKKOS_INLINE_FUNCTION - Random_XorShift1024_Pool operator = (const Random_XorShift1024_Pool& src) { - locks_ = src.locks_; - state_ = src.state_; - p_ = src.p_; - num_states_ = src.num_states_; - return *this; - } - - inline - void init(uint64_t seed, int num_states) { - if(seed==0) - seed = uint64_t(1318319); - num_states_ = num_states; - locks_ = int_view_type("Kokkos::Random_XorShift1024::locks",num_states_); - state_ = state_data_type("Kokkos::Random_XorShift1024::state",num_states_); - p_ = int_view_type("Kokkos::Random_XorShift1024::p",num_states_); - - typename state_data_type::HostMirror h_state = create_mirror_view(state_); - typename int_view_type::HostMirror h_lock = create_mirror_view(locks_); - typename int_view_type::HostMirror h_p = create_mirror_view(p_); - - // Execute on the HostMirror's default execution space. - Random_XorShift64 gen(seed,0); - for(int i = 0; i < 17; i++) - gen.rand(); - for(int i = 0; i < num_states_; i++) { - for(int j = 0; j < 16 ; j++) { - int n1 = gen.rand(); - int n2 = gen.rand(); - int n3 = gen.rand(); - int n4 = gen.rand(); - h_state(i,j) = (((static_cast(n1)) & 0xffff)<<00) | - (((static_cast(n2)) & 0xffff)<<16) | - (((static_cast(n3)) & 0xffff)<<32) | - (((static_cast(n4)) & 0xffff)<<48); - } - h_p(i) = 0; - h_lock(i) = 0; - } - deep_copy(state_,h_state); - deep_copy(locks_,h_lock); - } - - KOKKOS_INLINE_FUNCTION - Random_XorShift1024 get_state() const { -#ifdef KOKKOS_ENABLE_DEPRECATED_CODE - const int i = DeviceType::hardware_thread_id(); -#else - const int i = DeviceType::impl_hardware_thread_id(); -#endif - return Random_XorShift1024(state_,p_(i),i); - }; - - // NOTE: state_idx MUST be unique and less than num_states - KOKKOS_INLINE_FUNCTION - Random_XorShift1024 get_state(const int state_idx) const { - return Random_XorShift1024(state_,p_(state_idx),state_idx); - } - - KOKKOS_INLINE_FUNCTION - void free_state(const Random_XorShift1024& state) const { - for(int i = 0; i<16; i++) - state_(state.state_idx_,i) = state.state_[i]; - p_(state.state_idx_) = state.p_; - } - }; + KOKKOS_INLINE_FUNCTION + void free_state(const Random_XorShift1024& state) const { + for (int i = 0; i < 16; i++) state_(state.state_idx_, i) = state.state_[i]; + p_(state.state_idx_) = state.p_; + } +}; #if defined(KOKKOS_ENABLE_CUDA) && defined(__CUDACC__) - template<> - class Random_XorShift1024 { - private: - int p_; - const int state_idx_; - uint64_t* state_; - const int stride_; - friend class Random_XorShift1024_Pool; - public: +template <> +class Random_XorShift1024 { + private: + int p_; + const int state_idx_; + uint64_t* state_; + const int stride_; + friend class Random_XorShift1024_Pool; - typedef Kokkos::Cuda device_type; - typedef Random_XorShift1024_Pool pool_type; + public: + typedef Kokkos::Cuda device_type; + typedef Random_XorShift1024_Pool pool_type; - enum {MAX_URAND = 0xffffffffU}; - enum {MAX_URAND64 = 0xffffffffffffffffULL-1}; - enum {MAX_RAND = static_cast(0xffffffffU/2)}; - enum {MAX_RAND64 = static_cast(0xffffffffffffffffULL/2-1)}; + enum { MAX_URAND = 0xffffffffU }; + enum { MAX_URAND64 = 0xffffffffffffffffULL - 1 }; + enum { MAX_RAND = static_cast(0xffffffffU / 2) }; + enum { MAX_RAND64 = static_cast(0xffffffffffffffffULL / 2 - 1) }; - KOKKOS_INLINE_FUNCTION - Random_XorShift1024 (const typename pool_type::state_data_type& state, int p, int state_idx = 0): - p_(p),state_idx_(state_idx),state_(&state(state_idx,0)),stride_(state.stride_1()){ - } + KOKKOS_INLINE_FUNCTION + Random_XorShift1024(const typename pool_type::state_data_type& state, int p, + int state_idx = 0) + : p_(p), + state_idx_(state_idx), + state_(&state(state_idx, 0)), + stride_(state.stride_1()) {} - KOKKOS_INLINE_FUNCTION - uint32_t urand() { - uint64_t state_0 = state_[ p_ * stride_ ]; - uint64_t state_1 = state_[ (p_ = ( p_ + 1 ) & 15) * stride_ ]; - state_1 ^= state_1 << 31; - state_1 ^= state_1 >> 11; - state_0 ^= state_0 >> 30; - uint64_t tmp = ( state_[ p_ * stride_ ] = state_0 ^ state_1 ) * 1181783497276652981ULL; - tmp = tmp>>16; - return static_cast(tmp&MAX_URAND); - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64() { - uint64_t state_0 = state_[ p_ * stride_ ]; - uint64_t state_1 = state_[ (p_ = ( p_ + 1 ) & 15) * stride_ ]; - state_1 ^= state_1 << 31; - state_1 ^= state_1 >> 11; - state_0 ^= state_0 >> 30; - return (( state_[ p_ * stride_ ] = state_0 ^ state_1 ) * 1181783497276652981LL) - 1; - } - - KOKKOS_INLINE_FUNCTION - uint32_t urand(const uint32_t& range) { - const uint32_t max_val = (MAX_URAND/range)*range; - uint32_t tmp = urand(); - while(tmp>=max_val) - urand(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - uint32_t urand(const uint32_t& start, const uint32_t& end ) { - return urand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64(const uint64_t& range) { - const uint64_t max_val = (MAX_URAND64/range)*range; - uint64_t tmp = urand64(); - while(tmp>=max_val) - urand64(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64(const uint64_t& start, const uint64_t& end ) { - return urand64(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - int rand() { - return static_cast(urand()/2); - } - - KOKKOS_INLINE_FUNCTION - int rand(const int& range) { - const int max_val = (MAX_RAND/range)*range; - int tmp = rand(); - while(tmp>=max_val) - rand(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - int rand(const int& start, const int& end ) { - return rand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64() { - return static_cast(urand64()/2); - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64(const int64_t& range) { - const int64_t max_val = (MAX_RAND64/range)*range; - int64_t tmp = rand64(); - while(tmp>=max_val) - rand64(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64(const int64_t& start, const int64_t& end ) { - return rand64(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - float frand() { - return 1.0f * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - float frand(const float& range) { - return range * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - float frand(const float& start, const float& end ) { - return frand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - double drand() { - return 1.0 * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - double drand(const double& range) { - return range * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - double drand(const double& start, const double& end ) { - return frand(end-start)+start; - } - - //Marsaglia polar method for drawing a standard normal distributed random number - KOKKOS_INLINE_FUNCTION - double normal() { - double S = 2.0; - double U; - while(S>=1.0) { - U = 2.0*drand() - 1.0; - const double V = 2.0*drand() - 1.0; - S = U*U+V*V; - } - return U*std::sqrt(-2.0*log(S)/S); - } - - KOKKOS_INLINE_FUNCTION - double normal(const double& mean, const double& std_dev=1.0) { - return mean + normal()*std_dev; - } - }; - -template<> -inline -Random_XorShift64_Pool::Random_XorShift64_Pool(uint64_t seed) { - num_states_ = 0; - init(seed,4*32768); -} - -template<> -KOKKOS_INLINE_FUNCTION -Random_XorShift64 Random_XorShift64_Pool::get_state() const { -#ifdef __CUDA_ARCH__ - const int i_offset = (threadIdx.x*blockDim.y + threadIdx.y)*blockDim.z+threadIdx.z; - int i = (((blockIdx.x*gridDim.y+blockIdx.y)*gridDim.z + blockIdx.z) * - blockDim.x*blockDim.y*blockDim.z + i_offset)%num_states_; - while(Kokkos::atomic_compare_exchange(&locks_(i),0,1)) { - i+=blockDim.x*blockDim.y*blockDim.z; - if(i>=num_states_) {i = i_offset;} + KOKKOS_INLINE_FUNCTION + uint32_t urand() { + uint64_t state_0 = state_[p_ * stride_]; + uint64_t state_1 = state_[(p_ = (p_ + 1) & 15) * stride_]; + state_1 ^= state_1 << 31; + state_1 ^= state_1 >> 11; + state_0 ^= state_0 >> 30; + uint64_t tmp = + (state_[p_ * stride_] = state_0 ^ state_1) * 1181783497276652981ULL; + tmp = tmp >> 16; + return static_cast(tmp & MAX_URAND); } - return Random_XorShift64(state_(i),i); + KOKKOS_INLINE_FUNCTION + uint64_t urand64() { + uint64_t state_0 = state_[p_ * stride_]; + uint64_t state_1 = state_[(p_ = (p_ + 1) & 15) * stride_]; + state_1 ^= state_1 << 31; + state_1 ^= state_1 >> 11; + state_0 ^= state_0 >> 30; + return ((state_[p_ * stride_] = state_0 ^ state_1) * + 1181783497276652981LL) - + 1; + } + + KOKKOS_INLINE_FUNCTION + uint32_t urand(const uint32_t& range) { + const uint32_t max_val = (MAX_URAND / range) * range; + uint32_t tmp = urand(); + while (tmp >= max_val) urand(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + uint32_t urand(const uint32_t& start, const uint32_t& end) { + return urand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + uint64_t urand64(const uint64_t& range) { + const uint64_t max_val = (MAX_URAND64 / range) * range; + uint64_t tmp = urand64(); + while (tmp >= max_val) urand64(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + uint64_t urand64(const uint64_t& start, const uint64_t& end) { + return urand64(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + int rand() { return static_cast(urand() / 2); } + + KOKKOS_INLINE_FUNCTION + int rand(const int& range) { + const int max_val = (MAX_RAND / range) * range; + int tmp = rand(); + while (tmp >= max_val) rand(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + int rand(const int& start, const int& end) { + return rand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + int64_t rand64() { return static_cast(urand64() / 2); } + + KOKKOS_INLINE_FUNCTION + int64_t rand64(const int64_t& range) { + const int64_t max_val = (MAX_RAND64 / range) * range; + int64_t tmp = rand64(); + while (tmp >= max_val) rand64(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + int64_t rand64(const int64_t& start, const int64_t& end) { + return rand64(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + float frand() { return 1.0f * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + float frand(const float& range) { return range * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + float frand(const float& start, const float& end) { + return frand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + double drand() { return 1.0 * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + double drand(const double& range) { return range * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + double drand(const double& start, const double& end) { + return frand(end - start) + start; + } + + // Marsaglia polar method for drawing a standard normal distributed random + // number + KOKKOS_INLINE_FUNCTION + double normal() { + double S = 2.0; + double U; + while (S >= 1.0) { + U = 2.0 * drand() - 1.0; + const double V = 2.0 * drand() - 1.0; + S = U * U + V * V; + } + return U * std::sqrt(-2.0 * log(S) / S); + } + + KOKKOS_INLINE_FUNCTION + double normal(const double& mean, const double& std_dev = 1.0) { + return mean + normal() * std_dev; + } +}; + +template <> +inline Random_XorShift64_Pool::Random_XorShift64_Pool( + uint64_t seed) { + num_states_ = 0; + init(seed, 4 * 32768); +} + +template <> +KOKKOS_INLINE_FUNCTION Random_XorShift64 +Random_XorShift64_Pool::get_state() const { +#ifdef __CUDA_ARCH__ + const int i_offset = + (threadIdx.x * blockDim.y + threadIdx.y) * blockDim.z + threadIdx.z; + int i = (((blockIdx.x * gridDim.y + blockIdx.y) * gridDim.z + blockIdx.z) * + blockDim.x * blockDim.y * blockDim.z + + i_offset) % + num_states_; + while (Kokkos::atomic_compare_exchange(&locks_(i), 0, 1)) { + i += blockDim.x * blockDim.y * blockDim.z; + if (i >= num_states_) { + i = i_offset; + } + } + + return Random_XorShift64(state_(i), i); #else - return Random_XorShift64(state_(0),0); + return Random_XorShift64(state_(0), 0); #endif } -template<> -KOKKOS_INLINE_FUNCTION -void Random_XorShift64_Pool::free_state(const Random_XorShift64 &state) const { +template <> +KOKKOS_INLINE_FUNCTION void Random_XorShift64_Pool::free_state( + const Random_XorShift64& state) const { state_(state.state_idx_) = state.state_; #ifdef __CUDA_ARCH__ locks_(state.state_idx_) = 0; @@ -1249,24 +1211,28 @@ void Random_XorShift64_Pool::free_state(const Random_XorShift64 -inline -Random_XorShift1024_Pool::Random_XorShift1024_Pool(uint64_t seed) { +template <> +inline Random_XorShift1024_Pool::Random_XorShift1024_Pool( + uint64_t seed) { num_states_ = 0; - init(seed,4*32768); + init(seed, 4 * 32768); } -template<> -KOKKOS_INLINE_FUNCTION -Random_XorShift1024 Random_XorShift1024_Pool::get_state() const { +template <> +KOKKOS_INLINE_FUNCTION Random_XorShift1024 +Random_XorShift1024_Pool::get_state() const { #ifdef __CUDA_ARCH__ - const int i_offset = (threadIdx.x*blockDim.y + threadIdx.y)*blockDim.z+threadIdx.z; - int i = (((blockIdx.x*gridDim.y+blockIdx.y)*gridDim.z + blockIdx.z) * - blockDim.x*blockDim.y*blockDim.z + i_offset)%num_states_; - while(Kokkos::atomic_compare_exchange(&locks_(i),0,1)) { - i+=blockDim.x*blockDim.y*blockDim.z; - if(i>=num_states_) {i = i_offset;} + const int i_offset = + (threadIdx.x * blockDim.y + threadIdx.y) * blockDim.z + threadIdx.z; + int i = (((blockIdx.x * gridDim.y + blockIdx.y) * gridDim.z + blockIdx.z) * + blockDim.x * blockDim.y * blockDim.z + + i_offset) % + num_states_; + while (Kokkos::atomic_compare_exchange(&locks_(i), 0, 1)) { + i += blockDim.x * blockDim.y * blockDim.z; + if (i >= num_states_) { + i = i_offset; + } } return Random_XorShift1024(state_, p_(i), i); @@ -1275,210 +1241,205 @@ Random_XorShift1024 Random_XorShift1024_Pool::get_st #endif } -template<> -KOKKOS_INLINE_FUNCTION -void Random_XorShift1024_Pool::free_state(const Random_XorShift1024 &state) const { - for(int i=0; i<16; i++) - state_(state.state_idx_,i) = state.state_[i]; +template <> +KOKKOS_INLINE_FUNCTION void Random_XorShift1024_Pool::free_state( + const Random_XorShift1024& state) const { + for (int i = 0; i < 16; i++) state_(state.state_idx_, i) = state.state_[i]; #ifdef __CUDA_ARCH__ locks_(state.state_idx_) = 0; return; #endif } - #endif -#if defined(KOKKOS_ENABLE_ROCM) +#if defined(KOKKOS_ENABLE_ROCM) - template<> - class Random_XorShift1024 { - private: - int p_; - const int state_idx_; - uint64_t* state_; - const int stride_; - friend class Random_XorShift1024_Pool; - public: +template <> +class Random_XorShift1024 { + private: + int p_; + const int state_idx_; + uint64_t* state_; + const int stride_; + friend class Random_XorShift1024_Pool; - typedef Kokkos::Experimental::ROCm device_type; - typedef Random_XorShift1024_Pool pool_type; + public: + typedef Kokkos::Experimental::ROCm device_type; + typedef Random_XorShift1024_Pool pool_type; - enum {MAX_URAND = 0xffffffffU}; - enum {MAX_URAND64 = 0xffffffffffffffffULL-1}; - enum {MAX_RAND = static_cast(0xffffffffU/2)}; - enum {MAX_RAND64 = static_cast(0xffffffffffffffffULL/2-1)}; + enum { MAX_URAND = 0xffffffffU }; + enum { MAX_URAND64 = 0xffffffffffffffffULL - 1 }; + enum { MAX_RAND = static_cast(0xffffffffU / 2) }; + enum { MAX_RAND64 = static_cast(0xffffffffffffffffULL / 2 - 1) }; - KOKKOS_INLINE_FUNCTION - Random_XorShift1024 (const typename pool_type::state_data_type& state, int p, int state_idx = 0): - p_(p),state_idx_(state_idx),state_(&state(state_idx,0)),stride_(state.stride_1()){ - } + KOKKOS_INLINE_FUNCTION + Random_XorShift1024(const typename pool_type::state_data_type& state, int p, + int state_idx = 0) + : p_(p), + state_idx_(state_idx), + state_(&state(state_idx, 0)), + stride_(state.stride_1()) {} - KOKKOS_INLINE_FUNCTION - uint32_t urand() { - uint64_t state_0 = state_[ p_ * stride_ ]; - uint64_t state_1 = state_[ (p_ = ( p_ + 1 ) & 15) * stride_ ]; - state_1 ^= state_1 << 31; - state_1 ^= state_1 >> 11; - state_0 ^= state_0 >> 30; - uint64_t tmp = ( state_[ p_ * stride_ ] = state_0 ^ state_1 ) * 1181783497276652981ULL; - tmp = tmp>>16; - return static_cast(tmp&MAX_URAND); - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64() { - uint64_t state_0 = state_[ p_ * stride_ ]; - uint64_t state_1 = state_[ (p_ = ( p_ + 1 ) & 15) * stride_ ]; - state_1 ^= state_1 << 31; - state_1 ^= state_1 >> 11; - state_0 ^= state_0 >> 30; - return (( state_[ p_ * stride_ ] = state_0 ^ state_1 ) * 1181783497276652981LL) - 1; - } - - KOKKOS_INLINE_FUNCTION - uint32_t urand(const uint32_t& range) { - const uint32_t max_val = (MAX_URAND/range)*range; - uint32_t tmp = urand(); - while(tmp>=max_val) - urand(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - uint32_t urand(const uint32_t& start, const uint32_t& end ) { - return urand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64(const uint64_t& range) { - const uint64_t max_val = (MAX_URAND64/range)*range; - uint64_t tmp = urand64(); - while(tmp>=max_val) - urand64(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - uint64_t urand64(const uint64_t& start, const uint64_t& end ) { - return urand64(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - int rand() { - return static_cast(urand()/2); - } - - KOKKOS_INLINE_FUNCTION - int rand(const int& range) { - const int max_val = (MAX_RAND/range)*range; - int tmp = rand(); - while(tmp>=max_val) - rand(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - int rand(const int& start, const int& end ) { - return rand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64() { - return static_cast(urand64()/2); - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64(const int64_t& range) { - const int64_t max_val = (MAX_RAND64/range)*range; - int64_t tmp = rand64(); - while(tmp>=max_val) - rand64(); - return tmp%range; - } - - KOKKOS_INLINE_FUNCTION - int64_t rand64(const int64_t& start, const int64_t& end ) { - return rand64(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - float frand() { - return 1.0f * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - float frand(const float& range) { - return range * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - float frand(const float& start, const float& end ) { - return frand(end-start)+start; - } - - KOKKOS_INLINE_FUNCTION - double drand() { - return 1.0 * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - double drand(const double& range) { - return range * urand64()/MAX_URAND64; - } - - KOKKOS_INLINE_FUNCTION - double drand(const double& start, const double& end ) { - return frand(end-start)+start; - } - - //Marsaglia polar method for drawing a standard normal distributed random number - KOKKOS_INLINE_FUNCTION - double normal() { - double S = 2.0; - double U; - while(S>=1.0) { - U = 2.0*drand() - 1.0; - const double V = 2.0*drand() - 1.0; - S = U*U+V*V; - } - return U*std::sqrt(-2.0*log(S)/S); - } - - KOKKOS_INLINE_FUNCTION - double normal(const double& mean, const double& std_dev=1.0) { - return mean + normal()*std_dev; - } - }; - -template<> -inline -Random_XorShift64_Pool::Random_XorShift64_Pool(uint64_t seed) { - num_states_ = 0; - init(seed,4*32768); -} - -template<> -KOKKOS_INLINE_FUNCTION -Random_XorShift64 Random_XorShift64_Pool::get_state() const { -#ifdef __HCC_ACCELERATOR__ - const int i_offset = (threadIdx_x*blockDim_y + threadIdx_y)*blockDim_z+threadIdx_z; - int i = (((blockIdx_x*gridDim_y+blockIdx_y)*gridDim_z + blockIdx_z) * - blockDim_x*blockDim_y*blockDim_z + i_offset)%num_states_; - while(Kokkos::atomic_compare_exchange(&locks_(i),0,1)) { - i+=blockDim_x*blockDim_y*blockDim_z; - if(i>=num_states_) {i = i_offset;} + KOKKOS_INLINE_FUNCTION + uint32_t urand() { + uint64_t state_0 = state_[p_ * stride_]; + uint64_t state_1 = state_[(p_ = (p_ + 1) & 15) * stride_]; + state_1 ^= state_1 << 31; + state_1 ^= state_1 >> 11; + state_0 ^= state_0 >> 30; + uint64_t tmp = + (state_[p_ * stride_] = state_0 ^ state_1) * 1181783497276652981ULL; + tmp = tmp >> 16; + return static_cast(tmp & MAX_URAND); } - return Random_XorShift64(state_(i),i); + KOKKOS_INLINE_FUNCTION + uint64_t urand64() { + uint64_t state_0 = state_[p_ * stride_]; + uint64_t state_1 = state_[(p_ = (p_ + 1) & 15) * stride_]; + state_1 ^= state_1 << 31; + state_1 ^= state_1 >> 11; + state_0 ^= state_0 >> 30; + return ((state_[p_ * stride_] = state_0 ^ state_1) * + 1181783497276652981LL) - + 1; + } + + KOKKOS_INLINE_FUNCTION + uint32_t urand(const uint32_t& range) { + const uint32_t max_val = (MAX_URAND / range) * range; + uint32_t tmp = urand(); + while (tmp >= max_val) urand(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + uint32_t urand(const uint32_t& start, const uint32_t& end) { + return urand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + uint64_t urand64(const uint64_t& range) { + const uint64_t max_val = (MAX_URAND64 / range) * range; + uint64_t tmp = urand64(); + while (tmp >= max_val) urand64(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + uint64_t urand64(const uint64_t& start, const uint64_t& end) { + return urand64(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + int rand() { return static_cast(urand() / 2); } + + KOKKOS_INLINE_FUNCTION + int rand(const int& range) { + const int max_val = (MAX_RAND / range) * range; + int tmp = rand(); + while (tmp >= max_val) rand(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + int rand(const int& start, const int& end) { + return rand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + int64_t rand64() { return static_cast(urand64() / 2); } + + KOKKOS_INLINE_FUNCTION + int64_t rand64(const int64_t& range) { + const int64_t max_val = (MAX_RAND64 / range) * range; + int64_t tmp = rand64(); + while (tmp >= max_val) rand64(); + return tmp % range; + } + + KOKKOS_INLINE_FUNCTION + int64_t rand64(const int64_t& start, const int64_t& end) { + return rand64(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + float frand() { return 1.0f * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + float frand(const float& range) { return range * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + float frand(const float& start, const float& end) { + return frand(end - start) + start; + } + + KOKKOS_INLINE_FUNCTION + double drand() { return 1.0 * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + double drand(const double& range) { return range * urand64() / MAX_URAND64; } + + KOKKOS_INLINE_FUNCTION + double drand(const double& start, const double& end) { + return frand(end - start) + start; + } + + // Marsaglia polar method for drawing a standard normal distributed random + // number + KOKKOS_INLINE_FUNCTION + double normal() { + double S = 2.0; + double U; + while (S >= 1.0) { + U = 2.0 * drand() - 1.0; + const double V = 2.0 * drand() - 1.0; + S = U * U + V * V; + } + return U * std::sqrt(-2.0 * log(S) / S); + } + + KOKKOS_INLINE_FUNCTION + double normal(const double& mean, const double& std_dev = 1.0) { + return mean + normal() * std_dev; + } +}; + +template <> +inline Random_XorShift64_Pool< + Kokkos::Experimental::ROCm>::Random_XorShift64_Pool(uint64_t seed) { + num_states_ = 0; + init(seed, 4 * 32768); +} + +template <> +KOKKOS_INLINE_FUNCTION Random_XorShift64 +Random_XorShift64_Pool::get_state() const { +#ifdef __HCC_ACCELERATOR__ + const int i_offset = + (threadIdx_x * blockDim_y + threadIdx_y) * blockDim_z + threadIdx_z; + int i = (((blockIdx_x * gridDim_y + blockIdx_y) * gridDim_z + blockIdx_z) * + blockDim_x * blockDim_y * blockDim_z + + i_offset) % + num_states_; + while (Kokkos::atomic_compare_exchange(&locks_(i), 0, 1)) { + i += blockDim_x * blockDim_y * blockDim_z; + if (i >= num_states_) { + i = i_offset; + } + } + + return Random_XorShift64(state_(i), i); #else - return Random_XorShift64(state_(0),0); + return Random_XorShift64(state_(0), 0); #endif } -template<> -KOKKOS_INLINE_FUNCTION -void Random_XorShift64_Pool::free_state(const Random_XorShift64 &state) const { +template <> +KOKKOS_INLINE_FUNCTION void +Random_XorShift64_Pool::free_state( + const Random_XorShift64& state) const { #ifdef __HCC_ACCELERATOR__ state_(state.state_idx_) = state.state_; locks_(state.state_idx_) = 0; @@ -1486,24 +1447,28 @@ void Random_XorShift64_Pool::free_state(const Random #endif } - -template<> -inline -Random_XorShift1024_Pool::Random_XorShift1024_Pool(uint64_t seed) { +template <> +inline Random_XorShift1024_Pool< + Kokkos::Experimental::ROCm>::Random_XorShift1024_Pool(uint64_t seed) { num_states_ = 0; - init(seed,4*32768); + init(seed, 4 * 32768); } -template<> -KOKKOS_INLINE_FUNCTION -Random_XorShift1024 Random_XorShift1024_Pool::get_state() const { +template <> +KOKKOS_INLINE_FUNCTION Random_XorShift1024 +Random_XorShift1024_Pool::get_state() const { #ifdef __HCC_ACCELERATOR__ - const int i_offset = (threadIdx_x*blockDim_y + threadIdx_y)*blockDim_z+threadIdx_z; - int i = (((blockIdx_x*gridDim_y+blockIdx_y)*gridDim_z + blockIdx_z) * - blockDim_x*blockDim_y*blockDim_z + i_offset)%num_states_; - while(Kokkos::atomic_compare_exchange(&locks_(i),0,1)) { - i+=blockDim_x*blockDim_y*blockDim_z; - if(i>=num_states_) {i = i_offset;} + const int i_offset = + (threadIdx_x * blockDim_y + threadIdx_y) * blockDim_z + threadIdx_z; + int i = (((blockIdx_x * gridDim_y + blockIdx_y) * gridDim_z + blockIdx_z) * + blockDim_x * blockDim_y * blockDim_z + + i_offset) % + num_states_; + while (Kokkos::atomic_compare_exchange(&locks_(i), 0, 1)) { + i += blockDim_x * blockDim_y * blockDim_z; + if (i >= num_states_) { + i = i_offset; + } } return Random_XorShift1024(state_, p_(i), i); @@ -1512,515 +1477,589 @@ Random_XorShift1024 Random_XorShift1024_Pool -KOKKOS_INLINE_FUNCTION -void Random_XorShift1024_Pool::free_state(const Random_XorShift1024 &state) const { +template <> +KOKKOS_INLINE_FUNCTION void +Random_XorShift1024_Pool::free_state( + const Random_XorShift1024& state) const { #ifdef __HCC_ACCELERATOR__ - for(int i=0; i<16; i++) - state_(state.state_idx_,i) = state.state_[i]; + for (int i = 0; i < 16; i++) state_(state.state_idx_, i) = state.state_[i]; locks_(state.state_idx_) = 0; return; #endif } - #endif - namespace Impl { -template +template struct fill_random_functor_range; -template +template struct fill_random_functor_begin_end; -template -struct fill_random_functor_range{ +template +struct fill_random_functor_range { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; typename ViewType::const_value_type range; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_range(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type range_): - a(a_),rand_pool(rand_pool_),range(range_) {} + typename ViewType::const_value_type range_) + : a(a_), rand_pool(rand_pool_), range(range_) {} KOKKOS_INLINE_FUNCTION - void operator() (const IndexType& i) const { + void operator()(const IndexType& i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) - a(idx) = Rand::draw(gen,range); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) + a(idx) = Rand::draw(gen, range); } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_range{ +template +struct fill_random_functor_range { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; typename ViewType::const_value_type range; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_range(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type range_): - a(a_),rand_pool(rand_pool_),range(range_) {} + typename ViewType::const_value_type range_) + : a(a_), rand_pool(rand_pool_), range(range_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - a(idx,k) = Rand::draw(gen,range); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + a(idx, k) = Rand::draw(gen, range); } } rand_pool.free_state(gen); } }; - -template -struct fill_random_functor_range{ +template +struct fill_random_functor_range { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; typename ViewType::const_value_type range; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_range(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type range_): - a(a_),rand_pool(rand_pool_),range(range_) {} + typename ViewType::const_value_type range_) + : a(a_), rand_pool(rand_pool_), range(range_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - a(idx,k,l) = Rand::draw(gen,range); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + a(idx, k, l) = Rand::draw(gen, range); } } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_range{ +template +struct fill_random_functor_range { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; typename ViewType::const_value_type range; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_range(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type range_): - a(a_),rand_pool(rand_pool_),range(range_) {} + typename ViewType::const_value_type range_) + : a(a_), rand_pool(rand_pool_), range(range_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - for(IndexType m=0;m(a.extent(3));m++) - a(idx,k,l,m) = Rand::draw(gen,range); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + for (IndexType m = 0; m < static_cast(a.extent(3)); m++) + a(idx, k, l, m) = Rand::draw(gen, range); } } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_range{ +template +struct fill_random_functor_range { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; typename ViewType::const_value_type range; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_range(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type range_): - a(a_),rand_pool(rand_pool_),range(range_) {} + typename ViewType::const_value_type range_) + : a(a_), rand_pool(rand_pool_), range(range_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - for(IndexType m=0;m(a.extent(3));m++) - for(IndexType n=0;n(a.extent(4));n++) - a(idx,k,l,m,n) = Rand::draw(gen,range); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + for (IndexType m = 0; m < static_cast(a.extent(3)); m++) + for (IndexType n = 0; n < static_cast(a.extent(4)); + n++) + a(idx, k, l, m, n) = Rand::draw(gen, range); } } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_range{ +template +struct fill_random_functor_range { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; typename ViewType::const_value_type range; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_range(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type range_): - a(a_),rand_pool(rand_pool_),range(range_) {} + typename ViewType::const_value_type range_) + : a(a_), rand_pool(rand_pool_), range(range_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - for(IndexType m=0;m(a.extent(3));m++) - for(IndexType n=0;n(a.extent(4));n++) - for(IndexType o=0;o(a.extent(5));o++) - a(idx,k,l,m,n,o) = Rand::draw(gen,range); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + for (IndexType m = 0; m < static_cast(a.extent(3)); m++) + for (IndexType n = 0; n < static_cast(a.extent(4)); + n++) + for (IndexType o = 0; o < static_cast(a.extent(5)); + o++) + a(idx, k, l, m, n, o) = Rand::draw(gen, range); } } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_range{ +template +struct fill_random_functor_range { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; typename ViewType::const_value_type range; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_range(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type range_): - a(a_),rand_pool(rand_pool_),range(range_) {} + typename ViewType::const_value_type range_) + : a(a_), rand_pool(rand_pool_), range(range_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - for(IndexType m=0;m(a.extent(3));m++) - for(IndexType n=0;n(a.extent(4));n++) - for(IndexType o=0;o(a.extent(5));o++) - for(IndexType p=0;p(a.extent(6));p++) - a(idx,k,l,m,n,o,p) = Rand::draw(gen,range); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + for (IndexType m = 0; m < static_cast(a.extent(3)); m++) + for (IndexType n = 0; n < static_cast(a.extent(4)); + n++) + for (IndexType o = 0; o < static_cast(a.extent(5)); + o++) + for (IndexType p = 0; p < static_cast(a.extent(6)); + p++) + a(idx, k, l, m, n, o, p) = Rand::draw(gen, range); } } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_range{ +template +struct fill_random_functor_range { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; typename ViewType::const_value_type range; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_range(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type range_): - a(a_),rand_pool(rand_pool_),range(range_) {} + typename ViewType::const_value_type range_) + : a(a_), rand_pool(rand_pool_), range(range_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - for(IndexType m=0;m(a.extent(3));m++) - for(IndexType n=0;n(a.extent(4));n++) - for(IndexType o=0;o(a.extent(5));o++) - for(IndexType p=0;p(a.extent(6));p++) - for(IndexType q=0;q(a.extent(7));q++) - a(idx,k,l,m,n,o,p,q) = Rand::draw(gen,range); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + for (IndexType m = 0; m < static_cast(a.extent(3)); m++) + for (IndexType n = 0; n < static_cast(a.extent(4)); + n++) + for (IndexType o = 0; o < static_cast(a.extent(5)); + o++) + for (IndexType p = 0; p < static_cast(a.extent(6)); + p++) + for (IndexType q = 0; + q < static_cast(a.extent(7)); q++) + a(idx, k, l, m, n, o, p, q) = Rand::draw(gen, range); } } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_begin_end{ +template +struct fill_random_functor_begin_end { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; - typename ViewType::const_value_type begin,end; + typename ViewType::const_value_type begin, end; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_): - a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {} + typename ViewType::const_value_type begin_, + typename ViewType::const_value_type end_) + : a(a_), rand_pool(rand_pool_), begin(begin_), end(end_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) - a(idx) = Rand::draw(gen,begin,end); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) + a(idx) = Rand::draw(gen, begin, end); } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_begin_end{ +template +struct fill_random_functor_begin_end { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; - typename ViewType::const_value_type begin,end; + typename ViewType::const_value_type begin, end; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_): - a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {} + typename ViewType::const_value_type begin_, + typename ViewType::const_value_type end_) + : a(a_), rand_pool(rand_pool_), begin(begin_), end(end_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - a(idx,k) = Rand::draw(gen,begin,end); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + a(idx, k) = Rand::draw(gen, begin, end); } } rand_pool.free_state(gen); } }; - -template -struct fill_random_functor_begin_end{ +template +struct fill_random_functor_begin_end { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; - typename ViewType::const_value_type begin,end; + typename ViewType::const_value_type begin, end; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_): - a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {} + typename ViewType::const_value_type begin_, + typename ViewType::const_value_type end_) + : a(a_), rand_pool(rand_pool_), begin(begin_), end(end_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - a(idx,k,l) = Rand::draw(gen,begin,end); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + a(idx, k, l) = Rand::draw(gen, begin, end); } } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_begin_end{ +template +struct fill_random_functor_begin_end { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; - typename ViewType::const_value_type begin,end; + typename ViewType::const_value_type begin, end; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_): - a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {} + typename ViewType::const_value_type begin_, + typename ViewType::const_value_type end_) + : a(a_), rand_pool(rand_pool_), begin(begin_), end(end_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - for(IndexType m=0;m(a.extent(3));m++) - a(idx,k,l,m) = Rand::draw(gen,begin,end); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + for (IndexType m = 0; m < static_cast(a.extent(3)); m++) + a(idx, k, l, m) = Rand::draw(gen, begin, end); } } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_begin_end{ +template +struct fill_random_functor_begin_end { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; - typename ViewType::const_value_type begin,end; + typename ViewType::const_value_type begin, end; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_): - a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {} + typename ViewType::const_value_type begin_, + typename ViewType::const_value_type end_) + : a(a_), rand_pool(rand_pool_), begin(begin_), end(end_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))){ - for(IndexType l=0;l(a.extent(1));l++) - for(IndexType m=0;m(a.extent(2));m++) - for(IndexType n=0;n(a.extent(3));n++) - for(IndexType o=0;o(a.extent(4));o++) - a(idx,l,m,n,o) = Rand::draw(gen,begin,end); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType l = 0; l < static_cast(a.extent(1)); l++) + for (IndexType m = 0; m < static_cast(a.extent(2)); m++) + for (IndexType n = 0; n < static_cast(a.extent(3)); n++) + for (IndexType o = 0; o < static_cast(a.extent(4)); + o++) + a(idx, l, m, n, o) = Rand::draw(gen, begin, end); } } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_begin_end{ +template +struct fill_random_functor_begin_end { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; - typename ViewType::const_value_type begin,end; + typename ViewType::const_value_type begin, end; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_): - a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {} + typename ViewType::const_value_type begin_, + typename ViewType::const_value_type end_) + : a(a_), rand_pool(rand_pool_), begin(begin_), end(end_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - for(IndexType m=0;m(a.extent(3));m++) - for(IndexType n=0;n(a.extent(4));n++) - for(IndexType o=0;o(a.extent(5));o++) - a(idx,k,l,m,n,o) = Rand::draw(gen,begin,end); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + for (IndexType m = 0; m < static_cast(a.extent(3)); m++) + for (IndexType n = 0; n < static_cast(a.extent(4)); + n++) + for (IndexType o = 0; o < static_cast(a.extent(5)); + o++) + a(idx, k, l, m, n, o) = Rand::draw(gen, begin, end); } } rand_pool.free_state(gen); } }; - -template -struct fill_random_functor_begin_end{ +template +struct fill_random_functor_begin_end { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; - typename ViewType::const_value_type begin,end; + typename ViewType::const_value_type begin, end; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_): - a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {} + typename ViewType::const_value_type begin_, + typename ViewType::const_value_type end_) + : a(a_), rand_pool(rand_pool_), begin(begin_), end(end_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - for(IndexType m=0;m(a.extent(3));m++) - for(IndexType n=0;n(a.extent(4));n++) - for(IndexType o=0;o(a.extent(5));o++) - for(IndexType p=0;p(a.extent(6));p++) - a(idx,k,l,m,n,o,p) = Rand::draw(gen,begin,end); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + for (IndexType m = 0; m < static_cast(a.extent(3)); m++) + for (IndexType n = 0; n < static_cast(a.extent(4)); + n++) + for (IndexType o = 0; o < static_cast(a.extent(5)); + o++) + for (IndexType p = 0; p < static_cast(a.extent(6)); + p++) + a(idx, k, l, m, n, o, p) = Rand::draw(gen, begin, end); } } rand_pool.free_state(gen); } }; -template -struct fill_random_functor_begin_end{ +template +struct fill_random_functor_begin_end { typedef typename ViewType::execution_space execution_space; ViewType a; RandomPool rand_pool; - typename ViewType::const_value_type begin,end; + typename ViewType::const_value_type begin, end; - typedef rand Rand; + typedef rand + Rand; fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_, - typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_): - a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {} + typename ViewType::const_value_type begin_, + typename ViewType::const_value_type end_) + : a(a_), rand_pool(rand_pool_), begin(begin_), end(end_) {} KOKKOS_INLINE_FUNCTION - void operator() (IndexType i) const { + void operator()(IndexType i) const { typename RandomPool::generator_type gen = rand_pool.get_state(); - for(IndexType j=0;j(a.extent(0))) { - for(IndexType k=0;k(a.extent(1));k++) - for(IndexType l=0;l(a.extent(2));l++) - for(IndexType m=0;m(a.extent(3));m++) - for(IndexType n=0;n(a.extent(4));n++) - for(IndexType o=0;o(a.extent(5));o++) - for(IndexType p=0;p(a.extent(6));p++) - for(IndexType q=0;q(a.extent(7));q++) - a(idx,k,l,m,n,o,p,q) = Rand::draw(gen,begin,end); + for (IndexType j = 0; j < loops; j++) { + const IndexType idx = i * loops + j; + if (idx < static_cast(a.extent(0))) { + for (IndexType k = 0; k < static_cast(a.extent(1)); k++) + for (IndexType l = 0; l < static_cast(a.extent(2)); l++) + for (IndexType m = 0; m < static_cast(a.extent(3)); m++) + for (IndexType n = 0; n < static_cast(a.extent(4)); + n++) + for (IndexType o = 0; o < static_cast(a.extent(5)); + o++) + for (IndexType p = 0; p < static_cast(a.extent(6)); + p++) + for (IndexType q = 0; + q < static_cast(a.extent(7)); q++) + a(idx, k, l, m, n, o, p, q) = Rand::draw(gen, begin, end); } } rand_pool.free_state(gen); } }; -} +} // namespace Impl -template -void fill_random(ViewType a, RandomPool g, typename ViewType::const_value_type range) { +template +void fill_random(ViewType a, RandomPool g, + typename ViewType::const_value_type range) { int64_t LDA = a.extent(0); - if(LDA>0) - parallel_for((LDA+127)/128,Impl::fill_random_functor_range(a,g,range)); + if (LDA > 0) + parallel_for((LDA + 127) / 128, + Impl::fill_random_functor_range( + a, g, range)); } -template -void fill_random(ViewType a, RandomPool g, typename ViewType::const_value_type begin,typename ViewType::const_value_type end ) { +template +void fill_random(ViewType a, RandomPool g, + typename ViewType::const_value_type begin, + typename ViewType::const_value_type end) { int64_t LDA = a.extent(0); - if(LDA>0) - parallel_for((LDA+127)/128,Impl::fill_random_functor_begin_end(a,g,begin,end)); -} + if (LDA > 0) + parallel_for((LDA + 127) / 128, + Impl::fill_random_functor_begin_end( + a, g, begin, end)); } +} // namespace Kokkos #endif diff --git a/lib/kokkos/algorithms/src/Kokkos_Sort.hpp b/lib/kokkos/algorithms/src/Kokkos_Sort.hpp index 7fb8505fe5..b7a988361f 100644 --- a/lib/kokkos/algorithms/src/Kokkos_Sort.hpp +++ b/lib/kokkos/algorithms/src/Kokkos_Sort.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,12 +37,11 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ - #ifndef KOKKOS_SORT_HPP_ #define KOKKOS_SORT_HPP_ @@ -51,125 +51,107 @@ namespace Kokkos { - namespace Impl { +namespace Impl { - template< class DstViewType , class SrcViewType - , int Rank = DstViewType::Rank > - struct CopyOp; +template +struct CopyOp; - template< class DstViewType , class SrcViewType > - struct CopyOp { - KOKKOS_INLINE_FUNCTION - static void copy(DstViewType const& dst, size_t i_dst, - SrcViewType const& src, size_t i_src ) { - dst(i_dst) = src(i_src); - } - }; - - template< class DstViewType , class SrcViewType > - struct CopyOp { - KOKKOS_INLINE_FUNCTION - static void copy(DstViewType const& dst, size_t i_dst, - SrcViewType const& src, size_t i_src ) { - for(int j = 0;j< (int) dst.extent(1); j++) - dst(i_dst,j) = src(i_src,j); - } - }; - - template< class DstViewType , class SrcViewType > - struct CopyOp { - KOKKOS_INLINE_FUNCTION - static void copy(DstViewType const& dst, size_t i_dst, - SrcViewType const& src, size_t i_src ) { - for(int j = 0; j +struct CopyOp { + KOKKOS_INLINE_FUNCTION + static void copy(DstViewType const& dst, size_t i_dst, SrcViewType const& src, + size_t i_src) { + dst(i_dst) = src(i_src); } +}; + +template +struct CopyOp { + KOKKOS_INLINE_FUNCTION + static void copy(DstViewType const& dst, size_t i_dst, SrcViewType const& src, + size_t i_src) { + for (int j = 0; j < (int)dst.extent(1); j++) dst(i_dst, j) = src(i_src, j); + } +}; + +template +struct CopyOp { + KOKKOS_INLINE_FUNCTION + static void copy(DstViewType const& dst, size_t i_dst, SrcViewType const& src, + size_t i_src) { + for (int j = 0; j < dst.extent(1); j++) + for (int k = 0; k < dst.extent(2); k++) + dst(i_dst, j, k) = src(i_src, j, k); + } +}; +} // namespace Impl //---------------------------------------------------------------------------- -template< class KeyViewType - , class BinSortOp - , class Space = typename KeyViewType::device_type - , class SizeType = typename KeyViewType::memory_space::size_type - > +template class BinSort { -public: - - template< class DstViewType , class SrcViewType > + public: + template struct copy_functor { + typedef typename SrcViewType::const_type src_view_type; - typedef typename SrcViewType::const_type src_view_type ; + typedef Impl::CopyOp copy_op; - typedef Impl::CopyOp< DstViewType , src_view_type > copy_op ; + DstViewType dst_values; + src_view_type src_values; + int dst_offset; - DstViewType dst_values ; - src_view_type src_values ; - int dst_offset ; - - copy_functor( DstViewType const & dst_values_ - , int const & dst_offset_ - , SrcViewType const & src_values_ - ) - : dst_values( dst_values_ ) - , src_values( src_values_ ) - , dst_offset( dst_offset_ ) - {} + copy_functor(DstViewType const& dst_values_, int const& dst_offset_, + SrcViewType const& src_values_) + : dst_values(dst_values_), + src_values(src_values_), + dst_offset(dst_offset_) {} KOKKOS_INLINE_FUNCTION - void operator() (const int& i) const { - copy_op::copy(dst_values,i+dst_offset,src_values,i); + void operator()(const int& i) const { + copy_op::copy(dst_values, i + dst_offset, src_values, i); } }; - template< class DstViewType - , class PermuteViewType - , class SrcViewType - > + template struct copy_permute_functor { - // If a Kokkos::View then can generate constant random access // otherwise can only use the constant type. - typedef typename std::conditional - < Kokkos::is_view< SrcViewType >::value - , Kokkos::View< typename SrcViewType::const_data_type - , typename SrcViewType::array_layout - , typename SrcViewType::device_type - , Kokkos::MemoryTraits - > - , typename SrcViewType::const_type - >::type src_view_type ; + typedef typename std::conditional< + Kokkos::is_view::value, + Kokkos::View >, + typename SrcViewType::const_type>::type src_view_type; - typedef typename PermuteViewType::const_type perm_view_type ; + typedef typename PermuteViewType::const_type perm_view_type; - typedef Impl::CopyOp< DstViewType , src_view_type > copy_op ; + typedef Impl::CopyOp copy_op; - DstViewType dst_values ; - perm_view_type sort_order ; - src_view_type src_values ; - int src_offset ; + DstViewType dst_values; + perm_view_type sort_order; + src_view_type src_values; + int src_offset; - copy_permute_functor( DstViewType const & dst_values_ - , PermuteViewType const & sort_order_ - , SrcViewType const & src_values_ - , int const & src_offset_ - ) - : dst_values( dst_values_ ) - , sort_order( sort_order_ ) - , src_values( src_values_ ) - , src_offset( src_offset_ ) - {} + copy_permute_functor(DstViewType const& dst_values_, + PermuteViewType const& sort_order_, + SrcViewType const& src_values_, int const& src_offset_) + : dst_values(dst_values_), + sort_order(sort_order_), + src_values(src_values_), + src_offset(src_offset_) {} KOKKOS_INLINE_FUNCTION - void operator() (const int& i) const { - copy_op::copy(dst_values,i,src_values,src_offset+sort_order(i)); + void operator()(const int& i) const { + copy_op::copy(dst_values, i, src_values, src_offset + sort_order(i)); } }; - typedef typename Space::execution_space execution_space; + typedef typename Space::execution_space execution_space; typedef BinSortOp bin_op_type; struct bin_count_tag {}; @@ -177,221 +159,236 @@ public: struct bin_binning_tag {}; struct bin_sort_bins_tag {}; -public: - + public: typedef SizeType size_type; typedef size_type value_type; typedef Kokkos::View offset_type; typedef Kokkos::View bin_count_type; - typedef typename KeyViewType::const_type const_key_view_type ; + typedef typename KeyViewType::const_type const_key_view_type; // If a Kokkos::View then can generate constant random access // otherwise can only use the constant type. - typedef typename std::conditional - < Kokkos::is_view< KeyViewType >::value - , Kokkos::View< typename KeyViewType::const_data_type, - typename KeyViewType::array_layout, - typename KeyViewType::device_type, - Kokkos::MemoryTraits > - , const_key_view_type - >::type const_rnd_key_view_type; + typedef typename std::conditional< + Kokkos::is_view::value, + Kokkos::View >, + const_key_view_type>::type const_rnd_key_view_type; typedef typename KeyViewType::non_const_value_type non_const_key_scalar; - typedef typename KeyViewType::const_value_type const_key_scalar; + typedef typename KeyViewType::const_value_type const_key_scalar; - typedef Kokkos::View > bin_count_atomic_type ; - -private: + typedef Kokkos::View > + bin_count_atomic_type; + private: const_key_view_type keys; const_rnd_key_view_type keys_rnd; -public: + public: + BinSortOp bin_op; + offset_type bin_offsets; + bin_count_atomic_type bin_count_atomic; + bin_count_type bin_count_const; + offset_type sort_order; - BinSortOp bin_op ; - offset_type bin_offsets ; - bin_count_atomic_type bin_count_atomic ; - bin_count_type bin_count_const ; - offset_type sort_order ; - - int range_begin ; - int range_end ; - bool sort_within_bins ; - -public: + int range_begin; + int range_end; + bool sort_within_bins; + public: BinSort() {} //---------------------------------------- - // Constructor: takes the keys, the binning_operator and optionally whether to sort within bins (default false) - BinSort( const_key_view_type keys_ - , int range_begin_ - , int range_end_ - , BinSortOp bin_op_ - , bool sort_within_bins_ = false - ) - : keys(keys_) - , keys_rnd(keys_) - , bin_op(bin_op_) - , bin_offsets() - , bin_count_atomic() - , bin_count_const() - , sort_order() - , range_begin( range_begin_ ) - , range_end( range_end_ ) - , sort_within_bins( sort_within_bins_ ) - { - bin_count_atomic = Kokkos::View("Kokkos::SortImpl::BinSortFunctor::bin_count",bin_op.max_bins()); - bin_count_const = bin_count_atomic; - bin_offsets = offset_type(ViewAllocateWithoutInitializing("Kokkos::SortImpl::BinSortFunctor::bin_offsets"),bin_op.max_bins()); - sort_order = offset_type(ViewAllocateWithoutInitializing("Kokkos::SortImpl::BinSortFunctor::sort_order"),range_end-range_begin); + // Constructor: takes the keys, the binning_operator and optionally whether to + // sort within bins (default false) + BinSort(const_key_view_type keys_, int range_begin_, int range_end_, + BinSortOp bin_op_, bool sort_within_bins_ = false) + : keys(keys_), + keys_rnd(keys_), + bin_op(bin_op_), + bin_offsets(), + bin_count_atomic(), + bin_count_const(), + sort_order(), + range_begin(range_begin_), + range_end(range_end_), + sort_within_bins(sort_within_bins_) { + bin_count_atomic = Kokkos::View( + "Kokkos::SortImpl::BinSortFunctor::bin_count", bin_op.max_bins()); + bin_count_const = bin_count_atomic; + bin_offsets = + offset_type(ViewAllocateWithoutInitializing( + "Kokkos::SortImpl::BinSortFunctor::bin_offsets"), + bin_op.max_bins()); + sort_order = + offset_type(ViewAllocateWithoutInitializing( + "Kokkos::SortImpl::BinSortFunctor::sort_order"), + range_end - range_begin); } - BinSort( const_key_view_type keys_ - , BinSortOp bin_op_ - , bool sort_within_bins_ = false - ) - : BinSort( keys_ , 0 , keys_.extent(0), bin_op_ , sort_within_bins_ ) {} + BinSort(const_key_view_type keys_, BinSortOp bin_op_, + bool sort_within_bins_ = false) + : BinSort(keys_, 0, keys_.extent(0), bin_op_, sort_within_bins_) {} //---------------------------------------- - // Create the permutation vector, the bin_offset array and the bin_count array. Can be called again if keys changed + // Create the permutation vector, the bin_offset array and the bin_count + // array. Can be called again if keys changed void create_permute_vector() { - const size_t len = range_end - range_begin ; - Kokkos::parallel_for ("Kokkos::Sort::BinCount",Kokkos::RangePolicy (0,len),*this); - Kokkos::parallel_scan("Kokkos::Sort::BinOffset",Kokkos::RangePolicy (0,bin_op.max_bins()) ,*this); + const size_t len = range_end - range_begin; + Kokkos::parallel_for( + "Kokkos::Sort::BinCount", + Kokkos::RangePolicy(0, len), *this); + Kokkos::parallel_scan("Kokkos::Sort::BinOffset", + Kokkos::RangePolicy( + 0, bin_op.max_bins()), + *this); - Kokkos::deep_copy(bin_count_atomic,0); - Kokkos::parallel_for ("Kokkos::Sort::BinBinning",Kokkos::RangePolicy (0,len),*this); + Kokkos::deep_copy(bin_count_atomic, 0); + Kokkos::parallel_for( + "Kokkos::Sort::BinBinning", + Kokkos::RangePolicy(0, len), *this); - if(sort_within_bins) - Kokkos::parallel_for ("Kokkos::Sort::BinSort",Kokkos::RangePolicy(0,bin_op.max_bins()) ,*this); + if (sort_within_bins) + Kokkos::parallel_for( + "Kokkos::Sort::BinSort", + Kokkos::RangePolicy( + 0, bin_op.max_bins()), + *this); } - // Sort a subset of a view with respect to the first dimension using the permutation array - template - void sort( ValuesViewType const & values - , int values_range_begin - , int values_range_end) const - { - typedef - Kokkos::View< typename ValuesViewType::data_type, - typename ValuesViewType::array_layout, - typename ValuesViewType::device_type > - scratch_view_type ; + // Sort a subset of a view with respect to the first dimension using the + // permutation array + template + void sort(ValuesViewType const& values, int values_range_begin, + int values_range_end) const { + typedef Kokkos::View + scratch_view_type; - const size_t len = range_end - range_begin ; - const size_t values_len = values_range_end - values_range_begin ; + const size_t len = range_end - range_begin; + const size_t values_len = values_range_end - values_range_begin; if (len != values_len) { - Kokkos::abort("BinSort::sort: values range length != permutation vector length"); + Kokkos::abort( + "BinSort::sort: values range length != permutation vector length"); } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - scratch_view_type - sorted_values(ViewAllocateWithoutInitializing("Kokkos::SortImpl::BinSortFunctor::sorted_values"), - len, - values.extent(1), - values.extent(2), - values.extent(3), - values.extent(4), - values.extent(5), - values.extent(6), - values.extent(7)); + scratch_view_type sorted_values( + ViewAllocateWithoutInitializing( + "Kokkos::SortImpl::BinSortFunctor::sorted_values"), + len, values.extent(1), values.extent(2), values.extent(3), + values.extent(4), values.extent(5), values.extent(6), values.extent(7)); #else - scratch_view_type - sorted_values(ViewAllocateWithoutInitializing("Kokkos::SortImpl::BinSortFunctor::sorted_values"), - values.rank_dynamic > 0 ? len : KOKKOS_IMPL_CTOR_DEFAULT_ARG, - values.rank_dynamic > 1 ? values.extent(1) : KOKKOS_IMPL_CTOR_DEFAULT_ARG , - values.rank_dynamic > 2 ? values.extent(2) : KOKKOS_IMPL_CTOR_DEFAULT_ARG, - values.rank_dynamic > 3 ? values.extent(3) : KOKKOS_IMPL_CTOR_DEFAULT_ARG, - values.rank_dynamic > 4 ? values.extent(4) : KOKKOS_IMPL_CTOR_DEFAULT_ARG, - values.rank_dynamic > 5 ? values.extent(5) : KOKKOS_IMPL_CTOR_DEFAULT_ARG, - values.rank_dynamic > 6 ? values.extent(6) : KOKKOS_IMPL_CTOR_DEFAULT_ARG, - values.rank_dynamic > 7 ? values.extent(7) : KOKKOS_IMPL_CTOR_DEFAULT_ARG); + scratch_view_type sorted_values( + ViewAllocateWithoutInitializing( + "Kokkos::SortImpl::BinSortFunctor::sorted_values"), + values.rank_dynamic > 0 ? len : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + values.rank_dynamic > 1 ? values.extent(1) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + values.rank_dynamic > 2 ? values.extent(2) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + values.rank_dynamic > 3 ? values.extent(3) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + values.rank_dynamic > 4 ? values.extent(4) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + values.rank_dynamic > 5 ? values.extent(5) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + values.rank_dynamic > 6 ? values.extent(6) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + values.rank_dynamic > 7 ? values.extent(7) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG); #endif { - copy_permute_functor< scratch_view_type /* DstViewType */ - , offset_type /* PermuteViewType */ - , ValuesViewType /* SrcViewType */ - > - functor( sorted_values , sort_order , values, values_range_begin - range_begin ); + copy_permute_functor + functor(sorted_values, sort_order, values, + values_range_begin - range_begin); - parallel_for("Kokkos::Sort::CopyPermute", Kokkos::RangePolicy(0,len),functor); + parallel_for("Kokkos::Sort::CopyPermute", + Kokkos::RangePolicy(0, len), functor); } { - copy_functor< ValuesViewType , scratch_view_type > - functor( values , range_begin , sorted_values ); + copy_functor functor( + values, range_begin, sorted_values); - parallel_for("Kokkos::Sort::Copy", Kokkos::RangePolicy(0,len),functor); + parallel_for("Kokkos::Sort::Copy", + Kokkos::RangePolicy(0, len), functor); } Kokkos::fence(); } - template - void sort( ValuesViewType const & values ) const - { - this->sort( values, 0, /*values.extent(0)*/ range_end - range_begin ); + template + void sort(ValuesViewType const& values) const { + this->sort(values, 0, /*values.extent(0)*/ range_end - range_begin); } // Get the permutation vector KOKKOS_INLINE_FUNCTION - offset_type get_permute_vector() const { return sort_order;} + offset_type get_permute_vector() const { return sort_order; } // Get the start offsets for each bin KOKKOS_INLINE_FUNCTION - offset_type get_bin_offsets() const { return bin_offsets;} + offset_type get_bin_offsets() const { return bin_offsets; } // Get the count for each bin KOKKOS_INLINE_FUNCTION - bin_count_type get_bin_count() const {return bin_count_const;} - -public: + bin_count_type get_bin_count() const { return bin_count_const; } + public: KOKKOS_INLINE_FUNCTION - void operator() (const bin_count_tag& tag, const int& i) const { - const int j = range_begin + i ; + void operator()(const bin_count_tag& tag, const int& i) const { + const int j = range_begin + i; bin_count_atomic(bin_op.bin(keys, j))++; } KOKKOS_INLINE_FUNCTION - void operator() (const bin_offset_tag& tag, const int& i, value_type& offset, const bool& final) const { - if(final) { + void operator()(const bin_offset_tag& tag, const int& i, value_type& offset, + const bool& final) const { + if (final) { bin_offsets(i) = offset; } - offset+=bin_count_const(i); + offset += bin_count_const(i); } KOKKOS_INLINE_FUNCTION - void operator() (const bin_binning_tag& tag, const int& i) const { - const int j = range_begin + i ; - const int bin = bin_op.bin(keys,j); + void operator()(const bin_binning_tag& tag, const int& i) const { + const int j = range_begin + i; + const int bin = bin_op.bin(keys, j); const int count = bin_count_atomic(bin)++; - sort_order(bin_offsets(bin) + count) = j ; + sort_order(bin_offsets(bin) + count) = j; } KOKKOS_INLINE_FUNCTION - void operator() (const bin_sort_bins_tag& tag, const int&i ) const { + void operator()(const bin_sort_bins_tag& tag, const int& i) const { auto bin_size = bin_count_const(i); if (bin_size <= 1) return; - int upper_bound = bin_offsets(i)+bin_size; - bool sorted = false; - while(!sorted) { - sorted = true; + int upper_bound = bin_offsets(i) + bin_size; + bool sorted = false; + while (!sorted) { + sorted = true; int old_idx = sort_order(bin_offsets(i)); int new_idx; - for(int k=bin_offsets(i)+1; k +template struct BinOp1D { int max_bins_; double mul_; typename KeyViewType::const_value_type range_; typename KeyViewType::const_value_type min_; - BinOp1D():max_bins_(0),mul_(0.0), - range_(typename KeyViewType::const_value_type()), - min_(typename KeyViewType::const_value_type()) {} + BinOp1D() + : max_bins_(0), + mul_(0.0), + range_(typename KeyViewType::const_value_type()), + min_(typename KeyViewType::const_value_type()) {} - //Construct BinOp with number of bins, minimum value and maxuimum value + // Construct BinOp with number of bins, minimum value and maxuimum value BinOp1D(int max_bins__, typename KeyViewType::const_value_type min, - typename KeyViewType::const_value_type max ) - :max_bins_(max_bins__+1),mul_(1.0*max_bins__/(max-min)),range_(max-min),min_(min) {} + typename KeyViewType::const_value_type max) + : max_bins_(max_bins__ + 1), + mul_(1.0 * max_bins__ / (max - min)), + range_(max - min), + min_(min) {} - //Determine bin index from key value - template - KOKKOS_INLINE_FUNCTION - int bin(ViewType& keys, const int& i) const { - return int(mul_*(keys(i)-min_)); + // Determine bin index from key value + template + KOKKOS_INLINE_FUNCTION int bin(ViewType& keys, const int& i) const { + return int(mul_ * (keys(i) - min_)); } - //Return maximum bin index + 1 + // Return maximum bin index + 1 KOKKOS_INLINE_FUNCTION - int max_bins() const { - return max_bins_; - } + int max_bins() const { return max_bins_; } - //Compare to keys within a bin if true new_val will be put before old_val - template - KOKKOS_INLINE_FUNCTION - bool operator()(ViewType& keys, iType1& i1, iType2& i2) const { - return keys(i1) + KOKKOS_INLINE_FUNCTION bool operator()(ViewType& keys, iType1& i1, + iType2& i2) const { + return keys(i1) < keys(i2); } }; -template +template struct BinOp3D { int max_bins_[3]; double mul_[3]; @@ -450,43 +449,42 @@ struct BinOp3D { BinOp3D() {} BinOp3D(int max_bins__[], typename KeyViewType::const_value_type min[], - typename KeyViewType::const_value_type max[] ) - { + typename KeyViewType::const_value_type max[]) { max_bins_[0] = max_bins__[0]; max_bins_[1] = max_bins__[1]; max_bins_[2] = max_bins__[2]; - mul_[0] = 1.0*max_bins__[0]/(max[0]-min[0]); - mul_[1] = 1.0*max_bins__[1]/(max[1]-min[1]); - mul_[2] = 1.0*max_bins__[2]/(max[2]-min[2]); - range_[0] = max[0]-min[0]; - range_[1] = max[1]-min[1]; - range_[2] = max[2]-min[2]; - min_[0] = min[0]; - min_[1] = min[1]; - min_[2] = min[2]; + mul_[0] = 1.0 * max_bins__[0] / (max[0] - min[0]); + mul_[1] = 1.0 * max_bins__[1] / (max[1] - min[1]); + mul_[2] = 1.0 * max_bins__[2] / (max[2] - min[2]); + range_[0] = max[0] - min[0]; + range_[1] = max[1] - min[1]; + range_[2] = max[2] - min[2]; + min_[0] = min[0]; + min_[1] = min[1]; + min_[2] = min[2]; } - template - KOKKOS_INLINE_FUNCTION - int bin(ViewType& keys, const int& i) const { - return int( (((int(mul_[0]*(keys(i,0)-min_[0]))*max_bins_[1]) + - int(mul_[1]*(keys(i,1)-min_[1])))*max_bins_[2]) + - int(mul_[2]*(keys(i,2)-min_[2]))); + template + KOKKOS_INLINE_FUNCTION int bin(ViewType& keys, const int& i) const { + return int((((int(mul_[0] * (keys(i, 0) - min_[0])) * max_bins_[1]) + + int(mul_[1] * (keys(i, 1) - min_[1]))) * + max_bins_[2]) + + int(mul_[2] * (keys(i, 2) - min_[2]))); } KOKKOS_INLINE_FUNCTION - int max_bins() const { - return max_bins_[0]*max_bins_[1]*max_bins_[2]; - } + int max_bins() const { return max_bins_[0] * max_bins_[1] * max_bins_[2]; } - template - KOKKOS_INLINE_FUNCTION - bool operator()(ViewType& keys, iType1& i1 , iType2& i2) const { - if (keys(i1,0)>keys(i2,0)) return true; - else if (keys(i1,0)==keys(i2,0)) { - if (keys(i1,1)>keys(i2,1)) return true; - else if (keys(i1,1)==keys(i2,1)) { - if (keys(i1,2)>keys(i2,2)) return true; + template + KOKKOS_INLINE_FUNCTION bool operator()(ViewType& keys, iType1& i1, + iType2& i2) const { + if (keys(i1, 0) > keys(i2, 0)) + return true; + else if (keys(i1, 0) == keys(i2, 0)) { + if (keys(i1, 1) > keys(i2, 1)) + return true; + else if (keys(i1, 1) == keys(i2, 1)) { + if (keys(i1, 2) > keys(i2, 2)) return true; } } return false; @@ -495,85 +493,80 @@ struct BinOp3D { namespace Impl { -template +template bool try_std_sort(ViewType view) { - bool possible = true; - size_t stride[8] = { view.stride_0() - , view.stride_1() - , view.stride_2() - , view.stride_3() - , view.stride_4() - , view.stride_5() - , view.stride_6() - , view.stride_7() - }; - possible = possible && std::is_same::value; - possible = possible && (ViewType::Rank == 1); - possible = possible && (stride[0] == 1); - if(possible) { - std::sort(view.data(),view.data()+view.extent(0)); + bool possible = true; + size_t stride[8] = {view.stride_0(), view.stride_1(), view.stride_2(), + view.stride_3(), view.stride_4(), view.stride_5(), + view.stride_6(), view.stride_7()}; + possible = possible && + std::is_same::value; + possible = possible && (ViewType::Rank == 1); + possible = possible && (stride[0] == 1); + if (possible) { + std::sort(view.data(), view.data() + view.extent(0)); } return possible; } -template +template struct min_max_functor { - typedef Kokkos::MinMaxScalar minmax_scalar; + typedef Kokkos::MinMaxScalar + minmax_scalar; ViewType view; - min_max_functor(const ViewType& view_):view(view_) {} + min_max_functor(const ViewType& view_) : view(view_) {} KOKKOS_INLINE_FUNCTION - void operator() (const size_t& i, minmax_scalar& minmax) const { - if(view(i) < minmax.min_val) minmax.min_val = view(i); - if(view(i) > minmax.max_val) minmax.max_val = view(i); + void operator()(const size_t& i, minmax_scalar& minmax) const { + if (view(i) < minmax.min_val) minmax.min_val = view(i); + if (view(i) > minmax.max_val) minmax.max_val = view(i); } }; -} +} // namespace Impl -template -void sort( ViewType const & view , bool const always_use_kokkos_sort = false) -{ - if(!always_use_kokkos_sort) { - if(Impl::try_std_sort(view)) return; +template +void sort(ViewType const& view, bool const always_use_kokkos_sort = false) { + if (!always_use_kokkos_sort) { + if (Impl::try_std_sort(view)) return; } typedef BinOp1D CompType; Kokkos::MinMaxScalar result; Kokkos::MinMax reducer(result); - parallel_reduce("Kokkos::Sort::FindExtent",Kokkos::RangePolicy(0,view.extent(0)), - Impl::min_max_functor(view),reducer); - if(result.min_val == result.max_val) return; - BinSort bin_sort(view,CompType(view.extent(0)/2,result.min_val,result.max_val),true); + parallel_reduce("Kokkos::Sort::FindExtent", + Kokkos::RangePolicy( + 0, view.extent(0)), + Impl::min_max_functor(view), reducer); + if (result.min_val == result.max_val) return; + BinSort bin_sort( + view, CompType(view.extent(0) / 2, result.min_val, result.max_val), true); bin_sort.create_permute_vector(); bin_sort.sort(view); } -template -void sort( ViewType view - , size_t const begin - , size_t const end - ) -{ - typedef Kokkos::RangePolicy range_policy ; +template +void sort(ViewType view, size_t const begin, size_t const end) { + typedef Kokkos::RangePolicy range_policy; typedef BinOp1D CompType; Kokkos::MinMaxScalar result; Kokkos::MinMax reducer(result); - parallel_reduce("Kokkos::Sort::FindExtent", range_policy( begin , end ) - , Impl::min_max_functor(view),reducer ); + parallel_reduce("Kokkos::Sort::FindExtent", range_policy(begin, end), + Impl::min_max_functor(view), reducer); - if(result.min_val == result.max_val) return; + if (result.min_val == result.max_val) return; - BinSort - bin_sort(view,begin,end,CompType((end-begin)/2,result.min_val,result.max_val),true); + BinSort bin_sort( + view, begin, end, + CompType((end - begin) / 2, result.min_val, result.max_val), true); bin_sort.create_permute_vector(); - bin_sort.sort(view,begin,end); + bin_sort.sort(view, begin, end); } -} +} // namespace Kokkos #endif diff --git a/lib/kokkos/algorithms/unit_tests/CMakeLists.txt b/lib/kokkos/algorithms/unit_tests/CMakeLists.txt index e238b37c8e..6fb08ce2ed 100644 --- a/lib/kokkos/algorithms/unit_tests/CMakeLists.txt +++ b/lib/kokkos/algorithms/unit_tests/CMakeLists.txt @@ -1,18 +1,12 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../src ) +#Leave these here for now - I don't need transitive deps anyway +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +KOKKOS_INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}) +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../src ) -IF(NOT KOKKOS_HAS_TRILINOS) - IF(KOKKOS_SEPARATE_LIBS) - set(TEST_LINK_TARGETS kokkoscore) - ELSE() - set(TEST_LINK_TARGETS kokkos) - ENDIF() -ENDIF() SET(GTEST_SOURCE_DIR ${${PARENT_PACKAGE_NAME}_SOURCE_DIR}/tpls/gtest) -INCLUDE_DIRECTORIES(${GTEST_SOURCE_DIR}) +KOKKOS_INCLUDE_DIRECTORIES(${GTEST_SOURCE_DIR}) # mfh 03 Nov 2017: The gtest library used here must have a different # name than that of the gtest library built in KokkosCore. We can't @@ -20,23 +14,20 @@ INCLUDE_DIRECTORIES(${GTEST_SOURCE_DIR}) # possible to build only (e.g.,) KokkosAlgorithms tests, without # building KokkosCore tests. -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_HAS_PTHREAD=0") -TRIBITS_ADD_LIBRARY( +KOKKOS_ADD_TEST_LIBRARY( kokkosalgorithms_gtest HEADERS ${GTEST_SOURCE_DIR}/gtest/gtest.h SOURCES ${GTEST_SOURCE_DIR}/gtest/gtest-all.cc - TESTONLY - ) +) +KOKKOS_TARGET_COMPILE_DEFINITIONS(kokkosalgorithms_gtest PUBLIC "-DGTEST_HAS_PTHREAD=0") SET(SOURCES UnitTestMain.cpp TestCuda.cpp ) -SET(LIBRARIES kokkoscore) - -IF(Kokkos_ENABLE_OpenMP) +IF(Kokkos_ENABLE_OPENMP) LIST( APPEND SOURCES TestOpenMP.cpp ) @@ -48,23 +39,19 @@ IF(Kokkos_ENABLE_HPX) ) ENDIF() -IF(Kokkos_ENABLE_Serial) +IF(Kokkos_ENABLE_SERIAL) LIST( APPEND SOURCES TestSerial.cpp ) ENDIF() -IF(Kokkos_ENABLE_Pthread) +IF(Kokkos_ENABLE_PTHREAD) LIST( APPEND SOURCES TestThreads.cpp ) ENDIF() -TRIBITS_ADD_EXECUTABLE_AND_TEST( +KOKKOS_ADD_EXECUTABLE_AND_TEST( UnitTest SOURCES ${SOURCES} - COMM serial mpi - NUM_MPI_PROCS 1 - FAIL_REGULAR_EXPRESSION " FAILED " - TESTONLYLIBS kokkosalgorithms_gtest ${TEST_LINK_TARGETS} - ) +) diff --git a/lib/kokkos/algorithms/unit_tests/TestCuda.cpp b/lib/kokkos/algorithms/unit_tests/TestCuda.cpp index 86fdccd0e7..ab727b0326 100644 --- a/lib/kokkos/algorithms/unit_tests/TestCuda.cpp +++ b/lib/kokkos/algorithms/unit_tests/TestCuda.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -57,51 +58,31 @@ namespace Test { -class cuda : public ::testing::Test { -protected: - static void SetUpTestCase() - { - } - static void TearDownTestCase() - { - } -}; - -void cuda_test_random_xorshift64( int num_draws ) -{ +void cuda_test_random_xorshift64(int num_draws) { Impl::test_random >(num_draws); } -void cuda_test_random_xorshift1024( int num_draws ) -{ +void cuda_test_random_xorshift1024(int num_draws) { Impl::test_random >(num_draws); } +#define CUDA_RANDOM_XORSHIFT64(num_draws) \ + TEST(cuda, Random_XorShift64) { cuda_test_random_xorshift64(num_draws); } -#define CUDA_RANDOM_XORSHIFT64( num_draws ) \ - TEST_F( cuda, Random_XorShift64 ) { \ - cuda_test_random_xorshift64(num_draws); \ - } +#define CUDA_RANDOM_XORSHIFT1024(num_draws) \ + TEST(cuda, Random_XorShift1024) { cuda_test_random_xorshift1024(num_draws); } -#define CUDA_RANDOM_XORSHIFT1024( num_draws ) \ - TEST_F( cuda, Random_XorShift1024 ) { \ - cuda_test_random_xorshift1024(num_draws); \ - } +#define CUDA_SORT_UNSIGNED(size) \ + TEST(cuda, SortUnsigned) { Impl::test_sort(size); } -#define CUDA_SORT_UNSIGNED( size ) \ - TEST_F( cuda, SortUnsigned ) { \ - Impl::test_sort< Kokkos::Cuda, unsigned >(size); \ - } - -CUDA_RANDOM_XORSHIFT64( 132141141 ) -CUDA_RANDOM_XORSHIFT1024( 52428813 ) +CUDA_RANDOM_XORSHIFT64(132141141) +CUDA_RANDOM_XORSHIFT1024(52428813) CUDA_SORT_UNSIGNED(171) #undef CUDA_RANDOM_XORSHIFT64 #undef CUDA_RANDOM_XORSHIFT1024 #undef CUDA_SORT_UNSIGNED -} +} // namespace Test #else void KOKKOS_ALGORITHMS_UNITTESTS_TESTCUDA_PREVENT_LINK_ERROR() {} -#endif /* #ifdef KOKKOS_ENABLE_CUDA */ - +#endif /* #ifdef KOKKOS_ENABLE_CUDA */ diff --git a/lib/kokkos/algorithms/unit_tests/TestHPX.cpp b/lib/kokkos/algorithms/unit_tests/TestHPX.cpp index e5b7dbdb7a..2981e97945 100644 --- a/lib/kokkos/algorithms/unit_tests/TestHPX.cpp +++ b/lib/kokkos/algorithms/unit_tests/TestHPX.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,7 +42,6 @@ //@HEADER */ - #include #ifdef KOKKOS_ENABLE_HPX @@ -55,42 +55,33 @@ namespace Test { -class hpx : public ::testing::Test { -protected: - static void SetUpTestCase() - { - std::cout << std::setprecision(5) << std::scientific; +#define HPX_RANDOM_XORSHIFT64(num_draws) \ + TEST(hpx, Random_XorShift64) { \ + Impl::test_random< \ + Kokkos::Random_XorShift64_Pool >( \ + num_draws); \ } - static void TearDownTestCase() - { - } -}; - -#define HPX_RANDOM_XORSHIFT64( num_draws ) \ - TEST_F( hpx, Random_XorShift64 ) { \ - Impl::test_random >(num_draws); \ +#define HPX_RANDOM_XORSHIFT1024(num_draws) \ + TEST(hpx, Random_XorShift1024) { \ + Impl::test_random< \ + Kokkos::Random_XorShift1024_Pool >( \ + num_draws); \ } -#define HPX_RANDOM_XORSHIFT1024( num_draws ) \ - TEST_F( hpx, Random_XorShift1024 ) { \ - Impl::test_random >(num_draws); \ +#define HPX_SORT_UNSIGNED(size) \ + TEST(hpx, SortUnsigned) { \ + Impl::test_sort(size); \ } -#define HPX_SORT_UNSIGNED( size ) \ - TEST_F( hpx, SortUnsigned ) { \ - Impl::test_sort< Kokkos::Experimental::HPX, unsigned >(size); \ - } - -HPX_RANDOM_XORSHIFT64( 10240000 ) -HPX_RANDOM_XORSHIFT1024( 10130144 ) +HPX_RANDOM_XORSHIFT64(10240000) +HPX_RANDOM_XORSHIFT1024(10130144) HPX_SORT_UNSIGNED(171) #undef HPX_RANDOM_XORSHIFT64 #undef HPX_RANDOM_XORSHIFT1024 #undef HPX_SORT_UNSIGNED -} // namespace test +} // namespace Test #else void KOKKOS_ALGORITHMS_UNITTESTS_TESTHPX_PREVENT_LINK_ERROR() {} #endif - diff --git a/lib/kokkos/algorithms/unit_tests/TestOpenMP.cpp b/lib/kokkos/algorithms/unit_tests/TestOpenMP.cpp index c4ddde7b7f..3a9e306014 100644 --- a/lib/kokkos/algorithms/unit_tests/TestOpenMP.cpp +++ b/lib/kokkos/algorithms/unit_tests/TestOpenMP.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,7 +42,6 @@ //@HEADER */ - #include #ifdef KOKKOS_ENABLE_OPENMP @@ -55,42 +55,31 @@ namespace Test { -class openmp : public ::testing::Test { -protected: - static void SetUpTestCase() - { - std::cout << std::setprecision(5) << std::scientific; +#define OPENMP_RANDOM_XORSHIFT64(num_draws) \ + TEST(openmp, Random_XorShift64) { \ + Impl::test_random >( \ + num_draws); \ } - static void TearDownTestCase() - { - } -}; - -#define OPENMP_RANDOM_XORSHIFT64( num_draws ) \ - TEST_F( openmp, Random_XorShift64 ) { \ - Impl::test_random >(num_draws); \ +#define OPENMP_RANDOM_XORSHIFT1024(num_draws) \ + TEST(openmp, Random_XorShift1024) { \ + Impl::test_random >( \ + num_draws); \ } -#define OPENMP_RANDOM_XORSHIFT1024( num_draws ) \ - TEST_F( openmp, Random_XorShift1024 ) { \ - Impl::test_random >(num_draws); \ +#define OPENMP_SORT_UNSIGNED(size) \ + TEST(openmp, SortUnsigned) { \ + Impl::test_sort(size); \ } -#define OPENMP_SORT_UNSIGNED( size ) \ - TEST_F( openmp, SortUnsigned ) { \ - Impl::test_sort< Kokkos::OpenMP, unsigned >(size); \ - } - -OPENMP_RANDOM_XORSHIFT64( 10240000 ) -OPENMP_RANDOM_XORSHIFT1024( 10130144 ) +OPENMP_RANDOM_XORSHIFT64(10240000) +OPENMP_RANDOM_XORSHIFT1024(10130144) OPENMP_SORT_UNSIGNED(171) #undef OPENMP_RANDOM_XORSHIFT64 #undef OPENMP_RANDOM_XORSHIFT1024 #undef OPENMP_SORT_UNSIGNED -} // namespace test +} // namespace Test #else void KOKKOS_ALGORITHMS_UNITTESTS_TESTOPENMP_PREVENT_LINK_ERROR() {} #endif - diff --git a/lib/kokkos/algorithms/unit_tests/TestROCm.cpp b/lib/kokkos/algorithms/unit_tests/TestROCm.cpp index 15179509bb..29814cca3e 100644 --- a/lib/kokkos/algorithms/unit_tests/TestROCm.cpp +++ b/lib/kokkos/algorithms/unit_tests/TestROCm.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -57,52 +58,35 @@ namespace Test { -class rocm : public ::testing::Test { -protected: - static void SetUpTestCase() - { - std::cout << std::setprecision(5) << std::scientific; - } - static void TearDownTestCase() - { - } -}; - -void rocm_test_random_xorshift64( int num_draws ) -{ - Impl::test_random >(num_draws); +void rocm_test_random_xorshift64(int num_draws) { + Impl::test_random< + Kokkos::Random_XorShift64_Pool >(num_draws); } -void rocm_test_random_xorshift1024( int num_draws ) -{ - Impl::test_random >(num_draws); +void rocm_test_random_xorshift1024(int num_draws) { + Impl::test_random< + Kokkos::Random_XorShift1024_Pool >(num_draws); } +#define ROCM_RANDOM_XORSHIFT64(num_draws) \ + TEST(rocm, Random_XorShift64) { rocm_test_random_xorshift64(num_draws); } -#define ROCM_RANDOM_XORSHIFT64( num_draws ) \ - TEST_F( rocm, Random_XorShift64 ) { \ - rocm_test_random_xorshift64(num_draws); \ +#define ROCM_RANDOM_XORSHIFT1024(num_draws) \ + TEST(rocm, Random_XorShift1024) { rocm_test_random_xorshift1024(num_draws); } + +#define ROCM_SORT_UNSIGNED(size) \ + TEST(rocm, SortUnsigned) { \ + Impl::test_sort(size); \ } -#define ROCM_RANDOM_XORSHIFT1024( num_draws ) \ - TEST_F( rocm, Random_XorShift1024 ) { \ - rocm_test_random_xorshift1024(num_draws); \ - } - -#define ROCM_SORT_UNSIGNED( size ) \ - TEST_F( rocm, SortUnsigned ) { \ - Impl::test_sort< Kokkos::Experimental::ROCm, unsigned >(size); \ - } - -ROCM_RANDOM_XORSHIFT64( 132141141 ) -ROCM_RANDOM_XORSHIFT1024( 52428813 ) +ROCM_RANDOM_XORSHIFT64(132141141) +ROCM_RANDOM_XORSHIFT1024(52428813) ROCM_SORT_UNSIGNED(171) #undef ROCM_RANDOM_XORSHIFT64 #undef ROCM_RANDOM_XORSHIFT1024 #undef ROCM_SORT_UNSIGNED -} +} // namespace Test #else void KOKKOS_ALGORITHMS_UNITTESTS_TESTROCM_PREVENT_LINK_ERROR() {} -#endif /* #ifdef KOKKOS_ENABLE_ROCM */ - +#endif /* #ifdef KOKKOS_ENABLE_ROCM */ diff --git a/lib/kokkos/algorithms/unit_tests/TestRandom.hpp b/lib/kokkos/algorithms/unit_tests/TestRandom.hpp index 73bd416f2a..bc55ebfad3 100644 --- a/lib/kokkos/algorithms/unit_tests/TestRandom.hpp +++ b/lib/kokkos/algorithms/unit_tests/TestRandom.hpp @@ -1,10 +1,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -54,18 +55,19 @@ namespace Test { -namespace Impl{ +namespace Impl { // This test runs the random number generators and uses some statistic tests to // check the 'goodness' of the random numbers: // (i) mean: the mean is expected to be 0.5*RAND_MAX // (ii) variance: the variance is 1/3*mean*mean // (iii) covariance: the covariance is 0 -// (iv) 1-tupledistr: the mean, variance and covariance of a 1D Histrogram of random numbers -// (v) 3-tupledistr: the mean, variance and covariance of a 3D Histrogram of random numbers +// (iv) 1-tupledistr: the mean, variance and covariance of a 1D Histrogram +// of random numbers (v) 3-tupledistr: the mean, variance and covariance of +// a 3D Histrogram of random numbers #define HIST_DIM3D 24 -#define HIST_DIM1D (HIST_DIM3D*HIST_DIM3D*HIST_DIM3D) +#define HIST_DIM1D (HIST_DIM3D * HIST_DIM3D * HIST_DIM3D) struct RandomProperties { uint64_t count; @@ -77,37 +79,37 @@ struct RandomProperties { KOKKOS_INLINE_FUNCTION RandomProperties() { - count = 0; - mean = 0.0; - variance = 0.0; + count = 0; + mean = 0.0; + variance = 0.0; covariance = 0.0; - min = 1e64; - max = -1e64; + min = 1e64; + max = -1e64; } KOKKOS_INLINE_FUNCTION RandomProperties& operator+=(const RandomProperties& add) { - count += add.count; - mean += add.mean; - variance += add.variance; + count += add.count; + mean += add.mean; + variance += add.variance; covariance += add.covariance; - min = add.minmax?add.max:max; + min = add.min < min ? add.min : min; + max = add.max > max ? add.max : max; return *this; } KOKKOS_INLINE_FUNCTION void operator+=(const volatile RandomProperties& add) volatile { - count += add.count; - mean += add.mean; - variance += add.variance; + count += add.count; + mean += add.mean; + variance += add.variance; covariance += add.covariance; - min = add.minmax?add.max:max; + min = add.min < min ? add.min : min; + max = add.max > max ? add.max : max; } }; -template +template struct test_random_functor { typedef typename GeneratorPool::generator_type rnd_type; @@ -123,38 +125,40 @@ struct test_random_functor { // implementations might violate this upper bound, due to rounding // error. Just in case, we leave an extra space at the end of each // dimension, in the View types below. - typedef Kokkos::View type_1d; + typedef Kokkos::View + type_1d; type_1d density_1d; - typedef Kokkos::View type_3d; + typedef Kokkos::View + type_3d; type_3d density_3d; - test_random_functor (GeneratorPool rand_pool_, type_1d d1d, type_3d d3d) : - rand_pool (rand_pool_), - mean (0.5*Kokkos::rand::max ()), - density_1d (d1d), - density_3d (d3d) - {} + test_random_functor(GeneratorPool rand_pool_, type_1d d1d, type_3d d3d) + : rand_pool(rand_pool_), + mean(0.5 * Kokkos::rand::max()), + density_1d(d1d), + density_3d(d3d) {} KOKKOS_INLINE_FUNCTION - void operator() (int i, RandomProperties& prop) const { + void operator()(int i, RandomProperties& prop) const { using Kokkos::atomic_fetch_add; rnd_type rand_gen = rand_pool.get_state(); for (int k = 0; k < 1024; ++k) { - const Scalar tmp = Kokkos::rand::draw(rand_gen); + const Scalar tmp = Kokkos::rand::draw(rand_gen); prop.count++; prop.mean += tmp; - prop.variance += (tmp-mean)*(tmp-mean); - const Scalar tmp2 = Kokkos::rand::draw(rand_gen); + prop.variance += (tmp - mean) * (tmp - mean); + const Scalar tmp2 = Kokkos::rand::draw(rand_gen); prop.count++; prop.mean += tmp2; - prop.variance += (tmp2-mean)*(tmp2-mean); - prop.covariance += (tmp-mean)*(tmp2-mean); - const Scalar tmp3 = Kokkos::rand::draw(rand_gen); + prop.variance += (tmp2 - mean) * (tmp2 - mean); + prop.covariance += (tmp - mean) * (tmp2 - mean); + const Scalar tmp3 = Kokkos::rand::draw(rand_gen); prop.count++; prop.mean += tmp3; - prop.variance += (tmp3-mean)*(tmp3-mean); - prop.covariance += (tmp2-mean)*(tmp3-mean); + prop.variance += (tmp3 - mean) * (tmp3 - mean); + prop.covariance += (tmp2 - mean) * (tmp3 - mean); // NOTE (mfh 03 Nov 2014): Kokkos::rand::max() is supposed to // define an exclusive upper bound on the range of random @@ -169,26 +173,32 @@ struct test_random_functor { // returns values of max(), the histograms will still catch this // indirectly, since none of the other values will be filled in. - const Scalar theMax = Kokkos::rand::max (); + const Scalar theMax = Kokkos::rand::max(); - const uint64_t ind1_1d = static_cast (1.0 * HIST_DIM1D * tmp / theMax); - const uint64_t ind2_1d = static_cast (1.0 * HIST_DIM1D * tmp2 / theMax); - const uint64_t ind3_1d = static_cast (1.0 * HIST_DIM1D * tmp3 / theMax); + const uint64_t ind1_1d = + static_cast(1.0 * HIST_DIM1D * tmp / theMax); + const uint64_t ind2_1d = + static_cast(1.0 * HIST_DIM1D * tmp2 / theMax); + const uint64_t ind3_1d = + static_cast(1.0 * HIST_DIM1D * tmp3 / theMax); - const uint64_t ind1_3d = static_cast (1.0 * HIST_DIM3D * tmp / theMax); - const uint64_t ind2_3d = static_cast (1.0 * HIST_DIM3D * tmp2 / theMax); - const uint64_t ind3_3d = static_cast (1.0 * HIST_DIM3D * tmp3 / theMax); + const uint64_t ind1_3d = + static_cast(1.0 * HIST_DIM3D * tmp / theMax); + const uint64_t ind2_3d = + static_cast(1.0 * HIST_DIM3D * tmp2 / theMax); + const uint64_t ind3_3d = + static_cast(1.0 * HIST_DIM3D * tmp3 / theMax); - atomic_fetch_add (&density_1d(ind1_1d), 1); - atomic_fetch_add (&density_1d(ind2_1d), 1); - atomic_fetch_add (&density_1d(ind3_1d), 1); - atomic_fetch_add (&density_3d(ind1_3d, ind2_3d, ind3_3d), 1); + atomic_fetch_add(&density_1d(ind1_1d), 1); + atomic_fetch_add(&density_1d(ind2_1d), 1); + atomic_fetch_add(&density_1d(ind3_1d), 1); + atomic_fetch_add(&density_3d(ind1_3d, ind2_3d, ind3_3d), 1); } rand_pool.free_state(rand_gen); } }; -template +template struct test_histogram1d_functor { typedef RandomProperties value_type; typedef typename DeviceType::execution_space execution_space; @@ -200,34 +210,29 @@ struct test_histogram1d_functor { // implementations might violate this upper bound, due to rounding // error. Just in case, we leave an extra space at the end of each // dimension, in the View type below. - typedef Kokkos::View type_1d; + typedef Kokkos::View type_1d; type_1d density_1d; double mean; - test_histogram1d_functor (type_1d d1d, int num_draws) : - density_1d (d1d), - mean (1.0*num_draws/HIST_DIM1D*3) - { - } + test_histogram1d_functor(type_1d d1d, int num_draws) + : density_1d(d1d), mean(1.0 * num_draws / HIST_DIM1D * 3) {} - KOKKOS_INLINE_FUNCTION void - operator() (const typename memory_space::size_type i, - RandomProperties& prop) const - { + KOKKOS_INLINE_FUNCTION void operator()( + const typename memory_space::size_type i, RandomProperties& prop) const { typedef typename memory_space::size_type size_type; const double count = density_1d(i); prop.mean += count; prop.variance += 1.0 * (count - mean) * (count - mean); - //prop.covariance += 1.0*count*count; + // prop.covariance += 1.0*count*count; prop.min = count < prop.min ? count : prop.min; prop.max = count > prop.max ? count : prop.max; - if (i < static_cast (HIST_DIM1D-1)) { - prop.covariance += (count - mean) * (density_1d(i+1) - mean); + if (i < static_cast(HIST_DIM1D - 1)) { + prop.covariance += (count - mean) * (density_1d(i + 1) - mean); } } }; -template +template struct test_histogram3d_functor { typedef RandomProperties value_type; typedef typename DeviceType::execution_space execution_space; @@ -239,29 +244,28 @@ struct test_histogram3d_functor { // implementations might violate this upper bound, due to rounding // error. Just in case, we leave an extra space at the end of each // dimension, in the View type below. - typedef Kokkos::View type_3d; + typedef Kokkos::View + type_3d; type_3d density_3d; double mean; - test_histogram3d_functor (type_3d d3d, int num_draws) : - density_3d (d3d), - mean (1.0*num_draws/HIST_DIM1D) - {} + test_histogram3d_functor(type_3d d3d, int num_draws) + : density_3d(d3d), mean(1.0 * num_draws / HIST_DIM1D) {} - KOKKOS_INLINE_FUNCTION void - operator() (const typename memory_space::size_type i, - RandomProperties& prop) const - { + KOKKOS_INLINE_FUNCTION void operator()( + const typename memory_space::size_type i, RandomProperties& prop) const { typedef typename memory_space::size_type size_type; - const double count = density_3d(i/(HIST_DIM3D*HIST_DIM3D), - (i % (HIST_DIM3D*HIST_DIM3D))/HIST_DIM3D, - i % HIST_DIM3D); + const double count = density_3d( + i / (HIST_DIM3D * HIST_DIM3D), + (i % (HIST_DIM3D * HIST_DIM3D)) / HIST_DIM3D, i % HIST_DIM3D); prop.mean += count; prop.variance += (count - mean) * (count - mean); - if (i < static_cast (HIST_DIM1D-1)) { - const double count_next = density_3d((i+1)/(HIST_DIM3D*HIST_DIM3D), - ((i+1)%(HIST_DIM3D*HIST_DIM3D))/HIST_DIM3D, - (i+1)%HIST_DIM3D); + if (i < static_cast(HIST_DIM1D - 1)) { + const double count_next = + density_3d((i + 1) / (HIST_DIM3D * HIST_DIM3D), + ((i + 1) % (HIST_DIM3D * HIST_DIM3D)) / HIST_DIM3D, + (i + 1) % HIST_DIM3D); prop.covariance += (count - mean) * (count_next - mean); } } @@ -270,212 +274,223 @@ struct test_histogram3d_functor { // // Templated test that uses the above functors. // -template +template struct test_random_scalar { typedef typename RandomGenerator::generator_type rnd_type; - int pass_mean,pass_var,pass_covar; - int pass_hist1d_mean,pass_hist1d_var,pass_hist1d_covar; - int pass_hist3d_mean,pass_hist3d_var,pass_hist3d_covar; + int pass_mean, pass_var, pass_covar; + int pass_hist1d_mean, pass_hist1d_var, pass_hist1d_covar; + int pass_hist3d_mean, pass_hist3d_var, pass_hist3d_covar; - test_random_scalar (typename test_random_functor::type_1d& density_1d, - typename test_random_functor::type_3d& density_3d, - RandomGenerator& pool, - unsigned int num_draws) - { + test_random_scalar( + typename test_random_functor::type_1d& density_1d, + typename test_random_functor::type_3d& density_3d, + RandomGenerator& pool, unsigned int num_draws) { + using Kokkos::parallel_reduce; using std::cout; using std::endl; - using Kokkos::parallel_reduce; { cout << " -- Testing randomness properties" << endl; RandomProperties result; typedef test_random_functor functor_type; - parallel_reduce (num_draws/1024, functor_type (pool, density_1d, density_3d), result); + parallel_reduce(num_draws / 1024, + functor_type(pool, density_1d, density_3d), result); - //printf("Result: %lf %lf %lf\n",result.mean/num_draws/3,result.variance/num_draws/3,result.covariance/num_draws/2); - double tolerance = 1.6*std::sqrt(1.0/num_draws); - double mean_expect = 0.5*Kokkos::rand::max(); - double variance_expect = 1.0/3.0*mean_expect*mean_expect; - double mean_eps = mean_expect/(result.mean/num_draws/3)-1.0; - double variance_eps = variance_expect/(result.variance/num_draws/3)-1.0; - double covariance_eps = result.covariance/num_draws/2/variance_expect; - pass_mean = ((-tolerance < mean_eps) && - ( tolerance > mean_eps)) ? 1:0; - pass_var = ((-1.5*tolerance < variance_eps) && - ( 1.5*tolerance > variance_eps)) ? 1:0; - pass_covar = ((-2.0*tolerance < covariance_eps) && - ( 2.0*tolerance > covariance_eps)) ? 1:0; - cout << "Pass: " << pass_mean - << " " << pass_var - << " " << mean_eps - << " " << variance_eps - << " " << covariance_eps - << " || " << tolerance << endl; + // printf("Result: %lf %lf + // %lf\n",result.mean/num_draws/3,result.variance/num_draws/3,result.covariance/num_draws/2); + double tolerance = 1.6 * std::sqrt(1.0 / num_draws); + double mean_expect = 0.5 * Kokkos::rand::max(); + double variance_expect = 1.0 / 3.0 * mean_expect * mean_expect; + double mean_eps = mean_expect / (result.mean / num_draws / 3) - 1.0; + double variance_eps = + variance_expect / (result.variance / num_draws / 3) - 1.0; + double covariance_eps = + result.covariance / num_draws / 2 / variance_expect; + pass_mean = ((-tolerance < mean_eps) && (tolerance > mean_eps)) ? 1 : 0; + pass_var = ((-1.5 * tolerance < variance_eps) && + (1.5 * tolerance > variance_eps)) + ? 1 + : 0; + pass_covar = ((-2.0 * tolerance < covariance_eps) && + (2.0 * tolerance > covariance_eps)) + ? 1 + : 0; + cout << "Pass: " << pass_mean << " " << pass_var << " " << mean_eps << " " + << variance_eps << " " << covariance_eps << " || " << tolerance + << endl; } { cout << " -- Testing 1-D histogram" << endl; RandomProperties result; - typedef test_histogram1d_functor functor_type; - parallel_reduce (HIST_DIM1D, functor_type (density_1d, num_draws), result); + typedef test_histogram1d_functor + functor_type; + parallel_reduce(HIST_DIM1D, functor_type(density_1d, num_draws), result); - double tolerance = 6*std::sqrt(1.0/HIST_DIM1D); - double mean_expect = 1.0*num_draws*3/HIST_DIM1D; - double variance_expect = 1.0*num_draws*3/HIST_DIM1D*(1.0-1.0/HIST_DIM1D); - double covariance_expect = -1.0*num_draws*3/HIST_DIM1D/HIST_DIM1D; - double mean_eps = mean_expect/(result.mean/HIST_DIM1D)-1.0; - double variance_eps = variance_expect/(result.variance/HIST_DIM1D)-1.0; - double covariance_eps = (result.covariance/HIST_DIM1D - covariance_expect)/mean_expect; - pass_hist1d_mean = ((-0.0001 < mean_eps) && - ( 0.0001 > mean_eps)) ? 1:0; - pass_hist1d_var = ((-0.07 < variance_eps) && - ( 0.07 > variance_eps)) ? 1:0; - pass_hist1d_covar = ((-0.06 < covariance_eps) && - ( 0.06 > covariance_eps)) ? 1:0; + double tolerance = 6 * std::sqrt(1.0 / HIST_DIM1D); + double mean_expect = 1.0 * num_draws * 3 / HIST_DIM1D; + double variance_expect = + 1.0 * num_draws * 3 / HIST_DIM1D * (1.0 - 1.0 / HIST_DIM1D); + double covariance_expect = -1.0 * num_draws * 3 / HIST_DIM1D / HIST_DIM1D; + double mean_eps = mean_expect / (result.mean / HIST_DIM1D) - 1.0; + double variance_eps = + variance_expect / (result.variance / HIST_DIM1D) - 1.0; + double covariance_eps = + (result.covariance / HIST_DIM1D - covariance_expect) / mean_expect; + pass_hist1d_mean = ((-0.0001 < mean_eps) && (0.0001 > mean_eps)) ? 1 : 0; + pass_hist1d_var = + ((-0.07 < variance_eps) && (0.07 > variance_eps)) ? 1 : 0; + pass_hist1d_covar = + ((-0.06 < covariance_eps) && (0.06 > covariance_eps)) ? 1 : 0; - cout << "Density 1D: " << mean_eps - << " " << variance_eps - << " " << (result.covariance/HIST_DIM1D/HIST_DIM1D) - << " || " << tolerance - << " " << result.min - << " " << result.max - << " || " << result.variance/HIST_DIM1D - << " " << 1.0*num_draws*3/HIST_DIM1D*(1.0-1.0/HIST_DIM1D) - << " || " << result.covariance/HIST_DIM1D - << " " << -1.0*num_draws*3/HIST_DIM1D/HIST_DIM1D - << endl; + cout << "Density 1D: " << mean_eps << " " << variance_eps << " " + << (result.covariance / HIST_DIM1D / HIST_DIM1D) << " || " + << tolerance << " " << result.min << " " << result.max << " || " + << result.variance / HIST_DIM1D << " " + << 1.0 * num_draws * 3 / HIST_DIM1D * (1.0 - 1.0 / HIST_DIM1D) + << " || " << result.covariance / HIST_DIM1D << " " + << -1.0 * num_draws * 3 / HIST_DIM1D / HIST_DIM1D << endl; } { cout << " -- Testing 3-D histogram" << endl; RandomProperties result; - typedef test_histogram3d_functor functor_type; - parallel_reduce (HIST_DIM1D, functor_type (density_3d, num_draws), result); + typedef test_histogram3d_functor + functor_type; + parallel_reduce(HIST_DIM1D, functor_type(density_3d, num_draws), result); - double tolerance = 6*std::sqrt(1.0/HIST_DIM1D); - double mean_expect = 1.0*num_draws/HIST_DIM1D; - double variance_expect = 1.0*num_draws/HIST_DIM1D*(1.0-1.0/HIST_DIM1D); - double covariance_expect = -1.0*num_draws/HIST_DIM1D/HIST_DIM1D; - double mean_eps = mean_expect/(result.mean/HIST_DIM1D)-1.0; - double variance_eps = variance_expect/(result.variance/HIST_DIM1D)-1.0; - double covariance_eps = (result.covariance/HIST_DIM1D - covariance_expect)/mean_expect; - pass_hist3d_mean = ((-tolerance < mean_eps) && - ( tolerance > mean_eps)) ? 1:0; - pass_hist3d_var = ((-1.2*tolerance < variance_eps) && - ( 1.2*tolerance > variance_eps)) ? 1:0; - pass_hist3d_covar = ((-tolerance < covariance_eps) && - ( tolerance > covariance_eps)) ? 1:0; + double tolerance = 6 * std::sqrt(1.0 / HIST_DIM1D); + double mean_expect = 1.0 * num_draws / HIST_DIM1D; + double variance_expect = + 1.0 * num_draws / HIST_DIM1D * (1.0 - 1.0 / HIST_DIM1D); + double covariance_expect = -1.0 * num_draws / HIST_DIM1D / HIST_DIM1D; + double mean_eps = mean_expect / (result.mean / HIST_DIM1D) - 1.0; + double variance_eps = + variance_expect / (result.variance / HIST_DIM1D) - 1.0; + double covariance_eps = + (result.covariance / HIST_DIM1D - covariance_expect) / mean_expect; + pass_hist3d_mean = + ((-tolerance < mean_eps) && (tolerance > mean_eps)) ? 1 : 0; + pass_hist3d_var = ((-1.2 * tolerance < variance_eps) && + (1.2 * tolerance > variance_eps)) + ? 1 + : 0; + pass_hist3d_covar = + ((-tolerance < covariance_eps) && (tolerance > covariance_eps)) ? 1 + : 0; - cout << "Density 3D: " << mean_eps - << " " << variance_eps - << " " << result.covariance/HIST_DIM1D/HIST_DIM1D - << " || " << tolerance - << " " << result.min - << " " << result.max << endl; + cout << "Density 3D: " << mean_eps << " " << variance_eps << " " + << result.covariance / HIST_DIM1D / HIST_DIM1D << " || " << tolerance + << " " << result.min << " " << result.max << endl; } } }; template -void test_random(unsigned int num_draws) -{ +void test_random(unsigned int num_draws) { using std::cout; using std::endl; - typename test_random_functor::type_1d density_1d("D1d"); - typename test_random_functor::type_3d density_3d("D3d"); + typename test_random_functor::type_1d density_1d("D1d"); + typename test_random_functor::type_3d density_3d("D3d"); - - uint64_t ticks = std::chrono::high_resolution_clock::now().time_since_epoch().count(); + uint64_t ticks = + std::chrono::high_resolution_clock::now().time_since_epoch().count(); cout << "Test Seed:" << ticks << endl; RandomGenerator pool(ticks); cout << "Test Scalar=int" << endl; - test_random_scalar test_int(density_1d,density_3d,pool,num_draws); - ASSERT_EQ( test_int.pass_mean,1); - ASSERT_EQ( test_int.pass_var,1); - ASSERT_EQ( test_int.pass_covar,1); - ASSERT_EQ( test_int.pass_hist1d_mean,1); - ASSERT_EQ( test_int.pass_hist1d_var,1); - ASSERT_EQ( test_int.pass_hist1d_covar,1); - ASSERT_EQ( test_int.pass_hist3d_mean,1); - ASSERT_EQ( test_int.pass_hist3d_var,1); - ASSERT_EQ( test_int.pass_hist3d_covar,1); - deep_copy(density_1d,0); - deep_copy(density_3d,0); + test_random_scalar test_int(density_1d, density_3d, + pool, num_draws); + ASSERT_EQ(test_int.pass_mean, 1); + ASSERT_EQ(test_int.pass_var, 1); + ASSERT_EQ(test_int.pass_covar, 1); + ASSERT_EQ(test_int.pass_hist1d_mean, 1); + ASSERT_EQ(test_int.pass_hist1d_var, 1); + ASSERT_EQ(test_int.pass_hist1d_covar, 1); + ASSERT_EQ(test_int.pass_hist3d_mean, 1); + ASSERT_EQ(test_int.pass_hist3d_var, 1); + ASSERT_EQ(test_int.pass_hist3d_covar, 1); + deep_copy(density_1d, 0); + deep_copy(density_3d, 0); cout << "Test Scalar=unsigned int" << endl; - test_random_scalar test_uint(density_1d,density_3d,pool,num_draws); - ASSERT_EQ( test_uint.pass_mean,1); - ASSERT_EQ( test_uint.pass_var,1); - ASSERT_EQ( test_uint.pass_covar,1); - ASSERT_EQ( test_uint.pass_hist1d_mean,1); - ASSERT_EQ( test_uint.pass_hist1d_var,1); - ASSERT_EQ( test_uint.pass_hist1d_covar,1); - ASSERT_EQ( test_uint.pass_hist3d_mean,1); - ASSERT_EQ( test_uint.pass_hist3d_var,1); - ASSERT_EQ( test_uint.pass_hist3d_covar,1); - deep_copy(density_1d,0); - deep_copy(density_3d,0); + test_random_scalar test_uint( + density_1d, density_3d, pool, num_draws); + ASSERT_EQ(test_uint.pass_mean, 1); + ASSERT_EQ(test_uint.pass_var, 1); + ASSERT_EQ(test_uint.pass_covar, 1); + ASSERT_EQ(test_uint.pass_hist1d_mean, 1); + ASSERT_EQ(test_uint.pass_hist1d_var, 1); + ASSERT_EQ(test_uint.pass_hist1d_covar, 1); + ASSERT_EQ(test_uint.pass_hist3d_mean, 1); + ASSERT_EQ(test_uint.pass_hist3d_var, 1); + ASSERT_EQ(test_uint.pass_hist3d_covar, 1); + deep_copy(density_1d, 0); + deep_copy(density_3d, 0); cout << "Test Scalar=int64_t" << endl; - test_random_scalar test_int64(density_1d,density_3d,pool,num_draws); - ASSERT_EQ( test_int64.pass_mean,1); - ASSERT_EQ( test_int64.pass_var,1); - ASSERT_EQ( test_int64.pass_covar,1); - ASSERT_EQ( test_int64.pass_hist1d_mean,1); - ASSERT_EQ( test_int64.pass_hist1d_var,1); - ASSERT_EQ( test_int64.pass_hist1d_covar,1); - ASSERT_EQ( test_int64.pass_hist3d_mean,1); - ASSERT_EQ( test_int64.pass_hist3d_var,1); - ASSERT_EQ( test_int64.pass_hist3d_covar,1); - deep_copy(density_1d,0); - deep_copy(density_3d,0); + test_random_scalar test_int64( + density_1d, density_3d, pool, num_draws); + ASSERT_EQ(test_int64.pass_mean, 1); + ASSERT_EQ(test_int64.pass_var, 1); + ASSERT_EQ(test_int64.pass_covar, 1); + ASSERT_EQ(test_int64.pass_hist1d_mean, 1); + ASSERT_EQ(test_int64.pass_hist1d_var, 1); + ASSERT_EQ(test_int64.pass_hist1d_covar, 1); + ASSERT_EQ(test_int64.pass_hist3d_mean, 1); + ASSERT_EQ(test_int64.pass_hist3d_var, 1); + ASSERT_EQ(test_int64.pass_hist3d_covar, 1); + deep_copy(density_1d, 0); + deep_copy(density_3d, 0); cout << "Test Scalar=uint64_t" << endl; - test_random_scalar test_uint64(density_1d,density_3d,pool,num_draws); - ASSERT_EQ( test_uint64.pass_mean,1); - ASSERT_EQ( test_uint64.pass_var,1); - ASSERT_EQ( test_uint64.pass_covar,1); - ASSERT_EQ( test_uint64.pass_hist1d_mean,1); - ASSERT_EQ( test_uint64.pass_hist1d_var,1); - ASSERT_EQ( test_uint64.pass_hist1d_covar,1); - ASSERT_EQ( test_uint64.pass_hist3d_mean,1); - ASSERT_EQ( test_uint64.pass_hist3d_var,1); - ASSERT_EQ( test_uint64.pass_hist3d_covar,1); - deep_copy(density_1d,0); - deep_copy(density_3d,0); + test_random_scalar test_uint64( + density_1d, density_3d, pool, num_draws); + ASSERT_EQ(test_uint64.pass_mean, 1); + ASSERT_EQ(test_uint64.pass_var, 1); + ASSERT_EQ(test_uint64.pass_covar, 1); + ASSERT_EQ(test_uint64.pass_hist1d_mean, 1); + ASSERT_EQ(test_uint64.pass_hist1d_var, 1); + ASSERT_EQ(test_uint64.pass_hist1d_covar, 1); + ASSERT_EQ(test_uint64.pass_hist3d_mean, 1); + ASSERT_EQ(test_uint64.pass_hist3d_var, 1); + ASSERT_EQ(test_uint64.pass_hist3d_covar, 1); + deep_copy(density_1d, 0); + deep_copy(density_3d, 0); cout << "Test Scalar=float" << endl; - test_random_scalar test_float(density_1d,density_3d,pool,num_draws); - ASSERT_EQ( test_float.pass_mean,1); - ASSERT_EQ( test_float.pass_var,1); - ASSERT_EQ( test_float.pass_covar,1); - ASSERT_EQ( test_float.pass_hist1d_mean,1); - ASSERT_EQ( test_float.pass_hist1d_var,1); - ASSERT_EQ( test_float.pass_hist1d_covar,1); - ASSERT_EQ( test_float.pass_hist3d_mean,1); - ASSERT_EQ( test_float.pass_hist3d_var,1); - ASSERT_EQ( test_float.pass_hist3d_covar,1); - deep_copy(density_1d,0); - deep_copy(density_3d,0); + test_random_scalar test_float(density_1d, density_3d, + pool, num_draws); + ASSERT_EQ(test_float.pass_mean, 1); + ASSERT_EQ(test_float.pass_var, 1); + ASSERT_EQ(test_float.pass_covar, 1); + ASSERT_EQ(test_float.pass_hist1d_mean, 1); + ASSERT_EQ(test_float.pass_hist1d_var, 1); + ASSERT_EQ(test_float.pass_hist1d_covar, 1); + ASSERT_EQ(test_float.pass_hist3d_mean, 1); + ASSERT_EQ(test_float.pass_hist3d_var, 1); + ASSERT_EQ(test_float.pass_hist3d_covar, 1); + deep_copy(density_1d, 0); + deep_copy(density_3d, 0); cout << "Test Scalar=double" << endl; - test_random_scalar test_double(density_1d,density_3d,pool,num_draws); - ASSERT_EQ( test_double.pass_mean,1); - ASSERT_EQ( test_double.pass_var,1); - ASSERT_EQ( test_double.pass_covar,1); - ASSERT_EQ( test_double.pass_hist1d_mean,1); - ASSERT_EQ( test_double.pass_hist1d_var,1); - ASSERT_EQ( test_double.pass_hist1d_covar,1); - ASSERT_EQ( test_double.pass_hist3d_mean,1); - ASSERT_EQ( test_double.pass_hist3d_var,1); - ASSERT_EQ( test_double.pass_hist3d_covar,1); -} + test_random_scalar test_double( + density_1d, density_3d, pool, num_draws); + ASSERT_EQ(test_double.pass_mean, 1); + ASSERT_EQ(test_double.pass_var, 1); + ASSERT_EQ(test_double.pass_covar, 1); + ASSERT_EQ(test_double.pass_hist1d_mean, 1); + ASSERT_EQ(test_double.pass_hist1d_var, 1); + ASSERT_EQ(test_double.pass_hist1d_covar, 1); + ASSERT_EQ(test_double.pass_hist3d_mean, 1); + ASSERT_EQ(test_double.pass_hist3d_var, 1); + ASSERT_EQ(test_double.pass_hist3d_covar, 1); } +} // namespace Impl -} // namespace Test +} // namespace Test -#endif //KOKKOS_TEST_UNORDERED_MAP_HPP +#endif // KOKKOS_TEST_UNORDERED_MAP_HPP diff --git a/lib/kokkos/algorithms/unit_tests/TestSerial.cpp b/lib/kokkos/algorithms/unit_tests/TestSerial.cpp index 9cf998f773..2eacdc2677 100644 --- a/lib/kokkos/algorithms/unit_tests/TestSerial.cpp +++ b/lib/kokkos/algorithms/unit_tests/TestSerial.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -52,49 +53,36 @@ #include #include - //---------------------------------------------------------------------------- - namespace Test { -class serial : public ::testing::Test { -protected: - static void SetUpTestCase() - { +#define SERIAL_RANDOM_XORSHIFT64(num_draws) \ + TEST(serial, Random_XorShift64) { \ + Impl::test_random >( \ + num_draws); \ } - static void TearDownTestCase () - { - } -}; - -#define SERIAL_RANDOM_XORSHIFT64( num_draws ) \ - TEST_F( serial, Random_XorShift64 ) { \ - Impl::test_random >(num_draws); \ +#define SERIAL_RANDOM_XORSHIFT1024(num_draws) \ + TEST(serial, Random_XorShift1024) { \ + Impl::test_random >( \ + num_draws); \ } -#define SERIAL_RANDOM_XORSHIFT1024( num_draws ) \ - TEST_F( serial, Random_XorShift1024 ) { \ - Impl::test_random >(num_draws); \ +#define SERIAL_SORT_UNSIGNED(size) \ + TEST(serial, SortUnsigned) { \ + Impl::test_sort(size); \ } -#define SERIAL_SORT_UNSIGNED( size ) \ - TEST_F( serial, SortUnsigned ) { \ - Impl::test_sort< Kokkos::Serial, unsigned >(size); \ - } - -SERIAL_RANDOM_XORSHIFT64( 10240000 ) -SERIAL_RANDOM_XORSHIFT1024( 10130144 ) +SERIAL_RANDOM_XORSHIFT64(10240000) +SERIAL_RANDOM_XORSHIFT1024(10130144) SERIAL_SORT_UNSIGNED(171) #undef SERIAL_RANDOM_XORSHIFT64 #undef SERIAL_RANDOM_XORSHIFT1024 #undef SERIAL_SORT_UNSIGNED -} // namespace Test +} // namespace Test #else void KOKKOS_ALGORITHMS_UNITTESTS_TESTSERIAL_PREVENT_LINK_ERROR() {} -#endif // KOKKOS_ENABLE_SERIAL - - +#endif // KOKKOS_ENABLE_SERIAL diff --git a/lib/kokkos/algorithms/unit_tests/TestSort.hpp b/lib/kokkos/algorithms/unit_tests/TestSort.hpp index 5fd7f09b50..310a93c93d 100644 --- a/lib/kokkos/algorithms/unit_tests/TestSort.hpp +++ b/lib/kokkos/algorithms/unit_tests/TestSort.hpp @@ -1,10 +1,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -43,235 +44,248 @@ #define KOKKOS_ALGORITHMS_UNITTESTS_TESTSORT_HPP #include -#include -#include -#include -#include +#include +#include +#include +#include namespace Test { -namespace Impl{ +namespace Impl { -template +template struct is_sorted_struct { typedef unsigned int value_type; typedef ExecutionSpace execution_space; - Kokkos::View keys; + Kokkos::View keys; - is_sorted_struct(Kokkos::View keys_):keys(keys_) {} + is_sorted_struct(Kokkos::View keys_) : keys(keys_) {} KOKKOS_INLINE_FUNCTION - void operator() (int i, unsigned int& count) const { - if(keys(i)>keys(i+1)) count++; + void operator()(int i, unsigned int& count) const { + if (keys(i) > keys(i + 1)) count++; } }; -template +template struct sum { typedef double value_type; typedef ExecutionSpace execution_space; - Kokkos::View keys; + Kokkos::View keys; - sum(Kokkos::View keys_):keys(keys_) {} + sum(Kokkos::View keys_) : keys(keys_) {} KOKKOS_INLINE_FUNCTION - void operator() (int i, double& count) const { - count+=keys(i); - } + void operator()(int i, double& count) const { count += keys(i); } }; -template +template struct bin3d_is_sorted_struct { typedef unsigned int value_type; typedef ExecutionSpace execution_space; - Kokkos::View keys; + Kokkos::View keys; int max_bins; Scalar min; Scalar max; - bin3d_is_sorted_struct(Kokkos::View keys_,int max_bins_,Scalar min_,Scalar max_): - keys(keys_),max_bins(max_bins_),min(min_),max(max_) { - } + bin3d_is_sorted_struct(Kokkos::View keys_, + int max_bins_, Scalar min_, Scalar max_) + : keys(keys_), max_bins(max_bins_), min(min_), max(max_) {} KOKKOS_INLINE_FUNCTION - void operator() (int i, unsigned int& count) const { - int ix1 = int ((keys(i,0)-min)/max * max_bins); - int iy1 = int ((keys(i,1)-min)/max * max_bins); - int iz1 = int ((keys(i,2)-min)/max * max_bins); - int ix2 = int ((keys(i+1,0)-min)/max * max_bins); - int iy2 = int ((keys(i+1,1)-min)/max * max_bins); - int iz2 = int ((keys(i+1,2)-min)/max * max_bins); + void operator()(int i, unsigned int& count) const { + int ix1 = int((keys(i, 0) - min) / max * max_bins); + int iy1 = int((keys(i, 1) - min) / max * max_bins); + int iz1 = int((keys(i, 2) - min) / max * max_bins); + int ix2 = int((keys(i + 1, 0) - min) / max * max_bins); + int iy2 = int((keys(i + 1, 1) - min) / max * max_bins); + int iz2 = int((keys(i + 1, 2) - min) / max * max_bins); - if (ix1>ix2) count++; - else if(ix1==ix2) { - if (iy1>iy2) count++; - else if ((iy1==iy2) && (iz1>iz2)) count++; + if (ix1 > ix2) + count++; + else if (ix1 == ix2) { + if (iy1 > iy2) + count++; + else if ((iy1 == iy2) && (iz1 > iz2)) + count++; } } }; -template +template struct sum3D { typedef double value_type; typedef ExecutionSpace execution_space; - Kokkos::View keys; + Kokkos::View keys; - sum3D(Kokkos::View keys_):keys(keys_) {} + sum3D(Kokkos::View keys_) : keys(keys_) {} KOKKOS_INLINE_FUNCTION - void operator() (int i, double& count) const { - count+=keys(i,0); - count+=keys(i,1); - count+=keys(i,2); + void operator()(int i, double& count) const { + count += keys(i, 0); + count += keys(i, 1); + count += keys(i, 2); } }; -template -void test_1D_sort(unsigned int n,bool force_kokkos) { - typedef Kokkos::View KeyViewType; - KeyViewType keys("Keys",n); +template +void test_1D_sort(unsigned int n, bool force_kokkos) { + typedef Kokkos::View KeyViewType; + KeyViewType keys("Keys", n); // Test sorting array with all numbers equal - Kokkos::deep_copy(keys,KeyType(1)); - Kokkos::sort(keys,force_kokkos); + Kokkos::deep_copy(keys, KeyType(1)); + Kokkos::sort(keys, force_kokkos); Kokkos::Random_XorShift64_Pool g(1931); - Kokkos::fill_random(keys,g,Kokkos::Random_XorShift64_Pool::generator_type::MAX_URAND); + Kokkos::fill_random(keys, g, + Kokkos::Random_XorShift64_Pool< + ExecutionSpace>::generator_type::MAX_URAND); - double sum_before = 0.0; - double sum_after = 0.0; + double sum_before = 0.0; + double sum_after = 0.0; unsigned int sort_fails = 0; - Kokkos::parallel_reduce(n,sum(keys),sum_before); + Kokkos::parallel_reduce(n, sum(keys), sum_before); - Kokkos::sort(keys,force_kokkos); + Kokkos::sort(keys, force_kokkos); - Kokkos::parallel_reduce(n,sum(keys),sum_after); - Kokkos::parallel_reduce(n-1,is_sorted_struct(keys),sort_fails); + Kokkos::parallel_reduce(n, sum(keys), sum_after); + Kokkos::parallel_reduce( + n - 1, is_sorted_struct(keys), sort_fails); - double ratio = sum_before/sum_after; + double ratio = sum_before / sum_after; double epsilon = 1e-10; - unsigned int equal_sum = (ratio > (1.0-epsilon)) && (ratio < (1.0+epsilon)) ? 1 : 0; + unsigned int equal_sum = + (ratio > (1.0 - epsilon)) && (ratio < (1.0 + epsilon)) ? 1 : 0; - ASSERT_EQ(sort_fails,0); - ASSERT_EQ(equal_sum,1); + ASSERT_EQ(sort_fails, 0); + ASSERT_EQ(equal_sum, 1); } -template +template void test_3D_sort(unsigned int n) { - typedef Kokkos::View KeyViewType; + typedef Kokkos::View KeyViewType; - KeyViewType keys("Keys",n*n*n); + KeyViewType keys("Keys", n * n * n); Kokkos::Random_XorShift64_Pool g(1931); - Kokkos::fill_random(keys,g,100.0); + Kokkos::fill_random(keys, g, 100.0); - double sum_before = 0.0; - double sum_after = 0.0; + double sum_before = 0.0; + double sum_after = 0.0; unsigned int sort_fails = 0; - Kokkos::parallel_reduce(keys.extent(0),sum3D(keys),sum_before); + Kokkos::parallel_reduce(keys.extent(0), sum3D(keys), + sum_before); int bin_1d = 1; - while( bin_1d*bin_1d*bin_1d*4< (int) keys.extent(0) ) bin_1d*=2; - int bin_max[3] = {bin_1d,bin_1d,bin_1d}; - typename KeyViewType::value_type min[3] = {0,0,0}; - typename KeyViewType::value_type max[3] = {100,100,100}; + while (bin_1d * bin_1d * bin_1d * 4 < (int)keys.extent(0)) bin_1d *= 2; + int bin_max[3] = {bin_1d, bin_1d, bin_1d}; + typename KeyViewType::value_type min[3] = {0, 0, 0}; + typename KeyViewType::value_type max[3] = {100, 100, 100}; - typedef Kokkos::BinOp3D< KeyViewType > BinOp; - BinOp bin_op(bin_max,min,max); - Kokkos::BinSort< KeyViewType , BinOp > - Sorter(keys,bin_op,false); + typedef Kokkos::BinOp3D BinOp; + BinOp bin_op(bin_max, min, max); + Kokkos::BinSort Sorter(keys, bin_op, false); Sorter.create_permute_vector(); - Sorter.template sort< KeyViewType >(keys); + Sorter.template sort(keys); - Kokkos::parallel_reduce(keys.extent(0),sum3D(keys),sum_after); - Kokkos::parallel_reduce(keys.extent(0)-1,bin3d_is_sorted_struct(keys,bin_1d,min[0],max[0]),sort_fails); + Kokkos::parallel_reduce(keys.extent(0), sum3D(keys), + sum_after); + Kokkos::parallel_reduce(keys.extent(0) - 1, + bin3d_is_sorted_struct( + keys, bin_1d, min[0], max[0]), + sort_fails); - double ratio = sum_before/sum_after; + double ratio = sum_before / sum_after; double epsilon = 1e-10; - unsigned int equal_sum = (ratio > (1.0-epsilon)) && (ratio < (1.0+epsilon)) ? 1 : 0; + unsigned int equal_sum = + (ratio > (1.0 - epsilon)) && (ratio < (1.0 + epsilon)) ? 1 : 0; - if ( sort_fails ) - printf("3D Sort Sum: %f %f Fails: %u\n",sum_before,sum_after,sort_fails); + if (sort_fails) + printf("3D Sort Sum: %f %f Fails: %u\n", sum_before, sum_after, sort_fails); - ASSERT_EQ(sort_fails,0); - ASSERT_EQ(equal_sum,1); + ASSERT_EQ(sort_fails, 0); + ASSERT_EQ(equal_sum, 1); } //---------------------------------------------------------------------------- -template -void test_dynamic_view_sort(unsigned int n ) -{ - typedef Kokkos::Experimental::DynamicView KeyDynamicViewType; - typedef Kokkos::View KeyViewType; +template +void test_dynamic_view_sort(unsigned int n) { + typedef Kokkos::Experimental::DynamicView + KeyDynamicViewType; + typedef Kokkos::View KeyViewType; - const size_t upper_bound = 2 * n ; + const size_t upper_bound = 2 * n; const size_t min_chunk_size = 1024; KeyDynamicViewType keys("Keys", min_chunk_size, upper_bound); keys.resize_serial(n); - KeyViewType keys_view("KeysTmp", n ); + KeyViewType keys_view("KeysTmp", n); // Test sorting array with all numbers equal - Kokkos::deep_copy(keys_view,KeyType(1)); - Kokkos::deep_copy(keys,keys_view); - Kokkos::sort(keys, 0 /* begin */ , n /* end */ ); + Kokkos::deep_copy(keys_view, KeyType(1)); + Kokkos::deep_copy(keys, keys_view); + Kokkos::sort(keys, 0 /* begin */, n /* end */); Kokkos::Random_XorShift64_Pool g(1931); - Kokkos::fill_random(keys_view,g,Kokkos::Random_XorShift64_Pool::generator_type::MAX_URAND); + Kokkos::fill_random(keys_view, g, + Kokkos::Random_XorShift64_Pool< + ExecutionSpace>::generator_type::MAX_URAND); ExecutionSpace().fence(); - Kokkos::deep_copy(keys,keys_view); - //ExecutionSpace().fence(); + Kokkos::deep_copy(keys, keys_view); + // ExecutionSpace().fence(); - double sum_before = 0.0; - double sum_after = 0.0; + double sum_before = 0.0; + double sum_after = 0.0; unsigned int sort_fails = 0; - Kokkos::parallel_reduce(n,sum(keys_view),sum_before); + Kokkos::parallel_reduce(n, sum(keys_view), + sum_before); - Kokkos::sort(keys, 0 /* begin */ , n /* end */ ); + Kokkos::sort(keys, 0 /* begin */, n /* end */); - ExecutionSpace().fence(); // Need this fence to prevent BusError with Cuda - Kokkos::deep_copy( keys_view , keys ); - //ExecutionSpace().fence(); + ExecutionSpace().fence(); // Need this fence to prevent BusError with Cuda + Kokkos::deep_copy(keys_view, keys); + // ExecutionSpace().fence(); - Kokkos::parallel_reduce(n,sum(keys_view),sum_after); - Kokkos::parallel_reduce(n-1,is_sorted_struct(keys_view),sort_fails); + Kokkos::parallel_reduce(n, sum(keys_view), + sum_after); + Kokkos::parallel_reduce( + n - 1, is_sorted_struct(keys_view), sort_fails); - double ratio = sum_before/sum_after; + double ratio = sum_before / sum_after; double epsilon = 1e-10; - unsigned int equal_sum = (ratio > (1.0-epsilon)) && (ratio < (1.0+epsilon)) ? 1 : 0; + unsigned int equal_sum = + (ratio > (1.0 - epsilon)) && (ratio < (1.0 + epsilon)) ? 1 : 0; - if ( sort_fails != 0 || equal_sum != 1 ) { - std::cout << " N = " << n - << " ; sum_before = " << sum_before - << " ; sum_after = " << sum_after - << " ; ratio = " << ratio - << std::endl ; + if (sort_fails != 0 || equal_sum != 1) { + std::cout << " N = " << n << " ; sum_before = " << sum_before + << " ; sum_after = " << sum_after << " ; ratio = " << ratio + << std::endl; } - ASSERT_EQ(sort_fails,0); - ASSERT_EQ(equal_sum,1); + ASSERT_EQ(sort_fails, 0); + ASSERT_EQ(equal_sum, 1); } //---------------------------------------------------------------------------- -template -void test_issue_1160() -{ +template +void test_issue_1160() { Kokkos::View element_("element", 10); Kokkos::View x_("x", 10); Kokkos::View v_("y", 10); auto h_element = Kokkos::create_mirror_view(element_); - auto h_x = Kokkos::create_mirror_view(x_); - auto h_v = Kokkos::create_mirror_view(v_); + auto h_x = Kokkos::create_mirror_view(x_); + auto h_v = Kokkos::create_mirror_view(v_); h_element(0) = 9; h_element(1) = 8; @@ -292,20 +306,21 @@ void test_issue_1160() Kokkos::deep_copy(v_, h_v); typedef decltype(element_) KeyViewType; - typedef Kokkos::BinOp1D< KeyViewType > BinOp; + typedef Kokkos::BinOp1D BinOp; int begin = 3; - int end = 8; - auto max = h_element(begin); - auto min = h_element(end - 1); + int end = 8; + auto max = h_element(begin); + auto min = h_element(end - 1); BinOp binner(end - begin, min, max); - Kokkos::BinSort Sorter(element_,begin,end,binner,false); + Kokkos::BinSort Sorter(element_, begin, end, binner, + false); Sorter.create_permute_vector(); - Sorter.sort(element_,begin,end); + Sorter.sort(element_, begin, end); - Sorter.sort(x_,begin,end); - Sorter.sort(v_,begin,end); + Sorter.sort(x_, begin, end); + Sorter.sort(v_, begin, end); Kokkos::deep_copy(h_element, element_); Kokkos::deep_copy(h_x, x_); @@ -330,18 +345,17 @@ void test_issue_1160() //---------------------------------------------------------------------------- -template -void test_sort(unsigned int N) -{ - test_1D_sort(N*N*N, true); - test_1D_sort(N*N*N, false); +template +void test_sort(unsigned int N) { + test_1D_sort(N * N * N, true); + test_1D_sort(N * N * N, false); #if !defined(KOKKOS_ENABLE_ROCM) - test_3D_sort(N); - test_dynamic_view_sort(N*N); + test_3D_sort(N); + test_dynamic_view_sort(N * N); #endif test_issue_1160(); } -} -} +} // namespace Impl +} // namespace Test #endif /* KOKKOS_ALGORITHMS_UNITTESTS_TESTSORT_HPP */ diff --git a/lib/kokkos/algorithms/unit_tests/TestThreads.cpp b/lib/kokkos/algorithms/unit_tests/TestThreads.cpp index 99cdb7da92..c75e6e8dfb 100644 --- a/lib/kokkos/algorithms/unit_tests/TestThreads.cpp +++ b/lib/kokkos/algorithms/unit_tests/TestThreads.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -52,51 +53,36 @@ #include #include - //---------------------------------------------------------------------------- - namespace Test { -class threads : public ::testing::Test { -protected: - static void SetUpTestCase() - { - std::cout << std::setprecision(5) << std::scientific; +#define THREADS_RANDOM_XORSHIFT64(num_draws) \ + TEST(threads, Random_XorShift64) { \ + Impl::test_random >( \ + num_draws); \ } - static void TearDownTestCase() - { - } -}; - -#define THREADS_RANDOM_XORSHIFT64( num_draws ) \ - TEST_F( threads, Random_XorShift64 ) { \ - Impl::test_random >(num_draws); \ +#define THREADS_RANDOM_XORSHIFT1024(num_draws) \ + TEST(threads, Random_XorShift1024) { \ + Impl::test_random >( \ + num_draws); \ } -#define THREADS_RANDOM_XORSHIFT1024( num_draws ) \ - TEST_F( threads, Random_XorShift1024 ) { \ - Impl::test_random >(num_draws); \ +#define THREADS_SORT_UNSIGNED(size) \ + TEST(threads, SortUnsigned) { \ + Impl::test_sort(size); \ } -#define THREADS_SORT_UNSIGNED( size ) \ - TEST_F( threads, SortUnsigned ) { \ - Impl::test_sort< Kokkos::Threads, double >(size); \ - } - - -THREADS_RANDOM_XORSHIFT64( 10240000 ) -THREADS_RANDOM_XORSHIFT1024( 10130144 ) +THREADS_RANDOM_XORSHIFT64(10240000) +THREADS_RANDOM_XORSHIFT1024(10130144) THREADS_SORT_UNSIGNED(171) #undef THREADS_RANDOM_XORSHIFT64 #undef THREADS_RANDOM_XORSHIFT1024 #undef THREADS_SORT_UNSIGNED -} // namespace Test +} // namespace Test #else void KOKKOS_ALGORITHMS_UNITTESTS_TESTTHREADS_PREVENT_LINK_ERROR() {} #endif - - diff --git a/lib/kokkos/algorithms/unit_tests/UnitTestMain.cpp b/lib/kokkos/algorithms/unit_tests/UnitTestMain.cpp index 8feb08332f..e245aad35f 100644 --- a/lib/kokkos/algorithms/unit_tests/UnitTestMain.cpp +++ b/lib/kokkos/algorithms/unit_tests/UnitTestMain.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,10 +46,9 @@ #include int main(int argc, char *argv[]) { - Kokkos::initialize(argc,argv); - ::testing::InitGoogleTest(&argc,argv); + Kokkos::initialize(argc, argv); + ::testing::InitGoogleTest(&argc, argv); int result = RUN_ALL_TESTS(); Kokkos::finalize(); return result; } - diff --git a/lib/kokkos/benchmarks/atomic/main.cpp b/lib/kokkos/benchmarks/atomic/main.cpp index d86d196249..5f0977f754 100644 --- a/lib/kokkos/benchmarks/atomic/main.cpp +++ b/lib/kokkos/benchmarks/atomic/main.cpp @@ -1,124 +1,120 @@ -#include -#include -#include +#include +#include +#include -template -double test_atomic(int L, int N, int M,int K,int R,Kokkos::View offsets) { - Kokkos::View output("Output",N); +template +double test_atomic(int L, int N, int M, int K, int R, + Kokkos::View offsets) { + Kokkos::View output("Output", N); Kokkos::Impl::Timer timer; - for(int r = 0; r -double test_no_atomic(int L, int N, int M,int K,int R,Kokkos::View offsets) { - Kokkos::View output("Output",N); +template +double test_no_atomic(int L, int N, int M, int K, int R, + Kokkos::View offsets) { + Kokkos::View output("Output", N); Kokkos::Impl::Timer timer; - for(int r = 0; r\n"); - printf("Example Input GPU:\n"); - printf(" Histogram : 1000000 1000 1 1000 1 10 1\n"); - printf(" MD Force : 100000 100000 100 1000 20 10 4\n"); - printf(" Matrix Assembly : 100000 1000000 50 1000 20 10 4\n"); - Kokkos::finalize(); - return 0; + Kokkos::initialize(argc, argv); + { + if (argc < 8) { + printf("Arguments: L N M D K R T\n"); + printf(" L: Number of iterations to run\n"); + printf(" N: Length of array to do atomics into\n"); + printf(" M: Number of atomics per iteration to do\n"); + printf(" D: Distance from index i to do atomics into (randomly)\n"); + printf(" K: Number of FMAD per atomic\n"); + printf(" R: Number of repeats of the experiments\n"); + printf(" T: Type of atomic\n"); + printf(" 1 - int\n"); + printf(" 2 - long\n"); + printf(" 3 - float\n"); + printf(" 4 - double\n"); + printf(" 5 - complex\n"); + printf("Example Input GPU:\n"); + printf(" Histogram : 1000000 1000 1 1000 1 10 1\n"); + printf(" MD Force : 100000 100000 100 1000 20 10 4\n"); + printf(" Matrix Assembly : 100000 1000000 50 1000 20 10 4\n"); + Kokkos::finalize(); + return 0; + } + + int L = atoi(argv[1]); + int N = atoi(argv[2]); + int M = atoi(argv[3]); + int D = atoi(argv[4]); + int K = atoi(argv[5]); + int R = atoi(argv[6]); + int type = atoi(argv[7]); + + Kokkos::View offsets("Offsets", L, M); + Kokkos::Random_XorShift64_Pool<> pool(12371); + Kokkos::fill_random(offsets, pool, D); + double time = 0; + if (type == 1) time = test_atomic(L, N, M, K, R, offsets); + if (type == 2) time = test_atomic(L, N, M, K, R, offsets); + if (type == 3) time = test_atomic(L, N, M, K, R, offsets); + if (type == 4) time = test_atomic(L, N, M, K, R, offsets); + if (type == 5) + time = test_atomic >(L, N, M, K, R, offsets); + + double time2 = 1; + if (type == 1) time2 = test_no_atomic(L, N, M, K, R, offsets); + if (type == 2) time2 = test_no_atomic(L, N, M, K, R, offsets); + if (type == 3) time2 = test_no_atomic(L, N, M, K, R, offsets); + if (type == 4) time2 = test_no_atomic(L, N, M, K, R, offsets); + if (type == 5) + time2 = test_no_atomic >(L, N, M, K, R, offsets); + + int size = 0; + if (type == 1) size = sizeof(int); + if (type == 2) size = sizeof(long); + if (type == 3) size = sizeof(float); + if (type == 4) size = sizeof(double); + if (type == 5) size = sizeof(Kokkos::complex); + + printf("%i\n", size); + printf( + "Time: %s %i %i %i %i %i %i (t_atomic: %e t_nonatomic: %e ratio: %lf " + ")( GUpdates/s: %lf GB/s: %lf )\n", + (type == 1) + ? "int" + : ((type == 2) + ? "long" + : ((type == 3) ? "float" + : ((type == 4) ? "double" : "complex"))), + L, N, M, D, K, R, time, time2, time / time2, 1.e-9 * L * R * M / time, + 1.0 * L * R * M * 2 * size / time / 1024 / 1024 / 1024); } - - - int L = atoi(argv[1]); - int N = atoi(argv[2]); - int M = atoi(argv[3]); - int D = atoi(argv[4]); - int K = atoi(argv[5]); - int R = atoi(argv[6]); - int type = atoi(argv[7]); - - Kokkos::View offsets("Offsets",L,M); - Kokkos::Random_XorShift64_Pool<> pool(12371); - Kokkos::fill_random(offsets,pool,D); - double time = 0; - if(type==1) - time = test_atomic(L,N,M,K,R,offsets); - if(type==2) - time = test_atomic(L,N,M,K,R,offsets); - if(type==3) - time = test_atomic(L,N,M,K,R,offsets); - if(type==4) - time = test_atomic(L,N,M,K,R,offsets); - if(type==5) - time = test_atomic >(L,N,M,K,R,offsets); - - double time2 = 1; - if(type==1) - time2 = test_no_atomic(L,N,M,K,R,offsets); - if(type==2) - time2 = test_no_atomic(L,N,M,K,R,offsets); - if(type==3) - time2 = test_no_atomic(L,N,M,K,R,offsets); - if(type==4) - time2 = test_no_atomic(L,N,M,K,R,offsets); - if(type==5) - time2 = test_no_atomic >(L,N,M,K,R,offsets); - - int size = 0; - if(type==1) size = sizeof(int); - if(type==2) size = sizeof(long); - if(type==3) size = sizeof(float); - if(type==4) size = sizeof(double); - if(type==5) size = sizeof(Kokkos::complex); - - printf("%i\n",size); - printf("Time: %s %i %i %i %i %i %i (t_atomic: %e t_nonatomic: %e ratio: %lf )( GUpdates/s: %lf GB/s: %lf )\n", - (type==1)?"int": ( - (type==2)?"long": ( - (type==3)?"float": ( - (type==4)?"double":"complex"))), - L,N,M,D,K,R,time,time2,time/time2, - 1.e-9*L*R*M/time, 1.0*L*R*M*2*size/time/1024/1024/1024); -} Kokkos::finalize(); } - diff --git a/lib/kokkos/benchmarks/bytes_and_flops/bench.hpp b/lib/kokkos/benchmarks/bytes_and_flops/bench.hpp index 59b4d50c44..62d7ef4a4c 100644 --- a/lib/kokkos/benchmarks/bytes_and_flops/bench.hpp +++ b/lib/kokkos/benchmarks/bytes_and_flops/bench.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,59 +42,52 @@ //@HEADER */ -#include -#include +#include +#include -template +template struct Run { -static void run(int N, int K, int R, int F, int T, int S); + static void run(int N, int K, int R, int F, int T, int S); }; -template +template struct RunStride { -static void run_1(int N, int K, int R, int F, int T, int S); -static void run_2(int N, int K, int R, int F, int T, int S); -static void run_3(int N, int K, int R, int F, int T, int S); -static void run_4(int N, int K, int R, int F, int T, int S); -static void run_5(int N, int K, int R, int F, int T, int S); -static void run_6(int N, int K, int R, int F, int T, int S); -static void run_7(int N, int K, int R, int F, int T, int S); -static void run_8(int N, int K, int R, int F, int T, int S); -static void run(int N, int K, int R, int U, int F, int T, int S); + static void run_1(int N, int K, int R, int F, int T, int S); + static void run_2(int N, int K, int R, int F, int T, int S); + static void run_3(int N, int K, int R, int F, int T, int S); + static void run_4(int N, int K, int R, int F, int T, int S); + static void run_5(int N, int K, int R, int F, int T, int S); + static void run_6(int N, int K, int R, int F, int T, int S); + static void run_7(int N, int K, int R, int F, int T, int S); + static void run_8(int N, int K, int R, int F, int T, int S); + static void run(int N, int K, int R, int U, int F, int T, int S); }; #define STRIDE 1 -#include +#include #undef STRIDE #define STRIDE 2 -#include +#include #undef STRIDE #define STRIDE 4 -#include +#include #undef STRIDE #define STRIDE 8 -#include +#include #undef STRIDE #define STRIDE 16 -#include +#include #undef STRIDE #define STRIDE 32 -#include +#include #undef STRIDE -template +template void run_stride_unroll(int N, int K, int R, int D, int U, int F, int T, int S) { - if(D == 1) - RunStride::run(N,K,R,U,F,T,S); - if(D == 2) - RunStride::run(N,K,R,U,F,T,S); - if(D == 4) - RunStride::run(N,K,R,U,F,T,S); - if(D == 8) - RunStride::run(N,K,R,U,F,T,S); - if(D == 16) - RunStride::run(N,K,R,U,F,T,S); - if(D == 32) - RunStride::run(N,K,R,U,F,T,S); + if (D == 1) RunStride::run(N, K, R, U, F, T, S); + if (D == 2) RunStride::run(N, K, R, U, F, T, S); + if (D == 4) RunStride::run(N, K, R, U, F, T, S); + if (D == 8) RunStride::run(N, K, R, U, F, T, S); + if (D == 16) RunStride::run(N, K, R, U, F, T, S); + if (D == 32) RunStride::run(N, K, R, U, F, T, S); } - diff --git a/lib/kokkos/benchmarks/bytes_and_flops/bench_stride.hpp b/lib/kokkos/benchmarks/bytes_and_flops/bench_stride.hpp index 6509c654e7..64817fe9dc 100644 --- a/lib/kokkos/benchmarks/bytes_and_flops/bench_stride.hpp +++ b/lib/kokkos/benchmarks/bytes_and_flops/bench_stride.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,84 +42,82 @@ //@HEADER */ - #define UNROLL 1 -#include +#include #undef UNROLL #define UNROLL 2 -#include +#include #undef UNROLL #define UNROLL 3 -#include +#include #undef UNROLL #define UNROLL 4 -#include +#include #undef UNROLL #define UNROLL 5 -#include +#include #undef UNROLL #define UNROLL 6 -#include +#include #undef UNROLL #define UNROLL 7 -#include +#include #undef UNROLL #define UNROLL 8 -#include +#include #undef UNROLL -template -struct RunStride { -static void run_1(int N, int K, int R, int F, int T, int S) { - Run::run(N,K,R,F,T,S); -} -static void run_2(int N, int K, int R, int F, int T, int S) { - Run::run(N,K,R,F,T,S); -} -static void run_3(int N, int K, int R, int F, int T, int S) { - Run::run(N,K,R,F,T,S); -} -static void run_4(int N, int K, int R, int F, int T, int S) { - Run::run(N,K,R,F,T,S); -} -static void run_5(int N, int K, int R, int F, int T, int S) { - Run::run(N,K,R,F,T,S); -} -static void run_6(int N, int K, int R, int F, int T, int S) { - Run::run(N,K,R,F,T,S); -} -static void run_7(int N, int K, int R, int F, int T, int S) { - Run::run(N,K,R,F,T,S); -} -static void run_8(int N, int K, int R, int F, int T, int S) { - Run::run(N,K,R,F,T,S); -} +template +struct RunStride { + static void run_1(int N, int K, int R, int F, int T, int S) { + Run::run(N, K, R, F, T, S); + } + static void run_2(int N, int K, int R, int F, int T, int S) { + Run::run(N, K, R, F, T, S); + } + static void run_3(int N, int K, int R, int F, int T, int S) { + Run::run(N, K, R, F, T, S); + } + static void run_4(int N, int K, int R, int F, int T, int S) { + Run::run(N, K, R, F, T, S); + } + static void run_5(int N, int K, int R, int F, int T, int S) { + Run::run(N, K, R, F, T, S); + } + static void run_6(int N, int K, int R, int F, int T, int S) { + Run::run(N, K, R, F, T, S); + } + static void run_7(int N, int K, int R, int F, int T, int S) { + Run::run(N, K, R, F, T, S); + } + static void run_8(int N, int K, int R, int F, int T, int S) { + Run::run(N, K, R, F, T, S); + } -static void run(int N, int K, int R, int U, int F, int T, int S) { - if(U==1) { - run_1(N,K,R,F,T,S); + static void run(int N, int K, int R, int U, int F, int T, int S) { + if (U == 1) { + run_1(N, K, R, F, T, S); + } + if (U == 2) { + run_2(N, K, R, F, T, S); + } + if (U == 3) { + run_3(N, K, R, F, T, S); + } + if (U == 4) { + run_4(N, K, R, F, T, S); + } + if (U == 5) { + run_5(N, K, R, F, T, S); + } + if (U == 6) { + run_6(N, K, R, F, T, S); + } + if (U == 7) { + run_7(N, K, R, F, T, S); + } + if (U == 8) { + run_8(N, K, R, F, T, S); + } } - if(U==2) { - run_2(N,K,R,F,T,S); - } - if(U==3) { - run_3(N,K,R,F,T,S); - } - if(U==4) { - run_4(N,K,R,F,T,S); - } - if(U==5) { - run_5(N,K,R,F,T,S); - } - if(U==6) { - run_6(N,K,R,F,T,S); - } - if(U==7) { - run_7(N,K,R,F,T,S); - } - if(U==8) { - run_8(N,K,R,F,T,S); - } -} }; - diff --git a/lib/kokkos/benchmarks/bytes_and_flops/bench_unroll_stride.hpp b/lib/kokkos/benchmarks/bytes_and_flops/bench_unroll_stride.hpp index c6651da1e7..00ce635a48 100644 --- a/lib/kokkos/benchmarks/bytes_and_flops/bench_unroll_stride.hpp +++ b/lib/kokkos/benchmarks/bytes_and_flops/bench_unroll_stride.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,108 +42,110 @@ //@HEADER */ -template -struct Run { -static void run(int N, int K, int R, int F, int T, int S) { - Kokkos::View A("A",N,K); - Kokkos::View B("B",N,K); - Kokkos::View C("C",N,K); +template +struct Run { + static void run(int N, int K, int R, int F, int T, int S) { + Kokkos::View A("A", N, K); + Kokkos::View B("B", N, K); + Kokkos::View C("C", N, K); - Kokkos::deep_copy(A,Scalar(1.5)); - Kokkos::deep_copy(B,Scalar(2.5)); - Kokkos::deep_copy(C,Scalar(3.5)); + Kokkos::deep_copy(A, Scalar(1.5)); + Kokkos::deep_copy(B, Scalar(2.5)); + Kokkos::deep_copy(C, Scalar(3.5)); - Kokkos::Timer timer; - Kokkos::parallel_for("BenchmarkKernel",Kokkos::TeamPolicy<>(N,T).set_scratch_size(0,Kokkos::PerTeam(S)), - KOKKOS_LAMBDA ( const Kokkos::TeamPolicy<>::member_type& team) { - const int n = team.league_rank(); - for(int r=0; r1) - Scalar a2 = a1*1.3; + Kokkos::Timer timer; + Kokkos::parallel_for( + "BenchmarkKernel", + Kokkos::TeamPolicy<>(N, T).set_scratch_size(0, Kokkos::PerTeam(S)), + KOKKOS_LAMBDA(const Kokkos::TeamPolicy<>::member_type& team) { + const int n = team.league_rank(); + for (int r = 0; r < R; r++) { + Kokkos::parallel_for( + Kokkos::TeamThreadRange(team, 0, K), [&](const int& i) { + Scalar a1 = A(n, i, 0); + const Scalar b = B(n, i, 0); +#if (UNROLL > 1) + Scalar a2 = a1 * 1.3; #endif -#if(UNROLL>2) - Scalar a3 = a2*1.1; +#if (UNROLL > 2) + Scalar a3 = a2 * 1.1; #endif -#if(UNROLL>3) - Scalar a4 = a3*1.1; +#if (UNROLL > 3) + Scalar a4 = a3 * 1.1; #endif -#if(UNROLL>4) - Scalar a5 = a4*1.3; +#if (UNROLL > 4) + Scalar a5 = a4 * 1.3; #endif -#if(UNROLL>5) - Scalar a6 = a5*1.1; +#if (UNROLL > 5) + Scalar a6 = a5 * 1.1; #endif -#if(UNROLL>6) - Scalar a7 = a6*1.1; +#if (UNROLL > 6) + Scalar a7 = a6 * 1.1; #endif -#if(UNROLL>7) - Scalar a8 = a7*1.1; +#if (UNROLL > 7) + Scalar a8 = a7 * 1.1; #endif + for (int f = 0; f < F; f++) { + a1 += b * a1; +#if (UNROLL > 1) + a2 += b * a2; +#endif +#if (UNROLL > 2) + a3 += b * a3; +#endif +#if (UNROLL > 3) + a4 += b * a4; +#endif +#if (UNROLL > 4) + a5 += b * a5; +#endif +#if (UNROLL > 5) + a6 += b * a6; +#endif +#if (UNROLL > 6) + a7 += b * a7; +#endif +#if (UNROLL > 7) + a8 += b * a8; +#endif + } +#if (UNROLL == 1) + C(n, i, 0) = a1; +#endif +#if (UNROLL == 2) + C(n, i, 0) = a1 + a2; +#endif +#if (UNROLL == 3) + C(n, i, 0) = a1 + a2 + a3; +#endif +#if (UNROLL == 4) + C(n, i, 0) = a1 + a2 + a3 + a4; +#endif +#if (UNROLL == 5) + C(n, i, 0) = a1 + a2 + a3 + a4 + a5; +#endif +#if (UNROLL == 6) + C(n, i, 0) = a1 + a2 + a3 + a4 + a5 + a6; +#endif +#if (UNROLL == 7) + C(n, i, 0) = a1 + a2 + a3 + a4 + a5 + a6 + a7; +#endif +#if (UNROLL == 8) + C(n, i, 0) = a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8; +#endif + }); + } + }); + Kokkos::fence(); + double seconds = timer.seconds(); - for(int f = 0; f1) - a2 += b*a2; -#endif -#if(UNROLL>2) - a3 += b*a3; -#endif -#if(UNROLL>3) - a4 += b*a4; -#endif -#if(UNROLL>4) - a5 += b*a5; -#endif -#if(UNROLL>5) - a6 += b*a6; -#endif -#if(UNROLL>6) - a7 += b*a7; -#endif -#if(UNROLL>7) - a8 += b*a8; -#endif - - - } -#if(UNROLL==1) - C(n,i,0) = a1; -#endif -#if(UNROLL==2) - C(n,i,0) = a1+a2; -#endif -#if(UNROLL==3) - C(n,i,0) = a1+a2+a3; -#endif -#if(UNROLL==4) - C(n,i,0) = a1+a2+a3+a4; -#endif -#if(UNROLL==5) - C(n,i,0) = a1+a2+a3+a4+a5; -#endif -#if(UNROLL==6) - C(n,i,0) = a1+a2+a3+a4+a5+a6; -#endif -#if(UNROLL==7) - C(n,i,0) = a1+a2+a3+a4+a5+a6+a7; -#endif -#if(UNROLL==8) - C(n,i,0) = a1+a2+a3+a4+a5+a6+a7+a8; -#endif - - }); - } - }); - Kokkos::fence(); - double seconds = timer.seconds(); - - double bytes = 1.0*N*K*R*3*sizeof(Scalar); - double flops = 1.0*N*K*R*(F*2*UNROLL + 2*(UNROLL-1)); - printf("NKRUFTS: %i %i %i %i %i %i %i Time: %lfs Bandwidth: %lfGiB/s GFlop/s: %lf\n",N,K,R,UNROLL,F,T,S,seconds,1.0*bytes/seconds/1024/1024/1024,1.e-9*flops/seconds); -} + double bytes = 1.0 * N * K * R * 3 * sizeof(Scalar); + double flops = 1.0 * N * K * R * (F * 2 * UNROLL + 2 * (UNROLL - 1)); + printf( + "NKRUFTS: %i %i %i %i %i %i %i Time: %lfs Bandwidth: %lfGiB/s GFlop/s: " + "%lf\n", + N, K, R, UNROLL, F, T, S, seconds, + 1.0 * bytes / seconds / 1024 / 1024 / 1024, 1.e-9 * flops / seconds); + } }; - diff --git a/lib/kokkos/benchmarks/bytes_and_flops/main.cpp b/lib/kokkos/benchmarks/bytes_and_flops/main.cpp index 4f46b38717..c21a16200e 100644 --- a/lib/kokkos/benchmarks/bytes_and_flops/main.cpp +++ b/lib/kokkos/benchmarks/bytes_and_flops/main.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,25 +42,27 @@ //@HEADER */ -#include -#include -#include -#include +#include +#include +#include +#include int main(int argc, char* argv[]) { Kokkos::initialize(); - - if(argc<10) { + if (argc < 10) { printf("Arguments: N K R D U F T S\n"); printf(" P: Precision (1==float, 2==double)\n"); printf(" N,K: dimensions of the 2D array to allocate\n"); printf(" R: how often to loop through the K dimension with each team\n"); printf(" D: distance between loaded elements (stride)\n"); printf(" U: how many independent flops to do per load\n"); - printf(" F: how many times to repeat the U unrolled operations before reading next element\n"); + printf( + " F: how many times to repeat the U unrolled operations before " + "reading next element\n"); printf(" T: team size\n"); - printf(" S: shared memory per team (used to control occupancy on GPUs)\n"); + printf( + " S: shared memory per team (used to control occupancy on GPUs)\n"); printf("Example Input GPU:\n"); printf(" Bandwidth Bound : 2 100000 1024 1 1 1 1 256 6000\n"); printf(" Cache Bound : 2 100000 1024 64 1 1 1 512 20000\n"); @@ -70,7 +73,6 @@ int main(int argc, char* argv[]) { return 0; } - int P = atoi(argv[1]); int N = atoi(argv[2]); int K = atoi(argv[3]); @@ -81,17 +83,25 @@ int main(int argc, char* argv[]) { int T = atoi(argv[8]); int S = atoi(argv[9]); - if(U>8) {printf("U must be 1-8\n"); return 0;} - if( (D!=1) && (D!=2) && (D!=4) && (D!=8) && (D!=16) && (D!=32)) {printf("D must be one of 1,2,4,8,16,32\n"); return 0;} - if( (P!=1) && (P!=2) ) {printf("P must be one of 1,2\n"); return 0;} - - if(P==1) { - run_stride_unroll(N,K,R,D,U,F,T,S); + if (U > 8) { + printf("U must be 1-8\n"); + return 0; } - if(P==2) { - run_stride_unroll(N,K,R,D,U,F,T,S); + if ((D != 1) && (D != 2) && (D != 4) && (D != 8) && (D != 16) && (D != 32)) { + printf("D must be one of 1,2,4,8,16,32\n"); + return 0; + } + if ((P != 1) && (P != 2)) { + printf("P must be one of 1,2\n"); + return 0; + } + + if (P == 1) { + run_stride_unroll(N, K, R, D, U, F, T, S); + } + if (P == 2) { + run_stride_unroll(N, K, R, D, U, F, T, S); } Kokkos::finalize(); } - diff --git a/lib/kokkos/benchmarks/gather/gather.hpp b/lib/kokkos/benchmarks/gather/gather.hpp index bbbd65850f..239614184b 100644 --- a/lib/kokkos/benchmarks/gather/gather.hpp +++ b/lib/kokkos/benchmarks/gather/gather.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,52 +42,44 @@ //@HEADER */ -template +template struct RunGather { static void run(int N, int K, int D, int R, int F); }; #define UNROLL 1 -#include +#include #undef UNROLL #define UNROLL 2 -#include +#include #undef UNROLL #define UNROLL 3 -#include +#include #undef UNROLL #define UNROLL 4 -#include +#include #undef UNROLL #define UNROLL 5 -#include +#include #undef UNROLL #define UNROLL 6 -#include +#include #undef UNROLL #define UNROLL 7 -#include +#include #undef UNROLL #define UNROLL 8 -#include +#include #undef UNROLL -template +template void run_gather_test(int N, int K, int D, int R, int U, int F) { - if(U == 1) - RunGather::run(N,K,D,R,F); - if(U == 2) - RunGather::run(N,K,D,R,F); - if(U == 3) - RunGather::run(N,K,D,R,F); - if(U == 4) - RunGather::run(N,K,D,R,F); - if(U == 5) - RunGather::run(N,K,D,R,F); - if(U == 6) - RunGather::run(N,K,D,R,F); - if(U == 7) - RunGather::run(N,K,D,R,F); - if(U == 8) - RunGather::run(N,K,D,R,F); + if (U == 1) RunGather::run(N, K, D, R, F); + if (U == 2) RunGather::run(N, K, D, R, F); + if (U == 3) RunGather::run(N, K, D, R, F); + if (U == 4) RunGather::run(N, K, D, R, F); + if (U == 5) RunGather::run(N, K, D, R, F); + if (U == 6) RunGather::run(N, K, D, R, F); + if (U == 7) RunGather::run(N, K, D, R, F); + if (U == 8) RunGather::run(N, K, D, R, F); } diff --git a/lib/kokkos/benchmarks/gather/gather_unroll.hpp b/lib/kokkos/benchmarks/gather/gather_unroll.hpp index 1d9c99adf9..4dc046f99c 100644 --- a/lib/kokkos/benchmarks/gather/gather_unroll.hpp +++ b/lib/kokkos/benchmarks/gather/gather_unroll.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,129 +42,132 @@ //@HEADER */ -#include -#include +#include +#include -template -struct RunGather { -static void run(int N, int K, int D, int R, int F) { - Kokkos::View connectivity("Connectivity",N,K); - Kokkos::View A_in("Input",N); - Kokkos::View B_in("Input",N); - Kokkos::View C("Output",N); +template +struct RunGather { + static void run(int N, int K, int D, int R, int F) { + Kokkos::View connectivity("Connectivity", N, K); + Kokkos::View A_in("Input", N); + Kokkos::View B_in("Input", N); + Kokkos::View C("Output", N); - Kokkos::Random_XorShift64_Pool<> rand_pool(12313); + Kokkos::Random_XorShift64_Pool<> rand_pool(12313); - Kokkos::deep_copy(A_in,1.5); - Kokkos::deep_copy(B_in,2.0); + Kokkos::deep_copy(A_in, 1.5); + Kokkos::deep_copy(B_in, 2.0); - Kokkos::View > A(A_in); - Kokkos::View > B(B_in); + Kokkos::View > A( + A_in); + Kokkos::View > B( + B_in); - Kokkos::parallel_for("InitKernel",N, - KOKKOS_LAMBDA (const int& i) { - auto rand_gen = rand_pool.get_state(); - for( int jj=0; jj 1) + Scalar a2 = a1 * Scalar(1.3); +#endif +#if (UNROLL > 2) + Scalar a3 = a2 * Scalar(1.1); +#endif +#if (UNROLL > 3) + Scalar a4 = a3 * Scalar(1.1); +#endif +#if (UNROLL > 4) + Scalar a5 = a4 * Scalar(1.3); +#endif +#if (UNROLL > 5) + Scalar a6 = a5 * Scalar(1.1); +#endif +#if (UNROLL > 6) + Scalar a7 = a6 * Scalar(1.1); +#endif +#if (UNROLL > 7) + Scalar a8 = a7 * Scalar(1.1); +#endif + + for (int f = 0; f < F; f++) { + a1 += b * a1; +#if (UNROLL > 1) + a2 += b * a2; +#endif +#if (UNROLL > 2) + a3 += b * a3; +#endif +#if (UNROLL > 3) + a4 += b * a4; +#endif +#if (UNROLL > 4) + a5 += b * a5; +#endif +#if (UNROLL > 5) + a6 += b * a6; +#endif +#if (UNROLL > 6) + a7 += b * a7; +#endif +#if (UNROLL > 7) + a8 += b * a8; +#endif + } +#if (UNROLL == 1) + c += a1; +#endif +#if (UNROLL == 2) + c += a1 + a2; +#endif +#if (UNROLL == 3) + c += a1 + a2 + a3; +#endif +#if (UNROLL == 4) + c += a1 + a2 + a3 + a4; +#endif +#if (UNROLL == 5) + c += a1 + a2 + a3 + a4 + a5; +#endif +#if (UNROLL == 6) + c += a1 + a2 + a3 + a4 + a5 + a6; +#endif +#if (UNROLL == 7) + c += a1 + a2 + a3 + a4 + a5 + a6 + a7; +#endif +#if (UNROLL == 8) + c += a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8; +#endif + } + C(i) = c; + }); + Kokkos::fence(); } - rand_pool.free_state(rand_gen); - }); - Kokkos::fence(); + double seconds = timer.seconds(); - - Kokkos::Timer timer; - for(int r = 0; r1) - Scalar a2 = a1*Scalar(1.3); -#endif -#if(UNROLL>2) - Scalar a3 = a2*Scalar(1.1); -#endif -#if(UNROLL>3) - Scalar a4 = a3*Scalar(1.1); -#endif -#if(UNROLL>4) - Scalar a5 = a4*Scalar(1.3); -#endif -#if(UNROLL>5) - Scalar a6 = a5*Scalar(1.1); -#endif -#if(UNROLL>6) - Scalar a7 = a6*Scalar(1.1); -#endif -#if(UNROLL>7) - Scalar a8 = a7*Scalar(1.1); -#endif - - - for(int f = 0; f1) - a2 += b*a2; -#endif -#if(UNROLL>2) - a3 += b*a3; -#endif -#if(UNROLL>3) - a4 += b*a4; -#endif -#if(UNROLL>4) - a5 += b*a5; -#endif -#if(UNROLL>5) - a6 += b*a6; -#endif -#if(UNROLL>6) - a7 += b*a7; -#endif -#if(UNROLL>7) - a8 += b*a8; -#endif - - - } -#if(UNROLL==1) - c += a1; -#endif -#if(UNROLL==2) - c += a1+a2; -#endif -#if(UNROLL==3) - c += a1+a2+a3; -#endif -#if(UNROLL==4) - c += a1+a2+a3+a4; -#endif -#if(UNROLL==5) - c += a1+a2+a3+a4+a5; -#endif -#if(UNROLL==6) - c += a1+a2+a3+a4+a5+a6; -#endif -#if(UNROLL==7) - c += a1+a2+a3+a4+a5+a6+a7; -#endif -#if(UNROLL==8) - c += a1+a2+a3+a4+a5+a6+a7+a8; -#endif - - } - C(i) = c ; - }); - Kokkos::fence(); + double bytes = 1.0 * N * K * R * (2 * sizeof(Scalar) + sizeof(int)) + + 1.0 * N * R * sizeof(Scalar); + double flops = 1.0 * N * K * R * (F * 2 * UNROLL + 2 * (UNROLL - 1)); + double gather_ops = 1.0 * N * K * R * 2; + printf( + "SNKDRUF: %i %i %i %i %i %i %i Time: %lfs Bandwidth: %lfGiB/s GFlop/s: " + "%lf GGather/s: %lf\n", + sizeof(Scalar) / 4, N, K, D, R, UNROLL, F, seconds, + 1.0 * bytes / seconds / 1024 / 1024 / 1024, 1.e-9 * flops / seconds, + 1.e-9 * gather_ops / seconds); } - double seconds = timer.seconds(); - - double bytes = 1.0*N*K*R*(2*sizeof(Scalar)+sizeof(int)) + 1.0*N*R*sizeof(Scalar); - double flops = 1.0*N*K*R*(F*2*UNROLL + 2*(UNROLL-1)); - double gather_ops = 1.0*N*K*R*2; - printf("SNKDRUF: %i %i %i %i %i %i %i Time: %lfs Bandwidth: %lfGiB/s GFlop/s: %lf GGather/s: %lf\n",sizeof(Scalar)/4,N,K,D,R,UNROLL,F,seconds,1.0*bytes/seconds/1024/1024/1024,1.e-9*flops/seconds,1.e-9*gather_ops/seconds); -} }; diff --git a/lib/kokkos/benchmarks/gather/main.cpp b/lib/kokkos/benchmarks/gather/main.cpp index ca5238e7fd..6a2db3e024 100644 --- a/lib/kokkos/benchmarks/gather/main.cpp +++ b/lib/kokkos/benchmarks/gather/main.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,23 +42,26 @@ //@HEADER */ -#include -#include -#include -#include +#include +#include +#include +#include int main(int argc, char* argv[]) { - Kokkos::initialize(argc,argv); + Kokkos::initialize(argc, argv); - if(argc<8) { + if (argc < 8) { printf("Arguments: S N K D\n"); - printf(" S: Scalar Type Size (1==float, 2==double, 4=complex)\n"); + printf( + " S: Scalar Type Size (1==float, 2==double, 4=complex)\n"); printf(" N: Number of entities\n"); printf(" K: Number of things to gather per entity\n"); printf(" D: Max distance of gathered things of an entity\n"); printf(" R: how often to loop through the K dimension with each team\n"); printf(" U: how many independent flops to do per load\n"); - printf(" F: how many times to repeat the U unrolled operations before reading next element\n"); + printf( + " F: how many times to repeat the U unrolled operations before " + "reading next element\n"); printf("Example Input GPU:\n"); printf(" Bandwidth Bound : 2 10000000 1 1 10 1 1\n"); printf(" Cache Bound : 2 10000000 64 1 10 1 1\n"); @@ -68,7 +72,6 @@ int main(int argc, char* argv[]) { return 0; } - int S = atoi(argv[1]); int N = atoi(argv[2]); int K = atoi(argv[3]); @@ -77,17 +80,22 @@ int main(int argc, char* argv[]) { int U = atoi(argv[6]); int F = atoi(argv[7]); - if( (S!=1) && (S!=2) && (S!=4)) {printf("S must be one of 1,2,4\n"); return 0;} - if( N(N,K,D,R,U,F); + if ((S != 1) && (S != 2) && (S != 4)) { + printf("S must be one of 1,2,4\n"); + return 0; } - if(S==2) { - run_gather_test(N,K,D,R,U,F); + if (N < D) { + printf("N must be larger or equal to D\n"); + return 0; } - if(S==4) { - run_gather_test >(N,K,D,R,U,F); + if (S == 1) { + run_gather_test(N, K, D, R, U, F); + } + if (S == 2) { + run_gather_test(N, K, D, R, U, F); + } + if (S == 4) { + run_gather_test >(N, K, D, R, U, F); } Kokkos::finalize(); } - diff --git a/lib/kokkos/benchmarks/gups/gups-kokkos.cc b/lib/kokkos/benchmarks/gups/gups-kokkos.cc index 4602adda79..9ac59be4a6 100644 --- a/lib/kokkos/benchmarks/gups/gups-kokkos.cc +++ b/lib/kokkos/benchmarks/gups/gups-kokkos.cc @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR diff --git a/lib/kokkos/benchmarks/policy_performance/main.cpp b/lib/kokkos/benchmarks/policy_performance/main.cpp index 2f5395734a..332e5574da 100644 --- a/lib/kokkos/benchmarks/policy_performance/main.cpp +++ b/lib/kokkos/benchmarks/policy_performance/main.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,67 +45,86 @@ #include #include "policy_perf_test.hpp" -int main(int argc, char* argv[] ) { - Kokkos::initialize(argc,argv); +int main(int argc, char* argv[]) { + Kokkos::initialize(argc, argv); - if(argc<10) { + if (argc < 10) { printf(" Ten arguments are needed to run this program:\n"); - printf(" (1)team_range, (2)thread_range, (3)vector_range, (4)outer_repeat, (5)thread_repeat, (6)vector_repeat, (7)team_size, (8)vector_size, (9)schedule, (10)test_type\n"); + printf( + " (1)team_range, (2)thread_range, (3)vector_range, (4)outer_repeat, " + "(5)thread_repeat, (6)vector_repeat, (7)team_size, (8)vector_size, " + "(9)schedule, (10)test_type\n"); printf(" team_range: number of teams (league_size)\n"); printf(" thread_range: range for nested TeamThreadRange parallel_*\n"); printf(" vector_range: range for nested ThreadVectorRange parallel_*\n"); printf(" outer_repeat: number of repeats for outer parallel_* call\n"); - printf(" thread_repeat: number of repeats for TeamThreadRange parallel_* call\n"); - printf(" vector_repeat: number of repeats for ThreadVectorRange parallel_* call\n"); + printf( + " thread_repeat: number of repeats for TeamThreadRange parallel_* " + "call\n"); + printf( + " vector_repeat: number of repeats for ThreadVectorRange parallel_* " + "call\n"); printf(" team_size: number of team members (team_size)\n"); printf(" vector_size: desired vectorization (if possible)\n"); printf(" schedule: 1 == Static 2 == Dynamic\n"); - printf(" test_type: 3-digit code XYZ for testing (nested) parallel_*\n"); - printf(" code key: XYZ X in {1,2,3,4,5}, Y in {0,1,2}, Z in {0,1,2}\n"); + printf( + " test_type: 3-digit code XYZ for testing (nested) parallel_*\n"); + printf( + " code key: XYZ X in {1,2,3,4,5}, Y in {0,1,2}, Z in " + "{0,1,2}\n"); printf(" TeamPolicy:\n"); - printf(" X: 0 = none (never used, makes no sense); 1 = parallel_for; 2 = parallel_reduce\n"); - printf(" Y: 0 = none; 1 = parallel_for; 2 = parallel_reduce\n"); - printf(" Z: 0 = none; 1 = parallel_for; 2 = parallel_reduce\n"); + printf( + " X: 0 = none (never used, makes no sense); 1 = " + "parallel_for; 2 = parallel_reduce\n"); + printf( + " Y: 0 = none; 1 = parallel_for; 2 = " + "parallel_reduce\n"); + printf( + " Z: 0 = none; 1 = parallel_for; 2 = " + "parallel_reduce\n"); printf(" RangePolicy:\n"); - printf(" X: 3 = parallel_for; 4 = parallel_reduce; 5 = parallel_scan\n"); + printf( + " X: 3 = parallel_for; 4 = parallel_reduce; 5 = " + "parallel_scan\n"); printf(" Y: 0 = none\n"); printf(" Z: 0 = none\n"); printf(" Example Input:\n"); - printf(" 100000 32 32 100 100 100 8 1 1 100\n"); + printf(" 100000 32 32 100 100 100 8 1 1 100\n"); Kokkos::finalize(); return 0; } - int team_range = atoi(argv[1]); + int team_range = atoi(argv[1]); int thread_range = atoi(argv[2]); int vector_range = atoi(argv[3]); - int outer_repeat = atoi(argv[4]); + int outer_repeat = atoi(argv[4]); int thread_repeat = atoi(argv[5]); int vector_repeat = atoi(argv[6]); - int team_size = atoi(argv[7]); + int team_size = atoi(argv[7]); int vector_size = atoi(argv[8]); - int schedule = atoi(argv[9]); - int test_type = atoi(argv[10]); + int schedule = atoi(argv[9]); + int test_type = atoi(argv[10]); - int disable_verbose_output = 0; - if ( argc > 11 ) { + int disable_verbose_output = 0; + if (argc > 11) { disable_verbose_output = atoi(argv[11]); } - if ( schedule != 1 && schedule != 2 ) { + if (schedule != 1 && schedule != 2) { printf("schedule: %d\n", schedule); printf("Options for schedule are: 1 == Static 2 == Dynamic\n"); Kokkos::finalize(); return -1; } - if ( test_type != 100 && test_type != 110 && test_type != 111 && test_type != 112 && test_type != 120 && test_type != 121 && test_type != 122 - && test_type != 200 && test_type != 210 && test_type != 211 && test_type != 212 && test_type != 220 && test_type != 221 && test_type != 222 - && test_type != 300 && test_type != 400 && test_type != 500 - ) - { + if (test_type != 100 && test_type != 110 && test_type != 111 && + test_type != 112 && test_type != 120 && test_type != 121 && + test_type != 122 && test_type != 200 && test_type != 210 && + test_type != 211 && test_type != 212 && test_type != 220 && + test_type != 221 && test_type != 222 && test_type != 300 && + test_type != 400 && test_type != 500) { printf("Incorrect test_type option\n"); Kokkos::finalize(); return -2; @@ -112,56 +132,85 @@ int main(int argc, char* argv[] ) { double result = 0.0; - Kokkos::parallel_reduce( "parallel_reduce warmup", Kokkos::TeamPolicy<>(10,1), - KOKKOS_LAMBDA(const Kokkos::TeamPolicy<>::member_type team, double& lval) { - lval += 1; - }, result); + Kokkos::parallel_reduce( + "parallel_reduce warmup", Kokkos::TeamPolicy<>(10, 1), + KOKKOS_LAMBDA(const Kokkos::TeamPolicy<>::member_type team, + double& lval) { lval += 1; }, + result); - typedef Kokkos::View view_type_1d; - typedef Kokkos::View view_type_2d; + typedef Kokkos::View view_type_1d; + typedef Kokkos::View view_type_2d; typedef Kokkos::View view_type_3d; // Allocate view without initializing - // Call a 'warmup' test with 1 repeat - this will initialize the corresponding view appropriately for test and should obey first-touch etc - // Second call to test is the one we actually care about and time - view_type_1d v_1( Kokkos::ViewAllocateWithoutInitializing("v_1"), team_range*team_size); - view_type_2d v_2( Kokkos::ViewAllocateWithoutInitializing("v_2"), team_range*team_size, thread_range); - view_type_3d v_3( Kokkos::ViewAllocateWithoutInitializing("v_3"), team_range*team_size, thread_range, vector_range); + // Call a 'warmup' test with 1 repeat - this will initialize the corresponding + // view appropriately for test and should obey first-touch etc Second call to + // test is the one we actually care about and time + view_type_1d v_1(Kokkos::ViewAllocateWithoutInitializing("v_1"), + team_range * team_size); + view_type_2d v_2(Kokkos::ViewAllocateWithoutInitializing("v_2"), + team_range * team_size, thread_range); + view_type_3d v_3(Kokkos::ViewAllocateWithoutInitializing("v_3"), + team_range * team_size, thread_range, vector_range); double result_computed = 0.0; - double result_expect = 0.0; - double time = 0.0; + double result_expect = 0.0; + double time = 0.0; - if(schedule==1) { - if ( test_type != 500 ) { + if (schedule == 1) { + if (test_type != 500) { // warmup - no repeat of loops - test_policy,int>(team_range,thread_range,vector_range,1,1,1,team_size,vector_size,test_type,v_1,v_2,v_3,result_computed,result_expect,time); - test_policy,int>(team_range,thread_range,vector_range,outer_repeat,thread_repeat,vector_repeat,team_size,vector_size,test_type,v_1,v_2,v_3,result_computed,result_expect,time); - } - else { + test_policy, int>( + team_range, thread_range, vector_range, 1, 1, 1, team_size, + vector_size, test_type, v_1, v_2, v_3, result_computed, result_expect, + time); + test_policy, int>( + team_range, thread_range, vector_range, outer_repeat, thread_repeat, + vector_repeat, team_size, vector_size, test_type, v_1, v_2, v_3, + result_computed, result_expect, time); + } else { // parallel_scan: initialize 1d view for parallel_scan - test_policy,int>(team_range,thread_range,vector_range,1,1,1,team_size,vector_size,100,v_1,v_2,v_3,result_computed,result_expect,time); - test_policy,int>(team_range,thread_range,vector_range,outer_repeat,thread_repeat,vector_repeat,team_size,vector_size,test_type,v_1,v_2,v_3,result_computed,result_expect,time); + test_policy, int>( + team_range, thread_range, vector_range, 1, 1, 1, team_size, + vector_size, 100, v_1, v_2, v_3, result_computed, result_expect, + time); + test_policy, int>( + team_range, thread_range, vector_range, outer_repeat, thread_repeat, + vector_repeat, team_size, vector_size, test_type, v_1, v_2, v_3, + result_computed, result_expect, time); } } - if(schedule==2) { - if ( test_type != 500 ) { + if (schedule == 2) { + if (test_type != 500) { // warmup - no repeat of loops - test_policy,int>(team_range,thread_range,vector_range,1,1,1,team_size,vector_size,test_type,v_1,v_2,v_3,result_computed,result_expect,time); - test_policy,int>(team_range,thread_range,vector_range,outer_repeat,thread_repeat,vector_repeat,team_size,vector_size,test_type,v_1,v_2,v_3,result_computed,result_expect,time); - } - else { + test_policy, int>( + team_range, thread_range, vector_range, 1, 1, 1, team_size, + vector_size, test_type, v_1, v_2, v_3, result_computed, result_expect, + time); + test_policy, int>( + team_range, thread_range, vector_range, outer_repeat, thread_repeat, + vector_repeat, team_size, vector_size, test_type, v_1, v_2, v_3, + result_computed, result_expect, time); + } else { // parallel_scan: initialize 1d view for parallel_scan - test_policy,int>(team_range,thread_range,vector_range,1,1,1,team_size,vector_size,100,v_1,v_2,v_3,result_computed,result_expect,time); - test_policy,int>(team_range,thread_range,vector_range,outer_repeat,thread_repeat,vector_repeat,team_size,vector_size,test_type,v_1,v_2,v_3,result_computed,result_expect,time); + test_policy, int>( + team_range, thread_range, vector_range, 1, 1, 1, team_size, + vector_size, 100, v_1, v_2, v_3, result_computed, result_expect, + time); + test_policy, int>( + team_range, thread_range, vector_range, outer_repeat, thread_repeat, + vector_repeat, team_size, vector_size, test_type, v_1, v_2, v_3, + result_computed, result_expect, time); } } - if ( disable_verbose_output == 0 ) { - printf("%7i %4i %2i %9i %4i %4i %4i %2i %1i %3i %e %e %lf\n",team_range,thread_range,vector_range,outer_repeat,thread_repeat,vector_repeat,team_size,vector_size,schedule,test_type,result_computed,result_expect,time); - } - else { - printf("%lf\n",time); + if (disable_verbose_output == 0) { + printf("%7i %4i %2i %9i %4i %4i %4i %2i %1i %3i %e %e %lf\n", team_range, + thread_range, vector_range, outer_repeat, thread_repeat, + vector_repeat, team_size, vector_size, schedule, test_type, + result_computed, result_expect, time); + } else { + printf("%lf\n", time); } Kokkos::finalize(); diff --git a/lib/kokkos/benchmarks/policy_performance/policy_perf_test.hpp b/lib/kokkos/benchmarks/policy_performance/policy_perf_test.hpp index 1ab437928d..7a1500891f 100644 --- a/lib/kokkos/benchmarks/policy_performance/policy_perf_test.hpp +++ b/lib/kokkos/benchmarks/policy_performance/policy_perf_test.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -43,297 +44,375 @@ #include -template < class ViewType > +template struct ParallelScanFunctor { using value_type = double; ViewType v; - ParallelScanFunctor( const ViewType & v_ ) - : v(v_) - {} + ParallelScanFunctor(const ViewType& v_) : v(v_) {} KOKKOS_INLINE_FUNCTION - void operator()( const int idx, value_type& val, const bool& final ) const - { - // inclusive scan - val += v(idx); - if ( final ) { - v(idx) = val; - } + void operator()(const int idx, value_type& val, const bool& final) const { + // inclusive scan + val += v(idx); + if (final) { + v(idx) = val; } + } }; -template +template void test_policy(int team_range, int thread_range, int vector_range, - int outer_repeat, int thread_repeat, int inner_repeat, - int team_size, int vector_size, int test_type, - ViewType1 &v1, ViewType2 &v2, ViewType3 &v3, - double &result, double &result_expect, double &time) { - - typedef Kokkos::TeamPolicy t_policy; + int outer_repeat, int thread_repeat, int inner_repeat, + int team_size, int vector_size, int test_type, ViewType1& v1, + ViewType2& v2, ViewType3& v3, double& result, + double& result_expect, double& time) { + typedef Kokkos::TeamPolicy t_policy; typedef typename t_policy::member_type t_team; Kokkos::Timer timer; - for(int orep = 0; orep(v1) + Kokkos::parallel_scan("500 outer scan", team_size * team_range, + ParallelScanFunctor(v1) #if 0 // This does not compile with pre Cuda 8.0 - see Github Issue #913 for explanation KOKKOS_LAMBDA (const int idx, double& val, const bool& final) { @@ -345,11 +424,12 @@ void test_policy(int team_range, int thread_range, int vector_range, } #endif ); - // result = v1( team_size*team_range - 1 ); // won't work with Cuda - need to copy result back to host to print - // result_expect = 0.5*(team_size*team_range)*(team_size*team_range-1); + // result = v1( team_size*team_range - 1 ); // won't work with Cuda - need + // to copy result back to host to print result_expect = + // 0.5*(team_size*team_range)*(team_size*team_range-1); } - } // end outer for loop + } // end outer for loop time = timer.seconds(); -} //end test_policy +} // end test_policy diff --git a/lib/kokkos/benchmarks/policy_performance/script_sample_usage.sh b/lib/kokkos/benchmarks/policy_performance/script_sample_usage.sh index 1c2db56648..f4bfb87f8f 100755 --- a/lib/kokkos/benchmarks/policy_performance/script_sample_usage.sh +++ b/lib/kokkos/benchmarks/policy_performance/script_sample_usage.sh @@ -2,7 +2,7 @@ # Sample script for benchmarking policy performance -# Suggested environment variables to export prior to executing script: +# Suggested enviroment variables to export prior to executing script: # KNL: # OMP_NUM_THREADS=256 KMP_AFFINITY=compact # Power: diff --git a/lib/kokkos/benchmarks/stream/stream-kokkos.cc b/lib/kokkos/benchmarks/stream/stream-kokkos.cc index 370995432e..6ce789dd82 100644 --- a/lib/kokkos/benchmarks/stream/stream-kokkos.cc +++ b/lib/kokkos/benchmarks/stream/stream-kokkos.cc @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR diff --git a/lib/kokkos/bin/hpcbind b/lib/kokkos/bin/hpcbind index 6af091a7d8..b185a92821 100755 --- a/lib/kokkos/bin/hpcbind +++ b/lib/kokkos/bin/hpcbind @@ -383,7 +383,7 @@ fi # Check unknown arguments ################################################################################ if [[ ${#UNKNOWN_ARGS[*]} > 0 ]]; then - echo "HPCBIND Unknown options: ${UNKNOWN_ARGS[*]}" > >(tee -a ${HPCBIND_LOG}) + echo "HPCBIND Uknown options: ${UNKNOWN_ARGS[*]}" > >(tee -a ${HPCBIND_LOG}) exit 1 fi diff --git a/lib/kokkos/bin/nvcc_wrapper b/lib/kokkos/bin/nvcc_wrapper index 94bc72854e..8a23d0d620 100755 --- a/lib/kokkos/bin/nvcc_wrapper +++ b/lib/kokkos/bin/nvcc_wrapper @@ -85,11 +85,11 @@ first_xcompiler_arg=1 temp_dir=${TMPDIR:-/tmp} -# Check if we have an optimization argument already -optimization_applied=0 +# optimization flag added as a command-line argument +optimization_flag="" -# Check if we have -std=c++X or --std=c++X already -stdcxx_applied=0 +# std standard flag added as a command-line argument +std_flag="" # Run nvcc a second time to generate dependencies if needed depfile_separate=0 @@ -99,6 +99,10 @@ depfile_target_arg="" # Option to remove duplicate libraries and object files remove_duplicate_link_files=0 +function warn_std_flag() { + echo "nvcc_wrapper - *warning* you have set multiple standard flags (-std=c++1* or --std=c++1*), only the last is used because nvcc can only accept a single std setting" +} + #echo "Arguments: $# $@" while [ $# -gt 0 ] @@ -130,12 +134,16 @@ do ;; # Ensure we only have one optimization flag because NVCC doesn't allow muliple -O*) - if [ $optimization_applied -eq 1 ]; then - echo "nvcc_wrapper - *warning* you have set multiple optimization flags (-O*), only the first is used because nvcc can only accept a single optimization setting." - else - shared_args="$shared_args $1" - optimization_applied=1 + if [ -n "$optimization_flag" ]; then + echo "nvcc_wrapper - *warning* you have set multiple optimization flags (-O*), only the last is used because nvcc can only accept a single optimization setting." + shared_args=${shared_args/ $optimization_flag/} fi + if [ "$1" = "-O" ]; then + optimization_flag="-O2" + else + optimization_flag=$1 + fi + shared_args="$shared_args $optimization_flag" ;; #Handle shared args (valid for both nvcc and the host compiler) -D*) @@ -171,7 +179,7 @@ do shift ;; #Handle known nvcc args - --dryrun|--verbose|--keep|--keep-dir*|-G|--relocatable-device-code*|-lineinfo|-expt-extended-lambda|--resource-usage|-Xptxas*) + --dryrun|--verbose|--keep|--keep-dir*|-G|--relocatable-device-code*|-lineinfo|-expt-extended-lambda|--resource-usage|-Xptxas*|--fmad*) cuda_args="$cuda_args $1" ;; #Handle more known nvcc args @@ -179,21 +187,43 @@ do cuda_args="$cuda_args $1" ;; #Handle known nvcc args that have an argument - -rdc|-maxrregcount|--default-stream) + -rdc|-maxrregcount|--default-stream|-Xnvlink|--fmad) cuda_args="$cuda_args $1 $2" shift ;; -rdc=*|-maxrregcount*|--maxrregcount*) cuda_args="$cuda_args $1" ;; - #Handle c++11 - --std=c++11|-std=c++11|--std=c++14|-std=c++14|--std=c++1y|-std=c++1y|--std=c++17|-std=c++17|--std=c++1z|-std=c++1z) - if [ $stdcxx_applied -eq 1 ]; then - echo "nvcc_wrapper - *warning* you have set multiple optimization flags (-std=c++1* or --std=c++1*), only the first is used because nvcc can only accept a single std setting" - else - shared_args="$shared_args $1" - stdcxx_applied=1 + #Handle unsupported standard flags + --std=c++1y|-std=c++1y|--std=c++1z|-std=c++1z|--std=gnu++1y|-std=gnu++1y|--std=gnu++1z|-std=gnu++1z|--std=c++2a|-std=c++2a|--std=c++17|-std=c++17) + fallback_std_flag="-std=c++14" + # this is hopefully just occurring in a downstream project during CMake feature tests + # we really have no choice here but to accept the flag and change to an accepted C++ standard + echo "nvcc_wrapper does not accept standard flags $1 since partial standard flags and standards after C++14 are not supported. nvcc_wrapper will use $fallback_std_flag instead. It is undefined behavior to use this flag. This should only be occurring during CMake configuration." + if [ -n "$std_flag" ]; then + warn_std_flag + shared_args=${shared_args/ $std_flag/} fi + std_flag=$fallback_std_flag + shared_args="$shared_args $std_flag" + ;; + -std=gnu*) + corrected_std_flag=${1/gnu/c} + echo "nvcc_wrapper has been given GNU extension standard flag $1 - reverting flag to $corrected_std_flag" + if [ -n "$std_flag" ]; then + warn_std_flag + shared_args=${shared_args/ $std_flag/} + fi + std_flag=$corrected_std_flag + shared_args="$shared_args $std_flag" + ;; + --std=c++11|-std=c++11|--std=c++14|-std=c++14) + if [ -n "$std_flag" ]; then + warn_std_flag + shared_args=${shared_args/ $std_flag/} + fi + std_flag=$1 + shared_args="$shared_args $std_flag" ;; #strip of -std=c++98 due to nvcc warnings and Tribits will place both -std=c++11 and -std=c++98 @@ -308,16 +338,6 @@ do shift done -#Check if nvcc exists -if [ $host_only -ne 1 ]; then - var=$(which nvcc ) - if [ $? -gt 0 ]; then - echo "Could not find nvcc in PATH" - exit $? - fi -fi - - # Only print host compiler version if [ $get_host_version -eq 1 ]; then $host_compiler --version @@ -372,6 +392,9 @@ if [ $first_xcompiler_arg -eq 0 ]; then nvcc_command="$nvcc_command -Xcompiler $xcompiler_args" fi +#Replace all commas in xcompiler_args with a space for the host only command +xcompiler_args=${xcompiler_args//,/" "} + #Compose host only command host_command="$host_compiler $shared_args $host_only_args $compile_arg $output_arg $xcompiler_args $host_linker_args $shared_versioned_libraries_host" diff --git a/lib/kokkos/cm_generate_makefile.bash b/lib/kokkos/cm_generate_makefile.bash new file mode 100755 index 0000000000..fd7cfe2d32 --- /dev/null +++ b/lib/kokkos/cm_generate_makefile.bash @@ -0,0 +1,339 @@ +#!/bin/bash + +update_kokkos_devices() { + SEARCH_TEXT="*$1*" + if [[ $KOKKOS_DEVICES == $SEARCH_TEXT ]]; then + echo kokkos devices already includes $SEARCH_TEXT + else + if [ "$KOKKOS_DEVICES" = "" ]; then + KOKKOS_DEVICES="$1" + echo reseting kokkos devices to $KOKKOS_DEVICES + else + KOKKOS_DEVICES="${KOKKOS_DEVICES},$1" + echo appending to kokkos devices $KOKKOS_DEVICES + fi + fi +} + +get_kokkos_device_list() { + KOKKOS_DEVICE_CMD= + PARSE_DEVICES_LST=$(echo $KOKKOS_DEVICES | tr "," "\n") + for DEVICE_ in $PARSE_DEVICES_LST + do + UC_DEVICE=$(echo $DEVICE_ | tr "[:lower:]" "[:upper:]") + KOKKOS_DEVICE_CMD="-DKokkos_ENABLE_${UC_DEVICE}=ON ${KOKKOS_DEVICE_CMD}" + done +} + +get_kokkos_arch_list() { + KOKKOS_ARCH_CMD= + PARSE_ARCH_LST=$(echo $KOKKOS_ARCH | tr "," "\n") + for ARCH_ in $PARSE_ARCH_LST + do + UC_ARCH=$(echo $ARCH_ | tr "[:lower:]" "[:upper:]") + KOKKOS_ARCH_CMD="-DKokkos_ARCH_${UC_ARCH}=ON ${KOKKOS_ARCH_CMD}" + done +} + +get_kokkos_cuda_option_list() { + echo parsing KOKKOS_CUDA_OPTIONS=$KOKKOS_CUDA_OPTIONS + KOKKOS_CUDA_OPTION_CMD= + PARSE_CUDA_LST=$(echo $KOKKOS_CUDA_OPTIONS | tr "," "\n") + for CUDA_ in $PARSE_CUDA_LST + do + CUDA_OPT_NAME= + if [ "${CUDA_}" == "enable_lambda" ]; then + CUDA_OPT_NAME=CUDA_LAMBDA + elif [ "${CUDA_}" == "rdc" ]; then + CUDA_OPT_NAME=CUDA_RELOCATABLE_DEVICE_CODE + elif [ "${CUDA_}" == "force_uvm" ]; then + CUDA_OPT_NAME=CUDA_UVM + elif [ "${CUDA_}" == "use_ldg" ]; then + CUDA_OPT_NAME=CUDA_LDG_INTRINSIC + else + echo "${CUDA_} is not a valid cuda options..." + fi + if [ "${CUDA_OPT_NAME}" != "" ]; then + KOKKOS_CUDA_OPTION_CMD="-DKokkos_ENABLE_${CUDA_OPT_NAME}=ON ${KOKKOS_CUDA_OPTION_CMD}" + fi + done +} + +get_kokkos_option_list() { + echo parsing KOKKOS_OPTIONS=$KOKKOS_OPTIONS + KOKKOS_OPTION_CMD= + PARSE_OPTIONS_LST=$(echo $KOKKOS_OPTIONS | tr "," "\n") + for OPT_ in $PARSE_OPTIONS_LST + do + UC_OPT_=$(echo $OPT_ | tr "[:lower:]" "[:upper:]") + if [[ "$UC_OPT_" == *DISABLE* ]]; then + FLIP_OPT_=${UC_OPT_/DISABLE/ENABLE} + KOKKOS_OPTION_CMD="-DKokkos_${FLIP_OPT_}=OFF ${KOKKOS_OPTION_CMD}" + elif [[ "$UC_OPT_" == *ENABLE* ]]; then + KOKKOS_OPTION_CMD="-DKokkos_${UC_OPT_}=ON ${KOKKOS_OPTION_CMD}" + else + KOKKOS_OPTION_CMD="-DKokkos_ENABLE_${UC_OPT_}=ON ${KOKKOS_OPTION_CMD}" + fi + done +} + +display_help_text() { + + echo "Kokkos configure options:" + echo "" + echo "--kokkos-path=/Path/To/Kokkos: Path to the Kokkos root directory." + echo "--prefix=/Install/Path: Path to install the Kokkos library." + echo "" + echo "--with-cuda[=/Path/To/Cuda]: Enable Cuda and set path to Cuda Toolkit." + echo "--with-openmp: Enable OpenMP backend." + echo "--with-pthread: Enable Pthreads backend." + echo "--with-serial: Enable Serial backend." + echo "--with-devices: Explicitly add a set of backends." + echo "" + echo "--arch=[OPT]: Set target architectures. Options are:" + echo " [AMD]" + echo " AMDAVX = AMD CPU" + echo " EPYC = AMD EPYC Zen-Core CPU" + echo " [ARM]" + echo " ARMv80 = ARMv8.0 Compatible CPU" + echo " ARMv81 = ARMv8.1 Compatible CPU" + echo " ARMv8-ThunderX = ARMv8 Cavium ThunderX CPU" + echo " ARMv8-TX2 = ARMv8 Cavium ThunderX2 CPU" + echo " [IBM]" + echo " BGQ = IBM Blue Gene Q" + echo " Power7 = IBM POWER7 and POWER7+ CPUs" + echo " Power8 = IBM POWER8 CPUs" + echo " Power9 = IBM POWER9 CPUs" + echo " [Intel]" + echo " WSM = Intel Westmere CPUs" + echo " SNB = Intel Sandy/Ivy Bridge CPUs" + echo " HSW = Intel Haswell CPUs" + echo " BDW = Intel Broadwell Xeon E-class CPUs" + echo " SKX = Intel Sky Lake Xeon E-class HPC CPUs (AVX512)" + echo " [Intel Xeon Phi]" + echo " KNC = Intel Knights Corner Xeon Phi" + echo " KNL = Intel Knights Landing Xeon Phi" + echo " [NVIDIA]" + echo " Kepler30 = NVIDIA Kepler generation CC 3.0" + echo " Kepler32 = NVIDIA Kepler generation CC 3.2" + echo " Kepler35 = NVIDIA Kepler generation CC 3.5" + echo " Kepler37 = NVIDIA Kepler generation CC 3.7" + echo " Maxwell50 = NVIDIA Maxwell generation CC 5.0" + echo " Maxwell52 = NVIDIA Maxwell generation CC 5.2" + echo " Maxwell53 = NVIDIA Maxwell generation CC 5.3" + echo " Pascal60 = NVIDIA Pascal generation CC 6.0" + echo " Pascal61 = NVIDIA Pascal generation CC 6.1" + echo " Volta70 = NVIDIA Volta generation CC 7.0" + echo " Volta72 = NVIDIA Volta generation CC 7.2" + echo "" + echo "--compiler=/Path/To/Compiler Set the compiler." + echo "--debug,-dbg: Enable Debugging." + echo "--cxxflags=[FLAGS] Overwrite CXXFLAGS for library build and test" + echo " build. This will still set certain required" + echo " flags via KOKKOS_CXXFLAGS (such as -fopenmp," + echo " --std=c++11, etc.)." + echo "--cxxstandard=[FLAGS] Overwrite KOKKOS_CXX_STANDARD for library build and test" + echo " c++11 (default), c++14, c++17, c++1y, c++1z, c++2a" + echo "--ldflags=[FLAGS] Overwrite LDFLAGS for library build and test" + echo " build. This will still set certain required" + echo " flags via KOKKOS_LDFLAGS (such as -fopenmp," + echo " -lpthread, etc.)." + echo "--with-gtest=/Path/To/Gtest: Set path to gtest. (Used in unit and performance" + echo " tests.)" + echo "--with-hwloc=/Path/To/Hwloc: Set path to hwloc library." + echo "--with-memkind=/Path/To/MemKind: Set path to memkind library." + echo "--with-options=[OPT]: Additional options to Kokkos:" + echo " compiler_warnings" + echo " aggressive_vectorization = add ivdep on loops" + echo " disable_profiling = do not compile with profiling hooks" + echo " " + echo "--with-cuda-options=[OPT]: Additional options to CUDA:" + echo " force_uvm, use_ldg, enable_lambda, rdc" + echo "--with-hpx-options=[OPT]: Additional options to HPX:" + echo " enable_async_dispatch" + echo "--gcc-toolchain=/Path/To/GccRoot: Set the gcc toolchain to use with clang (e.g. /usr)" + echo "--make-j=[NUM]: DEPRECATED: call make with appropriate" + echo " -j flag" + +} + +while [[ $# > 0 ]] +do + key="$1" + + case $key in + --kokkos-path*) + KOKKOS_PATH="${key#*=}" + ;; + --hpx-path*) + HPX_PATH="${key#*=}" + ;; + --prefix*) + PREFIX="${key#*=}" + ;; + --with-cuda) + update_kokkos_devices Cuda + CUDA_PATH_NVCC=$(command -v nvcc) + CUDA_PATH=${CUDA_PATH_NVCC%/bin/nvcc} + ;; + # Catch this before '--with-cuda*' + --with-cuda-options*) + KOKKOS_CUDA_OPTIONS="${key#*=}" + ;; + --with-cuda*) + update_kokkos_devices Cuda + CUDA_PATH="${key#*=}" + ;; + --with-openmp) + update_kokkos_devices OpenMP + ;; + --with-pthread) + update_kokkos_devices Pthread + ;; + --with-serial) + update_kokkos_devices Serial + ;; + --with-hpx-options*) + KOKKOS_HPX_OPT="${key#*=}" + ;; + --with-hpx*) + update_kokkos_devices HPX + if [ -z "$HPX_PATH" ]; then + HPX_PATH="${key#*=}" + fi + ;; + --with-devices*) + DEVICES="${key#*=}" + PARSE_DEVICES=$(echo $DEVICES | tr "," "\n") + for DEVICE_ in $PARSE_DEVICES + do + update_kokkos_devices $DEVICE_ + done + ;; + --with-gtest*) + GTEST_PATH="${key#*=}" + ;; + --with-hwloc*) + HWLOC_PATH="${key#*=}" + ;; + --with-memkind*) + MEMKIND_PATH="${key#*=}" + ;; + --arch*) + KOKKOS_ARCH="${key#*=}" + ;; + --cxxflags*) + KOKKOS_CXXFLAGS="${key#*=}" + KOKKOS_CXXFLAGS=${KOKKOS_CXXFLAGS//,/ } + ;; + --cxxstandard*) + KOKKOS_CXX_STANDARD="${key#*=}" + ;; + --ldflags*) + KOKKOS_LDFLAGS="${key#*=}" + ;; + --debug|-dbg) + KOKKOS_DEBUG=yes + ;; + --make-j*) + echo "Warning: ${key} is deprecated" + echo "Call make with appropriate -j flag" + ;; + --compiler*) + COMPILER="${key#*=}" + CNUM=$(command -v ${COMPILER} 2>&1 >/dev/null | grep "no ${COMPILER}" | wc -l) + if [ ${CNUM} -gt 0 ]; then + echo "Invalid compiler by --compiler command: '${COMPILER}'" + exit + fi + if [[ ! -n ${COMPILER} ]]; then + echo "Empty compiler specified by --compiler command." + exit + fi + CNUM=$(command -v ${COMPILER} | grep ${COMPILER} | wc -l) + if [ ${CNUM} -eq 0 ]; then + echo "Invalid compiler by --compiler command: '${COMPILER}'" + exit + fi + # ... valid compiler, ensure absolute path set + WCOMPATH=$(command -v $COMPILER) + COMPDIR=$(dirname $WCOMPATH) + COMPNAME=$(basename $WCOMPATH) + COMPILER=${COMPDIR}/${COMPNAME} + ;; + --with-options*) + KOKKOS_OPTIONS="${key#*=}" + ;; + --gcc-toolchain*) + KOKKOS_GCC_TOOLCHAIN="${key#*=}" + ;; + --help) + display_help_text + exit 0 + ;; + *) + echo "warning: ignoring unknown option $key" + ;; + esac + + shift +done + + +if [ "$COMPILER" == "" ]; then + COMPILER_CMD= +else + COMPILER_CMD=-DCMAKE_CXX_COMPILER=$COMPILER +fi + +if [ "$KOKKOS_DEBUG" == "" ]; then + KOKKOS_DEBUG_CMD=-DCMAKE_BUILD_TYPE=RELEASE +else + KOKKOS_DEBUG_CMD=-DCMAKE_BUILD_TYPE=DEBUG +fi + +if [ ! -e ${KOKKOS_PATH}/CMakeLists.txt ]; then + if [ "${KOKKOS_PATH}" == "" ]; then + CM_SCRIPT=$0 + KOKKOS_PATH=`dirname $CM_SCRIPT` + if [ ! -e ${KOKKOS_PATH}/CMakeLists.txt ]; then + echo "${KOKKOS_PATH} repository appears to not be complete. please verify and try again" + exit 0 + fi + else + echo "KOKKOS_PATH does not appear to be set properly. please specify in location of CMakeLists.txt" + display_help_text + exit 0 + fi +fi + +get_kokkos_device_list +get_kokkos_option_list +get_kokkos_arch_list +get_kokkos_cuda_option_list + +## if HPX is enabled, we need to enforce cxx standard = 14 +if [[ ${KOKKOS_DEVICE_CMD} == *Kokkos_ENABLE_HPX* ]]; then + if [ "${KOKKOS_CXX_STANDARD}" == "" ] || [ ${#KOKKOS_CXX_STANDARD} -lt 14 ]; then + echo CXX Standard must be 14 or higher for HPX to work. + KOKKOS_CXX_STANDARD=14 + fi +fi + +if [ "$KOKKOS_CXX_STANDARD" == "" ]; then + STANDARD_CMD= +else + STANDARD_CMD=-DKokkos_CXX_STANDARD=${KOKKOS_CXX_STANDARD} +fi + +if [[ ${COMPILER} == *clang* ]]; then + gcc_path=$(which g++ | awk --field-separator='/bin/g++' '{printf $1}' ) + KOKKOS_CXXFLAGS="${KOKKOS_CXXFLAGS} --gcc-toolchain=${gcc_path}" + + if [ ! "${CUDA_PATH}" == "" ]; then + KOKKOS_CXXFLAGS="${KOKKOS_CXXFLAGS} --cuda-path=${CUDA_PATH}" + fi +fi + +echo cmake $COMPILER_CMD -DCMAKE_CXX_FLAGS="${KOKKOS_CXXFLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${KOKKOS_LDFLAGS}" -DCMAKE_INSTALL_PREFIX=${PREFIX} ${KOKKOS_DEVICE_CMD} ${KOKKOS_ARCH_CMD} -DKokkos_ENABLE_TESTS=ON ${KOKKOS_OPTION_CMD} ${KOKKOS_CUDA_OPTION_CMD} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_CXX_EXTENSIONS=OFF ${STANDARD_CMD} ${KOKKOS_DEBUG_CMD} ${KOKKOS_PATH} +cmake $COMPILER_CMD -DCMAKE_CXX_FLAGS="${KOKKOS_CXXFLAGS//\"}" -DCMAKE_EXE_LINKER_FLAGS="${KOKKOS_LDFLAGS//\"}" -DCMAKE_INSTALL_PREFIX=${PREFIX} ${KOKKOS_DEVICE_CMD} ${KOKKOS_ARCH_CMD} -DKokkos_ENABLE_TESTS=ON ${KOKKOS_OPTION_CMD} ${KOKKOS_CUDA_OPTION_CMD} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_CXX_EXTENSIONS=OFF ${STANDARD_CMD} ${KOKKOS_DEBUG_CMD} ${KOKKOS_PATH} diff --git a/lib/kokkos/cmake/KokkosConfig.cmake.in b/lib/kokkos/cmake/KokkosConfig.cmake.in index fc099a494c..6f4607687e 100644 --- a/lib/kokkos/cmake/KokkosConfig.cmake.in +++ b/lib/kokkos/cmake/KokkosConfig.cmake.in @@ -1,18 +1,14 @@ -# - Config file for the Kokkos package -# It defines the following variables -# Kokkos_INCLUDE_DIRS - include directories for Kokkos -# Kokkos_LIBRARIES - libraries to link against - # Compute paths +@PACKAGE_INIT@ + +#Find dependencies +INCLUDE(CMakeFindDependencyMacro) + +#This needs to go above the KokkosTargets in case +#the Kokkos targets depend in some way on the TPL imports +@KOKKOS_TPL_EXPORTS@ + GET_FILENAME_COMPONENT(Kokkos_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -SET(Kokkos_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") - -# Our library dependencies (contains definitions for IMPORTED targets) -IF(NOT TARGET kokkos AND NOT Kokkos_BINARY_DIR) - INCLUDE("${Kokkos_CMAKE_DIR}/KokkosTargets.cmake") -ENDIF() - -# These are IMPORTED targets created by KokkosTargets.cmake -SET(Kokkos_LIBRARY_DIRS @INSTALL_LIB_DIR@) -SET(Kokkos_LIBRARIES @Kokkos_LIBRARIES_NAMES@) -SET(Kokkos_TPL_LIBRARIES @KOKKOS_LIBS@) +INCLUDE("${Kokkos_CMAKE_DIR}/KokkosTargets.cmake") +INCLUDE("${Kokkos_CMAKE_DIR}/KokkosConfigCommon.cmake") +UNSET(Kokkos_CMAKE_DIR) diff --git a/lib/kokkos/cmake/KokkosConfigCommon.cmake.in b/lib/kokkos/cmake/KokkosConfigCommon.cmake.in new file mode 100644 index 0000000000..da9c61976c --- /dev/null +++ b/lib/kokkos/cmake/KokkosConfigCommon.cmake.in @@ -0,0 +1,87 @@ +SET(Kokkos_DEVICES @KOKKOS_ENABLED_DEVICES@) +SET(Kokkos_OPTIONS @KOKKOS_ENABLED_OPTIONS@) +SET(Kokkos_TPLS @KOKKOS_ENABLED_TPLS@) +SET(Kokkos_ARCH @KOKKOS_ENABLED_ARCH_LIST@) + +# These are needed by KokkosKernels +FOREACH(DEV ${Kokkos_DEVICES}) + SET(Kokkos_ENABLE_${DEV} ON) +ENDFOREACH() + +IF(NOT Kokkos_FIND_QUIETLY) + MESSAGE(STATUS "Enabled Kokkos devices: ${Kokkos_DEVICES}") +ENDIF() + +IF (Kokkos_ENABLE_CUDA AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14.0") + #If we are building CUDA, we have tricked CMake because we declare a CXX project + #If the default C++ standard for a given compiler matches the requested + #standard, then CMake just omits the -std flag in later versions of CMake + #This breaks CUDA compilation (CUDA compiler can have a different default + #-std then the underlying host compiler by itself). Setting this variable + #forces CMake to always add the -std flag even if it thinks it doesn't need it + SET(CMAKE_CXX_STANDARD_DEFAULT 98 CACHE INTERNAL "" FORCE) +ENDIF() + +SET(KOKKOS_USE_CXX_EXTENSIONS @KOKKOS_USE_CXX_EXTENSIONS@) +IF (NOT DEFINED CMAKE_CXX_EXTENSIONS OR CMAKE_CXX_EXTENSIONS) + IF (NOT KOKKOS_USE_CXX_EXTENSIONS) + MESSAGE(WARNING "The installed Kokkos configuration does not support CXX extensions. Forcing -DCMAKE_CXX_EXTENSIONS=Off") + SET(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "" FORCE) + ENDIF() +ENDIF() + +include(FindPackageHandleStandardArgs) + +# This function makes sure that Kokkos was built with the requested backends +# and target architectures and generates a fatal error if it was not. +# +# kokkos_check( +# [DEVICES ...] # Set of backends (e.g. "OpenMP" and/or "Cuda") +# [ARCH ...] # Target architectures (e.g. "Power9" and/or "Volta70") +# [OPTIONS ...] # Optional settings (e.g. "PROFILING") +# [TPLS ...] # Third party libraries +# [RETURN_VALUE ] # Set a variable that indicates the result of the +# # check instead of a fatal error +# ) +function(kokkos_check) + set(ALLOWED_ARGS DEVICES ARCH OPTIONS TPLS) + cmake_parse_arguments(KOKKOS_CHECK "" "RETURN_VALUE" "${ALLOWED_ARGS}" ${ARGN}) + foreach(_arg ${KOKKOS_CHECK_UNPARSED_ARGUMENTS}) + message(SEND_ERROR "Argument '${_arg}' passed to kokkos_check() was not recognized") + endforeach() + # Get the list of keywords that were actually passed to the function. + set(REQUESTED_ARGS) + foreach(arg ${ALLOWED_ARGS}) + if(KOKKOS_CHECK_${arg}) + list(APPEND REQUESTED_ARGS ${arg}) + endif() + endforeach() + set(KOKKOS_CHECK_SUCCESS TRUE) + foreach(arg ${REQUESTED_ARGS}) + # Define variables named after the required arguments that are provided by + # the Kokkos install. + foreach(requested ${KOKKOS_CHECK_${arg}}) + foreach(provided ${Kokkos_${arg}}) + STRING(TOUPPER ${requested} REQUESTED_UC) + STRING(TOUPPER ${provided} PROVIDED_UC) + if(PROVIDED_UC STREQUAL REQUESTED_UC) + string(REPLACE ";" " " ${requested} "${KOKKOS_CHECK_${arg}}") + endif() + endforeach() + endforeach() + # Somewhat divert the CMake function below from its original purpose and + # use it to check that there are variables defined for all required + # arguments. Success or failure messages will be displayed but we are + # responsible for signaling failure and skip the build system generation. + find_package_handle_standard_args("Kokkos_${arg}" DEFAULT_MSG + ${KOKKOS_CHECK_${arg}}) + if(NOT Kokkos_${arg}_FOUND) + set(KOKKOS_CHECK_SUCCESS FALSE) + endif() + endforeach() + if(NOT KOKKOS_CHECK_SUCCESS AND NOT KOKKOS_CHECK_RETURN_VALUE) + message(FATAL_ERROR "Kokkos does NOT provide all backends and/or architectures requested") + else() + set(${KOKKOS_CHECK_RETURN_VALUE} ${KOKKOS_CHECK_SUCCESS} PARENT_SCOPE) + endif() +endfunction() diff --git a/lib/kokkos/cmake/KokkosCore_config.h.in b/lib/kokkos/cmake/KokkosCore_config.h.in new file mode 100644 index 0000000000..084afba8a8 --- /dev/null +++ b/lib/kokkos/cmake/KokkosCore_config.h.in @@ -0,0 +1,89 @@ + +#if !defined(KOKKOS_MACROS_HPP) || defined(KOKKOS_CORE_CONFIG_H) +#error "Do not include KokkosCore_config.h directly; include Kokkos_Macros.hpp instead." +#else +#define KOKKOS_CORE_CONFIG_H +#endif + +/* Execution Spaces */ +#cmakedefine KOKKOS_ENABLE_SERIAL +#cmakedefine KOKKOS_ENABLE_OPENMP +#cmakedefine KOKKOS_ENABLE_THREADS +#cmakedefine KOKKOS_ENABLE_CUDA +#cmakedefine KOKKOS_ENABLE_HPX +#cmakedefine KOKKOS_ENABLE_MEMKIND +#cmakedefine KOKKOS_ENABLE_LIBRT + +#ifndef __CUDA_ARCH__ +#cmakedefine KOKKOS_ENABLE_TM +#cmakedefine KOKKOS_USE_ISA_X86_64 +#cmakedefine KOKKOS_USE_ISA_KNC +#cmakedefine KOKKOS_USE_ISA_POWERPCLE +#cmakedefine KOKKOS_USE_ISA_POWERPCBE +#endif + +/* General Settings */ +#cmakedefine KOKKOS_ENABLE_CXX11 +#cmakedefine KOKKOS_ENABLE_CXX14 +#cmakedefine KOKKOS_ENABLE_CXX17 +#cmakedefine KOKKOS_ENABLE_CXX20 + +#cmakedefine KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE +#cmakedefine KOKKOS_ENABLE_CUDA_UVM +#cmakedefine KOKKOS_ENABLE_CUDA_LAMBDA +#cmakedefine KOKKOS_ENABLE_CUDA_CONSTEXPR +#cmakedefine KOKKOS_ENABLE_CUDA_LDG_INTRINSIC +#cmakedefine KOKKOS_ENABLE_HPX_ASYNC_DISPATCH +#cmakedefine KOKKOS_ENABLE_DEBUG +#cmakedefine KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK +#cmakedefine KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK +#cmakedefine KOKKOS_ENABLE_COMPILER_WARNINGS +#cmakedefine KOKKOS_ENABLE_PROFILING +#cmakedefine KOKKOS_ENABLE_PROFILING_LOAD_PRINT +#cmakedefine KOKKOS_ENABLE_DEPRECATED_CODE +#cmakedefine KOKKOS_ENABLE_ETI +#cmakedefine KOKKOS_ENABLE_LARGE_MEM_TESTS +#cmakedefine KOKKOS_ENABLE_DUALVIEW_MODIFY_CHECK +#cmakedefine KOKKOS_ENABLE_COMPLEX_ALIGN +#cmakedefine KOKKOS_OPT_RANGE_AGGRESSIVE_VECTORIZATION + +/* TPL Settings */ +#cmakedefine KOKKOS_ENABLE_HWLOC +#cmakedefine KOKKOS_USE_LIBRT +#cmakedefine KOKKOS_ENABLE_HWBSPACE + +#cmakedefine KOKKOS_IMPL_CUDA_CLANG_WORKAROUND + +#cmakedefine KOKKOS_COMPILER_CUDA_VERSION @KOKKOS_COMPILER_CUDA_VERSION@ + +#cmakedefine KOKKOS_ARCH_SSE42 +#cmakedefine KOKKOS_ARCH_ARMV80 +#cmakedefine KOKKOS_ARCH_ARMV8_THUNDERX +#cmakedefine KOKKOS_ARCH_ARMV81 +#cmakedefine KOKKOS_ARCH_ARMV8_THUNDERX2 +#cmakedefine KOKKOS_ARCH_AMD_AVX2 +#cmakedefine KOKKOS_ARCH_AVX +#cmakedefine KOKKOS_ARCH_AVX2 +#cmakedefine KOKKOS_ARCH_AVX512XEON +#cmakedefine KOKKOS_ARCH_KNC +#cmakedefine KOKKOS_ARCH_AVX512MIC +#cmakedefine KOKKOS_ARCH_POWER7 +#cmakedefine KOKKOS_ARCH_POWER8 +#cmakedefine KOKKOS_ARCH_POWER9 +#cmakedefine KOKKOS_ARCH_KEPLER +#cmakedefine KOKKOS_ARCH_KEPLER30 +#cmakedefine KOKKOS_ARCH_KEPLER32 +#cmakedefine KOKKOS_ARCH_KEPLER35 +#cmakedefine KOKKOS_ARCH_KEPLER37 +#cmakedefine KOKKOS_ARCH_MAXWELL +#cmakedefine KOKKOS_ARCH_MAXWELL50 +#cmakedefine KOKKOS_ARCH_MAXWELL52 +#cmakedefine KOKKOS_ARCH_MAXWELL53 +#cmakedefine KOKKOS_ARCH_PASCAL +#cmakedefine KOKKOS_ARCH_PASCAL60 +#cmakedefine KOKKOS_ARCH_PASCAL61 +#cmakedefine KOKKOS_ARCH_VOLTA +#cmakedefine KOKKOS_ARCH_VOLTA70 +#cmakedefine KOKKOS_ARCH_VOLTA72 +#cmakedefine KOKKOS_ARCH_TURING75 +#cmakedefine KOKKOS_ARCH_AMD_EPYC diff --git a/lib/kokkos/cmake/Makefile.generate_cmake_settings b/lib/kokkos/cmake/Makefile.generate_cmake_settings deleted file mode 100644 index da076b23db..0000000000 --- a/lib/kokkos/cmake/Makefile.generate_cmake_settings +++ /dev/null @@ -1,8 +0,0 @@ -ifndef KOKKOS_PATH - MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) - KOKKOS_PATH = $(subst Makefile,,$(MAKEFILE_PATH)).. -endif - -include $(KOKKOS_PATH)/Makefile.kokkos -include $(KOKKOS_PATH)/core/src/Makefile.generate_header_lists -include $(KOKKOS_PATH)/core/src/Makefile.generate_build_files diff --git a/lib/kokkos/cmake/Modules/FindHWLOC.cmake b/lib/kokkos/cmake/Modules/FindHWLOC.cmake deleted file mode 100644 index 60df8084d8..0000000000 --- a/lib/kokkos/cmake/Modules/FindHWLOC.cmake +++ /dev/null @@ -1,20 +0,0 @@ -#.rst: -# FindHWLOC -# ---------- -# -# Try to find HWLOC, based on KOKKOS_HWLOC_DIR -# -# The following variables are defined: -# -# HWLOC_FOUND - System has HWLOC -# HWLOC_INCLUDE_DIR - HWLOC include directory -# HWLOC_LIBRARIES - Libraries needed to use HWLOC - -find_path(HWLOC_INCLUDE_DIR hwloc.h PATHS "${KOKKOS_HWLOC_DIR}/include") -find_library(HWLOC_LIBRARIES hwloc PATHS "${KOKKOS_HWLOC_DIR}/lib") - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(HWLOC DEFAULT_MSG - HWLOC_INCLUDE_DIR HWLOC_LIBRARIES) - -mark_as_advanced(HWLOC_INCLUDE_DIR HWLOC_LIBRARIES) diff --git a/lib/kokkos/cmake/Modules/FindMemkind.cmake b/lib/kokkos/cmake/Modules/FindMemkind.cmake deleted file mode 100644 index 245fb44c19..0000000000 --- a/lib/kokkos/cmake/Modules/FindMemkind.cmake +++ /dev/null @@ -1,20 +0,0 @@ -#.rst: -# FindMemkind -# ---------- -# -# Try to find Memkind. -# -# The following variables are defined: -# -# MEMKIND_FOUND - System has Memkind -# MEMKIND_INCLUDE_DIR - Memkind include directory -# MEMKIND_LIBRARIES - Libraries needed to use Memkind - -find_path(MEMKIND_INCLUDE_DIR memkind.h) -find_library(MEMKIND_LIBRARIES memkind) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Memkind DEFAULT_MSG - MEMKIND_INCLUDE_DIR MEMKIND_LIBRARIES) - -mark_as_advanced(MEMKIND_INCLUDE_DIR MEMKIND_LIBRARIES) diff --git a/lib/kokkos/cmake/Modules/FindQthreads.cmake b/lib/kokkos/cmake/Modules/FindQthreads.cmake deleted file mode 100644 index a254b0e996..0000000000 --- a/lib/kokkos/cmake/Modules/FindQthreads.cmake +++ /dev/null @@ -1,20 +0,0 @@ -#.rst: -# FindQthreads -# ---------- -# -# Try to find Qthreads. -# -# The following variables are defined: -# -# QTHREADS_FOUND - System has Qthreads -# QTHREADS_INCLUDE_DIR - Qthreads include directory -# QTHREADS_LIBRARIES - Libraries needed to use Qthreads - -find_path(QTHREADS_INCLUDE_DIR qthread.h) -find_library(QTHREADS_LIBRARIES qthread) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Qthreads DEFAULT_MSG - QTHREADS_INCLUDE_DIR QTHREADS_LIBRARIES) - -mark_as_advanced(QTHREADS_INCLUDE_DIR QTHREADS_LIBRARIES) diff --git a/lib/kokkos/cmake/Modules/FindTPLCUDA.cmake b/lib/kokkos/cmake/Modules/FindTPLCUDA.cmake new file mode 100644 index 0000000000..36aefcdb44 --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindTPLCUDA.cmake @@ -0,0 +1,13 @@ + +IF (KOKKOS_CXX_COMPILER_ID STREQUAL Clang) + KOKKOS_FIND_IMPORTED(CUDA INTERFACE + LIBRARIES cudart cuda + LIBRARY_PATHS ENV LD_LIBRARY_PATH ENV CUDA_PATH + ALLOW_SYSTEM_PATH_FALLBACK + ) +ELSE() + KOKKOS_CREATE_IMPORTED_TPL(CUDA INTERFACE + LINK_LIBRARIES cuda + ) +ENDIF() + diff --git a/lib/kokkos/cmake/Modules/FindTPLHPX.cmake b/lib/kokkos/cmake/Modules/FindTPLHPX.cmake new file mode 100644 index 0000000000..c8b3bc4c9b --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindTPLHPX.cmake @@ -0,0 +1,15 @@ + +FIND_PACKAGE(HPX REQUIRED) +#as of right now, HPX doesn't export correctly +#so let's convert it to an interface target +KOKKOS_CREATE_IMPORTED_TPL(HPX INTERFACE + LINK_LIBRARIES ${HPX_LIBRARIES} + INCLUDES ${HPX_INCLUDE_DIRS} +) +#this is a bit funky since this is a CMake target +#but HPX doesn't export itself correctly +KOKKOS_EXPORT_CMAKE_TPL(HPX) + +#I would prefer all of this gets replaced with +#KOKKOS_IMPORT_CMAKE_TPL(HPX) + diff --git a/lib/kokkos/cmake/Modules/FindTPLHWLOC.cmake b/lib/kokkos/cmake/Modules/FindTPLHWLOC.cmake new file mode 100644 index 0000000000..cf763b7e5b --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindTPLHWLOC.cmake @@ -0,0 +1 @@ +KOKKOS_FIND_IMPORTED(HWLOC HEADER hwloc.h LIBRARY hwloc) diff --git a/lib/kokkos/cmake/Modules/FindTPLLIBDL.cmake b/lib/kokkos/cmake/Modules/FindTPLLIBDL.cmake new file mode 100644 index 0000000000..5fc6a69303 --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindTPLLIBDL.cmake @@ -0,0 +1 @@ +KOKKOS_FIND_IMPORTED(LIBDL HEADER dlfcn.h LIBRARY dl) diff --git a/lib/kokkos/cmake/Modules/FindTPLLIBNUMA.cmake b/lib/kokkos/cmake/Modules/FindTPLLIBNUMA.cmake new file mode 100644 index 0000000000..811db5851b --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindTPLLIBNUMA.cmake @@ -0,0 +1 @@ +KOKKOS_FIND_IMPORTED(LIBNUMA HEADER numa.h LIBRARY numa) diff --git a/lib/kokkos/cmake/Modules/FindTPLLIBRT.cmake b/lib/kokkos/cmake/Modules/FindTPLLIBRT.cmake new file mode 100644 index 0000000000..e75da56b5b --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindTPLLIBRT.cmake @@ -0,0 +1 @@ +KOKKOS_FIND_IMPORTED(LIBRT HEADER time.h LIBRARY rt) diff --git a/lib/kokkos/cmake/Modules/FindTPLMEMKIND.cmake b/lib/kokkos/cmake/Modules/FindTPLMEMKIND.cmake new file mode 100644 index 0000000000..20aaff2295 --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindTPLMEMKIND.cmake @@ -0,0 +1 @@ +KOKKOS_FIND_IMPORTED(MEMKIND HEADER memkind.h LIBRARY memkind) diff --git a/lib/kokkos/cmake/Modules/FindTPLPTHREAD.cmake b/lib/kokkos/cmake/Modules/FindTPLPTHREAD.cmake new file mode 100644 index 0000000000..b4b8c34122 --- /dev/null +++ b/lib/kokkos/cmake/Modules/FindTPLPTHREAD.cmake @@ -0,0 +1,17 @@ + +TRY_COMPILE(KOKKOS_HAS_PTHREAD_ARG + ${KOKKOS_TOP_BUILD_DIR}/tpl_tests + ${KOKKOS_SOURCE_DIR}/cmake/compile_tests/pthread.cpp + LINK_LIBRARIES -pthread + COMPILE_DEFINITIONS -pthread) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PTHREAD DEFAULT_MSG KOKKOS_HAS_PTHREAD_ARG) + +KOKKOS_CREATE_IMPORTED_TPL(PTHREAD + INTERFACE #this is not a real library with a real location + COMPILE_OPTIONS -pthread + LINK_OPTIONS -pthread) + + + diff --git a/lib/kokkos/cmake/README.md b/lib/kokkos/cmake/README.md new file mode 100644 index 0000000000..2ac8731586 --- /dev/null +++ b/lib/kokkos/cmake/README.md @@ -0,0 +1,331 @@ +![Kokkos](https://avatars2.githubusercontent.com/u/10199860?s=200&v=4) + +# Developing Kokkos + +This document contains a build system overview for developers with information on adding new CMake options that could influence +* Header configuration macros +* Optional features +* Third-partly libraries +* Compiler and linker flags +For build system details for users, refer to the [build instructions](../BUILD.md). + +## Build System + +Kokkos uses CMake to configure, build, and install. +Rather than being a completely straightforward use of modern CMake, +Kokkos has several extra complications, primarily due to: +* Kokkos must support linking to an installed version or in-tree builds as a subdirectory of a larger project. +* Kokkos must configure a special compiler `nvcc_wrapper` that allows `nvcc` to accept all C++ flags (which `nvcc` currently does not). +* Kokkos must work as a part of TriBITS, a CMake library providing a particular build idiom for Trilinos. +* Kokkos has many pre-existing users. We need to be careful about breaking previous versions or generating meaningful error messags if we do break backwards compatibility. + +If you are looking at the build system code wondering why certain decisions were made: we have had to balance many competing requirements and certain technical debt. Everything in the build system was done for a reason, trying to adhere as closely as possible to modern CMake best practices while meeting all pre-existing. customer requirements. + +### Modern CMake Philosophy + +Modern CMake relies on understanding the principle of *building* and *using* a code project. +What preprocessor, compiler, and linker flags do I need to *build* my project? +What flags does a downstream project that links to me need to *use* my project? +In CMake terms, flags that are only needed for building are `PRIVATE`. +Only Kokkos needs these flags, not a package that depends on Kokkos. +Flags that must be used in a downstream project are `PUBLIC`. +Kokkos must tell other projects to use them. + +In Kokkos, almost everything is a public flag since Kokkos is driven by headers and Kokkos is in charge of optimizing your code to achieve performance portability! +Include paths, C++ standard flags, architecture-specific optimizations, or OpenMP and CUDA flags are all examples of flags that Kokkos configures and adds to your project. + +Modern CMake now automatically propagates flags through the `target_link_libraries` command. +Suppose you have a library `stencil` that needs to build with Kokkos. +Consider the following CMake code: + +```` +find_package(Kokkos) +add_library(stencil stencil.cpp) +target_link_libraries(stencil Kokkos::kokkos) +```` + +This locates the Kokkos package, adds your library, and tells CMake to link Kokkos to your library. +All public build flags get added automatically through the `target_link_libraries` command. +There is nothing to do. You can be happily oblivious to how Kokkos was configured. +Everything should just work. + +As a Kokkos developer who wants to add new public compiler flags, how do you ensure that CMake does this properly? Modern CMake works through targets and properties. +Each target has a set of standard properties: +* `INTERFACE_COMPILE_OPTIONS` contains all the compiler options that Kokkos should add to downstream projects +* `INTERFACE_INCLUDE_DIRECTORIES` contains all the directories downstream projects must include from Kokkos +* `INTERFACE_COMPILE_DEFINITIONS` contains the list of preprocessor `-D` flags +* `INTERFACE_LINK_LIBRARIES` contains all the libraries downstream projects need to link +* `INTERFACE_COMPILE_FEATURES` essentially adds compiler flags, but with extra complications. Features names are specific to CMake. More later. + +CMake makes it easy to append to these properties using: +* `target_compile_options(kokkos PUBLIC -fmyflag)` +* `target_include_directories(kokkos PUBLIC mySpecialFolder)` +* `target_compile_definitions(kokkos PUBLIC -DmySpecialFlag=0)` +* `target_link_libraries(kokkos PUBLIC mySpecialLibrary)` +* `target_compile_features(kokkos PUBLIC mySpecialFeature)` +Note that all of these use `PUBLIC`! Almost every Kokkos flag is not private to Kokkos, but must also be used by downstream projects. + + +### Compiler Features and Compiler Options +Compiler options are flags like `-fopenmp` that do not need to be "resolved." +The flag is either on or off. +Compiler features are more fine-grained and require conflicting requests to be resolved. +Suppose I have +```` +add_library(A a.cpp) +target_compile_features(A PUBLIC cxx_std_11) +```` +then another target +```` +add_library(B b.cpp) +target_compile_features(B PUBLIC cxx_std_14) +target_link_libraries(A B) +```` +I have requested two diferent features. +CMake understands the requests and knows that `cxx_std_11` is a subset of `cxx_std_14`. +CMake then picks C++14 for library `B`. +CMake would not have been able to do feature resolution if we had directly done: +```` +target_compile_options(A PUBLIC -std=c++11) +```` + +### Adding Kokkos Options +After configuring for the first time, +CMake creates a cache of configure variables in `CMakeCache.txt`. +Reconfiguring in the folder "restarts" from those variables. +All flags passed as `-DKokkos_SOME_OPTION=X` to `cmake` become variables in the cache. +All Kokkos options begin with camel case `Kokkos_` followed by an upper case option name. + +CMake best practice is to avoid cache variables, if possible. +In essence, you want the minimal amount of state cached between configurations. +And never, ever have behavior influenced by multiple cache variables. +If you want to change the Kokkos configuration, have a single unique variable that needs to be changed. +Never require two cache variables to be changed. + +Kokkos provides a function `KOKKOS_OPTION` for defining valid cache-level variables, +proofreading them, and defining local project variables. +The most common variables are called `Kokkos_ENABLE_X`, +for which a helper function `KOKKOS_ENABLE_OPTION` is provided, e.g. +```` +KOKKOS_ENABLE_OPTION(TESTS OFF "Whether to build tests") +```` +The function checks if `-DKokkos_ENABLE_TESTS` was given, +whether it was given with the wrong case, e.g. `-DKokkos_Enable_Tests`, +and then defines a regular (non-cache) variable `KOKKOS_ENABLE_TESTS` to `ON` or `OFF` +depending on the given default and whether the option was specified. + +### Defining Kokkos Config Macros + +Sometimes you may want to add `#define Kokkos_X` macros to the config header. +This is straightforward with CMake. +Suppose you want to define an optional macro `KOKKOS_SUPER_SCIENCE`. +Simply go into `KokkosCore_config.h.in` and add +```` +#cmakedefine KOKKOS_SUPER_SCIENCE +```` +I can either add +```` +KOKKOS_OPTION(SUPER_SCIENCE ON "Whether to do some super science") +```` +to directly set the variable as a command-line `-D` option. +Alternatively, based on other logic, I could add to a `CMakeLists.txt` +```` +SET(KOKKOS_SUPER_SCIENCE ON) +```` +If not set as a command-line option (cache variable), you must make sure the variable is visible in the top-level scope. +If set in a function, you would need: +```` +SET(KOKKOS_SUPER_SCIENCE ON PARENT_SCOPE) +```` + +### Third-Party Libraries +In much the same way that compiler flags transitively propagate to dependent projects, +modern CMake allows us to propagate dependent libraries. +If Kokkos depends on, e.g. `hwloc` the downstream project will also need to link `hwloc`. +There are three stages in adding a new third-party library (TPL): +* Finding: find the desired library on the system and verify the installation is correct +* Importing: create a CMake target, if necessary, that is compatible with `target_link_libraries`. This is mostly relevant for TPLs not installed with CMake. +* Exporting: make the desired library visible to downstream projects + +TPLs are somewhat complicated by whether the library was installed with CMake or some other build system. +If CMake, our lives are greatly simplified. We simply use `find_package` to locate the installed CMake project then call `target_link_libraries(kokkoscore PUBLIC/PRIVATE TPL)`. For libaries not installed with CMake, the process is a bit more complex. +It is up to the Kokkos developers to "convert" the library into a CMake target as if it had been installed as a valid modern CMake target with properties. +There are helper functions for simplifying the process of importing TPLs in Kokkos, but we walk through the process in detail to clearly illustrate the steps involved. + +#### TPL Search Order + +There are several options for where CMake could try to find a TPL. +If there are multiple installations of the same TPL on the system, +the search order is critical for making sure the correct TPL is found. +There are 3 possibilities that could be used: + +1. Default system paths like /usr +1. User-provided paths through options `_ROOT` and `Kokkos__DIR` +1. Additional paths not in the CMake default list or provided by the user that Kokkos decides to add. For example, Kokkos may query `nvcc` or `LD_LIBRARY_PATH` for where to find CUDA libraries. + +The following is the search order that Kokkos follows. Note: This differs from the default search order used by CMake `find_library` and `find_header`. CMake prefers default system paths over user-provided paths. +For Kokkos (and package managers in general), it is better to prefer user-provided paths since this usually indicates a specific version we want. + +1. `_ROOT` +1. `Kokkos__DIR` +1. Paths added by Kokkos CMake logic +1. Default system paths (if allowed) + +Default system paths are allowed in two cases. First, none of the other options are given so the only place to look is system paths. Second, if explicitly given permission, configure will look in system paths. +The rationale for this logic is that if you specify a custom location, you usually *only* want to look in that location. +If you do not find the TPL where you expect it, you should error out rather than grab another random match. + + +#### Finding TPLs + +If finding a TPL that is not a modern CMake project, refer to the `FindHWLOC.cmake` file in `cmake/Modules` for an example. +You will ususally need to verify expected headers with `find_path` +```` +find_path(TPL_INCLUDE_DIR mytpl.h PATHS "${KOKKOS_MYTPL_DIR}/include") +```` +This insures that the library header is in the expected include directory and defines the variable `TPL_INCLUDE_DIR` with a valid path if successful. +Similarly, you can verify a library +```` +find_library(TPL_LIBRARY mytpl PATHS "${KOKKOS_MYTPL_DIR/lib") +```` +that then defines the variable `TPL_LIBRARY` with a valid path if successful. +CMake provides a utility for checking if the `find_path` and `find_library` calls were successful that emulates the behavior of `find_package` for a CMake target. +```` +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(MYTPL DEFAULT_MSG + MYTPL_INCLUDE_DIR MYTPL_LIBRARY) +```` +If the find failed, CMake will print standard error messages explaining the failure. + +#### Importing TPLs + +The installed TPL must be adapted into a CMake target. +CMake allows libraries to be added that are built externally as follows: +```` +add_library(Kokkos::mytpl UNKNOWN IMPORTED) +```` +Importantly, we use a `Kokkos::` namespace to avoid name conflicts and identify this specifically as the version imported by Kokkos. +Because we are importing a non-CMake target, we must populate all the target properties that would have been automatically populated for a CMake target. +```` +set_target_properties(Kokkos::mytpl PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${MYTPL_INCLUDE_DIR}" + IMPORTED_LOCATION "${MYTPL_LIBRARY}" +) +```` + +#### Exporting TPLs + +Kokkos may now depend on the target `Kokkos::mytpl` as a `PUBLIC` library (remember building and using). +This means that downstream projects must also know about `Kokkos::myptl` - so Kokkos must export them. +In the `KokkosConfig.cmake.in` file, we need to add code like the following: +```` +set(MYTPL_LIBRARY @MYTPL_LIBRARY@) +set(MYTPL_INCLUDE_DIR @MYTPL_INCLUDE_DIR@) +add_library(Kokkos::mytpl UNKNOWN IMPORTED) +set_target_properties(Kokkos::mytpl PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${MYTPL_INCLUDE_DIR}" + IMPORTED_LOCATION "${MYTPL_LIBRARY}" +) +```` +If this looks familiar, that's because it is exactly the same code as above for importing the TPL. +Exporting a TPL really just means importing the TPL when Kokkos is loaded by an external project. +We will describe helper functions that simplify this process. + +#### Interface TPLs + +If a TPL is just a library and set of headers, we can make a simple `IMPORTED` target. +However, a TPL is actually completely flexible and need not be limited to just headers and libraries. +TPLs can configure compiler flags, linker flags, or multiple different libraries. +For this, we use a special type of CMake target: `INTERFACE` libraries. +These libraries don't build anything. +They simply populate properties that will configure flags for dependent targets. +We consider the example: +```` +add_library(PTHREAD INTERFACE) +target_compile_options(PTHREAD PUBLIC -pthread) +```` +Kokkos uses the compiler flag `-pthread` to define compiler macros for re-entrant functions rather than treating it simply as a library with header `pthread.h` and library `-lpthread`. +Any property can be configured, e.g. +```` +target_link_libraries(MYTPL ...) +```` +In contrast to imported TPLs which require direct modification of `KokkosConfig.cmake.in`, +we can use CMake's built-in export functions: +```` +INSTALL( + TARGETS MYTPL + EXPORT KokkosTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +) +```` +These interface targets will be automatically populated in the config file. + +#### Linking the TPL +After finishing the import process, it still remains to link the imported target as needed. +For example, +```` +target_link_libraries(kokkoscore PUBLIC Kokkos::HWLOC) +```` +The complexity of which includes, options, and libraries the TPL requires +should be encapsulated in the CMake target. + +#### TPL Helper Functions +##### KOKKOS_IMPORT_TPL +This function can be invoked as, e.g. +```` +KOKKOS_IMPORT_TPL(HWLOC) +```` +This function checks if the TPL was enabled by a `-DKokkos_ENABLE_HWLOC=On` flag. +If so, it calls `find_package(TPLHWLOC)`. +This invokes the file `FindTPLHWLOC.cmake` which should be contained in the `cmake/Modules` folder. +If successful, another function `KOKKOS_EXPORT_CMAKE_TPL` gets invoked. +This automatically adds all the necessary import commands to `KokkosConfig.cmake`. + +##### KOKKOS_FIND_IMPORTED +Inside a `FindTPLX.cmake` file, the simplest way to import a library is to call, e.g. +```` +KOKKOS_FIND_IMPORTED(HWLOC LIBRARY hwloc HEADER hwloc.h) +```` +This finds the location of the library and header and creates an imported target `Kokkos::HWLOC` +that can be linked against. +The library/header find can be guided with `-DHWLOC_ROOT=` or `-DKokkos_HWLOC_DIR=` during CMake configure. +These both specify the install prefix. + +##### KOKKOS_LINK_TPL +This function checks if the TPL has been enabled. +If so, it links a given library against the imported (or interface) TPL target. + +##### KOKKOS_CREATE_IMPORTED_TPL +This helper function is best understood by reading the actual code. +This function takes arguments specifying the properties and creates the actual TPL target. +The most important thing to understand for this function is whether you call this function with the optional `INTERFACE` keyword. +This tells the project to either create the target as an imported target or interface target, as discussed above. + +##### KOKKOS_EXPORT_CMAKE_TPL +Even if the TPL just loads a valid CMake target, we still must "export" it into the config file. +When Kokkos is loaded by a downstream project, this TPL must be loaded. +Calling this function simply appends text recording the location where the TPL was found +and adding a `find_dependency(...)` call that will reload the CMake target. + +### The Great TriBITS Compromise + +TriBITS was a masterpiece of CMake version 2 before the modern CMake idioms of building and using. +TriBITS greatly limited verbosity of CMake files, handled complicated dependency trees between packages, and handled automatically setting up include and linker paths for dependent libraries. + +Kokkos is now used by numerous projects that don't (and won't) depend on TriBITS for their build systems. +Kokkos has to work outside of TriBITS and provide a standard CMake 3+ build system. +At the same time, Kokkos is used by numerous projects that depend on TriBITS and don't (and won't) switch to a standard CMake 3+ build system. + +Instead of calling functions `TRIBITS_X(...)`, the CMake calls wrapper functions `KOKKOS_X(...)`. +If TriBITS is available (as in Trilinos), `KOKKOS_X` will just be a thin wrapper around `TRIBITS_X`. +If TriBITS is not available, Kokkos maps `KOKKOS_X` calls to native CMake that complies with CMake 3 idioms. +For the time being, this seems the most sensible way to handle the competing requirements of a standalone modern CMake and TriBITS build system. + +##### [LICENSE](https://github.com/kokkos/kokkos/blob/devel/LICENSE) + +[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) + +Under the terms of Contract DE-NA0003525 with NTESS, +the U.S. Government retains certain rights in this software. diff --git a/lib/kokkos/cmake/compile_tests/clang_omp.cpp b/lib/kokkos/cmake/compile_tests/clang_omp.cpp new file mode 100644 index 0000000000..ce3bbfb262 --- /dev/null +++ b/lib/kokkos/cmake/compile_tests/clang_omp.cpp @@ -0,0 +1,9 @@ +#include + +int main(int argc, char** argv) { + int thr = omp_get_num_threads(); + if (thr > 0) + return thr; + else + return 0; +} diff --git a/lib/kokkos/cmake/compile_tests/pthread.cpp b/lib/kokkos/cmake/compile_tests/pthread.cpp new file mode 100644 index 0000000000..3b13f7ba35 --- /dev/null +++ b/lib/kokkos/cmake/compile_tests/pthread.cpp @@ -0,0 +1,10 @@ +#include + +void* kokkos_test(void* args) { return args; } + +int main(void) { + pthread_t thread; + pthread_create(&thread, NULL, kokkos_test, NULL); + pthread_join(thread, NULL); + return 0; +} diff --git a/lib/kokkos/cmake/cray.cmake b/lib/kokkos/cmake/cray.cmake new file mode 100644 index 0000000000..08912f5130 --- /dev/null +++ b/lib/kokkos/cmake/cray.cmake @@ -0,0 +1,9 @@ + + +function(kokkos_set_cray_flags full_standard int_standard) + STRING(TOLOWER ${full_standard} FULL_LC_STANDARD) + STRING(TOLOWER ${int_standard} INT_LC_STANDARD) + SET(KOKKOS_CXX_STANDARD_FLAG "-hstd=c++${FULL_LC_STANDARD}", PARENT_SCOPE) + SET(KOKKOS_CXX_INTERMDIATE_STANDARD_FLAG "-hstd=c++${INT_LC_STANDARD}" PARENT_SCOPE) +endfunction() + diff --git a/lib/kokkos/cmake/deps/CUDA.cmake b/lib/kokkos/cmake/deps/CUDA.cmake index 801c20067b..4876bca259 100644 --- a/lib/kokkos/cmake/deps/CUDA.cmake +++ b/lib/kokkos/cmake/deps/CUDA.cmake @@ -73,7 +73,7 @@ IF(NOT _CUDA_FAILURE) GLOBAL_SET(TPL_CUDA_LIBRARY_DIRS) GLOBAL_SET(TPL_CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE}) GLOBAL_SET(TPL_CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY} ${CUDA_cublas_LIBRARY} ${CUDA_cufft_LIBRARY}) - TIBITS_CREATE_IMPORTED_TPL_LIBRARY(CUSPARSE) + KOKKOS_CREATE_IMPORTED_TPL_LIBRARY(CUSPARSE) ELSE() SET(TPL_ENABLE_CUDA OFF) ENDIF() diff --git a/lib/kokkos/cmake/deps/CUSPARSE.cmake b/lib/kokkos/cmake/deps/CUSPARSE.cmake index 6f26d857c0..b2420d1168 100644 --- a/lib/kokkos/cmake/deps/CUSPARSE.cmake +++ b/lib/kokkos/cmake/deps/CUSPARSE.cmake @@ -59,6 +59,6 @@ # GLOBAL_SET(TPL_CUSPARSE_LIBRARY_DIRS) # GLOBAL_SET(TPL_CUSPARSE_INCLUDE_DIRS ${TPL_CUDA_INCLUDE_DIRS}) # GLOBAL_SET(TPL_CUSPARSE_LIBRARIES ${CUDA_cusparse_LIBRARY}) -# TIBITS_CREATE_IMPORTED_TPL_LIBRARY(CUSPARSE) +# KOKKOS_CREATE_IMPORTED_TPL_LIBRARY(CUSPARSE) #ENDIF() diff --git a/lib/kokkos/cmake/deps/HWLOC.cmake b/lib/kokkos/cmake/deps/HWLOC.cmake index 275abd3a5d..ed89c8c1e5 100644 --- a/lib/kokkos/cmake/deps/HWLOC.cmake +++ b/lib/kokkos/cmake/deps/HWLOC.cmake @@ -64,7 +64,7 @@ # Version: 1.3 # -TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( HWLOC +KOKKOS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( HWLOC REQUIRED_HEADERS hwloc.h REQUIRED_LIBS_NAMES "hwloc" ) diff --git a/lib/kokkos/cmake/deps/Pthread.cmake b/lib/kokkos/cmake/deps/Pthread.cmake index 46d0a939ca..5f835fc300 100644 --- a/lib/kokkos/cmake/deps/Pthread.cmake +++ b/lib/kokkos/cmake/deps/Pthread.cmake @@ -74,9 +74,9 @@ IF(USE_THREADS) SET(TPL_Pthread_INCLUDE_DIRS "") SET(TPL_Pthread_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") SET(TPL_Pthread_LIBRARY_DIRS "") - TIBITS_CREATE_IMPORTED_TPL_LIBRARY(Pthread) + KOKKOS_CREATE_IMPORTED_TPL_LIBRARY(Pthread) ELSE() - TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( Pthread + KOKKOS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( Pthread REQUIRED_HEADERS pthread.h REQUIRED_LIBS_NAMES pthread ) diff --git a/lib/kokkos/cmake/deps/QTHREADS.cmake b/lib/kokkos/cmake/deps/QTHREADS.cmake deleted file mode 100644 index c312f2590b..0000000000 --- a/lib/kokkos/cmake/deps/QTHREADS.cmake +++ /dev/null @@ -1,69 +0,0 @@ -# @HEADER -# ************************************************************************ -# -# Trilinos: An Object-Oriented Solver Framework -# Copyright (2001) Sandia Corporation -# -# -# Copyright (2001) Sandia Corporation. Under the terms of Contract -# DE-AC04-94AL85000, there is a non-exclusive license for use of this -# work by or on behalf of the U.S. Government. Export of this program -# may require a license from the United States Government. -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the Corporation nor the names of the -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# NOTICE: The United States Government is granted for itself and others -# acting on its behalf a paid-up, nonexclusive, irrevocable worldwide -# license in this data to reproduce, prepare derivative works, and -# perform publicly and display publicly. Beginning five (5) years from -# July 25, 2001, the United States Government is granted for itself and -# others acting on its behalf a paid-up, nonexclusive, irrevocable -# worldwide license in this data to reproduce, prepare derivative works, -# distribute copies to the public, perform publicly and display -# publicly, and to permit others to do so. -# -# NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT -# OF ENERGY, NOR SANDIA CORPORATION, NOR ANY OF THEIR EMPLOYEES, MAKES -# ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR -# RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY -# INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS -# THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS. -# -# ************************************************************************ -# @HEADER - - -#----------------------------------------------------------------------------- -# Hardware locality detection and control library. -# -# Acquisition information: -# Date checked: July 2014 -# Checked by: H. Carter Edwards -# Source: https://code.google.com/p/qthreads -# - -TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( QTHREADS - REQUIRED_HEADERS qthread.h - REQUIRED_LIBS_NAMES "qthread" - ) diff --git a/lib/kokkos/cmake/fake_tribits.cmake b/lib/kokkos/cmake/fake_tribits.cmake new file mode 100644 index 0000000000..26948d2cfb --- /dev/null +++ b/lib/kokkos/cmake/fake_tribits.cmake @@ -0,0 +1,338 @@ +#These are tribits wrappers used by all projects in the Kokkos ecosystem + +INCLUDE(CMakeParseArguments) +INCLUDE(CTest) + +cmake_policy(SET CMP0054 NEW) + +FUNCTION(ASSERT_DEFINED VARS) + FOREACH(VAR ${VARS}) + IF(NOT DEFINED ${VAR}) + MESSAGE(SEND_ERROR "Error, the variable ${VAR} is not defined!") + ENDIF() + ENDFOREACH() +ENDFUNCTION() + +MACRO(KOKKOS_ADD_OPTION_AND_DEFINE USER_OPTION_NAME MACRO_DEFINE_NAME DOCSTRING DEFAULT_VALUE ) +SET( ${USER_OPTION_NAME} "${DEFAULT_VALUE}" CACHE BOOL "${DOCSTRING}" ) +IF(NOT ${MACRO_DEFINE_NAME} STREQUAL "") + IF(${USER_OPTION_NAME}) + GLOBAL_SET(${MACRO_DEFINE_NAME} ON) + ELSE() + GLOBAL_SET(${MACRO_DEFINE_NAME} OFF) + ENDIF() +ENDIF() +ENDMACRO() + +MACRO(GLOBAL_RESET VARNAME) + SET(${VARNAME} "" CACHE INTERNAL "" FORCE) +ENDMACRO() + +MACRO(GLOBAL_OVERWRITE VARNAME VALUE TYPE) + SET(${VARNAME} ${VALUE} CACHE ${TYPE} "" FORCE) +ENDMACRO() + +IF (NOT KOKKOS_HAS_TRILINOS) +MACRO(APPEND_GLOB VAR) + FILE(GLOB LOCAL_TMP_VAR ${ARGN}) + LIST(APPEND ${VAR} ${LOCAL_TMP_VAR}) +ENDMACRO() + +MACRO(GLOBAL_SET VARNAME) + SET(${VARNAME} ${ARGN} CACHE INTERNAL "" FORCE) +ENDMACRO() + +FUNCTION(VERIFY_EMPTY CONTEXT) +if(${ARGN}) +MESSAGE(FATAL_ERROR "Kokkos does not support all of Tribits. Unhandled arguments in ${CONTEXT}:\n${ARGN}") +endif() +ENDFUNCTION() + +MACRO(PREPEND_GLOBAL_SET VARNAME) + ASSERT_DEFINED(${VARNAME}) + GLOBAL_SET(${VARNAME} ${ARGN} ${${VARNAME}}) +ENDMACRO() + +MACRO(PREPEND_TARGET_SET VARNAME TARGET_NAME TYPE) + IF(TYPE STREQUAL "REQUIRED") + SET(REQUIRED TRUE) + ELSE() + SET(REQUIRED FALSE) + ENDIF() + IF(TARGET ${TARGET_NAME}) + PREPEND_GLOBAL_SET(${VARNAME} ${TARGET_NAME}) + ELSE() + IF(REQUIRED) + MESSAGE(FATAL_ERROR "Missing dependency ${TARGET_NAME}") + ENDIF() + ENDIF() +ENDMACRO() +endif() + + +FUNCTION(KOKKOS_CONFIGURE_FILE PACKAGE_NAME_CONFIG_FILE) + if (KOKKOS_HAS_TRILINOS) + TRIBITS_CONFIGURE_FILE(${PACKAGE_NAME_CONFIG_FILE}) + else() + # Configure the file + CONFIGURE_FILE( + ${PACKAGE_SOURCE_DIR}/cmake/${PACKAGE_NAME_CONFIG_FILE}.in + ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME_CONFIG_FILE} + ) + endif() +ENDFUNCTION() + +MACRO(ADD_INTERFACE_LIBRARY LIB_NAME) + FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "") + ADD_LIBRARY(${LIB_NAME} STATIC ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) + SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES INTERFACE TRUE) +ENDMACRO() + +IF(NOT TARGET check) + ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} -VV -C ${CMAKE_CFG_INTDIR}) +ENDIF() + +FUNCTION(KOKKOS_ADD_TEST) + if (KOKKOS_HAS_TRILINOS) + CMAKE_PARSE_ARGUMENTS(TEST + "" + "EXE;NAME" + "" + ${ARGN}) + IF(TEST_EXE) + SET(EXE_ROOT ${TEST_EXE}) + ELSE() + SET(EXE_ROOT ${TEST_NAME}) + ENDIF() + + TRIBITS_ADD_TEST( + ${EXE_ROOT} + NAME ${TEST_NAME} + ${ARGN} + COMM serial mpi + NUM_MPI_PROCS 1 + ${TEST_UNPARSED_ARGUMENTS} + ) + else() + CMAKE_PARSE_ARGUMENTS(TEST + "WILL_FAIL" + "FAIL_REGULAR_EXPRESSION;PASS_REGULAR_EXPRESSION;EXE;NAME" + "CATEGORIES;CMD_ARGS" + ${ARGN}) + IF(TEST_EXE) + SET(EXE ${TEST_EXE}) + ELSE() + SET(EXE ${TEST_NAME}) + ENDIF() + IF(WIN32) + ADD_TEST(NAME ${TEST_NAME} WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH} COMMAND ${EXE}${CMAKE_EXECUTABLE_SUFFIX} ${TEST_CMD_ARGS}) + ELSE() + ADD_TEST(NAME ${TEST_NAME} COMMAND ${EXE} ${TEST_CMD_ARGS}) + ENDIF() + IF(TEST_WILL_FAIL) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES WILL_FAIL ${TEST_WILL_FAIL}) + ENDIF() + IF(TEST_FAIL_REGULAR_EXPRESSION) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION ${TEST_FAIL_REGULAR_EXPRESSION}) + ENDIF() + IF(TEST_PASS_REGULAR_EXPRESSION) + SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES PASS_REGULAR_EXPRESSION ${TEST_PASS_REGULAR_EXPRESSION}) + ENDIF() + VERIFY_EMPTY(KOKKOS_ADD_TEST ${TEST_UNPARSED_ARGUMENTS}) + endif() +ENDFUNCTION() + +FUNCTION(KOKKOS_ADD_ADVANCED_TEST) + if (KOKKOS_HAS_TRILINOS) + TRIBITS_ADD_ADVANCED_TEST(${ARGN}) + else() + # TODO Write this + endif() +ENDFUNCTION() + +MACRO(KOKKOS_CREATE_IMPORTED_TPL_LIBRARY TPL_NAME) + ADD_INTERFACE_LIBRARY(TPL_LIB_${TPL_NAME}) + TARGET_LINK_LIBRARIES(TPL_LIB_${TPL_NAME} LINK_PUBLIC ${TPL_${TPL_NAME}_LIBRARIES}) + TARGET_INCLUDE_DIRECTORIES(TPL_LIB_${TPL_NAME} INTERFACE ${TPL_${TPL_NAME}_INCLUDE_DIRS}) +ENDMACRO() + +FUNCTION(KOKKOS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES TPL_NAME) + if (KOKKOS_HAS_TRILINOS) + TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES(${TPL_NAME} ${ARGN}) + else() + CMAKE_PARSE_ARGUMENTS(PARSE + "" + "" + "REQUIRED_HEADERS;REQUIRED_LIBS_NAMES" + ${ARGN}) + + SET(_${TPL_NAME}_ENABLE_SUCCESS TRUE) + IF (PARSE_REQUIRED_LIBS_NAMES) + FIND_LIBRARY(TPL_${TPL_NAME}_LIBRARIES NAMES ${PARSE_REQUIRED_LIBS_NAMES}) + IF(NOT TPL_${TPL_NAME}_LIBRARIES) + SET(_${TPL_NAME}_ENABLE_SUCCESS FALSE) + ENDIF() + ENDIF() + IF (PARSE_REQUIRED_HEADERS) + FIND_PATH(TPL_${TPL_NAME}_INCLUDE_DIRS NAMES ${PARSE_REQUIRED_HEADERS}) + IF(NOT TPL_${TPL_NAME}_INCLUDE_DIRS) + SET(_${TPL_NAME}_ENABLE_SUCCESS FALSE) + ENDIF() + ENDIF() + IF (_${TPL_NAME}_ENABLE_SUCCESS) + KOKKOS_CREATE_IMPORTED_TPL_LIBRARY(${TPL_NAME}) + ENDIF() + VERIFY_EMPTY(KOKKOS_CREATE_IMPORTED_TPL_LIBRARY ${PARSE_UNPARSED_ARGUMENTS}) + endif() +ENDFUNCTION() + +MACRO(KOKKOS_TARGET_COMPILE_OPTIONS TARGET) +if(KOKKOS_HAS_TRILINOS) + TARGET_COMPILE_OPTIONS(${TARGET} ${ARGN}) +else() + TARGET_COMPILE_OPTIONS(${TARGET} ${ARGN}) +endif() +ENDMACRO() + + +MACRO(KOKKOS_EXCLUDE_AUTOTOOLS_FILES) + if (KOKKOS_HAS_TRILINOS) + TRIBITS_EXCLUDE_AUTOTOOLS_FILES() + else() + #do nothing + endif() +ENDMACRO() + +FUNCTION(KOKKOS_LIB_TYPE LIB RET) +GET_TARGET_PROPERTY(PROP ${LIB} TYPE) +IF (${PROP} STREQUAL "INTERFACE_LIBRARY") + SET(${RET} "INTERFACE" PARENT_SCOPE) +ELSE() + SET(${RET} "PUBLIC" PARENT_SCOPE) +ENDIF() +ENDFUNCTION() + +FUNCTION(KOKKOS_TARGET_INCLUDE_DIRECTORIES TARGET) +IF(KOKKOS_HAS_TRILINOS) + KOKKOS_LIB_TYPE(${TARGET} INCTYPE) + #don't trust tribits to do this correctly - but need to add package name + TARGET_INCLUDE_DIRECTORIES(${TARGET} ${INCTYPE} ${ARGN}) +ELSEIF(TARGET ${TARGET}) + #the target actually exists - this means we are doing separate libs + #or this a test library + KOKKOS_LIB_TYPE(${TARGET} INCTYPE) + TARGET_INCLUDE_DIRECTORIES(${TARGET} ${INCTYPE} ${ARGN}) +ELSE() + GET_PROPERTY(LIBS GLOBAL PROPERTY KOKKOS_LIBRARIES_NAMES) + IF (${TARGET} IN_LIST LIBS) + SET_PROPERTY(GLOBAL APPEND PROPERTY KOKKOS_LIBRARY_INCLUDES ${ARGN}) + ELSE() + MESSAGE(FATAL_ERROR "Trying to set include directories on unknown target ${TARGET}") + ENDIF() +ENDIF() +ENDFUNCTION() + +FUNCTION(KOKKOS_LINK_INTERNAL_LIBRARY TARGET DEPLIB) +IF(KOKKOS_HAS_TRILINOS) + #do nothing +ELSE() + SET(options INTERFACE) + SET(oneValueArgs) + SET(multiValueArgs) + CMAKE_PARSE_ARGUMENTS(PARSE + "INTERFACE" + "" + "" + ${ARGN}) + SET(LINK_TYPE) + IF(PARSE_INTERFACE) + SET(LINK_TYPE INTERFACE) + ELSE() + SET(LINK_TYPE PUBLIC) + ENDIF() + TARGET_LINK_LIBRARIES(${TARGET} ${LINK_TYPE} ${DEPLIB}) + VERIFY_EMPTY(KOKKOS_LINK_INTERNAL_LIBRARY ${PARSE_UNPARSED_ARGUMENTS}) +ENDIF() +ENDFUNCTION() + +FUNCTION(KOKKOS_ADD_TEST_LIBRARY NAME) +IF (KOKKOS_HAS_TRILINOS) + TRIBITS_ADD_LIBRARY(${NAME} ${ARGN} TESTONLY + ADDED_LIB_TARGET_NAME_OUT ${NAME} + ) +ELSE() + SET(oneValueArgs) + SET(multiValueArgs HEADERS SOURCES) + + CMAKE_PARSE_ARGUMENTS(PARSE + "STATIC;SHARED" + "" + "HEADERS;SOURCES" + ${ARGN}) + + IF(PARSE_HEADERS) + LIST(REMOVE_DUPLICATES PARSE_HEADERS) + ENDIF() + IF(PARSE_SOURCES) + LIST(REMOVE_DUPLICATES PARSE_SOURCES) + ENDIF() + ADD_LIBRARY(${NAME} ${PARSE_SOURCES}) + target_link_libraries( + ${NAME} + PUBLIC kokkos + ) +ENDIF() +ENDFUNCTION() + + +FUNCTION(KOKKOS_TARGET_COMPILE_DEFINITIONS) + IF (KOKKOS_HAS_TRILINOS) + TARGET_COMPILE_DEFINITIONS(${TARGET} ${ARGN}) + ELSE() + TARGET_COMPILE_DEFINITIONS(${TARGET} ${ARGN}) + ENDIF() +ENDFUNCTION() + +FUNCTION(KOKKOS_INCLUDE_DIRECTORIES) +IF(KOKKOS_HAS_TRILINOS) + TRIBITS_INCLUDE_DIRECTORIES(${ARGN}) +ELSE() + CMAKE_PARSE_ARGUMENTS( + INC + "REQUIRED_DURING_INSTALLATION_TESTING" + "" + "" + ${ARGN} + ) + INCLUDE_DIRECTORIES(${INC_UNPARSED_ARGUMENTS}) +ENDIF() +ENDFUNCTION() + + +MACRO(KOKKOS_ADD_COMPILE_OPTIONS) +ADD_COMPILE_OPTIONS(${ARGN}) +ENDMACRO() + +MACRO(PRINTALL match) +get_cmake_property(_variableNames VARIABLES) +list (SORT _variableNames) +foreach (_variableName ${_variableNames}) + if("${_variableName}" MATCHES "${match}") + message(STATUS "${_variableName}=${${_variableName}}") + endif() +endforeach() +ENDMACRO() + +MACRO(SET_GLOBAL_REPLACE SUBSTR VARNAME) + STRING(REPLACE ${SUBSTR} ${${VARNAME}} TEMP) + GLOBAL_SET(${VARNAME} ${TEMP}) +ENDMACRO() + +FUNCTION(GLOBAL_APPEND VARNAME) + #We make this a function since we are setting variables + #and want to use scope to avoid overwriting local variables + SET(TEMP ${${VARNAME}}) + LIST(APPEND TEMP ${ARGN}) + GLOBAL_SET(${VARNAME} ${TEMP}) +ENDFUNCTION() + diff --git a/lib/kokkos/cmake/gnu.cmake b/lib/kokkos/cmake/gnu.cmake new file mode 100644 index 0000000000..aa11fe87b1 --- /dev/null +++ b/lib/kokkos/cmake/gnu.cmake @@ -0,0 +1,23 @@ + +FUNCTION(kokkos_set_gnu_flags full_standard int_standard) + STRING(TOLOWER ${full_standard} FULL_LC_STANDARD) + STRING(TOLOWER ${int_standard} INT_LC_STANDARD) + # The following three blocks of code were copied from + # /Modules/Compiler/Intel-CXX.cmake from CMake 3.7.2 and then modified. + IF(CMAKE_CXX_SIMULATE_ID STREQUAL MSVC) + SET(_std -Qstd) + SET(_ext c++) + ELSE() + SET(_std -std) + SET(_ext gnu++) + ENDIF() + + IF (CMAKE_CXX_EXTENSIONS) + SET(KOKKOS_CXX_STANDARD_FLAG "-std=gnu++${FULL_LC_STANDARD}" PARENT_SCOPE) + SET(KOKKOS_CXX_INTERMEDIATE_STANDARD_FLAG "-std=gnu++${INT_LC_STANDARD}" PARENT_SCOPE) + ELSE() + SET(KOKKOS_CXX_STANDARD_FLAG "-std=c++${FULL_LC_STANDARD}" PARENT_SCOPE) + SET(KOKKOS_CXX_INTERMEDIATE_STANDARD_FLAG "-std=c++${INT_LC_STANDARD}" PARENT_SCOPE) + ENDIF() +ENDFUNCTION() + diff --git a/lib/kokkos/cmake/intel.cmake b/lib/kokkos/cmake/intel.cmake new file mode 100644 index 0000000000..f36f01d8ca --- /dev/null +++ b/lib/kokkos/cmake/intel.cmake @@ -0,0 +1,30 @@ + +FUNCTION(kokkos_set_intel_flags full_standard int_standard) + STRING(TOLOWER ${full_standard} FULL_LC_STANDARD) + STRING(TOLOWER ${int_standard} INT_LC_STANDARD) + # The following three blocks of code were copied from + # /Modules/Compiler/Intel-CXX.cmake from CMake 3.7.2 and then modified. + IF(CMAKE_CXX_SIMULATE_ID STREQUAL MSVC) + SET(_std -Qstd) + SET(_ext c++) + ELSE() + SET(_std -std) + SET(_ext gnu++) + ENDIF() + + IF(NOT KOKKOS_CXX_STANDARD STREQUAL 11 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2) + #There is no gnu++14 value supported; figure out what to do. + SET(KOKKOS_CXX_STANDARD_FLAG "${_std}=c++${FULL_LC_STANDARD}" PARENT_SCOPE) + SET(KOKKOS_CXX_INTERMEDIATE_STANDARD_FLAG "${_std}=c++${INT_LC_STANDARD}" PARENT_SCOPE) + ELSEIF(KOKKOS_CXX_STANDARD STREQUAL 11 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0) + IF (CMAKE_CXX_EXTENSIONS) + SET(KOKKOS_CXX_STANDARD_FLAG "${_std}=${_ext}c++11" PARENT_SCOPE) + ELSE() + SET(KOKKOS_CXX_STANDARD_FLAG "${_std}=c++11" PARENT_SCOPE) + ENDIF() + ELSE() + MESSAGE(FATAL_ERROR "Intel compiler version too low - need 13.0 for C++11 and 15.0 for C++14") + ENDIF() + +ENDFUNCTION() + diff --git a/lib/kokkos/cmake/kokkos_arch.cmake b/lib/kokkos/cmake/kokkos_arch.cmake new file mode 100644 index 0000000000..c33247c955 --- /dev/null +++ b/lib/kokkos/cmake/kokkos_arch.cmake @@ -0,0 +1,438 @@ + +FUNCTION(KOKKOS_ARCH_OPTION SUFFIX DEV_TYPE DESCRIPTION) + #all optimizations off by default + KOKKOS_OPTION(ARCH_${SUFFIX} OFF BOOL "Optimize for ${DESCRIPTION} (${DEV_TYPE})") + IF (KOKKOS_ARCH_${SUFFIX}) + LIST(APPEND KOKKOS_ENABLED_ARCH_LIST ${SUFFIX}) + SET(KOKKOS_ENABLED_ARCH_LIST ${KOKKOS_ENABLED_ARCH_LIST} PARENT_SCOPE) + ENDIF() + SET(KOKKOS_ARCH_${SUFFIX} ${KOKKOS_ARCH_${SUFFIX}} PARENT_SCOPE) +ENDFUNCTION() + +FUNCTION(ARCH_FLAGS) + SET(COMPILERS NVIDIA PGI XL DEFAULT Cray Intel Clang AppleClang GNU) + CMAKE_PARSE_ARGUMENTS( + PARSE + "LINK_ONLY;COMPILE_ONLY" + "" + "${COMPILERS}" + ${ARGN}) + + SET(COMPILER ${KOKKOS_CXX_COMPILER_ID}) + + SET(FLAGS) + SET(NEW_COMPILE_OPTIONS) + SET(NEW_XCOMPILER_OPTIONS) + SET(NEW_LINK_OPTIONS) + LIST(APPEND NEW_XCOMPILER_OPTIONS ${KOKKOS_XCOMPILER_OPTIONS}) + LIST(APPEND NEW_COMPILE_OPTIONS ${KOKKOS_COMPILE_OPTIONS}) + LIST(APPEND NEW_LINK_OPTIONS ${KOKKOS_LINK_OPTIONS}) + FOREACH(COMP ${COMPILERS}) + IF (COMPILER STREQUAL "${COMP}") + IF (PARSE_${COMPILER}) + IF (NOT "${PARSE_${COMPILER}}" STREQUAL "NO-VALUE-SPECIFIED") + SET(FLAGS ${PARSE_${COMPILER}}) + ENDIF() + ELSEIF(PARSE_DEFAULT) + SET(FLAGS ${PARSE_DEFAULT}) + ENDIF() + ENDIF() + ENDFOREACH() + + IF (NOT LINK_ONLY) + # The funky logic here is for future handling of argument deduplication + # If we naively pass multiple -Xcompiler flags to target_compile_options + # -Xcompiler will get deduplicated and break the build + IF ("-Xcompiler" IN_LIST FLAGS) + LIST(REMOVE_ITEM FLAGS "-Xcompiler") + GLOBAL_APPEND(KOKKOS_XCOMPILER_OPTIONS ${FLAGS}) + ELSE() + GLOBAL_APPEND(KOKKOS_COMPILE_OPTIONS ${FLAGS}) + ENDIF() + ENDIF() + + IF (NOT COMPILE_ONLY) + GLOBAL_APPEND(KOKKOS_LINK_OPTIONS ${FLAGS}) + ENDIF() +ENDFUNCTION() + +# Make sure devices and compiler ID are done +KOKKOS_CFG_DEPENDS(ARCH COMPILER_ID) +KOKKOS_CFG_DEPENDS(ARCH DEVICES) +KOKKOS_CFG_DEPENDS(ARCH OPTIONS) + + +#------------------------------------------------------------------------------- +# List of possible host architectures. +#------------------------------------------------------------------------------- +SET(KOKKOS_ARCH_LIST) + + +KOKKOS_DEPRECATED_LIST(ARCH ARCH) +KOKKOS_ARCH_OPTION(AMDAVX HOST "AMD chip") +KOKKOS_ARCH_OPTION(ARMV80 HOST "ARMv8.0 Compatible CPU") +KOKKOS_ARCH_OPTION(ARMV81 HOST "ARMv8.1 Compatible CPU") +KOKKOS_ARCH_OPTION(ARMV8_THUNDERX HOST "ARMv8 Cavium ThunderX CPU") +KOKKOS_ARCH_OPTION(ARMV8_THUNDERX2 HOST "ARMv8 Cavium ThunderX2 CPU") +KOKKOS_ARCH_OPTION(WSM HOST "Intel Westmere CPU") +KOKKOS_ARCH_OPTION(SNB HOST "Intel Sandy/Ivy Bridge CPUs") +KOKKOS_ARCH_OPTION(HSW HOST "Intel Haswell CPUs") +KOKKOS_ARCH_OPTION(BDW HOST "Intel Broadwell Xeon E-class CPUs") +KOKKOS_ARCH_OPTION(SKX HOST "Intel Sky Lake Xeon E-class HPC CPUs (AVX512)") +KOKKOS_ARCH_OPTION(KNC HOST "Intel Knights Corner Xeon Phi") +KOKKOS_ARCH_OPTION(KNL HOST "Intel Knights Landing Xeon Phi") +KOKKOS_ARCH_OPTION(BGQ HOST "IBM Blue Gene Q") +KOKKOS_ARCH_OPTION(POWER7 HOST "IBM POWER7 CPUs") +KOKKOS_ARCH_OPTION(POWER8 HOST "IBM POWER8 CPUs") +KOKKOS_ARCH_OPTION(POWER9 HOST "IBM POWER9 CPUs") +KOKKOS_ARCH_OPTION(KEPLER30 GPU "NVIDIA Kepler generation CC 3.0") +KOKKOS_ARCH_OPTION(KEPLER32 GPU "NVIDIA Kepler generation CC 3.2") +KOKKOS_ARCH_OPTION(KEPLER35 GPU "NVIDIA Kepler generation CC 3.5") +KOKKOS_ARCH_OPTION(KEPLER37 GPU "NVIDIA Kepler generation CC 3.7") +KOKKOS_ARCH_OPTION(MAXWELL50 GPU "NVIDIA Maxwell generation CC 5.0") +KOKKOS_ARCH_OPTION(MAXWELL52 GPU "NVIDIA Maxwell generation CC 5.2") +KOKKOS_ARCH_OPTION(MAXWELL53 GPU "NVIDIA Maxwell generation CC 5.3") +KOKKOS_ARCH_OPTION(PASCAL60 GPU "NVIDIA Pascal generation CC 6.0") +KOKKOS_ARCH_OPTION(PASCAL61 GPU "NVIDIA Pascal generation CC 6.1") +KOKKOS_ARCH_OPTION(VOLTA70 GPU "NVIDIA Volta generation CC 7.0") +KOKKOS_ARCH_OPTION(VOLTA72 GPU "NVIDIA Volta generation CC 7.2") +KOKKOS_ARCH_OPTION(TURING75 GPU "NVIDIA Turing generation CC 7.5") +KOKKOS_ARCH_OPTION(EPYC HOST "AMD Epyc architecture") + + +IF (KOKKOS_ENABLE_CUDA) + #Regardless of version, make sure we define the general architecture name + IF (KOKKOS_ARCH_KEPLER30 OR KOKKOS_ARCH_KEPLER32 OR KOKKOS_ARCH_KEPLER35 OR KOKKOS_ARCH_KEPLER37) + SET(KOKKOS_ARCH_KEPLER ON) + ENDIF() + + #Regardless of version, make sure we define the general architecture name + IF (KOKKOS_ARCH_MAXWELL50 OR KOKKOS_ARCH_MAXWELL52 OR KOKKOS_ARCH_MAXWELL53) + SET(KOKKOS_ARCH_MAXWELL ON) + ENDIF() + + #Regardless of version, make sure we define the general architecture name + IF (KOKKOS_ARCH_PASCAL60 OR KOKKOS_ARCH_PASCAL61) + SET(KOKKOS_ARCH_PASCAL ON) + ENDIF() + + #Regardless of version, make sure we define the general architecture name + IF (KOKKOS_ARCH_VOLTA70 OR KOKKOS_ARCH_VOLTA72) + SET(KOKKOS_ARCH_VOLTA ON) + ENDIF() +ENDIF() + + + +IF(KOKKOS_ENABLE_COMPILER_WARNINGS) + SET(COMMON_WARNINGS + "-Wall" "-Wshadow" "-pedantic" + "-Wsign-compare" "-Wtype-limits" "-Wuninitialized") + + SET(GNU_WARNINGS "-Wempty-body" "-Wclobbered" "-Wignored-qualifiers" + ${COMMON_WARNINGS}) + + ARCH_FLAGS( + PGI NO-VALUE-SPECIFIED + GNU ${GNU_WARNINGS} + DEFAULT ${COMMON_WARNINGS} + ) +ENDIF() + + +#------------------------------- KOKKOS_CUDA_OPTIONS --------------------------- +GLOBAL_RESET(KOKKOS_CUDA_OPTIONS) +# Construct the Makefile options +IF (KOKKOS_ENABLE_CUDA_LAMBDA) + IF(KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + GLOBAL_APPEND(KOKKOS_CUDA_OPTIONS "-expt-extended-lambda") + ENDIF() +ENDIF() + +IF (KOKKOS_ENABLE_CUDA_CONSTEXPR) + IF(KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + GLOBAL_APPEND(KOKKOS_CUDA_OPTIONS "-expt-relaxed-constexpr") + ENDIF() +ENDIF() + +IF (KOKKOS_CXX_COMPILER_ID STREQUAL Clang) + SET(CUDA_ARCH_FLAG "--cuda-gpu-arch") + GLOBAL_APPEND(KOKKOS_CUDA_OPTIONS -x cuda) + IF (KOKKOS_ENABLE_CUDA) + SET(KOKKOS_IMPL_CUDA_CLANG_WORKAROUND ON CACHE BOOL "enable CUDA Clang workarounds" FORCE) + ENDIF() +ELSEIF(KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + SET(CUDA_ARCH_FLAG "-arch") +ENDIF() + +IF (KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPERCASE_CMAKE_BUILD_TYPE) + IF (KOKKOS_ENABLE_DEBUG OR _UPPERCASE_CMAKE_BUILD_TYPE STREQUAL "DEBUG") + GLOBAL_APPEND(KOKKOS_CUDA_OPTIONS -lineinfo) + ENDIF() + UNSET(_UPPERCASE_CMAKE_BUILD_TYPE) + IF (KOKKOS_CXX_COMPILER_VERSION VERSION_GREATER 9.0 OR KOKKOS_CXX_COMPILER_VERSION VERSION_EQUAL 9.0) + GLOBAL_APPEND(KOKKOS_CUDAFE_OPTIONS --diag_suppress=esa_on_defaulted_function_ignored) + ENDIF() +ENDIF() + +IF(KOKKOS_ENABLE_OPENMP) + IF (KOKKOS_CXX_COMPILER_ID STREQUAL AppleClang) + MESSAGE(FATAL_ERROR "Apple Clang does not support OpenMP. Use native Clang instead") + ENDIF() + ARCH_FLAGS( + Clang -fopenmp=libomp + PGI -mp + NVIDIA -Xcompiler -fopenmp + Cray NO-VALUE-SPECIFIED + XL -qsmp=omp + DEFAULT -fopenmp + ) +ENDIF() + +IF (KOKKOS_ARCH_ARMV80) + ARCH_FLAGS( + Cray NO-VALUE-SPECIFIED + PGI NO-VALUE-SPECIFIED + DEFAULT -march=armv8-a + ) +ENDIF() + +IF (KOKKOS_ARCH_ARMV81) + ARCH_FLAGS( + Cray NO-VALUE-SPECIFIED + PGI NO-VALUE-SPECIFIED + DEFAULT -march=armv8.1-a + ) +ENDIF() + +IF (KOKKOS_ARCH_ARMV8_THUNDERX) + SET(KOKKOS_ARCH_ARMV80 ON) #Not a cache variable + ARCH_FLAGS( + Cray NO-VALUE-SPECIFIED + PGI NO-VALUE-SPECIFIED + DEFAULT -march=armv8-a -mtune=thunderx + ) +ENDIF() + +IF (KOKKOS_ARCH_ARMV8_THUNDERX2) + SET(KOKKOS_ARCH_ARMV81 ON) #Not a cache variable + ARCH_FLAGS( + Cray NO-VALUE-SPECIFIED + PGI NO-VALUE-SPECIFIED + DEFAULT -mcpu=thunderx2t99 -mtune=thunderx2t99 + ) +ENDIF() + +IF (KOKKOS_ARCH_EPYC) + ARCH_FLAGS( + Intel -mavx2 + DEFAULT -march=znver1 -mtune=znver1 + ) + SET(KOKKOS_ARCH_AMD_EPYC ON) + SET(KOKKOS_ARCH_AMD_AVX2 ON) +ENDIF() + +IF (KOKKOS_ARCH_WSM) + ARCH_FLAGS( + Intel -xSSE4.2 + PGI -tp=nehalem + Cray NO-VALUE-SPECIFIED + DEFAULT -msse4.2 + ) + SET(KOKKOS_ARCH_SSE42 ON) +ENDIF() + +IF (KOKKOS_ARCH_SNB OR KOKKOS_ARCH_AMDAVX) + SET(KOKKOS_ARCH_AVX ON) + ARCH_FLAGS( + Intel -mavx + PGI -tp=sandybridge + Cray NO-VALUE-SPECIFIED + DEFAULT -mavx + ) +ENDIF() + +IF (KOKKOS_ARCH_HSW) + SET(KOKKOS_ARCH_AVX2 ON) + ARCH_FLAGS( + Intel -xCORE-AVX2 + PGI -tp=haswell + Cray NO-VALUE-SPECIFIED + DEFAULT -march=core-avx2 -mtune=core-avx2 + ) +ENDIF() + +IF (KOKKOS_ARCH_BDW) + SET(KOKKOS_ARCH_AVX2 ON) + ARCH_FLAGS( + Intel -xCORE-AVX2 + PGI -tp=haswell + Cray NO-VALUE-SPECIFIED + DEFAULT -march=core-avx2 -mtune=core-avx2 -mrtm + ) +ENDIF() + +IF (KOKKOS_ARCH_EPYC) + SET(KOKKOS_ARCH_AMD_AVX2 ON) + ARCH_FLAGS( + Intel -mvax2 + DEFAULT -march=znver1 -mtune=znver1 + ) +ENDIF() + +IF (KOKKOS_ARCH_KNL) + #avx512-mic + SET(KOKKOS_ARCH_AVX512MIC ON) #not a cache variable + ARCH_FLAGS( + Intel -xMIC-AVX512 + PGI NO-VALUE-SPECIFIED + Cray NO-VALUE-SPECIFIED + DEFAULT -march=knl -mtune=knl + ) +ENDIF() + +IF (KOKKOS_ARCH_KNC) + SET(KOKKOS_USE_ISA_KNC ON) + ARCH_FLAGS( + DEFAULT -mmic + ) +ENDIF() + +IF (KOKKOS_ARCH_SKX) + #avx512-xeon + SET(KOKKOS_ARCH_AVX512XEON ON) + ARCH_FLAGS( + Intel -xCORE-AVX512 + PGI NO-VALUE-SPECIFIED + Cray NO-VALUE-SPECIFIED + DEFAULT -march=skylake-avx512 -mtune=skylake-avx512 -mrtm + ) +ENDIF() + +IF (KOKKOS_ARCH_WSM OR KOKKOS_ARCH_SNB OR KOKKOS_ARCH_HSW OR KOKKOS_ARCH_BDW OR KOKKOS_ARCH_KNL OR KOKKOS_ARCH_SKX OR KOKKOS_ARCH_EPYC) + SET(KOKKOS_USE_ISA_X86_64 ON) +ENDIF() + +IF (KOKKOS_ARCH_BDW OR KOKKOS_ARCH_SKX) + SET(KOKKOS_ENABLE_TM ON) #not a cache variable +ENDIF() + +IF (KOKKOS_ARCH_POWER7) + ARCH_FLAGS( + PGI NO-VALUE-SPECIFIED + DEFAULT -mcpu=power7 -mtune=power7 + ) + SET(KOKKOS_USE_ISA_POWERPCBE ON) +ENDIF() + +IF (KOKKOS_ARCH_POWER8) + ARCH_FLAGS( + PGI NO-VALUE-SPECIFIED + NVIDIA NO-VALUE-SPECIFIED + DEFAULT -mcpu=power8 -mtune=power8 + ) +ENDIF() + +IF (KOKKOS_ARCH_POWER9) + ARCH_FLAGS( + PGI NO-VALUE-SPECIFIED + NVIDIA NO-VALUE-SPECIFIED + DEFAULT -mcpu=power9 -mtune=power9 + ) +ENDIF() + +IF (KOKKOS_ARCH_POWER8 OR KOKKOS_ARCH_POWER9) + SET(KOKKOS_USE_ISA_POWERPCLE ON) +ENDIF() + +IF (Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE) + ARCH_FLAGS( + Clang -fcuda-rdc + NVIDIA --relocatable-device-code=true + ) +ENDIF() + + +SET(CUDA_ARCH_ALREADY_SPECIFIED "") +FUNCTION(CHECK_CUDA_ARCH ARCH FLAG) +IF(KOKKOS_ARCH_${ARCH}) + IF(CUDA_ARCH_ALREADY_SPECIFIED) + MESSAGE(FATAL_ERROR "Multiple GPU architectures given! Already have ${CUDA_ARCH_ALREADY_SPECIFIED}, but trying to add ${ARCH}. If you are re-running CMake, try clearing the cache and running again.") + ENDIF() + SET(CUDA_ARCH_ALREADY_SPECIFIED ${ARCH} PARENT_SCOPE) + IF (NOT KOKKOS_ENABLE_CUDA) + MESSAGE(WARNING "Given CUDA arch ${ARCH}, but Kokkos_ENABLE_CUDA is OFF. Option will be ignored.") + UNSET(KOKKOS_ARCH_${ARCH} PARENT_SCOPE) + ELSE() + GLOBAL_APPEND(KOKKOS_CUDA_OPTIONS "${CUDA_ARCH_FLAG}=${FLAG}") + IF(KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE) + GLOBAL_APPEND(KOKKOS_LINK_OPTIONS "${CUDA_ARCH_FLAG}=${FLAG}") + ENDIF() + ENDIF() +ENDIF() +ENDFUNCTION() + + +CHECK_CUDA_ARCH(KEPLER30 sm_30) +CHECK_CUDA_ARCH(KEPLER32 sm_32) +CHECK_CUDA_ARCH(KEPLER35 sm_35) +CHECK_CUDA_ARCH(KEPLER37 sm_37) +CHECK_CUDA_ARCH(MAXWELL50 sm_50) +CHECK_CUDA_ARCH(MAXWELL52 sm_52) +CHECK_CUDA_ARCH(MAXWELL53 sm_53) +CHECK_CUDA_ARCH(PASCAL60 sm_60) +CHECK_CUDA_ARCH(PASCAL61 sm_61) +CHECK_CUDA_ARCH(VOLTA70 sm_70) +CHECK_CUDA_ARCH(VOLTA72 sm_72) +CHECK_CUDA_ARCH(TURING75 sm_75) + +#CMake verbose is kind of pointless +#Let's just always print things +MESSAGE(STATUS "Execution Spaces:") +IF(KOKKOS_ENABLE_CUDA) + MESSAGE(STATUS " Device Parallel: CUDA") +ELSE() + MESSAGE(STATUS " Device Parallel: NONE") +ENDIF() + +FOREACH (_BACKEND OPENMP PTHREAD HPX) + IF(KOKKOS_ENABLE_${_BACKEND}) + IF(_HOST_PARALLEL) + MESSAGE(FATAL_ERROR "Multiple host parallel execution spaces are not allowed! " + "Trying to enable execution space ${_BACKEND}, " + "but execution space ${_HOST_PARALLEL} is already enabled. " + "Remove the CMakeCache.txt file and re-configure.") + ENDIF() + SET(_HOST_PARALLEL ${_BACKEND}) + ENDIF() +ENDFOREACH() + +IF(NOT _HOST_PARALLEL AND NOT KOKKOS_ENABLE_SERIAL) + MESSAGE(FATAL_ERROR "At least one host execution space must be enabled, " + "but no host parallel execution space was requested " + "and Kokkos_ENABLE_SERIAL=OFF.") +ENDIF() + +IF(NOT _HOST_PARALLEL) + SET(_HOST_PARALLEL "NONE") +ENDIF() +MESSAGE(STATUS " Host Parallel: ${_HOST_PARALLEL}") +UNSET(_HOST_PARALLEL) + +IF(KOKKOS_ENABLE_PTHREAD) + SET(KOKKOS_ENABLE_THREADS ON) +ENDIF() + +IF(KOKKOS_ENABLE_SERIAL) + MESSAGE(STATUS " Host Serial: SERIAL") +ELSE() + MESSAGE(STATUS " Host Serial: NONE") +ENDIF() + +MESSAGE(STATUS "") +MESSAGE(STATUS "Architectures:") +FOREACH(Arch ${KOKKOS_ENABLED_ARCH_LIST}) + MESSAGE(STATUS " ${Arch}") +ENDFOREACH() + diff --git a/lib/kokkos/cmake/kokkos_build.cmake b/lib/kokkos/cmake/kokkos_build.cmake deleted file mode 100644 index f9b995baae..0000000000 --- a/lib/kokkos/cmake/kokkos_build.cmake +++ /dev/null @@ -1,261 +0,0 @@ -############################ Detect if submodule ############################### -# -# With thanks to StackOverflow: -# http://stackoverflow.com/questions/25199677/how-to-detect-if-current-scope-has-a-parent-in-cmake -# -get_directory_property(HAS_PARENT PARENT_DIRECTORY) -if(HAS_PARENT) - message(STATUS "Submodule build") - SET(KOKKOS_HEADER_DIR "include/kokkos") -else() - message(STATUS "Standalone build") - SET(KOKKOS_HEADER_DIR "include") -endif() - -################################ Handle the actual build ####################### - -SET(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries") -SET(INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables") -SET(INSTALL_INCLUDE_DIR ${KOKKOS_HEADER_DIR} CACHE PATH - "Installation directory for header files") -IF(WIN32 AND NOT CYGWIN) - SET(DEF_INSTALL_CMAKE_DIR CMake) -ELSE() - SET(DEF_INSTALL_CMAKE_DIR lib/CMake/Kokkos) -ENDIF() - -SET(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH - "Installation directory for CMake files") - -# Make relative paths absolute (needed later on) -FOREACH(p LIB BIN INCLUDE CMAKE) - SET(var INSTALL_${p}_DIR) - IF(NOT IS_ABSOLUTE "${${var}}") - SET(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") - ENDIF() -ENDFOREACH() - -# set up include-directories -SET (Kokkos_INCLUDE_DIRS - ${Kokkos_SOURCE_DIR}/core/src - ${Kokkos_SOURCE_DIR}/containers/src - ${Kokkos_SOURCE_DIR}/algorithms/src - ${Kokkos_BINARY_DIR} # to find KokkosCore_config.h - ${KOKKOS_INCLUDE_DIRS} -) - -# pass include dirs back to parent scope -if(HAS_PARENT) -SET(Kokkos_INCLUDE_DIRS_RET ${Kokkos_INCLUDE_DIRS} PARENT_SCOPE) -else() -SET(Kokkos_INCLUDE_DIRS_RET ${Kokkos_INCLUDE_DIRS}) -endif() - -INCLUDE_DIRECTORIES(${Kokkos_INCLUDE_DIRS}) - -IF(KOKKOS_SEPARATE_LIBS) - # Sources come from makefile-generated kokkos_generated_settings.cmake file - # Separate libs need to separate the sources - set_kokkos_srcs(KOKKOS_SRC ${KOKKOS_SRC}) - - # kokkoscore - ADD_LIBRARY( - kokkoscore - ${KOKKOS_CORE_SRCS} - ) - - target_compile_options( - kokkoscore - PUBLIC $<$:${KOKKOS_CXX_FLAGS}> - ) - - target_include_directories( - kokkoscore - PUBLIC - ${KOKKOS_TPL_INCLUDE_DIRS} - ) - - foreach(lib IN LISTS KOKKOS_TPL_LIBRARY_NAMES) - if (("${lib}" STREQUAL "cuda") AND (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")) - set(LIB_cuda "-lcuda") - elseif ("${lib}" STREQUAL "hpx") - find_package(HPX REQUIRED) - if(${HPX_FOUND}) - target_link_libraries(kokkoscore PUBLIC ${HPX_LIBRARIES}) - target_link_libraries(kokkoscontainers PUBLIC ${HPX_LIBRARIES}) - target_link_libraries(kokkosalgorithms PUBLIC ${HPX_LIBRARIES}) - target_include_directories(kokkoscore PUBLIC ${HPX_INCLUDE_DIRS}) - target_include_directories(kokkoscontainers PUBLIC ${HPX_INCLUDE_DIRS}) - target_include_directories(kokkosalgorithms PUBLIC ${HPX_INCLUDE_DIRS}) - else() - message(ERROR "HPX not found. Check the value of HPX_DIR (= ${HPX_DIR}) or CMAKE_PREFIX_PATH (= ${CMAKE_PREFIX_PATH}).") - endif() - else() - find_library(LIB_${lib} ${lib} PATHS ${KOKKOS_TPL_LIBRARY_DIRS}) - endif() - target_link_libraries(kokkoscore PUBLIC ${LIB_${lib}}) - endforeach() - - target_link_libraries(kokkoscore PUBLIC "${KOKKOS_LINK_FLAGS}") - - # Install the kokkoscore library - INSTALL (TARGETS kokkoscore - EXPORT KokkosTargets - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin - ) - - # kokkoscontainers - if (DEFINED KOKKOS_CONTAINERS_SRCS) - ADD_LIBRARY( - kokkoscontainers - ${KOKKOS_CONTAINERS_SRCS} - ) - endif() - - TARGET_LINK_LIBRARIES( - kokkoscontainers - kokkoscore - ) - - # Install the kokkocontainers library - INSTALL (TARGETS kokkoscontainers - EXPORT KokkosTargets - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) - - # kokkosalgorithms - Build as interface library since no source files. - ADD_LIBRARY( - kokkosalgorithms - INTERFACE - ) - - target_include_directories( - kokkosalgorithms - INTERFACE ${Kokkos_SOURCE_DIR}/algorithms/src - ) - - TARGET_LINK_LIBRARIES( - kokkosalgorithms - INTERFACE kokkoscore - ) - - # Install the kokkoalgorithms library - INSTALL (TARGETS kokkosalgorithms - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) - - SET (Kokkos_LIBRARIES_NAMES kokkoscore kokkoscontainers kokkosalgorithms) - -ELSE() - # kokkos - ADD_LIBRARY( - kokkos - ${KOKKOS_CORE_SRCS} - ${KOKKOS_CONTAINERS_SRCS} - ) - - target_compile_options( - kokkos - PUBLIC $<$:${KOKKOS_CXX_FLAGS}> - ) - - target_include_directories( - kokkos - PUBLIC - ${KOKKOS_TPL_INCLUDE_DIRS} - ) - - foreach(lib IN LISTS KOKKOS_TPL_LIBRARY_NAMES) - if (("${lib}" STREQUAL "cuda") AND (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")) - set(LIB_cuda "-lcuda") - elseif ("${lib}" STREQUAL "hpx") - find_package(HPX REQUIRED) - if(${HPX_FOUND}) - target_link_libraries(kokkos PUBLIC ${HPX_LIBRARIES}) - target_include_directories(kokkos PUBLIC ${HPX_INCLUDE_DIRS}) - else() - message(ERROR "HPX not found. Check the value of HPX_DIR (= ${HPX_DIR}) or CMAKE_PREFIX_PATH (= ${CMAKE_PREFIX_PATH}).") - endif() - else() - find_library(LIB_${lib} ${lib} PATHS ${KOKKOS_TPL_LIBRARY_DIRS}) - endif() - target_link_libraries(kokkos PUBLIC ${LIB_${lib}}) - endforeach() - - target_link_libraries(kokkos PUBLIC "${KOKKOS_LINK_FLAGS}") - - # Install the kokkos library - INSTALL (TARGETS kokkos - EXPORT KokkosTargets - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) - - - SET (Kokkos_LIBRARIES_NAMES kokkos) - -endif() # KOKKOS_SEPARATE_LIBS - -# Install the kokkos headers -INSTALL (DIRECTORY - EXPORT KokkosTargets - ${Kokkos_SOURCE_DIR}/core/src/ - DESTINATION ${KOKKOS_HEADER_DIR} - FILES_MATCHING PATTERN "*.hpp" -) -INSTALL (DIRECTORY - EXPORT KokkosTargets - ${Kokkos_SOURCE_DIR}/containers/src/ - DESTINATION ${KOKKOS_HEADER_DIR} - FILES_MATCHING PATTERN "*.hpp" -) -INSTALL (DIRECTORY - EXPORT KokkosTargets - ${Kokkos_SOURCE_DIR}/algorithms/src/ - DESTINATION ${KOKKOS_HEADER_DIR} - FILES_MATCHING PATTERN "*.hpp" -) - -INSTALL (FILES - ${Kokkos_BINARY_DIR}/KokkosCore_config.h - DESTINATION ${KOKKOS_HEADER_DIR} -) - -# Add all targets to the build-tree export set -export(TARGETS ${Kokkos_LIBRARIES_NAMES} - FILE "${Kokkos_BINARY_DIR}/KokkosTargets.cmake") - -# Export the package for use from the build-tree -# (this registers the build-tree with a global CMake-registry) -export(PACKAGE Kokkos) - -# Create the KokkosConfig.cmake and KokkosConfigVersion files -file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" - "${INSTALL_INCLUDE_DIR}") -# ... for the build tree -set(CONF_INCLUDE_DIRS "${Kokkos_SOURCE_DIR}" "${Kokkos_BINARY_DIR}") -configure_file(${Kokkos_SOURCE_DIR}/cmake/KokkosConfig.cmake.in - "${Kokkos_BINARY_DIR}/KokkosConfig.cmake" @ONLY) -# ... for the install tree -set(CONF_INCLUDE_DIRS "\${Kokkos_CMAKE_DIR}/${REL_INCLUDE_DIR}") -configure_file(${Kokkos_SOURCE_DIR}/cmake/KokkosConfig.cmake.in - "${Kokkos_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/KokkosConfig.cmake" @ONLY) - -# Install the KokkosConfig.cmake and KokkosConfigVersion.cmake -install(FILES - "${Kokkos_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/KokkosConfig.cmake" - DESTINATION "${INSTALL_CMAKE_DIR}") - -#This seems not to do anything? -#message(STATUS "KokkosTargets: " ${KokkosTargets}) -# Install the export set for use with the install-tree -INSTALL(EXPORT KokkosTargets DESTINATION - "${INSTALL_CMAKE_DIR}") - -# build and install pkgconfig file -CONFIGURE_FILE(core/src/kokkos.pc.in kokkos.pc @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/kokkos.pc DESTINATION lib/pkgconfig) diff --git a/lib/kokkos/cmake/kokkos_compiler_id.cmake b/lib/kokkos/cmake/kokkos_compiler_id.cmake new file mode 100644 index 0000000000..d239c3b32e --- /dev/null +++ b/lib/kokkos/cmake/kokkos_compiler_id.cmake @@ -0,0 +1,80 @@ +KOKKOS_CFG_DEPENDS(COMPILER_ID NONE) + +SET(KOKKOS_CXX_COMPILER ${CMAKE_CXX_COMPILER}) +SET(KOKKOS_CXX_COMPILER_ID ${CMAKE_CXX_COMPILER_ID}) +SET(KOKKOS_CXX_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}) + +# Check if the compiler is nvcc (which really means nvcc_wrapper). +EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version + COMMAND grep nvcc + COMMAND wc -l + OUTPUT_VARIABLE INTERNAL_HAVE_COMPILER_NVCC + OUTPUT_STRIP_TRAILING_WHITESPACE) + + +STRING(REGEX REPLACE "^ +" "" + INTERNAL_HAVE_COMPILER_NVCC ${INTERNAL_HAVE_COMPILER_NVCC}) + + +IF(INTERNAL_HAVE_COMPILER_NVCC) + # SET the compiler id to nvcc. We use the value used by CMake 3.8. + SET(KOKKOS_CXX_COMPILER_ID NVIDIA CACHE STRING INTERNAL FORCE) + + # SET nvcc's compiler version. + EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version + COMMAND grep release + OUTPUT_VARIABLE INTERNAL_CXX_COMPILER_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) + + STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+$" + TEMP_CXX_COMPILER_VERSION ${INTERNAL_CXX_COMPILER_VERSION}) + SET(KOKKOS_CXX_COMPILER_VERSION ${TEMP_CXX_COMPILER_VERSION} CACHE STRING INTERNAL FORCE) +ENDIF() + +IF(KOKKOS_CXX_COMPILER_ID STREQUAL Cray) + + # SET nvcc's compiler version. + EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version + OUTPUT_VARIABLE INTERNAL_CXX_COMPILER_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) + + STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+$" + TEMP_CXX_COMPILER_VERSION ${INTERNAL_CXX_COMPILER_VERSION}) + SET(KOKKOS_CXX_COMPILER_VERSION ${TEMP_CXX_COMPILER_VERSION} CACHE STRING INTERNAL FORCE) +ENDIF() + +# Enforce the minimum compilers supported by Kokkos. +SET(KOKKOS_MESSAGE_TEXT "Compiler not supported by Kokkos. Required compiler versions:") +SET(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n Clang 3.5.2 or higher") +SET(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n GCC 4.8.4 or higher") +SET(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n Intel 15.0.2 or higher") +SET(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n NVCC 9.0.69 or higher") +SET(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n PGI 17.1 or higher\n") + +IF(KOKKOS_CXX_COMPILER_ID STREQUAL Clang) + IF(KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 3.5.2) + MESSAGE(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") + ENDIF() +ELSEIF(KOKKOS_CXX_COMPILER_ID STREQUAL GNU) + IF(KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 4.8.4) + MESSAGE(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") + ENDIF() +ELSEIF(KOKKOS_CXX_COMPILER_ID STREQUAL Intel) + IF(KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 15.0.2) + MESSAGE(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") + ENDIF() +ELSEIF(KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + IF(KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 9.0.69) + MESSAGE(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") + ENDIF() + SET(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Kokkos turns off CXX extensions" FORCE) +ELSEIF(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + IF(KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 17.1) + MESSAGE(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") + ENDIF() +ENDIF() + +STRING(REPLACE "." ";" VERSION_LIST ${KOKKOS_CXX_COMPILER_VERSION}) +LIST(GET VERSION_LIST 0 KOKKOS_COMPILER_VERSION_MAJOR) +LIST(GET VERSION_LIST 1 KOKKOS_COMPILER_VERSION_MINOR) +LIST(GET VERSION_LIST 2 KOKKOS_COMPILER_VERSION_PATCH) diff --git a/lib/kokkos/cmake/kokkos_corner_cases.cmake b/lib/kokkos/cmake/kokkos_corner_cases.cmake new file mode 100644 index 0000000000..c03c385faf --- /dev/null +++ b/lib/kokkos/cmake/kokkos_corner_cases.cmake @@ -0,0 +1,35 @@ +IF(KOKKOS_CXX_COMPILER_ID STREQUAL Clang AND KOKKOS_ENABLE_OPENMP) + # The clang "version" doesn't actually tell you what runtimes and tools + # were built into Clang. We should therefore make sure that libomp + # was actually built into Clang. Otherwise the user will get nonsensical + # errors when they try to build. + + #Try compile is the height of CMake nonsense + #I can't just give it compiler and link flags + #I have to hackily pretend that compiler flags are compiler definitions + #and that linker flags are libraries + #also - this is easier to use than CMakeCheckCXXSourceCompiles + TRY_COMPILE(CLANG_HAS_OMP + ${KOKKOS_TOP_BUILD_DIR}/corner_cases + ${KOKKOS_SOURCE_DIR}/cmake/compile_tests/clang_omp.cpp + COMPILE_DEFINITIONS -fopenmp=libomp + LINK_LIBRARIES -fopenmp=libomp + ) + IF (NOT CLANG_HAS_OMP) + UNSET(CLANG_HAS_OMP CACHE) #make sure CMake always re-runs this + MESSAGE(FATAL_ERROR "Clang failed OpenMP check. You have requested -DKokkos_ENABLE_OPENMP=ON, but the Clang compiler does not appear to have been built with OpenMP support") + ENDIF() + UNSET(CLANG_HAS_OMP CACHE) #make sure CMake always re-runs this +ENDIF() + + +IF (KOKKOS_CXX_STANDARD STREQUAL 17) + IF (KOKKOS_CXX_COMPILER_ID STREQUAL GNU AND KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 7) + MESSAGE(FATAL_ERROR "You have requested c++17 support for GCC ${KOKKOS_CXX_COMPILER_VERSION}. Although CMake has allowed this and GCC accepts -std=c++1z/c++17, GCC <= 6 does not properly support *this capture. Please reduce the C++ standard to 14 or upgrade the compiler if you do need 17 support") + ENDIF() + + IF (KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + MESSAGE(FATAL_ERROR "You have requested c++17 support for NVCC. Please reduce the C++ standard to 14. No versions of NVCC currently support 17.") + ENDIF() +ENDIF() + diff --git a/lib/kokkos/cmake/kokkos_enable_devices.cmake b/lib/kokkos/cmake/kokkos_enable_devices.cmake new file mode 100644 index 0000000000..ff09876673 --- /dev/null +++ b/lib/kokkos/cmake/kokkos_enable_devices.cmake @@ -0,0 +1,61 @@ + +FUNCTION(KOKKOS_DEVICE_OPTION SUFFIX DEFAULT DEV_TYPE DOCSTRING) + KOKKOS_OPTION(ENABLE_${SUFFIX} ${DEFAULT} BOOL ${DOCSTRING}) + STRING(TOUPPER ${SUFFIX} UC_NAME) + IF (KOKKOS_ENABLE_${UC_NAME}) + LIST(APPEND KOKKOS_ENABLED_DEVICES ${SUFFIX}) + #I hate that CMake makes me do this + SET(KOKKOS_ENABLED_DEVICES ${KOKKOS_ENABLED_DEVICES} PARENT_SCOPE) + ENDIF() + SET(KOKKOS_ENABLE_${UC_NAME} ${KOKKOS_ENABLE_${UC_NAME}} PARENT_SCOPE) + IF (KOKKOS_ENABLE_${UC_NAME} AND DEV_TYPE STREQUAL "HOST") + SET(KOKKOS_HAS_HOST ON PARENT_SCOPE) + ENDIF() +ENDFUNCTION() + +KOKKOS_CFG_DEPENDS(DEVICES NONE) + +# Put a check in just in case people are using this option +KOKKOS_DEPRECATED_LIST(DEVICES ENABLE) + + +KOKKOS_DEVICE_OPTION(PTHREAD OFF HOST "Whether to build Pthread backend") +IF (KOKKOS_ENABLE_PTHREAD) + #patch the naming here + SET(KOKKOS_ENABLE_THREADS ON) +ENDIF() + +IF(Trilinos_ENABLE_Kokkos AND Trilinos_ENABLE_OpenMP) + SET(OMP_DEFAULT ON) +ELSE() + SET(OMP_DEFAULT OFF) +ENDIF() +KOKKOS_DEVICE_OPTION(OPENMP ${OMP_DEFAULT} HOST "Whether to build OpenMP backend") + +IF(Trilinos_ENABLE_Kokkos AND TPL_ENABLE_CUDA) + SET(CUDA_DEFAULT ON) +ELSE() + SET(CUDA_DEFAULT OFF) +ENDIF() +KOKKOS_DEVICE_OPTION(CUDA ${CUDA_DEFAULT} DEVICE "Whether to build CUDA backend") + +IF (KOKKOS_ENABLE_CUDA) + GLOBAL_SET(KOKKOS_DONT_ALLOW_EXTENSIONS "CUDA enabled") +ENDIF() + +# We want this to default to OFF for cache reasons, but if no +# host space is given, then activate serial +IF (KOKKOS_HAS_TRILINOS) + #However, Trilinos always wants Serial ON + SET(SERIAL_DEFAULT ON) +ELSEIF (KOKKOS_HAS_HOST) + SET(SERIAL_DEFAULT OFF) +ELSE() + SET(SERIAL_DEFAULT ON) + IF (NOT DEFINED Kokkos_ENABLE_SERIAL) + MESSAGE(STATUS "SERIAL backend is being turned on to ensure there is at least one Host space. To change this, you must enable another host execution space and configure with -DKokkos_ENABLE_SERIAL=OFF or change CMakeCache.txt") + ENDIF() +ENDIF() +KOKKOS_DEVICE_OPTION(SERIAL ${SERIAL_DEFAULT} HOST "Whether to build serial backend") + +KOKKOS_DEVICE_OPTION(HPX OFF HOST "Whether to build HPX backend (experimental)") diff --git a/lib/kokkos/cmake/kokkos_enable_options.cmake b/lib/kokkos/cmake/kokkos_enable_options.cmake new file mode 100644 index 0000000000..c0e49482b6 --- /dev/null +++ b/lib/kokkos/cmake/kokkos_enable_options.cmake @@ -0,0 +1,92 @@ +########################## NOTES ############################################### +# List the options for configuring kokkos using CMake method of doing it. +# These options then get mapped onto KOKKOS_SETTINGS environment variable by +# kokkos_settings.cmake. It is separate to allow other packages to override +# these variables (e.g., TriBITS). + +########################## AVAILABLE OPTIONS ################################### +# Use lists for documentation, verification, and programming convenience + + +FUNCTION(KOKKOS_ENABLE_OPTION SUFFIX DEFAULT DOCSTRING) + KOKKOS_OPTION(ENABLE_${SUFFIX} ${DEFAULT} BOOL ${DOCSTRING}) + STRING(TOUPPER ${SUFFIX} UC_NAME) + IF (KOKKOS_ENABLE_${UC_NAME}) + LIST(APPEND KOKKOS_ENABLED_OPTIONS ${UC_NAME}) + #I hate that CMake makes me do this + SET(KOKKOS_ENABLED_OPTIONS ${KOKKOS_ENABLED_OPTIONS} PARENT_SCOPE) + ENDIF() + SET(KOKKOS_ENABLE_${UC_NAME} ${KOKKOS_ENABLE_${UC_NAME}} PARENT_SCOPE) +ENDFUNCTION() + +# Certain defaults will depend on knowing the enabled devices +KOKKOS_CFG_DEPENDS(OPTIONS DEVICES) + +# Put a check in just in case people are using this option +KOKKOS_DEPRECATED_LIST(OPTIONS ENABLE) + +KOKKOS_ENABLE_OPTION(CUDA_RELOCATABLE_DEVICE_CODE OFF "Whether to enable relocatable device code (RDC) for CUDA") +KOKKOS_ENABLE_OPTION(CUDA_UVM OFF "Whether to use unified memory (UM) for CUDA by default") +KOKKOS_ENABLE_OPTION(CUDA_LDG_INTRINSIC OFF "Whether to use CUDA LDG intrinsics") +KOKKOS_ENABLE_OPTION(HPX_ASYNC_DISPATCH OFF "Whether HPX supports asynchronous dispatch") +KOKKOS_ENABLE_OPTION(TESTS OFF "Whether to build the unit tests") +STRING(TOUPPER "${CMAKE_BUILD_TYPE}" UPPERCASE_CMAKE_BUILD_TYPE) +IF(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL "DEBUG") + KOKKOS_ENABLE_OPTION(DEBUG ON "Whether to activate extra debug features - may increase compile times") + KOKKOS_ENABLE_OPTION(DEBUG_DUALVIEW_MODIFY_CHECK ON "Debug check on dual views") +ELSE() + KOKKOS_ENABLE_OPTION(DEBUG OFF "Whether to activate extra debug features - may increase compile times") + KOKKOS_ENABLE_OPTION(DEBUG_DUALVIEW_MODIFY_CHECK OFF "Debug check on dual views") +ENDIF() +UNSET(_UPPERCASE_CMAKE_BUILD_TYPE) +KOKKOS_ENABLE_OPTION(LARGE_MEM_TESTS OFF "Whether to perform extra large memory tests") +KOKKOS_ENABLE_OPTION(DEBUG_BOUNDS_CHECK OFF "Whether to use bounds checking - will increase runtime") +KOKKOS_ENABLE_OPTION(COMPILER_WARNINGS OFF "Whether to print all compiler warnings") +KOKKOS_ENABLE_OPTION(PROFILING ON "Whether to create bindings for profiling tools") +KOKKOS_ENABLE_OPTION(PROFILING_LOAD_PRINT OFF "Whether to print information about which profiling tools got loaded") +KOKKOS_ENABLE_OPTION(AGGRESSIVE_VECTORIZATION OFF "Whether to aggressively vectorize loops") +KOKKOS_ENABLE_OPTION(DEPRECATED_CODE OFF "Whether to enable deprecated code") + +IF (KOKKOS_ENABLE_CUDA) + SET(KOKKOS_COMPILER_CUDA_VERSION "${KOKKOS_COMPILER_VERSION_MAJOR}${KOKKOS_COMPILER_VERSION_MINOR}") +ENDIF() + +IF (Trilinos_ENABLE_Kokkos AND TPL_ENABLE_CUDA AND DEFINED KOKKOS_COMPILER_CUDA_VERSION AND KOKKOS_COMPILER_CUDA_VERSION GREATER 70) + SET(LAMBDA_DEFAULT ON) +ELSE() + SET(LAMBDA_DEFAULT OFF) +ENDIF() +KOKKOS_ENABLE_OPTION(CUDA_LAMBDA ${LAMBDA_DEFAULT} "Whether to activate experimental lambda features") +IF (Trilinos_ENABLE_Kokkos) + SET(COMPLEX_ALIGN_DEFAULT OFF) +ELSE() + SET(COMPLEX_ALIGN_DEFAULT ON) +ENDIF() +KOKKOS_ENABLE_OPTION(COMPLEX_ALIGN ${COMPLEX_ALIGN_DEFAULT} "Whether to align Kokkos::complex to 2*alignof(RealType)") + +KOKKOS_ENABLE_OPTION(CUDA_CONSTEXPR OFF "Whether to activate experimental relaxed constexpr functions") + +FUNCTION(check_device_specific_options) + CMAKE_PARSE_ARGUMENTS(SOME "" "DEVICE" "OPTIONS" ${ARGN}) + IF(NOT KOKKOS_ENABLE_${SOME_DEVICE}) + FOREACH(OPTION ${SOME_OPTIONS}) + IF(CMAKE_VERSION VERSION_GREATER_EQUAL 3.14) + IF(NOT DEFINED CACHE{Kokkos_ENABLE_${OPTION}} OR NOT DEFINED CACHE{Kokkos_ENABLE_${SOME_DEVICE}}) + MESSAGE(FATAL_ERROR "Internal logic error: option '${OPTION}' or device '${SOME_DEVICE}' not recognized.") + ENDIF() + ENDIF() + IF(KOKKOS_ENABLE_${OPTION}) + MESSAGE(WARNING "Kokkos_ENABLE_${OPTION} is ON but ${SOME_DEVICE} backend is not enabled. Option will be ignored.") + UNSET(KOKKOS_ENABLE_${OPTION} PARENT_SCOPE) + ENDIF() + ENDFOREACH() + ENDIF() +ENDFUNCTION() + +CHECK_DEVICE_SPECIFIC_OPTIONS(DEVICE CUDA OPTIONS CUDA_UVM CUDA_RELOCATABLE_DEVICE_CODE CUDA_LAMBDA CUDA_CONSTEXPR CUDA_LDG_INTRINSIC) +CHECK_DEVICE_SPECIFIC_OPTIONS(DEVICE HPX OPTIONS HPX_ASYNC_DISPATCH) + +# Needed due to change from deprecated name to new header define name +IF (KOKKOS_ENABLE_AGGRESSIVE_VECTORIZATION) + SET(KOKKOS_OPT_RANGE_AGGRESSIVE_VECTORIZATION ON) +ENDIF() diff --git a/lib/kokkos/cmake/kokkos_functions.cmake b/lib/kokkos/cmake/kokkos_functions.cmake index 616618753b..3644c48ddd 100644 --- a/lib/kokkos/cmake/kokkos_functions.cmake +++ b/lib/kokkos/cmake/kokkos_functions.cmake @@ -1,345 +1,700 @@ ################################### FUNCTIONS ################################## # List of functions -# set_kokkos_cxx_compiler -# set_kokkos_cxx_standard -# set_kokkos_srcs +# kokkos_option -#------------------------------------------------------------------------------- -# function(set_kokkos_cxx_compiler) -# Sets the following compiler variables that are analogous to the CMAKE_* -# versions. We add the ability to detect NVCC (really nvcc_wrapper). -# KOKKOS_CXX_COMPILER -# KOKKOS_CXX_COMPILER_ID -# KOKKOS_CXX_COMPILER_VERSION -# -# Inputs: -# KOKKOS_ENABLE_CUDA -# CMAKE_CXX_COMPILER -# CMAKE_CXX_COMPILER_ID -# CMAKE_CXX_COMPILER_VERSION -# -# Also verifies the compiler version meets the minimum required by Kokkos. -function(set_kokkos_cxx_compiler) - # Since CMake doesn't recognize the nvcc compiler until 3.8, we use our own - # version of the CMake variables and detect nvcc ourselves. Initially set to - # the CMake variable values. - set(INTERNAL_CXX_COMPILER ${CMAKE_CXX_COMPILER}) - set(INTERNAL_CXX_COMPILER_ID ${CMAKE_CXX_COMPILER_ID}) - set(INTERNAL_CXX_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}) +# Validate options are given with correct case and define an internal +# upper-case version for use within - # Check if the compiler is nvcc (which really means nvcc_wrapper). - execute_process(COMMAND ${INTERNAL_CXX_COMPILER} --version - COMMAND grep nvcc - COMMAND wc -l - OUTPUT_VARIABLE INTERNAL_HAVE_COMPILER_NVCC - OUTPUT_STRIP_TRAILING_WHITESPACE) - - string(REGEX REPLACE "^ +" "" - INTERNAL_HAVE_COMPILER_NVCC ${INTERNAL_HAVE_COMPILER_NVCC}) - - if(INTERNAL_HAVE_COMPILER_NVCC) - # Set the compiler id to nvcc. We use the value used by CMake 3.8. - set(INTERNAL_CXX_COMPILER_ID NVIDIA) - - # Set nvcc's compiler version. - execute_process(COMMAND ${INTERNAL_CXX_COMPILER} --version - COMMAND grep release - OUTPUT_VARIABLE INTERNAL_CXX_COMPILER_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE) - - string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+$" - INTERNAL_CXX_COMPILER_VERSION ${INTERNAL_CXX_COMPILER_VERSION}) - endif() - - # Enforce the minimum compilers supported by Kokkos. - set(KOKKOS_MESSAGE_TEXT "Compiler not supported by Kokkos. Required compiler versions:") - set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n Clang 3.5.2 or higher") - set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n GCC 4.8.4 or higher") - set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n Intel 15.0.2 or higher") - set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n NVCC 7.0.28 or higher") - set(KOKKOS_MESSAGE_TEXT "${KOKKOS_MESSAGE_TEXT}\n PGI 17.1 or higher\n") - - if(INTERNAL_CXX_COMPILER_ID STREQUAL Clang) - if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 3.5.2) - message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") - endif() - elseif(INTERNAL_CXX_COMPILER_ID STREQUAL GNU) - if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 4.8.4) - message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") - endif() - elseif(INTERNAL_CXX_COMPILER_ID STREQUAL Intel) - if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 15.0.2) - message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") - endif() - elseif(INTERNAL_CXX_COMPILER_ID STREQUAL NVIDIA) - if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 7.0.28) - message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") - endif() - elseif(INTERNAL_CXX_COMPILER_ID STREQUAL PGI) - if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 17.1) - message(FATAL_ERROR "${KOKKOS_MESSAGE_TEXT}") - endif() - endif() - - # Enforce that extensions are turned off for nvcc_wrapper. - if(INTERNAL_CXX_COMPILER_ID STREQUAL NVIDIA) - if(DEFINED CMAKE_CXX_EXTENSIONS AND CMAKE_CXX_EXTENSIONS STREQUAL ON) - message(FATAL_ERROR "NVCC doesn't support C++ extensions. Set CMAKE_CXX_EXTENSIONS to OFF in your CMakeLists.txt.") - endif() - endif() - - if(KOKKOS_ENABLE_CUDA) - # Enforce that the compiler can compile CUDA code. - if(INTERNAL_CXX_COMPILER_ID STREQUAL Clang) - if(INTERNAL_CXX_COMPILER_VERSION VERSION_LESS 4.0.0) - message(FATAL_ERROR "Compiling CUDA code directly with Clang requires version 4.0.0 or higher.") - endif() - elseif(NOT INTERNAL_CXX_COMPILER_ID STREQUAL NVIDIA) - message(FATAL_ERROR "Invalid compiler for CUDA. The compiler must be nvcc_wrapper or Clang, but compiler ID was ${INTERNAL_CXX_COMPILER_ID}") - endif() - endif() - - set(KOKKOS_CXX_COMPILER ${INTERNAL_CXX_COMPILER} PARENT_SCOPE) - set(KOKKOS_CXX_COMPILER_ID ${INTERNAL_CXX_COMPILER_ID} PARENT_SCOPE) - set(KOKKOS_CXX_COMPILER_VERSION ${INTERNAL_CXX_COMPILER_VERSION} PARENT_SCOPE) -endfunction() - -#------------------------------------------------------------------------------- -# function(set_kokkos_cxx_standard) -# Transitively enforces that the appropriate CXX standard compile flags (C++11 -# or above) are added to targets that use the Kokkos library. Compile features -# are used if possible. Otherwise, the appropriate flags are added to -# KOKKOS_CXX_FLAGS. Values set by the user to CMAKE_CXX_STANDARD and -# CMAKE_CXX_EXTENSIONS are honored. -# -# Outputs: -# KOKKOS_CXX11_FEATURES -# KOKKOS_CXX_FLAGS -# -# Inputs: -# KOKKOS_CXX_COMPILER -# KOKKOS_CXX_COMPILER_ID -# KOKKOS_CXX_COMPILER_VERSION -# -function(set_kokkos_cxx_standard) - # The following table lists the versions of CMake that supports CXX_STANDARD - # and the CXX compile features for different compilers. The versions are - # based on CMake documentation, looking at CMake code, and verifying by - # testing with specific CMake versions. - # - # COMPILER CXX_STANDARD Compile Features - # --------------------------------------------------------------- - # Clang 3.1 3.1 - # GNU 3.1 3.2 - # AppleClang 3.2 3.2 - # Intel 3.6 3.6 - # Cray No No - # PGI No No - # XL No No - # - # For compiling CUDA code using nvcc_wrapper, we will use the host compiler's - # flags for turning on C++11. Since for compiler ID and versioning purposes - # CMake recognizes the host compiler when calling nvcc_wrapper, this just - # works. Both NVCC and nvcc_wrapper only recognize '-std=c++11' which means - # that we can only use host compilers for CUDA builds that use those flags. - # It also means that extensions (gnu++11) can't be turned on for CUDA builds. - - # Check if we can use compile features. - if(NOT KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) - if(CMAKE_CXX_COMPILER_ID STREQUAL Clang) - if(NOT CMAKE_VERSION VERSION_LESS 3.1) - set(INTERNAL_USE_COMPILE_FEATURES ON) - endif() - elseif(CMAKE_CXX_COMPILER_ID STREQUAL AppleClang OR CMAKE_CXX_COMPILER_ID STREQUAL GNU) - if(NOT CMAKE_VERSION VERSION_LESS 3.2) - set(INTERNAL_USE_COMPILE_FEATURES ON) - endif() - elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel) - if(NOT CMAKE_VERSION VERSION_LESS 3.6) - set(INTERNAL_USE_COMPILE_FEATURES ON) - endif() - endif() - endif() - - if(INTERNAL_USE_COMPILE_FEATURES) - # Use the compile features aspect of CMake to transitively cause C++ flags - # to populate to user code. - - # I'm using a hack by requiring features that I know force the lowest version - # of the compilers we want to support. Clang 3.3 and later support all of - # the C++11 standard. With CMake 3.8 and higher, we could switch to using - # cxx_std_11. - set(KOKKOS_CXX11_FEATURES - cxx_nonstatic_member_init # Forces GCC 4.7 or later and Intel 14.0 or later. - PARENT_SCOPE - ) - else() - # CXX compile features are not yet implemented for this combination of - # compiler and version of CMake. - - if(CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) - # Versions of CMAKE before 3.2 don't support CXX_STANDARD or C++ compile - # features for the AppleClang compiler. Set compiler flags transitively - # here such that they trickle down to a call to target_compile_options(). - - # The following two blocks of code were copied from - # /Modules/Compiler/AppleClang-CXX.cmake from CMake 3.7.2 and then - # modified. - if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) - set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") - set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") - endif() - - if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1) - set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "-std=c++14") - set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14") - elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) - # AppleClang 5.0 knows this flag, but does not set a __cplusplus macro - # greater than 201103L. - set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y") - set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") - endif() - elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel) - # Versions of CMAKE before 3.6 don't support CXX_STANDARD or C++ compile - # features for the Intel compiler. Set compiler flags transitively here - # such that they trickle down to a call to target_compile_options(). - - # The following three blocks of code were copied from - # /Modules/Compiler/Intel-CXX.cmake from CMake 3.7.2 and then modified. - if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") - set(_std -Qstd) - set(_ext c++) - else() - set(_std -std) - set(_ext gnu++) - endif() - - if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2) - set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "${_std}=c++14") - # TODO: There is no gnu++14 value supported; figure out what to do. - set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "${_std}=c++14") - elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.0) - set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "${_std}=c++1y") - # TODO: There is no gnu++14 value supported; figure out what to do. - set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "${_std}=c++1y") - endif() - - if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0) - set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++11") - set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}11") - elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) - set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "${_std}=c++0x") - set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "${_std}=${_ext}0x") - endif() - elseif(CMAKE_CXX_COMPILER_ID STREQUAL Cray) - # CMAKE doesn't support CXX_STANDARD or C++ compile features for the Cray - # compiler. Set compiler options transitively here such that they trickle - # down to a call to target_compile_options(). - set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "-hstd=c++11") - set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "-hstd=c++11") - set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "-hstd=c++11") - set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "-hstd=c++11") - elseif(CMAKE_CXX_COMPILER_ID STREQUAL PGI) - # CMAKE doesn't support CXX_STANDARD or C++ compile features for the PGI - # compiler. Set compiler options transitively here such that they trickle - # down to a call to target_compile_options(). - set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "--c++11") - set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "--c++11") - set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "--c++11") - set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "--c++11") - elseif(CMAKE_CXX_COMPILER_ID STREQUAL XL) - # CMAKE doesn't support CXX_STANDARD or C++ compile features for the XL - # compiler. Set compiler options transitively here such that they trickle - # down to a call to target_compile_options(). - set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") - set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION "-std=c++11") - set(INTERNAL_CXX14_STANDARD_COMPILE_OPTION "-std=c++11") - set(INTERNAL_CXX14_EXTENSION_COMPILE_OPTION "-std=c++11") - else() - # Assume GNU. CMAKE_CXX_STANDARD is handled correctly by CMake 3.1 and - # above for this compiler. If the user explicitly requests a C++ - # standard, CMake takes care of it. If not, transitively require C++11. - if(NOT CMAKE_CXX_STANDARD) - set(INTERNAL_CXX11_STANDARD_COMPILE_OPTION ${CMAKE_CXX11_STANDARD_COMPILE_OPTION}) - set(INTERNAL_CXX11_EXTENSION_COMPILE_OPTION ${CMAKE_CXX11_EXTENSION_COMPILE_OPTION}) - endif() - endif() - - # Set the C++ standard info for Kokkos respecting user set values for - # CMAKE_CXX_STANDARD and CMAKE_CXX_EXTENSIONS. - # Only use cxx extension if explicitly requested - if(CMAKE_CXX_STANDARD EQUAL 14) - if(DEFINED CMAKE_CXX_EXTENSIONS AND CMAKE_CXX_EXTENSIONS STREQUAL ON) - set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX14_EXTENSION_COMPILE_OPTION}) - else() - set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX14_STANDARD_COMPILE_OPTION}) - endif() - elseif(CMAKE_CXX_STANDARD EQUAL 11) - if(DEFINED CMAKE_CXX_EXTENSIONS AND CMAKE_CXX_EXTENSIONS STREQUAL ON) - set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX11_EXTENSION_COMPILE_OPTION}) - else() - set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX11_STANDARD_COMPILE_OPTION}) - endif() - else() - # The user didn't explicitly request a standard, transitively require - # C++11 respecting CMAKE_CXX_EXTENSIONS. - if(DEFINED CMAKE_CXX_EXTENSIONS AND CMAKE_CXX_EXTENSIONS STREQUAL ON) - set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX11_EXTENSION_COMPILE_OPTION}) - else() - set(INTERNAL_CXX_FLAGS ${INTERNAL_CXX11_STANDARD_COMPILE_OPTION}) - endif() - endif() - - set(KOKKOS_CXX_FLAGS ${INTERNAL_CXX_FLAGS} PARENT_SCOPE) - endif() -endfunction() - - -#------------------------------------------------------------------------------- -# function(set_kokkos_sources) -# Takes a list of sources for kokkos (e.g., KOKKOS_SRC from Makefile.kokkos and -# put it into kokkos_generated_settings.cmake) and sorts the files into the subpackages or -# separate_libraries. This is core and containers (algorithms is pure header -# files). -# -# Inputs: -# KOKKOS_SRC # -# Outputs: -# KOKKOS_CORE_SRCS -# KOKKOS_CONTAINERS_SRCS # -function(set_kokkos_srcs) - set(opts ) # no-value args - set(oneValArgs ) - set(multValArgs KOKKOS_SRC) # e.g., lists - cmake_parse_arguments(IN "${opts}" "${oneValArgs}" "${multValArgs}" ${ARGN}) +# @FUNCTION: kokkos_deprecated_list +# +# Function that checks if a deprecated list option like Kokkos_ARCH was given. +# This prints an error and prevents configure from completing. +# It attempts to print a helpful message about updating the options for the new CMake. +# Kokkos_${SUFFIX} is the name of the option (like Kokkos_ARCH) being checked. +# Kokkos_${PREFIX}_X is the name of new option to be defined from a list X,Y,Z,... +FUNCTION(kokkos_deprecated_list SUFFIX PREFIX) + SET(CAMEL_NAME Kokkos_${SUFFIX}) + STRING(TOUPPER ${CAMEL_NAME} UC_NAME) - foreach(sfile ${IN_KOKKOS_SRC}) - string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" stripfile "${sfile}") - string(REPLACE "/" ";" striplist "${stripfile}") - list(GET striplist 0 firstdir) - if(${firstdir} STREQUAL "core") - list(APPEND KOKKOS_CORE_SRCS ${sfile}) - else() - list(APPEND KOKKOS_CONTAINERS_SRCS ${sfile}) - endif() - endforeach() - set(KOKKOS_CORE_SRCS ${KOKKOS_CORE_SRCS} PARENT_SCOPE) - set(KOKKOS_CONTAINERS_SRCS ${KOKKOS_CONTAINERS_SRCS} PARENT_SCOPE) - return() -endfunction() + #I don't love doing it this way but better to be safe + FOREACH(opt ${KOKKOS_GIVEN_VARIABLES}) + STRING(TOUPPER ${opt} OPT_UC) + IF ("${OPT_UC}" STREQUAL "${UC_NAME}") + STRING(REPLACE "," ";" optlist "${${opt}}") + SET(ERROR_MSG "Given deprecated option list ${opt}. This must now be given as separate -D options, which assuming you spelled options correctly would be:") + FOREACH(entry ${optlist}) + STRING(TOUPPER ${entry} ENTRY_UC) + STRING(APPEND ERROR_MSG "\n -DKokkos_${PREFIX}_${ENTRY_UC}=ON") + ENDFOREACH() + STRING(APPEND ERROR_MSG "\nRemove CMakeCache.txt and re-run. For a list of valid options, refer to BUILD.md or even look at CMakeCache.txt (before deleting it).") + IF (KOKKOS_HAS_TRILINOS) + MESSAGE(WARNING ${ERROR_MSG}) + FOREACH(entry ${optlist}) + STRING(TOUPPER ${entry} ENTRY_UC) + SET(${CAMEL_NAME}_${ENTRY_UC} ON CACHE BOOL "Deprecated Trilinos translation") + ENDFOREACH() + UNSET(${opt} CACHE) + ELSE() + MESSAGE(SEND_ERROR ${ERROR_MSG}) + ENDIF() + ENDIF() + ENDFOREACH() +ENDFUNCTION() -# Setting a default value if it is not already set -macro(set_kokkos_default_default VARIABLE DEFAULT) - IF( "${KOKKOS_INTERNAL_ENABLE_${VARIABLE}_DEFAULT}" STREQUAL "" ) - IF( "${KOKKOS_ENABLE_${VARIABLE}}" STREQUAL "" ) - set(KOKKOS_INTERNAL_ENABLE_${VARIABLE}_DEFAULT ${DEFAULT}) - # MESSAGE(WARNING "Set: KOKKOS_INTERNAL_ENABLE_${VARIABLE}_DEFAULT to ${KOKKOS_INTERNAL_ENABLE_${VARIABLE}_DEFAULT}") +FUNCTION(kokkos_option CAMEL_SUFFIX DEFAULT TYPE DOCSTRING) + SET(CAMEL_NAME Kokkos_${CAMEL_SUFFIX}) + STRING(TOUPPER ${CAMEL_NAME} UC_NAME) + + # Make sure this appears in the cache with the appropriate DOCSTRING + SET(${CAMEL_NAME} ${DEFAULT} CACHE ${TYPE} ${DOCSTRING}) + + #I don't love doing it this way because it's N^2 in number options, but cest la vie + FOREACH(opt ${KOKKOS_GIVEN_VARIABLES}) + STRING(TOUPPER ${opt} OPT_UC) + IF ("${OPT_UC}" STREQUAL "${UC_NAME}") + IF (NOT "${opt}" STREQUAL "${CAMEL_NAME}") + IF (KOKKOS_HAS_TRILINOS) + #Allow this for now if Trilinos... we need to bootstrap our way to integration + MESSAGE(WARNING "Deprecated option ${opt} found - please change spelling to ${CAMEL_NAME}") + SET(${CAMEL_NAME} "${${opt}}" CACHE ${TYPE} ${DOCSTRING} FORCE) + UNSET(${opt} CACHE) + ELSE() + MESSAGE(FATAL_ERROR "Matching option found for ${CAMEL_NAME} with the wrong case ${opt}. Please delete your CMakeCache.txt and change option to -D${CAMEL_NAME}=${${opt}}. This is now enforced to avoid hard-to-debug CMake cache inconsistencies.") + ENDIF() + ENDIF() + ENDIF() + ENDFOREACH() + + #okay, great, we passed the validation test - use the default + IF (DEFINED ${CAMEL_NAME}) + SET(${UC_NAME} ${${CAMEL_NAME}} PARENT_SCOPE) + ELSE() + SET(${UC_NAME} ${DEFAULT} PARENT_SCOPE) + ENDIF() + +ENDFUNCTION() + +FUNCTION(kokkos_append_config_line LINE) + GLOBAL_APPEND(KOKKOS_TPL_EXPORTS "${LINE}") +ENDFUNCTION() + +MACRO(kokkos_export_cmake_tpl NAME) + #CMake TPLs are located with a call to find_package + #find_package locates XConfig.cmake files through + #X_DIR or X_ROOT variables set prior to calling find_package + + #If Kokkos was configured to find the TPL through a _DIR variable + #make sure thar DIR variable is available to downstream packages + IF (DEFINED ${NAME}_DIR) + #The downstream project may override the TPL location that Kokkos used + #Check if the downstream project chose its own TPL location + #If not, make the Kokkos found location available + KOKKOS_APPEND_CONFIG_LINE("IF(NOT DEFINED ${NAME}_DIR)") + KOKKOS_APPEND_CONFIG_LINE(" SET(${NAME}_DIR ${${NAME}_DIR})") + KOKKOS_APPEND_CONFIG_LINE("ENDIF()") + ENDIF() + + IF (DEFINED ${NAME}_ROOT) + #The downstream project may override the TPL location that Kokkos used + #Check if the downstream project chose its own TPL location + #If not, make the Kokkos found location available + KOKKOS_APPEND_CONFIG_LINE("IF(NOT DEFINED ${NAME}_ROOT)") + KOKKOS_APPEND_CONFIG_LINE(" SET(${NAME}_ROOT ${${NAME}_ROOT})") + KOKKOS_APPEND_CONFIG_LINE("ENDIF()") + ENDIF() + KOKKOS_APPEND_CONFIG_LINE("FIND_DEPENDENCY(${NAME})") +ENDMACRO() + +MACRO(kokkos_export_imported_tpl NAME) + IF (NOT KOKKOS_HAS_TRILINOS) + GET_TARGET_PROPERTY(LIB_TYPE ${NAME} TYPE) + IF (${LIB_TYPE} STREQUAL "INTERFACE_LIBRARY") + # This is not an imported target + # This an interface library that we created + INSTALL( + TARGETS ${NAME} + EXPORT KokkosTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) ELSE() - set(KOKKOS_INTERNAL_ENABLE_${VARIABLE}_DEFAULT ${KOKKOS_ENABLE_${VARIABLE}}) - # MESSAGE(WARNING "Set: KOKKOS_INTERNAL_ENABLE_${VARIABLE}_DEFAULT to ${KOKKOS_INTERNAL_ENABLE_${VARIABLE}_DEFAULT}") + #make sure this also gets "exported" in the config file + KOKKOS_APPEND_CONFIG_LINE("IF(NOT TARGET ${NAME})") + KOKKOS_APPEND_CONFIG_LINE("ADD_LIBRARY(${NAME} UNKNOWN IMPORTED)") + KOKKOS_APPEND_CONFIG_LINE("SET_TARGET_PROPERTIES(${NAME} PROPERTIES") + + GET_TARGET_PROPERTY(TPL_LIBRARY ${NAME} IMPORTED_LOCATION) + IF(TPL_LIBRARY) + KOKKOS_APPEND_CONFIG_LINE("IMPORTED_LOCATION ${TPL_LIBRARY}") + ENDIF() + + GET_TARGET_PROPERTY(TPL_INCLUDES ${NAME} INTERFACE_INCLUDE_DIRECTORIES) + IF(TPL_INCLUDES) + KOKKOS_APPEND_CONFIG_LINE("INTERFACE_INCLUDE_DIRECTORIES ${TPL_INCLUDES}") + ENDIF() + + GET_TARGET_PROPERTY(TPL_COMPILE_OPTIONS ${NAME} INTERFACE_COMPILE_OPTIONS) + IF(TPL_COMPILE_OPTIONS) + KOKKOS_APPEND_CONFIG_LINE("INTERFACE_COMPILE_OPTIONS ${TPL_COMPILE_OPTIONS}") + ENDIF() + + SET(TPL_LINK_OPTIONS) + IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0") + GET_TARGET_PROPERTY(TPL_LINK_OPTIONS ${NAME} INTERFACE_LINK_OPTIONS) + ENDIF() + IF(TPL_LINK_OPTIONS) + KOKKOS_APPEND_CONFIG_LINE("INTERFACE_LINK_OPTIONS ${TPL_LINK_OPTIONS}") + ENDIF() + + GET_TARGET_PROPERTY(TPL_LINK_LIBRARIES ${NAME} INTERFACE_LINK_LIBRARIES) + IF(TPL_LINK_LIBRARIES) + KOKKOS_APPEND_CONFIG_LINE("INTERFACE_LINK_LIBRARIES ${TPL_LINK_LIBRARIES}") + ENDIF() + KOKKOS_APPEND_CONFIG_LINE(")") + KOKKOS_APPEND_CONFIG_LINE("ENDIF()") ENDIF() ENDIF() - UNSET(KOKKOS_ENABLE_${VARIABLE} CACHE) -endmacro() +ENDMACRO() + + +# +# @MACRO: KOKKOS_IMPORT_TPL() +# +# Function that checks if a third-party library (TPL) has been enabled and calls `find_package` +# to create an imported target encapsulating all the flags and libraries +# needed to use the TPL +# +# Usage:: +# +# KOKKOS_IMPORT_TPL( +# +# NO_EXPORT +# INTERFACE +# +# ``NO_EXPORT`` +# +# If specified, this TPL will not be added to KokkosConfig.cmake as an export +# +# ``INTERFACE`` +# +# If specified, this TPL will build an INTERFACE library rather than an +# IMPORTED target +MACRO(kokkos_import_tpl NAME) + CMAKE_PARSE_ARGUMENTS(TPL + "NO_EXPORT;INTERFACE" + "" + "" + ${ARGN}) + IF (TPL_INTERFACE) + SET(TPL_IMPORTED_NAME ${NAME}) + ELSE() + SET(TPL_IMPORTED_NAME Kokkos::${NAME}) + ENDIF() + + # Even though this policy gets set in the top-level CMakeLists.txt, + # I have still been getting errors about ROOT variables being ignored + # I'm not sure if this is a scope issue - but make sure + # the policy is set before we do any find_package calls + IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0") + CMAKE_POLICY(SET CMP0074 NEW) + ENDIF() + + IF (KOKKOS_ENABLE_${NAME}) + #Tack on a TPL here to make sure we avoid using anyone else's find + FIND_PACKAGE(TPL${NAME} REQUIRED MODULE) + IF(NOT TARGET ${TPL_IMPORTED_NAME}) + MESSAGE(FATAL_ERROR "Find module succeeded for ${NAME}, but did not produce valid target ${TPL_IMPORTED_NAME}") + ENDIF() + IF(NOT TPL_NO_EXPORT) + KOKKOS_EXPORT_IMPORTED_TPL(${TPL_IMPORTED_NAME}) + ENDIF() + LIST(APPEND KOKKOS_ENABLED_TPLS ${NAME}) + ENDIF() +ENDMACRO(kokkos_import_tpl) + +MACRO(kokkos_import_cmake_tpl MODULE_NAME) + kokkos_import_tpl(${MODULE_NAME} ${ARGN} NO_EXPORT) + CMAKE_PARSE_ARGUMENTS(TPL + "NO_EXPORT" + "OPTION_NAME" + "" + ${ARGN}) + + IF (NOT TPL_OPTION_NAME) + SET(TPL_OPTION_NAME ${MODULE_NAME}) + ENDIF() + + IF (NOT TPL_NO_EXPORT) + KOKKOS_EXPORT_CMAKE_TPL(${MODULE_NAME}) + ENDIF() +ENDMACRO() + +# +# @MACRO: KOKKOS_CREATE_IMPORTED_TPL() +# +# Function that creates an imported target encapsulating all the flags +# and libraries needed to use the TPL +# +# Usage:: +# +# KOKKOS_CREATE_IMPORTED_TPL( +# +# INTERFACE +# LIBRARY +# LINK_LIBRARIES ... +# COMPILE_OPTIONS ... +# LINK_OPTIONS ... +# +# ``INTERFACE`` +# +# If specified, this TPL will build an INTERFACE library rather than an +# IMPORTED target +# +# ``LIBRARY `` +# +# If specified, this gives the IMPORTED_LOCATION of the library. +# +# ``LINK_LIBRARIES ...`` +# +# If specified, this gives a list of dependent libraries that also +# need to be linked against. Each entry can be a library path or +# the name of a valid CMake target. +# +# ``INCLUDES ...`` +# +# If specified, this gives a list of directories that must be added +# to the include path for using this library. +# +# ``COMPILE_OPTIONS ...`` +# +# If specified, this gives a list of compiler flags that must be used +# for using this library. +# +# ``LINK_OPTIONS ...`` +# +# If specified, this gives a list of linker flags that must be used +# for using this library. +MACRO(kokkos_create_imported_tpl NAME) + CMAKE_PARSE_ARGUMENTS(TPL + "INTERFACE" + "LIBRARY" + "LINK_LIBRARIES;INCLUDES;COMPILE_OPTIONS;LINK_OPTIONS" + ${ARGN}) + + + IF (KOKKOS_HAS_TRILINOS) + #TODO: we need to set a bunch of cache variables here + ELSEIF (TPL_INTERFACE) + ADD_LIBRARY(${NAME} INTERFACE) + #Give this an importy-looking name + ADD_LIBRARY(Kokkos::${NAME} ALIAS ${NAME}) + IF (TPL_LIBRARY) + MESSAGE(SEND_ERROR "TPL Interface library ${NAME} should not have an IMPORTED_LOCATION") + ENDIF() + #Things have to go in quoted in case we have multiple list entries + IF(TPL_LINK_LIBRARIES) + TARGET_LINK_LIBRARIES(${NAME} INTERFACE ${TPL_LINK_LIBRARIES}) + ENDIF() + IF(TPL_INCLUDES) + TARGET_INCLUDE_DIRECTORIES(${NAME} INTERFACE ${TPL_INCLUDES}) + ENDIF() + IF(TPL_COMPILE_OPTIONS) + TARGET_COMPILE_OPTIONS(${NAME} INTERFACE ${TPL_COMPILE_OPTIONS}) + ENDIF() + IF(TPL_LINK_OPTIONS) + TARGET_LINK_LIBRARIES(${NAME} INTERFACE ${TPL_LINK_OPTIONS}) + ENDIF() + ELSE() + ADD_LIBRARY(${NAME} UNKNOWN IMPORTED) + IF(TPL_LIBRARY) + SET_TARGET_PROPERTIES(${NAME} PROPERTIES + IMPORTED_LOCATION ${TPL_LIBRARY}) + ENDIF() + #Things have to go in quoted in case we have multiple list entries + IF(TPL_LINK_LIBRARIES) + SET_TARGET_PROPERTIES(${NAME} PROPERTIES + INTERFACE_LINK_LIBRARIES "${TPL_LINK_LIBRARIES}") + ENDIF() + IF(TPL_INCLUDES) + SET_TARGET_PROPERTIES(${NAME} PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${TPL_INCLUDES}") + ENDIF() + IF(TPL_COMPILE_OPTIONS) + SET_TARGET_PROPERTIES(${NAME} PROPERTIES + INTERFACE_COMPILE_OPTIONS "${TPL_COMPILE_OPTIONS}") + ENDIF() + IF(TPL_LINK_OPTIONS) + SET_TARGET_PROPERTIES(${NAME} PROPERTIES + INTERFACE_LINK_LIBRARIES "${TPL_LINK_OPTIONS}") + ENDIF() + ENDIF() +ENDMACRO() + +# +# @MACRO: KOKKOS_FIND_HEADER +# +# Function that finds a particular header. This searches custom paths +# or default system paths depending on options. In constrast to CMake +# default, custom paths are prioritized over system paths. The searched +# order is: +# 1. _ROOT variable +# 2. Kokkos__DIR variable +# 3. Locations in the PATHS option +# 4. Default system paths, if allowed. +# +# Default system paths are allowed if none of options (1)-(3) are specified +# or if default paths are specifically allowed via ALLOW_SYSTEM_PATH_FALLBACK +# +# Usage:: +# +# KOKKOS_FIND_HEADER( +# +#
    +# +# [ALLOW_SYSTEM_PATH_FALLBACK] +# [PATHS path1 [path2 ...]] +# ) +# +# ```` +# +# The variable to define with the success or failure of the find +# +# ``
    `` +# +# The name of the header to find +# +# ```` +# +# The name of the TPL the header corresponds to +# +# ``[ALLOW_SYSTEM_PATH_FALLBACK]`` +# +# If custom paths are given and the header is not found +# should we be allowed to search default system paths +# or error out if not found in given paths +# +# ``[PATHS path1 [path2 ...]]`` +# +# Custom paths to search for the header +# +MACRO(kokkos_find_header VAR_NAME HEADER TPL_NAME) + CMAKE_PARSE_ARGUMENTS(TPL + "ALLOW_SYSTEM_PATH_FALLBACK" + "" + "PATHS" + ${ARGN}) + + SET(${HEADER}_FOUND FALSE) + SET(HAVE_CUSTOM_PATHS FALSE) + IF(NOT ${HEADER}_FOUND AND DEFINED ${TPL_NAME}_ROOT) + #ONLY look in the root directory + FIND_PATH(${VAR_NAME} ${HEADER} PATHS ${${TPL_NAME}_ROOT}/include NO_DEFAULT_PATH) + SET(HAVE_CUSTOM_PATHS TRUE) + ENDIF() + + IF(NOT ${HEADER}_FOUND AND DEFINED KOKKOS_${TPL_NAME}_DIR) + #ONLY look in the root directory + FIND_PATH(${VAR_NAME} ${HEADER} PATHS ${KOKKOS_${TPL_NAME}_DIR}/include NO_DEFAULT_PATH) + SET(HAVE_CUSTOM_PATHS TRUE) + ENDIF() + + IF (NOT ${HEADER}_FOUND AND TPL_PATHS) + #we got custom paths + #ONLY look in these paths and nowhere else + FIND_PATH(${VAR_NAME} ${HEADER} PATHS ${TPL_PATHS} NO_DEFAULT_PATH) + SET(HAVE_CUSTOM_PATHS TRUE) + ENDIF() + + IF (NOT HAVE_CUSTOM_PATHS OR TPL_ALLOW_SYSTEM_PATH_FALLBACK) + #Now go ahead and look in system paths + IF (NOT ${HEADER}_FOUND) + FIND_PATH(${VAR_NAME} ${HEADER}) + ENDIF() + ENDIF() +ENDMACRO() + +# +# @MACRO: KOKKOS_FIND_LIBRARY +# +# Function that find a particular library. This searches custom paths +# or default system paths depending on options. In constrast to CMake +# default, custom paths are prioritized over system paths. The search +# order is: +# 1. _ROOT variable +# 2. Kokkos__DIR variable +# 3. Locations in the PATHS option +# 4. Default system paths, if allowed. +# +# Default system paths are allowed if none of options (1)-(3) are specified +# or if default paths are specifically allowed via ALLOW_SYSTEM_PATH_FALLBACK +# +# Usage:: +# +# KOKKOS_FIND_LIBRARY( +# +#
    +# +# [ALLOW_SYSTEM_PATH_FALLBACK] +# [PATHS path1 [path2 ...]] +# ) +# +# ```` +# +# The variable to define with the success or failure of the find +# +# ```` +# +# The name of the library to find (NOT prefixed with -l) +# +# ```` +# +# The name of the TPL the library corresponds to +# +# ``ALLOW_SYSTEM_PATH_FALLBACK`` +# +# If custom paths are given and the library is not found +# should we be allowed to search default system paths +# or error out if not found in given paths +# +# ``PATHS`` +# +# Custom paths to search for the library +# +MACRO(kokkos_find_library VAR_NAME LIB TPL_NAME) + CMAKE_PARSE_ARGUMENTS(TPL + "ALLOW_SYSTEM_PATH_FALLBACK" + "" + "PATHS" + ${ARGN}) + + SET(${LIB}_FOUND FALSE) + SET(HAVE_CUSTOM_PATHS FALSE) + IF(NOT ${LIB}_FOUND AND DEFINED ${TPL_NAME}_ROOT) + FIND_LIBRARY(${VAR_NAME} ${LIB} PATHS ${${TPL_NAME}_ROOT}/lib ${${TPL_NAME}_ROOT}/lib64 NO_DEFAULT_PATH) + SET(HAVE_CUSTOM_PATHS TRUE) + ENDIF() + + IF(NOT ${LIB}_FOUND AND DEFINED KOKKOS_${TPL_NAME}_DIR) + #we got root paths, only look in these paths and nowhere else + FIND_LIBRARY(${VAR_NAME} ${LIB} PATHS ${KOKKOS_${TPL_NAME}_DIR}/lib ${KOKKOS_${TPL_NAME}_DIR}/lib64 NO_DEFAULT_PATH) + SET(HAVE_CUSTOM_PATHS TRUE) + ENDIF() + + IF (NOT ${LIB}_FOUND AND TPL_PATHS) + #we got custom paths, only look in these paths and nowhere else + FIND_LIBRARY(${VAR_NAME} ${LIB} PATHS ${TPL_PATHS} NO_DEFAULT_PATH) + SET(HAVE_CUSTOM_PATHS TRUE) + ENDIF() + + + IF (NOT HAVE_CUSTOM_PATHS OR TPL_ALLOW_SYSTEM_PATH_FALLBACK) + IF (NOT ${LIB}_FOUND) + #Now go ahead and look in system paths + FIND_LIBRARY(${VAR_NAME} ${LIB}) + ENDIF() + ENDIF() +ENDMACRO() + +# +# @MACRO: KOKKOS_FIND_IMPORTED +# +# Function that finds all libraries and headers needed for the tpl +# and creates an imported target encapsulating all the flags and libraries +# +# Usage:: +# +# KOKKOS_FIND_IMPORTED( +# +# INTERFACE +# ALLOW_SYSTEM_PATH_FALLBACK +# LIBRARY +# LINK_LIBRARIES ... +# COMPILE_OPTIONS ... +# LINK_OPTIONS ... +# +# ``INTERFACE`` +# +# If specified, this TPL will build an INTERFACE library rather than an +# IMPORTED target +# +# ``ALLOW_SYSTEM_PATH_FALLBACK" +# +# If custom paths are given and the library is not found +# should we be allowed to search default system paths +# or error out if not found in given paths. +# +# ``LIBRARY `` +# +# If specified, this gives the name of the library to look for +# +# ``MODULE_NAME `` +# +# If specified, the name of the enclosing module passed to +# FIND_PACKAGE(). Defaults to TPL${NAME} if not +# given. +# +# ``IMPORTED_NAME `` +# +# If specified, this gives the name of the target to build. +# Defaults to Kokkos:: +# +# ``LIBRARY_PATHS ...`` +# +# If specified, this gives a list of paths to search for the library +# If not given, _ROOT/lib and _ROOT/lib64 will be searched. +# +# ``HEADER_PATHS ...`` +# +# If specified, this gives a list of paths to search for the headers +# If not given, _ROOT/include and _ROOT/include will be searched. +# +# ``HEADERS ...`` +# +# If specified, this gives a list of headers to find for the package +# +# ``LIBRARIES ...`` +# +# If specified, this gives a list of libraries to find for the package +# +MACRO(kokkos_find_imported NAME) + CMAKE_PARSE_ARGUMENTS(TPL + "INTERFACE;ALLOW_SYSTEM_PATH_FALLBACK" + "HEADER;LIBRARY;IMPORTED_NAME;MODULE_NAME" + "HEADER_PATHS;LIBRARY_PATHS;HEADERS;LIBRARIES" + ${ARGN}) + + IF(NOT TPL_MODULE_NAME) + SET(TPL_MODULE_NAME TPL${NAME}) + ENDIF() + + IF (TPL_ALLOW_SYSTEM_PATH_FALLBACK) + SET(ALLOW_PATH_FALLBACK_OPT ALLOW_SYSTEM_PATH_FALLBACK) + ELSE() + SET(ALLOW_PATH_FALLBACK_OPT) + ENDIF() + + IF (NOT TPL_IMPORTED_NAME) + IF (TPL_INTERFACE) + SET(TPL_IMPORTED_NAME ${NAME}) + ELSE() + SET(TPL_IMPORTED_NAME Kokkos::${NAME}) + ENDIF() + ENDIF() + + SET(${NAME}_INCLUDE_DIRS) + IF (TPL_HEADER) + KOKKOS_FIND_HEADER(${NAME}_INCLUDE_DIRS ${TPL_HEADER} ${NAME} ${ALLOW_PATH_FALLBACK_OPT} PATHS ${TPL_HEADER_PATHS}) + ENDIF() + + FOREACH(HEADER ${TPL_HEADERS}) + KOKKOS_FIND_HEADER(HEADER_FIND_TEMP ${HEADER} ${NAME} ${ALLOW_PATH_FALLBACK_OPT} PATHS ${TPL_HEADER_PATHS}) + IF(HEADER_FIND_TEMP) + LIST(APPEND ${NAME}_INCLUDE_DIRS ${HEADER_FIND_TEMP}) + ENDIF() + ENDFOREACH() + + SET(${NAME}_LIBRARY) + IF(TPL_LIBRARY) + KOKKOS_FIND_LIBRARY(${NAME}_LIBRARY ${TPL_LIBRARY} ${NAME} ${ALLOW_PATH_FALLBACK_OPT} PATHS ${TPL_LIBRARY_PATHS}) + ENDIF() + + SET(${NAME}_FOUND_LIBRARIES) + FOREACH(LIB ${TPL_LIBRARIES}) + KOKKOS_FIND_LIBRARY(${LIB}_LOCATION ${LIB} ${NAME} ${ALLOW_PATH_FALLBACK_OPT} PATHS ${TPL_LIBRARY_PATHS}) + IF(${LIB}_LOCATION) + LIST(APPEND ${NAME}_FOUND_LIBRARIES ${${LIB}_LOCATION}) + ELSE() + SET(${NAME}_FOUND_LIBRARIES ${${LIB}_LOCATION}) + BREAK() + ENDIF() + ENDFOREACH() + + INCLUDE(FindPackageHandleStandardArgs) + #Collect all the variables we need to be valid for + #find_package to have succeeded + SET(TPL_VARS_NEEDED) + IF (TPL_LIBRARY) + LIST(APPEND TPL_VARS_NEEDED ${NAME}_LIBRARY) + ENDIF() + IF(TPL_HEADER) + LIST(APPEND TPL_VARS_NEEDED ${NAME}_INCLUDE_DIRS) + ENDIF() + IF(TPL_LIBRARIES) + LIST(APPEND TPL_VARS_NEEDED ${NAME}_FOUND_LIBRARIES) + ENDIF() + FIND_PACKAGE_HANDLE_STANDARD_ARGS(${TPL_MODULE_NAME} REQUIRED_VARS ${TPL_VARS_NEEDED}) + + MARK_AS_ADVANCED(${NAME}_INCLUDE_DIRS ${NAME}_FOUND_LIBRARIES ${NAME}_LIBRARY) + + IF (${TPL_MODULE_NAME}_FOUND) + SET(IMPORT_TYPE) + IF (TPL_INTERFACE) + SET(IMPORT_TYPE "INTERFACE") + ENDIF() + KOKKOS_CREATE_IMPORTED_TPL(${TPL_IMPORTED_NAME} + ${IMPORT_TYPE} + INCLUDES "${${NAME}_INCLUDE_DIRS}" + LIBRARY "${${NAME}_LIBRARY}" + LINK_LIBRARIES "${${NAME}_FOUND_LIBRARIES}") + ENDIF() +ENDMACRO(kokkos_find_imported) + +# +# @MACRO: KOKKOS_LINK_TPL() +# +# Function that checks if a third-party library (TPL) has been enabled and +# calls target_link_libraries on the given target +# +# Usage:: +# +# KOKKOS_LINK_TPL( +# +# PUBLIC +# PRIVATE +# INTERFACE +# IMPORTED_NAME +# +# +# Checks if Kokkos_ENABLE_=ON and if so links the library +# +# ``PUBLIC/PRIVATE/INTERFACE`` +# +# Specifies the linkage mode. One of these arguments should be given. +# This will then invoke target_link_libraries( PUBLIC/PRIVATE/INTERFACE ) +# +# ``IMPORTED_NAME `` +# +# If specified, this gives the exact name of the target to link against +# target_link_libraries( ) +# +FUNCTION(kokkos_link_tpl TARGET) + CMAKE_PARSE_ARGUMENTS(TPL + "PUBLIC;PRIVATE;INTERFACE" + "IMPORTED_NAME" + "" + ${ARGN}) + #the name of the TPL + SET(TPL ${TPL_UNPARSED_ARGUMENTS}) + IF (KOKKOS_HAS_TRILINOS) + #Do nothing, they will have already been linked + ELSE() + IF (NOT TPL_IMPORTED_NAME) + SET(TPL_IMPORTED_NAME Kokkos::${TPL}) + ENDIF() + IF (KOKKOS_ENABLE_${TPL}) + IF (TPL_PUBLIC) + TARGET_LINK_LIBRARIES(${TARGET} PUBLIC ${TPL_IMPORTED_NAME}) + ELSEIF (TPL_PRIVATE) + TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ${TPL_IMPORTED_NAME}) + ELSEIF (TPL_INTERFACE) + TARGET_LINK_LIBRARIES(${TARGET} INTERFACE ${TPL_IMPORTED_NAME}) + ELSE() + TARGET_LINK_LIBRARIES(${TARGET} ${TPL_IMPORTED_NAME}) + ENDIF() + ENDIF() + ENDIF() +ENDFUNCTION() + diff --git a/lib/kokkos/cmake/kokkos_install.cmake b/lib/kokkos/cmake/kokkos_install.cmake new file mode 100644 index 0000000000..1e4a5a2aad --- /dev/null +++ b/lib/kokkos/cmake/kokkos_install.cmake @@ -0,0 +1,42 @@ +IF (NOT KOKKOS_HAS_TRILINOS) + INCLUDE(GNUInstallDirs) + + #Set all the variables needed for KokkosConfig.cmake + GET_PROPERTY(KOKKOS_PROP_LIBS GLOBAL PROPERTY KOKKOS_LIBRARIES_NAMES) + SET(KOKKOS_LIBRARIES ${KOKKOS_PROP_LIBS}) + + INCLUDE(CMakePackageConfigHelpers) + CONFIGURE_PACKAGE_CONFIG_FILE( + cmake/KokkosConfig.cmake.in + "${Kokkos_BINARY_DIR}/KokkosConfig.cmake" + INSTALL_DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake) + + INCLUDE(CMakePackageConfigHelpers) + CONFIGURE_PACKAGE_CONFIG_FILE( + cmake/KokkosConfigCommon.cmake.in + "${Kokkos_BINARY_DIR}/KokkosConfigCommon.cmake" + INSTALL_DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake) + + WRITE_BASIC_PACKAGE_VERSION_FILE("${Kokkos_BINARY_DIR}/KokkosConfigVersion.cmake" + VERSION "${Kokkos_VERSION}" + COMPATIBILITY SameMajorVersion) + + # Install the KokkosConfig*.cmake files + install(FILES + "${Kokkos_BINARY_DIR}/KokkosConfig.cmake" + "${Kokkos_BINARY_DIR}/KokkosConfigCommon.cmake" + "${Kokkos_BINARY_DIR}/KokkosConfigVersion.cmake" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Kokkos) + install(EXPORT KokkosTargets NAMESPACE Kokkos:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Kokkos) +ELSE() + CONFIGURE_FILE(cmake/KokkosConfigCommon.cmake.in ${Kokkos_BINARY_DIR}/KokkosConfigCommon.cmake @ONLY) + file(READ ${Kokkos_BINARY_DIR}/KokkosConfigCommon.cmake KOKKOS_CONFIG_COMMON) + file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/KokkosConfig_install.cmake" ${KOKKOS_CONFIG_COMMON}) +ENDIF() + +# build and install pkgconfig file +CONFIGURE_FILE(core/src/kokkos.pc.in kokkos.pc @ONLY) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/kokkos.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KokkosCore_config.h DESTINATION ${KOKKOS_HEADER_DIR}) + diff --git a/lib/kokkos/cmake/kokkos_options.cmake b/lib/kokkos/cmake/kokkos_options.cmake deleted file mode 100644 index 239301925c..0000000000 --- a/lib/kokkos/cmake/kokkos_options.cmake +++ /dev/null @@ -1,419 +0,0 @@ -########################## NOTES ############################################### -# List the options for configuring kokkos using CMake method of doing it. -# These options then get mapped onto KOKKOS_SETTINGS environment variable by -# kokkos_settings.cmake. It is separate to allow other packages to override -# these variables (e.g., TriBITS). - -########################## AVAILABLE OPTIONS ################################### -# Use lists for documentation, verification, and programming convenience - -# All CMake options of the type KOKKOS_ENABLE_* -set(KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST) -list(APPEND KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST - Serial - OpenMP - Pthread - Qthread - HPX - Cuda - ROCm - HWLOC - MEMKIND - LIBRT - Cuda_Lambda - Cuda_Relocatable_Device_Code - Cuda_UVM - Cuda_LDG_Intrinsic - HPX_ASYNC_DISPATCH - Debug - Debug_DualView_Modify_Check - Debug_Bounds_Check - Compiler_Warnings - Profiling - Profiling_Load_Print - Aggressive_Vectorization - Deprecated_Code - Explicit_Instantiation - ) - -#------------------------------------------------------------------------------- -#------------------------------- Recognize CamelCase Options --------------------------- -#------------------------------------------------------------------------------- - -foreach(opt ${KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST}) - string(TOUPPER ${opt} OPT ) - IF(DEFINED Kokkos_ENABLE_${opt}) - IF(DEFINED KOKKOS_ENABLE_${OPT}) - IF(NOT ("${KOKKOS_ENABLE_${OPT}}" STREQUAL "${Kokkos_ENABLE_${opt}}")) - IF(DEFINED KOKKOS_ENABLE_${OPT}_INTERNAL) - MESSAGE(WARNING "Defined both Kokkos_ENABLE_${opt}=[${Kokkos_ENABLE_${opt}}] and KOKKOS_ENABLE_${OPT}=[${KOKKOS_ENABLE_${OPT}}] and they differ! Could be caused by old CMakeCache Variable. Run CMake again and warning should disappear. If not you are truly setting both variables.") - IF(NOT ("${Kokkos_ENABLE_${opt}}" STREQUAL "${KOKKOS_ENABLE_${OPT}_INTERNAL}")) - UNSET(KOKKOS_ENABLE_${OPT} CACHE) - SET(KOKKOS_ENABLE_${OPT} ${Kokkos_ENABLE_${opt}}) - MESSAGE(WARNING "SET BOTH VARIABLES KOKKOS_ENABLE_${OPT}: ${KOKKOS_ENABLE_${OPT}}") - ELSE() - SET(Kokkos_ENABLE_${opt} ${KOKKOS_ENABLE_${OPT}}) - ENDIF() - ELSE() - MESSAGE(FATAL_ERROR "Defined both Kokkos_ENABLE_${opt}=[${Kokkos_ENABLE_${opt}}] and KOKKOS_ENABLE_${OPT}=[${KOKKOS_ENABLE_${OPT}}] and they differ!") - ENDIF() - ENDIF() - ELSE() - SET(KOKKOS_INTERNAL_ENABLE_${OPT}_DEFAULT ${Kokkos_ENABLE_${opt}}) - ENDIF() - ENDIF() -endforeach() - -IF(DEFINED Kokkos_ARCH) - MESSAGE(FATAL_ERROR "Defined Kokkos_ARCH, use KOKKOS_ARCH instead!") -ENDIF() -IF(DEFINED Kokkos_Arch) - MESSAGE(FATAL_ERROR "Defined Kokkos_Arch, use KOKKOS_ARCH instead!") -ENDIF() - -#------------------------------------------------------------------------------- -# List of possible host architectures. -#------------------------------------------------------------------------------- -set(KOKKOS_ARCH_LIST) -list(APPEND KOKKOS_ARCH_LIST - None # No architecture optimization - AMDAVX # (HOST) AMD chip - EPYC # (HOST) AMD EPYC Zen-Core CPU - ARMv80 # (HOST) ARMv8.0 Compatible CPU - ARMv81 # (HOST) ARMv8.1 Compatible CPU - ARMv8-ThunderX # (HOST) ARMv8 Cavium ThunderX CPU - ARMv8-TX2 # (HOST) ARMv8 Cavium ThunderX2 CPU - WSM # (HOST) Intel Westmere CPU - SNB # (HOST) Intel Sandy/Ivy Bridge CPUs - HSW # (HOST) Intel Haswell CPUs - BDW # (HOST) Intel Broadwell Xeon E-class CPUs - SKX # (HOST) Intel Sky Lake Xeon E-class HPC CPUs (AVX512) - KNC # (HOST) Intel Knights Corner Xeon Phi - KNL # (HOST) Intel Knights Landing Xeon Phi - BGQ # (HOST) IBM Blue Gene Q - Power7 # (HOST) IBM POWER7 CPUs - Power8 # (HOST) IBM POWER8 CPUs - Power9 # (HOST) IBM POWER9 CPUs - Kepler # (GPU) NVIDIA Kepler default (generation CC 3.5) - Kepler30 # (GPU) NVIDIA Kepler generation CC 3.0 - Kepler32 # (GPU) NVIDIA Kepler generation CC 3.2 - Kepler35 # (GPU) NVIDIA Kepler generation CC 3.5 - Kepler37 # (GPU) NVIDIA Kepler generation CC 3.7 - Maxwell # (GPU) NVIDIA Maxwell default (generation CC 5.0) - Maxwell50 # (GPU) NVIDIA Maxwell generation CC 5.0 - Maxwell52 # (GPU) NVIDIA Maxwell generation CC 5.2 - Maxwell53 # (GPU) NVIDIA Maxwell generation CC 5.3 - Pascal60 # (GPU) NVIDIA Pascal generation CC 6.0 - Pascal61 # (GPU) NVIDIA Pascal generation CC 6.1 - Volta70 # (GPU) NVIDIA Volta generation CC 7.0 - Volta72 # (GPU) NVIDIA Volta generation CC 7.2 - Turing75 # (GPU) NVIDIA Turing generation CC 7.5 - ) - -# List of possible device architectures. -# The case and spelling here needs to match Makefile.kokkos -set(KOKKOS_DEVICES_LIST) -# Options: Cuda,ROCm,OpenMP,Pthread,Qthreads,Serial -list(APPEND KOKKOS_DEVICES_LIST - Cuda # NVIDIA GPU -- see below - OpenMP # OpenMP - Pthread # pthread - Qthreads # qthreads - HPX # HPX - Serial # serial - ROCm # Relocatable device code - ) - -# List of possible TPLs for Kokkos -# From Makefile.kokkos: Options: hwloc,librt,experimental_memkind -set(KOKKOS_USE_TPLS_LIST) -if(APPLE) -list(APPEND KOKKOS_USE_TPLS_LIST - HWLOC # hwloc - MEMKIND # experimental_memkind - ) -else() -list(APPEND KOKKOS_USE_TPLS_LIST - HWLOC # hwloc - LIBRT # librt - MEMKIND # experimental_memkind - ) -endif() -# Map of cmake variables to Makefile variables -set(KOKKOS_INTERNAL_HWLOC hwloc) -set(KOKKOS_INTERNAL_LIBRT librt) -set(KOKKOS_INTERNAL_MEMKIND experimental_memkind) - -# List of possible Advanced options -set(KOKKOS_OPTIONS_LIST) -list(APPEND KOKKOS_OPTIONS_LIST - AGGRESSIVE_VECTORIZATION - DISABLE_PROFILING - DISABLE_DUALVIEW_MODIFY_CHECK - ENABLE_PROFILE_LOAD_PRINT - ) -# Map of cmake variables to Makefile variables -set(KOKKOS_INTERNAL_LDG_INTRINSIC use_ldg) -set(KOKKOS_INTERNAL_UVM librt) -set(KOKKOS_INTERNAL_RELOCATABLE_DEVICE_CODE rdc) - - -#------------------------------------------------------------------------------- -# List of possible Options for CUDA -#------------------------------------------------------------------------------- -# From Makefile.kokkos: Options: use_ldg,force_uvm,rdc -set(KOKKOS_CUDA_OPTIONS_LIST) -list(APPEND KOKKOS_CUDA_OPTIONS_LIST - LDG_INTRINSIC # use_ldg - UVM # force_uvm - RELOCATABLE_DEVICE_CODE # rdc - LAMBDA # enable_lambda - ) - -# Map of cmake variables to Makefile variables -set(KOKKOS_INTERNAL_LDG_INTRINSIC use_ldg) -set(KOKKOS_INTERNAL_UVM force_uvm) -set(KOKKOS_INTERNAL_RELOCATABLE_DEVICE_CODE rdc) -set(KOKKOS_INTERNAL_LAMBDA enable_lambda) - - -#------------------------------------------------------------------------------- -# List of possible Options for HPX -#------------------------------------------------------------------------------- -# From Makefile.kokkos: Options: enable_async_dispatch -set(KOKKOS_HPX_OPTIONS_LIST) -list(APPEND KOKKOS_HPX_OPTIONS_LIST - ASYNC_DISPATCH # enable_async_dispatch - ) - -# Map of cmake variables to Makefile variables -set(KOKKOS_INTERNAL_ENABLE_ASYNC_DISPATCH enable_async_dispatch) - - -#------------------------------------------------------------------------------- -#------------------------------- Create doc strings ---------------------------- -#------------------------------------------------------------------------------- - -set(tmpr "\n ") -string(REPLACE ";" ${tmpr} KOKKOS_INTERNAL_ARCH_DOCSTR "${KOKKOS_ARCH_LIST}") -set(KOKKOS_INTERNAL_ARCH_DOCSTR "${tmpr}${KOKKOS_INTERNAL_ARCH_DOCSTR}") -# This would be useful, but we use Foo_ENABLE mechanisms -#string(REPLACE ";" ${tmpr} KOKKOS_INTERNAL_DEVICES_DOCSTR "${KOKKOS_DEVICES_LIST}") -#string(REPLACE ";" ${tmpr} KOKKOS_INTERNAL_USE_TPLS_DOCSTR "${KOKKOS_USE_TPLS_LIST}") -#string(REPLACE ";" ${tmpr} KOKKOS_INTERNAL_CUDA_OPTIONS_DOCSTR "${KOKKOS_CUDA_OPTIONS_LIST}") - -#------------------------------------------------------------------------------- -#------------------------------- GENERAL OPTIONS ------------------------------- -#------------------------------------------------------------------------------- - -# Setting this variable to a value other than "None" can improve host -# performance by turning on architecture specific code. -# NOT SET is used to determine if the option is passed in. It is reset to -# default "None" down below. -set(KOKKOS_ARCH "NOT_SET" CACHE STRING - "Optimize for specific host architecture. Options are: ${KOKKOS_INTERNAL_ARCH_DOCSTR}") - -# Whether to build separate libraries or now -set(KOKKOS_SEPARATE_LIBS OFF CACHE BOOL "OFF = kokkos. ON = kokkoscore, kokkoscontainers, and kokkosalgorithms.") - -# Qthreads options. -set(KOKKOS_QTHREADS_DIR "" CACHE PATH "Location of Qthreads library.") - -# HPX options. -set(KOKKOS_HPX_DIR "" CACHE PATH "Location of HPX library.") - -# Whether to build separate libraries or now -set(KOKKOS_SEPARATE_TESTS OFF CACHE BOOL "Provide unit test targets with finer granularity.") - -#------------------------------------------------------------------------------- -#------------------------------- KOKKOS_DEVICES -------------------------------- -#------------------------------------------------------------------------------- -# Figure out default settings -IF(Trilinos_ENABLE_Kokkos) - set_kokkos_default_default(SERIAL ON) - set_kokkos_default_default(PTHREAD OFF) - IF(TPL_ENABLE_QTHREAD) - set_kokkos_default_default(QTHREADS ${TPL_ENABLE_QTHREAD}) - ELSE() - set_kokkos_default_default(QTHREADS OFF) - ENDIF() - IF(TPL_ENABLE_HPX) - set_kokkos_default_default(HPX ON) - ELSE() - set_kokkos_default_default(HPX OFF) - ENDIF() - IF(Trilinos_ENABLE_OpenMP) - set_kokkos_default_default(OPENMP ${Trilinos_ENABLE_OpenMP}) - ELSE() - set_kokkos_default_default(OPENMP OFF) - ENDIF() - IF(TPL_ENABLE_CUDA) - set_kokkos_default_default(CUDA ${TPL_ENABLE_CUDA}) - ELSE() - set_kokkos_default_default(CUDA OFF) - ENDIF() - set_kokkos_default_default(ROCM OFF) -ELSE() - set_kokkos_default_default(SERIAL ON) - set_kokkos_default_default(OPENMP OFF) - set_kokkos_default_default(PTHREAD OFF) - set_kokkos_default_default(QTHREAD OFF) - set_kokkos_default_default(HPX OFF) - set_kokkos_default_default(CUDA OFF) - set_kokkos_default_default(ROCM OFF) -ENDIF() - -# Set which Kokkos backend to use. -# These are the actual options that define the settings. -set(KOKKOS_ENABLE_SERIAL ${KOKKOS_INTERNAL_ENABLE_SERIAL_DEFAULT} CACHE BOOL "Whether to enable the Kokkos::Serial device. This device executes \"parallel\" kernels sequentially on a single CPU thread. It is enabled by default. If you disable this device, please enable at least one other CPU device, such as Kokkos::OpenMP or Kokkos::Threads.") -set(KOKKOS_ENABLE_OPENMP ${KOKKOS_INTERNAL_ENABLE_OPENMP_DEFAULT} CACHE BOOL "Enable OpenMP support in Kokkos." FORCE) -set(KOKKOS_ENABLE_PTHREAD ${KOKKOS_INTERNAL_ENABLE_PTHREAD_DEFAULT} CACHE BOOL "Enable Pthread support in Kokkos.") -set(KOKKOS_ENABLE_QTHREADS ${KOKKOS_INTERNAL_ENABLE_QTHREADS_DEFAULT} CACHE BOOL "Enable Qthreads support in Kokkos.") -set(KOKKOS_ENABLE_HPX ${KOKKOS_INTERNAL_ENABLE_HPX_DEFAULT} CACHE BOOL "Enable HPX support in Kokkos.") -set(KOKKOS_ENABLE_CUDA ${KOKKOS_INTERNAL_ENABLE_CUDA_DEFAULT} CACHE BOOL "Enable CUDA support in Kokkos.") -set(KOKKOS_ENABLE_ROCM ${KOKKOS_INTERNAL_ENABLE_ROCM_DEFAULT} CACHE BOOL "Enable ROCm support in Kokkos.") - - - -#------------------------------------------------------------------------------- -#------------------------------- KOKKOS DEBUG and PROFILING -------------------- -#------------------------------------------------------------------------------- - -# Debug related options enable compiler warnings - -set_kokkos_default_default(DEBUG OFF) -set(KOKKOS_ENABLE_DEBUG ${KOKKOS_INTERNAL_ENABLE_DEBUG_DEFAULT} CACHE BOOL "Enable Kokkos Debug.") - -# From Makefile.kokkos: Advanced Options: -#compiler_warnings, aggressive_vectorization, disable_profiling, disable_dualview_modify_check, enable_profile_load_print -set_kokkos_default_default(COMPILER_WARNINGS OFF) -set(KOKKOS_ENABLE_COMPILER_WARNINGS ${KOKKOS_INTERNAL_ENABLE_COMPILER_WARNINGS_DEFAULT} CACHE BOOL "Enable compiler warnings.") - -set_kokkos_default_default(DEBUG_DUALVIEW_MODIFY_CHECK OFF) -set(KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK ${KOKKOS_INTERNAL_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK_DEFAULT} CACHE BOOL "Enable dualview modify check.") - -# Enable aggressive vectorization. -set_kokkos_default_default(AGGRESSIVE_VECTORIZATION OFF) -set(KOKKOS_ENABLE_AGGRESSIVE_VECTORIZATION ${KOKKOS_INTERNAL_ENABLE_AGGRESSIVE_VECTORIZATION_DEFAULT} CACHE BOOL "Enable aggressive vectorization.") - -# Enable profiling. -set_kokkos_default_default(PROFILING ON) -set(KOKKOS_ENABLE_PROFILING ${KOKKOS_INTERNAL_ENABLE_PROFILING_DEFAULT} CACHE BOOL "Enable profiling.") - -set_kokkos_default_default(PROFILING_LOAD_PRINT OFF) -set(KOKKOS_ENABLE_PROFILING_LOAD_PRINT ${KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_PRINT_DEFAULT} CACHE BOOL "Enable profile load print.") - -set_kokkos_default_default(DEPRECATED_CODE ON) -set(KOKKOS_ENABLE_DEPRECATED_CODE ${KOKKOS_INTERNAL_ENABLE_DEPRECATED_CODE_DEFAULT} CACHE BOOL "Enable deprecated code.") - -set_kokkos_default_default(EXPLICIT_INSTANTIATION OFF) -set(KOKKOS_ENABLE_EXPLICIT_INSTANTIATION ${KOKKOS_INTERNAL_ENABLE_EXPLICIT_INSTANTIATION_DEFAULT} CACHE BOOL "Enable explicit template instantiation.") - -#------------------------------------------------------------------------------- -#------------------------------- KOKKOS_USE_TPLS ------------------------------- -#------------------------------------------------------------------------------- -# Enable hwloc library. -# Figure out default: -IF(Trilinos_ENABLE_Kokkos AND TPL_ENABLE_HWLOC) - set_kokkos_default_default(HWLOC ON) -ELSE() - set_kokkos_default_default(HWLOC OFF) -ENDIF() -set(KOKKOS_ENABLE_HWLOC ${KOKKOS_INTERNAL_ENABLE_HWLOC_DEFAULT} CACHE BOOL "Enable hwloc for better process placement.") -set(KOKKOS_HWLOC_DIR "" CACHE PATH "Location of hwloc library. (kokkos tpl)") - -# Enable memkind library. -set_kokkos_default_default(MEMKIND OFF) -set(KOKKOS_ENABLE_MEMKIND ${KOKKOS_INTERNAL_ENABLE_MEMKIND_DEFAULT} CACHE BOOL "Enable memkind. (kokkos tpl)") -set(KOKKOS_MEMKIND_DIR "" CACHE PATH "Location of memkind library. (kokkos tpl)") - -# Enable rt library. -IF(Trilinos_ENABLE_Kokkos) - IF(DEFINED TPL_ENABLE_LIBRT) - set_kokkos_default_default(LIBRT ${TPL_ENABLE_LIBRT}) - ELSE() - set_kokkos_default_default(LIBRT OFF) - ENDIF() -ELSE() - set_kokkos_default_default(LIBRT ON) -ENDIF() -set(KOKKOS_ENABLE_LIBRT ${KOKKOS_INTERNAL_ENABLE_LIBRT_DEFAULT} CACHE BOOL "Enable librt for more precise timer. (kokkos tpl)") - - -#------------------------------------------------------------------------------- -#------------------------------- KOKKOS_CUDA_OPTIONS --------------------------- -#------------------------------------------------------------------------------- - -# CUDA options. -# Set Defaults -set_kokkos_default_default(CUDA_LDG_INTRINSIC_DEFAULT OFF) -set_kokkos_default_default(CUDA_UVM_DEFAULT OFF) -set_kokkos_default_default(CUDA_RELOCATABLE_DEVICE_CODE OFF) -IF(Trilinos_ENABLE_Kokkos) - IF(KOKKOS_ENABLE_CUDA) - find_package(CUDA) - ENDIF() - IF (DEFINED CUDA_VERSION) - IF (CUDA_VERSION VERSION_GREATER "7.0") - set_kokkos_default_default(CUDA_LAMBDA ON) - ELSE() - set_kokkos_default_default(CUDA_LAMBDA OFF) - ENDIF() - ENDIF() -ELSE() - set_kokkos_default_default(CUDA_LAMBDA OFF) -ENDIF() - -# Set actual options -set(KOKKOS_CUDA_DIR "" CACHE PATH "Location of CUDA library. Defaults to where nvcc installed.") -set(KOKKOS_ENABLE_CUDA_LDG_INTRINSIC ${KOKKOS_INTERNAL_ENABLE_CUDA_LDG_INTRINSIC_DEFAULT} CACHE BOOL "Enable CUDA LDG. (cuda option)") -set(KOKKOS_ENABLE_CUDA_UVM ${KOKKOS_INTERNAL_ENABLE_CUDA_UVM_DEFAULT} CACHE BOOL "Enable CUDA unified virtual memory.") -set(KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE ${KOKKOS_INTERNAL_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE_DEFAULT} CACHE BOOL "Enable relocatable device code for CUDA. (cuda option)") -set(KOKKOS_ENABLE_CUDA_LAMBDA ${KOKKOS_INTERNAL_ENABLE_CUDA_LAMBDA_DEFAULT} CACHE BOOL "Enable lambdas for CUDA. (cuda option)") - - -#------------------------------------------------------------------------------- -#------------------------------- KOKKOS_HPX_OPTIONS ---------------------------- -#------------------------------------------------------------------------------- - -# HPX options. -# Set Defaults -set_kokkos_default_default(HPX_ASYNC_DISPATCH OFF) - -# Set actual options -set(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH ${KOKKOS_INTERNAL_ENABLE_HPX_ASYNC_DISPATCH_DEFAULT} CACHE BOOL "Enable HPX async dispatch.") - - -#------------------------------------------------------------------------------- -#----------------------- HOST ARCH AND LEGACY TRIBITS -------------------------- -#------------------------------------------------------------------------------- - -# This defines the previous legacy TriBITS builds. -set(KOKKOS_LEGACY_TRIBITS False) -IF ("${KOKKOS_ARCH}" STREQUAL "NOT_SET") - set(KOKKOS_ARCH "None") - IF(KOKKOS_HAS_TRILINOS) - set(KOKKOS_LEGACY_TRIBITS True) - ENDIF() -ENDIF() -IF (KOKKOS_HAS_TRILINOS) - IF (KOKKOS_LEGACY_TRIBITS) - message(STATUS "Using the legacy tribits build because KOKKOS_ARCH not set") - ELSE() - message(STATUS "NOT using the legacy tribits build because KOKKOS_ARCH *is* set") - ENDIF() -ENDIF() - -#------------------------------------------------------------------------------- -#----------------------- Set CamelCase Options if they are not yet set --------- -#------------------------------------------------------------------------------- - -foreach(opt ${KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST}) - string(TOUPPER ${opt} OPT ) - UNSET(KOKKOS_ENABLE_${OPT}_INTERNAL CACHE) - SET(KOKKOS_ENABLE_${OPT}_INTERNAL ${KOKKOS_ENABLE_${OPT}} CACHE BOOL INTERNAL) - IF(DEFINED KOKKOS_ENABLE_${OPT}) - UNSET(Kokkos_ENABLE_${opt} CACHE) - SET(Kokkos_ENABLE_${opt} ${KOKKOS_ENABLE_${OPT}} CACHE BOOL "CamelCase Compatibility setting for KOKKOS_ENABLE_${OPT}") - ENDIF() -endforeach() diff --git a/lib/kokkos/cmake/kokkos_pick_cxx_std.cmake b/lib/kokkos/cmake/kokkos_pick_cxx_std.cmake new file mode 100644 index 0000000000..cf14948f43 --- /dev/null +++ b/lib/kokkos/cmake/kokkos_pick_cxx_std.cmake @@ -0,0 +1,46 @@ +# From CMake 3.10 documentation + +#This can run at any time +KOKKOS_OPTION(CXX_STANDARD "" STRING "The C++ standard for Kokkos to use: 11, 14, 17, or 20. If empty, this will default to CMAKE_CXX_STANDARD. If both CMAKE_CXX_STANDARD and Kokkos_CXX_STANDARD are empty, this will default to 11") + +# Set CXX standard flags +SET(KOKKOS_ENABLE_CXX11 OFF) +SET(KOKKOS_ENABLE_CXX14 OFF) +SET(KOKKOS_ENABLE_CXX17 OFF) +SET(KOKKOS_ENABLE_CXX20 OFF) +IF (KOKKOS_CXX_STANDARD) + IF (${KOKKOS_CXX_STANDARD} STREQUAL "c++98") + MESSAGE(FATAL_ERROR "Kokkos no longer supports C++98 - minimum C++11") + ELSEIF (${KOKKOS_CXX_STANDARD} STREQUAL "c++11") + MESSAGE(WARNING "Deprecated Kokkos C++ standard set as 'c++11'. Use '11' instead.") + SET(KOKKOS_CXX_STANDARD "11") + ELSEIF(${KOKKOS_CXX_STANDARD} STREQUAL "c++14") + MESSAGE(WARNING "Deprecated Kokkos C++ standard set as 'c++14'. Use '14' instead.") + SET(KOKKOS_CXX_STANDARD "14") + ELSEIF(${KOKKOS_CXX_STANDARD} STREQUAL "c++17") + MESSAGE(WARNING "Deprecated Kokkos C++ standard set as 'c++17'. Use '17' instead.") + SET(KOKKOS_CXX_STANDARD "17") + ELSEIF(${KOKKOS_CXX_STANDARD} STREQUAL "c++1y") + MESSAGE(WARNING "Deprecated Kokkos C++ standard set as 'c++1y'. Use '1Y' instead.") + SET(KOKKOS_CXX_STANDARD "1Y") + ELSEIF(${KOKKOS_CXX_STANDARD} STREQUAL "c++1z") + MESSAGE(WARNING "Deprecated Kokkos C++ standard set as 'c++1z'. Use '1Z' instead.") + SET(KOKKOS_CXX_STANDARD "1Z") + ELSEIF(${KOKKOS_CXX_STANDARD} STREQUAL "c++2a") + MESSAGE(WARNING "Deprecated Kokkos C++ standard set as 'c++2a'. Use '2A' instead.") + SET(KOKKOS_CXX_STANDARD "2A") + ENDIF() +ENDIF() + +IF (NOT KOKKOS_CXX_STANDARD AND NOT CMAKE_CXX_STANDARD) + MESSAGE(STATUS "Setting default Kokkos CXX standard to 11") + SET(KOKKOS_CXX_STANDARD "11") +ELSEIF(NOT KOKKOS_CXX_STANDARD) + MESSAGE(STATUS "Setting default Kokkos CXX standard to ${CMAKE_CXX_STANDARD}") + SET(KOKKOS_CXX_STANDARD ${CMAKE_CXX_STANDARD}) +ENDIF() + + + + + diff --git a/lib/kokkos/cmake/kokkos_settings.cmake b/lib/kokkos/cmake/kokkos_settings.cmake deleted file mode 100644 index 2c622d0de9..0000000000 --- a/lib/kokkos/cmake/kokkos_settings.cmake +++ /dev/null @@ -1,259 +0,0 @@ -########################## NOTES ############################################### -# This files goal is to take CMake options found in kokkos_options.cmake but -# possibly set from elsewhere -# (see: trilinos/cmake/ProjectCOmpilerPostConfig.cmake) -# using CMake idioms and map them onto the KOKKOS_SETTINGS variables that gets -# passed to the kokkos makefile configuration: -# make -f ${CMAKE_SOURCE_DIR}/core/src/Makefile ${KOKKOS_SETTINGS} build-makefile-cmake-kokkos -# that generates KokkosCore_config.h and kokkos_generated_settings.cmake -# To understand how to form KOKKOS_SETTINGS, see -# /Makefile.kokkos - -#------------------------------------------------------------------------------- -#------------------------------- GENERAL OPTIONS ------------------------------- -#------------------------------------------------------------------------------- - -# Ensure that KOKKOS_ARCH is in the ARCH_LIST -if (KOKKOS_ARCH MATCHES ",") - message("-- Detected a comma in: KOKKOS_ARCH=`${KOKKOS_ARCH}`") - message("-- Although we prefer KOKKOS_ARCH to be semicolon-delimited, we do allow") - message("-- comma-delimited values for compatibility with scripts (see github.com/trilinos/Trilinos/issues/2330)") - string(REPLACE "," ";" KOKKOS_ARCH "${KOKKOS_ARCH}") - message("-- Commas were changed to semicolons, now KOKKOS_ARCH=`${KOKKOS_ARCH}`") -endif() -foreach(arch ${KOKKOS_ARCH}) - list(FIND KOKKOS_ARCH_LIST ${arch} indx) - if (indx EQUAL -1) - message(FATAL_ERROR "`${arch}` is not an accepted value in KOKKOS_ARCH=`${KOKKOS_ARCH}`." - " Please pick from these choices: ${KOKKOS_INTERNAL_ARCH_DOCSTR}") - endif () -endforeach() - -# KOKKOS_SETTINGS uses KOKKOS_ARCH -string(REPLACE ";" "," KOKKOS_GMAKE_ARCH "${KOKKOS_ARCH}") - -# From Makefile.kokkos: Options: yes,no -if(${KOKKOS_ENABLE_DEBUG}) - set(KOKKOS_GMAKE_DEBUG yes) -else() - set(KOKKOS_GMAKE_DEBUG no) -endif() - -#------------------------------- KOKKOS_DEVICES -------------------------------- -# Can have multiple devices -set(KOKKOS_DEVICESl) -foreach(devopt ${KOKKOS_DEVICES_LIST}) - string(TOUPPER ${devopt} devoptuc) - if (${KOKKOS_ENABLE_${devoptuc}}) - list(APPEND KOKKOS_DEVICESl ${devopt}) - endif () -endforeach() -# List needs to be comma-delmitted -string(REPLACE ";" "," KOKKOS_GMAKE_DEVICES "${KOKKOS_DEVICESl}") - -#------------------------------- KOKKOS_OPTIONS -------------------------------- -# From Makefile.kokkos: Options: aggressive_vectorization,disable_profiling,disable_deprecated_code -#compiler_warnings, aggressive_vectorization, disable_profiling, disable_dualview_modify_check, enable_profile_load_print - -set(KOKKOS_OPTIONSl) -if(${KOKKOS_ENABLE_COMPILER_WARNINGS}) - list(APPEND KOKKOS_OPTIONSl compiler_warnings) -endif() -if(${KOKKOS_ENABLE_AGGRESSIVE_VECTORIZATION}) - list(APPEND KOKKOS_OPTIONSl aggressive_vectorization) -endif() -if(NOT ${KOKKOS_ENABLE_PROFILING}) - list(APPEND KOKKOS_OPTIONSl disable_profiling) -endif() -if(NOT ${KOKKOS_ENABLE_DEPRECATED_CODE}) - list(APPEND KOKKOS_OPTIONSl disable_deprecated_code) -endif() -if(NOT ${KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK}) - list(APPEND KOKKOS_OPTIONSl disable_dualview_modify_check) -endif() -if(${KOKKOS_ENABLE_PROFILING_LOAD_PRINT}) - list(APPEND KOKKOS_OPTIONSl enable_profile_load_print) -endif() -if(${KOKKOS_ENABLE_EXPLICIT_INSTANTIATION}) - list(APPEND KOKKOS_OPTIONSl enable_eti) -endif() -# List needs to be comma-delimitted -string(REPLACE ";" "," KOKKOS_GMAKE_OPTIONS "${KOKKOS_OPTIONSl}") - - -#------------------------------- KOKKOS_USE_TPLS ------------------------------- -# Construct the Makefile options -set(KOKKOS_USE_TPLSl) -foreach(tplopt ${KOKKOS_USE_TPLS_LIST}) - if (${KOKKOS_ENABLE_${tplopt}}) - list(APPEND KOKKOS_USE_TPLSl ${KOKKOS_INTERNAL_${tplopt}}) - endif () -endforeach() -# List needs to be comma-delimitted -string(REPLACE ";" "," KOKKOS_GMAKE_USE_TPLS "${KOKKOS_USE_TPLSl}") - - -#------------------------------- KOKKOS_CUDA_OPTIONS --------------------------- -# Construct the Makefile options -set(KOKKOS_CUDA_OPTIONSl) -foreach(cudaopt ${KOKKOS_CUDA_OPTIONS_LIST}) - if (${KOKKOS_ENABLE_CUDA_${cudaopt}}) - list(APPEND KOKKOS_CUDA_OPTIONSl ${KOKKOS_INTERNAL_${cudaopt}}) - endif () -endforeach() -# List needs to be comma-delmitted -string(REPLACE ";" "," KOKKOS_GMAKE_CUDA_OPTIONS "${KOKKOS_CUDA_OPTIONSl}") - -#------------------------------- PATH VARIABLES -------------------------------- -# Want makefile to use same executables specified which means modifying -# the path so the $(shell ...) commands in the makefile see the right exec -# Also, the Makefile's use FOO_PATH naming scheme for -I/-L construction -#TODO: Makefile.kokkos allows this to be overwritten? ROCM_HCC_PATH - -set(KOKKOS_INTERNAL_PATHS) -set(addpathl) -foreach(kvar IN LISTS KOKKOS_USE_TPLS_LIST ITEMS CUDA QTHREADS) - if(${KOKKOS_ENABLE_${kvar}}) - if(DEFINED KOKKOS_${kvar}_DIR) - set(KOKKOS_INTERNAL_PATHS ${KOKKOS_INTERNAL_PATHS} "${kvar}_PATH=${KOKKOS_${kvar}_DIR}") - if(IS_DIRECTORY ${KOKKOS_${kvar}_DIR}/bin) - list(APPEND addpathl ${KOKKOS_${kvar}_DIR}/bin) - endif() - endif() - endif() -endforeach() -# Path env is : delimitted -string(REPLACE ";" ":" KOKKOS_INTERNAL_ADDTOPATH "${addpathl}") - - -######################### SET KOKKOS_SETTINGS ################################## -# Set the KOKKOS_SETTINGS String -- this is the primary communication with the -# makefile configuration. See Makefile.kokkos - -set(KOKKOS_SETTINGS KOKKOS_CMAKE=yes) -set(KOKKOS_SETTINGS ${KOKKOS_SETTINGS} KOKKOS_SRC_PATH=${KOKKOS_SRC_PATH}) -set(KOKKOS_SETTINGS ${KOKKOS_SETTINGS} KOKKOS_PATH=${KOKKOS_PATH}) -set(KOKKOS_SETTINGS ${KOKKOS_SETTINGS} KOKKOS_INSTALL_PATH=${CMAKE_INSTALL_PREFIX}) - -# Form of KOKKOS_foo=$KOKKOS_foo -foreach(kvar ARCH;DEVICES;DEBUG;OPTIONS;CUDA_OPTIONS;USE_TPLS) - if(DEFINED KOKKOS_GMAKE_${kvar}) - if (NOT "${KOKKOS_GMAKE_${kvar}}" STREQUAL "") - set(KOKKOS_SETTINGS ${KOKKOS_SETTINGS} KOKKOS_${kvar}=${KOKKOS_GMAKE_${kvar}}) - endif() - endif() -endforeach() - -# Form of VAR=VAL -#TODO: Makefile supports MPICH_CXX, OMPI_CXX as well -foreach(ovar CXX;CXXFLAGS;LDFLAGS) - if(DEFINED ${ovar}) - if (NOT "${${ovar}}" STREQUAL "") - set(KOKKOS_SETTINGS ${KOKKOS_SETTINGS} ${ovar}=${${ovar}}) - endif() - endif() -endforeach() - -# Finally, do the paths -if (NOT "${KOKKOS_INTERNAL_PATHS}" STREQUAL "") - set(KOKKOS_SETTINGS ${KOKKOS_SETTINGS} ${KOKKOS_INTERNAL_PATHS}) -endif() -if (NOT "${KOKKOS_INTERNAL_ADDTOPATH}" STREQUAL "") - set(KOKKOS_SETTINGS ${KOKKOS_SETTINGS} "PATH=${KOKKOS_INTERNAL_ADDTOPATH}:$ENV{PATH}") -endif() - -if (CMAKE_CXX_STANDARD) - if (CMAKE_CXX_STANDARD STREQUAL "98") - message(FATAL_ERROR "Kokkos requires C++11 or newer!") - endif() - set(KOKKOS_CXX_STANDARD "c++${CMAKE_CXX_STANDARD}") - if (CMAKE_CXX_EXTENSIONS) - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(KOKKOS_CXX_STANDARD "gnu++${CMAKE_CXX_STANDARD}") - endif() - endif() - set(KOKKOS_SETTINGS ${KOKKOS_SETTINGS} "KOKKOS_CXX_STANDARD=\"${KOKKOS_CXX_STANDARD}\"") -endif() - -# Final form that gets passed to make -set(KOKKOS_SETTINGS env ${KOKKOS_SETTINGS}) - - -############################ PRINT CONFIGURE STATUS ############################ - -if(KOKKOS_CMAKE_VERBOSE) - message(STATUS "") - message(STATUS "****************** Kokkos Settings ******************") - message(STATUS "Execution Spaces") - - if(KOKKOS_ENABLE_CUDA) - message(STATUS " Device Parallel: Cuda") - else() - message(STATUS " Device Parallel: None") - endif() - - if(KOKKOS_ENABLE_OPENMP) - message(STATUS " Host Parallel: OpenMP") - elseif(KOKKOS_ENABLE_PTHREAD) - message(STATUS " Host Parallel: Pthread") - elseif(KOKKOS_ENABLE_QTHREADS) - message(STATUS " Host Parallel: Qthreads") - elseif(KOKKOS_ENABLE_HPX) - message(STATUS " Host Parallel: HPX") - else() - message(STATUS " Host Parallel: None") - endif() - - if(KOKKOS_ENABLE_SERIAL) - message(STATUS " Host Serial: Serial") - else() - message(STATUS " Host Serial: None") - endif() - - message(STATUS "") - message(STATUS "Architectures:") - message(STATUS " ${KOKKOS_GMAKE_ARCH}") - - message(STATUS "") - message(STATUS "Enabled options") - - if(KOKKOS_SEPARATE_LIBS) - message(STATUS " KOKKOS_SEPARATE_LIBS") - endif() - - foreach(opt IN LISTS KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST) - string(TOUPPER ${opt} OPT) - if (KOKKOS_ENABLE_${OPT}) - message(STATUS " KOKKOS_ENABLE_${OPT}") - endif() - endforeach() - - if(KOKKOS_ENABLE_CUDA) - if(KOKKOS_CUDA_DIR) - message(STATUS " KOKKOS_CUDA_DIR: ${KOKKOS_CUDA_DIR}") - endif() - endif() - - if(KOKKOS_QTHREADS_DIR) - message(STATUS " KOKKOS_QTHREADS_DIR: ${KOKKOS_QTHREADS_DIR}") - endif() - - if(KOKKOS_HWLOC_DIR) - message(STATUS " KOKKOS_HWLOC_DIR: ${KOKKOS_HWLOC_DIR}") - endif() - - if(KOKKOS_MEMKIND_DIR) - message(STATUS " KOKKOS_MEMKIND_DIR: ${KOKKOS_MEMKIND_DIR}") - endif() - - if(KOKKOS_HPX_DIR) - message(STATUS " KOKKOS_HPX_DIR: ${KOKKOS_HPX_DIR}") - endif() - - message(STATUS "") - message(STATUS "Final kokkos settings variable:") - message(STATUS " ${KOKKOS_SETTINGS}") - - message(STATUS "*****************************************************") - message(STATUS "") -endif() diff --git a/lib/kokkos/cmake/kokkos_test_cxx_std.cmake b/lib/kokkos/cmake/kokkos_test_cxx_std.cmake new file mode 100644 index 0000000000..c264517abe --- /dev/null +++ b/lib/kokkos/cmake/kokkos_test_cxx_std.cmake @@ -0,0 +1,144 @@ +KOKKOS_CFG_DEPENDS(CXX_STD COMPILER_ID) + +FUNCTION(kokkos_set_cxx_standard_feature standard) + SET(EXTENSION_NAME CMAKE_CXX${standard}_EXTENSION_COMPILE_OPTION) + SET(STANDARD_NAME CMAKE_CXX${standard}_STANDARD_COMPILE_OPTION) + SET(FEATURE_NAME cxx_std_${standard}) + #CMake's way of telling us that the standard (or extension) + #flags are supported is the extension/standard variables + IF (NOT DEFINED CMAKE_CXX_EXTENSIONS) + IF(KOKKOS_DONT_ALLOW_EXTENSIONS) + GLOBAL_SET(KOKKOS_USE_CXX_EXTENSIONS OFF) + ELSE() + GLOBAL_SET(KOKKOS_USE_CXX_EXTENSIONS ON) + ENDIF() + ELSEIF(CMAKE_CXX_EXTENSIONS) + IF(KOKKOS_DONT_ALLOW_EXTENSIONS) + MESSAGE(FATAL_ERROR "The chosen configuration does not support CXX extensions flags: ${KOKKOS_DONT_ALLOW_EXTENSIONS}. Must set CMAKE_CXX_EXTENSIONS=OFF to continue") + ELSE() + GLOBAL_SET(KOKKOS_USE_CXX_EXTENSIONS ON) + ENDIF() + ELSE() + #For trilinos, we need to make sure downstream projects + GLOBAL_SET(KOKKOS_USE_CXX_EXTENSIONS OFF) + ENDIF() + + IF (KOKKOS_USE_CXX_EXTENSIONS AND ${EXTENSION_NAME}) + MESSAGE(STATUS "Using ${${EXTENSION_NAME}} for C++${standard} extensions as feature") + GLOBAL_SET(KOKKOS_CXX_STANDARD_FEATURE ${FEATURE_NAME}) + ELSEIF(NOT KOKKOS_USE_CXX_EXTENSIONS AND ${STANDARD_NAME}) + MESSAGE(STATUS "Using ${${STANDARD_NAME}} for C++${standard} standard as feature") + GLOBAL_SET(KOKKOS_CXX_STANDARD_FEATURE ${FEATURE_NAME}) + ELSE() + #nope, we can't do anything here + MESSAGE(WARNING "C++${standard} is not supported as a compiler feature. We will choose custom flags for now, but this behavior has been deprecated. Please open an issue at https://github.com/kokkos/kokkos/issues reporting that ${KOKKOS_CXX_COMPILER_ID} ${KOKKOS_CXX_COMPILER_VERSION} failed for ${KOKKOS_CXX_STANDARD}, preferrably including your CMake command.") + GLOBAL_SET(KOKKOS_CXX_STANDARD_FEATURE "") + ENDIF() + + IF(NOT ${FEATURE_NAME} IN_LIST CMAKE_CXX_COMPILE_FEATURES) + MESSAGE(FATAL_ERROR "Compiler ${KOKKOS_CXX_COMPILER_ID} should support ${FEATURE_NAME}, but CMake reports feature not supported") + ENDIF() +ENDFUNCTION() + + +IF (KOKKOS_CXX_STANDARD AND CMAKE_CXX_STANDARD) + #make sure these are consistent + IF (NOT KOKKOS_CXX_STANDARD STREQUAL CMAKE_CXX_STANDARD) + MESSAGE(WARNING "Specified both CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} and KOKKOS_CXX_STANDARD=${KOKKOS_CXX_STANDARD}, but they don't match") + SET(CMAKE_CXX_STANDARD ${KOKKOS_CXX_STANDARD} CACHE STRING "C++ standard" FORCE) + ENDIF() +ENDIF() + + +IF (KOKKOS_CXX_STANDARD STREQUAL "11" ) + kokkos_set_cxx_standard_feature(11) + SET(KOKKOS_ENABLE_CXX11 ON) + SET(KOKKOS_CXX_INTERMEDIATE_STANDARD "11") +ELSEIF(KOKKOS_CXX_STANDARD STREQUAL "14") + kokkos_set_cxx_standard_feature(14) + SET(KOKKOS_CXX_INTERMEDIATE_STANDARD "1Y") + SET(KOKKOS_ENABLE_CXX14 ON) +ELSEIF(KOKKOS_CXX_STANDARD STREQUAL "17") + kokkos_set_cxx_standard_feature(17) + SET(KOKKOS_CXX_INTERMEDIATE_STANDARD "1Z") + SET(KOKKOS_ENABLE_CXX17 ON) +ELSEIF(KOKKOS_CXX_STANDARD STREQUAL "20") + kokkos_set_cxx_standard_feature(20) + SET(KOKKOS_CXX_INTERMEDIATE_STANDARD "2A") + SET(KOKKOS_ENABLE_CXX20 ON) +ELSEIF(KOKKOS_CXX_STANDARD STREQUAL "98") + MESSAGE(FATAL_ERROR "Kokkos requires C++11 or newer!") +ELSE() + MESSAGE(FATAL_ERROR "Unknown C++ standard ${KOKKOS_CXX_STANDARD} - must be 11, 14, 17, or 20") +ENDIF() + + + +# Enforce that extensions are turned off for nvcc_wrapper. +# For compiling CUDA code using nvcc_wrapper, we will use the host compiler's +# flags for turning on C++11. Since for compiler ID and versioning purposes +# CMake recognizes the host compiler when calling nvcc_wrapper, this just +# works. Both NVCC and nvcc_wrapper only recognize '-std=c++11' which means +# that we can only use host compilers for CUDA builds that use those flags. +# It also means that extensions (gnu++11) can't be turned on for CUDA builds. + +IF(KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + IF(NOT DEFINED CMAKE_CXX_EXTENSIONS) + SET(CMAKE_CXX_EXTENSIONS OFF) + ELSEIF(CMAKE_CXX_EXTENSIONS) + MESSAGE(FATAL_ERROR "NVCC doesn't support C++ extensions. Set -DCMAKE_CXX_EXTENSIONS=OFF") + ENDIF() +ENDIF() + +IF(KOKKOS_ENABLE_CUDA) + # ENFORCE that the compiler can compile CUDA code. + IF(KOKKOS_CXX_COMPILER_ID STREQUAL Clang) + IF(KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 4.0.0) + MESSAGE(FATAL_ERROR "Compiling CUDA code directly with Clang requires version 4.0.0 or higher.") + ENDIF() + IF(NOT DEFINED CMAKE_CXX_EXTENSIONS) + SET(CMAKE_CXX_EXTENSIONS OFF) + ELSEIF(CMAKE_CXX_EXTENSIONS) + MESSAGE(FATAL_ERROR "Compiling CUDA code with clang doesn't support C++ extensions. Set -DCMAKE_CXX_EXTENSIONS=OFF") + ENDIF() + ELSEIF(NOT KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA) + MESSAGE(FATAL_ERROR "Invalid compiler for CUDA. The compiler must be nvcc_wrapper or Clang, but compiler ID was ${KOKKOS_CXX_COMPILER_ID}") + ENDIF() +ENDIF() + +IF (NOT KOKKOS_CXX_STANDARD_FEATURE) + #we need to pick the C++ flags ourselves + UNSET(CMAKE_CXX_STANDARD) + UNSET(CMAKE_CXX_STANDARD CACHE) + IF(KOKKOS_CXX_COMPILER_ID STREQUAL Cray) + INCLUDE(${KOKKOS_SRC_PATH}/cmake/cray.cmake) + kokkos_set_cray_flags(${KOKKOS_CXX_STANDARD} ${KOKKOS_CXX_INTERMEDIATE_STANDARD}) + ELSEIF(KOKKOS_CXX_COMPILER_ID STREQUAL PGI) + INCLUDE(${KOKKOS_SRC_PATH}/cmake/pgi.cmake) + kokkos_set_pgi_flags(${KOKKOS_CXX_STANDARD} ${KOKKOS_CXX_INTERMEDIATE_STANDARD}) + ELSEIF(KOKKOS_CXX_COMPILER_ID STREQUAL Intel) + INCLUDE(${KOKKOS_SRC_PATH}/cmake/intel.cmake) + kokkos_set_intel_flags(${KOKKOS_CXX_STANDARD} ${KOKKOS_CXX_INTERMEDIATE_STANDARD}) + ELSE() + INCLUDE(${KOKKOS_SRC_PATH}/cmake/gnu.cmake) + kokkos_set_gnu_flags(${KOKKOS_CXX_STANDARD} ${KOKKOS_CXX_INTERMEDIATE_STANDARD}) + ENDIF() + #check that the compiler accepts the C++ standard flag + INCLUDE(CheckCXXCompilerFlag) + IF (DEFINED CXX_STD_FLAGS_ACCEPTED) + UNSET(CXX_STD_FLAGS_ACCEPTED CACHE) + ENDIF() + CHECK_CXX_COMPILER_FLAG(${KOKKOS_CXX_STANDARD_FLAG} CXX_STD_FLAGS_ACCEPTED) + IF (NOT CXX_STD_FLAGS_ACCEPTED) + CHECK_CXX_COMPILER_FLAG(${KOKKOS_CXX_INTERMEDIATE_STANDARD_FLAG} CXX_INT_STD_FLAGS_ACCEPTED) + IF (NOT CXX_INT_STD_FLAGS_ACCEPTED) + MESSAGE(FATAL_ERROR "${KOKKOS_CXX_COMPILER_ID} did not accept ${KOKKOS_CXX_STANDARD_FLAG} or ${KOKKOS_CXX_INTERMEDIATE_STANDARD_FLAG}. You likely need to reduce the level of the C++ standard from ${KOKKOS_CXX_STANDARD}") + ENDIF() + SET(KOKKOS_CXX_STANDARD_FLAG ${KOKKOS_CXX_INTERMEDIATE_STANDARD_FLAG}) + ENDIF() + MESSAGE(STATUS "Compiler features not supported, but ${KOKKOS_CXX_COMPILER_ID} accepts ${KOKKOS_CXX_STANDARD_FLAG}") +ENDIF() + + + + diff --git a/lib/kokkos/cmake/kokkos_tpls.cmake b/lib/kokkos/cmake/kokkos_tpls.cmake new file mode 100644 index 0000000000..181a497d52 --- /dev/null +++ b/lib/kokkos/cmake/kokkos_tpls.cmake @@ -0,0 +1,47 @@ +KOKKOS_CFG_DEPENDS(TPLS OPTIONS) +KOKKOS_CFG_DEPENDS(TPLS DEVICES) + +FUNCTION(KOKKOS_TPL_OPTION PKG DEFAULT) + KOKKOS_ENABLE_OPTION(${PKG} ${DEFAULT} "Whether to enable the ${PKG} library") + KOKKOS_OPTION(${PKG}_DIR "" PATH "Location of ${PKG} library") + SET(KOKKOS_ENABLE_${PKG} ${KOKKOS_ENABLE_${PKG}} PARENT_SCOPE) + SET(KOKKOS_${PKG}_DIR ${KOKKOS_${PKG}_DIR} PARENT_SCOPE) +ENDFUNCTION() + +KOKKOS_TPL_OPTION(HWLOC Off) +KOKKOS_TPL_OPTION(LIBNUMA Off) +KOKKOS_TPL_OPTION(MEMKIND Off) +KOKKOS_TPL_OPTION(CUDA Off) +KOKKOS_TPL_OPTION(LIBRT Off) +KOKKOS_TPL_OPTION(LIBDL On) + +IF(Trilinos_ENABLE_Kokkos AND TPL_ENABLE_HPX) +SET(HPX_DEFAULT ON) +ELSE() +SET(HPX_DEFAULT OFF) +ENDIF() +KOKKOS_TPL_OPTION(HPX ${HPX_DEFAULT}) + +IF(Trilinos_ENABLE_Kokkos AND TPL_ENABLE_PTHREAD) +SET(PTHREAD_DEFAULT ON) +ELSE() +SET(PTHREAD_DEFAULT OFF) +ENDIF() +KOKKOS_TPL_OPTION(PTHREAD ${PTHREAD_DEFAULT}) + + +#Make sure we use our local FindKokkosCuda.cmake +KOKKOS_IMPORT_TPL(HPX INTERFACE) +KOKKOS_IMPORT_TPL(CUDA INTERFACE) +KOKKOS_IMPORT_TPL(HWLOC) +KOKKOS_IMPORT_TPL(LIBNUMA) +KOKKOS_IMPORT_TPL(LIBRT) +KOKKOS_IMPORT_TPL(LIBDL) +KOKKOS_IMPORT_TPL(MEMKIND) +KOKKOS_IMPORT_TPL(PTHREAD INTERFACE) + +#Convert list to newlines (which CMake doesn't always like in cache variables) +STRING(REPLACE ";" "\n" KOKKOS_TPL_EXPORT_TEMP "${KOKKOS_TPL_EXPORTS}") +#Convert to a regular variable +UNSET(KOKKOS_TPL_EXPORTS CACHE) +SET(KOKKOS_TPL_EXPORTS ${KOKKOS_TPL_EXPORT_TEMP}) diff --git a/lib/kokkos/cmake/kokkos_tribits.cmake b/lib/kokkos/cmake/kokkos_tribits.cmake new file mode 100644 index 0000000000..d2317d2446 --- /dev/null +++ b/lib/kokkos/cmake/kokkos_tribits.cmake @@ -0,0 +1,392 @@ +#These are tribits wrappers only ever called by Kokkos itself + +INCLUDE(CMakeParseArguments) +INCLUDE(CTest) +INCLUDE(GNUInstallDirs) + +MESSAGE(STATUS "The project name is: ${PROJECT_NAME}") + +#Leave this here for now - but only do for tribits +#This breaks the standalone CMake +IF (KOKKOS_HAS_TRILINOS) + IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_OpenMP) + SET(${PROJECT_NAME}_ENABLE_OpenMP OFF) + ENDIF() + + IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_HPX) + SET(${PROJECT_NAME}_ENABLE_HPX OFF) + ENDIF() + + IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_DEBUG) + SET(${PROJECT_NAME}_ENABLE_DEBUG OFF) + ENDIF() + + IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_CXX11) + SET(${PROJECT_NAME}_ENABLE_CXX11 ON) + ENDIF() + + IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_TESTS) + SET(${PROJECT_NAME}_ENABLE_TESTS OFF) + ENDIF() + + IF(NOT DEFINED TPL_ENABLE_Pthread) + SET(TPL_ENABLE_Pthread OFF) + ENDIF() +ENDIF() + +MACRO(KOKKOS_SUBPACKAGE NAME) + if (KOKKOS_HAS_TRILINOS) + TRIBITS_SUBPACKAGE(${NAME}) + else() + SET(PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + SET(PARENT_PACKAGE_NAME ${PACKAGE_NAME}) + SET(PACKAGE_NAME ${PACKAGE_NAME}${NAME}) + STRING(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UC) + SET(${PACKAGE_NAME}_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + endif() +ENDMACRO() + +MACRO(KOKKOS_SUBPACKAGE_POSTPROCESS) + if (KOKKOS_HAS_TRILINOS) + TRIBITS_SUBPACKAGE_POSTPROCESS() + endif() +ENDMACRO() + +MACRO(KOKKOS_PACKAGE_DECL) + + if (KOKKOS_HAS_TRILINOS) + TRIBITS_PACKAGE_DECL(Kokkos) + else() + SET(PACKAGE_NAME Kokkos) + SET(${PACKAGE_NAME}_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + STRING(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UC) + endif() + + #SET(TRIBITS_DEPS_DIR "${CMAKE_SOURCE_DIR}/cmake/deps") + #FILE(GLOB TPLS_FILES "${TRIBITS_DEPS_DIR}/*.cmake") + #FOREACH(TPL_FILE ${TPLS_FILES}) + # TRIBITS_PROCESS_TPL_DEP_FILE(${TPL_FILE}) + #ENDFOREACH() + +ENDMACRO() + + +MACRO(KOKKOS_PROCESS_SUBPACKAGES) + if (KOKKOS_HAS_TRILINOS) + TRIBITS_PROCESS_SUBPACKAGES() + else() + ADD_SUBDIRECTORY(core) + ADD_SUBDIRECTORY(containers) + ADD_SUBDIRECTORY(algorithms) + ADD_SUBDIRECTORY(example) + endif() +ENDMACRO() + +MACRO(KOKKOS_PACKAGE_DEF) + if (KOKKOS_HAS_TRILINOS) + TRIBITS_PACKAGE_DEF() + else() + #do nothing + endif() +ENDMACRO() + +MACRO(KOKKOS_INTERNAL_ADD_LIBRARY_INSTALL LIBRARY_NAME) + KOKKOS_LIB_TYPE(${LIBRARY_NAME} INCTYPE) + TARGET_INCLUDE_DIRECTORIES(${LIBRARY_NAME} ${INCTYPE} $) + + INSTALL( + TARGETS ${LIBRARY_NAME} + EXPORT ${PROJECT_NAME} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT ${PACKAGE_NAME} + ) + + INSTALL( + TARGETS ${LIBRARY_NAME} + EXPORT KokkosTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + + VERIFY_EMPTY(KOKKOS_ADD_LIBRARY ${PARSE_UNPARSED_ARGUMENTS}) +ENDMACRO() + +FUNCTION(KOKKOS_ADD_EXECUTABLE EXE_NAME) + if (KOKKOS_HAS_TRILINOS) + TRIBITS_ADD_EXECUTABLE(${EXE_NAME} ${ARGN}) + else() + CMAKE_PARSE_ARGUMENTS(PARSE + "TESTONLY" + "" + "SOURCES;TESTONLYLIBS" + ${ARGN}) + + ADD_EXECUTABLE(${EXE_NAME} ${PARSE_SOURCES}) + IF (PARSE_TESTONLYLIBS) + TARGET_LINK_LIBRARIES(${EXE_NAME} ${PARSE_TESTONLYLIBS}) + ENDIF() + VERIFY_EMPTY(KOKKOS_ADD_EXECUTABLE ${PARSE_UNPARSED_ARGUMENTS}) + endif() +ENDFUNCTION() + +IF(NOT TARGET check) + ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} -VV -C ${CMAKE_CFG_INTDIR}) +ENDIF() + + +FUNCTION(KOKKOS_ADD_EXECUTABLE_AND_TEST ROOT_NAME) +IF (KOKKOS_HAS_TRILINOS) + TRIBITS_ADD_EXECUTABLE_AND_TEST( + ${ROOT_NAME} + TESTONLYLIBS kokkos_gtest + ${ARGN} + NUM_MPI_PROCS 1 + COMM serial mpi + FAIL_REGULAR_EXPRESSION " FAILED " + ) +ELSE() + CMAKE_PARSE_ARGUMENTS(PARSE + "" + "" + "SOURCES;CATEGORIES" + ${ARGN}) + VERIFY_EMPTY(KOKKOS_ADD_EXECUTABLE_AND_TEST ${PARSE_UNPARSED_ARGUMENTS}) + SET(EXE_NAME ${PACKAGE_NAME}_${ROOT_NAME}) + KOKKOS_ADD_TEST_EXECUTABLE(${EXE_NAME} + SOURCES ${PARSE_SOURCES} + ) + KOKKOS_ADD_TEST(NAME ${ROOT_NAME} + EXE ${EXE_NAME} + FAIL_REGULAR_EXPRESSION " FAILED " + ) +ENDIF() +ENDFUNCTION() + +MACRO(KOKKOS_SETUP_BUILD_ENVIRONMENT) + INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_compiler_id.cmake) + INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_enable_devices.cmake) + INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_enable_options.cmake) + INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_test_cxx_std.cmake) + INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_arch.cmake) + IF (NOT KOKKOS_HAS_TRILINOS) + SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${Kokkos_SOURCE_DIR}/cmake/Modules/") + INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_tpls.cmake) + ENDIF() + INCLUDE(${KOKKOS_SRC_PATH}/cmake/kokkos_corner_cases.cmake) +ENDMACRO() + +MACRO(KOKKOS_ADD_TEST_EXECUTABLE EXE_NAME) + CMAKE_PARSE_ARGUMENTS(PARSE + "" + "" + "SOURCES" + ${ARGN}) + KOKKOS_ADD_EXECUTABLE(${EXE_NAME} + SOURCES ${PARSE_SOURCES} + ${PARSE_UNPARSED_ARGUMENTS} + TESTONLYLIBS kokkos_gtest + ) + IF (NOT KOKKOS_HAS_TRILINOS) + ADD_DEPENDENCIES(check ${EXE_NAME}) + ENDIF() +ENDMACRO() + +MACRO(KOKKOS_PACKAGE_POSTPROCESS) + if (KOKKOS_HAS_TRILINOS) + TRIBITS_PACKAGE_POSTPROCESS() + endif() +ENDMACRO() + +FUNCTION(KOKKOS_SET_LIBRARY_PROPERTIES LIBRARY_NAME) + CMAKE_PARSE_ARGUMENTS(PARSE + "PLAIN_STYLE" + "" + "" + ${ARGN}) + + IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13") + #great, this works the "right" way + TARGET_LINK_OPTIONS( + ${LIBRARY_NAME} PUBLIC ${KOKKOS_LINK_OPTIONS} + ) + ELSE() + IF (PARSE_PLAIN_STYLE) + TARGET_LINK_LIBRARIES( + ${LIBRARY_NAME} ${KOKKOS_LINK_OPTIONS} + ) + ELSE() + #well, have to do it the wrong way for now + TARGET_LINK_LIBRARIES( + ${LIBRARY_NAME} PUBLIC ${KOKKOS_LINK_OPTIONS} + ) + ENDIF() + ENDIF() + + TARGET_COMPILE_OPTIONS( + ${LIBRARY_NAME} PUBLIC + $<$:${KOKKOS_COMPILE_OPTIONS}> + ) + + IF (KOKKOS_ENABLE_CUDA) + TARGET_COMPILE_OPTIONS( + ${LIBRARY_NAME} + PUBLIC $<$:${KOKKOS_CUDA_OPTIONS}> + ) + SET(NODEDUP_CUDAFE_OPTIONS) + FOREACH(OPT ${KOKKOS_CUDAFE_OPTIONS}) + LIST(APPEND NODEDUP_CUDAFE_OPTIONS -Xcudafe ${OPT}) + ENDFOREACH() + TARGET_COMPILE_OPTIONS( + ${LIBRARY_NAME} + PUBLIC $<$:${NODEDUP_CUDAFE_OPTIONS}> + ) + ENDIF() + + LIST(LENGTH KOKKOS_XCOMPILER_OPTIONS XOPT_LENGTH) + IF (XOPT_LENGTH GREATER 1) + MESSAGE(FATAL_ERROR "CMake deduplication does not allow multiple -Xcompiler flags (${KOKKOS_XCOMPILER_OPTIONS}): will require Kokkos to upgrade to minimum 3.12") + ENDIF() + IF(KOKKOS_XCOMPILER_OPTIONS) + SET(NODEDUP_XCOMPILER_OPTIONS) + FOREACH(OPT ${KOKKOS_XCOMPILER_OPTIONS}) + #I have to do this for now because we can't guarantee 3.12 support + #I really should do this with the shell option + LIST(APPEND NODEDUP_XCOMPILER_OPTIONS -Xcompiler) + LIST(APPEND NODEDUP_XCOMPILER_OPTIONS ${OPT}) + ENDFOREACH() + TARGET_COMPILE_OPTIONS( + ${LIBRARY_NAME} + PUBLIC $<$:${NODEDUP_XCOMPILER_OPTIONS}> + ) + ENDIF() + + IF (KOKKOS_CXX_STANDARD_FEATURE) + #GREAT! I can do this the right way + TARGET_COMPILE_FEATURES(${LIBRARY_NAME} PUBLIC ${KOKKOS_CXX_STANDARD_FEATURE}) + IF (NOT KOKKOS_USE_CXX_EXTENSIONS) + SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES CXX_EXTENSIONS OFF) + ENDIF() + ELSE() + #OH, well, no choice but the wrong way + TARGET_COMPILE_OPTIONS(${LIBRARY_NAME} PUBLIC ${KOKKOS_CXX_STANDARD_FLAG}) + ENDIF() +ENDFUNCTION() + +FUNCTION(KOKKOS_INTERNAL_ADD_LIBRARY LIBRARY_NAME) + CMAKE_PARSE_ARGUMENTS(PARSE + "STATIC;SHARED" + "" + "HEADERS;SOURCES" + ${ARGN}) + + IF(PARSE_HEADERS) + LIST(REMOVE_DUPLICATES PARSE_HEADERS) + ENDIF() + IF(PARSE_SOURCES) + LIST(REMOVE_DUPLICATES PARSE_SOURCES) + ENDIF() + + ADD_LIBRARY( + ${LIBRARY_NAME} + ${PARSE_HEADERS} + ${PARSE_SOURCES} + ) + + KOKKOS_INTERNAL_ADD_LIBRARY_INSTALL(${LIBRARY_NAME}) + + INSTALL( + FILES ${PARSE_HEADERS} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT ${PACKAGE_NAME} + ) + + #In case we are building in-tree, add an alias name + #that matches the install Kokkos:: name + ADD_LIBRARY(Kokkos::${LIBRARY_NAME} ALIAS ${LIBRARY_NAME}) +ENDFUNCTION() + +FUNCTION(KOKKOS_ADD_LIBRARY LIBRARY_NAME) + IF (KOKKOS_HAS_TRILINOS) + TRIBITS_ADD_LIBRARY(${LIBRARY_NAME} ${ARGN}) + #Stolen from Tribits - it can add prefixes + SET(TRIBITS_LIBRARY_NAME_PREFIX "${${PROJECT_NAME}_LIBRARY_NAME_PREFIX}") + SET(TRIBITS_LIBRARY_NAME ${TRIBITS_LIBRARY_NAME_PREFIX}${LIBRARY_NAME}) + #Tribits has way too much techinical debt and baggage to even + #allow PUBLIC target_compile_options to be used. It forces C++ flags on projects + #as a giant blob of space-separated strings. We end up with duplicated + #flags between the flags implicitly forced on Kokkos-dependent and those Kokkos + #has in its public INTERFACE_COMPILE_OPTIONS. + #These do NOT get de-deduplicated because Tribits + #creates flags as a giant monolithic space-separated string + #Do not set any transitive properties and keep everything working as before + #KOKKOS_SET_LIBRARY_PROPERTIES(${TRIBITS_LIBRARY_NAME} PLAIN_STYLE) + ELSE() + KOKKOS_INTERNAL_ADD_LIBRARY( + ${LIBRARY_NAME} ${ARGN}) + KOKKOS_SET_LIBRARY_PROPERTIES(${LIBRARY_NAME}) + ENDIF() +ENDFUNCTION() + +FUNCTION(KOKKOS_ADD_INTERFACE_LIBRARY NAME) +IF (KOKKOS_HAS_TRILINOS) + TRIBITS_ADD_LIBRARY(${NAME} ${ARGN}) +ELSE() + CMAKE_PARSE_ARGUMENTS(PARSE + "" + "" + "HEADERS;SOURCES" + ${ARGN} + ) + + ADD_LIBRARY(${NAME} INTERFACE) + KOKKOS_INTERNAL_ADD_LIBRARY_INSTALL(${NAME}) + + INSTALL( + FILES ${PARSE_HEADERS} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + + INSTALL( + FILES ${PARSE_HEADERS} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT ${PACKAGE_NAME} + ) +ENDIF() +ENDFUNCTION() + +FUNCTION(KOKKOS_LIB_INCLUDE_DIRECTORIES TARGET) + IF(KOKKOS_HAS_TRILINOS) + #ignore the target, tribits doesn't do anything directly with targets + TRIBITS_INCLUDE_DIRECTORIES(${ARGN}) + ELSE() #append to a list for later + KOKKOS_LIB_TYPE(${TARGET} INCTYPE) + FOREACH(DIR ${ARGN}) + TARGET_INCLUDE_DIRECTORIES(${TARGET} ${INCTYPE} $) + ENDFOREACH() + ENDIF() +ENDFUNCTION() + +FUNCTION(KOKKOS_LIB_COMPILE_OPTIONS TARGET) + IF(KOKKOS_HAS_TRILINOS) + #don't trust tribits to do this correctly + KOKKOS_TARGET_COMPILE_OPTIONS(${TARGET} ${ARGN}) + ELSE() + KOKKOS_LIB_TYPE(${TARGET} INCTYPE) + KOKKOS_TARGET_COMPILE_OPTIONS(${${PROJECT_NAME}_LIBRARY_NAME_PREFIX}${TARGET} ${INCTYPE} ${ARGN}) + ENDIF() +ENDFUNCTION() + +MACRO(KOKKOS_ADD_TEST_DIRECTORIES) + IF (KOKKOS_HAS_TRILINOS) + TRIBITS_ADD_TEST_DIRECTORIES(${ARGN}) + ELSE() + IF(KOKKOS_ENABLE_TESTS) + FOREACH(TEST_DIR ${ARGN}) + ADD_SUBDIRECTORY(${TEST_DIR}) + ENDFOREACH() + ENDIF() + ENDIF() +ENDMACRO() diff --git a/lib/kokkos/cmake/pgi.cmake b/lib/kokkos/cmake/pgi.cmake new file mode 100644 index 0000000000..e98e849558 --- /dev/null +++ b/lib/kokkos/cmake/pgi.cmake @@ -0,0 +1,8 @@ + +function(kokkos_set_pgi_flags full_standard int_standard) + STRING(TOLOWER ${full_standard} FULL_LC_STANDARD) + STRING(TOLOWER ${int_standard} INT_LC_STANDARD) + SET(KOKKOS_CXX_STANDARD_FLAG "--c++${FULL_LC_STANDARD}" PARENT_SCOPE) + SET(KOKKOS_CXX_INTERMDIATE_STANDARD_FLAG "--c++${INT_LC_STANDARD}" PARENT_SCOPE) +endfunction() + diff --git a/lib/kokkos/cmake/tpls/FindTPLCUSPARSE.cmake b/lib/kokkos/cmake/tpls/FindTPLCUSPARSE.cmake index aad1e2bad7..b8cee04804 100644 --- a/lib/kokkos/cmake/tpls/FindTPLCUSPARSE.cmake +++ b/lib/kokkos/cmake/tpls/FindTPLCUSPARSE.cmake @@ -67,7 +67,7 @@ ELSE() IF(CUDA_cusparse_LIBRARY STREQUAL "CUDA_cusparse_LIBRARY-NOTFOUND") MESSAGE(FATAL_ERROR "\nCUSPARSE: could not find cuspasre library.") ENDIF() - ENDIF(CMAKE_VERSION VERSION_LESS "2.8.8") + ENDIF() GLOBAL_SET(TPL_CUSPARSE_LIBRARY_DIRS) GLOBAL_SET(TPL_CUSPARSE_INCLUDE_DIRS ${TPL_CUDA_INCLUDE_DIRS}) GLOBAL_SET(TPL_CUSPARSE_LIBRARIES ${CUDA_cusparse_LIBRARY}) diff --git a/lib/kokkos/cmake/tpls/FindTPLHWLOC.cmake b/lib/kokkos/cmake/tpls/FindTPLHWLOC.cmake index 715b3e9bde..a4c55e1d7b 100644 --- a/lib/kokkos/cmake/tpls/FindTPLHWLOC.cmake +++ b/lib/kokkos/cmake/tpls/FindTPLHWLOC.cmake @@ -64,7 +64,7 @@ # Version: 1.3 # -TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( HWLOC +KOKKOS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( HWLOC REQUIRED_HEADERS hwloc.h REQUIRED_LIBS_NAMES "hwloc" ) diff --git a/lib/kokkos/cmake/tpls/FindTPLPthread.cmake b/lib/kokkos/cmake/tpls/FindTPLPthread.cmake index fc401d7543..4dc1a87e18 100644 --- a/lib/kokkos/cmake/tpls/FindTPLPthread.cmake +++ b/lib/kokkos/cmake/tpls/FindTPLPthread.cmake @@ -75,7 +75,7 @@ IF(USE_THREADS) SET(TPL_Pthread_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") SET(TPL_Pthread_LIBRARY_DIRS "") ELSE() - TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( Pthread + KOKKOS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( Pthread REQUIRED_HEADERS pthread.h REQUIRED_LIBS_NAMES pthread ) diff --git a/lib/kokkos/cmake/tpls/FindTPLQTHREADS.cmake b/lib/kokkos/cmake/tpls/FindTPLQTHREADS.cmake deleted file mode 100644 index c312f2590b..0000000000 --- a/lib/kokkos/cmake/tpls/FindTPLQTHREADS.cmake +++ /dev/null @@ -1,69 +0,0 @@ -# @HEADER -# ************************************************************************ -# -# Trilinos: An Object-Oriented Solver Framework -# Copyright (2001) Sandia Corporation -# -# -# Copyright (2001) Sandia Corporation. Under the terms of Contract -# DE-AC04-94AL85000, there is a non-exclusive license for use of this -# work by or on behalf of the U.S. Government. Export of this program -# may require a license from the United States Government. -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the Corporation nor the names of the -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# NOTICE: The United States Government is granted for itself and others -# acting on its behalf a paid-up, nonexclusive, irrevocable worldwide -# license in this data to reproduce, prepare derivative works, and -# perform publicly and display publicly. Beginning five (5) years from -# July 25, 2001, the United States Government is granted for itself and -# others acting on its behalf a paid-up, nonexclusive, irrevocable -# worldwide license in this data to reproduce, prepare derivative works, -# distribute copies to the public, perform publicly and display -# publicly, and to permit others to do so. -# -# NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT -# OF ENERGY, NOR SANDIA CORPORATION, NOR ANY OF THEIR EMPLOYEES, MAKES -# ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR -# RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY -# INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS -# THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS. -# -# ************************************************************************ -# @HEADER - - -#----------------------------------------------------------------------------- -# Hardware locality detection and control library. -# -# Acquisition information: -# Date checked: July 2014 -# Checked by: H. Carter Edwards -# Source: https://code.google.com/p/qthreads -# - -TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( QTHREADS - REQUIRED_HEADERS qthread.h - REQUIRED_LIBS_NAMES "qthread" - ) diff --git a/lib/kokkos/cmake/tribits.cmake b/lib/kokkos/cmake/tribits.cmake deleted file mode 100644 index 1f467f0662..0000000000 --- a/lib/kokkos/cmake/tribits.cmake +++ /dev/null @@ -1,531 +0,0 @@ -INCLUDE(CMakeParseArguments) -INCLUDE(CTest) - -cmake_policy(SET CMP0054 NEW) - -MESSAGE(STATUS "The project name is: ${PROJECT_NAME}") - -IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_OpenMP) - SET(${PROJECT_NAME}_ENABLE_OpenMP OFF) -ENDIF() - -IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_HPX) - SET(${PROJECT_NAME}_ENABLE_HPX OFF) -ENDIF() - -IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_DEBUG) - SET(${PROJECT_NAME}_ENABLE_DEBUG OFF) -ENDIF() - -IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_CXX11) - SET(${PROJECT_NAME}_ENABLE_CXX11 ON) -ENDIF() - -IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_TESTS) - SET(${PROJECT_NAME}_ENABLE_TESTS OFF) -ENDIF() - -IF(NOT DEFINED TPL_ENABLE_Pthread) - SET(TPL_ENABLE_Pthread OFF) -ENDIF() - -FUNCTION(ASSERT_DEFINED VARS) - FOREACH(VAR ${VARS}) - IF(NOT DEFINED ${VAR}) - MESSAGE(SEND_ERROR "Error, the variable ${VAR} is not defined!") - ENDIF() - ENDFOREACH() -ENDFUNCTION() - -MACRO(GLOBAL_SET VARNAME) - SET(${VARNAME} ${ARGN} CACHE INTERNAL "") -ENDMACRO() - -MACRO(PREPEND_GLOBAL_SET VARNAME) - ASSERT_DEFINED(${VARNAME}) - GLOBAL_SET(${VARNAME} ${ARGN} ${${VARNAME}}) -ENDMACRO() - -#FUNCTION(REMOVE_GLOBAL_DUPLICATES VARNAME) -# ASSERT_DEFINED(${VARNAME}) -# IF (${VARNAME}) -# SET(TMP ${${VARNAME}}) -# LIST(REMOVE_DUPLICATES TMP) -# GLOBAL_SET(${VARNAME} ${TMP}) -# ENDIF() -#ENDFUNCTION() - -#MACRO(TRIBITS_ADD_OPTION_AND_DEFINE USER_OPTION_NAME MACRO_DEFINE_NAME DOCSTRING DEFAULT_VALUE) -# MESSAGE(STATUS "TRIBITS_ADD_OPTION_AND_DEFINE: '${USER_OPTION_NAME}' '${MACRO_DEFINE_NAME}' '${DEFAULT_VALUE}'") -# SET( ${USER_OPTION_NAME} "${DEFAULT_VALUE}" CACHE BOOL "${DOCSTRING}" ) -# IF(NOT ${MACRO_DEFINE_NAME} STREQUAL "") -# IF(${USER_OPTION_NAME}) -# GLOBAL_SET(${MACRO_DEFINE_NAME} ON) -# ELSE() -# GLOBAL_SET(${MACRO_DEFINE_NAME} OFF) -# ENDIF() -# ENDIF() -#ENDMACRO() - -FUNCTION(TRIBITS_CONFIGURE_FILE PACKAGE_NAME_CONFIG_FILE) - - # Configure the file - CONFIGURE_FILE( - ${PACKAGE_SOURCE_DIR}/cmake/${PACKAGE_NAME_CONFIG_FILE}.in - ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME_CONFIG_FILE} - ) - -ENDFUNCTION() - -#MACRO(TRIBITS_ADD_DEBUG_OPTION) -# TRIBITS_ADD_OPTION_AND_DEFINE( -# ${PROJECT_NAME}_ENABLE_DEBUG -# HAVE_${PROJECT_NAME_UC}_DEBUG -# "Enable a host of runtime debug checking." -# OFF -# ) -#ENDMACRO() - - -MACRO(TRIBITS_ADD_TEST_DIRECTORIES) - IF(${${PROJECT_NAME}_ENABLE_TESTS}) - FOREACH(TEST_DIR ${ARGN}) - ADD_SUBDIRECTORY(${TEST_DIR}) - ENDFOREACH() - ENDIF() -ENDMACRO() - -MACRO(TRIBITS_ADD_EXAMPLE_DIRECTORIES) - IF(${PACKAGE_NAME}_ENABLE_EXAMPLES OR ${PARENT_PACKAGE_NAME}_ENABLE_EXAMPLES) - FOREACH(EXAMPLE_DIR ${ARGN}) - ADD_SUBDIRECTORY(${EXAMPLE_DIR}) - ENDFOREACH() - ENDIF() -ENDMACRO() - - -function(INCLUDE_DIRECTORIES) - cmake_parse_arguments(INCLUDE_DIRECTORIES "REQUIRED_DURING_INSTALLATION_TESTING" "" "" ${ARGN}) - _INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES_UNPARSED_ARGUMENTS}) -endfunction() - - -MACRO(TARGET_TRANSFER_PROPERTY TARGET_NAME PROP_IN PROP_OUT) - SET(PROP_VALUES) - FOREACH(TARGET_X ${ARGN}) - LIST(APPEND PROP_VALUES "$") - ENDFOREACH() - SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES ${PROP_OUT} "${PROP_VALUES}") -ENDMACRO() - -MACRO(ADD_INTERFACE_LIBRARY LIB_NAME) - FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "") - ADD_LIBRARY(${LIB_NAME} STATIC ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) - SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES INTERFACE TRUE) -ENDMACRO() - -# Older versions of cmake does not make include directories transitive -MACRO(TARGET_LINK_AND_INCLUDE_LIBRARIES TARGET_NAME) - TARGET_LINK_LIBRARIES(${TARGET_NAME} LINK_PUBLIC ${ARGN}) - FOREACH(DEP_LIB ${ARGN}) - TARGET_INCLUDE_DIRECTORIES(${TARGET_NAME} PUBLIC $) - TARGET_INCLUDE_DIRECTORIES(${TARGET_NAME} PUBLIC $) - ENDFOREACH() -ENDMACRO() - -FUNCTION(TRIBITS_ADD_LIBRARY LIBRARY_NAME) - - SET(options STATIC SHARED TESTONLY NO_INSTALL_LIB_OR_HEADERS CUDALIBRARY) - SET(oneValueArgs) - SET(multiValueArgs HEADERS HEADERS_INSTALL_SUBDIR NOINSTALLHEADERS SOURCES DEPLIBS IMPORTEDLIBS DEFINES ADDED_LIB_TARGET_NAME_OUT) - - CMAKE_PARSE_ARGUMENTS(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - IF(PARSE_HEADERS) - LIST(REMOVE_DUPLICATES PARSE_HEADERS) - ENDIF() - IF(PARSE_SOURCES) - LIST(REMOVE_DUPLICATES PARSE_SOURCES) - ENDIF() - - # Local variable to hold all of the libraries that will be directly linked - # to this library. - SET(LINK_LIBS ${${PACKAGE_NAME}_DEPS}) - - # Add dependent libraries passed directly in - - IF (PARSE_IMPORTEDLIBS) - LIST(APPEND LINK_LIBS ${PARSE_IMPORTEDLIBS}) - ENDIF() - - IF (PARSE_DEPLIBS) - LIST(APPEND LINK_LIBS ${PARSE_DEPLIBS}) - ENDIF() - - # Add the library and all the dependencies - - IF (PARSE_DEFINES) - ADD_DEFINITIONS(${PARSE_DEFINES}) - ENDIF() - - IF (PARSE_STATIC) - SET(STATIC_KEYWORD "STATIC") - ELSE() - SET(STATIC_KEYWORD) - ENDIF() - - IF (PARSE_SHARED) - SET(SHARED_KEYWORD "SHARED") - ELSE() - SET(SHARED_KEYWORD) - ENDIF() - - IF (PARSE_TESTONLY) - SET(EXCLUDE_FROM_ALL_KEYWORD "EXCLUDE_FROM_ALL") - ELSE() - SET(EXCLUDE_FROM_ALL_KEYWORD) - ENDIF() - IF (NOT PARSE_CUDALIBRARY) - ADD_LIBRARY( - ${LIBRARY_NAME} - ${STATIC_KEYWORD} - ${SHARED_KEYWORD} - ${EXCLUDE_FROM_ALL_KEYWORD} - ${PARSE_HEADERS} - ${PARSE_NOINSTALLHEADERS} - ${PARSE_SOURCES} - ) - ELSE() - CUDA_ADD_LIBRARY( - ${LIBRARY_NAME} - ${PARSE_HEADERS} - ${PARSE_NOINSTALLHEADERS} - ${PARSE_SOURCES} - ) - ENDIF() - - TARGET_LINK_AND_INCLUDE_LIBRARIES(${LIBRARY_NAME} ${LINK_LIBS}) - - IF (NOT PARSE_TESTONLY OR PARSE_NO_INSTALL_LIB_OR_HEADERS) - - INSTALL( - TARGETS ${LIBRARY_NAME} - EXPORT ${PROJECT_NAME} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - COMPONENT ${PACKAGE_NAME} - ) - - INSTALL( - FILES ${PARSE_HEADERS} - EXPORT ${PROJECT_NAME} - DESTINATION include - COMPONENT ${PACKAGE_NAME} - ) - - INSTALL( - DIRECTORY ${PARSE_HEADERS_INSTALL_SUBDIR} - EXPORT ${PROJECT_NAME} - DESTINATION include - COMPONENT ${PACKAGE_NAME} - ) - - ENDIF() - - IF (NOT PARSE_TESTONLY) - PREPEND_GLOBAL_SET(${PACKAGE_NAME}_LIBS ${LIBRARY_NAME}) - REMOVE_GLOBAL_DUPLICATES(${PACKAGE_NAME}_LIBS) - ENDIF() - -ENDFUNCTION() - -FUNCTION(TRIBITS_ADD_EXECUTABLE EXE_NAME) - - SET(options NOEXEPREFIX NOEXESUFFIX ADD_DIR_TO_NAME INSTALLABLE TESTONLY) - SET(oneValueArgs ADDED_EXE_TARGET_NAME_OUT) - SET(multiValueArgs SOURCES CATEGORIES HOST XHOST HOSTTYPE XHOSTTYPE DIRECTORY TESTONLYLIBS IMPORTEDLIBS DEPLIBS COMM LINKER_LANGUAGE TARGET_DEFINES DEFINES) - - CMAKE_PARSE_ARGUMENTS(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - IF (PARSE_TARGET_DEFINES) - TARGET_COMPILE_DEFINITIONS(${EXE_NAME} PUBLIC ${PARSE_TARGET_DEFINES}) - ENDIF() - - SET(LINK_LIBS PACKAGE_${PACKAGE_NAME}) - - IF (PARSE_TESTONLYLIBS) - LIST(APPEND LINK_LIBS ${PARSE_TESTONLYLIBS}) - ENDIF() - - IF (PARSE_IMPORTEDLIBS) - LIST(APPEND LINK_LIBS ${PARSE_IMPORTEDLIBS}) - ENDIF() - - SET (EXE_SOURCES) - IF(PARSE_DIRECTORY) - FOREACH( SOURCE_FILE ${PARSE_SOURCES} ) - IF(IS_ABSOLUTE ${SOURCE_FILE}) - SET (EXE_SOURCES ${EXE_SOURCES} ${SOURCE_FILE}) - ELSE() - SET (EXE_SOURCES ${EXE_SOURCES} ${PARSE_DIRECTORY}/${SOURCE_FILE}) - ENDIF() - ENDFOREACH( ) - ELSE() - FOREACH( SOURCE_FILE ${PARSE_SOURCES} ) - SET (EXE_SOURCES ${EXE_SOURCES} ${SOURCE_FILE}) - ENDFOREACH( ) - ENDIF() - - SET(EXE_BINARY_NAME ${EXE_NAME}) - IF(DEFINED PACKAGE_NAME AND NOT PARSE_NOEXEPREFIX) - SET(EXE_BINARY_NAME ${PACKAGE_NAME}_${EXE_BINARY_NAME}) - ENDIF() - - # IF (PARSE_TESTONLY) - # SET(EXCLUDE_FROM_ALL_KEYWORD "EXCLUDE_FROM_ALL") - # ELSE() - # SET(EXCLUDE_FROM_ALL_KEYWORD) - # ENDIF() - ADD_EXECUTABLE(${EXE_BINARY_NAME} ${EXCLUDE_FROM_ALL_KEYWORD} ${EXE_SOURCES}) - - TARGET_LINK_AND_INCLUDE_LIBRARIES(${EXE_BINARY_NAME} ${LINK_LIBS}) - - IF(PARSE_ADDED_EXE_TARGET_NAME_OUT) - SET(${PARSE_ADDED_EXE_TARGET_NAME_OUT} ${EXE_BINARY_NAME} PARENT_SCOPE) - ENDIF() - - IF(PARSE_INSTALLABLE) - INSTALL( - TARGETS ${EXE_BINARY_NAME} - EXPORT ${PROJECT_NAME} - DESTINATION bin - ) - ENDIF() -ENDFUNCTION() - -IF(NOT TARGET check) - ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} -VV -C ${CMAKE_CFG_INTDIR}) -ENDIF() - -FUNCTION(TRIBITS_ADD_TEST) -ENDFUNCTION() -FUNCTION(TRIBITS_TPL_TENTATIVELY_ENABLE) -ENDFUNCTION() - -FUNCTION(TRIBITS_ADD_ADVANCED_TEST) - # TODO Write this -ENDFUNCTION() - -FUNCTION(TRIBITS_ADD_EXECUTABLE_AND_TEST EXE_NAME) - - SET(options STANDARD_PASS_OUTPUT WILL_FAIL) - SET(oneValueArgs PASS_REGULAR_EXPRESSION FAIL_REGULAR_EXPRESSION ENVIRONMENT TIMEOUT CATEGORIES ADDED_TESTS_NAMES_OUT ADDED_EXE_TARGET_NAME_OUT) - SET(multiValueArgs) - - CMAKE_PARSE_ARGUMENTS(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - TRIBITS_ADD_EXECUTABLE(${EXE_NAME} TESTONLY ADDED_EXE_TARGET_NAME_OUT TEST_NAME ${PARSE_UNPARSED_ARGUMENTS}) - - IF(WIN32) - ADD_TEST(NAME ${TEST_NAME} WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH} COMMAND ${TEST_NAME}${CMAKE_EXECUTABLE_SUFFIX}) - ELSE() - ADD_TEST(NAME ${TEST_NAME} COMMAND ${TEST_NAME}) - ENDIF() - ADD_DEPENDENCIES(check ${TEST_NAME}) - - IF(PARSE_FAIL_REGULAR_EXPRESSION) - SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION ${PARSE_FAIL_REGULAR_EXPRESSION}) - ENDIF() - - IF(PARSE_PASS_REGULAR_EXPRESSION) - SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES PASS_REGULAR_EXPRESSION ${PARSE_PASS_REGULAR_EXPRESSION}) - ENDIF() - - IF(PARSE_WILL_FAIL) - SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES WILL_FAIL ${PARSE_WILL_FAIL}) - ENDIF() - - IF(PARSE_ADDED_TESTS_NAMES_OUT) - SET(${PARSE_ADDED_TESTS_NAMES_OUT} ${TEST_NAME} PARENT_SCOPE) - ENDIF() - - IF(PARSE_ADDED_EXE_TARGET_NAME_OUT) - SET(${PARSE_ADDED_EXE_TARGET_NAME_OUT} ${TEST_NAME} PARENT_SCOPE) - ENDIF() - -ENDFUNCTION() - -MACRO(TIBITS_CREATE_IMPORTED_TPL_LIBRARY TPL_NAME) - ADD_INTERFACE_LIBRARY(TPL_LIB_${TPL_NAME}) - TARGET_LINK_LIBRARIES(TPL_LIB_${TPL_NAME} LINK_PUBLIC ${TPL_${TPL_NAME}_LIBRARIES}) - TARGET_INCLUDE_DIRECTORIES(TPL_LIB_${TPL_NAME} INTERFACE ${TPL_${TPL_NAME}_INCLUDE_DIRS}) -ENDMACRO() - -FUNCTION(TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES TPL_NAME) - - SET(options MUST_FIND_ALL_LIBS MUST_FIND_ALL_HEADERS NO_PRINT_ENABLE_SUCCESS_FAIL) - SET(oneValueArgs) - SET(multiValueArgs REQUIRED_HEADERS REQUIRED_LIBS_NAMES) - - CMAKE_PARSE_ARGUMENTS(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - SET(_${TPL_NAME}_ENABLE_SUCCESS TRUE) - IF (PARSE_REQUIRED_LIBS_NAMES) - FIND_LIBRARY(TPL_${TPL_NAME}_LIBRARIES NAMES ${PARSE_REQUIRED_LIBS_NAMES}) - IF(NOT TPL_${TPL_NAME}_LIBRARIES) - SET(_${TPL_NAME}_ENABLE_SUCCESS FALSE) - ENDIF() - ENDIF() - IF (PARSE_REQUIRED_HEADERS) - FIND_PATH(TPL_${TPL_NAME}_INCLUDE_DIRS NAMES ${PARSE_REQUIRED_HEADERS}) - IF(NOT TPL_${TPL_NAME}_INCLUDE_DIRS) - SET(_${TPL_NAME}_ENABLE_SUCCESS FALSE) - ENDIF() - ENDIF() - - - IF (_${TPL_NAME}_ENABLE_SUCCESS) - TIBITS_CREATE_IMPORTED_TPL_LIBRARY(${TPL_NAME}) - ENDIF() - -ENDFUNCTION() - -#MACRO(TRIBITS_PROCESS_TPL_DEP_FILE TPL_FILE) -# GET_FILENAME_COMPONENT(TPL_NAME ${TPL_FILE} NAME_WE) -# INCLUDE("${TPL_FILE}") -# IF(TARGET TPL_LIB_${TPL_NAME}) -# MESSAGE(STATUS "Found tpl library: ${TPL_NAME}") -# SET(TPL_ENABLE_${TPL_NAME} TRUE) -# ELSE() -# MESSAGE(STATUS "Tpl library not found: ${TPL_NAME}") -# SET(TPL_ENABLE_${TPL_NAME} FALSE) -# ENDIF() -#ENDMACRO() - -MACRO(PREPEND_TARGET_SET VARNAME TARGET_NAME TYPE) - IF(TYPE STREQUAL "REQUIRED") - SET(REQUIRED TRUE) - ELSE() - SET(REQUIRED FALSE) - ENDIF() - IF(TARGET ${TARGET_NAME}) - PREPEND_GLOBAL_SET(${VARNAME} ${TARGET_NAME}) - ELSE() - IF(REQUIRED) - MESSAGE(FATAL_ERROR "Missing dependency ${TARGET_NAME}") - ENDIF() - ENDIF() -ENDMACRO() - -MACRO(TRIBITS_APPEND_PACKAGE_DEPS DEP_LIST TYPE) - FOREACH(DEP ${ARGN}) - PREPEND_GLOBAL_SET(${DEP_LIST} PACKAGE_${DEP}) - ENDFOREACH() -ENDMACRO() - -MACRO(TRIBITS_APPEND_TPLS_DEPS DEP_LIST TYPE) - FOREACH(DEP ${ARGN}) - PREPEND_TARGET_SET(${DEP_LIST} TPL_LIB_${DEP} ${TYPE}) - ENDFOREACH() -ENDMACRO() - -MACRO(TRIBITS_ENABLE_TPLS) - FOREACH(TPL ${ARGN}) - IF(TARGET ${TPL}) - GLOBAL_SET(${PACKAGE_NAME}_ENABLE_${TPL} TRUE) - ELSE() - GLOBAL_SET(${PACKAGE_NAME}_ENABLE_${TPL} FALSE) - ENDIF() - ENDFOREACH() -ENDMACRO() - -MACRO(TRIBITS_PACKAGE_DEFINE_DEPENDENCIES) - - SET(options) - SET(oneValueArgs) - SET(multiValueArgs - LIB_REQUIRED_PACKAGES - LIB_OPTIONAL_PACKAGES - TEST_REQUIRED_PACKAGES - TEST_OPTIONAL_PACKAGES - LIB_REQUIRED_TPLS - LIB_OPTIONAL_TPLS - TEST_REQUIRED_TPLS - TEST_OPTIONAL_TPLS - REGRESSION_EMAIL_LIST - SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS - ) - CMAKE_PARSE_ARGUMENTS(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - GLOBAL_SET(${PACKAGE_NAME}_DEPS "") - TRIBITS_APPEND_PACKAGE_DEPS(${PACKAGE_NAME}_DEPS REQUIRED ${PARSE_LIB_REQUIRED_PACKAGES}) - TRIBITS_APPEND_PACKAGE_DEPS(${PACKAGE_NAME}_DEPS OPTIONAL ${PARSE_LIB_OPTIONAL_PACKAGES}) - TRIBITS_APPEND_TPLS_DEPS(${PACKAGE_NAME}_DEPS REQUIRED ${PARSE_LIB_REQUIRED_TPLS}) - TRIBITS_APPEND_TPLS_DEPS(${PACKAGE_NAME}_DEPS OPTIONAL ${PARSE_LIB_OPTIONAL_TPLS}) - - GLOBAL_SET(${PACKAGE_NAME}_TEST_DEPS "") - TRIBITS_APPEND_PACKAGE_DEPS(${PACKAGE_NAME}_TEST_DEPS REQUIRED ${PARSE_TEST_REQUIRED_PACKAGES}) - TRIBITS_APPEND_PACKAGE_DEPS(${PACKAGE_NAME}_TEST_DEPS OPTIONAL ${PARSE_TEST_OPTIONAL_PACKAGES}) - TRIBITS_APPEND_TPLS_DEPS(${PACKAGE_NAME}_TEST_DEPS REQUIRED ${PARSE_TEST_REQUIRED_TPLS}) - TRIBITS_APPEND_TPLS_DEPS(${PACKAGE_NAME}_TEST_DEPS OPTIONAL ${PARSE_TEST_OPTIONAL_TPLS}) - - TRIBITS_ENABLE_TPLS(${PARSE_LIB_REQUIRED_TPLS} ${PARSE_LIB_OPTIONAL_TPLS} ${PARSE_TEST_REQUIRED_TPLS} ${PARSE_TEST_OPTIONAL_TPLS}) - -ENDMACRO() - -MACRO(TRIBITS_SUBPACKAGE NAME) - SET(PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - SET(PARENT_PACKAGE_NAME ${PACKAGE_NAME}) - SET(PACKAGE_NAME ${PACKAGE_NAME}${NAME}) - STRING(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UC) - SET(${PACKAGE_NAME}_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - - ADD_INTERFACE_LIBRARY(PACKAGE_${PACKAGE_NAME}) - - GLOBAL_SET(${PACKAGE_NAME}_LIBS "") - - INCLUDE(${PACKAGE_SOURCE_DIR}/cmake/Dependencies.cmake) - -ENDMACRO(TRIBITS_SUBPACKAGE) - -MACRO(TRIBITS_SUBPACKAGE_POSTPROCESS) - TARGET_LINK_AND_INCLUDE_LIBRARIES(PACKAGE_${PACKAGE_NAME} ${${PACKAGE_NAME}_LIBS}) -ENDMACRO(TRIBITS_SUBPACKAGE_POSTPROCESS) - -MACRO(TRIBITS_PACKAGE_DECL NAME) - - SET(PACKAGE_NAME ${NAME}) - SET(${PACKAGE_NAME}_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - STRING(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UC) - - #SET(TRIBITS_DEPS_DIR "${CMAKE_SOURCE_DIR}/cmake/deps") - #FILE(GLOB TPLS_FILES "${TRIBITS_DEPS_DIR}/*.cmake") - #FOREACH(TPL_FILE ${TPLS_FILES}) - # TRIBITS_PROCESS_TPL_DEP_FILE(${TPL_FILE}) - #ENDFOREACH() - -ENDMACRO() - - -MACRO(TRIBITS_PROCESS_SUBPACKAGES) - FILE(GLOB SUBPACKAGES RELATIVE ${CMAKE_SOURCE_DIR} */cmake/Dependencies.cmake) - FOREACH(SUBPACKAGE ${SUBPACKAGES}) - GET_FILENAME_COMPONENT(SUBPACKAGE_CMAKE ${SUBPACKAGE} DIRECTORY) - GET_FILENAME_COMPONENT(SUBPACKAGE_DIR ${SUBPACKAGE_CMAKE} DIRECTORY) - ADD_SUBDIRECTORY(${CMAKE_BINARY_DIR}/../${SUBPACKAGE_DIR}) - ENDFOREACH() -ENDMACRO(TRIBITS_PROCESS_SUBPACKAGES) - -MACRO(TRIBITS_PACKAGE_DEF) -ENDMACRO(TRIBITS_PACKAGE_DEF) - -MACRO(TRIBITS_EXCLUDE_AUTOTOOLS_FILES) -ENDMACRO(TRIBITS_EXCLUDE_AUTOTOOLS_FILES) - -MACRO(TRIBITS_EXCLUDE_FILES) -ENDMACRO(TRIBITS_EXCLUDE_FILES) - -MACRO(TRIBITS_PACKAGE_POSTPROCESS) -ENDMACRO(TRIBITS_PACKAGE_POSTPROCESS) - diff --git a/lib/kokkos/containers/CMakeLists.txt b/lib/kokkos/containers/CMakeLists.txt index c37aa3e3e2..2bfaea7a13 100644 --- a/lib/kokkos/containers/CMakeLists.txt +++ b/lib/kokkos/containers/CMakeLists.txt @@ -1,13 +1,10 @@ - - -TRIBITS_SUBPACKAGE(Containers) - - -IF(KOKKOS_HAS_TRILINOS) - ADD_SUBDIRECTORY(src) -ENDIF() - -TRIBITS_ADD_TEST_DIRECTORIES(unit_tests) -TRIBITS_ADD_TEST_DIRECTORIES(performance_tests) - -TRIBITS_SUBPACKAGE_POSTPROCESS() + + +KOKKOS_SUBPACKAGE(Containers) + +ADD_SUBDIRECTORY(src) + +KOKKOS_ADD_TEST_DIRECTORIES(unit_tests) +KOKKOS_ADD_TEST_DIRECTORIES(performance_tests) + +KOKKOS_SUBPACKAGE_POSTPROCESS() diff --git a/lib/kokkos/containers/performance_tests/CMakeLists.txt b/lib/kokkos/containers/performance_tests/CMakeLists.txt index 3c6584bc34..ca76808190 100644 --- a/lib/kokkos/containers/performance_tests/CMakeLists.txt +++ b/lib/kokkos/containers/performance_tests/CMakeLists.txt @@ -1,49 +1,62 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../src ) +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +KOKKOS_INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}) +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../src ) -IF(NOT KOKKOS_HAS_TRILINOS) - IF(KOKKOS_SEPARATE_LIBS) - set(TEST_LINK_TARGETS kokkoscore) - ELSE() - set(TEST_LINK_TARGETS kokkos) - ENDIF() +IF(Kokkos_ENABLE_CUDA) + SET(SOURCES + TestMain.cpp + TestCuda.cpp + ) + + KOKKOS_ADD_TEST_EXECUTABLE( PerfTestExec_Cuda + SOURCES ${SOURCES} + ) + + KOKKOS_ADD_TEST( NAME PerformanceTest_Cuda + EXE PerfTestExec_Cuda + ) ENDIF() -SET(SOURCES - TestMain.cpp - TestCuda.cpp - ) +IF(Kokkos_ENABLE_PTHREAD) + SET(SOURCES + TestMain.cpp + TestThreads.cpp + ) + KOKKOS_ADD_TEST_EXECUTABLE( PerfTestExec_Threads + SOURCES ${SOURCES} + ) -IF(Kokkos_ENABLE_Pthread) - LIST( APPEND SOURCES TestThreads.cpp) + KOKKOS_ADD_TEST( NAME PerformanceTest_Threads + EXE PerfTestExec_Threads + ) ENDIF() -IF(Kokkos_ENABLE_OpenMP) - LIST( APPEND SOURCES TestOpenMP.cpp) +IF(Kokkos_ENABLE_OPENMP) + SET(SOURCES + TestMain.cpp + TestOpenMP.cpp + ) + KOKKOS_ADD_TEST_EXECUTABLE( PerfTestExec_OpenMP + SOURCES ${SOURCES} + ) + + KOKKOS_ADD_TEST( NAME PerformanceTest_OpenMP + EXE PerfTestExec_OpenMP + ) ENDIF() IF(Kokkos_ENABLE_HPX) - LIST( APPEND SOURCES TestHPX.cpp) + SET(SOURCES + TestMain.cpp + TestHPX.cpp + ) + KOKKOS_ADD_TEST_EXECUTABLE( PerfTestExec_HPX + SOURCES ${SOURCES} + ) + + KOKKOS_ADD_TEST( NAME PerformanceTest_HPX + EXE PerfTestExec_HPX + ) ENDIF() -# Per #374, we always want to build this test, but we only want to run -# it as a PERFORMANCE test. That's why we separate building the test -# from running the test. - -TRIBITS_ADD_EXECUTABLE( - PerfTestExec - SOURCES ${SOURCES} - COMM serial mpi - TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS} - ) - -TRIBITS_ADD_TEST( - PerformanceTest - NAME PerfTestExec - COMM serial mpi - NUM_MPI_PROCS 1 - CATEGORIES PERFORMANCE - FAIL_REGULAR_EXPRESSION " FAILED " - ) diff --git a/lib/kokkos/containers/performance_tests/TestCuda.cpp b/lib/kokkos/containers/performance_tests/TestCuda.cpp index 351fb86df3..697a006c3c 100644 --- a/lib/kokkos/containers/performance_tests/TestCuda.cpp +++ b/lib/kokkos/containers/performance_tests/TestCuda.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,7 +43,7 @@ */ #include -#if defined( KOKKOS_ENABLE_CUDA ) +#if defined(KOKKOS_ENABLE_CUDA) #include #include @@ -66,45 +67,38 @@ namespace Performance { class cuda : public ::testing::Test { -protected: - static void SetUpTestCase() - { + protected: + static void SetUpTestCase() { std::cout << std::setprecision(5) << std::scientific; Kokkos::InitArguments args(-1, -1, 0); Kokkos::initialize(args); } - static void TearDownTestCase() - { - Kokkos::finalize(); - } + static void TearDownTestCase() { Kokkos::finalize(); } }; -TEST_F( cuda, dynrankview_perf ) -{ +TEST_F(cuda, dynrankview_perf) { std::cout << "Cuda" << std::endl; std::cout << " DynRankView vs View: Initialization Only " << std::endl; - test_dynrankview_op_perf( 40960 ); + test_dynrankview_op_perf(40960); } -TEST_F( cuda, global_2_local) -{ +TEST_F(cuda, global_2_local) { std::cout << "Cuda" << std::endl; std::cout << "size, create, generate, fill, find" << std::endl; - for (unsigned i=Performance::begin_id_size; i<=Performance::end_id_size; i *= Performance::id_step) + for (unsigned i = Performance::begin_id_size; i <= Performance::end_id_size; + i *= Performance::id_step) test_global_to_local_ids(i); } -TEST_F( cuda, unordered_map_performance_near) -{ - Perf::run_performance_tests("cuda-near"); +TEST_F(cuda, unordered_map_performance_near) { + Perf::run_performance_tests("cuda-near"); } -TEST_F( cuda, unordered_map_performance_far) -{ - Perf::run_performance_tests("cuda-far"); +TEST_F(cuda, unordered_map_performance_far) { + Perf::run_performance_tests("cuda-far"); } -} +} // namespace Performance #else void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTCUDA_PREVENT_EMPTY_LINK_ERROR() {} -#endif /* #if defined( KOKKOS_ENABLE_CUDA ) */ +#endif /* #if defined( KOKKOS_ENABLE_CUDA ) */ diff --git a/lib/kokkos/containers/performance_tests/TestDynRankView.hpp b/lib/kokkos/containers/performance_tests/TestDynRankView.hpp index db6274e057..ee13f7e58b 100644 --- a/lib/kokkos/containers/performance_tests/TestDynRankView.hpp +++ b/lib/kokkos/containers/performance_tests/TestDynRankView.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -49,109 +50,102 @@ #include -// Compare performance of DynRankView to View, specific focus on the parenthesis operators +// Compare performance of DynRankView to View, specific focus on the parenthesis +// operators namespace Performance { -//View functor +// View functor template struct InitViewFunctor { - typedef Kokkos::View inviewtype; + typedef Kokkos::View inviewtype; inviewtype _inview; - InitViewFunctor( inviewtype &inview_ ) : _inview(inview_) - {} + InitViewFunctor(inviewtype &inview_) : _inview(inview_) {} KOKKOS_INLINE_FUNCTION void operator()(const int i) const { for (unsigned j = 0; j < _inview.extent(1); ++j) { for (unsigned k = 0; k < _inview.extent(2); ++k) { - _inview(i,j,k) = i/2 -j*j + k/3; + _inview(i, j, k) = i / 2 - j * j + k / 3; } } } - struct SumComputationTest - { - typedef Kokkos::View inviewtype; + struct SumComputationTest { + typedef Kokkos::View inviewtype; inviewtype _inview; - typedef Kokkos::View outviewtype; + typedef Kokkos::View outviewtype; outviewtype _outview; KOKKOS_INLINE_FUNCTION - SumComputationTest(inviewtype &inview_ , outviewtype &outview_) : _inview(inview_), _outview(outview_) {} + SumComputationTest(inviewtype &inview_, outviewtype &outview_) + : _inview(inview_), _outview(outview_) {} KOKKOS_INLINE_FUNCTION void operator()(const int i) const { for (unsigned j = 0; j < _inview.extent(1); ++j) { for (unsigned k = 0; k < _inview.extent(2); ++k) { - _outview(i) += _inview(i,j,k) ; + _outview(i) += _inview(i, j, k); } } } }; - }; template struct InitStrideViewFunctor { - typedef Kokkos::View inviewtype; + typedef Kokkos::View inviewtype; inviewtype _inview; - InitStrideViewFunctor( inviewtype &inview_ ) : _inview(inview_) - {} + InitStrideViewFunctor(inviewtype &inview_) : _inview(inview_) {} KOKKOS_INLINE_FUNCTION void operator()(const int i) const { for (unsigned j = 0; j < _inview.extent(1); ++j) { for (unsigned k = 0; k < _inview.extent(2); ++k) { - _inview(i,j,k) = i/2 -j*j + k/3; + _inview(i, j, k) = i / 2 - j * j + k / 3; } } } - }; template struct InitViewRank7Functor { - typedef Kokkos::View inviewtype; + typedef Kokkos::View inviewtype; inviewtype _inview; - InitViewRank7Functor( inviewtype &inview_ ) : _inview(inview_) - {} + InitViewRank7Functor(inviewtype &inview_) : _inview(inview_) {} KOKKOS_INLINE_FUNCTION void operator()(const int i) const { for (unsigned j = 0; j < _inview.extent(1); ++j) { for (unsigned k = 0; k < _inview.extent(2); ++k) { - _inview(i,j,k,0,0,0,0) = i/2 -j*j + k/3; + _inview(i, j, k, 0, 0, 0, 0) = i / 2 - j * j + k / 3; } } } - }; -//DynRankView functor +// DynRankView functor template struct InitDynRankViewFunctor { typedef Kokkos::DynRankView inviewtype; inviewtype _inview; - InitDynRankViewFunctor( inviewtype &inview_ ) : _inview(inview_) - {} + InitDynRankViewFunctor(inviewtype &inview_) : _inview(inview_) {} KOKKOS_INLINE_FUNCTION void operator()(const int i) const { for (unsigned j = 0; j < _inview.extent(1); ++j) { for (unsigned k = 0; k < _inview.extent(2); ++k) { - _inview(i,j,k) = i/2 -j*j + k/3; + _inview(i, j, k) = i / 2 - j * j + k / 3; } } } - struct SumComputationTest - { + struct SumComputationTest { typedef Kokkos::DynRankView inviewtype; inviewtype _inview; @@ -159,108 +153,121 @@ struct InitDynRankViewFunctor { outviewtype _outview; KOKKOS_INLINE_FUNCTION - SumComputationTest(inviewtype &inview_ , outviewtype &outview_) : _inview(inview_), _outview(outview_) {} + SumComputationTest(inviewtype &inview_, outviewtype &outview_) + : _inview(inview_), _outview(outview_) {} KOKKOS_INLINE_FUNCTION void operator()(const int i) const { for (unsigned j = 0; j < _inview.extent(1); ++j) { for (unsigned k = 0; k < _inview.extent(2); ++k) { - _outview(i) += _inview(i,j,k) ; + _outview(i) += _inview(i, j, k); } } } }; - }; - template -void test_dynrankview_op_perf( const int par_size ) -{ - +void test_dynrankview_op_perf(const int par_size) { typedef DeviceType execution_space; typedef typename execution_space::size_type size_type; const size_type dim_2 = 90; const size_type dim_3 = 30; - double elapsed_time_view = 0; - double elapsed_time_compview = 0; + double elapsed_time_view = 0; + double elapsed_time_compview = 0; double elapsed_time_strideview = 0; double elapsed_time_view_rank7 = 0; - double elapsed_time_drview = 0; + double elapsed_time_drview = 0; double elapsed_time_compdrview = 0; Kokkos::Timer timer; { - Kokkos::View testview("testview",par_size,dim_2,dim_3); + Kokkos::View testview("testview", par_size, dim_2, + dim_3); typedef InitViewFunctor FunctorType; timer.reset(); - Kokkos::RangePolicy policy(0,par_size); - Kokkos::parallel_for( policy , FunctorType(testview) ); + Kokkos::RangePolicy policy(0, par_size); + Kokkos::parallel_for(policy, FunctorType(testview)); DeviceType().fence(); elapsed_time_view = timer.seconds(); std::cout << " View time (init only): " << elapsed_time_view << std::endl; - timer.reset(); - Kokkos::View sumview("sumview",par_size); - Kokkos::parallel_for( policy , typename FunctorType::SumComputationTest(testview, sumview) ); + Kokkos::View sumview("sumview", par_size); + Kokkos::parallel_for( + policy, typename FunctorType::SumComputationTest(testview, sumview)); DeviceType().fence(); elapsed_time_compview = timer.seconds(); - std::cout << " View sum computation time: " << elapsed_time_view << std::endl; + std::cout << " View sum computation time: " << elapsed_time_view + << std::endl; - - Kokkos::View teststrideview = Kokkos::subview(testview, Kokkos::ALL, Kokkos::ALL,Kokkos::ALL); + Kokkos::View teststrideview = + Kokkos::subview(testview, Kokkos::ALL, Kokkos::ALL, Kokkos::ALL); typedef InitStrideViewFunctor FunctorStrideType; timer.reset(); - Kokkos::parallel_for( policy , FunctorStrideType(teststrideview) ); + Kokkos::parallel_for(policy, FunctorStrideType(teststrideview)); DeviceType().fence(); elapsed_time_strideview = timer.seconds(); - std::cout << " Strided View time (init only): " << elapsed_time_strideview << std::endl; + std::cout << " Strided View time (init only): " << elapsed_time_strideview + << std::endl; } { - Kokkos::View testview("testview",par_size,dim_2,dim_3,1,1,1,1); + Kokkos::View testview("testview", par_size, + dim_2, dim_3, 1, 1, 1, 1); typedef InitViewRank7Functor FunctorType; timer.reset(); - Kokkos::RangePolicy policy(0,par_size); - Kokkos::parallel_for( policy , FunctorType(testview) ); + Kokkos::RangePolicy policy(0, par_size); + Kokkos::parallel_for(policy, FunctorType(testview)); DeviceType().fence(); elapsed_time_view_rank7 = timer.seconds(); - std::cout << " View Rank7 time (init only): " << elapsed_time_view_rank7 << std::endl; + std::cout << " View Rank7 time (init only): " << elapsed_time_view_rank7 + << std::endl; } { - Kokkos::DynRankView testdrview("testdrview",par_size,dim_2,dim_3); + Kokkos::DynRankView testdrview("testdrview", par_size, + dim_2, dim_3); typedef InitDynRankViewFunctor FunctorType; timer.reset(); - Kokkos::RangePolicy policy(0,par_size); - Kokkos::parallel_for( policy , FunctorType(testdrview) ); + Kokkos::RangePolicy policy(0, par_size); + Kokkos::parallel_for(policy, FunctorType(testdrview)); DeviceType().fence(); elapsed_time_drview = timer.seconds(); - std::cout << " DynRankView time (init only): " << elapsed_time_drview << std::endl; + std::cout << " DynRankView time (init only): " << elapsed_time_drview + << std::endl; timer.reset(); - Kokkos::DynRankView sumview("sumview",par_size); - Kokkos::parallel_for( policy , typename FunctorType::SumComputationTest(testdrview, sumview) ); + Kokkos::DynRankView sumview("sumview", par_size); + Kokkos::parallel_for( + policy, typename FunctorType::SumComputationTest(testdrview, sumview)); DeviceType().fence(); elapsed_time_compdrview = timer.seconds(); - std::cout << " DynRankView sum computation time: " << elapsed_time_compdrview << std::endl; - + std::cout << " DynRankView sum computation time: " + << elapsed_time_compdrview << std::endl; } - std::cout << " Ratio of View to DynRankView time: " << elapsed_time_view / elapsed_time_drview << std::endl; //expect < 1 - std::cout << " Ratio of View to DynRankView sum computation time: " << elapsed_time_compview / elapsed_time_compdrview << std::endl; //expect < 1 - std::cout << " Ratio of View to View Rank7 time: " << elapsed_time_view / elapsed_time_view_rank7 << std::endl; //expect < 1 - std::cout << " Ratio of StrideView to DynRankView time: " << elapsed_time_strideview / elapsed_time_drview << std::endl; //expect < 1 - std::cout << " Ratio of DynRankView to View Rank7 time: " << elapsed_time_drview / elapsed_time_view_rank7 << std::endl; //expect ? + std::cout << " Ratio of View to DynRankView time: " + << elapsed_time_view / elapsed_time_drview + << std::endl; // expect < 1 + std::cout << " Ratio of View to DynRankView sum computation time: " + << elapsed_time_compview / elapsed_time_compdrview + << std::endl; // expect < 1 + std::cout << " Ratio of View to View Rank7 time: " + << elapsed_time_view / elapsed_time_view_rank7 + << std::endl; // expect < 1 + std::cout << " Ratio of StrideView to DynRankView time: " + << elapsed_time_strideview / elapsed_time_drview + << std::endl; // expect < 1 + std::cout << " Ratio of DynRankView to View Rank7 time: " + << elapsed_time_drview / elapsed_time_view_rank7 + << std::endl; // expect ? timer.reset(); -} //end test_dynrankview +} // end test_dynrankview - -} //end Performance +} // namespace Performance #endif - diff --git a/lib/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp b/lib/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp index 98997b3239..0d2ee4bc8d 100644 --- a/lib/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp +++ b/lib/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp @@ -1,12 +1,13 @@ //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -35,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER @@ -54,153 +55,137 @@ namespace Performance { static const unsigned begin_id_size = 256u; -static const unsigned end_id_size = 1u << 22; -static const unsigned id_step = 2u; +static const unsigned end_id_size = 1u << 22; +static const unsigned id_step = 2u; -union helper -{ +union helper { uint32_t word; uint8_t byte[4]; }; - template -struct generate_ids -{ +struct generate_ids { typedef Device execution_space; typedef typename execution_space::size_type size_type; - typedef Kokkos::View local_id_view; + typedef Kokkos::View local_id_view; local_id_view local_2_global; - generate_ids( local_id_view & ids) - : local_2_global(ids) - { + generate_ids(local_id_view& ids) : local_2_global(ids) { Kokkos::parallel_for(local_2_global.extent(0), *this); } - KOKKOS_INLINE_FUNCTION - void operator()(size_type i) const - { - + void operator()(size_type i) const { helper x = {static_cast(i)}; // shuffle the bytes of i to create a unique, semi-random global_id x.word = ~x.word; uint8_t tmp = x.byte[3]; - x.byte[3] = x.byte[1]; - x.byte[1] = tmp; + x.byte[3] = x.byte[1]; + x.byte[1] = tmp; - tmp = x.byte[2]; + tmp = x.byte[2]; x.byte[2] = x.byte[0]; x.byte[0] = tmp; local_2_global[i] = x.word; } - }; template -struct fill_map -{ +struct fill_map { typedef Device execution_space; typedef typename execution_space::size_type size_type; - typedef Kokkos::View local_id_view; - typedef Kokkos::UnorderedMap global_id_view; + typedef Kokkos::View + local_id_view; + typedef Kokkos::UnorderedMap + global_id_view; global_id_view global_2_local; local_id_view local_2_global; - fill_map( global_id_view gIds, local_id_view lIds) - : global_2_local(gIds) , local_2_global(lIds) - { + fill_map(global_id_view gIds, local_id_view lIds) + : global_2_local(gIds), local_2_global(lIds) { Kokkos::parallel_for(local_2_global.extent(0), *this); } KOKKOS_INLINE_FUNCTION - void operator()(size_type i) const - { - global_2_local.insert( local_2_global[i], i); + void operator()(size_type i) const { + global_2_local.insert(local_2_global[i], i); } - }; template -struct find_test -{ +struct find_test { typedef Device execution_space; typedef typename execution_space::size_type size_type; - typedef Kokkos::View local_id_view; - typedef Kokkos::UnorderedMap global_id_view; + typedef Kokkos::View + local_id_view; + typedef Kokkos::UnorderedMap + global_id_view; global_id_view global_2_local; local_id_view local_2_global; typedef size_t value_type; - find_test( global_id_view gIds, local_id_view lIds, value_type & num_errors) - : global_2_local(gIds) , local_2_global(lIds) - { + find_test(global_id_view gIds, local_id_view lIds, value_type& num_errors) + : global_2_local(gIds), local_2_global(lIds) { Kokkos::parallel_reduce(local_2_global.extent(0), *this, num_errors); } KOKKOS_INLINE_FUNCTION - void init(value_type & v) const - { v = 0; } + void init(value_type& v) const { v = 0; } KOKKOS_INLINE_FUNCTION - void join(volatile value_type & dst, volatile value_type const & src) const - { dst += src; } - - KOKKOS_INLINE_FUNCTION - void operator()(size_type i, value_type & num_errors) const - { - uint32_t index = global_2_local.find( local_2_global[i] ); - - if ( global_2_local.value_at(index) != i) ++num_errors; + void join(volatile value_type& dst, volatile value_type const& src) const { + dst += src; } + KOKKOS_INLINE_FUNCTION + void operator()(size_type i, value_type& num_errors) const { + uint32_t index = global_2_local.find(local_2_global[i]); + + if (global_2_local.value_at(index) != i) ++num_errors; + } }; template -void test_global_to_local_ids(unsigned num_ids) -{ - +void test_global_to_local_ids(unsigned num_ids) { typedef Device execution_space; typedef typename execution_space::size_type size_type; - typedef Kokkos::View local_id_view; - typedef Kokkos::UnorderedMap global_id_view; + typedef Kokkos::View local_id_view; + typedef Kokkos::UnorderedMap + global_id_view; - //size + // size std::cout << num_ids << ", "; double elasped_time = 0; Kokkos::Timer timer; local_id_view local_2_global("local_ids", num_ids); - global_id_view global_2_local((3u*num_ids)/2u); + global_id_view global_2_local((3u * num_ids) / 2u); - //create + // create elasped_time = timer.seconds(); std::cout << elasped_time << ", "; timer.reset(); // generate unique ids - { - generate_ids gen(local_2_global); - } + { generate_ids gen(local_2_global); } Device().fence(); // generate elasped_time = timer.seconds(); std::cout << elasped_time << ", "; timer.reset(); - { - fill_map fill(global_2_local, local_2_global); - } + { fill_map fill(global_2_local, local_2_global); } Device().fence(); // fill @@ -208,11 +193,9 @@ void test_global_to_local_ids(unsigned num_ids) std::cout << elasped_time << ", "; timer.reset(); - size_t num_errors = 0; - for (int i=0; i<100; ++i) - { - find_test find(global_2_local, local_2_global,num_errors); + for (int i = 0; i < 100; ++i) { + find_test find(global_2_local, local_2_global, num_errors); } Device().fence(); @@ -220,12 +203,9 @@ void test_global_to_local_ids(unsigned num_ids) elasped_time = timer.seconds(); std::cout << elasped_time << std::endl; - ASSERT_EQ( num_errors, 0u); + ASSERT_EQ(num_errors, 0u); } +} // namespace Performance -} // namespace Performance - - -#endif //KOKKOS_TEST_GLOBAL_TO_LOCAL_IDS_HPP - +#endif // KOKKOS_TEST_GLOBAL_TO_LOCAL_IDS_HPP diff --git a/lib/kokkos/containers/performance_tests/TestHPX.cpp b/lib/kokkos/containers/performance_tests/TestHPX.cpp index 0f43377cee..48be466bfa 100644 --- a/lib/kokkos/containers/performance_tests/TestHPX.cpp +++ b/lib/kokkos/containers/performance_tests/TestHPX.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,7 +43,7 @@ */ #include -#if defined( KOKKOS_ENABLE_HPX ) +#if defined(KOKKOS_ENABLE_HPX) #include @@ -61,70 +62,63 @@ #include #include - namespace Performance { class hpx : public ::testing::Test { -protected: - static void SetUpTestCase() - { + protected: + static void SetUpTestCase() { std::cout << std::setprecision(5) << std::scientific; Kokkos::initialize(); - Kokkos::print_configuration( std::cout ); + Kokkos::print_configuration(std::cout); } - static void TearDownTestCase() - { - Kokkos::finalize(); - } + static void TearDownTestCase() { Kokkos::finalize(); } }; -TEST_F( hpx, dynrankview_perf ) -{ +TEST_F(hpx, dynrankview_perf) { std::cout << "HPX" << std::endl; std::cout << " DynRankView vs View: Initialization Only " << std::endl; - test_dynrankview_op_perf( 8192 ); + test_dynrankview_op_perf(8192); } -TEST_F( hpx, global_2_local) -{ +TEST_F(hpx, global_2_local) { std::cout << "HPX" << std::endl; std::cout << "size, create, generate, fill, find" << std::endl; - for (unsigned i=Performance::begin_id_size; i<=Performance::end_id_size; i *= Performance::id_step) + for (unsigned i = Performance::begin_id_size; i <= Performance::end_id_size; + i *= Performance::id_step) test_global_to_local_ids(i); } -TEST_F( hpx, unordered_map_performance_near) -{ +TEST_F(hpx, unordered_map_performance_near) { unsigned num_hpx = 4; std::ostringstream base_file_name; base_file_name << "hpx-" << num_hpx << "-near"; - Perf::run_performance_tests(base_file_name.str()); + Perf::run_performance_tests( + base_file_name.str()); } -TEST_F( hpx, unordered_map_performance_far) -{ +TEST_F(hpx, unordered_map_performance_far) { unsigned num_hpx = 4; std::ostringstream base_file_name; base_file_name << "hpx-" << num_hpx << "-far"; - Perf::run_performance_tests(base_file_name.str()); + Perf::run_performance_tests( + base_file_name.str()); } -TEST_F( hpx, scatter_view) -{ +TEST_F(hpx, scatter_view) { std::cout << "ScatterView data-duplicated test:\n"; Perf::test_scatter_view(10, 1000 * 1000); -//std::cout << "ScatterView atomics test:\n"; -//Perf::test_scatter_view(10, 1000 * 1000); + Kokkos::Experimental::ScatterDuplicated, + Kokkos::Experimental::ScatterNonAtomic>(10, + 1000 * 1000); + // std::cout << "ScatterView atomics test:\n"; + // Perf::test_scatter_view(10, 1000 * 1000); } -} // namespace test +} // namespace Performance #else void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTHPX_PREVENT_EMPTY_LINK_ERROR() {} #endif - diff --git a/lib/kokkos/containers/performance_tests/TestMain.cpp b/lib/kokkos/containers/performance_tests/TestMain.cpp index 217b01a57a..e3c8edb045 100644 --- a/lib/kokkos/containers/performance_tests/TestMain.cpp +++ b/lib/kokkos/containers/performance_tests/TestMain.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -47,7 +48,6 @@ #include int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc,argv); + ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } - diff --git a/lib/kokkos/containers/performance_tests/TestOpenMP.cpp b/lib/kokkos/containers/performance_tests/TestOpenMP.cpp index e6218074ea..a9c8639ed4 100644 --- a/lib/kokkos/containers/performance_tests/TestOpenMP.cpp +++ b/lib/kokkos/containers/performance_tests/TestOpenMP.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,7 +43,7 @@ */ #include -#if defined( KOKKOS_ENABLE_OPENMP ) +#if defined(KOKKOS_ENABLE_OPENMP) #include @@ -61,82 +62,72 @@ #include #include - namespace Performance { class openmp : public ::testing::Test { -protected: - static void SetUpTestCase() - { + protected: + static void SetUpTestCase() { std::cout << std::setprecision(5) << std::scientific; Kokkos::initialize(); - Kokkos::OpenMP::print_configuration( std::cout ); + Kokkos::OpenMP::print_configuration(std::cout); } - static void TearDownTestCase() - { - Kokkos::finalize(); - } + static void TearDownTestCase() { Kokkos::finalize(); } }; -TEST_F( openmp, dynrankview_perf ) -{ +TEST_F(openmp, dynrankview_perf) { std::cout << "OpenMP" << std::endl; std::cout << " DynRankView vs View: Initialization Only " << std::endl; - test_dynrankview_op_perf( 8192 ); + test_dynrankview_op_perf(8192); } -TEST_F( openmp, global_2_local) -{ +TEST_F(openmp, global_2_local) { std::cout << "OpenMP" << std::endl; std::cout << "size, create, generate, fill, find" << std::endl; - for (unsigned i=Performance::begin_id_size; i<=Performance::end_id_size; i *= Performance::id_step) + for (unsigned i = Performance::begin_id_size; i <= Performance::end_id_size; + i *= Performance::id_step) test_global_to_local_ids(i); } -TEST_F( openmp, unordered_map_performance_near) -{ +TEST_F(openmp, unordered_map_performance_near) { unsigned num_openmp = 4; if (Kokkos::hwloc::available()) { num_openmp = Kokkos::hwloc::get_available_numa_count() * - Kokkos::hwloc::get_available_cores_per_numa() * - Kokkos::hwloc::get_available_threads_per_core(); - + Kokkos::hwloc::get_available_cores_per_numa() * + Kokkos::hwloc::get_available_threads_per_core(); } std::ostringstream base_file_name; base_file_name << "openmp-" << num_openmp << "-near"; - Perf::run_performance_tests(base_file_name.str()); + Perf::run_performance_tests(base_file_name.str()); } -TEST_F( openmp, unordered_map_performance_far) -{ +TEST_F(openmp, unordered_map_performance_far) { unsigned num_openmp = 4; if (Kokkos::hwloc::available()) { num_openmp = Kokkos::hwloc::get_available_numa_count() * - Kokkos::hwloc::get_available_cores_per_numa() * - Kokkos::hwloc::get_available_threads_per_core(); - + Kokkos::hwloc::get_available_cores_per_numa() * + Kokkos::hwloc::get_available_threads_per_core(); } std::ostringstream base_file_name; base_file_name << "openmp-" << num_openmp << "-far"; - Perf::run_performance_tests(base_file_name.str()); + Perf::run_performance_tests(base_file_name.str()); } -TEST_F( openmp, scatter_view) -{ +TEST_F(openmp, scatter_view) { std::cout << "ScatterView data-duplicated test:\n"; Perf::test_scatter_view(10, 1000 * 1000); -//std::cout << "ScatterView atomics test:\n"; -//Perf::test_scatter_view(10, 1000 * 1000); + Kokkos::Experimental::ScatterDuplicated, + Kokkos::Experimental::ScatterNonAtomic>(10, + 1000 * 1000); + // std::cout << "ScatterView atomics test:\n"; + // Perf::test_scatter_view(10, 1000 * 1000); } -} // namespace test +} // namespace Performance #else -void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTOPENMP_PREVENT_EMPTY_LINK_ERROR() {} +void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTOPENMP_PREVENT_EMPTY_LINK_ERROR() { +} #endif - diff --git a/lib/kokkos/containers/performance_tests/TestROCm.cpp b/lib/kokkos/containers/performance_tests/TestROCm.cpp index 3cf9f3bd14..55b770b49c 100644 --- a/lib/kokkos/containers/performance_tests/TestROCm.cpp +++ b/lib/kokkos/containers/performance_tests/TestROCm.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,7 +43,7 @@ */ #include -#if defined( KOKKOS_ENABLE_ROCM ) +#if defined(KOKKOS_ENABLE_ROCM) #include #include @@ -66,15 +67,14 @@ namespace Performance { class rocm : public ::testing::Test { -protected: - static void SetUpTestCase() - { + protected: + static void SetUpTestCase() { std::cout << std::setprecision(5) << std::scientific; Kokkos::HostSpace::execution_space::initialize(); - Kokkos::Experimental::ROCm::initialize( Kokkos::Experimental::ROCm::SelectDevice(0) ); + Kokkos::Experimental::ROCm::initialize( + Kokkos::Experimental::ROCm::SelectDevice(0)); } - static void TearDownTestCase() - { + static void TearDownTestCase() { Kokkos::Experimental::ROCm::finalize(); Kokkos::HostSpace::execution_space::finalize(); } @@ -97,17 +97,15 @@ TEST_F( rocm, global_2_local) } #endif -TEST_F( rocm, unordered_map_performance_near) -{ - Perf::run_performance_tests("rocm-near"); +TEST_F(rocm, unordered_map_performance_near) { + Perf::run_performance_tests("rocm-near"); } -TEST_F( rocm, unordered_map_performance_far) -{ - Perf::run_performance_tests("rocm-far"); +TEST_F(rocm, unordered_map_performance_far) { + Perf::run_performance_tests("rocm-far"); } -} +} // namespace Performance #else void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTROCM_PREVENT_EMPTY_LINK_ERROR() {} -#endif /* #if defined( KOKKOS_ENABLE_ROCM ) */ +#endif /* #if defined( KOKKOS_ENABLE_ROCM ) */ diff --git a/lib/kokkos/containers/performance_tests/TestScatterView.hpp b/lib/kokkos/containers/performance_tests/TestScatterView.hpp index bd9121bb82..3d4c57f3e2 100644 --- a/lib/kokkos/containers/performance_tests/TestScatterView.hpp +++ b/lib/kokkos/containers/performance_tests/TestScatterView.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -49,67 +50,68 @@ namespace Perf { -template -void test_scatter_view(int m, int n) -{ - Kokkos::View original_view("original_view", n); +template +void test_scatter_view(int m, int n) { + Kokkos::View original_view("original_view", + n); { - auto scatter_view = Kokkos::Experimental::create_scatter_view - < Kokkos::Experimental::ScatterSum - , duplication - , contribution - > (original_view); + auto scatter_view = Kokkos::Experimental::create_scatter_view< + Kokkos::Experimental::ScatterSum, duplication, contribution>( + original_view); Kokkos::Experimental::UniqueToken< - ExecSpace, Kokkos::Experimental::UniqueTokenScope::Global> - unique_token{ExecSpace()}; - //auto internal_view = scatter_view.internal_view; + ExecSpace, Kokkos::Experimental::UniqueTokenScope::Global> + unique_token{ExecSpace()}; + // auto internal_view = scatter_view.internal_view; auto policy = Kokkos::RangePolicy(0, n); for (int foo = 0; foo < 5; ++foo) { - { - auto num_threads = unique_token.size(); - std::cout << "num_threads " << num_threads << '\n'; - Kokkos::View hand_coded_duplicate_view("hand_coded_duplicate", num_threads, n); - auto f2 = KOKKOS_LAMBDA(int i) { - auto thread_id = unique_token.acquire(); - for (int j = 0; j < 10; ++j) { - auto k = (i + j) % n; - hand_coded_duplicate_view(thread_id, k, 0) += 4.2; - hand_coded_duplicate_view(thread_id, k, 1) += 2.0; - hand_coded_duplicate_view(thread_id, k, 2) += 1.0; + { + auto num_threads = unique_token.size(); + std::cout << "num_threads " << num_threads << '\n'; + Kokkos::View + hand_coded_duplicate_view("hand_coded_duplicate", num_threads, n); + auto f2 = KOKKOS_LAMBDA(int i) { + auto thread_id = unique_token.acquire(); + for (int j = 0; j < 10; ++j) { + auto k = (i + j) % n; + hand_coded_duplicate_view(thread_id, k, 0) += 4.2; + hand_coded_duplicate_view(thread_id, k, 1) += 2.0; + hand_coded_duplicate_view(thread_id, k, 2) += 1.0; + } + }; + Kokkos::Timer timer; + timer.reset(); + for (int k = 0; k < m; ++k) { + Kokkos::parallel_for(policy, f2, + "hand_coded_duplicate_scatter_view_test"); } - }; - Kokkos::Timer timer; - timer.reset(); - for (int k = 0; k < m; ++k) { - Kokkos::parallel_for(policy, f2, "hand_coded_duplicate_scatter_view_test"); + Kokkos::fence(); + auto t = timer.seconds(); + std::cout << "hand-coded test took " << t << " seconds\n"; } - Kokkos::fence(); - auto t = timer.seconds(); - std::cout << "hand-coded test took " << t << " seconds\n"; - } - { - auto f = KOKKOS_LAMBDA(int i) { - auto scatter_access = scatter_view.access(); - for (int j = 0; j < 10; ++j) { - auto k = (i + j) % n; - scatter_access(k, 0) += 4.2; - scatter_access(k, 1) += 2.0; - scatter_access(k, 2) += 1.0; + { + auto f = KOKKOS_LAMBDA(int i) { + auto scatter_access = scatter_view.access(); + for (int j = 0; j < 10; ++j) { + auto k = (i + j) % n; + scatter_access(k, 0) += 4.2; + scatter_access(k, 1) += 2.0; + scatter_access(k, 2) += 1.0; + } + }; + Kokkos::Timer timer; + timer.reset(); + for (int k = 0; k < m; ++k) { + Kokkos::parallel_for(policy, f, "scatter_view_test"); } - }; - Kokkos::Timer timer; - timer.reset(); - for (int k = 0; k < m; ++k) { - Kokkos::parallel_for(policy, f, "scatter_view_test"); + Kokkos::fence(); + auto t = timer.seconds(); + std::cout << "test took " << t << " seconds\n"; } - Kokkos::fence(); - auto t = timer.seconds(); - std::cout << "test took " << t << " seconds\n"; } } - } } -} +} // namespace Perf #endif diff --git a/lib/kokkos/containers/performance_tests/TestThreads.cpp b/lib/kokkos/containers/performance_tests/TestThreads.cpp index 6a02e67b25..2f37404539 100644 --- a/lib/kokkos/containers/performance_tests/TestThreads.cpp +++ b/lib/kokkos/containers/performance_tests/TestThreads.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,7 +43,7 @@ */ #include -#if defined( KOKKOS_ENABLE_THREADS ) +#if defined(KOKKOS_ENABLE_THREADS) #include @@ -65,9 +66,8 @@ namespace Performance { class threads : public ::testing::Test { -protected: - static void SetUpTestCase() - { + protected: + static void SetUpTestCase() { std::cout << std::setprecision(5) << std::scientific; unsigned num_threads = 4; @@ -76,66 +76,57 @@ protected: num_threads = Kokkos::hwloc::get_available_numa_count() * Kokkos::hwloc::get_available_cores_per_numa() * Kokkos::hwloc::get_available_threads_per_core(); - } std::cout << "Threads: " << num_threads << std::endl; - Kokkos::initialize( Kokkos::InitArguments(num_threads) ); + Kokkos::initialize(Kokkos::InitArguments(num_threads)); } - static void TearDownTestCase() - { - Kokkos::finalize(); - } + static void TearDownTestCase() { Kokkos::finalize(); } }; -TEST_F( threads, dynrankview_perf ) -{ +TEST_F(threads, dynrankview_perf) { std::cout << "Threads" << std::endl; std::cout << " DynRankView vs View: Initialization Only " << std::endl; - test_dynrankview_op_perf( 8192 ); + test_dynrankview_op_perf(8192); } -TEST_F( threads, global_2_local) -{ +TEST_F(threads, global_2_local) { std::cout << "Threads" << std::endl; std::cout << "size, create, generate, fill, find" << std::endl; - for (unsigned i=Performance::begin_id_size; i<=Performance::end_id_size; i *= Performance::id_step) + for (unsigned i = Performance::begin_id_size; i <= Performance::end_id_size; + i *= Performance::id_step) test_global_to_local_ids(i); } -TEST_F( threads, unordered_map_performance_near) -{ +TEST_F(threads, unordered_map_performance_near) { unsigned num_threads = 4; if (Kokkos::hwloc::available()) { num_threads = Kokkos::hwloc::get_available_numa_count() * Kokkos::hwloc::get_available_cores_per_numa() * Kokkos::hwloc::get_available_threads_per_core(); - } std::ostringstream base_file_name; base_file_name << "threads-" << num_threads << "-near"; - Perf::run_performance_tests(base_file_name.str()); + Perf::run_performance_tests(base_file_name.str()); } -TEST_F( threads, unordered_map_performance_far) -{ +TEST_F(threads, unordered_map_performance_far) { unsigned num_threads = 4; if (Kokkos::hwloc::available()) { num_threads = Kokkos::hwloc::get_available_numa_count() * Kokkos::hwloc::get_available_cores_per_numa() * Kokkos::hwloc::get_available_threads_per_core(); - } std::ostringstream base_file_name; base_file_name << "threads-" << num_threads << "-far"; - Perf::run_performance_tests(base_file_name.str()); + Perf::run_performance_tests(base_file_name.str()); } -} // namespace Performance +} // namespace Performance #else -void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTTHREADS_PREVENT_EMPTY_LINK_ERROR() {} +void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTTHREADS_PREVENT_EMPTY_LINK_ERROR() { +} #endif - diff --git a/lib/kokkos/containers/performance_tests/TestUnorderedMapPerformance.hpp b/lib/kokkos/containers/performance_tests/TestUnorderedMapPerformance.hpp index 8d09281ed3..9057842340 100644 --- a/lib/kokkos/containers/performance_tests/TestUnorderedMapPerformance.hpp +++ b/lib/kokkos/containers/performance_tests/TestUnorderedMapPerformance.hpp @@ -1,10 +1,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -50,12 +51,10 @@ #include #include - namespace Perf { template -struct UnorderedMapTest -{ +struct UnorderedMapTest { typedef Device execution_space; typedef Kokkos::UnorderedMap map_type; typedef typename map_type::histogram_type histogram_type; @@ -68,22 +67,22 @@ struct UnorderedMapTest uint32_t capacity; uint32_t inserts; uint32_t collisions; - double seconds; + double seconds; map_type map; histogram_type histogram; - UnorderedMapTest( uint32_t arg_capacity, uint32_t arg_inserts, uint32_t arg_collisions) - : capacity(arg_capacity) - , inserts(arg_inserts) - , collisions(arg_collisions) - , seconds(0) - , map(capacity) - , histogram(map.get_histogram()) - { - Kokkos::Timer wall_clock ; + UnorderedMapTest(uint32_t arg_capacity, uint32_t arg_inserts, + uint32_t arg_collisions) + : capacity(arg_capacity), + inserts(arg_inserts), + collisions(arg_collisions), + seconds(0), + map(capacity), + histogram(map.get_histogram()) { + Kokkos::Timer wall_clock; wall_clock.reset(); - value_type v = {}; + value_type v = {}; int loop_count = 0; do { ++loop_count; @@ -92,81 +91,79 @@ struct UnorderedMapTest Kokkos::parallel_reduce(inserts, *this, v); if (v.failed_count > 0u) { - const uint32_t new_capacity = map.capacity() + ((map.capacity()*3ull)/20u) + v.failed_count/collisions ; - map.rehash( new_capacity ); + const uint32_t new_capacity = map.capacity() + + ((map.capacity() * 3ull) / 20u) + + v.failed_count / collisions; + map.rehash(new_capacity); } } while (v.failed_count > 0u); seconds = wall_clock.seconds(); - switch (loop_count) - { - case 1u: std::cout << " \033[0;32m" << loop_count << "\033[0m "; break; - case 2u: std::cout << " \033[1;31m" << loop_count << "\033[0m "; break; - default: std::cout << " \033[0;31m" << loop_count << "\033[0m "; break; + switch (loop_count) { + case 1u: std::cout << " \033[0;32m" << loop_count << "\033[0m "; break; + case 2u: std::cout << " \033[1;31m" << loop_count << "\033[0m "; break; + default: std::cout << " \033[0;31m" << loop_count << "\033[0m "; break; } - std::cout << std::setprecision(2) << std::fixed << std::setw(5) << (1e9*(seconds/(inserts))) << "; " << std::flush; + std::cout << std::setprecision(2) << std::fixed << std::setw(5) + << (1e9 * (seconds / (inserts))) << "; " << std::flush; histogram.calculate(); Device().fence(); } - void print(std::ostream & metrics_out, std::ostream & length_out, std::ostream & distance_out, std::ostream & block_distance_out) - { + void print(std::ostream& metrics_out, std::ostream& length_out, + std::ostream& distance_out, std::ostream& block_distance_out) { metrics_out << map.capacity() << " , "; - metrics_out << inserts/collisions << " , "; - metrics_out << (100.0 * inserts/collisions) / map.capacity() << " , "; + metrics_out << inserts / collisions << " , "; + metrics_out << (100.0 * inserts / collisions) / map.capacity() << " , "; metrics_out << inserts << " , "; metrics_out << (map.failed_insert() ? "true" : "false") << " , "; metrics_out << collisions << " , "; - metrics_out << 1e9*(seconds/inserts) << " , "; + metrics_out << 1e9 * (seconds / inserts) << " , "; metrics_out << seconds << std::endl; length_out << map.capacity() << " , "; - length_out << ((100.0 *inserts/collisions) / map.capacity()) << " , "; + length_out << ((100.0 * inserts / collisions) / map.capacity()) << " , "; length_out << collisions << " , "; histogram.print_length(length_out); distance_out << map.capacity() << " , "; - distance_out << ((100.0 *inserts/collisions) / map.capacity()) << " , "; + distance_out << ((100.0 * inserts / collisions) / map.capacity()) << " , "; distance_out << collisions << " , "; histogram.print_distance(distance_out); block_distance_out << map.capacity() << " , "; - block_distance_out << ((100.0 *inserts/collisions) / map.capacity()) << " , "; + block_distance_out << ((100.0 * inserts / collisions) / map.capacity()) + << " , "; block_distance_out << collisions << " , "; histogram.print_block_distance(block_distance_out); } - KOKKOS_INLINE_FUNCTION - void init( value_type & v ) const - { + void init(value_type& v) const { v.failed_count = 0; - v.max_list = 0; + v.max_list = 0; } KOKKOS_INLINE_FUNCTION - void join( volatile value_type & dst, const volatile value_type & src ) const - { + void join(volatile value_type& dst, const volatile value_type& src) const { dst.failed_count += src.failed_count; dst.max_list = src.max_list < dst.max_list ? dst.max_list : src.max_list; } KOKKOS_INLINE_FUNCTION - void operator()(uint32_t i, value_type & v) const - { - const uint32_t key = Near ? i/collisions : i%(inserts/collisions); - typename map_type::insert_result result = map.insert(key,i); + void operator()(uint32_t i, value_type& v) const { + const uint32_t key = Near ? i / collisions : i % (inserts / collisions); + typename map_type::insert_result result = map.insert(key, i); v.failed_count += !result.failed() ? 0 : 1; - v.max_list = result.list_position() < v.max_list ? v.max_list : result.list_position(); + v.max_list = result.list_position() < v.max_list ? v.max_list + : result.list_position(); } - }; template -void run_performance_tests(std::string const & base_file_name) -{ +void run_performance_tests(std::string const& base_file_name) { #if 0 std::string metrics_file_name = base_file_name + std::string("-metrics.csv"); std::string length_file_name = base_file_name + std::string("-length.csv"); @@ -254,7 +251,6 @@ void run_performance_tests(std::string const & base_file_name) #endif } +} // namespace Perf -} // namespace Perf - -#endif //KOKKOS_TEST_UNORDERED_MAP_PERFORMANCE_HPP +#endif // KOKKOS_TEST_UNORDERED_MAP_PERFORMANCE_HPP diff --git a/lib/kokkos/containers/src/CMakeLists.txt b/lib/kokkos/containers/src/CMakeLists.txt index e68fcad5e9..0c9d24d641 100644 --- a/lib/kokkos/containers/src/CMakeLists.txt +++ b/lib/kokkos/containers/src/CMakeLists.txt @@ -1,47 +1,34 @@ - -TRIBITS_CONFIGURE_FILE(${PACKAGE_NAME}_config.h) - -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -#----------------------------------------------------------------------------- - -SET(TRILINOS_INCDIR ${CMAKE_INSTALL_PREFIX}/${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}) - -if(KOKKOS_LEGACY_TRIBITS) - - SET(HEADERS "") - SET(SOURCES "") - - SET(HEADERS_IMPL "") - - FILE(GLOB HEADERS *.hpp) - FILE(GLOB HEADERS_IMPL impl/*.hpp) - FILE(GLOB SOURCES impl/*.cpp) - - INSTALL(FILES ${HEADERS_IMPL} DESTINATION ${TRILINOS_INCDIR}/impl/) - - TRIBITS_ADD_LIBRARY( - kokkoscontainers - HEADERS ${HEADERS} - NOINSTALLHEADERS ${HEADERS_IMPL} - SOURCES ${SOURCES} - DEPLIBS - ) - -else() - - INSTALL ( - DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/" - DESTINATION ${TRILINOS_INCDIR} - FILES_MATCHING PATTERN "*.hpp" - ) - - TRIBITS_ADD_LIBRARY( - kokkoscontainers - SOURCES ${KOKKOS_CONTAINERS_SRCS} - DEPLIBS - ) - -endif() -#----------------------------------------------------------------------------- + +KOKKOS_CONFIGURE_FILE(${PACKAGE_NAME}_config.h) + +#need these here for now +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +#----------------------------------------------------------------------------- + +SET(KOKKOS_CONTAINERS_SRCS) +APPEND_GLOB(KOKKOS_CONTAINERS_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/impl/*.cpp) + +INSTALL ( + DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/" + DESTINATION ${KOKKOS_HEADER_DIR} + FILES_MATCHING PATTERN "*.hpp" +) + +KOKKOS_ADD_LIBRARY( + kokkoscontainers + SOURCES ${KOKKOS_CONTAINERS_SRCS} +) + +SET_TARGET_PROPERTIES(kokkoscontainers PROPERTIES VERSION ${Kokkos_VERSION}) + +KOKKOS_LIB_INCLUDE_DIRECTORIES(kokkoscontainers + ${KOKKOS_TOP_BUILD_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) +KOKKOS_LINK_INTERNAL_LIBRARY(kokkoscontainers kokkoscore) + +#----------------------------------------------------------------------------- + diff --git a/lib/kokkos/containers/src/Kokkos_Bitset.hpp b/lib/kokkos/containers/src/Kokkos_Bitset.hpp index 4d78430fc6..3596c7653a 100644 --- a/lib/kokkos/containers/src/Kokkos_Bitset.hpp +++ b/lib/kokkos/containers/src/Kokkos_Bitset.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -53,27 +54,25 @@ namespace Kokkos { -template +template class Bitset; -template +template class ConstBitset; template -void deep_copy( Bitset & dst, Bitset const& src); +void deep_copy(Bitset& dst, Bitset const& src); template -void deep_copy( Bitset & dst, ConstBitset const& src); +void deep_copy(Bitset& dst, ConstBitset const& src); template -void deep_copy( ConstBitset & dst, ConstBitset const& src); - +void deep_copy(ConstBitset& dst, ConstBitset const& src); /// A thread safe view to a bitset template -class Bitset -{ -public: +class Bitset { + public: typedef Device execution_space; typedef unsigned size_type; @@ -81,98 +80,88 @@ public: enum { MOVE_HINT_BACKWARD = 2u }; enum { - BIT_SCAN_FORWARD_MOVE_HINT_FORWARD = 0u - , BIT_SCAN_REVERSE_MOVE_HINT_FORWARD = BIT_SCAN_REVERSE - , BIT_SCAN_FORWARD_MOVE_HINT_BACKWARD = MOVE_HINT_BACKWARD - , BIT_SCAN_REVERSE_MOVE_HINT_BACKWARD = BIT_SCAN_REVERSE | MOVE_HINT_BACKWARD + BIT_SCAN_FORWARD_MOVE_HINT_FORWARD = 0u, + BIT_SCAN_REVERSE_MOVE_HINT_FORWARD = BIT_SCAN_REVERSE, + BIT_SCAN_FORWARD_MOVE_HINT_BACKWARD = MOVE_HINT_BACKWARD, + BIT_SCAN_REVERSE_MOVE_HINT_BACKWARD = BIT_SCAN_REVERSE | MOVE_HINT_BACKWARD }; -private: - enum { block_size = static_cast(sizeof(unsigned)*CHAR_BIT) }; - enum { block_mask = block_size-1u }; + private: + enum { block_size = static_cast(sizeof(unsigned) * CHAR_BIT) }; + enum { block_mask = block_size - 1u }; enum { block_shift = Kokkos::Impl::integral_power_of_two(block_size) }; -public: - - + public: /// constructor /// arg_size := number of bit in set Bitset(unsigned arg_size = 0u) - : m_size(arg_size) - , m_last_block_mask(0u) - , m_blocks("Bitset", ((m_size + block_mask) >> block_shift) ) - { - for (int i=0, end = static_cast(m_size & block_mask); i < end; ++i) { + : m_size(arg_size), + m_last_block_mask(0u), + m_blocks("Bitset", ((m_size + block_mask) >> block_shift)) { + for (int i = 0, end = static_cast(m_size & block_mask); i < end; ++i) { m_last_block_mask |= 1u << i; } } KOKKOS_INLINE_FUNCTION - Bitset (const Bitset&) = default; + Bitset(const Bitset&) = default; KOKKOS_INLINE_FUNCTION - Bitset& operator= (const Bitset&) = default; + Bitset& operator=(const Bitset&) = default; KOKKOS_INLINE_FUNCTION - Bitset (Bitset&&) = default; + Bitset(Bitset&&) = default; KOKKOS_INLINE_FUNCTION - Bitset& operator= (Bitset&&) = default; - + Bitset& operator=(Bitset&&) = default; + KOKKOS_INLINE_FUNCTION - ~Bitset () = default; + ~Bitset() = default; /// number of bits in the set /// can be call from the host or the device KOKKOS_FORCEINLINE_FUNCTION - unsigned size() const - { return m_size; } + unsigned size() const { return m_size; } /// number of bits which are set to 1 /// can only be called from the host - unsigned count() const - { - Impl::BitsetCount< Bitset > f(*this); + unsigned count() const { + Impl::BitsetCount > f(*this); return f.apply(); } /// set all bits to 1 /// can only be called from the host - void set() - { - Kokkos::deep_copy(m_blocks, ~0u ); + void set() { + Kokkos::deep_copy(m_blocks, ~0u); if (m_last_block_mask) { - //clear the unused bits in the last block - typedef Kokkos::Impl::DeepCopy< typename execution_space::memory_space, Kokkos::HostSpace > raw_deep_copy; - raw_deep_copy( m_blocks.data() + (m_blocks.extent(0) -1u), &m_last_block_mask, sizeof(unsigned)); + // clear the unused bits in the last block + typedef Kokkos::Impl::DeepCopy + raw_deep_copy; + raw_deep_copy(m_blocks.data() + (m_blocks.extent(0) - 1u), + &m_last_block_mask, sizeof(unsigned)); } } /// set all bits to 0 /// can only be called from the host - void reset() - { - Kokkos::deep_copy(m_blocks, 0u ); - } + void reset() { Kokkos::deep_copy(m_blocks, 0u); } /// set all bits to 0 /// can only be called from the host - void clear() - { - Kokkos::deep_copy(m_blocks, 0u ); - } + void clear() { Kokkos::deep_copy(m_blocks, 0u); } /// set i'th bit to 1 /// can only be called from the device KOKKOS_FORCEINLINE_FUNCTION - bool set( unsigned i ) const - { - if ( i < m_size ) { - unsigned * block_ptr = &m_blocks[ i >> block_shift ]; - const unsigned mask = 1u << static_cast( i & block_mask ); + bool set(unsigned i) const { + if (i < m_size) { + unsigned* block_ptr = &m_blocks[i >> block_shift]; + const unsigned mask = 1u << static_cast(i & block_mask); - return !( atomic_fetch_or( block_ptr, mask ) & mask ); + return !(atomic_fetch_or(block_ptr, mask) & mask); } return false; } @@ -180,13 +169,12 @@ public: /// set i'th bit to 0 /// can only be called from the device KOKKOS_FORCEINLINE_FUNCTION - bool reset( unsigned i ) const - { - if ( i < m_size ) { - unsigned * block_ptr = &m_blocks[ i >> block_shift ]; - const unsigned mask = 1u << static_cast( i & block_mask ); + bool reset(unsigned i) const { + if (i < m_size) { + unsigned* block_ptr = &m_blocks[i >> block_shift]; + const unsigned mask = 1u << static_cast(i & block_mask); - return atomic_fetch_and( block_ptr, ~mask ) & mask; + return atomic_fetch_and(block_ptr, ~mask) & mask; } return false; } @@ -194,11 +182,10 @@ public: /// return true if the i'th bit set to 1 /// can only be called from the device KOKKOS_FORCEINLINE_FUNCTION - bool test( unsigned i ) const - { - if ( i < m_size ) { - const unsigned block = volatile_load(&m_blocks[ i >> block_shift ]); - const unsigned mask = 1u << static_cast( i & block_mask ); + bool test(unsigned i) const { + if (i < m_size) { + const unsigned block = volatile_load(&m_blocks[i >> block_shift]); + const unsigned mask = 1u << static_cast(i & block_mask); return block & mask; } return false; @@ -208,90 +195,93 @@ public: /// returns the max number of times those functions should be call /// when searching for an available bit KOKKOS_FORCEINLINE_FUNCTION - unsigned max_hint() const - { - return m_blocks.extent(0); - } + unsigned max_hint() const { return m_blocks.extent(0); } /// find a bit set to 1 near the hint - /// returns a pair< bool, unsigned> where if result.first is true then result.second is the bit found - /// and if result.first is false the result.second is a new hint + /// returns a pair< bool, unsigned> where if result.first is true then + /// result.second is the bit found and if result.first is false the + /// result.second is a new hint KOKKOS_INLINE_FUNCTION - Kokkos::pair find_any_set_near( unsigned hint , unsigned scan_direction = BIT_SCAN_FORWARD_MOVE_HINT_FORWARD ) const - { - const unsigned block_idx = (hint >> block_shift) < m_blocks.extent(0) ? (hint >> block_shift) : 0; + Kokkos::pair find_any_set_near( + unsigned hint, + unsigned scan_direction = BIT_SCAN_FORWARD_MOVE_HINT_FORWARD) const { + const unsigned block_idx = + (hint >> block_shift) < m_blocks.extent(0) ? (hint >> block_shift) : 0; const unsigned offset = hint & block_mask; - unsigned block = volatile_load(&m_blocks[ block_idx ]); - block = !m_last_block_mask || (block_idx < (m_blocks.extent(0)-1)) ? block : block & m_last_block_mask ; + unsigned block = volatile_load(&m_blocks[block_idx]); + block = !m_last_block_mask || (block_idx < (m_blocks.extent(0) - 1)) + ? block + : block & m_last_block_mask; return find_any_helper(block_idx, offset, block, scan_direction); } /// find a bit set to 0 near the hint - /// returns a pair< bool, unsigned> where if result.first is true then result.second is the bit found - /// and if result.first is false the result.second is a new hint + /// returns a pair< bool, unsigned> where if result.first is true then + /// result.second is the bit found and if result.first is false the + /// result.second is a new hint KOKKOS_INLINE_FUNCTION - Kokkos::pair find_any_unset_near( unsigned hint , unsigned scan_direction = BIT_SCAN_FORWARD_MOVE_HINT_FORWARD ) const - { + Kokkos::pair find_any_unset_near( + unsigned hint, + unsigned scan_direction = BIT_SCAN_FORWARD_MOVE_HINT_FORWARD) const { const unsigned block_idx = hint >> block_shift; - const unsigned offset = hint & block_mask; - unsigned block = volatile_load(&m_blocks[ block_idx ]); - block = !m_last_block_mask || (block_idx < (m_blocks.extent(0)-1) ) ? ~block : ~block & m_last_block_mask ; + const unsigned offset = hint & block_mask; + unsigned block = volatile_load(&m_blocks[block_idx]); + block = !m_last_block_mask || (block_idx < (m_blocks.extent(0) - 1)) + ? ~block + : ~block & m_last_block_mask; return find_any_helper(block_idx, offset, block, scan_direction); } -private: - + private: KOKKOS_FORCEINLINE_FUNCTION - Kokkos::pair find_any_helper(unsigned block_idx, unsigned offset, unsigned block, unsigned scan_direction) const - { - Kokkos::pair result( block > 0u, 0); + Kokkos::pair find_any_helper(unsigned block_idx, + unsigned offset, unsigned block, + unsigned scan_direction) const { + Kokkos::pair result(block > 0u, 0); if (!result.first) { - result.second = update_hint( block_idx, offset, scan_direction ); - } - else { - result.second = scan_block( (block_idx << block_shift) - , offset - , block - , scan_direction - ); + result.second = update_hint(block_idx, offset, scan_direction); + } else { + result.second = + scan_block((block_idx << block_shift), offset, block, scan_direction); } return result; } - KOKKOS_FORCEINLINE_FUNCTION - unsigned scan_block(unsigned block_start, int offset, unsigned block, unsigned scan_direction ) const - { - offset = !(scan_direction & BIT_SCAN_REVERSE) ? offset : (offset + block_mask) & block_mask; + unsigned scan_block(unsigned block_start, int offset, unsigned block, + unsigned scan_direction) const { + offset = !(scan_direction & BIT_SCAN_REVERSE) + ? offset + : (offset + block_mask) & block_mask; block = Impl::rotate_right(block, offset); - return ((( !(scan_direction & BIT_SCAN_REVERSE) ? - Impl::bit_scan_forward(block) : - ::Kokkos::log2(block) - ) + offset - ) & block_mask - ) + block_start; + return (((!(scan_direction & BIT_SCAN_REVERSE) + ? Impl::bit_scan_forward(block) + : ::Kokkos::log2(block)) + + offset) & + block_mask) + + block_start; } KOKKOS_FORCEINLINE_FUNCTION - unsigned update_hint( long long block_idx, unsigned offset, unsigned scan_direction ) const - { + unsigned update_hint(long long block_idx, unsigned offset, + unsigned scan_direction) const { block_idx += scan_direction & MOVE_HINT_BACKWARD ? -1 : 1; block_idx = block_idx >= 0 ? block_idx : m_blocks.extent(0) - 1; - block_idx = block_idx < static_cast(m_blocks.extent(0)) ? block_idx : 0; + block_idx = + block_idx < static_cast(m_blocks.extent(0)) ? block_idx : 0; - return static_cast(block_idx)*block_size + offset; + return static_cast(block_idx) * block_size + offset; } -private: - + private: unsigned m_size; unsigned m_last_block_mask; - View< unsigned *, execution_space, MemoryTraits > m_blocks; + View > m_blocks; -private: + private: template friend class Bitset; @@ -302,87 +292,72 @@ private: friend struct Impl::BitsetCount; template - friend void deep_copy( Bitset & dst, Bitset const& src); + friend void deep_copy(Bitset& dst, Bitset const& src); template - friend void deep_copy( Bitset & dst, ConstBitset const& src); + friend void deep_copy(Bitset& dst, + ConstBitset const& src); }; /// a thread-safe view to a const bitset /// i.e. can only test bits template -class ConstBitset -{ -public: +class ConstBitset { + public: typedef Device execution_space; typedef unsigned size_type; -private: - enum { block_size = static_cast(sizeof(unsigned)*CHAR_BIT) }; - enum { block_mask = block_size -1u }; + private: + enum { block_size = static_cast(sizeof(unsigned) * CHAR_BIT) }; + enum { block_mask = block_size - 1u }; enum { block_shift = Kokkos::Impl::integral_power_of_two(block_size) }; -public: - ConstBitset() - : m_size (0) - {} + public: + ConstBitset() : m_size(0) {} ConstBitset(Bitset const& rhs) - : m_size(rhs.m_size) - , m_blocks(rhs.m_blocks) - {} + : m_size(rhs.m_size), m_blocks(rhs.m_blocks) {} ConstBitset(ConstBitset const& rhs) - : m_size( rhs.m_size ) - , m_blocks( rhs.m_blocks ) - {} + : m_size(rhs.m_size), m_blocks(rhs.m_blocks) {} - ConstBitset & operator = (Bitset const & rhs) - { - this->m_size = rhs.m_size; + ConstBitset& operator=(Bitset const& rhs) { + this->m_size = rhs.m_size; this->m_blocks = rhs.m_blocks; return *this; } - ConstBitset & operator = (ConstBitset const & rhs) - { - this->m_size = rhs.m_size; + ConstBitset& operator=(ConstBitset const& rhs) { + this->m_size = rhs.m_size; this->m_blocks = rhs.m_blocks; return *this; } - KOKKOS_FORCEINLINE_FUNCTION - unsigned size() const - { - return m_size; - } + unsigned size() const { return m_size; } - unsigned count() const - { - Impl::BitsetCount< ConstBitset > f(*this); + unsigned count() const { + Impl::BitsetCount > f(*this); return f.apply(); } KOKKOS_FORCEINLINE_FUNCTION - bool test( unsigned i ) const - { - if ( i < m_size ) { - const unsigned block = m_blocks[ i >> block_shift ]; - const unsigned mask = 1u << static_cast( i & block_mask ); + bool test(unsigned i) const { + if (i < m_size) { + const unsigned block = m_blocks[i >> block_shift]; + const unsigned mask = 1u << static_cast(i & block_mask); return block & mask; } return false; } -private: - + private: unsigned m_size; - View< const unsigned *, execution_space, MemoryTraits > m_blocks; + View > m_blocks; -private: + private: template friend class ConstBitset; @@ -390,47 +365,56 @@ private: friend struct Impl::BitsetCount; template - friend void deep_copy( Bitset & dst, ConstBitset const& src); + friend void deep_copy(Bitset& dst, + ConstBitset const& src); template - friend void deep_copy( ConstBitset & dst, ConstBitset const& src); + friend void deep_copy(ConstBitset& dst, + ConstBitset const& src); }; - template -void deep_copy( Bitset & dst, Bitset const& src) -{ +void deep_copy(Bitset& dst, Bitset const& src) { if (dst.size() != src.size()) { - throw std::runtime_error("Error: Cannot deep_copy bitsets of different sizes!"); + throw std::runtime_error( + "Error: Cannot deep_copy bitsets of different sizes!"); } - typedef Kokkos::Impl::DeepCopy< typename DstDevice::memory_space, typename SrcDevice::memory_space > raw_deep_copy; - raw_deep_copy(dst.m_blocks.data(), src.m_blocks.data(), sizeof(unsigned)*src.m_blocks.extent(0)); + typedef Kokkos::Impl::DeepCopy + raw_deep_copy; + raw_deep_copy(dst.m_blocks.data(), src.m_blocks.data(), + sizeof(unsigned) * src.m_blocks.extent(0)); } template -void deep_copy( Bitset & dst, ConstBitset const& src) -{ +void deep_copy(Bitset& dst, ConstBitset const& src) { if (dst.size() != src.size()) { - throw std::runtime_error("Error: Cannot deep_copy bitsets of different sizes!"); + throw std::runtime_error( + "Error: Cannot deep_copy bitsets of different sizes!"); } - typedef Kokkos::Impl::DeepCopy< typename DstDevice::memory_space, typename SrcDevice::memory_space > raw_deep_copy; - raw_deep_copy(dst.m_blocks.data(), src.m_blocks.data(), sizeof(unsigned)*src.m_blocks.extent(0)); + typedef Kokkos::Impl::DeepCopy + raw_deep_copy; + raw_deep_copy(dst.m_blocks.data(), src.m_blocks.data(), + sizeof(unsigned) * src.m_blocks.extent(0)); } template -void deep_copy( ConstBitset & dst, ConstBitset const& src) -{ +void deep_copy(ConstBitset& dst, ConstBitset const& src) { if (dst.size() != src.size()) { - throw std::runtime_error("Error: Cannot deep_copy bitsets of different sizes!"); + throw std::runtime_error( + "Error: Cannot deep_copy bitsets of different sizes!"); } - typedef Kokkos::Impl::DeepCopy< typename DstDevice::memory_space, typename SrcDevice::memory_space > raw_deep_copy; - raw_deep_copy(dst.m_blocks.data(), src.m_blocks.data(), sizeof(unsigned)*src.m_blocks.extent(0)); + typedef Kokkos::Impl::DeepCopy + raw_deep_copy; + raw_deep_copy(dst.m_blocks.data(), src.m_blocks.data(), + sizeof(unsigned) * src.m_blocks.extent(0)); } -} // namespace Kokkos - -#endif //KOKKOS_BITSET_HPP +} // namespace Kokkos +#endif // KOKKOS_BITSET_HPP diff --git a/lib/kokkos/containers/src/Kokkos_DualView.hpp b/lib/kokkos/containers/src/Kokkos_DualView.hpp index d9b14d67a2..d8a3ebc1ae 100644 --- a/lib/kokkos/containers/src/Kokkos_DualView.hpp +++ b/lib/kokkos/containers/src/Kokkos_DualView.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -90,47 +91,41 @@ namespace Kokkos { * behavior. Please see the documentation of Kokkos::View for * examples. The default suffices for most users. */ -template< class DataType , - class Arg1Type = void , - class Arg2Type = void , +template -class DualView : public ViewTraits< DataType , Arg1Type , Arg2Type, Arg3Type > -{ -template< class , class , class , class > friend class DualView ; -public: +class DualView : public ViewTraits { + template + friend class DualView; + + public: //! \name Typedefs for device types and various Kokkos::View specializations. //@{ - typedef ViewTraits< DataType , Arg1Type , Arg2Type, Arg3Type > traits ; + typedef ViewTraits traits; //! The Kokkos Host Device type; - typedef typename traits::host_mirror_space host_mirror_space ; + typedef typename traits::host_mirror_space host_mirror_space; //! The type of a Kokkos::View on the device. - typedef View< typename traits::data_type , - Arg1Type , - Arg2Type , - Arg3Type > t_dev ; + typedef View t_dev; /// \typedef t_host /// \brief The type of a Kokkos::View host mirror of \c t_dev. - typedef typename t_dev::HostMirror t_host ; + typedef typename t_dev::HostMirror t_host; //! The type of a const View on the device. //! The type of a Kokkos::View on the device. - typedef View< typename traits::const_data_type , - Arg1Type , - Arg2Type , - Arg3Type > t_dev_const ; + typedef View + t_dev_const; /// \typedef t_host_const /// \brief The type of a const View host mirror of \c t_dev_const. typedef typename t_dev_const::HostMirror t_host_const; //! The type of a const, random-access View on the device. - typedef View< typename traits::const_data_type , - typename traits::array_layout , - typename traits::device_type , - Kokkos::MemoryTraits > t_dev_const_randomread ; + typedef View > + t_dev_const_randomread; /// \typedef t_host_const_randomread /// \brief The type of a const, random-access View host mirror of @@ -138,39 +133,36 @@ public: typedef typename t_dev_const_randomread::HostMirror t_host_const_randomread; //! The type of an unmanaged View on the device. - typedef View< typename traits::data_type , - typename traits::array_layout , - typename traits::device_type , - MemoryUnmanaged> t_dev_um; + typedef View + t_dev_um; //! The type of an unmanaged View host mirror of \c t_dev_um. - typedef View< typename t_host::data_type , - typename t_host::array_layout , - typename t_host::device_type , - MemoryUnmanaged> t_host_um; + typedef View + t_host_um; //! The type of a const unmanaged View on the device. - typedef View< typename traits::const_data_type , - typename traits::array_layout , - typename traits::device_type , - MemoryUnmanaged> t_dev_const_um; + typedef View + t_dev_const_um; //! The type of a const unmanaged View host mirror of \c t_dev_const_um. - typedef View t_host_const_um; + typedef View + t_host_const_um; //! The type of a const, random-access View on the device. - typedef View< typename t_host::const_data_type , - typename t_host::array_layout , - typename t_host::device_type , - Kokkos::MemoryTraits > t_dev_const_randomread_um ; + typedef View > + t_dev_const_randomread_um; /// \typedef t_host_const_randomread /// \brief The type of a const, random-access View host mirror of /// \c t_dev_const_randomread. - typedef typename t_dev_const_randomread::HostMirror t_host_const_randomread_um; + typedef + typename t_dev_const_randomread::HostMirror t_host_const_randomread_um; //@} //! \name The two View instances. @@ -184,18 +176,20 @@ public: //@{ #ifndef KOKKOS_ENABLE_DEPRECATED_CODE -protected: + protected: // modified_flags[0] -> host // modified_flags[1] -> device - typedef View t_modified_flags; + typedef View t_modified_flags; t_modified_flags modified_flags; -public: + public: #else - typedef View t_modified_flags; - typedef View t_modified_flag; + typedef View + t_modified_flags; + typedef View + t_modified_flag; t_modified_flags modified_flags; - t_modified_flag modified_host,modified_device; + t_modified_flag modified_host, modified_device; #endif //@} @@ -208,11 +202,11 @@ public: /// default constructors. The "modified" flags are both initialized /// to "unmodified." #ifndef KOKKOS_ENABLE_DEPRECATED_CODE - DualView () = default; + DualView() = default; #else - DualView ():modified_flags (t_modified_flags("DualView::modified_flags")) { - modified_host = t_modified_flag(modified_flags,0); - modified_device = t_modified_flag(modified_flags,1); + DualView() : modified_flags(t_modified_flags("DualView::modified_flags")) { + modified_host = t_modified_flag(modified_flags, 0); + modified_device = t_modified_flag(modified_flags, 1); } #endif @@ -225,52 +219,52 @@ public: /// View objects. For example, if the View has three dimensions, /// the first three integer arguments will be nonzero, and you may /// omit the integer arguments that follow. - DualView (const std::string& label, - const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, - const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG) - : d_view (label, n0, n1, n2, n3, n4, n5, n6, n7) - , h_view (create_mirror_view (d_view)) // without UVM, host View mirrors - , modified_flags (t_modified_flags("DualView::modified_flags")) - { + DualView(const std::string& label, + const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG) + : d_view(label, n0, n1, n2, n3, n4, n5, n6, n7), + h_view(create_mirror_view(d_view)) // without UVM, host View mirrors + , + modified_flags(t_modified_flags("DualView::modified_flags")) { #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - modified_host = t_modified_flag(modified_flags,0); - modified_device = t_modified_flag(modified_flags,1); + modified_host = t_modified_flag(modified_flags, 0); + modified_device = t_modified_flag(modified_flags, 1); #endif } //! Copy constructor (shallow copy) - template - DualView (const DualView& src) : - d_view (src.d_view), - h_view (src.h_view), - modified_flags (src.modified_flags) + template + DualView(const DualView& src) + : d_view(src.d_view), + h_view(src.h_view), + modified_flags(src.modified_flags) #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - , modified_host(src.modified_host) - , modified_device(src.modified_device) + , + modified_host(src.modified_host), + modified_device(src.modified_device) #endif - {} + { + } //! Subview constructor - template< class SD, class S1 , class S2 , class S3 - , class Arg0 , class ... Args > - DualView( const DualView & src - , const Arg0 & arg0 - , Args ... args - ) - : d_view( Kokkos::subview( src.d_view , arg0 , args ... ) ) - , h_view( Kokkos::subview( src.h_view , arg0 , args ... ) ) - , modified_flags (src.modified_flags) + template + DualView(const DualView& src, const Arg0& arg0, Args... args) + : d_view(Kokkos::subview(src.d_view, arg0, args...)), + h_view(Kokkos::subview(src.h_view, arg0, args...)), + modified_flags(src.modified_flags) #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - , modified_host(src.modified_host) - , modified_device(src.modified_device) + , + modified_host(src.modified_host), + modified_device(src.modified_device) #endif - {} + { + } /// \brief Create DualView from existing device and host View objects. /// @@ -282,34 +276,34 @@ public: /// /// \param d_view_ Device View /// \param h_view_ Host View (must have type t_host = t_dev::HostMirror) - DualView (const t_dev& d_view_, const t_host& h_view_) : - d_view (d_view_), - h_view (h_view_), - modified_flags (t_modified_flags("DualView::modified_flags")) - { - if ( int(d_view.rank) != int(h_view.rank) || - d_view.extent(0) != h_view.extent(0) || - d_view.extent(1) != h_view.extent(1) || - d_view.extent(2) != h_view.extent(2) || - d_view.extent(3) != h_view.extent(3) || - d_view.extent(4) != h_view.extent(4) || - d_view.extent(5) != h_view.extent(5) || - d_view.extent(6) != h_view.extent(6) || - d_view.extent(7) != h_view.extent(7) || - d_view.stride_0() != h_view.stride_0() || - d_view.stride_1() != h_view.stride_1() || - d_view.stride_2() != h_view.stride_2() || - d_view.stride_3() != h_view.stride_3() || - d_view.stride_4() != h_view.stride_4() || - d_view.stride_5() != h_view.stride_5() || - d_view.stride_6() != h_view.stride_6() || - d_view.stride_7() != h_view.stride_7() || - d_view.span() != h_view.span() ) { - Kokkos::Impl::throw_runtime_exception("DualView constructed with incompatible views"); + DualView(const t_dev& d_view_, const t_host& h_view_) + : d_view(d_view_), + h_view(h_view_), + modified_flags(t_modified_flags("DualView::modified_flags")) { + if (int(d_view.rank) != int(h_view.rank) || + d_view.extent(0) != h_view.extent(0) || + d_view.extent(1) != h_view.extent(1) || + d_view.extent(2) != h_view.extent(2) || + d_view.extent(3) != h_view.extent(3) || + d_view.extent(4) != h_view.extent(4) || + d_view.extent(5) != h_view.extent(5) || + d_view.extent(6) != h_view.extent(6) || + d_view.extent(7) != h_view.extent(7) || + d_view.stride_0() != h_view.stride_0() || + d_view.stride_1() != h_view.stride_1() || + d_view.stride_2() != h_view.stride_2() || + d_view.stride_3() != h_view.stride_3() || + d_view.stride_4() != h_view.stride_4() || + d_view.stride_5() != h_view.stride_5() || + d_view.stride_6() != h_view.stride_6() || + d_view.stride_7() != h_view.stride_7() || + d_view.span() != h_view.span()) { + Kokkos::Impl::throw_runtime_exception( + "DualView constructed with incompatible views"); } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - modified_host = t_modified_flag(modified_flags,0); - modified_device = t_modified_flag(modified_flags,1); + modified_host = t_modified_flag(modified_flags, 0); + modified_device = t_modified_flag(modified_flags, 1); #endif } @@ -326,119 +320,133 @@ public: /// /// For example, suppose you create a DualView on Cuda, like this: /// \code - /// typedef Kokkos::DualView dual_view_type; - /// dual_view_type DV ("my dual view", 100); - /// \endcode - /// If you want to get the CUDA device View, do this: - /// \code - /// typename dual_view_type::t_dev cudaView = DV.view (); - /// \endcode - /// and if you want to get the host mirror of that View, do this: - /// \code - /// typedef typename Kokkos::HostSpace::execution_space host_device_type; - /// typename dual_view_type::t_host hostView = DV.view (); - /// \endcode - template< class Device > - KOKKOS_INLINE_FUNCTION - const typename Impl::if_c< - std::is_same::value, - t_dev, - t_host>::type& view () const - { - #ifndef KOKKOS_ENABLE_DEPRECATED_CODE - constexpr bool device_is_memspace = std::is_same::value; - constexpr bool device_is_execspace = std::is_same::value; - constexpr bool device_exec_is_t_dev_exec = std::is_same::value; - constexpr bool device_mem_is_t_dev_mem = std::is_same::value; - constexpr bool device_exec_is_t_host_exec = std::is_same::value; - constexpr bool device_mem_is_t_host_mem = std::is_same::value; - constexpr bool device_is_t_host_device = std::is_same::value; - constexpr bool device_is_t_dev_device = std::is_same::value; + /// typedef Kokkos::DualView + /// dual_view_type; dual_view_type DV ("my dual view", 100); \endcode If you + /// want to get the CUDA device View, do this: \code typename + /// dual_view_type::t_dev cudaView = DV.view (); \endcode and if + /// you want to get the host mirror of that View, do this: \code typedef + /// typename Kokkos::HostSpace::execution_space host_device_type; typename + /// dual_view_type::t_host hostView = DV.view (); \endcode + template + KOKKOS_INLINE_FUNCTION const typename Impl::if_c< + std::is_same::value, + t_dev, t_host>::type& + view() const { +#ifndef KOKKOS_ENABLE_DEPRECATED_CODE + constexpr bool device_is_memspace = + std::is_same::value; + constexpr bool device_is_execspace = + std::is_same::value; + constexpr bool device_exec_is_t_dev_exec = + std::is_same::value; + constexpr bool device_mem_is_t_dev_mem = + std::is_same::value; + constexpr bool device_exec_is_t_host_exec = + std::is_same::value; + constexpr bool device_mem_is_t_host_mem = + std::is_same::value; + constexpr bool device_is_t_host_device = + std::is_same::value; + constexpr bool device_is_t_dev_device = + std::is_same::value; static_assert( device_is_t_dev_device || device_is_t_host_device || - (device_is_memspace && (device_mem_is_t_dev_mem || device_mem_is_t_host_mem) ) || - (device_is_execspace && (device_exec_is_t_dev_exec || device_exec_is_t_host_exec) ) || - ( - (!device_is_execspace && !device_is_memspace) && ( - (device_mem_is_t_dev_mem || device_mem_is_t_host_mem) || - (device_exec_is_t_dev_exec || device_exec_is_t_host_exec) - ) - ) - , - "Template parameter to .view() must exactly match one of the DualView's device types or one of the execution or memory spaces"); - #endif + (device_is_memspace && + (device_mem_is_t_dev_mem || device_mem_is_t_host_mem)) || + (device_is_execspace && + (device_exec_is_t_dev_exec || device_exec_is_t_host_exec)) || + ((!device_is_execspace && !device_is_memspace) && + ((device_mem_is_t_dev_mem || device_mem_is_t_host_mem) || + (device_exec_is_t_dev_exec || device_exec_is_t_host_exec))), + "Template parameter to .view() must exactly match one of the " + "DualView's device types or one of the execution or memory spaces"); +#endif - return Impl::if_c< - std::is_same< - typename t_dev::memory_space, - typename Device::memory_space>::value, - t_dev, - t_host >::select (d_view , h_view); + return Impl::if_c::value, + t_dev, t_host>::select(d_view, h_view); } KOKKOS_INLINE_FUNCTION - t_host view_host() const { - return h_view; - } + t_host view_host() const { return h_view; } KOKKOS_INLINE_FUNCTION - t_dev view_device() const { - return d_view; - } + t_dev view_device() const { return d_view; } - template + template static int get_device_side() { - constexpr bool device_is_memspace = std::is_same::value; - constexpr bool device_is_execspace = std::is_same::value; - constexpr bool device_exec_is_t_dev_exec = std::is_same::value; - constexpr bool device_mem_is_t_dev_mem = std::is_same::value; - constexpr bool device_exec_is_t_host_exec = std::is_same::value; - constexpr bool device_mem_is_t_host_mem = std::is_same::value; - constexpr bool device_is_t_host_device = std::is_same::value; - constexpr bool device_is_t_dev_device = std::is_same::value; + constexpr bool device_is_memspace = + std::is_same::value; + constexpr bool device_is_execspace = + std::is_same::value; + constexpr bool device_exec_is_t_dev_exec = + std::is_same::value; + constexpr bool device_mem_is_t_dev_mem = + std::is_same::value; + constexpr bool device_exec_is_t_host_exec = + std::is_same::value; + constexpr bool device_mem_is_t_host_mem = + std::is_same::value; + constexpr bool device_is_t_host_device = + std::is_same::value; + constexpr bool device_is_t_dev_device = + std::is_same::value; - #ifndef KOKKOS_ENABLE_DEPRECATED_CODE +#ifndef KOKKOS_ENABLE_DEPRECATED_CODE static_assert( device_is_t_dev_device || device_is_t_host_device || - (device_is_memspace && (device_mem_is_t_dev_mem || device_mem_is_t_host_mem) ) || - (device_is_execspace && (device_exec_is_t_dev_exec || device_exec_is_t_host_exec) ) || - ( - (!device_is_execspace && !device_is_memspace) && ( - (device_mem_is_t_dev_mem || device_mem_is_t_host_mem) || - (device_exec_is_t_dev_exec || device_exec_is_t_host_exec) - ) - ) - , - "Template parameter to .sync() must exactly match one of the DualView's device types or one of the execution or memory spaces"); - #endif + (device_is_memspace && + (device_mem_is_t_dev_mem || device_mem_is_t_host_mem)) || + (device_is_execspace && + (device_exec_is_t_dev_exec || device_exec_is_t_host_exec)) || + ((!device_is_execspace && !device_is_memspace) && + ((device_mem_is_t_dev_mem || device_mem_is_t_host_mem) || + (device_exec_is_t_dev_exec || device_exec_is_t_host_exec))), + "Template parameter to .sync() must exactly match one of the " + "DualView's device types or one of the execution or memory spaces"); +#endif - #ifndef KOKKOS_ENABLE_DEPRECATED_CODE +#ifndef KOKKOS_ENABLE_DEPRECATED_CODE int dev = -1; - #else +#else int dev = 0; - #endif - if(device_is_t_dev_device) dev = 1; - else if(device_is_t_host_device) dev = 0; +#endif + if (device_is_t_dev_device) + dev = 1; + else if (device_is_t_host_device) + dev = 0; else { - if(device_is_memspace) { - if(device_mem_is_t_dev_mem) dev = 1; - if(device_mem_is_t_host_mem) dev = 0; - if(device_mem_is_t_host_mem && device_mem_is_t_dev_mem) dev = -1; + if (device_is_memspace) { + if (device_mem_is_t_dev_mem) dev = 1; + if (device_mem_is_t_host_mem) dev = 0; + if (device_mem_is_t_host_mem && device_mem_is_t_dev_mem) dev = -1; } - if(device_is_execspace) { - if(device_exec_is_t_dev_exec) dev = 1; - if(device_exec_is_t_host_exec) dev = 0; - if(device_exec_is_t_host_exec && device_exec_is_t_dev_exec) dev = -1; + if (device_is_execspace) { + if (device_exec_is_t_dev_exec) dev = 1; + if (device_exec_is_t_host_exec) dev = 0; + if (device_exec_is_t_host_exec && device_exec_is_t_dev_exec) dev = -1; } - if(!device_is_execspace && !device_is_memspace) { - if(device_mem_is_t_dev_mem) dev = 1; - if(device_mem_is_t_host_mem) dev = 0; - if(device_mem_is_t_host_mem && device_mem_is_t_dev_mem) dev = -1; - if(device_exec_is_t_dev_exec) dev = 1; - if(device_exec_is_t_host_exec) dev = 0; - if(device_exec_is_t_host_exec && device_exec_is_t_dev_exec) dev = -1; + if (!device_is_execspace && !device_is_memspace) { + if (device_mem_is_t_dev_mem) dev = 1; + if (device_mem_is_t_host_mem) dev = 0; + if (device_mem_is_t_host_mem && device_mem_is_t_dev_mem) dev = -1; + if (device_exec_is_t_dev_exec) dev = 1; + if (device_exec_is_t_host_exec) dev = 0; + if (device_exec_is_t_host_exec && device_exec_is_t_dev_exec) dev = -1; } } return dev; @@ -461,88 +469,94 @@ public: /// the data in either View. You must manually mark modified data /// as modified, by calling the modify() method with the /// appropriate template parameter. - template - void sync( const typename Impl::enable_if< - ( std::is_same< typename traits::data_type , typename traits::non_const_data_type>::value) || - ( std::is_same< Device , int>::value) - , int >::type& = 0) - { - if(modified_flags.data()==NULL) return; + template + void sync(const typename Impl::enable_if< + (std::is_same::value) || + (std::is_same::value), + int>::type& = 0) { + if (modified_flags.data() == NULL) return; int dev = get_device_side(); - if (dev == 1) { // if Device is the same as DualView's device type + if (dev == 1) { // if Device is the same as DualView's device type if ((modified_flags(0) > 0) && (modified_flags(0) >= modified_flags(1))) { - deep_copy (d_view, h_view); + deep_copy(d_view, h_view); modified_flags(0) = modified_flags(1) = 0; } } - if (dev == 0) { // hopefully Device is the same as DualView's host type + if (dev == 0) { // hopefully Device is the same as DualView's host type if ((modified_flags(1) > 0) && (modified_flags(1) >= modified_flags(0))) { - deep_copy (h_view, d_view); + deep_copy(h_view, d_view); modified_flags(0) = modified_flags(1) = 0; } } - if(std::is_same::value) { + if (std::is_same::value) { typename t_dev::execution_space().fence(); typename t_host::execution_space().fence(); } } - template - void sync ( const typename Impl::enable_if< - ( ! std::is_same< typename traits::data_type , typename traits::non_const_data_type>::value ) || - ( std::is_same< Device , int>::value) - , int >::type& = 0 ) - { - if(modified_flags.data()==NULL) return; + template + void sync(const typename Impl::enable_if< + (!std::is_same::value) || + (std::is_same::value), + int>::type& = 0) { + if (modified_flags.data() == NULL) return; int dev = get_device_side(); - if (dev == 1) { // if Device is the same as DualView's device type + if (dev == 1) { // if Device is the same as DualView's device type if ((modified_flags(0) > 0) && (modified_flags(0) >= modified_flags(1))) { - Impl::throw_runtime_exception("Calling sync on a DualView with a const datatype."); + Impl::throw_runtime_exception( + "Calling sync on a DualView with a const datatype."); } } - if (dev == 0){ // hopefully Device is the same as DualView's host type + if (dev == 0) { // hopefully Device is the same as DualView's host type if ((modified_flags(1) > 0) && (modified_flags(1) >= modified_flags(0))) { - Impl::throw_runtime_exception("Calling sync on a DualView with a const datatype."); + Impl::throw_runtime_exception( + "Calling sync on a DualView with a const datatype."); } } } void sync_host() { - if( ! std::is_same< typename traits::data_type , typename traits::non_const_data_type>::value ) - Impl::throw_runtime_exception("Calling sync_host on a DualView with a const datatype."); - if(modified_flags.data()==NULL) return; - if(modified_flags(1) > modified_flags(0)) { - deep_copy (h_view, d_view); + if (!std::is_same::value) + Impl::throw_runtime_exception( + "Calling sync_host on a DualView with a const datatype."); + if (modified_flags.data() == NULL) return; + if (modified_flags(1) > modified_flags(0)) { + deep_copy(h_view, d_view); modified_flags(1) = modified_flags(0) = 0; } } void sync_device() { - if( ! std::is_same< typename traits::data_type , typename traits::non_const_data_type>::value ) - Impl::throw_runtime_exception("Calling sync_device on a DualView with a const datatype."); - if(modified_flags.data()==NULL) return; - if(modified_flags(0) > modified_flags(1)) { - deep_copy (d_view, h_view); + if (!std::is_same::value) + Impl::throw_runtime_exception( + "Calling sync_device on a DualView with a const datatype."); + if (modified_flags.data() == NULL) return; + if (modified_flags(0) > modified_flags(1)) { + deep_copy(d_view, h_view); modified_flags(1) = modified_flags(0) = 0; } } - template - bool need_sync() const - { - if(modified_flags.data()==NULL) return false; + template + bool need_sync() const { + if (modified_flags.data() == NULL) return false; int dev = get_device_side(); - if (dev == 1) { // if Device is the same as DualView's device type + if (dev == 1) { // if Device is the same as DualView's device type if ((modified_flags(0) > 0) && (modified_flags(0) >= modified_flags(1))) { return true; } } - if (dev == 0){ // hopefully Device is the same as DualView's host type + if (dev == 0) { // hopefully Device is the same as DualView's host type if ((modified_flags(1) > 0) && (modified_flags(1) >= modified_flags(0))) { return true; } @@ -551,13 +565,13 @@ public: } inline bool need_sync_host() const { - if(modified_flags.data()==NULL) return false; - return modified_flags(0) - void modify () { - if(modified_flags.data()==NULL) return; + template + void modify() { + if (modified_flags.data() == NULL) return; int dev = get_device_side(); - if (dev == 1) { // if Device is the same as DualView's device type + if (dev == 1) { // if Device is the same as DualView's device type // Increment the device's modified count. - modified_flags(1) = (modified_flags(1) > modified_flags(0) ? - modified_flags(1) : modified_flags(0)) + 1; + modified_flags(1) = + (modified_flags(1) > modified_flags(0) ? modified_flags(1) + : modified_flags(0)) + + 1; } - if (dev == 0) { // hopefully Device is the same as DualView's host type + if (dev == 0) { // hopefully Device is the same as DualView's host type // Increment the host's modified count. - modified_flags(0) = (modified_flags(1) > modified_flags(0) ? - modified_flags(1) : modified_flags(0)) + 1; + modified_flags(0) = + (modified_flags(1) > modified_flags(0) ? modified_flags(1) + : modified_flags(0)) + + 1; } #ifdef KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK @@ -594,10 +612,12 @@ public: } inline void modify_host() { - if(modified_flags.data()!=NULL) { - modified_flags(0) = (modified_flags(1) > modified_flags(0) ? - modified_flags(1) : modified_flags(0)) + 1; - #ifdef KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK + if (modified_flags.data() != NULL) { + modified_flags(0) = + (modified_flags(1) > modified_flags(0) ? modified_flags(1) + : modified_flags(0)) + + 1; +#ifdef KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK if (modified_flags(0) && modified_flags(1)) { std::string msg = "Kokkos::DualView::modify_host ERROR: "; msg += "Concurrent modification of host and device views "; @@ -606,15 +626,17 @@ public: msg += "\"\n"; Kokkos::abort(msg.c_str()); } - #endif +#endif } } inline void modify_device() { - if(modified_flags.data()!=NULL) { - modified_flags(1) = (modified_flags(1) > modified_flags(0) ? - modified_flags(1) : modified_flags(0)) + 1; - #ifdef KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK + if (modified_flags.data() != NULL) { + modified_flags(1) = + (modified_flags(1) > modified_flags(0) ? modified_flags(1) + : modified_flags(0)) + + 1; +#ifdef KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK if (modified_flags(0) && modified_flags(1)) { std::string msg = "Kokkos::DualView::modify_device ERROR: "; msg += "Concurrent modification of host and device views "; @@ -623,12 +645,12 @@ public: msg += "\"\n"; Kokkos::abort(msg.c_str()); } - #endif +#endif } } inline void clear_sync_state() { - if(modified_flags.data()!=NULL) + if (modified_flags.data() != NULL) modified_flags(1) = modified_flags(0) = 0; } @@ -641,75 +663,72 @@ public: /// This discards any existing contents of the objects, and resets /// their modified flags. It does not copy the old contents /// of either View into the new View objects. - void realloc( const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ) { - ::Kokkos::realloc(d_view,n0,n1,n2,n3,n4,n5,n6,n7); - h_view = create_mirror_view( d_view ); + void realloc(const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG) { + ::Kokkos::realloc(d_view, n0, n1, n2, n3, n4, n5, n6, n7); + h_view = create_mirror_view(d_view); - /* Reset dirty flags */ - if(modified_flags.data()==NULL) { - modified_flags = t_modified_flags("DualView::modified_flags"); - } else - modified_flags(1) = modified_flags(0) = 0; + /* Reset dirty flags */ + if (modified_flags.data() == NULL) { + modified_flags = t_modified_flags("DualView::modified_flags"); + } else + modified_flags(1) = modified_flags(0) = 0; } /// \brief Resize both views, copying old contents into new if necessary. /// /// This method only copies the old contents into the new View /// objects for the device which was last marked as modified. - void resize( const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ) { - if(modified_flags.data()==NULL) { - modified_flags = t_modified_flags("DualView::modified_flags"); - } - if(modified_flags(1) >= modified_flags(0)) { - /* Resize on Device */ - ::Kokkos::resize(d_view,n0,n1,n2,n3,n4,n5,n6,n7); - h_view = create_mirror_view( d_view ); + void resize(const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG) { + if (modified_flags.data() == NULL) { + modified_flags = t_modified_flags("DualView::modified_flags"); + } + if (modified_flags(1) >= modified_flags(0)) { + /* Resize on Device */ + ::Kokkos::resize(d_view, n0, n1, n2, n3, n4, n5, n6, n7); + h_view = create_mirror_view(d_view); - /* Mark Device copy as modified */ - modified_flags(1) = modified_flags(1)+1; + /* Mark Device copy as modified */ + modified_flags(1) = modified_flags(1) + 1; - } else { - /* Realloc on Device */ + } else { + /* Realloc on Device */ - ::Kokkos::realloc(d_view,n0,n1,n2,n3,n4,n5,n6,n7); + ::Kokkos::realloc(d_view, n0, n1, n2, n3, n4, n5, n6, n7); - const bool sizeMismatch = ( h_view.extent(0) != n0 ) || - ( h_view.extent(1) != n1 ) || - ( h_view.extent(2) != n2 ) || - ( h_view.extent(3) != n3 ) || - ( h_view.extent(4) != n4 ) || - ( h_view.extent(5) != n5 ) || - ( h_view.extent(6) != n6 ) || - ( h_view.extent(7) != n7 ); - if ( sizeMismatch ) - ::Kokkos::resize(h_view,n0,n1,n2,n3,n4,n5,n6,n7); + const bool sizeMismatch = + (h_view.extent(0) != n0) || (h_view.extent(1) != n1) || + (h_view.extent(2) != n2) || (h_view.extent(3) != n3) || + (h_view.extent(4) != n4) || (h_view.extent(5) != n5) || + (h_view.extent(6) != n6) || (h_view.extent(7) != n7); + if (sizeMismatch) + ::Kokkos::resize(h_view, n0, n1, n2, n3, n4, n5, n6, n7); - t_host temp_view = create_mirror_view( d_view ); + t_host temp_view = create_mirror_view(d_view); - /* Remap on Host */ - Kokkos::deep_copy( temp_view , h_view ); + /* Remap on Host */ + Kokkos::deep_copy(temp_view, h_view); - h_view = temp_view; + h_view = temp_view; - d_view = create_mirror_view( typename t_dev::execution_space(), h_view ); + d_view = create_mirror_view(typename t_dev::execution_space(), h_view); - /* Mark Host copy as modified */ - modified_flags(0) = modified_flags(0)+1; - } + /* Mark Host copy as modified */ + modified_flags(0) = modified_flags(0) + 1; + } } //@} @@ -718,37 +737,35 @@ public: #ifdef KOKKOS_ENABLE_DEPRECATED_CODE //! The allocation size (same as Kokkos::View::capacity). - size_t capacity() const { - return d_view.span(); - } + size_t capacity() const { return d_view.span(); } #endif //! The allocation size (same as Kokkos::View::span). - KOKKOS_INLINE_FUNCTION constexpr size_t span() const { - return d_view.span(); - } + KOKKOS_INLINE_FUNCTION constexpr size_t span() const { return d_view.span(); } - KOKKOS_INLINE_FUNCTION bool span_is_contiguous() const { - return d_view.span_is_contiguous(); + KOKKOS_INLINE_FUNCTION bool span_is_contiguous() const { + return d_view.span_is_contiguous(); } //! Get stride(s) for each dimension. - template< typename iType> + template void stride(iType* stride_) const { d_view.stride(stride_); } - template< typename iType > - KOKKOS_INLINE_FUNCTION constexpr - typename std::enable_if< std::is_integral::value , size_t >::type - extent( const iType & r ) const - { return d_view.extent(r); } + template + KOKKOS_INLINE_FUNCTION constexpr + typename std::enable_if::value, size_t>::type + extent(const iType& r) const { + return d_view.extent(r); + } - template< typename iType > - KOKKOS_INLINE_FUNCTION constexpr - typename std::enable_if< std::is_integral::value , int >::type - extent_int( const iType & r ) const - { return static_cast(d_view.extent(r)); } + template + KOKKOS_INLINE_FUNCTION constexpr + typename std::enable_if::value, int>::type + extent_int(const iType& r) const { + return static_cast(d_view.extent(r)); + } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE /* Deprecate all 'dimension' functions in favor of @@ -756,27 +773,27 @@ public: */ /* \brief return size of dimension 0 */ - size_t dimension_0() const {return d_view.extent(0);} + size_t dimension_0() const { return d_view.extent(0); } /* \brief return size of dimension 1 */ - size_t dimension_1() const {return d_view.extent(1);} + size_t dimension_1() const { return d_view.extent(1); } /* \brief return size of dimension 2 */ - size_t dimension_2() const {return d_view.extent(2);} + size_t dimension_2() const { return d_view.extent(2); } /* \brief return size of dimension 3 */ - size_t dimension_3() const {return d_view.extent(3);} + size_t dimension_3() const { return d_view.extent(3); } /* \brief return size of dimension 4 */ - size_t dimension_4() const {return d_view.extent(4);} + size_t dimension_4() const { return d_view.extent(4); } /* \brief return size of dimension 5 */ - size_t dimension_5() const {return d_view.extent(5);} + size_t dimension_5() const { return d_view.extent(5); } /* \brief return size of dimension 6 */ - size_t dimension_6() const {return d_view.extent(6);} + size_t dimension_6() const { return d_view.extent(6); } /* \brief return size of dimension 7 */ - size_t dimension_7() const {return d_view.extent(7);} + size_t dimension_7() const { return d_view.extent(7); } #endif //@} }; -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -787,32 +804,24 @@ public: namespace Kokkos { namespace Impl { -template< class D, class A1, class A2, class A3, class ... Args > +template struct DualViewSubview { + typedef typename Kokkos::Impl::ViewMapping< + void, Kokkos::ViewTraits, Args...>::traits_type dst_traits; - typedef typename Kokkos::Impl::ViewMapping - < void - , Kokkos::ViewTraits< D, A1, A2, A3 > - , Args ... - >::traits_type dst_traits ; - - typedef Kokkos::DualView - < typename dst_traits::data_type - , typename dst_traits::array_layout - , typename dst_traits::device_type - , typename dst_traits::memory_traits - > type ; + typedef Kokkos::DualView< + typename dst_traits::data_type, typename dst_traits::array_layout, + typename dst_traits::device_type, typename dst_traits::memory_traits> + type; }; } /* namespace Impl */ - -template< class D , class A1 , class A2 , class A3 , class ... Args > -typename Impl::DualViewSubview::type -subview( const DualView & src , Args ... args ) -{ - return typename - Impl::DualViewSubview::type( src , args ... ); +template +typename Impl::DualViewSubview::type subview( + const DualView& src, Args... args) { + return typename Impl::DualViewSubview::type(src, + args...); } } /* namespace Kokkos */ @@ -826,40 +835,35 @@ namespace Kokkos { // Partial specialization of Kokkos::deep_copy() for DualView objects. // -template< class DT , class DL , class DD , class DM , - class ST , class SL , class SD , class SM > -void -deep_copy (DualView dst, // trust me, this must not be a reference - const DualView& src ) -{ - if ( src.need_sync_device() ) { - deep_copy (dst.h_view, src.h_view); - dst.modify_host(); - } - else { - deep_copy (dst.d_view, src.d_view); - dst.modify_device(); - } -} - -template< class ExecutionSpace , - class DT , class DL , class DD , class DM , - class ST , class SL , class SD , class SM > -void -deep_copy (const ExecutionSpace& exec , - DualView dst, // trust me, this must not be a reference - const DualView& src ) -{ - if ( src.need_sync_device() ) { - deep_copy (exec, dst.h_view, src.h_view); +template +void deep_copy( + DualView dst, // trust me, this must not be a reference + const DualView& src) { + if (src.need_sync_device()) { + deep_copy(dst.h_view, src.h_view); dst.modify_host(); } else { - deep_copy (exec, dst.d_view, src.d_view); + deep_copy(dst.d_view, src.d_view); dst.modify_device(); } } -} // namespace Kokkos +template +void deep_copy( + const ExecutionSpace& exec, + DualView dst, // trust me, this must not be a reference + const DualView& src) { + if (src.need_sync_device()) { + deep_copy(exec, dst.h_view, src.h_view); + dst.modify_host(); + } else { + deep_copy(exec, dst.d_view, src.d_view); + dst.modify_device(); + } +} + +} // namespace Kokkos #endif - diff --git a/lib/kokkos/containers/src/Kokkos_DynRankView.hpp b/lib/kokkos/containers/src/Kokkos_DynRankView.hpp index d1e6704a57..0ceb9d5d39 100644 --- a/lib/kokkos/containers/src/Kokkos_DynRankView.hpp +++ b/lib/kokkos/containers/src/Kokkos_DynRankView.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -56,255 +57,240 @@ namespace Kokkos { -template< typename DataType , class ... Properties > -class DynRankView; //forward declare +template +class DynRankView; // forward declare namespace Impl { template struct DynRankDimTraits { - - enum : size_t{unspecified = KOKKOS_INVALID_INDEX}; + enum : size_t { unspecified = KOKKOS_INVALID_INDEX }; // Compute the rank of the view from the nonzero dimension arguments. KOKKOS_INLINE_FUNCTION - static size_t computeRank( const size_t N0 - , const size_t N1 - , const size_t N2 - , const size_t N3 - , const size_t N4 - , const size_t N5 - , const size_t N6 - , const size_t /* N7 */) - { - return - ( (N6 == unspecified && N5 == unspecified && N4 == unspecified && N3 == unspecified && N2 == unspecified && N1 == unspecified && N0 == unspecified) ? 0 - : ( (N6 == unspecified && N5 == unspecified && N4 == unspecified && N3 == unspecified && N2 == unspecified && N1 == unspecified) ? 1 - : ( (N6 == unspecified && N5 == unspecified && N4 == unspecified && N3 == unspecified && N2 == unspecified) ? 2 - : ( (N6 == unspecified && N5 == unspecified && N4 == unspecified && N3 == unspecified) ? 3 - : ( (N6 == unspecified && N5 == unspecified && N4 == unspecified) ? 4 - : ( (N6 == unspecified && N5 == unspecified) ? 5 - : ( (N6 == unspecified) ? 6 - : 7 ) ) ) ) ) ) ); + static size_t computeRank(const size_t N0, const size_t N1, const size_t N2, + const size_t N3, const size_t N4, const size_t N5, + const size_t N6, const size_t /* N7 */) { + return ( + (N6 == unspecified && N5 == unspecified && N4 == unspecified && + N3 == unspecified && N2 == unspecified && N1 == unspecified && + N0 == unspecified) + ? 0 + : ((N6 == unspecified && N5 == unspecified && N4 == unspecified && + N3 == unspecified && N2 == unspecified && N1 == unspecified) + ? 1 + : ((N6 == unspecified && N5 == unspecified && + N4 == unspecified && N3 == unspecified && + N2 == unspecified) + ? 2 + : ((N6 == unspecified && N5 == unspecified && + N4 == unspecified && N3 == unspecified) + ? 3 + : ((N6 == unspecified && N5 == unspecified && + N4 == unspecified) + ? 4 + : ((N6 == unspecified && + N5 == unspecified) + ? 5 + : ((N6 == unspecified) + ? 6 + : 7))))))); } // Compute the rank of the view from the nonzero layout arguments. template - KOKKOS_INLINE_FUNCTION - static size_t computeRank( const Layout& layout ) - { - return computeRank( layout.dimension[0] - , layout.dimension[1] - , layout.dimension[2] - , layout.dimension[3] - , layout.dimension[4] - , layout.dimension[5] - , layout.dimension[6] - , layout.dimension[7] ); + KOKKOS_INLINE_FUNCTION static size_t computeRank(const Layout& layout) { + return computeRank(layout.dimension[0], layout.dimension[1], + layout.dimension[2], layout.dimension[3], + layout.dimension[4], layout.dimension[5], + layout.dimension[6], layout.dimension[7]); } // Extra overload to match that for specialize types v2 - template - KOKKOS_INLINE_FUNCTION - static size_t computeRank( const Kokkos::Impl::ViewCtorProp& /* prop */, const Layout& layout ) - { + template + KOKKOS_INLINE_FUNCTION static size_t computeRank( + const Kokkos::Impl::ViewCtorProp& /* prop */, + const Layout& layout) { return computeRank(layout); } // Create the layout for the rank-7 view. // Non-strided Layout template - KOKKOS_INLINE_FUNCTION - static typename std::enable_if< (std::is_same::value || std::is_same::value) , Layout >::type createLayout( const Layout& layout ) - { - return Layout( layout.dimension[0] != unspecified ? layout.dimension[0] : 1 - , layout.dimension[1] != unspecified ? layout.dimension[1] : 1 - , layout.dimension[2] != unspecified ? layout.dimension[2] : 1 - , layout.dimension[3] != unspecified ? layout.dimension[3] : 1 - , layout.dimension[4] != unspecified ? layout.dimension[4] : 1 - , layout.dimension[5] != unspecified ? layout.dimension[5] : 1 - , layout.dimension[6] != unspecified ? layout.dimension[6] : 1 - , layout.dimension[7] != unspecified ? layout.dimension[7] : 1 - ); + KOKKOS_INLINE_FUNCTION static typename std::enable_if< + (std::is_same::value || + std::is_same::value), + Layout>::type + createLayout(const Layout& layout) { + return Layout(layout.dimension[0] != unspecified ? layout.dimension[0] : 1, + layout.dimension[1] != unspecified ? layout.dimension[1] : 1, + layout.dimension[2] != unspecified ? layout.dimension[2] : 1, + layout.dimension[3] != unspecified ? layout.dimension[3] : 1, + layout.dimension[4] != unspecified ? layout.dimension[4] : 1, + layout.dimension[5] != unspecified ? layout.dimension[5] : 1, + layout.dimension[6] != unspecified ? layout.dimension[6] : 1, + layout.dimension[7] != unspecified ? layout.dimension[7] : 1); } // LayoutStride template - KOKKOS_INLINE_FUNCTION - static typename std::enable_if< (std::is_same::value) , Layout>::type createLayout( const Layout& layout ) - { - return Layout( layout.dimension[0] != unspecified ? layout.dimension[0] : 1 - , layout.stride[0] - , layout.dimension[1] != unspecified ? layout.dimension[1] : 1 - , layout.stride[1] - , layout.dimension[2] != unspecified ? layout.dimension[2] : 1 - , layout.stride[2] - , layout.dimension[3] != unspecified ? layout.dimension[3] : 1 - , layout.stride[3] - , layout.dimension[4] != unspecified ? layout.dimension[4] : 1 - , layout.stride[4] - , layout.dimension[5] != unspecified ? layout.dimension[5] : 1 - , layout.stride[5] - , layout.dimension[6] != unspecified ? layout.dimension[6] : 1 - , layout.stride[6] - , layout.dimension[7] != unspecified ? layout.dimension[7] : 1 - , layout.stride[7] - ); + KOKKOS_INLINE_FUNCTION static typename std::enable_if< + (std::is_same::value), Layout>::type + createLayout(const Layout& layout) { + return Layout(layout.dimension[0] != unspecified ? layout.dimension[0] : 1, + layout.stride[0], + layout.dimension[1] != unspecified ? layout.dimension[1] : 1, + layout.stride[1], + layout.dimension[2] != unspecified ? layout.dimension[2] : 1, + layout.stride[2], + layout.dimension[3] != unspecified ? layout.dimension[3] : 1, + layout.stride[3], + layout.dimension[4] != unspecified ? layout.dimension[4] : 1, + layout.stride[4], + layout.dimension[5] != unspecified ? layout.dimension[5] : 1, + layout.stride[5], + layout.dimension[6] != unspecified ? layout.dimension[6] : 1, + layout.stride[6], + layout.dimension[7] != unspecified ? layout.dimension[7] : 1, + layout.stride[7]); } // Extra overload to match that for specialize types - template - KOKKOS_INLINE_FUNCTION - static typename std::enable_if< (std::is_same::value || std::is_same::value || std::is_same::value) , typename Traits::array_layout >::type createLayout( const Kokkos::Impl::ViewCtorProp& /* prop */, const typename Traits::array_layout& layout ) - { - return createLayout( layout ); + template + KOKKOS_INLINE_FUNCTION static typename std::enable_if< + (std::is_same::value || + std::is_same::value || + std::is_same::value), + typename Traits::array_layout>::type + createLayout(const Kokkos::Impl::ViewCtorProp& /* prop */, + const typename Traits::array_layout& layout) { + return createLayout(layout); } // Create a view from the given dimension arguments. // This is only necessary because the shmem constructor doesn't take a layout. - // NDE shmem View's are not compatible with the added view_alloc value_type / fad_dim deduction functionality + // NDE shmem View's are not compatible with the added view_alloc value_type + // / fad_dim deduction functionality template - static ViewType createView( const ViewArg& arg - , const size_t N0 - , const size_t N1 - , const size_t N2 - , const size_t N3 - , const size_t N4 - , const size_t N5 - , const size_t N6 - , const size_t N7 ) - { - return ViewType( arg - , N0 != unspecified ? N0 : 1 - , N1 != unspecified ? N1 : 1 - , N2 != unspecified ? N2 : 1 - , N3 != unspecified ? N3 : 1 - , N4 != unspecified ? N4 : 1 - , N5 != unspecified ? N5 : 1 - , N6 != unspecified ? N6 : 1 - , N7 != unspecified ? N7 : 1 ); + static ViewType createView(const ViewArg& arg, const size_t N0, + const size_t N1, const size_t N2, const size_t N3, + const size_t N4, const size_t N5, const size_t N6, + const size_t N7) { + return ViewType(arg, N0 != unspecified ? N0 : 1, N1 != unspecified ? N1 : 1, + N2 != unspecified ? N2 : 1, N3 != unspecified ? N3 : 1, + N4 != unspecified ? N4 : 1, N5 != unspecified ? N5 : 1, + N6 != unspecified ? N6 : 1, N7 != unspecified ? N7 : 1); } }; - // Non-strided Layout - template - KOKKOS_INLINE_FUNCTION - static typename std::enable_if< (std::is_same::value || std::is_same::value) && std::is_integral::value , Layout >::type - reconstructLayout( const Layout& layout , iType dynrank ) - { - return Layout( dynrank > 0 ? layout.dimension[0] :KOKKOS_INVALID_INDEX - , dynrank > 1 ? layout.dimension[1] :KOKKOS_INVALID_INDEX - , dynrank > 2 ? layout.dimension[2] :KOKKOS_INVALID_INDEX - , dynrank > 3 ? layout.dimension[3] :KOKKOS_INVALID_INDEX - , dynrank > 4 ? layout.dimension[4] :KOKKOS_INVALID_INDEX - , dynrank > 5 ? layout.dimension[5] :KOKKOS_INVALID_INDEX - , dynrank > 6 ? layout.dimension[6] :KOKKOS_INVALID_INDEX - , dynrank > 7 ? layout.dimension[7] :KOKKOS_INVALID_INDEX - ); - } - - // LayoutStride - template - KOKKOS_INLINE_FUNCTION - static typename std::enable_if< (std::is_same::value) && std::is_integral::value , Layout >::type - reconstructLayout( const Layout& layout , iType dynrank ) - { - return Layout( dynrank > 0 ? layout.dimension[0] :KOKKOS_INVALID_INDEX - , dynrank > 0 ? layout.stride[0] : (0) - , dynrank > 1 ? layout.dimension[1] :KOKKOS_INVALID_INDEX - , dynrank > 1 ? layout.stride[1] : (0) - , dynrank > 2 ? layout.dimension[2] :KOKKOS_INVALID_INDEX - , dynrank > 2 ? layout.stride[2] : (0) - , dynrank > 3 ? layout.dimension[3] :KOKKOS_INVALID_INDEX - , dynrank > 3 ? layout.stride[3] : (0) - , dynrank > 4 ? layout.dimension[4] :KOKKOS_INVALID_INDEX - , dynrank > 4 ? layout.stride[4] : (0) - , dynrank > 5 ? layout.dimension[5] :KOKKOS_INVALID_INDEX - , dynrank > 5 ? layout.stride[5] : (0) - , dynrank > 6 ? layout.dimension[6] :KOKKOS_INVALID_INDEX - , dynrank > 6 ? layout.stride[6] : (0) - , dynrank > 7 ? layout.dimension[7] :KOKKOS_INVALID_INDEX - , dynrank > 7 ? layout.stride[7] : (0) - ); - } +// Non-strided Layout +template +KOKKOS_INLINE_FUNCTION static + typename std::enable_if<(std::is_same::value || + std::is_same::value) && + std::is_integral::value, + Layout>::type + reconstructLayout(const Layout& layout, iType dynrank) { + return Layout(dynrank > 0 ? layout.dimension[0] : KOKKOS_INVALID_INDEX, + dynrank > 1 ? layout.dimension[1] : KOKKOS_INVALID_INDEX, + dynrank > 2 ? layout.dimension[2] : KOKKOS_INVALID_INDEX, + dynrank > 3 ? layout.dimension[3] : KOKKOS_INVALID_INDEX, + dynrank > 4 ? layout.dimension[4] : KOKKOS_INVALID_INDEX, + dynrank > 5 ? layout.dimension[5] : KOKKOS_INVALID_INDEX, + dynrank > 6 ? layout.dimension[6] : KOKKOS_INVALID_INDEX, + dynrank > 7 ? layout.dimension[7] : KOKKOS_INVALID_INDEX); +} +// LayoutStride +template +KOKKOS_INLINE_FUNCTION static typename std::enable_if< + (std::is_same::value) && + std::is_integral::value, + Layout>::type +reconstructLayout(const Layout& layout, iType dynrank) { + return Layout(dynrank > 0 ? layout.dimension[0] : KOKKOS_INVALID_INDEX, + dynrank > 0 ? layout.stride[0] : (0), + dynrank > 1 ? layout.dimension[1] : KOKKOS_INVALID_INDEX, + dynrank > 1 ? layout.stride[1] : (0), + dynrank > 2 ? layout.dimension[2] : KOKKOS_INVALID_INDEX, + dynrank > 2 ? layout.stride[2] : (0), + dynrank > 3 ? layout.dimension[3] : KOKKOS_INVALID_INDEX, + dynrank > 3 ? layout.stride[3] : (0), + dynrank > 4 ? layout.dimension[4] : KOKKOS_INVALID_INDEX, + dynrank > 4 ? layout.stride[4] : (0), + dynrank > 5 ? layout.dimension[5] : KOKKOS_INVALID_INDEX, + dynrank > 5 ? layout.stride[5] : (0), + dynrank > 6 ? layout.dimension[6] : KOKKOS_INVALID_INDEX, + dynrank > 6 ? layout.stride[6] : (0), + dynrank > 7 ? layout.dimension[7] : KOKKOS_INVALID_INDEX, + dynrank > 7 ? layout.stride[7] : (0)); +} /** \brief Debug bounds-checking routines */ // Enhanced debug checking - most infrastructure matches that of functions in // Kokkos_ViewMapping; additional checks for extra arguments beyond rank are 0 -template< unsigned , typename iType0 , class MapType > -KOKKOS_INLINE_FUNCTION -bool dyn_rank_view_verify_operator_bounds( const iType0 & , const MapType & ) -{ return true ; } +template +KOKKOS_INLINE_FUNCTION bool dyn_rank_view_verify_operator_bounds( + const iType0&, const MapType&) { + return true; +} -template< unsigned R , typename iType0 , class MapType , typename iType1 , class ... Args > -KOKKOS_INLINE_FUNCTION -bool dyn_rank_view_verify_operator_bounds - ( const iType0 & rank - , const MapType & map - , const iType1 & i - , Args ... args - ) -{ - if ( static_cast(R) < rank ) { - return ( size_t(i) < map.extent(R) ) - && dyn_rank_view_verify_operator_bounds( rank , map , args ... ); - } - else if ( i != 0 ) { - printf("DynRankView Debug Bounds Checking Error: at rank %u\n Extra arguments beyond the rank must be zero \n",R); - return ( false ) - && dyn_rank_view_verify_operator_bounds( rank , map , args ... ); - } - else { - return ( true ) - && dyn_rank_view_verify_operator_bounds( rank , map , args ... ); +template +KOKKOS_INLINE_FUNCTION bool dyn_rank_view_verify_operator_bounds( + const iType0& rank, const MapType& map, const iType1& i, Args... args) { + if (static_cast(R) < rank) { + return (size_t(i) < map.extent(R)) && + dyn_rank_view_verify_operator_bounds(rank, map, args...); + } else if (i != 0) { + printf( + "DynRankView Debug Bounds Checking Error: at rank %u\n Extra " + "arguments beyond the rank must be zero \n", + R); + return (false) && + dyn_rank_view_verify_operator_bounds(rank, map, args...); + } else { + return (true) && + dyn_rank_view_verify_operator_bounds(rank, map, args...); } } -template< unsigned , class MapType > -inline -void dyn_rank_view_error_operator_bounds( char * , int , const MapType & ) -{} +template +inline void dyn_rank_view_error_operator_bounds(char*, int, const MapType&) {} -template< unsigned R , class MapType , class iType , class ... Args > -inline -void dyn_rank_view_error_operator_bounds - ( char * buf - , int len - , const MapType & map - , const iType & i - , Args ... args - ) -{ - const int n = - snprintf(buf,len," %ld < %ld %c" - , static_cast(i) - , static_cast( map.extent(R) ) - , ( sizeof...(Args) ? ',' : ')' ) - ); - dyn_rank_view_error_operator_bounds(buf+n,len-n,map,args...); +template +inline void dyn_rank_view_error_operator_bounds(char* buf, int len, + const MapType& map, + const iType& i, Args... args) { + const int n = snprintf( + buf, len, " %ld < %ld %c", static_cast(i), + static_cast(map.extent(R)), (sizeof...(Args) ? ',' : ')')); + dyn_rank_view_error_operator_bounds(buf + n, len - n, map, args...); } // op_rank = rank of the operator version that was called -template< typename MemorySpace - , typename iType0 , typename iType1 , class MapType , class ... Args > -KOKKOS_INLINE_FUNCTION -void dyn_rank_view_verify_operator_bounds - ( const iType0 & op_rank , const iType1 & rank - , const Kokkos::Impl::SharedAllocationTracker & tracker - , const MapType & map , Args ... args ) -{ - if ( static_cast(rank) > op_rank ) { - Kokkos::abort( "DynRankView Bounds Checking Error: Need at least rank arguments to the operator()" ); +template +KOKKOS_INLINE_FUNCTION void dyn_rank_view_verify_operator_bounds( + const iType0& op_rank, const iType1& rank, + const Kokkos::Impl::SharedAllocationTracker& tracker, const MapType& map, + Args... args) { + if (static_cast(rank) > op_rank) { + Kokkos::abort( + "DynRankView Bounds Checking Error: Need at least rank arguments to " + "the operator()"); } - if ( ! dyn_rank_view_verify_operator_bounds<0>( rank , map , args ... ) ) { -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + if (!dyn_rank_view_verify_operator_bounds<0>(rank, map, args...)) { +#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST) enum { LEN = 1024 }; - char buffer[ LEN ]; + char buffer[LEN]; const std::string label = tracker.template get_label(); - int n = snprintf(buffer,LEN,"DynRankView bounds error of view %s (", label.c_str()); - dyn_rank_view_error_operator_bounds<0>( buffer + n , LEN - n , map , args ... ); + int n = snprintf(buffer, LEN, "DynRankView bounds error of view %s (", + label.c_str()); + dyn_rank_view_error_operator_bounds<0>(buffer + n, LEN - n, map, args...); Kokkos::Impl::throw_runtime_exception(std::string(buffer)); #else Kokkos::abort("DynRankView bounds error"); @@ -312,86 +298,84 @@ void dyn_rank_view_verify_operator_bounds } } - /** \brief Assign compatible default mappings */ struct ViewToDynRankViewTag {}; -} // namespace Impl +} // namespace Impl namespace Impl { -template< class DstTraits , class SrcTraits > -class ViewMapping< DstTraits , SrcTraits , - typename std::enable_if<( - std::is_same< typename DstTraits::memory_space , typename SrcTraits::memory_space >::value - && - std::is_same< typename DstTraits::specialize , void >::value - && - std::is_same< typename SrcTraits::specialize , void >::value - && - ( - std::is_same< typename DstTraits::array_layout , typename SrcTraits::array_layout >::value - || - ( - ( - std::is_same< typename DstTraits::array_layout , Kokkos::LayoutLeft >::value || - std::is_same< typename DstTraits::array_layout , Kokkos::LayoutRight >::value || - std::is_same< typename DstTraits::array_layout , Kokkos::LayoutStride >::value - ) - && - ( - std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutLeft >::value || - std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutRight >::value || - std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutStride >::value - ) - ) - ) - ) , Kokkos::Impl::ViewToDynRankViewTag >::type > -{ -private: +template +class ViewMapping< + DstTraits, SrcTraits, + typename std::enable_if< + (std::is_same::value && + std::is_same::value && + std::is_same::value && + (std::is_same::value || + ((std::is_same::value || + std::is_same::value || + std::is_same::value) && + (std::is_same::value || + std::is_same::value || + std::is_same::value)))), + Kokkos::Impl::ViewToDynRankViewTag>::type> { + private: + enum { + is_assignable_value_type = + std::is_same::value || + std::is_same::value + }; - enum { is_assignable_value_type = - std::is_same< typename DstTraits::value_type - , typename SrcTraits::value_type >::value || - std::is_same< typename DstTraits::value_type - , typename SrcTraits::const_value_type >::value }; + enum { + is_assignable_layout = + std::is_same::value || + std::is_same::value + }; - enum { is_assignable_layout = - std::is_same< typename DstTraits::array_layout - , typename SrcTraits::array_layout >::value || - std::is_same< typename DstTraits::array_layout - , Kokkos::LayoutStride >::value - }; + public: + enum { is_assignable = is_assignable_value_type && is_assignable_layout }; -public: + typedef ViewMapping DstType; + typedef ViewMapping SrcType; - enum { is_assignable = is_assignable_value_type && - is_assignable_layout }; + template + KOKKOS_INLINE_FUNCTION static void assign( + Kokkos::DynRankView& dst, const Kokkos::View& src) { + static_assert( + is_assignable_value_type, + "View assignment must have same value type or const = non-const"); - typedef ViewMapping< DstTraits , typename DstTraits::specialize > DstType ; - typedef ViewMapping< SrcTraits , typename SrcTraits::specialize > SrcType ; - - template < typename DT , typename ... DP , typename ST , typename ... SP > - KOKKOS_INLINE_FUNCTION - static void assign( Kokkos::DynRankView< DT , DP...> & dst , const Kokkos::View< ST , SP... > & src ) - { - static_assert( is_assignable_value_type - , "View assignment must have same value type or const = non-const" ); - - static_assert( is_assignable_layout - , "View assignment must have compatible layout or have rank <= 1" ); + static_assert( + is_assignable_layout, + "View assignment must have compatible layout or have rank <= 1"); // Removed dimension checks... - typedef typename DstType::offset_type dst_offset_type ; - dst.m_map.m_impl_offset = dst_offset_type(std::integral_constant() , src.layout() ); //Check this for integer input1 for padding, etc - dst.m_map.m_impl_handle = Kokkos::Impl::ViewDataHandle< DstTraits >::assign( src.m_map.m_impl_handle , src.m_track ); - dst.m_track.assign( src.m_track , DstTraits::is_managed ); - dst.m_rank = src.Rank ; - } + typedef typename DstType::offset_type dst_offset_type; + dst.m_map.m_impl_offset = dst_offset_type( + std::integral_constant(), + src.layout()); // Check this for integer input1 for padding, etc + dst.m_map.m_impl_handle = Kokkos::Impl::ViewDataHandle::assign( + src.m_map.m_impl_handle, src.m_track); + dst.m_track.assign(src.m_track, DstTraits::is_managed); + dst.m_rank = src.Rank; + } }; -} //end Impl +} // namespace Impl /* \class DynRankView * \brief Container that creates a Kokkos view with rank determined at runtime. @@ -400,7 +384,8 @@ public: * Changes from View * 1. The rank of the DynRankView is returned by the method rank() * 2. Max rank of a DynRankView is 7 - * 3. subview called with 'subview(...)' or 'subdynrankview(...)' (backward compatibility) + * 3. subview called with 'subview(...)' or 'subdynrankview(...)' (backward + * compatibility) * 4. Every subview is returned with LayoutStride * 5. Copy and Copy-Assign View to DynRankView * 6. deep_copy between Views and DynRankViews @@ -408,93 +393,99 @@ public: * */ -template< class > struct is_dyn_rank_view : public std::false_type {}; +template +struct is_dyn_rank_view : public std::false_type {}; -template< class D, class ... P > -struct is_dyn_rank_view< Kokkos::DynRankView > : public std::true_type {}; +template +struct is_dyn_rank_view > : public std::true_type { +}; +template +class DynRankView : public ViewTraits { + static_assert(!std::is_array::value && + !std::is_pointer::value, + "Cannot template DynRankView with array or pointer datatype - " + "must be pod"); -template< typename DataType , class ... Properties > -class DynRankView : public ViewTraits< DataType , Properties ... > -{ - static_assert( !std::is_array::value && !std::is_pointer::value , "Cannot template DynRankView with array or pointer datatype - must be pod" ); + private: + template + friend class DynRankView; + template + friend class Kokkos::Impl::ViewMapping; -private: - template < class , class ... > friend class DynRankView ; - template < class , class ... > friend class Kokkos::Impl::ViewMapping ; + public: + typedef ViewTraits drvtraits; -public: - typedef ViewTraits< DataType , Properties ... > drvtraits ; + typedef View view_type; - typedef View< DataType******* , Properties...> view_type ; + typedef ViewTraits traits; - typedef ViewTraits< DataType******* , Properties ... > traits ; + private: + typedef Kokkos::Impl::ViewMapping + map_type; + typedef Kokkos::Impl::SharedAllocationTracker track_type; - -private: - typedef Kokkos::Impl::ViewMapping< traits , typename traits::specialize > map_type ; - typedef Kokkos::Impl::SharedAllocationTracker track_type ; - - track_type m_track ; - map_type m_map ; + track_type m_track; + map_type m_map; unsigned m_rank; -public: + public: KOKKOS_INLINE_FUNCTION - view_type & DownCast() const { return ( view_type & ) (*this); } + view_type& DownCast() const { return (view_type&)(*this); } KOKKOS_INLINE_FUNCTION - const view_type & ConstDownCast() const { return (const view_type & ) (*this); } + const view_type& ConstDownCast() const { return (const view_type&)(*this); } - //Types below - at least the HostMirror requires the value_type, NOT the rank 7 data_type of the traits + // Types below - at least the HostMirror requires the value_type, NOT the rank + // 7 data_type of the traits /** \brief Compatible view of array of scalar types */ - typedef DynRankView< typename drvtraits::scalar_array_type , - typename drvtraits::array_layout , - typename drvtraits::device_type , - typename drvtraits::memory_traits > - array_type ; + typedef DynRankView< + typename drvtraits::scalar_array_type, typename drvtraits::array_layout, + typename drvtraits::device_type, typename drvtraits::memory_traits> + array_type; /** \brief Compatible view of const data type */ - typedef DynRankView< typename drvtraits::const_data_type , - typename drvtraits::array_layout , - typename drvtraits::device_type , - typename drvtraits::memory_traits > - const_type ; + typedef DynRankView< + typename drvtraits::const_data_type, typename drvtraits::array_layout, + typename drvtraits::device_type, typename drvtraits::memory_traits> + const_type; /** \brief Compatible view of non-const data type */ - typedef DynRankView< typename drvtraits::non_const_data_type , - typename drvtraits::array_layout , - typename drvtraits::device_type , - typename drvtraits::memory_traits > - non_const_type ; + typedef DynRankView< + typename drvtraits::non_const_data_type, typename drvtraits::array_layout, + typename drvtraits::device_type, typename drvtraits::memory_traits> + non_const_type; /** \brief Compatible HostMirror view */ - typedef DynRankView< typename drvtraits::non_const_data_type , - typename drvtraits::array_layout , - typename drvtraits::host_mirror_space > - HostMirror ; - + typedef DynRankView + HostMirror; //---------------------------------------- // Domain rank and extents -// enum { Rank = map_type::Rank }; //Will be dyn rank of 7 always, keep the enum? + // enum { Rank = map_type::Rank }; //Will be dyn rank of 7 always, keep the + // enum? - template< typename iType > + template KOKKOS_INLINE_FUNCTION constexpr - typename std::enable_if< std::is_integral::value , size_t >::type - extent( const iType & r ) const - { return m_map.extent(r); } + typename std::enable_if::value, size_t>::type + extent(const iType& r) const { + return m_map.extent(r); + } - template< typename iType > + template KOKKOS_INLINE_FUNCTION constexpr - typename std::enable_if< std::is_integral::value , int >::type - extent_int( const iType & r ) const - { return static_cast(m_map.extent(r)); } + typename std::enable_if::value, int>::type + extent_int(const iType& r) const { + return static_cast(m_map.extent(r)); + } - KOKKOS_INLINE_FUNCTION constexpr - typename traits::array_layout layout() const - { return m_map.layout(); } + KOKKOS_INLINE_FUNCTION constexpr typename traits::array_layout layout() + const { + return m_map.layout(); + } //---------------------------------------- /* Deprecate all 'dimension' functions in favor of @@ -502,421 +493,572 @@ public: */ #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - template< typename iType > + template KOKKOS_INLINE_FUNCTION constexpr - typename std::enable_if< std::is_integral::value , size_t >::type - dimension( const iType & r ) const { return extent( r ); } + typename std::enable_if::value, size_t>::type + dimension(const iType& r) const { + return extent(r); + } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_0() const { return m_map.dimension_0(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_1() const { return m_map.dimension_1(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_2() const { return m_map.dimension_2(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_3() const { return m_map.dimension_3(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_4() const { return m_map.dimension_4(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_5() const { return m_map.dimension_5(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_6() const { return m_map.dimension_6(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_7() const { return m_map.dimension_7(); } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_0() const { + return m_map.dimension_0(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_1() const { + return m_map.dimension_1(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_2() const { + return m_map.dimension_2(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_3() const { + return m_map.dimension_3(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_4() const { + return m_map.dimension_4(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_5() const { + return m_map.dimension_5(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_6() const { + return m_map.dimension_6(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_7() const { + return m_map.dimension_7(); + } #endif //---------------------------------------- - KOKKOS_INLINE_FUNCTION constexpr size_t size() const { return m_map.extent(0) * - m_map.extent(1) * - m_map.extent(2) * - m_map.extent(3) * - m_map.extent(4) * - m_map.extent(5) * - m_map.extent(6) * - m_map.extent(7); } + KOKKOS_INLINE_FUNCTION constexpr size_t size() const { + return m_map.extent(0) * m_map.extent(1) * m_map.extent(2) * + m_map.extent(3) * m_map.extent(4) * m_map.extent(5) * + m_map.extent(6) * m_map.extent(7); + } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_0() const { return m_map.stride_0(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_1() const { return m_map.stride_1(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_2() const { return m_map.stride_2(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_3() const { return m_map.stride_3(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_4() const { return m_map.stride_4(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_5() const { return m_map.stride_5(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_6() const { return m_map.stride_6(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_7() const { return m_map.stride_7(); } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_0() const { + return m_map.stride_0(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_1() const { + return m_map.stride_1(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_2() const { + return m_map.stride_2(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_3() const { + return m_map.stride_3(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_4() const { + return m_map.stride_4(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_5() const { + return m_map.stride_5(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_6() const { + return m_map.stride_6(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_7() const { + return m_map.stride_7(); + } - template< typename iType > - KOKKOS_INLINE_FUNCTION void stride( iType * const s ) const { m_map.stride(s); } + template + KOKKOS_INLINE_FUNCTION void stride(iType* const s) const { + m_map.stride(s); + } //---------------------------------------- // Range span is the span which contains all members. - typedef typename map_type::reference_type reference_type ; - typedef typename map_type::pointer_type pointer_type ; + typedef typename map_type::reference_type reference_type; + typedef typename map_type::pointer_type pointer_type; - enum { reference_type_is_lvalue_reference = std::is_lvalue_reference< reference_type >::value }; + enum { + reference_type_is_lvalue_reference = + std::is_lvalue_reference::value + }; KOKKOS_INLINE_FUNCTION constexpr size_t span() const { return m_map.span(); } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE // Deprecated, use 'span()' instead - KOKKOS_INLINE_FUNCTION constexpr size_t capacity() const { return m_map.span(); } + KOKKOS_INLINE_FUNCTION constexpr size_t capacity() const { + return m_map.span(); + } #endif - KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const { return m_map.span_is_contiguous(); } - KOKKOS_INLINE_FUNCTION constexpr pointer_type data() const { return m_map.data(); } + KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const { + return m_map.span_is_contiguous(); + } + KOKKOS_INLINE_FUNCTION constexpr pointer_type data() const { + return m_map.data(); + } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE // Deprecated, use 'span_is_contigous()' instead - KOKKOS_INLINE_FUNCTION constexpr bool is_contiguous() const { return m_map.span_is_contiguous(); } + KOKKOS_INLINE_FUNCTION constexpr bool is_contiguous() const { + return m_map.span_is_contiguous(); + } // Deprecated, use 'data()' instead - KOKKOS_INLINE_FUNCTION constexpr pointer_type ptr_on_device() const { return m_map.data(); } + KOKKOS_INLINE_FUNCTION constexpr pointer_type ptr_on_device() const { + return m_map.data(); + } #endif //---------------------------------------- // Allow specializations to query their specialized map #ifdef KOKKOS_ENABLE_DEPRECATED_CODE KOKKOS_INLINE_FUNCTION - const Kokkos::Impl::ViewMapping< traits , typename traits::specialize > & - implementation_map() const { return m_map ; } + const Kokkos::Impl::ViewMapping& + implementation_map() const { + return m_map; + } #endif KOKKOS_INLINE_FUNCTION - const Kokkos::Impl::ViewMapping< traits , typename traits::specialize > & - impl_map() const { return m_map ; } + const Kokkos::Impl::ViewMapping& + impl_map() const { + return m_map; + } //---------------------------------------- -private: - + private: enum { - is_layout_left = std::is_same< typename traits::array_layout - , Kokkos::LayoutLeft >::value , + is_layout_left = + std::is_same::value, - is_layout_right = std::is_same< typename traits::array_layout - , Kokkos::LayoutRight >::value , + is_layout_right = + std::is_same::value, - is_layout_stride = std::is_same< typename traits::array_layout - , Kokkos::LayoutStride >::value , + is_layout_stride = std::is_same::value, - is_default_map = - std::is_same< typename traits::specialize , void >::value && - ( is_layout_left || is_layout_right || is_layout_stride ) + is_default_map = std::is_same::value && + (is_layout_left || is_layout_right || is_layout_stride) }; - template< class Space , bool = Kokkos::Impl::MemorySpaceAccess< Space , typename traits::memory_space >::accessible > struct verify_space - { KOKKOS_FORCEINLINE_FUNCTION static void check() {} }; + template ::accessible> + struct verify_space { + KOKKOS_FORCEINLINE_FUNCTION static void check() {} + }; - template< class Space > struct verify_space - { KOKKOS_FORCEINLINE_FUNCTION static void check() - { Kokkos::abort("Kokkos::DynRankView ERROR: attempt to access inaccessible memory space"); }; + template + struct verify_space { + KOKKOS_FORCEINLINE_FUNCTION static void check() { + Kokkos::abort( + "Kokkos::DynRankView ERROR: attempt to access inaccessible memory " + "space"); }; + }; // Bounds checking macros -#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ) +#if defined(KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK) // rank of the calling operator - included as first argument in ARG -#define KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( ARG ) \ - DynRankView::template verify_space< Kokkos::Impl::ActiveExecutionMemorySpace >::check(); \ - Kokkos::Impl::dyn_rank_view_verify_operator_bounds< typename traits::memory_space > ARG ; +#define KOKKOS_IMPL_VIEW_OPERATOR_VERIFY(ARG) \ + DynRankView::template verify_space< \ + Kokkos::Impl::ActiveExecutionMemorySpace>::check(); \ + Kokkos::Impl::dyn_rank_view_verify_operator_bounds< \ + typename traits::memory_space> \ + ARG; #else -#define KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( ARG ) \ - DynRankView::template verify_space< Kokkos::Impl::ActiveExecutionMemorySpace >::check(); +#define KOKKOS_IMPL_VIEW_OPERATOR_VERIFY(ARG) \ + DynRankView::template verify_space< \ + Kokkos::Impl::ActiveExecutionMemorySpace>::check(); #endif -public: - + public: KOKKOS_INLINE_FUNCTION constexpr unsigned rank() const { return m_rank; } - - //operators () + // operators () // Rank 0 KOKKOS_INLINE_FUNCTION - reference_type operator()() const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (0 , this->rank(), m_track, m_map) ) - return impl_map().reference(); - //return m_map.reference(0,0,0,0,0,0,0); - } + reference_type operator()() const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((0, this->rank(), m_track, m_map)) + return impl_map().reference(); + // return m_map.reference(0,0,0,0,0,0,0); + } // Rank 1 - // This assumes a contiguous underlying memory (i.e. no padding, no striding...) - template< typename iType > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< std::is_same::value && std::is_integral::value, reference_type>::type - operator[](const iType & i0) const - { - //Phalanx is violating this, since they use the operator to access ALL elements in the allocation - //KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank(), m_track, m_map) ) - return data()[i0]; - } + // This assumes a contiguous underlying memory (i.e. no padding, no + // striding...) + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + std::is_same::value && + std::is_integral::value, + reference_type>::type + operator[](const iType& i0) const { + // Phalanx is violating this, since they use the operator to access ALL + // elements in the allocation KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , + // this->rank(), m_track, m_map) ) + return data()[i0]; + } - // This assumes a contiguous underlying memory (i.e. no padding, no striding... - // AND a Trilinos/Sacado scalar type ) - template< typename iType > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !std::is_same::value && std::is_integral::value, reference_type>::type - operator[](const iType & i0) const - { -// auto map = impl_map(); - const size_t dim_scalar = m_map.dimension_scalar(); - const size_t bytes = this->span() / dim_scalar; + // This assumes a contiguous underlying memory (i.e. no padding, no + // striding... AND a Trilinos/Sacado scalar type ) + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !std::is_same::value && + std::is_integral::value, + reference_type>::type + operator[](const iType& i0) const { + // auto map = impl_map(); + const size_t dim_scalar = m_map.dimension_scalar(); + const size_t bytes = this->span() / dim_scalar; - typedef Kokkos::View > tmp_view_type; - tmp_view_type rankone_view(this->data(), bytes, dim_scalar); - return rankone_view(i0); - } + typedef Kokkos::View< + DataType*, typename traits::array_layout, typename traits::device_type, + Kokkos::MemoryTraits > + tmp_view_type; + tmp_view_type rankone_view(this->data(), bytes, dim_scalar); + return rankone_view(i0); + } // Rank 1 parenthesis - template< typename iType > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank(), m_track, m_map, i0) ) - return m_map.reference(i0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value), + reference_type>::type + operator()(const iType& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((1, this->rank(), m_track, m_map, i0)) + return m_map.reference(i0); + } - template< typename iType > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank(), m_track, m_map, i0) ) - return m_map.reference(i0,0,0,0,0,0,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + operator()(const iType& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((1, this->rank(), m_track, m_map, i0)) + return m_map.reference(i0, 0, 0, 0, 0, 0, 0); + } // Rank 2 - template< typename iType0 , typename iType1 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (2 , this->rank(), m_track, m_map, i0, i1) ) - return m_map.reference(i0,i1); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value && std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((2, this->rank(), m_track, m_map, i0, i1)) + return m_map.reference(i0, i1); + } - template< typename iType0 , typename iType1 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (2 , this->rank(), m_track, m_map, i0, i1) ) - return m_map.reference(i0,i1,0,0,0,0,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((2, this->rank(), m_track, m_map, i0, i1)) + return m_map.reference(i0, i1, 0, 0, 0, 0, 0); + } // Rank 3 - template< typename iType0 , typename iType1 , typename iType2 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (3 , this->rank(), m_track, m_map, i0, i1, i2) ) - return m_map.reference(i0,i1,i2); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1, const iType2& i2) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (3, this->rank(), m_track, m_map, i0, i1, i2)) + return m_map.reference(i0, i1, i2); + } - template< typename iType0 , typename iType1 , typename iType2 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (3 , this->rank(), m_track, m_map, i0, i1, i2) ) - return m_map.reference(i0,i1,i2,0,0,0,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1, const iType2& i2) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (3, this->rank(), m_track, m_map, i0, i1, i2)) + return m_map.reference(i0, i1, i2, 0, 0, 0, 0); + } // Rank 4 - template< typename iType0 , typename iType1 , typename iType2 , typename iType3 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (4 , this->rank(), m_track, m_map, i0, i1, i2, i3) ) - return m_map.reference(i0,i1,i2,i3); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1, const iType2& i2, + const iType3& i3) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (4, this->rank(), m_track, m_map, i0, i1, i2, i3)) + return m_map.reference(i0, i1, i2, i3); + } - template< typename iType0 , typename iType1 , typename iType2 , typename iType3 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (4 , this->rank(), m_track, m_map, i0, i1, i2, i3) ) - return m_map.reference(i0,i1,i2,i3,0,0,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1, const iType2& i2, + const iType3& i3) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (4, this->rank(), m_track, m_map, i0, i1, i2, i3)) + return m_map.reference(i0, i1, i2, i3, 0, 0, 0); + } // Rank 5 - template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (5 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4) ) - return m_map.reference(i0,i1,i2,i3,i4); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1, const iType2& i2, + const iType3& i3, const iType4& i4) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (5, this->rank(), m_track, m_map, i0, i1, i2, i3, i4)) + return m_map.reference(i0, i1, i2, i3, i4); + } - template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (5 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4) ) - return m_map.reference(i0,i1,i2,i3,i4,0,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1, const iType2& i2, + const iType3& i3, const iType4& i4) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (5, this->rank(), m_track, m_map, i0, i1, i2, i3, i4)) + return m_map.reference(i0, i1, i2, i3, i4, 0, 0); + } // Rank 6 - template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 , typename iType5 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (6 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5) ) - return m_map.reference(i0,i1,i2,i3,i4,i5); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1, const iType2& i2, + const iType3& i3, const iType4& i4, const iType5& i5) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (6, this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5)) + return m_map.reference(i0, i1, i2, i3, i4, i5); + } - template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 , typename iType5 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (6 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5) ) - return m_map.reference(i0,i1,i2,i3,i4,i5,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1, const iType2& i2, + const iType3& i3, const iType4& i4, const iType5& i5) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (6, this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5)) + return m_map.reference(i0, i1, i2, i3, i4, i5, 0); + } // Rank 7 - template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 , typename iType5 , typename iType6 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - operator()(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 , const iType6 & i6 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (7 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5, i6) ) - return m_map.reference(i0,i1,i2,i3,i4,i5,i6); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value), + reference_type>::type + operator()(const iType0& i0, const iType1& i1, const iType2& i2, + const iType3& i3, const iType4& i4, const iType5& i5, + const iType6& i6) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (7, this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5, i6)) + return m_map.reference(i0, i1, i2, i3, i4, i5, i6); + } // Rank 0 KOKKOS_INLINE_FUNCTION - reference_type access() const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (0 , this->rank(), m_track, m_map) ) - return impl_map().reference(); - //return m_map.reference(0,0,0,0,0,0,0); - } + reference_type access() const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((0, this->rank(), m_track, m_map)) + return impl_map().reference(); + // return m_map.reference(0,0,0,0,0,0,0); + } // Rank 1 - // Rank 1 parenthesis - template< typename iType > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value), reference_type>::type - access(const iType & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank(), m_track, m_map, i0) ) - return m_map.reference(i0); - } + // Rank 1 parenthesis + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value), + reference_type>::type + access(const iType& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((1, this->rank(), m_track, m_map, i0)) + return m_map.reference(i0); + } - template< typename iType > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - access(const iType & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (1 , this->rank(), m_track, m_map, i0) ) - return m_map.reference(i0,0,0,0,0,0,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + access(const iType& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((1, this->rank(), m_track, m_map, i0)) + return m_map.reference(i0, 0, 0, 0, 0, 0, 0); + } // Rank 2 - template< typename iType0 , typename iType1 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (2 , this->rank(), m_track, m_map, i0, i1) ) - return m_map.reference(i0,i1); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value && std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((2, this->rank(), m_track, m_map, i0, i1)) + return m_map.reference(i0, i1); + } - template< typename iType0 , typename iType1 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (2 , this->rank(), m_track, m_map, i0, i1) ) - return m_map.reference(i0,i1,0,0,0,0,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((2, this->rank(), m_track, m_map, i0, i1)) + return m_map.reference(i0, i1, 0, 0, 0, 0, 0); + } // Rank 3 - template< typename iType0 , typename iType1 , typename iType2 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (3 , this->rank(), m_track, m_map, i0, i1, i2) ) - return m_map.reference(i0,i1,i2); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1, const iType2& i2) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (3, this->rank(), m_track, m_map, i0, i1, i2)) + return m_map.reference(i0, i1, i2); + } - template< typename iType0 , typename iType1 , typename iType2 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (3 , this->rank(), m_track, m_map, i0, i1, i2) ) - return m_map.reference(i0,i1,i2,0,0,0,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1, const iType2& i2) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (3, this->rank(), m_track, m_map, i0, i1, i2)) + return m_map.reference(i0, i1, i2, 0, 0, 0, 0); + } // Rank 4 - template< typename iType0 , typename iType1 , typename iType2 , typename iType3 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (4 , this->rank(), m_track, m_map, i0, i1, i2, i3) ) - return m_map.reference(i0,i1,i2,i3); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1, const iType2& i2, + const iType3& i3) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (4, this->rank(), m_track, m_map, i0, i1, i2, i3)) + return m_map.reference(i0, i1, i2, i3); + } - template< typename iType0 , typename iType1 , typename iType2 , typename iType3 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (4 , this->rank(), m_track, m_map, i0, i1, i2, i3) ) - return m_map.reference(i0,i1,i2,i3,0,0,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1, const iType2& i2, + const iType3& i3) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (4, this->rank(), m_track, m_map, i0, i1, i2, i3)) + return m_map.reference(i0, i1, i2, i3, 0, 0, 0); + } // Rank 5 - template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (5 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4) ) - return m_map.reference(i0,i1,i2,i3,i4); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1, const iType2& i2, const iType3& i3, + const iType4& i4) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (5, this->rank(), m_track, m_map, i0, i1, i2, i3, i4)) + return m_map.reference(i0, i1, i2, i3, i4); + } - template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (5 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4) ) - return m_map.reference(i0,i1,i2,i3,i4,0,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1, const iType2& i2, const iType3& i3, + const iType4& i4) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (5, this->rank(), m_track, m_map, i0, i1, i2, i3, i4)) + return m_map.reference(i0, i1, i2, i3, i4, 0, 0); + } // Rank 6 - template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 , typename iType5 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_same::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (6 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5) ) - return m_map.reference(i0,i1,i2,i3,i4,i5); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_same::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1, const iType2& i2, const iType3& i3, + const iType4& i4, const iType5& i5) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (6, this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5)) + return m_map.reference(i0, i1, i2, i3, i4, i5); + } - template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 , typename iType5 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< !(std::is_same::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (6 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5) ) - return m_map.reference(i0,i1,i2,i3,i4,i5,0); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + !(std::is_same::value && + std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1, const iType2& i2, const iType3& i3, + const iType4& i4, const iType5& i5) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (6, this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5)) + return m_map.reference(i0, i1, i2, i3, i4, i5, 0); + } // Rank 7 - template< typename iType0 , typename iType1 , typename iType2 , typename iType3, typename iType4 , typename iType5 , typename iType6 > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< (std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value && std::is_integral::value), reference_type>::type - access(const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 , const iType4 & i4 , const iType5 & i5 , const iType6 & i6 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (7 , this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5, i6) ) - return m_map.reference(i0,i1,i2,i3,i4,i5,i6); - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + (std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value && std::is_integral::value && + std::is_integral::value), + reference_type>::type + access(const iType0& i0, const iType1& i1, const iType2& i2, const iType3& i3, + const iType4& i4, const iType5& i5, const iType6& i6) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (7, this->rank(), m_track, m_map, i0, i1, i2, i3, i4, i5, i6)) + return m_map.reference(i0, i1, i2, i3, i4, i5, i6); + } #undef KOKKOS_IMPL_VIEW_OPERATOR_VERIFY @@ -927,405 +1069,393 @@ public: ~DynRankView() {} KOKKOS_INLINE_FUNCTION - DynRankView() : m_track(), m_map(), m_rank() {} //Default ctor + DynRankView() : m_track(), m_map(), m_rank() {} // Default ctor KOKKOS_INLINE_FUNCTION - DynRankView( const DynRankView & rhs ) : m_track( rhs.m_track ), m_map( rhs.m_map ), m_rank(rhs.m_rank) {} + DynRankView(const DynRankView& rhs) + : m_track(rhs.m_track), m_map(rhs.m_map), m_rank(rhs.m_rank) {} KOKKOS_INLINE_FUNCTION - DynRankView( DynRankView && rhs ) : m_track( rhs.m_track ), m_map( rhs.m_map ), m_rank(rhs.m_rank) {} + DynRankView(DynRankView&& rhs) + : m_track(rhs.m_track), m_map(rhs.m_map), m_rank(rhs.m_rank) {} KOKKOS_INLINE_FUNCTION - DynRankView & operator = ( const DynRankView & rhs ) { m_track = rhs.m_track; m_map = rhs.m_map; m_rank = rhs.m_rank; return *this; } + DynRankView& operator=(const DynRankView& rhs) { + m_track = rhs.m_track; + m_map = rhs.m_map; + m_rank = rhs.m_rank; + return *this; + } KOKKOS_INLINE_FUNCTION - DynRankView & operator = ( DynRankView && rhs ) { m_track = rhs.m_track; m_map = rhs.m_map; m_rank = rhs.m_rank; return *this; } + DynRankView& operator=(DynRankView&& rhs) { + m_track = rhs.m_track; + m_map = rhs.m_map; + m_rank = rhs.m_rank; + return *this; + } //---------------------------------------- // Compatible view copy constructor and assignment // may assign unmanaged from managed. - template< class RT , class ... RP > - KOKKOS_INLINE_FUNCTION - DynRankView( const DynRankView & rhs ) - : m_track( rhs.m_track , traits::is_managed ) - , m_map() - , m_rank(rhs.m_rank) - { - typedef typename DynRankView ::traits SrcTraits ; - typedef Kokkos::Impl::ViewMapping< traits , SrcTraits , typename traits::specialize > Mapping ; - static_assert( Mapping::is_assignable , "Incompatible DynRankView copy construction" ); - Mapping::assign( m_map , rhs.m_map , rhs.m_track ); - } + template + KOKKOS_INLINE_FUNCTION DynRankView(const DynRankView& rhs) + : m_track(rhs.m_track, traits::is_managed), m_map(), m_rank(rhs.m_rank) { + typedef typename DynRankView::traits SrcTraits; + typedef Kokkos::Impl::ViewMapping + Mapping; + static_assert(Mapping::is_assignable, + "Incompatible DynRankView copy construction"); + Mapping::assign(m_map, rhs.m_map, rhs.m_track); + } - template< class RT , class ... RP > - KOKKOS_INLINE_FUNCTION - DynRankView & operator = (const DynRankView & rhs ) - { - typedef typename DynRankView ::traits SrcTraits ; - typedef Kokkos::Impl::ViewMapping< traits , SrcTraits , typename traits::specialize > Mapping ; - static_assert( Mapping::is_assignable , "Incompatible DynRankView copy construction" ); - Mapping::assign( m_map , rhs.m_map , rhs.m_track ); - m_track.assign( rhs.m_track , traits::is_managed ); - m_rank = rhs.rank(); - return *this; - } + template + KOKKOS_INLINE_FUNCTION DynRankView& operator=( + const DynRankView& rhs) { + typedef typename DynRankView::traits SrcTraits; + typedef Kokkos::Impl::ViewMapping + Mapping; + static_assert(Mapping::is_assignable, + "Incompatible DynRankView copy construction"); + Mapping::assign(m_map, rhs.m_map, rhs.m_track); + m_track.assign(rhs.m_track, traits::is_managed); + m_rank = rhs.rank(); + return *this; + } -// Copy/Assign View to DynRankView - template< class RT , class ... RP > - KOKKOS_INLINE_FUNCTION - DynRankView( const View & rhs ) - : m_track() - , m_map() - , m_rank( rhs.Rank ) - { - typedef typename View::traits SrcTraits ; - typedef Kokkos::Impl::ViewMapping< traits , SrcTraits , Kokkos::Impl::ViewToDynRankViewTag > Mapping ; - static_assert( Mapping::is_assignable , "Incompatible View to DynRankView copy construction" ); - Mapping::assign( *this , rhs ); - } + // Copy/Assign View to DynRankView + template + KOKKOS_INLINE_FUNCTION DynRankView(const View& rhs) + : m_track(), m_map(), m_rank(rhs.Rank) { + typedef typename View::traits SrcTraits; + typedef Kokkos::Impl::ViewMapping + Mapping; + static_assert(Mapping::is_assignable, + "Incompatible View to DynRankView copy construction"); + Mapping::assign(*this, rhs); + } - template< class RT , class ... RP > - KOKKOS_INLINE_FUNCTION - DynRankView & operator = ( const View & rhs ) - { - typedef typename View::traits SrcTraits ; - typedef Kokkos::Impl::ViewMapping< traits , SrcTraits , Kokkos::Impl::ViewToDynRankViewTag > Mapping ; - static_assert( Mapping::is_assignable , "Incompatible View to DynRankView copy assignment" ); - Mapping::assign( *this , rhs ); - return *this ; - } + template + KOKKOS_INLINE_FUNCTION DynRankView& operator=(const View& rhs) { + typedef typename View::traits SrcTraits; + typedef Kokkos::Impl::ViewMapping + Mapping; + static_assert(Mapping::is_assignable, + "Incompatible View to DynRankView copy assignment"); + Mapping::assign(*this, rhs); + return *this; + } //---------------------------------------- // Allocation tracking properties KOKKOS_INLINE_FUNCTION - int use_count() const - { return m_track.use_count(); } + int use_count() const { return m_track.use_count(); } - inline - const std::string label() const - { return m_track.template get_label< typename traits::memory_space >(); } + inline const std::string label() const { + return m_track.template get_label(); + } //---------------------------------------- // Allocation according to allocation properties and array layout - // unused arg_layout dimensions must be set to KOKKOS_INVALID_INDEX so that rank deduction can properly take place - template< class ... P > - explicit inline - DynRankView( const Kokkos::Impl::ViewCtorProp< P ... > & arg_prop - , typename std::enable_if< ! Kokkos::Impl::ViewCtorProp< P... >::has_pointer - , typename traits::array_layout - >::type const & arg_layout - ) - : m_track() - , m_map() - , m_rank( Impl::DynRankDimTraits::template computeRank< typename traits::array_layout, P...>(arg_prop, arg_layout) ) - { - // Append layout and spaces if not input - typedef Kokkos::Impl::ViewCtorProp< P ... > alloc_prop_input ; + // unused arg_layout dimensions must be set to KOKKOS_INVALID_INDEX so that + // rank deduction can properly take place + template + explicit inline DynRankView( + const Kokkos::Impl::ViewCtorProp& arg_prop, + typename std::enable_if::has_pointer, + typename traits::array_layout>::type const& + arg_layout) + : m_track(), + m_map(), + m_rank(Impl::DynRankDimTraits:: + template computeRank( + arg_prop, arg_layout)) { + // Append layout and spaces if not input + typedef Kokkos::Impl::ViewCtorProp alloc_prop_input; - // use 'std::integral_constant' for non-types - // to avoid duplicate class error. - typedef Kokkos::Impl::ViewCtorProp - < P ... - , typename std::conditional - < alloc_prop_input::has_label - , std::integral_constant - , typename std::string - >::type - , typename std::conditional - < alloc_prop_input::has_memory_space - , std::integral_constant - , typename traits::device_type::memory_space - >::type - , typename std::conditional - < alloc_prop_input::has_execution_space - , std::integral_constant - , typename traits::device_type::execution_space - >::type - > alloc_prop ; + // use 'std::integral_constant' for non-types + // to avoid duplicate class error. + typedef Kokkos::Impl::ViewCtorProp< + P..., + typename std::conditional, + typename std::string>::type, + typename std::conditional< + alloc_prop_input::has_memory_space, + std::integral_constant, + typename traits::device_type::memory_space>::type, + typename std::conditional< + alloc_prop_input::has_execution_space, + std::integral_constant, + typename traits::device_type::execution_space>::type> + alloc_prop; - static_assert( traits::is_managed - , "View allocation constructor requires managed memory" ); + static_assert(traits::is_managed, + "View allocation constructor requires managed memory"); - if ( alloc_prop::initialize && + if (alloc_prop::initialize && #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - ! alloc_prop::execution_space::is_initialized() + !alloc_prop::execution_space::is_initialized() #else - ! alloc_prop::execution_space::impl_is_initialized() + !alloc_prop::execution_space::impl_is_initialized() #endif - ) { - // If initializing view data then - // the execution space must be initialized. - Kokkos::Impl::throw_runtime_exception("Constructing DynRankView and initializing data with uninitialized execution space"); - } - - // Copy the input allocation properties with possibly defaulted properties - alloc_prop prop_copy( arg_prop ); - -//------------------------------------------------------------ -#if defined( KOKKOS_ENABLE_CUDA ) - // If allocating in CudaUVMSpace must fence before and after - // the allocation to protect against possible concurrent access - // on the CPU and the GPU. - // Fence using the trait's executon space (which will be Kokkos::Cuda) - // to avoid incomplete type errors from usng Kokkos::Cuda directly. - if ( std::is_same< Kokkos::CudaUVMSpace , typename traits::device_type::memory_space >::value ) { - typename traits::device_type::memory_space::execution_space().fence(); - } -#endif -//------------------------------------------------------------ - - Kokkos::Impl::SharedAllocationRecord<> * - record = m_map.allocate_shared( prop_copy, Impl::DynRankDimTraits::template createLayout(arg_prop, arg_layout) ); - -//------------------------------------------------------------ -#if defined( KOKKOS_ENABLE_CUDA ) - if ( std::is_same< Kokkos::CudaUVMSpace , typename traits::device_type::memory_space >::value ) { - typename traits::device_type::memory_space::execution_space().fence(); - } -#endif -//------------------------------------------------------------ - - // Setup and initialization complete, start tracking - m_track.assign_allocated_record_to_uninitialized( record ); + ) { + // If initializing view data then + // the execution space must be initialized. + Kokkos::Impl::throw_runtime_exception( + "Constructing DynRankView and initializing data with uninitialized " + "execution space"); } + // Copy the input allocation properties with possibly defaulted properties + alloc_prop prop_copy(arg_prop); + +//------------------------------------------------------------ +#if defined(KOKKOS_ENABLE_CUDA) + // If allocating in CudaUVMSpace must fence before and after + // the allocation to protect against possible concurrent access + // on the CPU and the GPU. + // Fence using the trait's executon space (which will be Kokkos::Cuda) + // to avoid incomplete type errors from usng Kokkos::Cuda directly. + if (std::is_same::value) { + typename traits::device_type::memory_space::execution_space().fence(); + } +#endif + //------------------------------------------------------------ + + Kokkos::Impl::SharedAllocationRecord<>* record = m_map.allocate_shared( + prop_copy, + Impl::DynRankDimTraits:: + template createLayout(arg_prop, arg_layout)); + +//------------------------------------------------------------ +#if defined(KOKKOS_ENABLE_CUDA) + if (std::is_same::value) { + typename traits::device_type::memory_space::execution_space().fence(); + } +#endif + //------------------------------------------------------------ + + // Setup and initialization complete, start tracking + m_track.assign_allocated_record_to_uninitialized(record); + } // Wrappers - template< class ... P > - explicit KOKKOS_INLINE_FUNCTION - DynRankView( const Kokkos::Impl::ViewCtorProp< P ... > & arg_prop - , typename std::enable_if< Kokkos::Impl::ViewCtorProp< P... >::has_pointer - , typename traits::array_layout - >::type const & arg_layout - ) - : m_track() // No memory tracking - , m_map( arg_prop , Impl::DynRankDimTraits::template createLayout(arg_prop, arg_layout) ) - , m_rank( Impl::DynRankDimTraits::template computeRank< typename traits::array_layout, P...>(arg_prop, arg_layout) ) - { - static_assert( - std::is_same< pointer_type - , typename Impl::ViewCtorProp< P... >::pointer_type - >::value , - "Constructing DynRankView to wrap user memory must supply matching pointer type" ); - } + template + explicit KOKKOS_INLINE_FUNCTION DynRankView( + const Kokkos::Impl::ViewCtorProp& arg_prop, + typename std::enable_if::has_pointer, + typename traits::array_layout>::type const& + arg_layout) + : m_track() // No memory tracking + , + m_map(arg_prop, + Impl::DynRankDimTraits:: + template createLayout(arg_prop, arg_layout)), + m_rank(Impl::DynRankDimTraits:: + template computeRank( + arg_prop, arg_layout)) { + static_assert( + std::is_same::pointer_type>::value, + "Constructing DynRankView to wrap user memory must supply matching " + "pointer type"); + } //---------------------------------------- - //Constructor(s) + // Constructor(s) // Simple dimension-only layout - template< class ... P > - explicit inline - DynRankView( const Kokkos::Impl::ViewCtorProp< P ... > & arg_prop - , typename std::enable_if< ! Kokkos::Impl::ViewCtorProp< P... >::has_pointer - , size_t - >::type const arg_N0 =KOKKOS_INVALID_INDEX - , const size_t arg_N1 =KOKKOS_INVALID_INDEX - , const size_t arg_N2 =KOKKOS_INVALID_INDEX - , const size_t arg_N3 =KOKKOS_INVALID_INDEX - , const size_t arg_N4 =KOKKOS_INVALID_INDEX - , const size_t arg_N5 =KOKKOS_INVALID_INDEX - , const size_t arg_N6 =KOKKOS_INVALID_INDEX - , const size_t arg_N7 =KOKKOS_INVALID_INDEX - ) - : DynRankView( arg_prop - , typename traits::array_layout - ( arg_N0 , arg_N1 , arg_N2 , arg_N3 , arg_N4 , arg_N5 , arg_N6 , arg_N7 ) - ) - {} + template + explicit inline DynRankView( + const Kokkos::Impl::ViewCtorProp& arg_prop, + typename std::enable_if::has_pointer, + size_t>::type const arg_N0 = KOKKOS_INVALID_INDEX, + const size_t arg_N1 = KOKKOS_INVALID_INDEX, + const size_t arg_N2 = KOKKOS_INVALID_INDEX, + const size_t arg_N3 = KOKKOS_INVALID_INDEX, + const size_t arg_N4 = KOKKOS_INVALID_INDEX, + const size_t arg_N5 = KOKKOS_INVALID_INDEX, + const size_t arg_N6 = KOKKOS_INVALID_INDEX, + const size_t arg_N7 = KOKKOS_INVALID_INDEX) + : DynRankView(arg_prop, typename traits::array_layout( + arg_N0, arg_N1, arg_N2, arg_N3, arg_N4, + arg_N5, arg_N6, arg_N7)) {} - template< class ... P > - explicit KOKKOS_INLINE_FUNCTION - DynRankView( const Kokkos::Impl::ViewCtorProp< P ... > & arg_prop - , typename std::enable_if< Kokkos::Impl::ViewCtorProp< P... >::has_pointer - , size_t - >::type const arg_N0 =KOKKOS_INVALID_INDEX - , const size_t arg_N1 =KOKKOS_INVALID_INDEX - , const size_t arg_N2 =KOKKOS_INVALID_INDEX - , const size_t arg_N3 =KOKKOS_INVALID_INDEX - , const size_t arg_N4 =KOKKOS_INVALID_INDEX - , const size_t arg_N5 =KOKKOS_INVALID_INDEX - , const size_t arg_N6 =KOKKOS_INVALID_INDEX - , const size_t arg_N7 =KOKKOS_INVALID_INDEX - ) - : DynRankView( arg_prop - , typename traits::array_layout - ( arg_N0 , arg_N1 , arg_N2 , arg_N3 , arg_N4 , arg_N5 , arg_N6 , arg_N7 ) - ) - {} + template + explicit KOKKOS_INLINE_FUNCTION DynRankView( + const Kokkos::Impl::ViewCtorProp& arg_prop, + typename std::enable_if::has_pointer, + size_t>::type const arg_N0 = KOKKOS_INVALID_INDEX, + const size_t arg_N1 = KOKKOS_INVALID_INDEX, + const size_t arg_N2 = KOKKOS_INVALID_INDEX, + const size_t arg_N3 = KOKKOS_INVALID_INDEX, + const size_t arg_N4 = KOKKOS_INVALID_INDEX, + const size_t arg_N5 = KOKKOS_INVALID_INDEX, + const size_t arg_N6 = KOKKOS_INVALID_INDEX, + const size_t arg_N7 = KOKKOS_INVALID_INDEX) + : DynRankView(arg_prop, typename traits::array_layout( + arg_N0, arg_N1, arg_N2, arg_N3, arg_N4, + arg_N5, arg_N6, arg_N7)) {} // Allocate with label and layout - template< typename Label > - explicit inline - DynRankView( const Label & arg_label - , typename std::enable_if< - Kokkos::Impl::is_view_label
    #(HtavpL=<3J{O7nLlG*vvIwgWY$Vb3-;F+jmDHT zwB%Q$2oLR?)Gl$;c~Su7t$pyFHp-21XgXeGTR1Vo-QqG&6AOZp5DA%gMo7*=xnrLZ zCrSCwKfh5wSl5`t7C#v7eW0K=uq1~foH@20(4vflw@F%~Faq)HU2o&0KG7O?!}7y##hwyt=yde`rxDHL=UexSPJTfc;#0tE(PF9q&gg~+Lt>ifkD6F#JR zj6>Q?|M$}p7&tiiM>jk^4eo2(BGxtK}_kQs!#`ID#~~)s{TOQ*qI)B znrXI{xv$y>^t@}c*{QH~CGS6)VG(4R@_^%(N#ss1IMS?1~JCJxp#x7I4% z0Mo$8#MPq@oF3!cCri9n2o_~cVJ(M06yqBd{*e;)hUl3TsUe49aXQ5GzgXhdP}&8k zWYGQVP~9qVW8tB$?ytOTSPCXetmuXBI_RVv4W8Hu&?uP@haqIB4(KL;>Rf{_<17%#-h~SQESs0OYk@HxP}SxU zcm06F6}=y!9!^o+BIn^1!RT}G;K?E~=sXzsBU_+HrnGH8;h0hpavV^pbA78>n@CpY zV7b(?Oh=jG$shZ2u{tqVjWYLCrHb{BaNT0;%fse6#iI`gpwd)bI4vW{7T7naRZ3e9 zQ!1lg*IGvl{oE^hE=wqC@=U9I0{REAxlNHcyS~B}%Rb{+o5}_mA^dfU7^g{0 zBzMS`QIr=fZX`W(ygI*SP{!ws-jQda?2s=pP`Ln1wQ>JVIk@YE;y+qRsn1&~-qJ78 z`~ruRornJ>it@U@hdUMkhJpfa2oubx@X$0} zAc>X=UpT_~mjAU^_)^ckc?;p`Cb%4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1w@7;EVGv!ris{KubYeB;IYp;Df`cYq1EN@RO}Qruvt$@53T3!)mru!+^f$lX}yeE z(&~6rG3iuOt@r<2B8L<_J7#BQ<-I!iD4%y1^=WS@Q^s%n0{r}KCy+6iLv;e=p^5Ws zJ=bcxGf{u84>IM>JSx5KicC0Dnv#IDH3PZKm%Cn?PUWK?w>z2Dp*Lq9J;_o&gL%k? zL_EpNmXnedald>;&cppc-2w15;7-v7Z%#QyV_Dn2Q``R8Q~PHfucJHOzMjqpg-4`Q za*6|5EMtT*DY(8`w#{B&+E@Ld%D=*-v4ISi4J7Xu{-^ZH)4wBLHa^b3+C7zh)z7uD z?j8m=7+o0sC;Cq#oq_#&k%ur|dC(_Y%HG4g?wX{!yb4`y)T0oWFQ_jF_ z_%MR5CQ#(dX9=uQjN>byJdIZVr$vvnK9sSb@y^H6PfOg+%$|U%jpRHA&ChkJeeAH) z!ws*Sfir*MH9CCqXr)&{cg;qqqVT>2RojCR`d3|s^(#efd-F6}2{%Nq7i5cfc`-ql zhN5UbHtKRj+`{A2?T)Pq`GfYMfY9@xLM}zoEyvMs2z46kua83zXF`j2ahI69o6Eiy zdN(vB?oxBA133Ksu@BiVnE%7`vj2V~+P}Zy-#_s`!@&Pq!~gy1-#6s{&zd;+_xyhV DmPd6^ diff --git a/doc/src/Eqs/pair_tersoff_zbl.tex b/doc/src/Eqs/pair_tersoff_zbl.tex deleted file mode 100644 index 902819aa1b..0000000000 --- a/doc/src/Eqs/pair_tersoff_zbl.tex +++ /dev/null @@ -1,33 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} - E & = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ - V_{ij} & = & (1 - f_F(r_{ij})) V^{ZBL}_{ij} + f_F(r_{ij}) V^{Tersoff}_{ij} \\ -f_F(r_{ij}) & = & \frac{1}{1 + e^{-A_F(r_{ij} - r_C)}}\\ - \\ - \\ - V^{ZBL}_{ij} & = & \frac{1}{4\pi\epsilon_0} \frac{Z_1 Z_2 \,e^2}{r_{ij}} \phi(r_{ij}/a) \\ - a & = & \frac{0.8854\,a_0}{Z_{1}^{0.23} + Z_{2}^{0.23}}\\ - \phi(x) & = & 0.1818e^{-3.2x} + 0.5099e^{-0.9423x} + 0.2802e^{-0.4029x} + 0.02817e^{-0.2016x}\\ - \\ - \\ - V^{Tersoff}_{ij} & = & f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) \right] \\ - f_C(r) & = & \left\{ \begin{array} {r@{\quad:\quad}l} - 1 & r < R - D \\ - \frac{1}{2} - \frac{1}{2} \sin \left( \frac{\pi}{2} \frac{r-R}{D} \right) & - R-D < r < R + D \\ - 0 & r > R + D - \end{array} \right. \\ - f_R(r) & = & A \exp (-\lambda_1 r) \\ - f_A(r) & = & -B \exp (-\lambda_2 r) \\ - b_{ij} & = & \left( 1 + \beta^n {\zeta_{ij}}^n \right)^{-\frac{1}{2n}} \\ - \zeta_{ij} & = & \sum_{k \neq i,j} f_C(r_{ik}) g(\theta_{ijk}) - \exp \left[ {\lambda_3}^m (r_{ij} - r_{ik})^m \right] \\ - g(\theta) & = & \gamma_{ijk} \left( 1 + \frac{c^2}{d^2} - - \frac{c^2}{\left[ d^2 + - (\cos \theta - \cos \theta_0)^2\right]} \right) -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_ufm.jpg b/doc/src/Eqs/pair_ufm.jpg deleted file mode 100644 index 40273da68063274cd6d6496d38f93ff97121df91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17830 zcmeFYV{m89+bta1_AgE*wr$(CZQD*Jn2DXq#I|kQw(U3fAJ2KJ&iD7z*;RX2<6771 zt9RGl-PNlj739R>VQ^r8fPmm7B}9~ffPhcF(?6jgzMp@Ac0z!FU`j28g%u=)g$Wg$ z?9D7~Oo4zTB2&^JRZv%OhOWj7F|`Oml!WYqTtFnCdC>&9mZ6{%6pY|P$k|LB!PU^v zk*o8f31KS1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utZ}t)!`+*L*UUPkv+onP4gbdYBf1Xw!gjZ%!~Qi`9&MVT zu?F4HlLIv&Y>?}O`>1L65_uE{pOI!g6>nt31BH)+kvx|K^rPLMJlQ+LreDIy%D`8! zfbV>TK`68vHR%k0DSi{bKIXe#!%k;K|3)pqT=$vj>~vsnKz4w^=eCFe@Q%vfWOT_| zkWY6HY|j=0Ab9sQf->4Dl~k-6bkU&Lo8~=ez$Wal6=~O{38HAH0b=mrBRV-0{pjIJ z1atAKxT=ukflO8uLNGHC1@#fL$2bxGwI_7U^^0;v@(RQf8SJT?@Lsm@)*mu180FPF z$;bm(BhzIAj<>2?2i`uDpF@&QRorAQhNO`}flD^C;2=PC9 zc8R>!JC6KWKzE=0XTW%FVKL?q!Y_Rk{W0tVAy1gVFxUv&D!)`5WF`NB@Eo8U6537ek`4kcPT>eHY)p~9Urf4D^1bKQe9f@#(ZufE|r(! z82U~So9^~3<;pYWO i}^N U_{ij}^{(2)} (r_{ij}) + - \sum_i^N \sum_{j \neq i}^N \sum_{k > j, k \neq i}^N - U_{ijk}^{(3)} (r_{ij}, r_{ik}, \theta_{ijk}) - \\ - U_{ij}^{(2)} (r) & = & \frac{H_{ij}}{r^{\eta_{ij}}} - + \frac{Z_i Z_j}{r}\exp(-r/\lambda_{1,ij}) - - \frac{D_{ij}}{r^4}\exp(-r/\lambda_{4,ij}) - - \frac{W_{ij}}{r^6}, r < r_{c,{ij}} - \\ - U_{ijk}^{(3)}(r_{ij},r_{ik},\theta_{ijk}) & = & B_{ijk} - \frac{\left[ \cos \theta_{ijk} - \cos \theta_{0ijk} \right]^2} - {1+C_{ijk}\left[ \cos \theta_{ijk} - \cos \theta_{0ijk} \right]^2} \times \\ -& & \exp \left( \frac{\gamma_{ij}}{r_{ij} - r_{0,ij}} \right) - \exp \left( \frac{\gamma_{ik}}{r_{ik} - r_{0,ik}} \right), r_{ij} < r_{0,ij}, r_{ik} < r_{0,ik} -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_yukawa.jpg b/doc/src/Eqs/pair_yukawa.jpg deleted file mode 100644 index 103edc604321d02e39545dd4e55acac3884edc8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2189 zcmbW2cTm%b632gmgd!q@8XzG^QIR4=BM>o0x+o0bg(i3=QZz)R9#S3ZF;RHm= zA;l+03mv2e6X1aeNCGiPRRrX~NDB(&>3cIb_vf4U*_rP@`<>mL{bN@+DVzmlFWEZS z0w53wu>T%_kOx=+5K%A~EDHH95C}v}{IG=hcVwibBo9Mn z9fheP5J)6aURhIHQ(YUbj#L+R15y%zFGvIgf&#*q02}}TBBDQf`~^f@6f6c3k@%iH zCkueUA|Mg4sF)~N>WAZp8w`Pp$sHA!H^wR`x=1K#;rXHr%4nX8XD9jssFnlP)cvBXm85 zzc`6xwA&nUna@bx^^P!c?#9;z<4;^%ElW^v!z%rW-applyC?)6`moSR3!PiRRL{Qh z!QQJ_y^qPeD(?={2V}NmgYCaqBxpRSqJGjzX-BAUr4l#n){}vU=)vH?d*Z%NZh>R5;0V1~s6w31Ag-G~R2VVG z4hnZ5y_&gBMk&7#0zk#t9?T)5sjSsc;?uXGXw!dHO!j-XShe+5nZG8mD4T@b@Gifw z8ym7SuipnpZZlRQ%lp7%tOy9%B2CLDfnXttWzDQeen#qj9dMge#E}LV1X_Kbo>mxbJe(iV8TCdSM;39 z=BY>qal-g0^(xeHarC#B&tQVHU zh7`XGwLdat+2%~xUnfRqaX#SABiDulq|%pH1R1&WWvz=*VVj#CNhQ})qgST;%3m<{ znwgm4Yo?oJMN{%0I&}|1=8DSn4`z!D_|6+Shxc^@cEG!LQ{wVl0+t;yEyo9A-1a{7 zVlH{^_k=g7-TIAKw>k2fL_h7UZwxDm-V)?8B#}6%RNCt z0ID-HA%MI)S)Yx+ueB>Z2=8pNqVeq<*k0L6Zn6nQj*5w;b(Yl9%xWQkXY)R{H!Ba! zTVKO5#ohiH^9)xpiewaBH{b`t3ihgjjHmfODW7A$84@fo1QR)YSu2B1w=AmDZ08A2 zTfxZ9me`tL~yBgbP8L# z{6cxVb1tWYIUF3C9Ga}Xqy0S0W+6V*(P`861;Q{c^>e2sE5yCdENVxy@!`=4?I&9J zo`P-wKBqS&6%T|*eQMflY{ewCyU`X`7VEFBal5V@_&IoI)hqX6E`(ci?7??N)C_>4 z@Np|Od~)XLmd12x$grUW(lt73&pCXvJy`lyCYof;SE0g{0AJ^yWhIM?TtV-Sq!zZy`f)>NwI6A$iCFiVZQ;N*Ly) z?6*;qbfltw?!THj;zhX|tBI3cEBeF1;QZ`!w(5|QPJW^9<+r5W_J+sU?WlZ*gp9Cs z|K{H<3Kwco(Ln{$7b0`WUAe7H5~uppIA5iFrWKn(@VQZyh+|>zOY6`&%`F^&&Aa2k zGb3X&Zr6PQEZD?5vnKN;E65|%Lxp|HmRHMZtlD$3)QF0bylVX)T-x)>h%L#Q9cX-M zp9#^@iWC#vVmTBc1lUL0?yWb`EZJ9Pn*kCbjRd#NQVxGvaj8KBsvN*3M>rWvBE0|3_rK_MA@|>2X#~jt diff --git a/doc/src/Eqs/pair_yukawa.tex b/doc/src/Eqs/pair_yukawa.tex deleted file mode 100644 index 382cf249a8..0000000000 --- a/doc/src/Eqs/pair_yukawa.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - E = A \frac{e^{- \kappa r}}{r} \qquad r < r_c -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_yukawa_colloid.jpg b/doc/src/Eqs/pair_yukawa_colloid.jpg deleted file mode 100644 index 1d836247574039b3451b84950e5e86bee6e6f13a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3067 zcmb`JS5VW762||b7&It^7HUFMq$)jhxgb@r9f~wXieLg5I)?xv2Lz=i3epTxMTioL zbdVZ4NE87Biu4{LLI5FG=gzqgckaubxxby+eb{eypLX_Rjx)ak+!iM0CIAQo0?d8| z!2Apt0qm@7Y;3ITzY;q;`!O&l2ly9U5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s_S==Za`e`j3y!yA#g)*@f?q~_SZnM#c5ihgsC z23d_8Qji(@UKgDLn(A=#@%^yB7&Wm8!xd0==T!sISNa#}A*wLccw(g)L3c>OEercV z3YvuQ@%Ejb4{J*IOZ&!1*Kf|iEXAPBkzcwT16|7Qc6}!i^U?=6B>N*<=eNL^{9Lek(7w@Gpz zAx@(MB5@}KB`iF>2onRnk=~P`+fDv9Yl{YxCS9!)@XK5&=U`RzPwjT=BH!=Yw$Cy^ zDPc_D!J|gg9gjgqELy|1OJ4?u8^o61fWXU@pRK|!EDWBRL-jus24TFt#6iWcixO&1 kQ#~AUV-a@4yzb{)83h|6>mkwknsX6jeZQCeKVeS%6RumU=>Px# diff --git a/doc/src/Eqs/pair_yukawa_colloid.tex b/doc/src/Eqs/pair_yukawa_colloid.tex deleted file mode 100644 index dbdbbcd140..0000000000 --- a/doc/src/Eqs/pair_yukawa_colloid.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - E = \frac{A}{\kappa} e^{- \kappa (r - (r_i + r_j))} \qquad r < r_c -$$ - -\end{document} diff --git a/doc/src/Eqs/pair_zbl.jpg b/doc/src/Eqs/pair_zbl.jpg deleted file mode 100644 index 88656af5eb4f6ef617e1bc400e6f4eb894da4695..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32209 zcmdqI2UwF$v@ZJ5yYw!gRHZ6aX%UeoLPQ0mMx=uwg3?2xND&bD0RaUeDqWhCfV4!q zh=_EhCkTqPgc>A-^ZEaGm%H~q&vVax?sM+GcVLp0nfWHOX4b5EXRVc^uSfF$&t+2! zQ-F?+4loD*fFmL&qlK|C?CLeBsl^o&umS)$w%zXDy+h9f0PukOLD$SKp1A4Yc!FgH zpabXuRzMUGc5}aX*XZiiE5QFW?T&-3!8D@sr?3BMv;Vq+*TeIkI{?sK1*>m++;fM6 zbUjF`y59}D57OU3`b+5jyC6;fr(7Ti93V)4_(OaDLr?#qZ~sG+{%&*Q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c/src/Eqs/pair_zbl.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} - E^{ZBL}_{ij} & = & \frac{1}{4\pi\epsilon_0} \frac{Z_i Z_j \,e^2}{r_{ij}} \phi(r_{ij}/a)+ S(r_{ij})\\ - a & = & \frac{0.46850}{Z_{i}^{0.23} + Z_{j}^{0.23}}\\ - \phi(x) & = & 0.18175e^{-3.19980x} + 0.50986e^{-0.94229x} + 0.28022e^{-0.40290x} + 0.02817e^{-0.20162x}\\ - \end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pressure.jpg b/doc/src/Eqs/pressure.jpg deleted file mode 100644 index 525d8a75ee0747ad5b552a6020eddad600656ab2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4333 zcmb_e2{@Ep`+vp^L)Jlru?`_iMA->tNw#Fko-vl!GK|R*QIb>`l(Jy{_;3uIsz6>zwCz-_P&d_kGT}pXZ!?!u|xnbU{m33jl#Y z6c!W~0I3GE})6_3c$EJyI}cFNl8iZsXL+_P<$oafW3FORjwJ43e&kUA?2t%aF%fA61$of}>;JGL@57e;!fl1C`U>KkVY^|R=d+r?M zf7Xq<2O7c7l%|-s=1ppurnZU-zZBbcdMq6E=0jAw)!e)KEWUToUbLeYO*{LtE$?3U zDEiD{CFK&8Khy!a#))X|#wC4ioby1fR#zk-JXPak&0c2)_1ER^iK<#MC}-Mwh@6DM zKrp6%?AU1>9i>%u;hcEc>XvQLK>BKdK)G{xRRxb|p)a9XJ;uGY>2+p#Lk&+PW{{=K{lPq%;MMeJomzUxMLsA)em zd-Ww5^*uaaQjgKCrO+Q~D5azbNzM9h<6AZ;iJY&m;A&`DFm4$-BiuQs0iYSG*JI!};sMJ)$sJQ2iNe>50++7K4|gqJYmcBPzE zB`@5Z20tdVjlaFswH>khn#p6(*RNiQ-a$M>s#4~hu}VXiB>(GuV0OfBzLagvjQ0!G zrp%8wBFI-p_gyU~sRf*?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nB1qHo$U zK(+SQFnL$Fqwg5E6u}%Ly=nyF)`O$cv{wp`0Ui%nQU%UU1hIyn{Z1H&eNX?kqibQJ zFeB?+_ntfrGY3Y+gt!o7kK4`F^TKdG+agj8x=r@io5~6><`rU~bfo5s7y1fRbJ5XF zVwDXfKA@68FFrAaPU$p>+L3S4EkA~nn+47p)_!*@J#FYQTB5Z31}{BvULXwNjGcZR zb-;VL`|}H7({S_dw{wGhD)15wRcjHcIzd-{4uGirgx$S;&6msPs9DLPz_@ii4y!*} zu*QQ9Hfi1;^?Z0#=^)&{$Lbh}bh6=`cER!SmD~SZuNHKdT1@mG zmTNZ@d!f)_kyCFL%t(F9a_GEF#TP_o{xR_CN##2M|Am8kQ%D2xTdVPm zT*EIHGHY?o!#0T?B z|M3b8lDrt$Xno!0;?n}m*iV>0lfTaD#G~>K?#LGYR~Gr$J5ky1ANr9@d@+0wgrqR( zQ<%X`+gZE~>*G@~p}qEz%Q=vzS?;E<#%i_gKXd~sJ1&KpjBWn#V=qMr8?sOFd#Mhn zqL$*<9Se>lIOsUqu+yVi*mOP}!%R1X%hI;To@51FT|WwNtM85;(o7bk}7a zehln6ysG)ea^zuU_$@@{2acNG(N(ppACaYy4h10Hj(_fzzY%KwtcsBH-mV;Mm?=>J zw$5-R%OOk9qvc-t9f1`gde78v8G;h_NmN|;@ci>3X=+!zAzhC97vqa8AR~KTHfiJW zpf0rG1F3tl{)c5f6F(wQ3(>4*)Ne|NR~K=SBGcOR(di F{{gZoA%y?{ diff --git a/doc/src/Eqs/pressure_tensor.tex b/doc/src/Eqs/pressure_tensor.tex deleted file mode 100644 index 5fdb723979..0000000000 --- a/doc/src/Eqs/pressure_tensor.tex +++ /dev/null @@ -1,10 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -$$ - P_{IJ} = \frac{\sum_{k}^{N} m_k v_{k_I} v_{k_J}}{V} + - \frac{\sum_{k}^{N'} r_{k_I} f_{k_J}}{V} -$$ - -\end{document} diff --git a/doc/src/Eqs/ptm_rmsd.jpg b/doc/src/Eqs/ptm_rmsd.jpg deleted file mode 100644 index 2d20da706ef61194305123d5673042d2318aec23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6833 zcmcI|cT`l(vhSV&hKw^XGo&Hs%#fqxoQ51lvSbMolnjF8oIwdHS)za5O1Hr<^1%vQz76H6}_@FC20KhR8O$Go^ zozyL9G!5Uqfd12gv#APx(IQAR2mmlIigufmL=}i*G6k^0$*uvnG~@wq2+blMh)F8X^aq>*+dx*%ZwmVfS-%f18vZ|bCcXd*IE9mlsI)t~Jo7i*A z8tdJW1Eb&m@HXjK97_CPySLRzEInds77*TSHoI*|kr)RX{c{7*uJmOUT`b3D%*|5; zH$?__g>!lUfSlv>li?^oF>a(*Py%uM>R$~(Js+aWcKkEb{!y2}?N(8M?$&S|Pyh_V z27w{B*88Ukz{bG>Zr_mzVJM6gPA^M_!DSZV|F;!EIN(1QI#%DDYb>mlJR=ePaAOMH z|98?zwtn`{g^Kmrj^1;)71^}vmG8v7bD%&fkL>$V^R>`=n^Hcu?rSUBDEzvYbD;}3OT|y*FF80E1V)sxNgVzv%k%Mrsjv{Y~nJp za0*pg4McjAWLq+yptj+{%RyKJGh2$U_<~WH(j3_!Hln1m5GXo8#x&!j#1E?8-jU#) zHKiAzamE;Y5i8WtOI+p3oveP*vnS?<6sxXA8~_UDg|h~g_r6?l4Bk3;$7d)Ktc z>-Rgk4UMDoUB8C5^W-&snaw&`qU!l}T-STj_m90C8SKc(>kwR+eSWuyQh}ztOqLa= z83?g_hn`W=8KhE|55+zKVb0f4u%K8#sBL;ATSm-3?RiJV?fJ6 z;f%t%o+)Yc0@h(g5GHv&o7B2`ge>M!*FLkLf>-+634VQB@9^%)se^wz7(@nqWm)T6 zMh8o1xtsmFA3gIZSpHkZ=4Ir7;lw#%V&%(2avEcmbzX_;q(KXxdvwX~wp(NvJpaFo zA*t?Wt{i5a#I~=UC8^Pd<(c9MzEua!;WR6(1bUY_n{H9T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W(3yZRJ4XF*Dpf89+e;r`IFB3a9#Xmsll%OjNOraEyUrip)!=R zE^k#RNF%M>u)YW?G53qLQ5kF;xR^2{CqsNWd#bVdLY&X-1G9wd+C~ zpT0g(lP?Ld1KYr_%r~8gid%?;0vaEA1r|YkjDEoZRPIRQHWutF5&)#Ut)g?15DK%5@ud>j@ zF{vtgoCS#k%dI|(r#_+3PEn4G3guRFRHXo!2oU7N6)WsMs}EInf9CH;sR|(#4pXf* z+i}P>qn(kEe&5rh#bE0JtIkwrWkozAl@n4uD!y8S3&o$Rhd6Mrr-vQR@E7Fj!XCya3;F0tHjHlL3DJ52DYvJ7HXDH^8J;PUQwDp=*?AuL2FiEBShHa0B>PHe}uc8=BQ! z2UB*RmyaX@Z1F8;>B&4tkP`d&PZGK~zs6QHj(H#VvKYuq!g}IZDwAl>Qy*<^c?d$H zJVSAfg_zOE-3J#KA`x7C7fx+q=c)*SWQC`rF_1ki$e>u~w?9rgnS!duvz%+Zp@Pq; zgp937%H!A=H}@;HiY!~fHL|xi_ke@}Bc3S%u__4tATXi4t4}#a{&hl32<+qc+ZAKd zTA;p7cdkuN)pG;bFkP0`AThX&!qO2}Ii{X{)mVest7-C5k`wJw5Kz-0X(E#a8&#+y z0Pr)BrLDXzdRCOhE&j+c#()=vITq{^E!7o`xEq>I!P?mP;h@U;NI=2OhqIK7<~+6^ ztQ59axOp~B5nl?dq%Z!^?ITgbHrU<<7*7W*0$g+R<-B z%oIu9GtgXfa`|SdYsDtWJ?(kUT9*&G&`%L2Lq=$s&zeO;=W?E-tP%1v+AwKl%6!wWo}lLg7hcEDo9V1?090CY zKj}b>Je` | :ref:`Pre-built OpenSuse Linux executables ` | :ref:`Gentoo Linux executable ` -| :ref:`Arch Linux build-script ` -| +| :ref:`Arch Linux build-script ` +| ---------- @@ -132,11 +132,21 @@ mirrors. The "module load" command is needed once per (shell) session or shell terminal instance, unless it is automatically loaded from the shell profile. +The LAMMPS binary is built with the :ref:`KIM package ` which +results in the above command also installing the `kim-api` binaries when LAMMPS +is installed. In order to use potentials from `openkim.org `_, you +can install the `openkim-models` package + +.. parsed-literal:: + + dnf install openkim-models + Please use "lmp -help" to see which compilation options, packages, and styles are included in the binary. Thanks to Christoph Junghans (LANL) for making LAMMPS available in Fedora. +.. _openkim: https://openkim.org ---------- @@ -146,7 +156,7 @@ Thanks to Christoph Junghans (LANL) for making LAMMPS available in Fedora. Pre-built EPEL Linux executable ------------------------------------------ -Pre-built LAMMPS packages for stable releases are available +Pre-built LAMMPS (and KIM) packages for stable releases are available in the `Extra Packages for Enterprise Linux (EPEL) repository `_ for use with Red Hat Enterprise Linux (RHEL) or CentOS version 7.x and compatible Linux distributions. Names of packages, executable, @@ -187,6 +197,15 @@ is *lmp*\ . Thus to run an input in parallel on 2 CPUs you would do: Please use "lmp -help" to see which compilation options, packages, and styles are included in the binary. +The LAMMPS binary is built with the :ref:`KIM package ` which +results in the above command also installing the `kim-api` binaries when LAMMPS +is installed. In order to use potentials from `openkim.org `_, you +can install the `openkim-models` package + +.. parsed-literal:: + + zypper install openkim-models + Thanks to Christoph Junghans (LANL) for making LAMMPS available in OpenSuse. diff --git a/doc/src/Eqs/fix_integration_spin_stdecomposition.jpg b/doc/src/JPG/fix_integration_spin_stdecomposition.jpg similarity index 100% rename from doc/src/Eqs/fix_integration_spin_stdecomposition.jpg rename to doc/src/JPG/fix_integration_spin_stdecomposition.jpg diff --git a/doc/src/compute_centro_atom.rst b/doc/src/compute_centro_atom.rst index f00cc179f8..6e706d9f97 100644 --- a/doc/src/compute_centro_atom.rst +++ b/doc/src/compute_centro_atom.rst @@ -52,20 +52,23 @@ in the specified compute group. This parameter is computed using the following formula from :ref:`(Kelchner) ` -.. image:: Eqs/centro_symmetry.jpg - :align: center +.. math:: -where the *N* nearest neighbors of each atom are identified and Ri and -Ri+N/2 are vectors from the central atom to a particular pair of -nearest neighbors. There are N\*(N-1)/2 possible neighbor pairs that -can contribute to this formula. The quantity in the sum is computed -for each, and the N/2 smallest are used. This will typically be for -pairs of atoms in symmetrically opposite positions with respect to the -central atom; hence the i+N/2 notation. + CS = \sum_{i = 1}^{N/2} | \vec{R}_i + \vec{R}_{i+N/2} |^2 -*N* is an input parameter, which should be set to correspond to the -number of nearest neighbors in the underlying lattice of atoms. If -the keyword *fcc* or *bcc* is used, *N* is set to 12 and 8 + +where the :math:`N` nearest neighbors of each atom are identified and +:math:`\vec{R}_i` and :math:`\vec{R}_{i+N/2}` are vectors from the +central atom to a particular pair of nearest neighbors. There are +:math:`N (N-1)/2` possible neighbor pairs that can contribute to this +formula. The quantity in the sum is computed for each, and the +:math:`N/2` smallest are used. This will typically be for pairs of +atoms in symmetrically opposite positions with respect to the central +atom; hence the :math:`i+N/2` notation. + +:math:`N` is an input parameter, which should be set to correspond to +the number of nearest neighbors in the underlying lattice of atoms. +If the keyword *fcc* or *bcc* is used, *N* is set to 12 and 8 respectively. More generally, *N* can be set to a positive, even integer. @@ -74,9 +77,9 @@ lattice, the centro-symmetry parameter will be 0. It will be near 0 for small thermal perturbations of a perfect lattice. If a point defect exists, the symmetry is broken, and the parameter will be a larger positive value. An atom at a surface will have a large -positive parameter. If the atom does not have *N* neighbors (within -the potential cutoff), then its centro-symmetry parameter is set to -0.0. +positive parameter. If the atom does not have :math:`N` neighbors +(within the potential cutoff), then its centro-symmetry parameter is +set to 0.0. If the keyword *axes* has the setting *yes*\ , then this compute also estimates three symmetry axes for each atom's local neighborhood. The @@ -95,7 +98,7 @@ of any atom. Only atoms within the cutoff of the pairwise neighbor list are considered as possible neighbors. Atoms not in the compute group are -included in the *N* neighbors used in this calculation. +included in the :math:`N` neighbors used in this calculation. The neighbor list needed to compute this quantity is constructed each time the calculation is performed (e.g. each time a snapshot of atoms diff --git a/doc/src/compute_cna_atom.rst b/doc/src/compute_cna_atom.rst index 16ce67d7af..f270891d82 100644 --- a/doc/src/compute_cna_atom.rst +++ b/doc/src/compute_cna_atom.rst @@ -51,8 +51,12 @@ E.g. 12 nearest neighbor for perfect FCC and HCP crystals, 14 nearest neighbors for perfect BCC crystals. These formulas can be used to obtain a good cutoff distance: -.. image:: Eqs/cna_cutoff1.jpg - :align: center +.. math:: + + r_{c}^{fcc} = & \frac{1}{2} \left(\frac{\sqrt{2}}{2} + 1\right) \mathrm{a} \simeq 0.8536 \:\mathrm{a} \\ + r_{c}^{bcc} = & \frac{1}{2}(\sqrt{2} + 1) \mathrm{a} \simeq 1.207 \:\mathrm{a} \\ + r_{c}^{hcp} = & \frac{1}{2}\left(1+\sqrt{\frac{4+2x^{2}}{3}}\right) \mathrm{a} + where a is the lattice constant for the crystal structure concerned and in the HCP case, x = (c/a) / 1.633, where 1.633 is the ideal c/a @@ -62,10 +66,13 @@ Also note that since the CNA calculation in LAMMPS uses the neighbors of an owned atom to find the nearest neighbors of a ghost atom, the following relation should also be satisfied: -.. image:: Eqs/cna_cutoff2.jpg - :align: center +.. math:: -where Rc is the cutoff distance of the potential, Rs is the skin + r_c + r_s > 2*{\rm cutoff} + + +where :math:`r_c` is the cutoff distance of the potential, :math:`r_s` +is the skin distance as specified by the :doc:`neighbor ` command, and cutoff is the argument used with the compute cna/atom command. LAMMPS will issue a warning if this is not the case. diff --git a/doc/src/compute_cnp_atom.rst b/doc/src/compute_cnp_atom.rst index 3290f67508..42e187ba69 100644 --- a/doc/src/compute_cnp_atom.rst +++ b/doc/src/compute_cnp_atom.rst @@ -40,13 +40,16 @@ only be performed on single component systems. This parameter is computed using the following formula from :ref:`(Tsuzuki) ` -.. image:: Eqs/cnp_eq.jpg - :align: center +.. math:: -where the index *j* goes over the *n*\ i nearest neighbors of atom -*i*\ , and the index *k* goes over the *n*\ ij common nearest neighbors -between atom *i* and atom *j*\ . Rik and Rjk are the vectors connecting atom -*k* to atoms *i* and *j*\ . The quantity in the double sum is computed + Q_{i} = \frac{1}{n_i}\sum_{j = 1}^{n_i} | \sum_{k = 1}^{n_{ij}} \vec{R}_{ik} + \vec{R}_{jk} |^2 + + +where the index *j* goes over the :math:`n_i` nearest neighbors of atom +*i*\ , and the index *k* goes over the :math:`n_{ij}` common nearest neighbors +between atom *i* and atom *j*\ . :math:`\vec{R}_{ik}` and +:math:`\vec{R}_{jk}` are the vectors connecting atom *k* to atoms *i* +and *j*\ . The quantity in the double sum is computed for each atom. The CNP calculation is sensitive to the specified cutoff value. @@ -56,8 +59,12 @@ E.g. 12 nearest neighbor for perfect FCC and HCP crystals, 14 nearest neighbors for perfect BCC crystals. These formulas can be used to obtain a good cutoff distance: -.. image:: Eqs/cnp_cutoff.jpg - :align: center +.. math:: + + r_{c}^{fcc} = & \frac{1}{2} \left(\frac{\sqrt{2}}{2} + 1\right) \mathrm{a} \simeq 0.8536 \:\mathrm{a} \\ + r_{c}^{bcc} = & \frac{1}{2}(\sqrt{2} + 1) \mathrm{a} \simeq 1.207 \:\mathrm{a} \\ + r_{c}^{hcp} = & \frac{1}{2}\left(1+\sqrt{\frac{4+2x^{2}}{3}}\right) \mathrm{a} + where a is the lattice constant for the crystal structure concerned and in the HCP case, x = (c/a) / 1.633, where 1.633 is the ideal c/a @@ -67,10 +74,13 @@ Also note that since the CNP calculation in LAMMPS uses the neighbors of an owned atom to find the nearest neighbors of a ghost atom, the following relation should also be satisfied: -.. image:: Eqs/cnp_cutoff2.jpg - :align: center +.. math:: -where Rc is the cutoff distance of the potential, Rs is the skin + r_c + r_s > 2*{\rm cutoff} + + +where :math:`r_c` is the cutoff distance of the potential, :math:`r_s` is +the skin distance as specified by the :doc:`neighbor ` command, and cutoff is the argument used with the compute cnp/atom command. LAMMPS will issue a warning if this is not the case. diff --git a/doc/src/compute_dpd.rst b/doc/src/compute_dpd.rst index bca72efdcd..cb3008a73c 100644 --- a/doc/src/compute_dpd.rst +++ b/doc/src/compute_dpd.rst @@ -26,19 +26,26 @@ Description """"""""""" Define a computation that accumulates the total internal conductive -energy (U\_cond), the total internal mechanical energy (U\_mech), the -total chemical energy (U\_chem) and the *harmonic* average of the internal -temperature (dpdTheta) for the entire system of particles. See the +energy (:math:`U^{cond}`), the total internal mechanical energy +(:math:`U^{mech}`), the total chemical energy (:math:`U^{chem}`) +and the *harmonic* average of the internal temperature (:math:`\theta_{avg}`) +for the entire system of particles. See the :doc:`compute dpd/atom ` command if you want per-particle internal energies and internal temperatures. The system internal properties are computed according to the following relations: -.. image:: Eqs/compute_dpd.jpg - :align: center +.. math:: -where N is the number of particles in the system + U^{cond} = & \displaystyle\sum_{i=1}^{N} u_{i}^{cond} \\ + U^{mech} = & \displaystyle\sum_{i=1}^{N} u_{i}^{mech} \\ + U^{chem} = & \displaystyle\sum_{i=1}^{N} u_{i}^{chem} \\ + U = & \displaystyle\sum_{i=1}^{N} (u_{i}^{cond} + u_{i}^{mech} + u_{i}^{chem}) \\ + \theta_{avg} = & (\frac{1}{N}\displaystyle\sum_{i=1}^{N} \frac{1}{\theta_{i}})^{-1} \\ + + +where :math:`N` is the number of particles in the system ---------- @@ -46,8 +53,9 @@ where N is the number of particles in the system **Output info:** -This compute calculates a global vector of length 5 (U\_cond, U\_mech, -U\_chem, dpdTheta, N\_particles), which can be accessed by indices 1-5. +This compute calculates a global vector of length 5 (:math:`U^{cond}`, +:math:`U^{mech}`, :math:`U^{chem}`, :math:`\theta_{avg}`, :math:`N`), +which can be accessed by indices 1-5. See the :doc:`Howto output ` doc page for an overview of LAMMPS output options. diff --git a/doc/src/compute_dpd_atom.rst b/doc/src/compute_dpd_atom.rst index 12956cc5d6..215e16a9c9 100644 --- a/doc/src/compute_dpd_atom.rst +++ b/doc/src/compute_dpd_atom.rst @@ -23,10 +23,10 @@ Description """"""""""" Define a computation that accesses the per-particle internal -conductive energy (u\_cond), internal mechanical energy (u\_mech), -internal chemical energy (u\_chem) and -internal temperatures (dpdTheta) for each particle in a group. See -the :doc:`compute dpd ` command if you want the total +conductive energy (:math:`u^{cond}`), internal mechanical +energy (:math:`u^{mech}`), internal chemical energy (:math:`u^{chem}`) +and internal temperatures (:math:`\theta`) for each particle in a group. +See the :doc:`compute dpd ` command if you want the total internal conductive energy, the total internal mechanical energy, the total chemical energy and average internal temperature of the entire system or group of dpd @@ -34,14 +34,16 @@ particles. **Output info:** -This compute calculates a per-particle array with 4 columns (u\_cond, -u\_mech, u\_chem, dpdTheta), which can be accessed by indices 1-4 by any +This compute calculates a per-particle array with 4 columns (:math:`u^{cond}`, +:math:`u^{mech}`, :math:`u^{chem}`, :math:`\theta`), which can be accessed +by indices 1-4 by any command that uses per-particle values from a compute as input. See the :doc:`Howto output ` doc page for an overview of LAMMPS output options. -The per-particle array values will be in energy (u\_cond, u\_mech, u\_chem) -and temperature (dpdTheta) :doc:`units `. +The per-particle array values will be in energy (:math:`u^{cond}`, +:math:`u^{mech}`, :math:`u^{chem}`) +and temperature (:math:`theta`) :doc:`units `. Restrictions """""""""""" diff --git a/doc/src/compute_entropy_atom.rst b/doc/src/compute_entropy_atom.rst index 96d55bbb0d..9b4bb5f62b 100644 --- a/doc/src/compute_entropy_atom.rst +++ b/doc/src/compute_entropy_atom.rst @@ -53,27 +53,33 @@ information about the solid structure is required. This parameter for atom i is computed using the following formula from :ref:`(Piaggi) ` and :ref:`(Nettleton) ` , -.. image:: Eqs/pair_entropy.jpg - :align: center +.. math:: + + s_S^i=-2\pi\rho k_B \int\limits_0^{r_m} \left [ g(r) \ln g(r) - g(r) + 1 \right ] r^2 dr + where r is a distance, g(r) is the radial distribution function of atom i and rho is the density of the system. The g(r) computed for each atom i can be noisy and therefore it is smoothed using: -.. image:: Eqs/pair_entropy2.jpg - :align: center +.. math:: -where the sum in j goes through the neighbors of atom i, and sigma is a -parameter to control the smoothing. + g_m^i(r) = \frac{1}{4 \pi \rho r^2} \sum\limits_{j} \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-(r-r_{ij})^2/(2\sigma^2)} -The input parameters are *sigma* the smoothing parameter, and the -*cutoff* for the calculation of g(r). + +where the sum in j goes through the neighbors of atom i, and :math:`\sigma` +is a parameter to control the smoothing. + +The input parameters are *sigma* the smoothing parameter :math:`\sigma`, +and the *cutoff* for the calculation of g(r). If the keyword *avg* has the setting *yes*\ , then this compute also averages the parameter over the neighbors of atom i according to: -.. image:: Eqs/pair_entropy3.jpg - :align: center +.. math:: + + \left< s_S^i \right> = \frac{\sum_j s_S^j + s_S^i}{N + 1} + where the sum j goes over the neighbors of atom i and N is the number of neighbors. This procedure provides a sharper distinction between diff --git a/doc/src/compute_fep.rst b/doc/src/compute_fep.rst index 1cbabef023..84b62a7f4a 100644 --- a/doc/src/compute_fep.rst +++ b/doc/src/compute_fep.rst @@ -70,14 +70,17 @@ initial interactions of the atoms that will undergo perturbation, and a term :math:`U_1` corresponding to the final interactions of these atoms: -.. image:: Eqs/compute_fep_u.jpg - :align: center +.. math:: + + U(\lambda) = U_{\mathrm{bg}} + U_1(\lambda) + U_0(\lambda) A coupling parameter :math:`\lambda` varying from 0 to 1 connects the reference and perturbed systems: -.. image:: Eqs/compute_fep_lambda.jpg - :align: center +.. math:: + + \lambda &= 0 \quad\Rightarrow\quad U = U_{\mathrm{bg}} + U_0 \\ + \lambda &= 1 \quad\Rightarrow\quad U = U_{\mathrm{bg}} + U_1 It is possible but not necessary that the coupling parameter (or a function thereof) appears as a multiplication factor of the potential @@ -89,16 +92,22 @@ This command can be combined with :doc:`fix adapt ` to perform multistage free-energy perturbation calculations along stepwise alchemical transformations during a simulation run: -.. image:: Eqs/compute_fep_fep.jpg - :align: center +.. math:: + + \Delta_0^1 A = \sum_{i=0}^{n-1} \Delta_{\lambda_i}^{\lambda_{i+1}} A = - kT + \sum_{i=0}^{n-1} \ln \left< \exp \left( - \frac{U(\lambda_{i+1}) - + U(\lambda_i)}{kT} \right) \right>_{\lambda_i} This compute is suitable for the finite-difference thermodynamic integration (FDTI) method :ref:`(Mezei) `, which is based on an evaluation of the numerical derivative of the free energy by a perturbation method using a very small :math:`\delta`: -.. image:: Eqs/compute_fep_fdti.jpg - :align: center +.. math:: + + \Delta_0^1 A = \int_{\lambda=0}^{\lambda=1} \left( \frac{\partial + A(\lambda)}{\partial\lambda} \right)_\lambda \mathrm{d}\lambda \approx + \sum_{i=0}^{n-1} w_i \frac{A(\lambda_{i} + \delta) - A(\lambda_i)}{\delta} where :math:`w_i` are weights of a numerical quadrature. The :doc:`fix adapt ` command can be used to define the stages of :math:`\lambda` at which the derivative is calculated and averaged. @@ -109,16 +118,23 @@ choosing a very small perturbation :math:`\delta` the thermodynamic integration method can be implemented using a numerical evaluation of the derivative of the potential energy with respect to :math:`\lambda`: -.. image:: Eqs/compute_fep_ti.jpg - :align: center +.. math:: + + \Delta_0^1 A = \int_{\lambda=0}^{\lambda=1} \left< \frac{\partial + U(\lambda)}{\partial\lambda} \right>_\lambda \mathrm{d}\lambda \approx + \sum_{i=0}^{n-1} w_i \left< \frac{U(\lambda_{i} + \delta) - + U(\lambda_i)}{\delta} \right>_{\lambda_i} Another technique to calculate free energy differences is the acceptance ratio method :ref:`(Bennet) `, which can be implemented by calculating the potential energy differences with :math:`\delta` = 1.0 on both the forward and reverse routes: -.. image:: Eqs/compute_fep_bar.jpg - :align: center +.. math:: + + \left< \frac{1}{1 + \exp\left[\left(U_1 - U_0 - \Delta_0^1A \right) /kT + \right]} \right>_0 = \left< \frac{1}{1 + \exp\left[\left(U_0 - U_1 + + \Delta_0^1A \right) /kT \right]} \right>_1 The value of the free energy difference is determined by numerical root finding to establish the equality. @@ -265,9 +281,11 @@ If the keyword *volume* = *yes*\ , then the Boltzmann term is multiplied by the volume so that correct ensemble averaging can be performed over trajectories during which the volume fluctuates or changes :ref:`(Allen and Tildesley) `: -.. image:: Eqs/compute_fep_vol.jpg - :align: center +.. math:: + \Delta_0^1 A = - kT \sum_{i=0}^{n-1} \ln \frac{\left< V \exp \left( - + \frac{U(\lambda_{i+1}) - U(\lambda_i)}{kT} \right) + \right>_{\lambda_i}}{\left< V \right>_{\lambda_i}} ---------- @@ -314,31 +332,21 @@ The option defaults are *tail* = *no*\ , *volume* = *no*\ . .. _Pearlman: - - **(Pearlman)** Pearlman, J Chem Phys, 98, 1487 (1994) .. _Mezei: - - **(Mezei)** Mezei, J Chem Phys, 86, 7084 (1987) .. _Bennet: - - **(Bennet)** Bennet, J Comput Phys, 22, 245 (1976) .. _BoreschKarplus: - - **(BoreschKarplus)** Boresch and Karplus, J Phys Chem A, 103, 103 (1999) .. _AllenTildesley: - - **(AllenTildesley)** Allen and Tildesley, Computer Simulation of Liquids, Oxford University Press (1987) diff --git a/doc/src/compute_gyration.rst b/doc/src/compute_gyration.rst index 6eb629c85b..fa3b6acbc5 100644 --- a/doc/src/compute_gyration.rst +++ b/doc/src/compute_gyration.rst @@ -32,24 +32,27 @@ periodic boundaries. Rg is a measure of the size of the group of atoms, and is computed as the square root of the Rg\^2 value in this formula -.. image:: Eqs/compute_gyration.jpg - :align: center +.. math:: -where M is the total mass of the group, Rcm is the center-of-mass -position of the group, and the sum is over all atoms in the group. + {R_g}^2 = \frac{1}{M} \sum_i m_i (r_i - r_{cm})^2 -A Rg\^2 tensor, stored as a 6-element vector, is also calculated by -this compute. The formula for the components of the tensor is the -same as the above formula, except that (Ri - Rcm)\^2 is replaced by -(Rix - Rcmx) \* (Riy - Rcmy) for the xy component, etc. The 6 -components of the vector are ordered xx, yy, zz, xy, xz, yz. Note -that unlike the scalar Rg, each of the 6 values of the tensor is -effectively a "squared" value, since the cross-terms may be negative + +where :math:`M` is the total mass of the group, :math:`r_{cm}` is the +center-of-mass position of the group, and the sum is over all atoms in +the group. + +A :math:`{R_g}^2` tensor, stored as a 6-element vector, is also calculated +by this compute. The formula for the components of the tensor is the +same as the above formula, except that :math:`(r_i - r_{cm})^2` is replaced +by :math:`(r_{i,x} - r_{cm,x}) \cdot (r_{i,y} - r_{cm,y})` for the xy component, +and so on. The 6 components of the vector are ordered xx, yy, zz, xy, xz, yz. +Note that unlike the scalar :math:`R_g`, each of the 6 values of the tensor +is effectively a "squared" value, since the cross-terms may be negative and taking a sqrt() would be invalid. .. note:: - The coordinates of an atom contribute to Rg in "unwrapped" form, + The coordinates of an atom contribute to :math:`R_g` in "unwrapped" form, by using the image flags associated with each atom. See the :doc:`dump custom ` command for a discussion of "unwrapped" coordinates. See the Atoms section of the :doc:`read_data ` command for a discussion of image flags and how they are set for each atom. You can @@ -58,8 +61,8 @@ and taking a sqrt() would be invalid. **Output info:** -This compute calculates a global scalar (Rg) and a global vector of -length 6 (Rg\^2 tensor), which can be accessed by indices 1-6. These +This compute calculates a global scalar (:math:`R_g`) and a global vector of +length 6 (:math:`{R_g}^2` tensor), which can be accessed by indices 1-6. These values can be used by any command that uses a global scalar value or vector values from a compute as input. See the :doc:`Howto output ` doc page for an overview of LAMMPS output options. diff --git a/doc/src/compute_gyration_chunk.rst b/doc/src/compute_gyration_chunk.rst index 4cdb6fa4d6..987cb7fa4c 100644 --- a/doc/src/compute_gyration_chunk.rst +++ b/doc/src/compute_gyration_chunk.rst @@ -52,11 +52,13 @@ boundaries. Rg is a measure of the size of a chunk, and is computed by this formula -.. image:: Eqs/compute_gyration.jpg - :align: center +.. math:: -where M is the total mass of the chunk, Rcm is the center-of-mass -position of the chunk, and the sum is over all atoms in the + {R_g}^2 = \frac{1}{M} \sum_i m_i (r_i - r_{cm})^2 + + +where :math:`M` is the total mass of the chunk, :math:`r_{cm}` is +the center-of-mass position of the chunk, and the sum is over all atoms in the chunk. Note that only atoms in the specified group contribute to the @@ -70,14 +72,16 @@ non-zero chunk IDs. If the *tensor* keyword is specified, then the scalar Rg value is not calculated, but an Rg tensor is instead calculated for each chunk. The formula for the components of the tensor is the same as the above -formula, except that (Ri - Rcm)\^2 is replaced by (Rix - Rcmx) \* (Riy - -Rcmy) for the xy component, etc. The 6 components of the tensor are +formula, except that :math:`(r_i - r_{cm})^2` is replaced by +:math:`(r_{i,x} - r_{cm,x}) \cdot (r_{i,y} - r_{cm,y})` for the xy +component, and so on. The 6 components of the tensor are ordered xx, yy, zz, xy, xz, yz. .. note:: - The coordinates of an atom contribute to Rg in "unwrapped" form, - by using the image flags associated with each atom. See the :doc:`dump custom ` command for a discussion of "unwrapped" coordinates. + The coordinates of an atom contribute to :math:`R_g` in "unwrapped" form, + by using the image flags associated with each atom. See the :doc:`dump custom ` + command for a discussion of "unwrapped" coordinates. See the Atoms section of the :doc:`read_data ` command for a discussion of image flags and how they are set for each atom. You can reset the image flags (e.g. to 0) before invoking this compute by diff --git a/doc/src/compute_gyration_shape.rst b/doc/src/compute_gyration_shape.rst index 590aca59a2..96c0346926 100644 --- a/doc/src/compute_gyration_shape.rst +++ b/doc/src/compute_gyration_shape.rst @@ -33,10 +33,14 @@ due to atoms passing through periodic boundaries. The three computed shape parameters are the asphericity, b, the acylindricity, c, and the relative shape anisotropy, k: -.. image:: Eqs/compute_shape_parameters.jpg - :align: center +.. math:: -where lx <= ly <= lz are the three eigenvalues of the gyration tensor. A general description + c = & l_z - 0.5(l_y+l_x) \\ + b = & l_y - l_x \\ + k = & \frac{3}{2} \frac{l_x^2+l_y^2+l_z^2}{(l_x+l_y+l_z)^2} - \frac{1}{2} + + +where :math:`l_x` <= :math:`l_y` <= :math:`l_z` are the three eigenvalues of the gyration tensor. A general description of these parameters is provided in :ref:`(Mattice) ` while an application to polymer systems can be found in :ref:`(Theodorou) `. The asphericity is always non-negative and zero only when the three principal diff --git a/doc/src/compute_gyration_shape_chunk.rst b/doc/src/compute_gyration_shape_chunk.rst index 309b9d7b6d..72fec2ddc7 100644 --- a/doc/src/compute_gyration_shape_chunk.rst +++ b/doc/src/compute_gyration_shape_chunk.rst @@ -33,10 +33,14 @@ all effects due to atoms passing through periodic boundaries. The three computed shape parameters are the asphericity, b, the acylindricity, c, and the relative shape anisotropy, k: -.. image:: Eqs/compute_shape_parameters.jpg - :align: center +.. math:: -where lx <= ly <= lz are the three eigenvalues of the gyration tensor. A general description + c = & l_z - 0.5(l_y+l_x) \\ + b = & l_y - l_x \\ + k = & \frac{3}{2} \frac{l_x^2+l_y^2+l_z^2}{(l_x+l_y+l_z)^2} - \frac{1}{2} + + +where :math:`l_x` <= :math:`l_y` <= :math`l_z` are the three eigenvalues of the gyration tensor. A general description of these parameters is provided in :ref:`(Mattice) ` while an application to polymer systems can be found in :ref:`(Theodorou) `. The asphericity is always non-negative and zero only when the three principal moments are equal. This zero condition is met when the distribution diff --git a/doc/src/compute_hexorder_atom.rst b/doc/src/compute_hexorder_atom.rst index 66cbcf2409..45560a2aff 100644 --- a/doc/src/compute_hexorder_atom.rst +++ b/doc/src/compute_hexorder_atom.rst @@ -36,19 +36,22 @@ Examples Description """"""""""" -Define a computation that calculates *qn* the bond-orientational +Define a computation that calculates :math:`q_n` the bond-orientational order parameter for each atom in a group. The hexatic (\ *n* = 6) order parameter was introduced by :ref:`Nelson and Halperin ` as a way to detect -hexagonal symmetry in two-dimensional systems. For each atom, *qn* +hexagonal symmetry in two-dimensional systems. For each atom, :math:`q_n` is a complex number (stored as two real numbers) defined as follows: -.. image:: Eqs/hexorder.jpg - :align: center +.. math:: + + q_n = \frac{1}{nnn}\sum_{j = 1}^{nnn} e^{n i \theta({\bf r}_{ij})} + where the sum is over the *nnn* nearest neighbors -of the central atom. The angle theta -is formed by the bond vector rij and the *x* axis. theta is calculated -only using the *x* and *y* components, whereas the distance from the +of the central atom. The angle :math:`\theta` +is formed by the bond vector :math:`r_{ij}` and the *x* axis. +:math:`\theta` is calculated only using the *x* and *y* components, +whereas the distance from the central atom is calculated using all three *x*\ , *y*\ , and *z* components of the bond vector. Neighbor atoms not in the group @@ -60,22 +63,22 @@ the maximum allowable value, is the cutoff specified by the pair style. The optional keyword *nnn* defines the number of nearest -neighbors used to calculate *qn*\ . The default value is 6. +neighbors used to calculate :math:`q_n`. The default value is 6. If the value is NULL, then all neighbors up to the distance cutoff are used. The optional keyword *degree* sets the degree *n* of the order parameter. The default value is 6. For a perfect hexagonal lattice with *nnn* = 6, -*q*\ 6 = exp(6 i phi) for all atoms, where the constant 0 < phi < pi/3 +:math:`q_6 = e^{6 i \phi}` for all atoms, where the constant :math:`0 < \phi < \frac{\pi}{3}` depends only on the orientation of the lattice relative to the *x* axis. In an isotropic liquid, local neighborhoods may still exhibit weak hexagonal symmetry, but because the orientational correlation -decays quickly with distance, the value of phi will be different for -different atoms, and so when *q*\ 6 is averaged over all the atoms -in the system, \|<\ *q*\ 6>\| << 1. +decays quickly with distance, the value of :math:`\phi` will be different for +different atoms, and so when :math:`q_6` is averaged over all the atoms +in the system, :math:`| \left< q_6 \right> | << 1`. -The value of *qn* is set to zero for atoms not in the +The value of :math:`q_n` is set to zero for atoms not in the specified compute group, as well as for atoms that have less than *nnn* neighbors within the distance cutoff. @@ -102,8 +105,8 @@ too frequently. **Output info:** This compute calculates a per-atom array with 2 columns, giving the -real and imaginary parts *qn*\ , a complex number restricted to the -unit disk of the complex plane i.e. Re(\ *qn*\ )\^2 + Im(\ *qn*\ )\^2 <= 1 . +real and imaginary parts :math:`q_n`, a complex number restricted to the +unit disk of the complex plane i.e. :math:`Re(q_n)^2 + Im(q_n)^2 <= 1`. These values can be accessed by any command that uses per-atom values from a compute as input. See the :doc:`Howto output ` doc diff --git a/doc/src/compute_msd_nongauss.rst b/doc/src/compute_msd_nongauss.rst index 180b922097..8168d25ca6 100644 --- a/doc/src/compute_msd_nongauss.rst +++ b/doc/src/compute_msd_nongauss.rst @@ -46,8 +46,10 @@ dz\*dz)\*(dx\*dx + dy\*dy + dz\*dz), summed and averaged over atoms in the group. The 3rd component is the nonGaussian diffusion parameter NGP = 3\*drfourth/(5\*drsquared\*drsquared), i.e. -.. image:: Eqs/compute_msd_nongauss.jpg - :align: center +.. math:: + + NGP(t) = 3<(r(t)-r(0))^4>/(5<(r(t)-r(0))^2>^2) - 1 + The NGP is a commonly used quantity in studies of dynamical heterogeneity. Its minimum theoretical value (-0.4) occurs when all diff --git a/doc/src/compute_orientorder_atom.rst b/doc/src/compute_orientorder_atom.rst index 401f6b46a2..b864db82a7 100644 --- a/doc/src/compute_orientorder_atom.rst +++ b/doc/src/compute_orientorder_atom.rst @@ -42,23 +42,25 @@ Description """"""""""" Define a computation that calculates a set of bond-orientational -order parameters *Ql* for each atom in a group. These order parameters +order parameters :math:`Q_l` for each atom in a group. These order parameters were introduced by :ref:`Steinhardt et al. ` as a way to characterize the local orientational order in atomic structures. -For each atom, *Ql* is a real number defined as follows: +For each atom, :math:`Q_l` is a real number defined as follows: -.. image:: Eqs/orientorder.jpg - :align: center +.. math:: + + \bar{Y}_{lm} = & \frac{1}{nnn}\sum_{j = 1}^{nnn} Y_{lm}( \theta( {\bf r}_{ij} ), \phi( {\bf r}_{ij} ) ) \\ + Q_l = & \sqrt{\frac{4 \pi}{2 l + 1} \sum_{m = -l}^{m = l} \bar{Y}_{lm} \bar{Y}^*_{lm}} The first equation defines the spherical harmonic order parameters. These are complex number components of the 3D analog of the 2D order -parameter *qn*\ , which is implemented as LAMMPS compute +parameter :math:`q_n`, which is implemented as LAMMPS compute :doc:`hexorder/atom `. The summation is over the *nnn* nearest neighbors of the central atom. The angles theta and phi are the standard spherical polar angles -defining the direction of the bond vector *rij*\ . -The second equation defines *Ql*\ , which is a +defining the direction of the bond vector :math:`r_{ij}`. +The second equation defines :math:`Q_l`, which is a rotationally invariant non-negative amplitude obtained by summing over all the components of degree *l*\ . @@ -68,42 +70,45 @@ the maximum allowable value, is the cutoff specified by the pair style. The optional keyword *nnn* defines the number of nearest -neighbors used to calculate *Ql*\ . The default value is 12. +neighbors used to calculate :math:`Q_l`. The default value is 12. If the value is NULL, then all neighbors up to the specified distance cutoff are used. The optional keyword *degrees* defines the list of order parameters to be computed. The first argument *nlvalues* is the number of order parameters. This is followed by that number of non-negative integers giving the -degree of each order parameter. Because *Q*\ 2 and all odd-degree order +degree of each order parameter. Because :math:`Q_2` and all odd-degree order parameters are zero for atoms in cubic crystals (see -:ref:`Steinhardt `), the default order parameters are *Q*\ 4, -*Q*\ 6, *Q*\ 8, *Q*\ 10, and *Q*\ 12. For the FCC crystal with *nnn* =12, *Q*\ 4 -= sqrt(7/3)/8 = 0.19094.... The numerical values of all order -parameters up to *Q*\ 12 for a range of commonly encountered -high-symmetry structures are given in Table I of :ref:`Mickel et al. `, and these can be reproduced with this compute +:ref:`Steinhardt `), the default order parameters are :math:`Q_4`, +:math:`Q_6`, :math:`Q_8`, :math:`Q_{10}`, and :math:`Q_{12}`. For the FCC +crystal with *nnn* =12, :math:`Q_4 = \sqrt{\frac{7}{192}} = 0.19094...`. +The numerical values of all order +parameters up to :math:`Q_12` for a range of commonly encountered +high-symmetry structures are given in Table I of :ref:`Mickel et al. `, +and these can be reproduced with this compute. -The optional keyword *wl* will output the third-order invariants *Wl* +The optional keyword *wl* will output the third-order invariants :math:`W_l` (see Eq. 1.4 in :ref:`Steinhardt `) for the same degrees as -for the *Ql* parameters. For the FCC crystal with *nnn* =12, -*W*\ 4 = -sqrt(14/143).(49/4096)/Pi\^1.5 = -0.0006722136... +for the :math:`Q_l` parameters. For the FCC crystal with *nnn* =12, +:math:`W_4` = -sqrt(14/143).(49/4096)/Pi\^1.5 = -0.0006722136... The optional keyword *wl/hat* will output the normalized third-order -invariants *Wlhat* (see Eq. 2.2 in :ref:`Steinhardt `) -for the same degrees as for the *Ql* parameters. For the FCC crystal -with *nnn* =12, *W*\ 4hat = -7/3\*sqrt(2/429) = -0.159317...The numerical -values of *Wlhat* for a range of commonly encountered high-symmetry +invariants :math:`\hat{W}_l` (see Eq. 2.2 in :ref:`Steinhardt `) +for the same degrees as for the :math:`Q_l` parameters. For the FCC crystal +with *nnn* =12, :math:`\hat{W}_4 = -\frac{7}{3} \sqrt{\frac{2}{429}} = -0.159317...` +The numerical +values of :math:`\hat{W}_l` for a range of commonly encountered high-symmetry structures are given in Table I of :ref:`Steinhardt `, and these can be reproduced with this keyword. The optional keyword *components* will output the components of the -normalized complex vector *Ybar\_lm* of degree *ldegree*\ , which must be +normalized complex vector :math:`\bar{Y}_{lm}` of degree *ldegree*\ , which must be explicitly included in the keyword *degrees*\ . This option can be used in conjunction with :doc:`compute coord\_atom ` to calculate the ten Wolde's criterion to identify crystal-like particles, as discussed in :ref:`ten Wolde `. -The value of *Ql* is set to zero for atoms not in the +The value of :math:`Q_l` is set to zero for atoms not in the specified compute group, as well as for atoms that have less than *nnn* neighbors within the distance cutoff, unless *nnn* is NULL. @@ -130,19 +135,19 @@ too frequently. **Output info:** This compute calculates a per-atom array with *nlvalues* columns, -giving the *Ql* values for each atom, which are real numbers on the -range 0 <= *Ql* <= 1. +giving the :math:`Q_l` values for each atom, which are real numbers on the +range :math:`0 <= Q_l <= 1`. -If the keyword *wl* is set to yes, then the *Wl* values for each +If the keyword *wl* is set to yes, then the :math:`W_l` values for each atom will be added to the output array, which are real numbers. -If the keyword *wl/hat* is set to yes, then the *Wl\_hat* +If the keyword *wl/hat* is set to yes, then the :math:`\hat{W}_l` values for each atom will be added to the output array, which are real numbers. If the keyword *components* is set, then the real and imaginary parts -of each component of (normalized) *Ybar\_lm* will be added to the -output array in the following order: Re(*Ybar\_-m*) Im(*Ybar\_-m*) -Re(*Ybar\_-m+1*) Im(*Ybar\_-m+1*) ... Re(*Ybar\_m*) Im(*Ybar\_m*). This +of each component of (normalized) :math:`\bar{Y}_{lm}` will be added to the +output array in the following order: :math:`Re(\bar{Y}_{-m}) Im(\bar{Y}_{-m}) +Re(\bar{Y}_{-m+1}) Im(\bar{Y}_{-m+1}) ... Re(\bar{Y}_m) Im(\bar{Y}_m)`. This way, the per-atom array will have a total of *nlvalues*\ +2\*(2\ *l*\ +1) columns. @@ -163,7 +168,7 @@ Default """"""" The option defaults are *cutoff* = pair style cutoff, *nnn* = 12, -*degrees* = 5 4 6 8 10 12 i.e. *Q*\ 4, *Q*\ 6, *Q*\ 8, *Q*\ 10, and *Q*\ 12, +*degrees* = 5 4 6 8 10 12 i.e. :math:`Q_4`, :math:`Q_6`, :math:`Q_8`, :math:`Q_{10}`, and :math:`Q_{12}`, *wl* = no, *wl/hat* = no, and *components* off @@ -172,21 +177,16 @@ The option defaults are *cutoff* = pair style cutoff, *nnn* = 12, .. _Steinhardt: - - **(Steinhardt)** P. Steinhardt, D. Nelson, and M. Ronchetti, Phys. Rev. B 28, 784 (1983). .. _Mickel: - - **(Mickel)** W. Mickel, S. C. Kapfer, G. E. Schroeder-Turkand, K. Mecke, J. Chem. Phys. 138, 044501 (2013). .. _tenWolde2: - **(tenWolde)** P. R. ten Wolde, M. J. Ruiz-Montero, D. Frenkel, J. Chem. Phys. 104, 9932 (1996). diff --git a/doc/src/compute_pressure.rst b/doc/src/compute_pressure.rst index c6530ed11e..ed3b90c8e1 100644 --- a/doc/src/compute_pressure.rst +++ b/doc/src/compute_pressure.rst @@ -37,8 +37,10 @@ of atoms via the :doc:`compute reduce ` command. The pressure is computed by the formula -.. image:: Eqs/pressure.jpg - :align: center +.. math:: + + P = \frac{N k_B T}{V} + \frac{\sum_{i}^{N'} r_i \bullet f_i}{dV} + where N is the number of atoms in the system (see discussion of DOF below), Kb is the Boltzmann constant, T is the temperature, d is the @@ -62,8 +64,11 @@ ordered xx, yy, zz, xy, xz, yz. The equation for the I,J components the first term uses components of the kinetic energy tensor and the second term uses components of the virial tensor: -.. image:: Eqs/pressure_tensor.jpg - :align: center +.. math:: + + P_{IJ} = \frac{\sum_{k}^{N} m_k v_{k_I} v_{k_J}}{V} + + \frac{\sum_{k}^{N'} r_{k_I} f_{k_J}}{V} + If no extra keywords are listed, the entire equations above are calculated. This includes a kinetic energy (temperature) term and the diff --git a/doc/src/compute_ptm_atom.rst b/doc/src/compute_ptm_atom.rst index e7667adae9..1b5066e473 100644 --- a/doc/src/compute_ptm_atom.rst +++ b/doc/src/compute_ptm_atom.rst @@ -62,8 +62,11 @@ to identify potential structure matches. Next, the deviation is computed betwee local structure (in the simulation) and a template of the ideal lattice structure. The deviation is calculated as: -.. image:: Eqs/ptm_rmsd.jpg - :align: center +.. math:: + + \text{RMSD}(\mathbf{u}, \mathbf{v}) = \min_{s, \mathbf{Q}} \sqrt{\frac{1}{N} \sum\limits_{i=1}^{N} + {\left|\left| s[\vec{u_i} - \overline{\mathbf{u}}] - \mathbf{Q} \vec{v_i} \right|\right|}^2} + Here, u and v contain the coordinates of the local and ideal structures respectively, s is a scale factor, and Q is a rotation. The best match is identified by the diff --git a/doc/src/compute_saed.rst b/doc/src/compute_saed.rst index 9b4067043f..2a9c05f218 100644 --- a/doc/src/compute_saed.rst +++ b/doc/src/compute_saed.rst @@ -59,14 +59,14 @@ radiation of wavelength lambda. The electron diffraction intensity I at each reciprocal lattice point is computed from the structure factor F using the equations: -.. image:: Eqs/compute_saed1.jpg - :align: center +.. math:: -.. image:: Eqs/compute_saed2.jpg - :align: center + I = & \frac{F^{*}F}{N} \\ + F(\mathbf{k}) = & \sum_{j=1}^{N}f_j(\theta)exp(2\pi i \mathbf{k} \cdot \mathbf{r}_j) -Here, K is the location of the reciprocal lattice node, rj is the -position of each atom, fj are atomic scattering factors. + +Here, K is the location of the reciprocal lattice node, :math:`r_j` is the +position of each atom, :math:`f_j` are atomic scattering factors. Diffraction intensities are calculated on a three-dimensional mesh of reciprocal lattice nodes. The mesh spacing is defined either (a) by @@ -119,33 +119,117 @@ for each atom type (type1 type2 ... typeN) and angle of diffraction. The analytic approximation is computed using the formula :ref:`(Brown) `: -.. image:: Eqs/compute_saed3.jpg - :align: center +.. math:: + + f_j\left ( \frac{sin(\theta)}{\lambda} \right )=\sum_{i}^{5} + a_i exp\left ( -b_i \frac{sin^{2}(\theta)}{\lambda^{2}} \right ) + Coefficients parameterized by :ref:`(Fox) ` are assigned for each atom type designating the chemical symbol and charge of each atom type. Valid chemical symbols for compute saed are: -H: He: Li: Be: B: -C: N: O: F: Ne: -Na: Mg: Al: Si: P: -S: Cl: Ar: K: Ca: -Sc: Ti: V: Cr: Mn: -Fe: Co: Ni: Cu: Zn: -Ga: Ge: As: Se: Br: -Kr: Rb: Sr: Y: Zr: -Nb: Mo: Tc: Ru: Rh: -Pd: Ag: Cd: In: Sn: -Sb: Te: I: Xe: Cs: -Ba: La: Ce: Pr: Nd: -Pm: Sm: Eu: Gd: Tb: -Dy: Ho: Er: Tm: Yb: -Lu: Hf: Ta: W: Re: -Os: Ir: Pt: Au: Hg: -Tl: Pb: Bi: Po: At: -Rn: Fr: Ra: Ac: Th: -Pa: U: Np: Pu: Am: -Cm: Bk: Cf:tb(c=5,s=:) +.. table_from_list:: + :columns: 20 + + * H + * He + * Li + * Be + * B + * C + * N + * O + * F + * Ne + * Na + * Mg + * Al + * Si + * P + * S + * Cl + * Ar + * K + * Ca + * Sc + * Ti + * V + * Cr + * Mn + * Fe + * Co + * Ni + * Cu + * Zn + * Ga + * Ge + * As + * Se + * Br + * Kr + * Rb + * Sr + * Y + * Zr + * Nb + * Mo + * Tc + * Ru + * Rh + * Pd + * Ag + * Cd + * In + * Sn + * Sb + * Te + * I + * Xe + * Cs + * Ba + * La + * Ce + * Pr + * Nd + * Pm + * Sm + * Eu + * Gd + * Tb + * Dy + * Ho + * Er + * Tm + * Yb + * Lu + * Hf + * Ta + * W + * Re + * Os + * Ir + * Pt + * Au + * Hg + * Tl + * Pb + * Bi + * Po + * At + * Rn + * Fr + * Ra + * Ac + * Th + * Pa + * U + * Np + * Pu + * Am + * Cm + * Bk + * Cf If the *echo* keyword is specified, compute saed will provide extra reporting information to the screen. diff --git a/doc/src/compute_sna_atom.rst b/doc/src/compute_sna_atom.rst index be3deaf36a..6da3ab45ea 100644 --- a/doc/src/compute_sna_atom.rst +++ b/doc/src/compute_sna_atom.rst @@ -82,8 +82,10 @@ onto the 3-sphere, the surface of the unit ball in a four-dimensional space. The radial distance *r* within *R\_ii'* is mapped on to a third polar angle *theta0* defined by, -.. image:: Eqs/compute_sna_atom1.jpg - :align: center +.. math:: + + \theta_0 = {\tt rfac0} \frac{r-r_{min0}}{R_{ii'}-r_{min0}} \pi + In this way, all possible neighbor positions are mapped on to a subset of the 3-sphere. Points south of the latitude *theta0max=rfac0\*Pi* @@ -101,8 +103,10 @@ radial distance. Expanding this density function as a generalized Fourier series in the basis functions, we can write each Fourier coefficient as -.. image:: Eqs/compute_sna_atom2.jpg - :align: center +.. math:: + + u^j_{m,m'} = U^j_{m,m'}(0,0,0) + \sum_{r_{ii'} < R_{ii'}}{f_c(r_{ii'}) w_{i'} U^j_{m,m'}(\theta_0,\theta,\phi)} + The *w\_i'* neighbor weights are dimensionless numbers that are chosen to distinguish atoms of different types, while the central atom is @@ -110,8 +114,11 @@ arbitrarily assigned a unit weight. The function *fc(r)* ensures that the contribution of each neighbor atom goes smoothly to zero at *R\_ii'*: -.. image:: Eqs/compute_sna_atom4.jpg - :align: center +.. math:: + + f_c(r) = & \frac{1}{2}(\cos(\pi \frac{r-r_{min0}}{R_{ii'}-r_{min0}}) + 1), r \leq R_{ii'} \\ + = & 0, r > R_{ii'} + The expansion coefficients *u\^j\_m,m'* are complex-valued and they are not directly useful as descriptors, because they are not invariant @@ -119,8 +126,15 @@ under rotation of the polar coordinate frame. However, the following scalar triple products of expansion coefficients can be shown to be real-valued and invariant under rotation :ref:`(Bartok) `. -.. image:: Eqs/compute_sna_atom3.jpg - :align: center +.. math:: + + B_{j_1,j_2,j} = + \sum_{m_1,m'_1=-j_1}^{j_1}\sum_{m_2,m'_2=-j_2}^{j_2}\sum_{m,m'=-j}^{j} (u^j_{m,m'})^* + H {\scriptscriptstyle \begin{array}{l} {j} {m} {m'} \\ + {j_1} {m_1} {m'_1} \\ + {j_2} {m_2} {m'_2} \end{array}} + u^{j_1}_{m_1,m'_1} u^{j_2}_{m_2,m'_2} + The constants *H\^jmm'\_j1m1m1'\_j2m2m2'* are coupling coefficients, analogous to Clebsch-Gordan coefficients for rotations on the @@ -138,8 +152,10 @@ atom. Compute *snad/atom* calculates the derivative of the bispectrum components summed separately for each atom type: -.. image:: Eqs/compute_sna_atom5.jpg - :align: center +.. math:: + + -\sum_{i' \in I} \frac{\partial {B^{i'}_{j_1,j_2,j} }}{\partial {\bf r}_i} + The sum is over all atoms *i'* of atom type *I*\ . For each atom *i*\ , this compute evaluates the above expression for each direction, each @@ -149,8 +165,10 @@ for a detailed explanation. Compute *snav/atom* calculates the virial contribution due to the derivatives: -.. image:: Eqs/compute_sna_atom6.jpg - :align: center +.. math:: + + -{\bf r}_i \otimes \sum_{i' \in I} \frac{\partial {B^{i'}_{j_1,j_2,j}}}{\partial {\bf r}_i} + Again, the sum is over all atoms *i'* of atom type *I*\ . For each atom *i*\ , this compute evaluates the above expression for each of the six @@ -233,7 +251,7 @@ ordered in which they are listed. file. The rerun script can use a :doc:`special_bonds ` command that includes all pairs in the neighbor list. -;line +---------- **Output info:** diff --git a/doc/src/compute_xrd.rst b/doc/src/compute_xrd.rst index b7ed547572..d95fad79e4 100644 --- a/doc/src/compute_xrd.rst +++ b/doc/src/compute_xrd.rst @@ -57,21 +57,16 @@ of wavelength lambda. The x-ray diffraction intensity, I, at each reciprocal lattice point, k, is computed from the structure factor, F, using the equations: -.. image:: Eqs/compute_xrd1.jpg - :align: center +.. math:: -.. image:: Eqs/compute_xrd2.jpg - :align: center + I = & Lp(\theta)\frac{F^{*}F}{N} \\ + F(\mathbf{k}) = & \sum_{j=1}^{N}f_j(\theta)exp(2\pi i \mathbf{k}\cdot \mathbf{r}_j) \\ + Lp(\theta) = & \frac{1+cos^{2}(2\theta)}{cos(\theta)sin^{2}(\theta)} \\ + \frac{sin(\theta)}{\lambda} = & \frac{\left | \mathbf{k} \right |}{2} -.. image:: Eqs/compute_xrd3.jpg - :align: center - -.. image:: Eqs/compute_xrd4.jpg - :align: center - -Here, K is the location of the reciprocal lattice node, rj is the -position of each atom, fj are atomic scattering factors, LP is the -Lorentz-polarization factor, and theta is the scattering angle of +Here, K is the location of the reciprocal lattice node, :math:`r_j` is the +position of each atom, :math:`f_j` are atomic scattering factors, *Lp* is the +Lorentz-polarization factor, and :math:`\theta` is the scattering angle of diffraction. The Lorentz-polarization factor can be turned off using the optional *LP* keyword. @@ -114,8 +109,10 @@ for each atom type (type1 type2 ... typeN) and angle of diffraction. The analytic approximation is computed using the formula :ref:`(Colliex) `: -.. image:: Eqs/compute_xrd5.jpg - :align: center +.. math:: + + f_j\left ( \frac{sin(\theta)}{\lambda} \right )=\sum_{i}^{4} + a_i exp\left ( -b_i \frac{sin^{2}(\theta)}{\lambda^{2}} \right )+c Coefficients parameterized by :ref:`(Peng) ` are assigned for each atom type designating the chemical symbol and charge of each atom diff --git a/doc/src/fix_ave_correlate_long.rst b/doc/src/fix_ave_correlate_long.rst index 6c9d7c076b..dd84daaa75 100644 --- a/doc/src/fix_ave_correlate_long.rst +++ b/doc/src/fix_ave_correlate_long.rst @@ -70,11 +70,12 @@ Examples Description """"""""""" -This fix is similar in spirit and syntax to the :doc:`fix ave/correlate `. However, this fix allows the -efficient calculation of time correlation functions on the fly over -extremely long time windows without too much CPU overhead, using a -multiple-tau method :ref:`(Ramirez) ` that decreases the resolution -of the stored correlation function with time. +This fix is similar in spirit and syntax to the :doc:`fix ave/correlate `. +However, this fix allows the efficient calculation of time correlation +functions on-the-fly over extremely long time windows with little +additional CPU overhead, using a multiple-tau method +:ref:`(Ramirez) ` that decreases the resolution of the stored +correlation function with time. It is not a full drop-in replacement. The group specified with this command is ignored. However, note that specified values may represent calculations performed by computes and @@ -115,11 +116,13 @@ For the meaning of the additional optional keywords, see the :doc:`fix ave/corre **Restart, fix\_modify, output, run start/stop, minimize info:** -Since this fix in intended for the calculation of time correlation -functions over very long MD simulations, the information about this -fix is written automatically to binary restart files, so that the time -correlation calculation can continue in subsequent simulations. None -of the fix\_modify options are relevant to this fix. +Contrary to doc:`fix ave/correlate `_ this fix +does **not** provide access to its internal data to various output +options. Since this fix in intended for the calculation of time +correlation functions over very long MD simulations, the information +about this fix is written automatically to binary restart files, so +that the time correlation calculation can continue in subsequent +simulations. None of the fix\_modify options are relevant to this fix. No parameter of this fix can be used with the start/stop keywords of the run command. This fix is not invoked during energy minimization. diff --git a/doc/src/fix_bond_react.rst b/doc/src/fix_bond_react.rst index ec431168b8..14d04009e7 100644 --- a/doc/src/fix_bond_react.rst +++ b/doc/src/fix_bond_react.rst @@ -374,8 +374,10 @@ reacting molecules. The constraint of type 'arrhenius' imposes an additional reaction probability according to the temperature-dependent Arrhenius equation: -.. image:: Eqs/fix_bond_react.jpg - :align: center +.. math:: + + k = AT^{n}e^{\frac{-E_{a}}{k_{B}T}} + The Arrhenius constraint has the following syntax: @@ -385,8 +387,8 @@ The Arrhenius constraint has the following syntax: arrhenius *A* *n* *E_a* *seed* where 'arrhenius' is the required keyword, *A* is the pre-exponential -factor, *n* is the exponent of the temperature dependence, *E\_a* is -the activation energy (:doc:`units ` of energy), and *seed* is a +factor, *n* is the exponent of the temperature dependence, :math:`E_a` +is the activation energy (:doc:`units ` of energy), and *seed* is a random number seed. The temperature is defined as the instantaneous temperature averaged over all atoms in the reaction site, and is calculated in the same manner as for example diff --git a/doc/src/fix_box_relax.rst b/doc/src/fix_box_relax.rst index d915d1a2a0..0c4cad7ad0 100644 --- a/doc/src/fix_box_relax.rst +++ b/doc/src/fix_box_relax.rst @@ -228,23 +228,28 @@ With this fix, the potential energy used by the minimizer is augmented by an additional energy provided by the fix. The overall objective function then is: -.. image:: Eqs/fix_box_relax1.jpg - :align: center +.. math:: -where *U* is the system potential energy, *P*\ \_t is the desired -hydrostatic pressure, *V* and *V*\ \_0 are the system and reference -volumes, respectively. *E*\ \_\ *strain* is the strain energy expression + E = U + P_t \left(V-V_0 \right) + E_{strain} + + +where *U* is the system potential energy, :math:`P_t` is the desired +hydrostatic pressure, :math:`V` and :math:`V_0` are the system and reference +volumes, respectively. :math:`E_{strain}` is the strain energy expression proposed by Parrinello and Rahman :ref:`(Parrinello1981) `. Taking derivatives of *E* w.r.t. the box dimensions, and setting these to zero, we find that at the minimum of the objective function, the global system stress tensor **P** will satisfy the relation: -.. image:: Eqs/fix_box_relax2.jpg - :align: center +.. math:: -where **I** is the identity matrix, **h**\ \_0 is the box dimension tensor of -the reference cell, and **h**\ \_0\ *d* is the diagonal part of -**h**\ \_0. **S**\ \_\ *t* is a symmetric stress tensor that is chosen by LAMMPS + \mathbf P = P_t \mathbf I + {\mathbf S_t} \left( \mathbf h_0^{-1} \right)^t \mathbf h_{0d} + + +where **I** is the identity matrix, :math:`\mathbf{h_0}` is the box +dimension tensor of the reference cell, and ::math:`\mathbf{h_{0d}}` +is the diagonal part of :math:`\mathbf{h_0}`. :math:`\mathbf{S_t}` +is a symmetric stress tensor that is chosen by LAMMPS so that the upper-triangular components of **P** equal the stress tensor specified by the user. diff --git a/doc/src/fix_controller.rst b/doc/src/fix_controller.rst index 7561df6856..839c01ef5f 100644 --- a/doc/src/fix_controller.rst +++ b/doc/src/fix_controller.rst @@ -97,43 +97,49 @@ The PID controller is invoked once each *Nevery* timesteps. The PID controller is implemented as a discretized version of the following dynamic equation: -.. image:: Eqs/fix_controller1.jpg - :align: center +.. math:: + \frac{dc}{dt} = \hat{E} -\alpha (K_p e + K_i \int_0^t e \, dt + K_d \frac{de}{dt} ) + where *c* is the continuous time analog of the control variable, *e* =\ *pvar*\ -\ *setpoint* is the error in the process variable, and -*alpha*\ , *Kp*\ , *Ki*\ , and *Kd* are constants set by the corresponding +:math:`\alpha`, :math:`K_p`, :math:`K_i` , and :math:`K_d` are constants +set by the corresponding keywords described above. The discretized version of this equation is: -.. image:: Eqs/fix_controller2.jpg - :align: center +.. math:: -where *tau* = *Nevery* \* *timestep* is the time interval between updates, + c_n = \hat{E} c_{n-1} -\alpha \left( K_p \tau e_n + K_i \tau^2 \sum_{i=1}^n e_i + K_d (e_n - e_{n-1}) \right) + + +where :math:`\tau = \mathtt{Nevery} \cdot \mathtt{timestep}` is the time +interval between updates, and the subscripted variables indicate the values of *c* and *e* at successive updates. From the first equation, it is clear that if the three gain values -*Kp*\ , *Ki*\ , *Kd* are dimensionless constants, then *alpha* must have +:math:`K_p`, :math:`K_i`, :math:`K_d` are dimensionless constants, +then :math:`\alpha` must have units of [unit *cvar*\ ]/[unit *pvar*\ ]/[unit time] e.g. [ eV/K/ps ]. The advantage of this unit scheme is that the value of the constants should be invariant under a change of either the MD timestep size or the value of *Nevery*\ . Similarly, if the LAMMPS :doc:`unit style ` is changed, it should only be necessary to change -the value of *alpha* to reflect this, while leaving *Kp*\ , *Ki*\ , and -*Kd* unaltered. +the value of :math:`\alpha` to reflect this, while leaving :math:`K_p`, +:math:`K_i`, and :math:`K_d` unaltered. When choosing the values of the four constants, it is best to first -pick a value and sign for *alpha* that is consistent with the -magnitudes and signs of *pvar* and *cvar*\ . The magnitude of *Kp* -should then be tested over a large positive range keeping *Ki* = *Kd* =0. -A good value for *Kp* will produce a fast response in *pvar*\ , without -overshooting the *setpoint*\ . For many applications, proportional -feedback is sufficient, and so *Ki* = *Kd* =0 can be used. In cases where -there is a substantial lag time in the response of *pvar* to a change -in *cvar*\ , this can be counteracted by increasing *Kd*\ . In situations +pick a value and sign for :math:`\alpha` that is consistent with the +magnitudes and signs of *pvar* and *cvar*\ . The magnitude of :math:`K_p` +should then be tested over a large positive range keeping :math:`K_i = K_d =0`. +A good value for :math:`K_p` will produce a fast response in *pvar*\ , +without overshooting the *setpoint*\ . For many applications, proportional +feedback is sufficient, and so :math:`K_i` = K_d =0` can be used. In cases +where there is a substantial lag time in the response of *pvar* to a change +in *cvar*\ , this can be counteracted by increasing :math:`K_d`. In situations where *pvar* plateaus without reaching *setpoint*\ , this can be -counteracted by increasing *Ki*\ . In the language of Charles Dickens, -*Kp* represents the error of the present, *Ki* the error of the past, -and *Kd* the error yet to come. +counteracted by increasing :math:`K_i`. In the language of Charles Dickens, +:math:`K_p` represents the error of the present, :math:`K_i` the error of +the past, and :math:`K_d` the error yet to come. Because this fix updates *cvar*\ , but does not initialize its value, the initial value is that assigned by the user in the input script via @@ -141,7 +147,7 @@ the :doc:`internal-style variable ` command. This value is used (by the other LAMMPS command that used the variable) until this fix performs its first update of *cvar* after *Nevery* timesteps. On the first update, the value of the derivative term is set to zero, -because the value of *e\_n-1* is not yet defined. +because the value of :math:`e_n-1` is not yet defined. ---------- diff --git a/doc/src/fix_ehex.rst b/doc/src/fix_ehex.rst index 34445fd284..9cc02261c7 100644 --- a/doc/src/fix_ehex.rst +++ b/doc/src/fix_ehex.rst @@ -78,13 +78,20 @@ additional thermostatting force to the equations of motion, such that the time evolution of coordinates and momenta of particle :math:`i` becomes :ref:`(Wirnsberger) ` -.. image:: Eqs/fix_ehex_eom.jpg - :align: center +.. math:: + + \dot{\mathbf r}_i &= \mathbf v_i, \\ + \dot{\mathbf v}_i &= \frac{\mathbf f_i}{m_i} + \frac{\mathbf g_i}{m_i}. The thermostatting force is given by -.. image:: Eqs/fix_ehex_f.jpg - :align: center +.. math:: + + \mathbf g_i = \begin{cases} + \frac{m_i}{2} \frac{ F_{\Gamma_{k(\mathbf r_i)}}}{ K_{\Gamma_{k(\mathbf r_i)}}} + \left(\mathbf v_i - \mathbf v_{\Gamma_{k(\mathbf r_i)}} \right) & \mbox{$k(\mathbf r_i)> 0$ (inside a reservoir),} \\ + 0 & \mbox{otherwise, } + \end{cases} where :math:`m_i` is the mass and :math:`k(\mathbf r_i)` maps the particle position to the respective reservoir. The quantity diff --git a/doc/src/fix_eos_cv.rst b/doc/src/fix_eos_cv.rst index b871429ffa..da1459970f 100644 --- a/doc/src/fix_eos_cv.rst +++ b/doc/src/fix_eos_cv.rst @@ -27,17 +27,19 @@ Description """"""""""" Fix *eos/cv* applies a mesoparticle equation of state to relate the -particle internal energy (u\_i) to the particle internal temperature -(dpdTheta\_i). The *eos/cv* mesoparticle equation of state requires +particle internal energy (:math:`u_i`) to the particle internal temperature +(:math:`\theta_i`). The *eos/cv* mesoparticle equation of state requires the constant-volume heat capacity, and is defined as follows: -.. image:: Eqs/fix_eos-cv.jpg - :align: center +.. math:: -where Cv is the constant-volume heat capacity, u\_cond is the internal -conductive energy, and u\_mech is the internal mechanical energy. Note -that alternative definitions of the mesoparticle equation of state are -possible. + u_{i} = u^{mech}_{i} + u^{cond}_{i} = C_{V} \theta_{i} + + +where :math:`C_V` is the constant-volume heat capacity, :math:`u^{cond}` +is the internal conductive energy, and :math:`u^{mech}` is the internal +mechanical energy. Note that alternative definitions of the mesoparticle +equation of state are possible. ---------- diff --git a/doc/src/fix_eos_table_rx.rst b/doc/src/fix_eos_table_rx.rst index a41ac404b7..681b656b53 100644 --- a/doc/src/fix_eos_table_rx.rst +++ b/doc/src/fix_eos_table_rx.rst @@ -40,30 +40,34 @@ Description Fix *eos/table/rx* applies a tabulated mesoparticle equation of state to relate the concentration-dependent particle internal -energy (u\_i) to the particle internal temperature (dpdTheta\_i). +energy (:math:`u_i`) to the particle internal temperature (:math:`\theta_i`). -The concentration-dependent particle internal energy (u\_i) is +The concentration-dependent particle internal energy (:math:`u_i`) is computed according to the following relation: -.. image:: Eqs/fix_eos_table_rx.jpg - :align: center +.. math:: -where *m* is the number of species, *c\_i,j* is the concentration of -species *j* in particle *i*\ , *u\_j* is the internal energy of species j, -*DeltaH\_f,j* is the heat of formation of species *j*\ , N is the number of -molecules represented by the coarse-grained particle, kb is the -Boltzmann constant, and T is the temperature of the system. Additionally, -it is possible to modify the concentration-dependent particle internal + U_{i} = \displaystyle\sum_{j=1}^{m} c_{i,j}(u_{j} + \Delta H_{f,j}) + \frac{3k_{b}T}{2} + Nk_{b}T \\ + + +where *m* is the number of species, :math:`c_{i,j}` is the +concentration of species *j* in particle *i*\ , :math:`u_j` is the +internal energy of species j, :math:`\Delta H_{f,j} is the heat of +formation of species *j*\ , N is the number of molecules represented +by the coarse-grained particle, :math:`k_b` is the Boltzmann constant, +and *T* is the temperature of the system. Additionally, it is +possible to modify the concentration-dependent particle internal energy relation by adding an energy correction, temperature-dependent -correction, and/or a molecule-dependent correction. An energy correction can -be specified as a constant (in energy units). A temperature correction can be -specified by multiplying a temperature correction coefficient by the -internal temperature. A molecular correction can be specified by -by multiplying a molecule correction coefficient by the average number of -product gas particles in the coarse-grain particle. +correction, and/or a molecule-dependent correction. An energy +correction can be specified as a constant (in energy units). A +temperature correction can be specified by multiplying a temperature +correction coefficient by the internal temperature. A molecular +correction can be specified by by multiplying a molecule correction +coefficient by the average number of product gas particles in the +coarse-grain particle. Fix *eos/table/rx* creates interpolation tables of length *N* from *m* -internal energy values of each species *u\_j* listed in a file as a +internal energy values of each species :math:`u_j` listed in a file as a function of internal temperature. During a simulation, these tables are used to interpolate internal energy or temperature values as needed. The interpolation is done with the *linear* style. For the *linear* style, @@ -72,20 +76,21 @@ which an internal energy is computed by linear interpolation. A secant solver is used to determine the internal temperature from the internal energy. The first filename specifies a file containing tabulated internal -temperature and *m* internal energy values for each species *u\_j*. +temperature and *m* internal energy values for each species :math:`u_j`. The keyword specifies a section of the file. The format of this file is described below. The second filename specifies a file containing heat of formation -*DeltaH\_f,j* for each species. +:math:`\Delta H_{f,j}` for each species. In cases where the coarse-grain particle represents a single molecular -species (i.e., no reactions occur and fix *rx* is not present in the input file), -fix *eos/table/rx* can be applied in a similar manner to fix *eos/table* -within a non-reactive DPD simulation. In this case, the heat of formation -filename is replaced with the heat of formation value for the single species. -Additionally, the energy correction and temperature correction coefficients may -also be specified as fix arguments. +species (i.e., no reactions occur and fix *rx* is not present in the +input file), fix *eos/table/rx* can be applied in a similar manner to +fix *eos/table* within a non-reactive DPD simulation. In this case, +the heat of formation filename is replaced with the heat of formation +value for the single species. Additionally, the energy correction and +temperature correction coefficients may also be specified as fix +arguments. ---------- diff --git a/doc/src/fix_gcmc.rst b/doc/src/fix_gcmc.rst index a0717dd6ae..dd06d074a4 100644 --- a/doc/src/fix_gcmc.rst +++ b/doc/src/fix_gcmc.rst @@ -248,8 +248,10 @@ two groups: the default group "all" and the fix group The chemical potential is a user-specified input parameter defined as: -.. image:: Eqs/fix_gcmc1.jpg - :align: center +.. math:: + + \mu = \mu^{id} + \mu^{ex} + The second term mu\_ex is the excess chemical potential due to energetic interactions and is formally zero for the fictitious gas @@ -260,31 +262,35 @@ quite different. The first term mu\_id is the ideal gas contribution to the chemical potential. mu\_id can be related to the density or pressure of the fictitious gas reservoir by: -.. image:: Eqs/fix_gcmc2.jpg - :align: center +.. math:: -where k is Boltzman's constant, -T is the user-specified temperature, rho is the number density, -P is the pressure, and phi is the fugacity coefficient. -The constant Lambda is required for dimensional consistency. -For all unit styles except *lj* it is defined as the thermal -de Broglie wavelength + \mu^{id} = & k T \ln{\rho \Lambda^3} \\ + = & k T \ln{\frac{\phi P \Lambda^3}{k T}} -.. image:: Eqs/fix_gcmc3.jpg - :align: center -where h is Planck's constant, and m is the mass of the exchanged atom -or molecule. For unit style *lj*\ , Lambda is simply set to the -unity. Note that prior to March 2017, lambda for unit style *lj* was -calculated using the above formula with h set to the rather specific +where *k* is Boltzman's constant, *T* is the user-specified +temperature, :math:`\rho` is the number density, *P* is the pressure, +and :math:`\phi` is the fugacity coefficient. The constant +:math:`\Lambda` is required for dimensional consistency. For all unit +styles except *lj* it is defined as the thermal de Broglie wavelength + +.. math:: + + \Lambda = \sqrt{ \frac{h^2}{2 \pi m k T}} + + +where *h* is Planck's constant, and *m* is the mass of the exchanged atom +or molecule. For unit style *lj*\ , :math:`\Lambda` is simply set to +unity. Note that prior to March 2017, :math:`\Lambda` for unit style *lj* +was calculated using the above formula with *h* set to the rather specific value of 0.18292026. Chemical potential under the old definition can be converted to an equivalent value under the new definition by -subtracting 3kTln(Lambda\_old). +subtracting :math:`3 k T \ln(\Lambda_{old})`. As an alternative to specifying mu directly, the ideal gas reservoir -can be defined by its pressure P using the *pressure* keyword, in +can be defined by its pressure *P* using the *pressure* keyword, in which case the user-specified chemical potential is ignored. The user -may also specify the fugacity coefficient phi using the +may also specify the fugacity coefficient :math:`\phi` using the *fugacity\_coeff* keyword, which defaults to unity. The *full\_energy* option means that the fix calculates the total @@ -322,7 +328,7 @@ this will ensure roughly the same behavior whether or not the *full\_energy* option is used. Inserted atoms and molecules are assigned random velocities based on -the specified temperature T. Because the relative velocity of all +the specified temperature *T*. Because the relative velocity of all atoms in the molecule is zero, this may result in inserted molecules that are systematically too cold. In addition, the intramolecular potential energy of the inserted molecule may cause the kinetic energy diff --git a/doc/src/fix_gld.rst b/doc/src/fix_gld.rst index fdc1bd3c6a..8dc2b9dd98 100644 --- a/doc/src/fix_gld.rst +++ b/doc/src/fix_gld.rst @@ -62,8 +62,12 @@ to be a Prony series. With this fix active, the force on the *j*\ th atom is given as -.. image:: Eqs/fix_gld1.jpg - :align: center +.. math:: + + {\bf F}_{j}(t) = & {\bf F}^C_j(t)-\int \limits_{0}^{t} \Gamma_j(t-s) {\bf v}_j(s)~\text{d}s + {\bf F}^R_j(t) \\ + \Gamma_j(t-s) = & \sum \limits_{k=1}^{N_k} \frac{c_k}{\tau_k} e^{-(t-s)/\tau_k} \\ + \langle{\bf F}^R_j(t),{\bf F}^R_j(s)\rangle = & \text{k$_\text{B}$T} ~\Gamma_j(t-s) + Here, the first term is representative of all conservative (pairwise, bonded, etc) forces external to this fix, the second is the temporally @@ -72,7 +76,7 @@ the colored Gaussian random force. The Prony series form of the memory kernel is chosen to enable an extended variable formalism, with a number of exemplary mathematical -features discussed in :ref:`(Baczewski) `. In particular, 3N\_k +features discussed in :ref:`(Baczewski) `. In particular, :math:`3N_k` extended variables are added to each atom, which effect the action of the memory kernel without having to explicitly evaluate the integral over time in the second term of the force. This also has the benefit diff --git a/doc/src/fix_grem.rst b/doc/src/fix_grem.rst index 4c2054e0c0..53b815ec36 100644 --- a/doc/src/fix_grem.rst +++ b/doc/src/fix_grem.rst @@ -38,17 +38,19 @@ which uses non-Boltzmann ensembles to sample over first order phase transitions. The is done by defining replicas with an enthalpy dependent effective temperature -.. image:: Eqs/fix_grem.jpg - :align: center +.. math:: -with *eta* negative and steep enough to only intersect the + T_{eff} = \lambda + \eta (H - H_0) + + +with :math:`\eta` negative and steep enough to only intersect the characteristic microcanonical temperature (Ts) of the system once, -ensuring a unimodal enthalpy distribution in that replica. *Lambda* is -the intercept and effects the generalized ensemble similar to how -temperature effects a Boltzmann ensemble. *H0* is a reference -enthalpy, and is typically set as the lowest desired sampled enthalpy. -Further explanation can be found in our recent papers -:ref:`(Malolepsza) `. +ensuring a unimodal enthalpy distribution in that replica. +:math:`\lambda` is the intercept and effects the generalized ensemble +similar to how temperature effects a Boltzmann ensemble. :math:`H_0` +is a reference enthalpy, and is typically set as the lowest desired +sampled enthalpy. Further explanation can be found in our recent +papers :ref:`(Malolepsza) `. This fix requires a Nose-Hoover thermostat fix reference passed to the grem as *thermostat-ID*\ . Two distinct temperatures exist in this @@ -59,13 +61,13 @@ algorithms can be used. The fix enforces a generalized ensemble in a single replica only. Typically, this ideology is combined with replica exchange with -replicas differing by *lambda* only for simplicity, but this is not +replicas differing by :math:`\lambda` only for simplicity, but this is not required. A multi-replica simulation can be run within the LAMMPS environment using the :doc:`temper/grem ` command. This utilizes LAMMPS partition mode and requires the number of available processors be on the order of the number of desired replicas. A 100-replica simulation would require at least 100 processors (1 per -world at minimum). If a many replicas are needed on a small number of +world at minimum). If many replicas are needed on a small number of processors, multi-replica runs can be run outside of LAMMPS. An example of this can be found in examples/USER/misc/grem and has no limit on the number of replicas per processor. However, this is very @@ -74,13 +76,13 @@ inefficient and error prone and should be avoided if possible. In general, defining the generalized ensembles is unique for every system. When starting a many-replica simulation without any knowledge of the underlying microcanonical temperature, there are several tricks -we have utilized to optimize the process. Choosing a less-steep *eta* -yields broader distributions, requiring fewer replicas to map the -microcanonical temperature. While this likely struggles from the same -sampling problems gREM was built to avoid, it provides quick insight -to Ts. Initially using an evenly-spaced *lambda* distribution -identifies regions where small changes in enthalpy lead to large -temperature changes. Replicas are easily added where needed. +we have utilized to optimize the process. Choosing a less-steep +:math:`\eta` yields broader distributions, requiring fewer replicas to +map the microcanonical temperature. While this likely struggles from +the same sampling problems gREM was built to avoid, it provides quick +insight to Ts. Initially using an evenly-spaced :math:`\lambda` +distribution identifies regions where small changes in enthalpy lead +to large temperature changes. Replicas are easily added where needed. ---------- diff --git a/doc/src/fix_hyper_global.rst b/doc/src/fix_hyper_global.rst index 809bd37981..2d0cda5970 100644 --- a/doc/src/fix_hyper_global.rst +++ b/doc/src/fix_hyper_global.rst @@ -58,65 +58,67 @@ Fichthorn as described in :ref:`(Miron) `. In LAMMPS we use a simplified version of bond-boost GHD where a single bond in the system is biased at any one timestep. -Bonds are defined between each pair of I,J atoms whose R0ij distance -is less than *cutbond*\ , when the system is in a quenched state +Bonds are defined between each pair of atoms *ij*\ , whose :math:`R^0_{ij}` +distance is less than *cutbond*\ , when the system is in a quenched state (minimum) energy. Note that these are not "bonds" in a covalent sense. A bond is simply any pair of atoms that meet the distance criterion. *Cutbond* is an argument to this fix; it is discussed -below. A bond is only formed if one or both of the I.J atoms are in +below. A bond is only formed if one or both of the *ij* atoms are in the specified group. -The current strain of bond IJ (when running dynamics) is defined as +The current strain of bond *ij* (when running dynamics) is defined as -.. parsed-literal:: +.. math:: - Eij = (Rij - R0ij) / R0ij + E_{ij} = \frac{R_{ij} - R^0_{ij}}{R^0_{ij}} -where Rij is the current distance between atoms I,J, and R0ij is the -equilibrium distance in the quenched state. +where :math:`R_{ij}` is the current distance between atoms *i* and *j*\ , +and :math:`R^0_{ij}` is the equilibrium distance in the quenched state. -The bias energy Vij of any bond IJ is defined as +The bias energy :math:`V_{ij}` of any bond between atoms *i* and *j* +is defined as -.. parsed-literal:: +.. math:: - Vij = Vmax \* (1 - (Eij/q)\^2) for abs(Eij) < qfactor - = 0 otherwise + V_{ij} = V^{max} \cdot \left( 1 - \left(\frac{E_{ij}}{q}\right)^2 \right) \textrm{ for } \left|E_{ij}\right| < qfactor \textrm{ or } 0 \textrm{ otherwise} -where the prefactor *Vmax* and the cutoff *qfactor* are arguments to +where the prefactor :math:`V^{max}` and the cutoff *qfactor* are arguments to this fix; they are discussed below. This functional form is an -inverse parabola centered at 0.0 with height Vmax and which goes to -0.0 at +/- qfactor. +inverse parabola centered at 0.0 with height :math:`V^{max}` and +which goes to 0.0 at +/- qfactor. -Let Emax = the maximum of abs(Eij) for all IJ bonds in the system on a -given timestep. On that step, Vij is added as a bias potential to -only the single bond with strain Emax, call it Vij(max). Note that -Vij(max) will be 0.0 if Emax >= qfactor on that timestep. Also note -that Vij(max) is added to the normal interatomic potential that is -computed between all atoms in the system at every step. +Let :math:`E^{max}` be the maximum of :math:`\left| E_{ij} \right|` +for all *ij* bonds in the system on a +given timestep. On that step, :math:`V_{ij}` is added as a bias potential +to only the single bond with strain :math:`E^{max}`, call it +:math:`V^{max}_{ij}`. Note that :math:`V^{max}_{ij}` will be 0.0 +if :math:`E^{max} >= \textrm{qfactor}` on that timestep. Also note +that :math:`V^{max}_{ij}` is added to the normal interatomic potential +that is computed between all atoms in the system at every step. -The derivative of Vij(max) with respect to the position of each atom -in the Emax bond gives a bias force Fij(max) acting on the bond as +The derivative of :math:`V^{max}_{ij}` with respect to the position of +each atom in the :math:`E^{max}` bond gives a bias force +:math:`F^{max}_{ij}` acting on the bond as -.. parsed-literal:: +.. math:: - Fij(max) = - dVij(max)/dEij = 2 Vmax Eij / qfactor\^2 for abs(Eij) < qfactor - = 0 otherwise + F^{max}_{ij} = - \frac{dV^{max}_{ij}}{dE_{ij}} = \frac{2 V^{max} E-{ij}}{\textrm{qfactor}^2} \textrm{ for } \left|E_{ij}\right| < \textrm{qfactor} \textrm{ or } 0 \textrm{ otherwise} which can be decomposed into an equal and opposite force acting on -only the two I,J atoms in the Emax bond. +only the two *ij* atoms in the :math:`E^{max}` bond. The time boost factor for the system is given each timestep I by -.. parsed-literal:: +.. math:: - Bi = exp(beta \* Vij(max)) + B_i = e^{\beta V^{max}_{ij}} -where beta = 1/kTequil, and *Tequil* is the temperature of the system -and an argument to this fix. Note that Bi >= 1 at every step. +where :math:`\beta = \frac{1}{kT_{equil}}`, and :math:`T_{equil}` is the temperature of the system +and an argument to this fix. Note that :math:`B_i >= 1` at every step. .. note:: @@ -125,21 +127,21 @@ and an argument to this fix. Note that Bi >= 1 at every step. constant-temperature (NVT) dynamics. LAMMPS does not check that this is done. -The elapsed time t\_hyper for a GHD simulation running for *N* +The elapsed time :math:`t_{hyper}` for a GHD simulation running for *N* timesteps is simply -.. parsed-literal:: +.. math:: - t_hyper = Sum (i = 1 to N) Bi \* dt + t_{hyper} = \sum_{i=1,N} B-i \cdot dt -where dt is the timestep size defined by the :doc:`timestep ` +where *dt* is the timestep size defined by the :doc:`timestep ` command. The effective time acceleration due to GHD is thus t\_hyper / N\*dt, where N\*dt is elapsed time for a normal MD run of N timesteps. Note that in GHD, the boost factor varies from timestep to timestep. -Likewise, which bond has Emax strain and thus which pair of atoms the -bias potential is added to, will also vary from timestep to timestep. +Likewise, which bond has :math:`E^{max}` strain and thus which pair of +atoms the bias potential is added to, will also vary from timestep to timestep. This is in contrast to local hyperdynamics (LHD) where the boost factor is an input parameter; see the :doc:`fix hyper/local ` doc page for details. @@ -150,9 +152,9 @@ factor is an input parameter; see the :doc:`fix hyper/local ` d Here is additional information on the input parameters for GHD. The *cutbond* argument is the cutoff distance for defining bonds -between pairs of nearby atoms. A pair of I,J atoms in their +between pairs of nearby atoms. A pair of *ij* atoms in their equilibrium, minimum-energy configuration, which are separated by a -distance Rij < *cutbond*\ , are flagged as a bonded pair. Setting +distance :math:`R_{ij} < cutbond`, are flagged as a bonded pair. Setting *cubond* to be ~25% larger than the nearest-neighbor distance in a crystalline lattice is a typical choice for solids, so that bonds exist only between nearest neighbor pairs. @@ -166,7 +168,7 @@ could still experience a non-zero bias force. If *qfactor* is set too large, then transitions from one energy basin to another are affected because the bias potential is non-zero at the transition state (e.g. saddle point). If *qfactor* is set too small -than little boost is achieved because the Eij strain of some bond in +than little boost is achieved because the :math:`E_{ij}` strain of some bond in the system will (nearly) always exceed *qfactor*\ . A value of 0.3 for *qfactor* is typically reasonable. @@ -220,7 +222,7 @@ scalar is the magnitude of the bias potential (energy units) applied on the current timestep. The vector stores the following quantities: * 1 = boost factor on this step (unitless) -* 2 = max strain Eij of any bond on this step (absolute value, unitless) +* 2 = max strain :math:`E_{ij}` of any bond on this step (absolute value, unitless) * 3 = ID of first atom in the max-strain bond * 4 = ID of second atom in the max-strain bond * 5 = average # of bonds/atom on this step diff --git a/doc/src/fix_hyper_local.rst b/doc/src/fix_hyper_local.rst index 335cd10f69..d7d0f012b6 100644 --- a/doc/src/fix_hyper_local.rst +++ b/doc/src/fix_hyper_local.rst @@ -77,66 +77,66 @@ To understand this description, you should first read the description of the GHD algorithm on the :doc:`fix hyper/global ` doc page. This description of LHD builds on the GHD description. -The definition of bonds and Eij are the same for GHD and LHD. The -formulas for Vij(max) and Fij(max) are also the same except for a -pre-factor Cij, explained below. +The definition of bonds and :math:`E_{ij}` are the same for GHD and LHD. +The formulas for :math:`V^{max}_{ij}` and :math:`F^{max}_{ij}` are also +the same except for a pre-factor :math:`C_{ij}`, explained below. -The bias energy Vij applied to a bond IJ with maximum strain is +The bias energy :math:`V_{ij}` applied to a bond *ij* with maximum strain is -.. parsed-literal:: +.. math:: - Vij(max) = Cij \* Vmax \* (1 - (Eij/q)\^2) for abs(Eij) < qfactor - = 0 otherwise + V^{max}_{ij} = C_{ij} \cdot V^{max} \cdot \left(1 - \left(\frac{E_{ij}}{q}\right)^2\right) \textrm{ for } \left|E_{ij}\right| < qfactor \textrm{ or } 0 \textrm{ otherwise} -The derivative of Vij(max) with respect to the position of each atom -in the IJ bond gives a bias force Fij(max) acting on the bond as +The derivative of :math:`V^{max}_{ij}` with respect to the position of +each atom in the *ij* bond gives a bias force :math:`F^{max}_{ij}` acting +on the bond as -.. parsed-literal:: +.. math:: - Fij(max) = - dVij(max)/dEij = 2 Cij Vmax Eij / qfactor\^2 for abs(Eij) < qfactor - = 0 otherwise + F^{max}_{ij} = - \frac{dV^{max}_{ij}}{dE_{ij}} = 2 C_{ij} V^{max} \frac{E_{ij}}{qfactor^2} \textrm{ for } \left|E_{ij}\right| < qfactor \textrm{ or } 0 \textrm{ otherwise} which can be decomposed into an equal and opposite force acting on -only the two I,J atoms in the IJ bond. +only the two atoms *i* and *j* in the *ij* bond. The key difference is that in GHD a bias energy and force is added (on a particular timestep) to only one bond (pair of atoms) in the system, -which is the bond with maximum strain Emax. +which is the bond with maximum strain :math:`E^{max}`. In LHD, a bias energy and force can be added to multiple bonds -separated by the specified *Dcut* distance or more. A bond IJ is +separated by the specified *Dcut* distance or more. A bond *ij* is biased if it is the maximum strain bond within its local -"neighborhood", which is defined as the bond IJ plus any neighbor -bonds within a distance *Dcut* from IJ. The "distance" between bond -IJ and bond KL is the minimum distance between any of the IK, IL, JK, -JL pairs of atoms. +"neighborhood", which is defined as the bond *ij* plus any neighbor +bonds within a distance *Dcut* from *ij*. The "distance" between bond +*ij* and bond *kl* is the minimum distance between any of the *ik*, *il*, +*jk*, and *jl* pairs of atoms. For a large system, multiple bonds will typically meet this -requirement, and thus a bias potential Vij(max) will be applied to -many bonds on the same timestep. +requirement, and thus a bias potential :math:`V^{max}_{ij}` will be +applied to many bonds on the same timestep. -In LHD, all bonds store a Cij prefactor which appears in the Vij(max) -and Fij(max) equations above. Note that the Cij factor scales the -strength of the bias energy and forces whenever bond IJ is the maximum -strain bond in its neighborhood. +In LHD, all bonds store a :math:`C_{ij}` prefactor which appears in +the :math:`V^{max}_{ij}` and :math:`F^{max}_{ij}equations above. Note +that the :math:`C_{ij}` factor scales the strength of the bias energy +and forces whenever bond *ij* is the maximum strain bond in its neighborhood. -Cij is initialized to 1.0 when a bond between the I,J atoms is first -defined. The specified *Btarget* factor is then used to adjust the -Cij prefactors for each bond every timestep in the following manner. +:math:`C_{ij}` is initialized to 1.0 when a bond between the *ij* atoms +is first defined. The specified *Btarget* factor is then used to adjust the +:math:`C_{ij}` prefactors for each bond every timestep in the following manner. -An instantaneous boost factor Bij is computed each timestep +An instantaneous boost factor :math:`B_{ij}` is computed each timestep for each bond, as -.. parsed-literal:: +.. math:: - Bij = exp(beta \* Vkl(max)) + B_{ij} = e^{\beta V^{max}_{kl}} -where Vkl(max) is the bias energy of the maxstrain bond KL within bond -IJ's neighborhood, beta = 1/kTequil, and *Tequil* is the temperature -of the system and an argument to this fix. +where :math:`V^{max}_{kl}` is the bias energy of the maxstrain bond *kl* +within bond *ij*\ 's neighborhood, :math:`\beta = \frac{1}{kT_{equil}}`, +and :math:`T_{equil}` is the temperature of the system and an argument +to this fix. .. note:: @@ -146,28 +146,32 @@ of the system and an argument to this fix. running constant-temperature (NVT) dynamics. LAMMPS does not check that this is done. -Note that if IJ = KL, then bond IJ is a biased bond on that timestep, -otherwise it is not. But regardless, the boost factor Bij can be -thought of an estimate of time boost currently being applied within a -local region centered on bond IJ. For LHD, we want this to be the -specified *Btarget* value everywhere in the simulation domain. +Note that if *ij*\ == *kl*\ , then bond *ij* is a biased bond on that +timestep, otherwise it is not. But regardless, the boost factor +:math:`B_{ij}` can be thought of an estimate of time boost currently +being applied within a local region centered on bond *ij*. For LHD, +we want this to be the specified *Btarget* value everywhere in the +simulation domain. -To accomplish this, if Bij < Btarget, the Cij prefactor for bond IJ is -incremented on the current timestep by an amount proportional to the -inverse of the specified *alpha* and the difference (Bij - Btarget). -Conversely if Bij > Btarget, Cij is decremented by the same amount. -This procedure is termed "boostostatting" in -:ref:`(Voter2013) `. It drives all of the individual Cij to -values such that when Vij\ *max* is applied as a bias to bond IJ, the -resulting boost factor Bij will be close to *Btarget* on average. +To accomplish this, if :math:`B_{ij} < B_{target}`, the :math:`C_{ij}` +prefactor for bond *ij* is incremented on the current timestep by an +amount proportional to the inverse of the specified *alpha* and the +difference (:math:`B_{ij} - B_{target}`). +Conversely if :math:`B_{ij} > B_{target}`, :math:`C_{ij}` is decremented +by the same amount. +This procedure is termed "boostostatting" in :ref:`(Voter2013) `. +It drives all of the individual :math:`C_{ij}` to +values such that when :math:`V^{max}_{ij}` is applied as a bias to +bond *ij*, the resulting boost factor :math:`B_{ij}` will be close +to :math:`B_{target}` on average. Thus the LHD time acceleration factor for the overall system is effectively *Btarget*\ . -Note that in LHD, the boost factor *Btarget* is specified by the user. +Note that in LHD, the boost factor :math:`B_{target}` is specified by the user. This is in contrast to global hyperdynamics (GHD) where the boost -factor varies each timestep and is computed as a function of *Vmax*\ , -Emax, and *Tequil*\ ; see the :doc:`fix hyper/global ` -doc page for details. +factor varies each timestep and is computed as a function of :math:`V_{max}`, +:math:`E_{max}`, and :math:`T_{equil}`; see the +:doc:`fix hyper/global ` doc page for details. ---------- @@ -182,7 +186,7 @@ The *Dcut*\ , *alpha*\ , and *Btarget* parameters are unique to LHD. The *cutbond* argument is the cutoff distance for defining bonds between pairs of nearby atoms. A pair of I,J atoms in their equilibrium, minimum-energy configuration, which are separated by a -distance Rij < *cutbond*\ , are flagged as a bonded pair. Setting +distance :math:`R_{ij} < cutbond`, are flagged as a bonded pair. Setting *cubond* to be ~25% larger than the nearest-neighbor distance in a crystalline lattice is a typical choice for solids, so that bonds exist only between nearest neighbor pairs. @@ -190,37 +194,40 @@ exist only between nearest neighbor pairs. The *qfactor* argument is the limiting strain at which the bias potential goes to 0.0. It is dimensionless, so a value of 0.3 means a bond distance can be up to 30% larger or 30% smaller than the -equilibrium (quenched) R0ij distance and the two atoms in the bond +equilibrium (quenched) :math:`R^0_{ij}` distance and the two atoms in the bond could still experience a non-zero bias force. If *qfactor* is set too large, then transitions from one energy basin to another are affected because the bias potential is non-zero at the transition state (e.g. saddle point). If *qfactor* is set too small -than little boost can be achieved because the Eij strain of some bond in +than little boost can be achieved because the :math:`E_{ij}` strain of +some bond in the system will (nearly) always exceed *qfactor*\ . A value of 0.3 for *qfactor* is typically a reasonable value. The *Vmax* argument is a fixed prefactor on the bias potential. There -is a also a dynamic prefactor Cij, driven by the choice of *Btarget* -as discussed above. The product of these should be a value less than +is a also a dynamic prefactor :math:`C_{ij}`, driven by the choice of +*Btarget* as discussed above. The product of these should be a value less than the smallest barrier height for an event to occur. Otherwise the applied bias potential may be large enough (when added to the interatomic potential) to produce a local energy basin with a maxima in the center. This can produce artificial energy minima in the same -basin that trap an atom. Or if Cij\*\ *Vmax* is even larger, it may +basin that trap an atom. Or if :math:`C_{ij} \cdot V^{max}` is even +larger, it may induce an atom(s) to rapidly transition to another energy basin. Both cases are "bad dynamics" which violate the assumptions of LHD that guarantee an accelerated time-accurate trajectory of the system. .. note:: - It may seem that *Vmax* can be set to any value, and Cij will - compensate to reduce the overall prefactor if necessary. However the - Cij are initialized to 1.0 and the boostostatting procedure typically - operates slowly enough that there can be a time period of bad dynamics - if *Vmax* is set too large. A better strategy is to set *Vmax* to the + It may seem that :math:`V^{max}` can be set to any value, and + :math:`C_{ij}` will compensate to reduce the overall prefactor + if necessary. However the :math:`C_{ij}` are initialized to 1.0 + and the boostostatting procedure typically operates slowly enough + that there can be a time period of bad dynamics if :math:`V^{max}` + is set too large. A better strategy is to set :math:`V^{max}` to the slightly smaller than the lowest barrier height for an event (the same - as for GHD), so that the Cij remain near unity. + as for GHD), so that the :math:`C_{ij}` remain near unity. The *Tequil* argument is the temperature at which the system is simulated; see the comment above about the :doc:`fix langevin ` thermostatting. It is also part of the @@ -262,11 +269,11 @@ half the *cutbond* parameter as an estimate to warn if the ghost cutoff is not long enough. As described above the *alpha* argument is a pre-factor in the -boostostat update equation for each bond's Cij prefactor. *Alpha* is -specified in time units, similar to other thermostat or barostat +boostostat update equation for each bond's :math:`C_{ij}` prefactor. +*Alpha* is specified in time units, similar to other thermostat or barostat damping parameters. It is roughly the physical time it will take the -boostostat to adjust a Cij value from a too high (or too low) value to -a correct one. An *alpha* setting of a few ps is typically good for +boostostat to adjust a :math:`C_{ij}` value from a too high (or too low) +value to a correct one. An *alpha* setting of a few ps is typically good for solid-state systems. Note that the *alpha* argument here is the inverse of the alpha parameter discussed in :ref:`(Voter2013) `. @@ -276,25 +283,26 @@ that all the atoms in the system will experience. The elapsed time t\_hyper for an LHD simulation running for *N* timesteps is simply -.. parsed-literal:: +.. math:: - t_hyper = Btarget \* N\*dt + t_{hyper} = B_{target} \cdot N \cdot dt -where dt is the timestep size defined by the :doc:`timestep ` -command. The effective time acceleration due to LHD is thus t\_hyper / -N\*dt = Btarget, where N\*dt is elapsed time for a normal MD run -of N timesteps. +where *dt* is the timestep size defined by the :doc:`timestep ` +command. The effective time acceleration due to LHD is thus +:math:`\frac{t_{hyper}}{N\cdot dt} = B_{target}`, where :math:`N\cdot dt` +is the elapsed time for a normal MD run of N timesteps. You cannot choose an arbitrarily large setting for *Btarget*\ . The maximum value you should choose is -.. parsed-literal:: +.. math:: - Btarget = exp(beta \* Vsmall) + B_{target} = e^{\beta V_{small}} -where Vsmall is the smallest event barrier height in your system, beta -= 1/kTequil, and *Tequil* is the specified temperature of the system +where :math:`V_{small}` is the smallest event barrier height in your +system, :math:`\beta = \frac{1}{kT_{equil}}`, and :math:`T_{equil}` +is the specified temperature of the system (both by this fix and the Langevin thermostat). Note that if *Btarget* is set smaller than this, the LHD simulation @@ -315,41 +323,42 @@ time (t\_hyper equation above) will be shorter. Here is additional information on the optional keywords for this fix. -The *bound* keyword turns on min/max bounds for bias coefficients Cij -for all bonds. Cij is a prefactor for each bond on the bias potential -of maximum strength Vmax. Depending on the choice of *alpha* and -*Btarget* and *Vmax*\ , the boostostatting can cause individual Cij -values to fluctuate. If the fluctuations are too large Cij\*Vmax can -exceed low barrier heights and induce bad event dynamics. Bounding -the Cij values is a way to prevent this. If *Bfrac* is set to -1 or -any negative value (the default) then no bounds are enforced on Cij -values (except they must always be >= 0.0). A *Bfrac* setting >= 0.0 -sets a lower bound of 1.0 - Bfrac and upper bound of 1.0 + Bfrac on -each Cij value. Note that all Cij values are initialized to 1.0 when -a bond is created for the first time. Thus *Bfrac* limits the bias -potential height to *Vmax* +/- *Bfrac*\ \*\ *Vmax*\ . +The *bound* keyword turns on min/max bounds for bias coefficients +:math:`C_{ij}` for all bonds. :math:`C_{ij}` is a prefactor for each bond on +the bias potential of maximum strength :math:`V^{max}`. Depending on the +choice of *alpha* and *Btarget* and *Vmax*\ , the boostostatting can cause +individual :math:`C_{ij}` values to fluctuate. If the fluctuations are too +large :math:`C_{ij} \cdot V^{max}` can exceed low barrier heights and induce +bad event dynamics. Bounding the :math:`C_{ij}` values is a way to prevent +this. If *Bfrac* is set to -1 or any negative value (the default) then no +bounds are enforced on :math:`C_{ij}` values (except they must always +be >= 0.0). A *Bfrac* setting >= 0.0 +sets a lower bound of 1.0 - Bfrac and upper bound of 1.0 + Bfrac on each +:math:`C_{ij}` value. Note that all :math:`C_{ij}` values are initialized +to 1.0 when a bond is created for the first time. Thus *Bfrac* limits the +bias potential height to *Vmax* +/- *Bfrac*\ \*\ *Vmax*\ . -The *reset* keyword allow *Vmax* to be adjusted dynamically depending -on the average value of all Cij prefactors. This can be useful if you +The *reset* keyword allow *Vmax* to be adjusted dynamically depending on the +average value of all :math:`C_{ij}` prefactors. This can be useful if you are unsure what value of *Vmax* will match the *Btarget* boost for the -system. The Cij values will then adjust in aggregate (up or down) so -that Cij\*Vmax produces a boost of *Btarget*\ , but this may conflict -with the *bound* keyword settings. By using *bound* and *reset* -together, *Vmax* itself can be reset, and desired bounds still applied -to the Cij values. +system. The :math:`C_{ij}` values will then adjust in aggregate (up or down) +so that :math:`C_{ij} \cdot V^{max}` produces a boost of *Btarget*\ , but this +may conflict with the *bound* keyword settings. By using *bound* and *reset* +together, :math:`V^{max}` itself can be reset, and desired bounds still applied +to the :math:`C_{ij}` values. A setting for *Rfreq* of -1 (the default) means *Vmax* never changes. -A setting of 0 means *Vmax* is adjusted every time an event occurs and +A setting of 0 means :math:`V^{max}` is adjusted every time an event occurs and bond pairs are recalculated. A setting of N > 0 timesteps means -*Vmax* is adjusted on the first time an event occurs on a timestep >= -N steps after the previous adjustment. The adjustment to *Vmax* is -computed as follows. The current average of all Cij\*Vmax values is -computed and the *Vmax* is reset to that value. All Cij values are -changed to new prefactors such the new Cij\*Vmax is the same as it was -previously. If the *bound* keyword was used, those bounds are -enforced on the new Cij values. Henceforth, new bonds are assigned a -Cij = 1.0, which means their bias potential magnitude is the new -*Vmax*\ . +:math:`V^{max}` is adjusted on the first time an event occurs on a timestep >= +N steps after the previous adjustment. The adjustment to :math:`V^{max}` is +computed as follows. The current average of all :math:`C_{ij} \cdot V^{max}` +values is computed and the :math:`V^{max}` is reset to that value. All +:math:`C_{ij}` values are changed to new prefactors such the new +:math:`C_{ij} \cdot V^{max}` is the same as it was previously. If the +*bound* keyword was used, those bounds are enforced on the new :math:`C_{ij}` +values. Henceforth, new bonds are assigned a :math:`C_{ij} = 1.0`, which +means their bias potential magnitude is the new :math:`V^{max}`. The *check/ghost* keyword turns on extra computation each timestep to compute statistics about ghost atoms used to determine which bonds to @@ -390,8 +399,8 @@ vector stores the following quantities: * 1 = average boost for all bonds on this step (unitless) * 2 = # of biased bonds on this step -* 3 = max strain Eij of any bond on this step (absolute value, unitless) -* 4 = value of Vmax on this step (energy units) +* 3 = max strain :math:`E_{ij}` of any bond on this step (absolute value, unitless) +* 4 = value of :math:`V^{max}` on this step (energy units) * 5 = average bias coeff for all bonds on this step (unitless) * 6 = min bias coeff for all bonds on this step (unitless) * 7 = max bias coeff for all bonds on this step (unitless) @@ -428,12 +437,12 @@ multiple runs (since the point in the input script the fix was defined). For value 10, each bond instantaneous boost factor is given by the -equation for Bij above. The total system boost (average across all +equation for :math:`B_{ij}` above. The total system boost (average across all bonds) fluctuates, but should average to a value close to the -specified Btarget. +specified :math:`B_{target}`. For value 12, the numerator is a count of all biased bonds on each -timestep whose bias energy = 0.0 due to Eij >= *qfactor*\ . The +timestep whose bias energy = 0.0 due to :math:`E_{ij} >= qfactor`. The denominator is the count of all biased bonds on all timesteps. For value 13, the numerator is a count of all biased bonds on each @@ -522,12 +531,12 @@ The scalar and vector values calculated by this fix are all "intensive". This fix also computes a local vector of length the number of bonds -currently in the system. The value for each bond is its Cij prefactor -(bias coefficient). These values can be can be accessed by various +currently in the system. The value for each bond is its :math:`C_{ij}` +prefactor (bias coefficient). These values can be can be accessed by various :doc:`output commands `. A particularly useful one is the :doc:`fix ave/histo ` command which can be used to histogram the Cij values to see if they are distributed reasonably -close to 1.0, which indicates a good choice of *Vmax*\ . +close to 1.0, which indicates a good choice of :math:`V^{max}`. The local values calculated by this fix are unitless. diff --git a/doc/src/fix_langevin_spin.rst b/doc/src/fix_langevin_spin.rst index bccedc8520..b229a2ae8d 100644 --- a/doc/src/fix_langevin_spin.rst +++ b/doc/src/fix_langevin_spin.rst @@ -36,16 +36,19 @@ Brownian dynamics (BD). A random torque and a transverse dissipation are applied to each spin i according to the following stochastic differential equation: -.. image:: Eqs/fix_langevin_spin_sLLG.jpg - :align: center +.. math:: -with lambda the transverse damping, and eta a random vector. + \frac{d \vec{s}_{i}}{dt} = \frac{1}{\left(1+\lambda^2 \right)} \left( \left( + \vec{\omega}_{i} +\vec{\eta} \right) \times \vec{s}_{i} + \lambda\, \vec{s}_{i} + \times\left( \vec{\omega}_{i} \times\vec{s}_{i} \right) \right) + +with :math:`\lambda` the transverse damping, and :math:`\eta` a random vector. This equation is referred to as the stochastic Landau-Lifshitz-Gilbert (sLLG) equation. -The components of eta are drawn from a Gaussian probability law. Their amplitude -is defined as a proportion of the temperature of the external thermostat T (in K -in metal units). +The components of :math:`\eta` are drawn from a Gaussian probability +law. Their amplitude is defined as a proportion of the temperature of +the external thermostat T (in K in metal units). More details about this implementation are reported in :ref:`(Tranchida) `. diff --git a/doc/src/fix_lb_fluid.rst b/doc/src/fix_lb_fluid.rst index b7ce7ffdc8..0c923d923b 100644 --- a/doc/src/fix_lb_fluid.rst +++ b/doc/src/fix_lb_fluid.rst @@ -69,33 +69,42 @@ dependent force to the fluid. The lattice-Boltzmann algorithm solves for the fluid motion governed by the Navier Stokes equations, -.. image:: Eqs/fix_lb_fluid_navierstokes.jpg - :align: center +.. math:: + + \partial_t \rho + \partial_{\beta}\left(\rho u_{\beta}\right)= & 0 \\ + \partial_t\left(\rho u_{\alpha}\right) + \partial_{\beta}\left(\rho u_{\alpha} u_{\beta}\right) = & \partial_{\beta}\sigma_{\alpha \beta} + F_{\alpha} + \partial_{\beta}\left(\eta_{\alpha \beta \gamma \nu}\partial_{\gamma} u_{\nu}\right) + with, -.. image:: Eqs/fix_lb_fluid_viscosity.jpg - :align: center +.. math:: -where rho is the fluid density, u is the local fluid velocity, sigma -is the stress tensor, F is a local external force, and eta and Lambda -are the shear and bulk viscosities respectively. Here, we have -implemented + \eta_{\alpha \beta \gamma \nu} = \eta\left[\delta_{\alpha \gamma}\delta_{\beta \nu} + \delta_{\alpha \nu}\delta_{\beta \gamma} - \frac{2}{3}\delta_{\alpha \beta}\delta_{\gamma \nu}\right] + \Lambda \delta_{\alpha \beta}\delta_{\gamma \nu} -.. image:: Eqs/fix_lb_fluid_stress.jpg - :align: center -with a\_0 set to 1/3 (dx/dt)\^2 by default. +where :math:`\rho` is the fluid density, *u* is the local +fluid velocity, :math:`\sigma` is the stress tensor, *F* is a local external +force, and :math:`\eta` and :math:`\Lambda` are the shear and bulk viscosities +respectively. Here, we have implemented + +.. math:: + + \sigma_{\alpha \beta} = -P_{\alpha \beta} = -\rho a_0 \delta_{\alpha \beta} + + +with :math:`a_0` set to :math:`\frac{1}{3} \frac{dx}{dt}^2` by default. The algorithm involves tracking the time evolution of a set of partial distribution functions which evolve according to a velocity discretized version of the Boltzmann equation, -.. image:: Eqs/fix_lb_fluid_boltzmann.jpg - :align: center +.. math:: + + \left(\partial_t + e_{i\alpha}\partial_{\alpha}\right)f_i = -\frac{1}{\tau}\left(f_i - f_i^{eq}\right) + W_i + where the first term on the right hand side represents a single time -relaxation towards the equilibrium distribution function, and tau is a +relaxation towards the equilibrium distribution function, and :math:`\tau` is a parameter physically related to the viscosity. On a technical note, we have implemented a 15 velocity model (D3Q15) as default; however, the user can switch to a 19 velocity model (D3Q19) through the use of @@ -108,8 +117,10 @@ finite difference LB integrator is used. If *LBtype* is set equal to Physical variables are then defined in terms of moments of the distribution functions, -.. image:: Eqs/fix_lb_fluid_properties.jpg - :align: center +.. math:: + + \rho = & \displaystyle\sum\limits_{i} f_i \\ + \rho u_{\alpha} = & \displaystyle\sum\limits_{i} f_i e_{i\alpha} Full details of the lattice-Boltzmann algorithm used can be found in :ref:`Mackay et al. `. @@ -119,12 +130,15 @@ through a velocity dependent force. The contribution to the fluid force on a given lattice mesh site j due to MD particle alpha is calculated as: -.. image:: Eqs/fix_lb_fluid_fluidforce.jpg - :align: center +.. math:: -where v\_n is the velocity of the MD particle, u\_f is the fluid + {\bf F}_{j \alpha} = \gamma \left({\bf v}_n - {\bf u}_f \right) \zeta_{j\alpha} + + +where :math:`\mathbf{v}_n` is the velocity of the MD particle, +:math:`\mathbf{u}_f` is the fluid velocity interpolated to the particle location, and gamma is the force -coupling constant. Zeta is a weight assigned to the grid point, +coupling constant. :math:`\zeta` is a weight assigned to the grid point, obtained by distributing the particle to the nearest lattice sites. For this, the user has the choice between a trilinear stencil, which provides a support of 8 lattice sites, or the immersed boundary method @@ -135,20 +149,25 @@ to walls, due to its smaller support. Therefore, by default, the Peskin stencil is used; however the user may switch to the trilinear stencil by specifying the keyword, *trilinear*\ . -By default, the force coupling constant, gamma, is calculated according to +By default, the force coupling constant, :math:`\gamma`, is calculated +according to -.. image:: Eqs/fix_lb_fluid_gammadefault.jpg - :align: center +.. math:: -Here, m\_v is the mass of the MD particle, m\_u is a representative -fluid mass at the particle location, and dt\_collision is a collision -time, chosen such that tau/dt\_collision = 1 (see :ref:`Mackay and Denniston ` for full details). In order to calculate m\_u, the -fluid density is interpolated to the MD particle location, and -multiplied by a volume, node\_area\*dx\_lb, where node\_area represents -the portion of the surface area of the composite object associated -with a given MD particle. By default, node\_area is set equal to -dx\_lb\*dx\_lb; however specific values for given atom types can be set -using the *setArea* keyword. + \gamma = \frac{2m_um_v}{m_u+m_v}\left(\frac{1}{\Delta t_{collision}}\right) + + +Here, :math:`m_v` is the mass of the MD particle, :math:`m_u` is a +representative fluid mass at the particle location, and :math:`\Delta +t_{collision}` is a collision time, chosen such that +:math:`\frac{\tau}{\Delta t_{collision}} = 1` (see :ref:`Mackay and +Denniston ` for full details). In order to calculate :math:`m_u`, +the fluid density is interpolated to the MD particle location, and +multiplied by a volume, node\_area\*dx\_lb, where node\_area +represents the portion of the surface area of the composite object +associated with a given MD particle. By default, node\_area is set +equal to dx\_lb\*dx\_lb; however specific values for given atom types +can be set using the *setArea* keyword. The user also has the option of specifying their own value for the force coupling constant, for all the MD particles associated with the @@ -364,8 +383,10 @@ Default By default, the force coupling constant is set according to -.. image:: Eqs/fix_lb_fluid_gammadefault.jpg - :align: center +.. math:: + + \gamma = \frac{2m_um_v}{m_u+m_v}\left(\frac{1}{\Delta t_{collision}}\right) + and an area of dx\_lb\^2 per node, used to calculate the fluid mass at the particle node location, is assumed. diff --git a/doc/src/fix_mvv_dpd.rst b/doc/src/fix_mvv_dpd.rst index 55066c8ce4..211642e7ec 100644 --- a/doc/src/fix_mvv_dpd.rst +++ b/doc/src/fix_mvv_dpd.rst @@ -50,10 +50,14 @@ The modified velocity-Verlet (MVV) algorithm aims to improve the stability of the time integrator by using an extrapolated version of the velocity for the force evaluation: -.. image:: Eqs/fix_mvv_dpd.jpg - :align: center +.. math:: -where the parameter λ depends on the + v(t+\frac{\Delta t}{2}) = & v(t) + \frac{\Delta t}{2}\cdot a(t) \\ + r(t+\Delta t) = & r(t) + \Delta t\cdot v(t+\frac{\Delta t}{2}) \\ + a(t+\Delta t) = & \frac{1}{m}\cdot F\left[ r(t+\Delta t), v(t) +\lambda \cdot \Delta t\cdot a(t)\right] \\ + v(t+\Delta t) = & v(t+\frac{\Delta t}{2}) + \frac{\Delta t}{2}\cdot a(t+\Delta t) + +where the parameter :math:`\lambda` depends on the specific choice of DPD parameters, and needs to be tuned on a case-by-case basis. Specification of a *lambda* value is optional. If specified, the setting must be from 0.0 to 1.0. If not specified, diff --git a/doc/src/fix_nh.rst b/doc/src/fix_nh.rst index 36f2d6c8f3..88ece95e95 100644 --- a/doc/src/fix_nh.rst +++ b/doc/src/fix_nh.rst @@ -511,9 +511,28 @@ with *respa*\ , LAMMPS uses an integrator constructed according to the following factorization of the Liouville propagator (for two rRESPA levels): -.. image:: Eqs/fix_nh1.jpg - :align: center +.. math:: + \exp \left(\mathrm{i} L \Delta t \right) = & \hat{E} + \exp \left(\mathrm{i} L_{\rm T\textrm{-}baro} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{\rm T\textrm{-}part} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{\epsilon , 2} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{2}^{(2)} \frac{\Delta t}{2} \right) \\ + &\times \left[ + \exp \left(\mathrm{i} L_{2}^{(1)} \frac{\Delta t}{2n} \right) + \exp \left(\mathrm{i} L_{\epsilon , 1} \frac{\Delta t}{2n} \right) + \exp \left(\mathrm{i} L_1 \frac{\Delta t}{n} \right) + \exp \left(\mathrm{i} L_{\epsilon , 1} \frac{\Delta t}{2n} \right) + \exp \left(\mathrm{i} L_{2}^{(1)} \frac{\Delta t}{2n} \right) + \right]^n \\ + &\times + \exp \left(\mathrm{i} L_{2}^{(2)} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{\epsilon , 2} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{\rm T\textrm{-}part} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{\rm T\textrm{-}baro} \frac{\Delta t}{2} \right) \\ + &+ \mathcal{O} \left(\Delta t^3 \right) + + This factorization differs somewhat from that of Tuckerman et al, in that the barostat is only updated at the outermost rRESPA level, whereas Tuckerman's factorization requires splitting the pressure into diff --git a/doc/src/fix_nphug.rst b/doc/src/fix_nphug.rst index 2261600f93..1d946e5f83 100644 --- a/doc/src/fix_nphug.rst +++ b/doc/src/fix_nphug.rst @@ -88,21 +88,23 @@ Essentially, a Hugoniostat simulation is an NPT simulation in which the user-specified target temperature is replaced with a time-dependent target temperature Tt obtained from the following equation: -.. image:: Eqs/fix_nphug.jpg - :align: center +.. math:: -where T and Tt are the instantaneous and target temperatures, -P and P0 are the instantaneous and reference pressures or axial stresses, + T_t - T = \frac{\left(\frac{1}{2}\left(P + P_0\right)\left(V_0 - V\right) + E_0 - E\right)}{N_{dof} k_B } = \Delta + + +where *T* and :math:`T_t` are the instantaneous and target temperatures, +*P* and :math:`P_0` are the instantaneous and reference pressures or axial stresses, depending on whether hydrostatic or uniaxial compression is being -performed, V and V0 are the instantaneous and reference volumes, -E and E0 are the instantaneous and reference internal energy (potential -plus kinetic), Ndof is the number of degrees of freedom used in the -definition of temperature, and kB is the Boltzmann constant. Delta is the +performed, *V* and :math:`V_0` are the instantaneous and reference volumes, +*E* and :math:`E_0` are the instantaneous and reference internal energy (potential +plus kinetic), :math:`N_{dof}` is the number of degrees of freedom used in the +definition of temperature, and :math:`k_B` is the Boltzmann constant. :math:`\Delta` is the negative deviation of the instantaneous temperature from the target temperature. -When the system reaches a stable equilibrium, the value of Delta should +When the system reaches a stable equilibrium, the value of :math:`\Delta` should fluctuate about zero. -The values of E0, V0, and P0 are the instantaneous values at the start of +The values of :math:`E_0`, :math:`V_0`, and :math:`P_0` are the instantaneous values at the start of the simulation. These can be overridden using the fix\_modify keywords *e0*\ , *v0*\ , and *p0* described below. @@ -179,19 +181,20 @@ instructions on how to use the accelerated styles effectively. **Restart, fix\_modify, output, run start/stop, minimize info:** -This fix writes the values of E0, V0, and P0, as well as the -state of all the thermostat and barostat -variables to :doc:`binary restart files `. See the -:doc:`read_restart ` command for info on how to re-specify -a fix in an input script that reads a restart file, so that the -operation of the fix continues in an uninterrupted fashion. +This fix writes the values of :math:`E_0`, :math:`V_0`, and :math:`P_0`, +as well as the state of all the thermostat and barostat variables to +:doc:`binary restart files `. See the :doc:`read_restart +` command for info on how to re-specify a fix in an input +script that reads a restart file, so that the operation of the fix +continues in an uninterrupted fashion. -The :doc:`fix_modify ` *e0*\ , *v0* and *p0* keywords -can be used to define the values of E0, V0, and P0. Note the -the values for *e0* and *v0* are extensive, and so must correspond -to the total energy and volume of the entire system, not energy and -volume per atom. If any of these quantities are not specified, then the -instantaneous value in the system at the start of the simulation is used. +The :doc:`fix_modify ` *e0*\ , *v0* and *p0* keywords can be +used to define the values of :math:`E_0`, :math:`V_0`, and +:math:`P_0`. Note the the values for *e0* and *v0* are extensive, and so +must correspond to the total energy and volume of the entire system, not +energy and volume per atom. If any of these quantities are not +specified, then the instantaneous value in the system at the start of +the simulation is used. The :doc:`fix_modify ` *temp* and *press* options are supported by these fixes. You can use them to assign a @@ -216,7 +219,7 @@ values are "intensive". The scalar is the cumulative energy change due to the fix. -The vector stores three quantities unique to this fix (Delta, Us, and up), +The vector stores three quantities unique to this fix (:math:`\Delta`, Us, and up), followed by all the internal Nose/Hoover thermostat and barostat variables defined for :doc:`fix npt `. Delta is the deviation of the temperature from the target temperature, given by the above equation. diff --git a/doc/src/fix_npt_cauchy.rst b/doc/src/fix_npt_cauchy.rst index 133305f13c..e9a98b813f 100644 --- a/doc/src/fix_npt_cauchy.rst +++ b/doc/src/fix_npt_cauchy.rst @@ -444,8 +444,26 @@ with *respa*\ , LAMMPS uses an integrator constructed according to the following factorization of the Liouville propagator (for two rRESPA levels): -.. image:: Eqs/fix_nh1.jpg - :align: center +.. math:: + + \exp \left(\mathrm{i} L \Delta t \right) = & \hat{E} + \exp \left(\mathrm{i} L_{\rm T\textrm{-}baro} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{\rm T\textrm{-}part} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{\epsilon , 2} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{2}^{(2)} \frac{\Delta t}{2} \right) \\ + &\times \left[ + \exp \left(\mathrm{i} L_{2}^{(1)} \frac{\Delta t}{2n} \right) + \exp \left(\mathrm{i} L_{\epsilon , 1} \frac{\Delta t}{2n} \right) + \exp \left(\mathrm{i} L_1 \frac{\Delta t}{n} \right) + \exp \left(\mathrm{i} L_{\epsilon , 1} \frac{\Delta t}{2n} \right) + \exp \left(\mathrm{i} L_{2}^{(1)} \frac{\Delta t}{2n} \right) + \right]^n \\ + &\times + \exp \left(\mathrm{i} L_{2}^{(2)} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{\epsilon , 2} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{\rm T\textrm{-}part} \frac{\Delta t}{2} \right) + \exp \left(\mathrm{i} L_{\rm T\textrm{-}baro} \frac{\Delta t}{2} \right) \\ + &+ \mathcal{O} \left(\Delta t^3 \right) This factorization differs somewhat from that of Tuckerman et al, in that the barostat is only updated at the outermost rRESPA level, diff --git a/doc/src/fix_nve_spin.rst b/doc/src/fix_nve_spin.rst index 6caa7cc8a6..c66d107089 100644 --- a/doc/src/fix_nve_spin.rst +++ b/doc/src/fix_nve_spin.rst @@ -47,7 +47,7 @@ By default a spin-lattice integration is performed (lattice = moving). The *nve/spin* fix applies a Suzuki-Trotter decomposition to the equations of motion of the spin lattice system, following the scheme: -.. image:: Eqs/fix_integration_spin_stdecomposition.jpg +.. image:: JPG/fix_integration_spin_stdecomposition.jpg :align: center according to the implementation reported in :ref:`(Omelyan) `. diff --git a/doc/src/fix_orient.rst b/doc/src/fix_orient.rst index 7100efc4e5..a23b98fbae 100644 --- a/doc/src/fix_orient.rst +++ b/doc/src/fix_orient.rst @@ -58,8 +58,22 @@ accounted for in measuring the grain boundary velocity. The potential energy added to atom I is given by these formulas -.. image:: Eqs/fix_orient_fcc.jpg - :align: center +.. math:: + + \xi_{i} = & \sum_{j=1}^{12} \left| \mathbf{r}_{j} - \mathbf{r}_{j}^{\rm I} \right| \qquad\qquad\left(1\right) \\ + \\ + \xi_{\rm IJ} = & \sum_{j=1}^{12} \left| \mathbf{r}_{j}^{\rm J} - \mathbf{r}_{j}^{\rm I} \right| \qquad\qquad\left(2\right)\\ + \\ + \xi_{\rm low} = & {\rm cutlo} \, \xi_{\rm IJ} \qquad\qquad\qquad\left(3\right)\\ + \xi_{\rm high} = & {\rm cuthi} \, \xi_{\rm IJ} \qquad\qquad\qquad\left(4\right) \\ + \\ + \omega_{i} = & \frac{\pi}{2} \frac{\xi_{i} - \xi_{\rm low}}{\xi_{\rm high} - \xi_{\rm low}} \qquad\qquad\left(5\right)\\ + \\ + u_{i} = & 0 \quad\quad\qquad\qquad\qquad \textrm{ for } \qquad \xi_{i} < \xi_{\rm low}\\ + = & {\rm dE}\,\frac{1 - \cos(2 \omega_{i})}{2} + \qquad \mathrm{ for }\qquad \xi_{\rm low} < \xi_{i} < \xi_{\rm high} \quad \left(6\right) \\ + = & {\rm dE} \quad\qquad\qquad\qquad\textrm{ for } \qquad \xi_{\rm high} < \xi_{i} + which are fully explained in :ref:`(Janssens) `. For fcc crystals this order parameter Xi for atom I in equation (1) is a sum over the diff --git a/doc/src/fix_pimd.rst b/doc/src/fix_pimd.rst index 436b13d9bc..d71c969acf 100644 --- a/doc/src/fix_pimd.rst +++ b/doc/src/fix_pimd.rst @@ -46,8 +46,11 @@ configurations from the canonical ensemble :ref:`(Feynman) `. The classical partition function and its components are given by the following equations: -.. image:: Eqs/fix_pimd.jpg - :align: center +.. math:: + + Z = & \int d{\bf q} d{\bf p} \cdot \textrm{exp} [ -\beta H_{eff} ] \\ + H_{eff} = & \bigg(\sum_{i=1}^P \frac{p_i^2}{2m_i}\bigg) + V_{eff} \\ + V_{eff} = & \sum_{i=1}^P \bigg[ \frac{mP}{2\beta^2 \hbar^2} (q_i - q_{i+1})^2 + \frac{1}{P} V(q_i)\bigg] The interested user is referred to any of the numerous references on this methodology, but briefly, each quantum particle in a path diff --git a/doc/src/fix_rhok.rst b/doc/src/fix_rhok.rst index ba381a37d3..9374f43798 100644 --- a/doc/src/fix_rhok.rst +++ b/doc/src/fix_rhok.rst @@ -29,8 +29,12 @@ Description The fix applies a force to atoms given by the potential -.. image:: Eqs/fix_rhok.jpg - :align: center +.. math:: + + U = & \frac{1}{2} K (|\rho_{\vec{k}}| - a)^2 \\ + \rho_{\vec{k}} = & \sum_j^N \exp(-i\vec{k} \cdot \vec{r}_j )/\sqrt{N} \\ + \vec{k} = & (2\pi n_x /L_x , 2\pi n_y /L_y , 2\pi n_z/L_z ) + as described in :ref:`(Pedersen) `. diff --git a/doc/src/fix_rx.rst b/doc/src/fix_rx.rst index ce40a58524..2f0df1ebd5 100644 --- a/doc/src/fix_rx.rst +++ b/doc/src/fix_rx.rst @@ -46,13 +46,17 @@ defined within the file associated with this command. For a general reaction such that -.. image:: Eqs/fix_rx_reaction.jpg - :align: center +.. math:: + + \nu_{A}A + \nu_{B}B \rightarrow \nu_{C}C + the reaction rate equation is defined to be of the form -.. image:: Eqs/fix_rx_reactionRate.jpg - :align: center +.. math:: + + r = k(T)[A]^{\nu_{A}}[B]^{\nu_{B}} + In the current implementation, the exponents are defined to be equal to the stoichiometric coefficients. A given reaction set consisting @@ -121,12 +125,14 @@ irreversible reaction. After specifying the reaction, the reaction rate constant is determined through the temperature dependent Arrhenius equation: -.. image:: Eqs/fix_rx.jpg - :align: center +.. math:: + + k = AT^{n}e^{\frac{-E_{a}}{k_{B}T}} + where *A* is the Arrhenius factor in time units or concentration/time units, *n* is the unitless exponent of the temperature dependence, and -*E\_a* is the activation energy in energy units. The temperature +:math:`E_a` is the activation energy in energy units. The temperature dependence can be removed by specifying the exponent as zero. The internal temperature of the coarse-grained particles can be used @@ -136,13 +142,17 @@ be specified to compute a local-average particle internal temperature for use in the reaction rate constant expressions. The local-average particle internal temperature is defined as: -.. image:: Eqs/fix_rx_localTemp.jpg - :align: center +.. math:: + + \theta_i^{-1} = \frac{\sum_{j=1}\omega_{Lucy}\left(r_{ij}\right)\theta_j^{-1}}{\sum_{j=1}\omega_{Lucy}\left(r_{ij}\right)} + where the Lucy function is expressed as: -.. image:: Eqs/fix_rx_localTemp2.jpg - :align: center +.. math:: + + \omega_{Lucy}\left(r_{ij}\right) = \left( 1 + \frac{3r_{ij}}{r_c} \right) \left( 1 - \frac{r_{ij}}{r_c} \right)^3 + The self-particle interaction is included in the above equation. diff --git a/doc/src/fix_shake.rst b/doc/src/fix_shake.rst index bca1a55d16..624d5cf455 100644 --- a/doc/src/fix_shake.rst +++ b/doc/src/fix_shake.rst @@ -75,13 +75,18 @@ be the position and velocity of atom *i* at time *n*\ , for *i* =1,...,\ *N*\ , where *N* is the number of sites of our reference molecule. The distance vector between sites *i* and *j* is given by -.. image:: Eqs/fix_rattle_rij.jpg - :align: center +.. math:: + + \mathbf r^{n+1}_{ij} = \mathbf r^n_j - \mathbf r^n_i + The constraints can then be formulated as -.. image:: Eqs/fix_rattle_constraints.jpg - :align: center +.. math:: + + \mathbf r^{n+1}_{ij} \cdot \mathbf r^{n+1}_{ij} &= d^2_{ij} \quad \text{and} \\ + \mathbf v^{n+1}_{ij} \cdot \mathbf r^{n+1}_{ij} &= 0 + The SHAKE algorithm satisfies the first condition, i.e. the sites at time *n+1* will have the desired separations Dij immediately after the diff --git a/doc/src/fix_spring_rg.rst b/doc/src/fix_spring_rg.rst index e1463dc4e3..fd3b09754b 100644 --- a/doc/src/fix_spring_rg.rst +++ b/doc/src/fix_spring_rg.rst @@ -44,15 +44,21 @@ energy of the constraint and associated force on each atom is given by the second and third formulas, when the group is at a different RG than the target value RG0. -.. image:: Eqs/fix_spring_rg.jpg - :align: center +.. math:: -The (xi - center-of-mass) term is computed taking into account -periodic boundary conditions, m\_i is the mass of the atom, and M is -the mass of the entire group. Note that K is thus a force constant + {R_G}^2 & = \frac{1}{M}\sum_{i}^{N}{m_{i}\left( x_{i} - + \frac{1}{M}\sum_{j}^{N}{m_{j}x_{j}} \right)^{2}} \\ + E & = K\left( R_G - R_{G0} \right)^{2} \\ + F_{i} & = 2K\frac{m_{i}}{M}\left( 1-\frac{R_{G0}}{R_G} + \right)\left( x_{i} - \frac{1}{M}\sum_{j}^{N}{m_{j}x_{j}} \right) + + +The (:math:`x_i` - center-of-mass) term is computed taking into account +periodic boundary conditions, :math:`m_i` is the mass of the atom, and +*M* is the mass of the entire group. Note that K is thus a force constant for the aggregate force on the group of atoms, not a per-atom force. -If RG0 is specified as NULL, then the RG of the group is computed at +If :math:`R_{G0}` is specified as NULL, then the RG of the group is computed at the time the fix is specified, and that value is used as the target. **Restart, fix\_modify, output, run start/stop, minimize info:** diff --git a/doc/src/fix_ti_spring.rst b/doc/src/fix_ti_spring.rst index ec4599b519..152e3fbcac 100644 --- a/doc/src/fix_ti_spring.rst +++ b/doc/src/fix_ti_spring.rst @@ -48,8 +48,10 @@ The thermodynamic integration procedure is performed by rescaling the force on each atom. Given an atomic configuration the force (F) on each atom is given by -.. image:: Eqs/fix_ti_spring_force.jpg - :align: center +.. math:: + + F = \left( 1-\lambda \right) F_{\text{solid}} + \lambda F_{\text{harm}} + where F\_solid is the force that acts on an atom due to an interatomic potential (\ *e.g.* EAM potential), F\_harm is the force due to the @@ -87,15 +89,19 @@ The *function* keyword allows the use of two different lambda paths. Option *1* results in a constant rate of change of lambda with time: -.. image:: Eqs/fix_ti_spring_function_1.jpg - :align: center +.. math:: + + \lambda(\tau) = \tau + where tau is the scaled time variable *t/t\_s*. The option *2* performs the lambda switching at a rate defined by the following switching function -.. image:: Eqs/fix_ti_spring_function_2.jpg - :align: center +.. math:: + + \lambda(\tau) = \tau^5 \left( 70 \tau^4 - 315 \tau^3 + 540 \tau^2 - 420 \tau + 126 \right) + This function has zero slope as lambda approaches its extreme values (0 and 1), according to :ref:`de Koning ` this results in diff --git a/doc/src/fix_ttm.rst b/doc/src/fix_ttm.rst index eeafd8bfe0..022afc67b5 100644 --- a/doc/src/fix_ttm.rst +++ b/doc/src/fix_ttm.rst @@ -109,8 +109,12 @@ Energy transport within the electronic subsystem is solved according to the heat diffusion equation with added source terms for heat transfer between the subsystems: -.. image:: Eqs/fix_ttm.jpg - :align: center +.. math:: + + C_e \rho_e \frac{\partial T_e}{\partial t} = + \bigtriangledown (\kappa_e \bigtriangledown T_e) - + g_p (T_e - T_a) + g_s T_a' + where C\_e is the specific heat, rho\_e is the density, kappa\_e is the thermal conductivity, T is temperature, the "e" and "a" subscripts @@ -194,8 +198,12 @@ temperature controlled by another fix - e.g. :doc:`fix nvt ` or Fix ttm/mod uses the heat diffusion equation with possible external heat sources (e.g. laser heating in ablation simulations): -.. image:: Eqs/fix_ttm_mod.jpg - :align: center +.. math:: + + C_e \rho_e \frac{\partial T_e}{\partial t} = + \bigtriangledown (\kappa_e \bigtriangledown T_e) - + g_p (T_e - T_a) + g_s T_a' + \theta (x-x_{surface})I_0 \exp(-x/l_{skin}) + where theta is the Heaviside step function, I\_0 is the (absorbed) laser pulse intensity for ablation simulations, l\_skin is the depth @@ -207,8 +215,10 @@ Fix ttm/mod also allows users to specify the dependencies of C\_e and kappa\_e on the electronic temperature. The specific heat is expressed as -.. image:: Eqs/fix_ttm_ce.jpg - :align: center +.. math:: + + C_e = C_0 + (a_0 + a_1 X + a_2 X^2 + a_3 X^3 + a_4 X^4) \exp (-(AX)^2) + where *X* = T\_e/1000, and the thermal conductivity is defined as kappa\_e = D\_e\*rho\_e\*C\_e, where D\_e is the thermal diffusion @@ -219,8 +229,10 @@ for the blast force acting on ions because of electronic pressure gradient (see :ref:`(Chen) `, :ref:`(Norman) `). The total force acting on an ion is: -.. image:: Eqs/fix_ttm_blast.jpg - :align: center +.. math:: + + {\vec F}_i = - \partial U / \partial {\vec r}_i + {\vec F}_{langevin} - \nabla P_e/n_{ion} + where F\_langevin is a force from Langevin thermostat simulating electron-phonon coupling, and nabla P\_e/n\_ion is the electron blast @@ -242,8 +254,10 @@ initial borders of vacuum can be set in the *init\_file* via *lsurface* and *rsurface* parameters. In this case, electronic pressure gradient is calculated as -.. image:: Eqs/fix_ttm_blast1.jpg - :align: center +.. math:: + + \nabla_x P_e = \left[\frac{C_e{}T_e(x)\lambda}{(x+\lambda)^2} + \frac{x}{x+\lambda}\frac{(C_e{}T_e)_{x+\Delta x}-(C_e{}T_e)_{x}}{\Delta x} \right] + where lambda is the electron mean free path (see :ref:`(Norman) `, :ref:`(Pisarev) `) diff --git a/doc/src/fix_wall.rst b/doc/src/fix_wall.rst index ba37b19205..600c880f20 100644 --- a/doc/src/fix_wall.rst +++ b/doc/src/fix_wall.rst @@ -104,35 +104,58 @@ wall-particle interactions depends on the style. For style *wall/lj93*\ , the energy E is given by the 9/3 potential: -.. image:: Eqs/fix_wall_lj93.jpg - :align: center +.. math:: + + E = \epsilon \left[ \frac{2}{15} \left(\frac{\sigma}{r}\right)^{9} - + \left(\frac{\sigma}{r}\right)^3 \right] + \qquad r < r_c + For style *wall/lj126*\ , the energy E is given by the 12/6 potential: -.. image:: Eqs/pair_lj.jpg - :align: center +.. math:: + + E = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] + \qquad r < r_c + For style *wall/lj1043*\ , the energy E is given by the 10/4/3 potential: -.. image:: Eqs/fix_wall_lj1043.jpg - :align: center +.. math:: + + E = 2 \pi \epsilon \left[ \frac{2}{5} \left(\frac{\sigma}{r}\right)^{10} - + \left(\frac{\sigma}{r}\right)^4 - + \frac{\sqrt(2)\sigma^3}{3\left(r+\left(0.61/\sqrt(2)\right)\sigma\right)^3}\right] + \qquad r < r_c + For style *wall/colloid*\ , the energy E is given by an integrated form of the :doc:`pair_style colloid ` potential: -.. image:: Eqs/fix_wall_colloid.jpg - :align: center +.. math:: + + E = & \epsilon \left[ \frac{\sigma^{6}}{7560} + \left(\frac{6R-D}{D^{7}} + \frac{D+8R}{(D+2R)^{7}} \right) \right. \\ + & \left. - \frac{1}{6} \left(\frac{2R(D+R) + D(D+2R) + \left[ \ln D - \ln (D+2R) \right]}{D(D+2R)} \right) \right] \qquad r < r_c + For style *wall/harmonic*\ , the energy E is given by a harmonic spring potential: -.. image:: Eqs/fix_wall_harmonic.jpg - :align: center +.. math:: + + E = \epsilon \quad (r - r_c)^2 \qquad r < r_c + For style *wall/morse*\ , the energy E is given by a Morse potential: -.. image:: Eqs/pair_morse.jpg - :align: center +.. math:: + + E = D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] + \qquad r < r_c + In all cases, *r* is the distance from the particle to the wall at position *coord*\ , and Rc is the *cutoff* distance at which the diff --git a/doc/src/fix_wall_ees.rst b/doc/src/fix_wall_ees.rst index 6374109cc6..334228d85b 100644 --- a/doc/src/fix_wall_ees.rst +++ b/doc/src/fix_wall_ees.rst @@ -65,15 +65,16 @@ group by generating a force on the atom in a direction perpendicular to the wall and a torque parallel with the wall. The energy of wall-particle interactions E is given by: -.. image:: Eqs/fix_wall_ees.jpg - :align: center +.. math:: + + E = \epsilon \left[ \frac{2 \sigma_{LJ}^{12} \left(7 r^5+14 r^3 \sigma_{n}^2+3 r \sigma_{n}^4\right) }{945 \left(r^2-\sigma_{n}^2\right)^7} -\frac{ \sigma_{LJ}^6 \left(2 r \sigma_{n}^3+\sigma_{n}^2 \left(r^2-\sigma_{n}^2\right)\log{ \left[\frac{r-\sigma_{n}}{r+\sigma_{n}}\right]}\right) }{12 \sigma_{n}^5 \left(r^2-\sigma_{n}^2\right)} \right]\qquad \sigma_n < r < r_c + Introduced by Babadi and Ejtehadi in :ref:`(Babadi) `. Here, *r* is the distance from the particle to the wall at position *coord*\ , and Rc is the *cutoff* distance at which the particle and wall no -longer interact. Also, sigma\_n is the distance between center of -ellipsoid and the nearest point of its surface to the wall. The energy -of the wall is: +longer interact. Also, :math:`\sigma_n` is the distance between center of +ellipsoid and the nearest point of its surface to the wall as shown below. .. image:: JPG/fix_wall_ees_image.jpg :align: center @@ -82,24 +83,30 @@ Details of using this command and specifications are the same as fix/wall command. You can also find an example in USER/ees/ under examples/ directory. -The prefactor *epsilon* can be thought of as an +The prefactor :math:`\epsilon` can be thought of as an effective Hamaker constant with energy units for the strength of the -ellipsoid-wall interaction. More specifically, the *epsilon* pre-factor -= 8 \* pi\^2 \* rho\_wall \* rho\_ellipsoid \* epsilon -\* sigma\_a \* sigma\_b \* sigma\_c, where epsilon is the LJ parameters for -the constituent LJ particles and sigma\_a, sigma\_b, and sigma\_c are radii -of ellipsoidal particles. Rho\_wall and rho\_ellipsoid are the number -density of the constituent particles, in the wall and ellipsoid -respectively, in units of 1/volume. +ellipsoid-wall interaction. More specifically, the :math:`\epsilon` +pre-factor is + +.. math:: + + 8 \pi^2 \quad \rho_{wall} \quad \rho_{ellipsoid} \quad \epsilon \quad \sigma_a \quad \sigma_b \quad \sigma_c + + +where :math:`\epsilon` is the LJ energy parameter for the constituent LJ +particles and :math:`\sigma_a`, :math:`\sigma_b`, and :math:`\sigma_c` +are the radii of the ellipsoidal particles. :math:`\rho_{wall}` and +:math:`\rho_{ellipsoid}` are the number density of the constituent +particles, in the wall and ellipsoid respectively, in units of 1/volume. .. note:: - You must insure that r is always bigger than sigma\_n for + You must insure that r is always bigger than :math:`\sigma_n` for all particles in the group, or LAMMPS will generate an error. This means you cannot start your simulation with particles touching the wall - position *coord* (r = sigma\_n) or with particles penetrating the wall - (0 =< r < sigma\_n) or with particles on the wrong side of the - wall (r < 0). + position *coord* (:math:`r = \sigma_n`) or with particles penetrating + the wall (:math:`0 =< r < \sigma_n`) or with particles on the wrong + side of the wall (:math:`r < 0`). Fix *wall/region/ees* treats the surface of the geometric region defined by the *region-ID* as a bounding wall which interacts with nearby diff --git a/doc/src/fix_wall_region.rst b/doc/src/fix_wall_region.rst index 162b9d6994..a6f719e142 100644 --- a/doc/src/fix_wall_region.rst +++ b/doc/src/fix_wall_region.rst @@ -132,38 +132,62 @@ style. For style *lj93*\ , the energy E is given by the 9/3 potential: -.. image:: Eqs/fix_wall_lj93.jpg - :align: center +.. math:: + + E = \epsilon \left[ \frac{2}{15} \left(\frac{\sigma}{r}\right)^{9} - + \left(\frac{\sigma}{r}\right)^3 \right] + \qquad r < r_c + For style *lj126*\ , the energy E is given by the 12/6 potential: -.. image:: Eqs/pair_lj.jpg - :align: center +.. math:: + + E = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] + \qquad r < r_c + For style *wall/lj1043*\ , the energy E is given by the 10/4/3 potential: -.. image:: Eqs/fix_wall_lj1043.jpg - :align: center +.. math:: + + E = 2 \pi \epsilon \left[ \frac{2}{5} \left(\frac{\sigma}{r}\right)^{10} - + \left(\frac{\sigma}{r}\right)^4 - + \frac{\sqrt(2)\sigma^3}{3\left(r+\left(0.61/\sqrt(2)\right)\sigma\right)^3}\right] + \qquad r < r_c + For style *colloid*\ , the energy E is given by an integrated form of the :doc:`pair_style colloid ` potential: -.. image:: Eqs/fix_wall_colloid.jpg - :align: center +.. math:: + + E = & \epsilon \left[ \frac{\sigma^{6}}{7560} + \left(\frac{6R-D}{D^{7}} + \frac{D+8R}{(D+2R)^{7}} \right) \right. \\ + & \left. - \frac{1}{6} \left(\frac{2R(D+R) + D(D+2R) + \left[ \ln D - \ln (D+2R) \right]}{D(D+2R)} \right) \right] \qquad r < r_c + For style *wall/harmonic*\ , the energy E is given by a harmonic spring potential (the distance parameter is ignored): -.. image:: Eqs/fix_wall_harmonic.jpg - :align: center +.. math:: + + E = \epsilon \quad (r - r_c)^2 \qquad r < r_c + For style *wall/morse*\ , the energy E is given by the Morse potential: -.. image:: Eqs/pair_morse.jpg - :align: center +.. math:: -Unlike other styles, this requires three parameters (*D\_0*, *alpha*\ , *r\_0* -in this order) instead of two like for the other wall styles. + E = D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] + \qquad r < r_c + + +Unlike other styles, this requires three parameters (:math:`D_0`, +:math:`\alpha`, and :math:`r_0` in this order) instead of two like +for the other wall styles. In all cases, *r* is the distance from the particle to the region surface, and Rc is the *cutoff* distance at which the particle and diff --git a/doc/src/min_style.rst b/doc/src/min_style.rst index 5de407b6a9..dffacab8a5 100644 --- a/doc/src/min_style.rst +++ b/doc/src/min_style.rst @@ -65,21 +65,21 @@ Style *fire* is a damped dynamics method described in :ref:`(Bitzek) and alters the projection operation to maintain components of the velocity non-parallel to the current force vector. The velocity of each atom is initialized to 0.0 by this style, at the beginning of a -minimization. This style correspond to an optimized version described +minimization. This style correspond to an optimized version described in :ref:`(Guenole) ` that include different time integration -schemes and defaults parameters. The default parameters can be +schemes and defaults parameters. The default parameters can be modified with the command :doc:`min_modify `. -Style *fire/old* is the original implementation of *fire* in Lammps, -conserved for backward compatibility. The main differences regarding +Style *fire/old* is the original implementation of *fire* in Lammps, +conserved for backward compatibility. The main differences regarding the current version *fire* are: time integration by Explicit Euler only, different sequence in maintaining velocity components non-parallel to the current force vector and hard-coded minimization parameters. -A complete description of the differences between *fire/old* and *fire* -can be found in :ref:`(Guenole) ` (where the current *fire* -in lammps is named *fire2.0*). By using an appropriate set of -parameters, *fire* can behave similarly than *fire/old*, as described +A complete description of the differences between *fire/old* and *fire* +can be found in :ref:`(Guenole) ` (where the current *fire* +in LAMMPS is called *fire2.0*). By using an appropriate set of +parameters, *fire* can behave similar to *fire/old*, as described in the :doc:`min_modify ` command. Style *spin* is a damped spin dynamics with an adaptive timestep. diff --git a/doc/src/pair_adp.rst b/doc/src/pair_adp.rst index 69051f545e..43a94933ad 100644 --- a/doc/src/pair_adp.rst +++ b/doc/src/pair_adp.rst @@ -1,16 +1,16 @@ -.. index:: pair\_style adp +.. index:: pair_style adp -pair\_style adp command -======================= +pair_style adp command +====================== -pair\_style adp/omp command -=========================== +pair_style adp/omp command +========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style adp @@ -18,11 +18,11 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style adp - pair_coeff \* \* Ta.adp Ta - pair_coeff \* \* ../potentials/AlCu.adp Al Al Cu + pair_coeff * * Ta.adp Ta + pair_coeff * * ../potentials/AlCu.adp Al Al Cu Description """"""""""" @@ -32,15 +32,21 @@ using the angular dependent potential (ADP) of :ref:`(Mishin) `, which is a generalization of the :doc:`embedded atom method (EAM) potential `. The LAMMPS implementation is discussed in :ref:`(Singh) `. The total energy Ei of an atom I is given by -.. image:: Eqs/pair_adp.jpg - :align: center +.. math:: -where F is the embedding energy which is a function of the atomic -electron density rho, phi is a pair potential interaction, alpha and -beta are the element types of atoms I and J, and s and t = 1,2,3 and -refer to the cartesian coordinates. The mu and lambda terms represent -the dipole and quadruple distortions of the local atomic environment -which extend the original EAM framework by introducing angular forces. + E_i & = F_\alpha \left( \sum_{j\neq i} \rho_\beta (r_{ij}) \right) + \frac{1}{2} \sum_{j\neq i}\phi_{\alpha\beta}(r_{ij})+ \frac{1}{2} \sum_s (\mu_i^s)^2 + \frac{1}{2} \sum_{s,t} (\lambda_i^{st})^2 - \frac{1}{6} \nu_i^2 \\ + \mu_i^s & = \sum_{j\neq i}u_{\alpha\beta}(r_{ij})r_{ij}^s\\ + \lambda_i^{st} & = \sum_{j\neq i}w_{\alpha\beta}(r_{ij})r_{ij}^sr_{ij}^t\\ + \nu_i & = \sum_s\lambda_i^{ss} + + +where :math:`F` is the embedding energy which is a function of the atomic +electron density :math:`\rho`, :math:`\phi` is a pair potential interaction, +:math:`\alpha` and :math:`\beta` are the element types of atoms :math:`I` and +:math:`J`, and :math:`s` and :math:`t = 1,2,3` and refer to the cartesian +coordinates. The :math:`\mu` and :math:`\lambda` terms represent the dipole +and quadruple distortions of the local atomic environment which extend the +original EAM framework by introducing angular forces. Note that unlike for other potentials, cutoffs for ADP potentials are not set in the pair\_style or pair\_coeff command; they are specified in @@ -61,12 +67,12 @@ command to specify them. Only a single pair\_coeff command is used with the *adp* style which specifies an extended DYNAMO *setfl* file, which contains information -for M elements. These are mapped to LAMMPS atom types by specifying N +for :math:`M` elements. These are mapped to LAMMPS atom types by specifying :math:`N` additional arguments after the filename in the pair\_coeff command, -where N is the number of LAMMPS atom types: +where :math:`N` is the number of LAMMPS atom types: * filename -* N element names = mapping of extended *setfl* elements to atom types +* :math:`N` element names = mapping of extended *setfl* elements to atom types See the :doc:`pair_coeff ` doc page for alternate ways to specify the path for the potential file. @@ -79,9 +85,9 @@ and you want the 1st 3 to be Al, and the 4th to be Cu, you would use the following pair\_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* AlCu.adp Al Al Al Cu + pair_coeff * * AlCu.adp Al Al Al Cu The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three Al arguments map LAMMPS atom types 1,2,3 to the Al @@ -103,29 +109,33 @@ the tabulated pair potentials. See the :doc:`pair_eam ` command for further details on the *setfl* format. * lines 1,2,3 = comments (ignored) -* line 4: Nelements Element1 Element2 ... ElementN -* line 5: Nrho, drho, Nr, dr, cutoff +* line 4: :math:`N_{\text{elements}}` Element1 Element2 ... ElementN +* line 5: :math:`N_\rho`, :math:`d_\rho`, :math:`N_r`, :math:`d_r`, cutoff -Following the 5 header lines are Nelements sections, one for each +Following the 5 header lines are :math:`N_{\text{elements}}` sections, one for each element, each with the following format: * line 1 = atomic number, mass, lattice constant, lattice type (e.g. FCC) -* embedding function F(rho) (Nrho values) -* density function rho(r) (Nr values) +* embedding function :math:`F(\rho)` (:math:`N_\rho` values) +* density function :math:`\rho(r)` (:math:`N_r` values) -Following the Nelements sections, Nr values for each pair potential -phi(r) array are listed for all i,j element pairs in the same format -as other arrays. Since these interactions are symmetric (i,j = j,i) -only phi arrays with i >= j are listed, in the following order: i,j = -(1,1), (2,1), (2,2), (3,1), (3,2), (3,3), (4,1), ..., (Nelements, -Nelements). The tabulated values for each phi function are listed as -r\*phi (in units of eV-Angstroms), since they are for atom pairs, the +Following the :math:`N_{\text{elements}}` sections, :math:`N_r` values for each pair potential +:math:`\phi(r)` array are listed for all :math:`i,j` element pairs in the same format +as other arrays. Since these interactions are symmetric (:math:`i,j = j,i`) +only :math:`\phi` arrays with :math:`i \geq j` are listed, in the following order: + +.. math:: + + i,j = (1,1), (2,1), (2,2), (3,1), (3,2), (3,3), (4,1), ..., (N_{\text{elements}},N_{\text{elements}}). + +The tabulated values for each :math:`\phi` function are listed as +:math:`r*\phi` (in units of eV-Angstroms), since they are for atom pairs, the same as for :doc:`other EAM files `. -After the phi(r) arrays, each of the u(r) arrays are listed in the +After the :math:`\phi(r)` arrays, each of the :math:`u(r)` arrays are listed in the same order with the same assumptions of symmetry. Directly following -the u(r), the w(r) arrays are listed. Note that phi(r) is the only -array tabulated with a scaling by r. +the :math:`u(r)`, the :math:`w(r)` arrays are listed. Note that :math:`\phi(r)` is the only +array tabulated with a scaling by :math:`r`. ---------- diff --git a/doc/src/pair_agni.rst b/doc/src/pair_agni.rst index fc2b47b63d..bb7408f363 100644 --- a/doc/src/pair_agni.rst +++ b/doc/src/pair_agni.rst @@ -1,23 +1,26 @@ -.. index:: pair\_style agni +.. index:: pair_style agni -pair\_style agni command +pair_style agni command ======================== -pair\_style agni/omp command +pair_style agni/omp command ============================ Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style agni Examples """""""" -pair\_style agni -pair\_coeff \* \* Al.agni Al + +.. code-block:: LAMMPS + + pair_style agni + pair_coeff * * Al.agni Al Description """"""""""" @@ -25,14 +28,19 @@ Description Style *agni* style computes the many-body vectorial force components for an atom as -.. image:: Eqs/pair_agni.jpg - :align: center +.. math:: -*u* labels the individual components, i.e. x, y or z, and *V* is the -corresponding atomic fingerprint. *d* is the Euclidean distance between -any two atomic fingerprints. A total of N\_t reference atomic -environments are considered to construct the force field file. *alpha\_t* -and *l* are the weight coefficients and length scale parameter of the + F_i^u & = \sum_t^{N_t}\alpha_t \cdot \exp\left[-\frac{\left(d_{i,t}^u\right)^2}{2l^2}\right] \\ + d_{i,t}^u & = \left|\left| V_i^u(\eta) - V_t^u(\eta) \right|\right| \\ + V_i^u(\eta) & = \sum_{j \neq i}\frac{r^u_{ij}}{r_{ij}} \cdot e^{-\left(\frac{r_{ij}}{\eta} \right)^2} \cdot f_d\left(r_{ij}\right) \\ + f_d\left(r_{ij}\right) & = \frac{1}{2} \left[\cos\left(\frac{\pi r_{ij}}{R_c}\right) + 1 \right] + + +:math:`u` labels the individual components, i.e. :math:`x`, :math:`y` or :math:`z`, and :math:`V` is the +corresponding atomic fingerprint. :math:`d` is the Euclidean distance between +any two atomic fingerprints. A total of :math:`N_t` reference atomic +environments are considered to construct the force field file. :math:`\alpha_t` +and :math:`l` are the weight coefficients and length scale parameter of the non-linear regression model. The method implements the recently proposed machine learning access to @@ -45,11 +53,11 @@ vectorial atomic forces. Only a single pair\_coeff command is used with the *agni* style which specifies an AGNI potential file containing the parameters of the force field for the needed elements. These are mapped to LAMMPS atom -types by specifying N additional arguments after the filename in the -pair\_coeff command, where N is the number of LAMMPS atom types: +types by specifying :math:`N` additional arguments after the filename in the +pair\_coeff command, where :math:`N` is the number of LAMMPS atom types: * filename -* N element names = mapping of AGNI elements to atom types +* :math:`N` element names = mapping of AGNI elements to atom types See the :doc:`pair_coeff ` doc page for alternate ways to specify the path for the force field file. diff --git a/doc/src/pair_airebo.rst b/doc/src/pair_airebo.rst index 0cd2a79fe8..e2ef285f91 100644 --- a/doc/src/pair_airebo.rst +++ b/doc/src/pair_airebo.rst @@ -1,61 +1,61 @@ -.. index:: pair\_style airebo +.. index:: pair_style airebo -pair\_style airebo command -========================== +pair_style airebo command +========================= -pair\_style airebo/intel command -================================ +pair_style airebo/intel command +=============================== -pair\_style airebo/omp command -============================== +pair_style airebo/omp command +============================= -pair\_style airebo/morse command -================================ +pair_style airebo/morse command +=============================== -pair\_style airebo/morse/intel command -====================================== +pair_style airebo/morse/intel command +===================================== -pair\_style airebo/morse/omp command -==================================== +pair_style airebo/morse/omp command +=================================== -pair\_style rebo command -======================== +pair_style rebo command +======================= -pair\_style rebo/intel command -============================== +pair_style rebo/intel command +============================= -pair\_style rebo/omp command -============================ +pair_style rebo/omp command +=========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style style cutoff LJ_flag TORSION_flag cutoff_min * style = *airebo* or *airebo/morse* or *rebo* -* cutoff = LJ or Morse cutoff (sigma scale factor) (AIREBO and AIREBO-M only) +* cutoff = LJ or Morse cutoff (:math:`\sigma` scale factor) (AIREBO and AIREBO-M only) * LJ\_flag = 0/1 to turn off/on the LJ or Morse term (AIREBO and AIREBO-M only, optional) * TORSION\_flag = 0/1 to turn off/on the torsion term (AIREBO and AIREBO-M only, optional) -* cutoff\_min = Start of the transition region of cutoff (sigma scale factor) (AIREBO and AIREBO-M only, optional) +* cutoff\_min = Start of the transition region of cutoff (:math:`\sigma` scale factor) (AIREBO and AIREBO-M only, optional) Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style airebo 3.0 pair_style airebo 2.5 1 0 - pair_coeff \* \* ../potentials/CH.airebo H C + pair_coeff * * ../potentials/CH.airebo H C pair_style airebo/morse 3.0 - pair_coeff \* \* ../potentials/CH.airebo-m H C + pair_coeff * * ../potentials/CH.airebo-m H C pair_style rebo - pair_coeff \* \* ../potentials/CH.rebo H C + pair_coeff * * ../potentials/CH.rebo H C Description """"""""""" @@ -82,8 +82,11 @@ with a few slightly different parameters The AIREBO potential consists of three terms: -.. image:: Eqs/pair_airebo.jpg - :align: center +.. math:: + + E & = \frac{1}{2} \sum_i \sum_{j \neq i} + \left[ E^{\text{REBO}}_{ij} + E^{\text{LJ}}_{ij} + + \sum_{k \neq i,j} \sum_{l \neq i,j,k} E^{\text{TORSION}}_{kijl} \right] \\ By default, all three terms are included. For the *airebo* style, if the first two optional flag arguments to the pair\_style command are @@ -91,73 +94,73 @@ included, the LJ and torsional terms can be turned off. Note that both or neither of the flags must be included. If both of the LJ an torsional terms are turned off, it becomes the 2nd-generation REBO potential, with a small caveat on the spline fitting procedure -mentioned below. This can be specified directly as pair\_style *rebo* +mentioned below. This can be specified directly as pair_style *rebo* with no additional arguments. The detailed formulas for this potential are given in :ref:`(Stuart) `; here we provide only a brief description. -The E\_REBO term has the same functional form as the hydrocarbon REBO +The :math:`E^{\text{REBO}}` term has the same functional form as the hydrocarbon REBO potential developed in :ref:`(Brenner) `. The coefficients for -E\_REBO in AIREBO are essentially the same as Brenner's potential, but +:math:`E^{\text{REBO}}` in AIREBO are essentially the same as Brenner's potential, but a few fitted spline values are slightly different. For most cases the -E\_REBO term in AIREBO will produce the same energies, forces and +:math:`E^{\text{REBO}}` term in AIREBO will produce the same energies, forces and statistical averages as the original REBO potential from which it was -derived. The E\_REBO term in the AIREBO potential gives the model its +derived. The :math:`E^{\text{REBO}}` term in the AIREBO potential gives the model its reactive capabilities and only describes short-ranged C-C, C-H and H-H -interactions (r < 2 Angstroms). These interactions have strong +interactions (:math:`r < 2` Angstroms). These interactions have strong coordination-dependence through a bond order parameter, which adjusts the attraction between the I,J atoms based on the position of other nearby atoms and thus has 3- and 4-body dependence. -The E\_LJ term adds longer-ranged interactions (2 < r < cutoff) using a +The :math:`E^{\text{LJ}}` term adds longer-ranged interactions (:math:`2 < r < \text{cutoff}`) using a form similar to the standard :doc:`Lennard Jones potential `. -The E\_LJ term in AIREBO contains a series of switching functions so -that the short-ranged LJ repulsion (1/r\^12) does not interfere with -the energetics captured by the E\_REBO term. The extent of the E\_LJ -interactions is determined by the *cutoff* argument to the pair\_style +The :math:`E^{\text{LJ}}` term in AIREBO contains a series of switching functions so +that the short-ranged LJ repulsion (:math:`1/r^{12}`) does not interfere with +the energetics captured by the :math:`E^{\text{REBO}}` term. The extent of the :math:`E^{\text{LJ}}` +interactions is determined by the *cutoff* argument to the pair_style command which is a scale factor. For each type pair (C-C, C-H, H-H) the cutoff is obtained by multiplying the scale factor by the sigma value defined in the potential file for that type pair. In the -standard AIREBO potential, sigma\_CC = 3.4 Angstroms, so with a scale -factor of 3.0 (the argument in pair\_style), the resulting E\_LJ cutoff +standard AIREBO potential, :math:`\sigma_{CC} = 3.4` Angstroms, so with a scale +factor of 3.0 (the argument in pair_style), the resulting :math:`E^{\text{LJ}}` cutoff would be 10.2 Angstroms. By default, the longer-ranged interaction is smoothly switched off -between 2.16 and 3.0 sigma. By specifying *cutoff\_min* in addition +between 2.16 and 3.0 :math:`\sigma`. By specifying *cutoff\_min* in addition to *cutoff*\ , the switching can be configured to take place between *cutoff\_min* and *cutoff*\ . *cutoff\_min* can only be specified if all optional arguments are given. -The E\_TORSION term is an explicit 4-body potential that describes +The :math:`E^{\text{TORSION}}` term is an explicit 4-body potential that describes various dihedral angle preferences in hydrocarbon configurations. ---------- -Only a single pair\_coeff command is used with the *airebo*\ , *airebo* +Only a single pair_coeff command is used with the *airebo*\ , *airebo* or *rebo* style which specifies an AIREBO, REBO, or AIREBO-M potential file with parameters for C and H. Note that as of LAMMPS version 15 May 2019 the *rebo* style in LAMMPS uses its own potential file (CH.rebo). These are mapped to LAMMPS atom types by specifying -N additional arguments after the filename in the pair\_coeff command, +N additional arguments after the filename in the pair_coeff command, where N is the number of LAMMPS atom types: * filename -* N element names = mapping of AIREBO elements to atom types +* :math:`N` element names = mapping of AIREBO elements to atom types See the :doc:`pair_coeff ` doc page for alternate ways to specify the path for the potential file. As an example, if your LAMMPS simulation has 4 atom types and you want the 1st 3 to be C, and the 4th to be H, you would use the following -pair\_coeff command: +pair_coeff command: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* CH.airebo C C C H + pair_coeff * * CH.airebo C C C H The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. The first three C arguments map LAMMPS atom types 1,2,3 to the C @@ -178,21 +181,21 @@ listed in the CH.airebo-m file to agree with the :ref:`(O'Connor) ` paper. Thus the parameters are specific to this potential and the way it was fit, so modifying the file should be done cautiously. The AIREBO-M Morse potentials were parameterized using a cutoff of -3.0 (sigma). Modifying this cutoff may impact simulation accuracy. +3.0 (:math:`\sigma`). Modifying this cutoff may impact simulation accuracy. This pair style tallies a breakdown of the total AIREBO potential energy into sub-categories, which can be accessed via the :doc:`compute pair ` command as a vector of values of length 3. The 3 values correspond to the following sub-categories: -1. *E\_REBO* = REBO energy -2. *E\_LJ* = Lennard-Jones energy -3. *E\_TORSION* = Torsion energy +1. :math:`E_{\text{REBO}}` = REBO energy +2. :math:`E_{\text{LJ}}` = Lennard-Jones energy +3. :math:`E_{\text{TORSION}}` = Torsion energy To print these quantities to the log file (with descriptive column headings) the following commands could be included in an input script: -.. parsed-literal:: +.. code-block:: LAMMPS compute 0 all pair airebo variable REBO equal c_0[1] @@ -232,12 +235,12 @@ These pair styles do not support the :doc:`pair_modify ` mix, shift, table, and tail options. These pair styles do not write their information to :doc:`binary restart files `, since it is stored in potential files. Thus, you -need to re-specify the pair\_style and pair\_coeff commands in an input +need to re-specify the pair_style and pair_coeff commands in an input script that reads a restart file. These pair styles can only be used via the *pair* keyword of the :doc:`run_style respa ` command. They do not support the -*inner*\ , *middle*\ , *outer* keywords. +*inner* , *middle*, *outer* keywords. Restrictions """""""""""" diff --git a/doc/src/pair_atm.rst b/doc/src/pair_atm.rst index 6118b0943f..c8c4edeb54 100644 --- a/doc/src/pair_atm.rst +++ b/doc/src/pair_atm.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style atm +.. index:: pair_style atm -pair\_style atm command -======================= +pair_style atm command +====================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style atm cutoff cutoff_triple @@ -18,13 +18,13 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style atm 4.5 2.5 - pair_coeff \* \* \* 0.072 + pair_coeff * * * 0.072 pair_style hybrid/overlay lj/cut 6.5 atm 4.5 2.5 - pair_coeff \* \* lj/cut 1.0 1.0 + pair_coeff * * lj/cut 1.0 1.0 pair_coeff 1 1 atm 1 0.064 pair_coeff 1 1 atm 2 0.080 pair_coeff 1 2 atm 2 0.100 @@ -36,91 +36,95 @@ Description The *atm* style computes a 3-body :ref:`Axilrod-Teller-Muto ` potential for the energy E of a system of atoms as -.. image:: Eqs/pair_atm.jpg - :align: center +.. math:: -where nu is the three-body interaction strength. The distances -between pairs of atoms r12, r23, r31 and the angles gamma1, gamma2, -gamma3 are as shown in this diagram: + E & = \nu\frac{1+3\cos\gamma_1\cos\gamma_2\cos\gamma_3}{r_{12}^3r_{23}^3r_{31}^3} \\ + + +where :math:`\nu` is the three-body interaction strength. The distances +between pairs of atoms :math:`r_{12}`, :math:`r_{23}`, :math:`r_{31}` and the angles :math:`\gamma_1`, :math:`\gamma_2`, +:math:`\gamma_3` are as shown in this diagram: .. image:: JPG/pair_atm_dia.jpg :align: center -Note that for the interaction between a triplet of atoms I,J,K, there +Note that for the interaction between a triplet of atoms :math:`I,J,K`, there is no "central" atom. The interaction is symmetric with respect to -permutation of the three atoms. Thus the nu value is -the same for all those permutations of the atom types of I,J,K +permutation of the three atoms. Thus the :math:`\nu` value is +the same for all those permutations of the atom types of :math:`I,J,K` and needs to be specified only once, as discussed below. The *atm* potential is typically used in combination with a two-body potential using the :doc:`pair_style hybrid/overlay ` command as in the example above. -The potential for a triplet of atom is calculated only if all 3 -distances r12, r23, r31 between the 3 atoms satisfy rIJ < cutoff. -In addition, the product of the 3 distances r12\*r23\*r31 < -cutoff\_triple\^3 is required, which excludes from calculation the -triplets with small contribution to the interaction. +The potential for a triplet of atom is calculated only if all 3 distances +:math:`r_{12}`, :math:`r_{23}`, :math:`r_{31}` between the 3 atoms satisfy +:math:`r_{IJ} < \text{cutoff}`. In addition, the product of the 3 distances +:math:`r_{12} r_{23} r_{31}` < cutoff_triple :math:`^3` is required, which +excludes from calculation the triplets with small contribution to the +interaction. The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples above, or in the restart files read by the :doc:`read_restart ` commands: -* K = atom type of the third atom (1 to Ntypes) -* nu = prefactor (energy/distance\^9 units) +* :math:`K` = atom type of the third atom (1 to :math:`N_{\text{types}}`) +* :math:`\nu` = prefactor (energy/distance\^9 units) -K can be specified in one of two ways. An explicit numeric value can -be used, as in the 2nd example above. J <= K is required. LAMMPS -sets the coefficients for the other 5 symmetric interactions to the -same values. E.g. if I = 1, J = 2, K = 3, then these 6 values are set -to the specified nu: nu123, nu132, nu213, nu231, nu312, nu321. This -enforces the symmetry discussed above. +:math:`K` can be specified in one of two ways. An explicit numeric value can +be used, as in the 2nd example above. :math:`J \leq K` is required. LAMMPS +sets the coefficients for the other 5 symmetric interactions to the same +values. E.g. if :math:`I = 1`, :math:`J = 2`, :math:`K = 3`, then these 6 +values are set to the specified :math:`\nu`: :math:`\nu_{123}`, +:math:`\nu_{132}`, :math:`\nu_{213}`, :math:`\nu_{231}`, :math:`\nu_{312}`, +:math:`\nu_{321}`. This enforces the symmetry discussed above. A wildcard asterisk can be used for K to set the coefficients for multiple triplets of atom types. This takes the form "\*" or "\*n" or -"n\*" or "m\*n". If N = the number of atom types, then an asterisk with -no numeric values means all types from 1 to N. A leading asterisk -means all types from 1 to n (inclusive). A trailing asterisk means -all types from n to N (inclusive). A middle asterisk means all types -from m to n (inclusive). Note that only type triplets with J <= K are -considered; if asterisks imply type triplets where K < J, they are +"n\*" or "m\*n". If :math:`N` equals the number of atom types, then an asterisk with +no numeric values means all types from 1 to :math:`N`. A leading asterisk +means all types from 1 to :math:`n` (inclusive). A trailing asterisk means +all types from :math:`n` to :math:`N` (inclusive). A middle asterisk means all types +from :math:`m` to :math:`n` (inclusive). Note that only type triplets with :math:`J \leq K` are +considered; if asterisks imply type triplets where :math:`K < J`, they are ignored. -Note that a pair\_coeff command can override a previous setting for the -same I,J,K triplet. For example, these commands set nu for all I,J.K -triplets, then overwrite nu for just the I,J,K = 2,3,4 triplet: +Note that a pair_coeff command can override a previous setting for the +same :math:`I,J,K` triplet. For example, these commands set :math:`\nu` for all :math:`I,J.K` +triplets, then overwrite nu for just the :math:`I,J,K = 2,3,4` triplet: -.. parsed-literal:: +.. code-block:: LAMMPS - pair_coeff \* \* \* 0.25 + pair_coeff * * * 0.25 pair_coeff 2 3 4 0.1 Note that for a simulation with a single atom type, only a single entry is required, e.g. -.. parsed-literal:: +.. code-block:: LAMMPS pair_coeff 1 1 1 0.25 -For a simulation with two atom types, four pair\_coeff commands will +For a simulation with two atom types, four pair_coeff commands will specify all possible nu values: -.. parsed-literal:: +.. code-block:: LAMMPS pair_coeff 1 1 1 nu1 pair_coeff 1 1 2 nu2 pair_coeff 1 2 2 nu3 pair_coeff 2 2 2 nu4 -For a simulation with three atom types, ten pair\_coeff commands will +For a simulation with three atom types, ten pair_coeff commands will specify all possible nu values: -.. parsed-literal:: +.. code-block:: LAMMPS pair_coeff 1 1 1 nu1 pair_coeff 1 1 2 nu2 @@ -133,12 +137,12 @@ specify all possible nu values: pair_coeff 2 3 3 nu9 pair_coeff 3 3 3 nu10 -By default the nu value for all triplets is set to 0.0. Thus it is -not required to provide pair\_coeff commands that enumerate triplet -interactions for all K types. If some I,J,K combination is not +By default the :math:`\nu` value for all triplets is set to 0.0. Thus it is +not required to provide pair_coeff commands that enumerate triplet +interactions for all :math:`K` types. If some :math:`I,J,K` combination is not specified, then there will be no 3-body ATM interactions for that combination and all its permutations. However, as with all pair -styles, it is required to specify a pair\_coeff command for all I,J +styles, it is required to specify a pair_coeff command for all :math:`I,J` combinations, else an error will result. @@ -150,16 +154,16 @@ combinations, else an error will result. This pair styles do not support the :doc:`pair_modify ` mix, shift, table, and tail options. -This pair style writes its information to :doc:`binary restart files `, so pair\_style and pair\_coeff commands do not need -to be specified in an input script that reads a restart file. -However, if the *atm* potential is used in combination with other -potentials using the :doc:`pair_style hybrid/overlay ` -command then pair\_coeff commands need to be re-specified -in the restart input script. +This pair style writes its information to :doc:`binary restart files +`, so pair_style and pair_coeff commands do not need to be specified +in an input script that reads a restart file. However, if the *atm* potential +is used in combination with other potentials using the :doc:`pair_style +hybrid/overlay ` command then pair_coeff commands need to be +re-specified in the restart input script. This pair style can only be used via the *pair* keyword of the :doc:`run_style respa ` command. It does not support the -*inner*\ , *middle*\ , *outer* keywords. +*inner* , *middle* , *outer* keywords. ---------- diff --git a/doc/src/pair_beck.rst b/doc/src/pair_beck.rst index 6a407e11a9..88abfe9798 100644 --- a/doc/src/pair_beck.rst +++ b/doc/src/pair_beck.rst @@ -1,19 +1,19 @@ -.. index:: pair\_style beck +.. index:: pair_style beck -pair\_style beck command -======================== +pair_style beck command +======================= -pair\_style beck/gpu command -============================ +pair_style beck/gpu command +=========================== -pair\_style beck/omp command -============================ +pair_style beck/omp command +=========================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style beck Rc @@ -23,10 +23,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style beck 8.0 - pair_coeff \* \* 399.671876712 0.0000867636112694 0.675 4.390 0.0003746 + pair_coeff * * 399.671876712 0.0000867636112694 0.675 4.390 0.0003746 pair_coeff 1 1 399.671876712 0.0000867636112694 0.675 4.390 0.0003746 6.0 Description @@ -36,8 +36,10 @@ Style *beck* computes interactions based on the potential by :ref:`(Beck) `, originally designed for simulation of Helium. It includes truncation at a cutoff distance Rc. -.. image:: Eqs/pair_beck.jpg - :align: center +.. math:: + + E(r) &= A \exp\left[-\alpha r - \beta r^6\right] - \frac{B}{\left(r^2+a^2\right)^3} \left(1+\frac{2.709+3a^2}{r^2+a^2}\right) \qquad r < R_c \\ + The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples @@ -45,15 +47,15 @@ above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands. -* A (energy units) -* B (energy-distance\^6 units) -* a (distance units) -* alpha (1/distance units) -* beta (1/distance\^6 units) +* :math:`A` (energy units) +* :math:`B` (energy-distance\^6 units) +* :math:`a` (distance units) +* :math:`\alpha` (1/distance units) +* :math:`\beta` (1/distance\^6 units) * cutoff (distance units) The last coefficient is optional. If not specified, the global cutoff -Rc is used. +:math:`R_c` is used. ---------- @@ -108,7 +110,7 @@ This pair style can only be used via the *pair* keyword of the Restrictions """""""""""" - none +none Related commands """""""""""""""" diff --git a/doc/src/pair_body_nparticle.rst b/doc/src/pair_body_nparticle.rst index 1214890070..edfd4f3ab2 100644 --- a/doc/src/pair_body_nparticle.rst +++ b/doc/src/pair_body_nparticle.rst @@ -1,13 +1,13 @@ -.. index:: pair\_style body/nparticle +.. index:: pair_style body/nparticle -pair\_style body/nparticle command -================================== +pair_style body/nparticle command +================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style body/nparticle cutoff @@ -17,10 +17,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style body/nparticle 3.0 - pair_coeff \* \* 1.0 1.0 + pair_coeff * * 1.0 1.0 pair_coeff 1 1 1.0 1.5 2.5 Description @@ -67,11 +67,15 @@ The interaction between two sub-particles, or a sub-particle and point particle, or between two point particles is computed as a Lennard-Jones interaction, using the standard formula -.. image:: Eqs/pair_lj.jpg - :align: center +.. math:: -where Rc is the cutoff. As explained above, an interaction involving -one or two body sub-particles may be computed even for r > Rc. + E & = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - + \left(\frac{\sigma}{r}\right)^6 \right] + \qquad r < R_c \\ + + +where :math:`R_c` is the cutoff. As explained above, an interaction involving +one or two body sub-particles may be computed even for :math:`r > R_c`. For style *body*\ , the following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in @@ -79,8 +83,8 @@ the examples above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands: -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) * cutoff (distance units) The last coefficient is optional. If not specified, the global cutoff @@ -94,7 +98,7 @@ is used. For atom type pairs I,J and I != J, the epsilon and sigma coefficients and cutoff distance for all of this pair style can be mixed. The -default mix value is *geometric*\ . See the "pair\_modify" command for +default mix value is *geometric*\ . See the :doc:`pair_modify ` command for details. This pair style does not support the :doc:`pair_modify ` diff --git a/doc/src/pair_body_rounded_polygon.rst b/doc/src/pair_body_rounded_polygon.rst index 9a042b5b5a..652c618d4a 100644 --- a/doc/src/pair_body_rounded_polygon.rst +++ b/doc/src/pair_body_rounded_polygon.rst @@ -1,16 +1,19 @@ -.. index:: pair\_style body/rounded/polygon +.. index:: pair_style body/rounded/polygon -pair\_style body/rounded/polygon command -======================================== +pair_style body/rounded/polygon command +======================================= Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style body/rounded/polygon c_n c_t mu delta_ua cutoff + +.. parsed-literal:: + c_n = normal damping coefficient c_t = tangential damping coefficient mu = normal friction coefficient during gross sliding @@ -21,10 +24,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style body/rounded/polygon 20.0 5.0 0.0 1.0 0.5 - pair_coeff \* \* 100.0 1.0 + pair_coeff * * 100.0 1.0 pair_coeff 1 1 100.0 1.0 Description @@ -33,7 +36,8 @@ Description Style *body/rounded/polygon* is for use with 2d models of body particles of style *rounded/polygon*\ . It calculates pairwise body/body interactions which can include body particles modeled as -1-vertex circular disks with a specified diameter. See the :doc:`Howto body ` doc page for more details on using body +1-vertex circular disks with a specified diameter. See the +:doc:`Howto body ` doc page for more details on using body rounded/polygon particles. This pairwise interaction between rounded polygons is described in @@ -54,34 +58,44 @@ their respective rounded surfaces, not by the separation of the vertices and edges themselves. This means that the specified cutoff in the pair\_style command is the -cutoff distance, r\_c, for the surface separation, \delta\_n (see figure +cutoff distance, :math:`r_c`, for the surface separation, :math:`\delta_n` (see figure below). This is the distance at which two particles no longer -interact. If r\_c is specified as 0.0, then it is a contact-only +interact. If :math:`r_c` is specified as 0.0, then it is a contact-only interaction. I.e. the two particles must overlap in order to exert a -repulsive force on each other. If r\_c > 0.0, then the force between +repulsive force on each other. If :math:`r_c > 0.0`, then the force between two particles will be attractive for surface separations from 0 to -r\_c, and repulsive once the particles overlap. +:math:`r_c`, and repulsive once the particles overlap. Note that unlike for other pair styles, the specified cutoff is not the distance between the centers of two particles at which they stop interacting. This center-to-center distance depends on the shape and size of the two particles and their relative orientation. LAMMPS takes that into account when computing the surface separation distance -and applying the r\_c cutoff. +and applying the :math:`r_c` cutoff. The forces between vertex-vertex, vertex-edge, and edge-edge overlaps are given by: -.. image:: Eqs/pair_body_rounded.jpg - :align: center +.. math:: + + F_n &= \begin{cases} + k_n \delta_n - c_n v_n & \delta_n \le 0 \\ + -k_{na} \delta_n - c_n v_n & 0 < \delta_n \le r_c \\ + 0 & \delta_n > r_c \\ + \end{cases} \\ + F_t &= \begin{cases} + \mu k_n \delta_n - c_t v_t & \delta_n \le 0 \\ + 0 & \delta_n > 0 + \end{cases} .. image:: JPG/pair_body_rounded.jpg :align: center -Note that F\_n and F\_t are functions of the surface separation \delta\_n -= d - (R\_i + R\_j). In this model, when (R\_i + R\_j) < d < (R\_i + R\_j) -+ r\_c, that is, 0 < \delta\_n < r\_c, the cohesive region of the two -surfaces overlap and the two surfaces are attractive to each other. +Note that :math:`F_n` and :math:`F_t` are functions of the surface separation +:math:`\delta_n = d - (R_i + R_j)`. In this model, when +:math:`(R_i + R_j) < d < (R_i + R_j) + r_c`, that is, :math:`0 < \delta_n < r_c`, +the cohesive region of the two surfaces overlap and the two surfaces are +attractive to each other. In :ref:`Fraige `, the tangential friction force between two particles that are in contact is modeled differently prior to gross @@ -98,12 +112,12 @@ The following coefficients must be defined for each pair of atom types via the :doc:`pair_coeff ` command as in the examples above, or in the data file read by the :doc:`read_data ` command: -* k\_n (energy/distance\^2 units) -* k\_na (energy/distance\^2 units) +* :math:`k_n` (energy/distance\^2 units) +* :math:`k_{na}` (energy/distance\^2 units) -Effectively, k\_n and k\_na are the slopes of the red lines in the plot -above for force versus surface separation, for \delta\_n < 0 and 0 < -\delta\_n < r\_c respectively. +Effectively, :math:`k_n` and :math:`k_{na}` are the slopes of the red lines in the plot +above for force versus surface separation, for :math:`\delta_n < 0` and +:math:`0 < \delta_n < r_c` respectively. **Mixing, shift, table, tail correction, restart, rRESPA info**\ : @@ -120,7 +134,6 @@ This pair style can only be used via the *pair* keyword of the Restrictions """""""""""" - These pair styles are part of the BODY package. They are only enabled if LAMMPS was built with that package. See the :doc:`Build package ` doc page for more info. diff --git a/doc/src/pair_body_rounded_polyhedron.rst b/doc/src/pair_body_rounded_polyhedron.rst index 23623a640e..20dbbafb13 100644 --- a/doc/src/pair_body_rounded_polyhedron.rst +++ b/doc/src/pair_body_rounded_polyhedron.rst @@ -1,16 +1,18 @@ -.. index:: pair\_style body/rounded/polyhedron +.. index:: pair_style body/rounded/polyhedron -pair\_style body/rounded/polyhedron command -=========================================== +pair_style body/rounded/polyhedron command +========================================== Syntax """""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style body/rounded/polyhedron c_n c_t mu delta_ua cutoff +.. parsed-literal:: + c_n = normal damping coefficient c_t = tangential damping coefficient mu = normal friction coefficient during gross sliding @@ -21,10 +23,10 @@ Examples """""""" -.. parsed-literal:: +.. code-block:: LAMMPS pair_style body/rounded/polyhedron 20.0 5.0 0.0 1.0 0.5 - pair_coeff \* \* 100.0 1.0 + pair_coeff * * 100.0 1.0 pair_coeff 1 1 100.0 1.0 Description @@ -33,7 +35,8 @@ Description Style *body/rounded/polygon* is for use with 3d models of body particles of style *rounded/polyhedron*\ . It calculates pairwise body/body interactions which can include body particles modeled as -1-vertex spheres with a specified diameter. See the :doc:`Howto body ` doc page for more details on using body +1-vertex spheres with a specified diameter. See the +:doc:`Howto body ` doc page for more details on using body rounded/polyhedron particles. This pairwise interaction between the rounded polyhedra is described @@ -54,26 +57,35 @@ separation of their respective rounded surfaces, not by the separation of the vertices, edges, and faces themselves. This means that the specified cutoff in the pair\_style command is the -cutoff distance, r\_c, for the surface separation, \delta\_n (see figure +cutoff distance, :math:`r_c`, for the surface separation, :math:`\delta_n` (see figure below). This is the distance at which two particles no longer -interact. If r\_c is specified as 0.0, then it is a contact-only +interact. If :math:`r_c` is specified as 0.0, then it is a contact-only interaction. I.e. the two particles must overlap in order to exert a -repulsive force on each other. If r\_c > 0.0, then the force between +repulsive force on each other. If :math:`r_c > 0.0`, then the force between two particles will be attractive for surface separations from 0 to -r\_c, and repulsive once the particles overlap. +:math:`r_c`, and repulsive once the particles overlap. Note that unlike for other pair styles, the specified cutoff is not the distance between the centers of two particles at which they stop interacting. This center-to-center distance depends on the shape and size of the two particles and their relative orientation. LAMMPS takes that into account when computing the surface separation distance -and applying the r\_c cutoff. +and applying the :math:`r_c` cutoff. The forces between vertex-vertex, vertex-edge, vertex-face, edge-edge, and edge-face overlaps are given by: -.. image:: Eqs/pair_body_rounded.jpg - :align: center +.. math:: + + F_n &= \begin{cases} + k_n \delta_n - c_n v_n, & \delta_n \le 0 \\ + -k_{na} \delta_n - c_n v_n & 0 < \delta_n \le r_c \\ + 0 & \delta_n > r_c \\ + \end{cases} \\ + F_t &= \begin{cases} + \mu k_n \delta_n - c_t v_t & \delta_n \le 0 \\ + 0 & \delta_n > 0 + \end{cases} .. image:: JPG/pair_body_rounded.jpg :align: center @@ -93,20 +105,21 @@ The following coefficients must be defined for each pair of atom types via the :doc:`pair_coeff ` command as in the examples above, or in the data file read by the :doc:`read_data ` command: -* k\_n (energy/distance\^2 units) -* k\_na (energy/distance\^2 units) +* :math:`k_n` (energy/distance\^2 units) +* :math:`k_{na}` (energy/distance\^2 units) -Effectively, k\_n and k\_na are the slopes of the red lines in the plot -above for force versus surface separation, for \delta\_n < 0 and 0 < -\delta\_n < r\_c respectively. +Effectively, :math:`k_n` and :math:`k_{na}` are the slopes of the red lines in the plot +above for force versus surface separation, for :math:`\delta_n` < 0 and +:math:`0 < \delta_n < r_c` respectively. **Mixing, shift, table, tail correction, restart, rRESPA info**\ : This pair style does not support the :doc:`pair_modify ` mix, shift, table, and tail options. -This pair style does not write its information to :doc:`binary restart files `. Thus, you need to re-specify the pair\_style and -pair\_coeff commands in an input script that reads a restart file. +This pair style does not write its information to :doc:`binary restart files `. +Thus, you need to re-specify the pair\_style and pair\_coeff +commands in an input script that reads a restart file. This pair style can only be used via the *pair* keyword of the :doc:`run_style respa ` command. It does not support the diff --git a/doc/src/pair_fep_soft.rst b/doc/src/pair_fep_soft.rst index 20bd84a567..263b52cacf 100644 --- a/doc/src/pair_fep_soft.rst +++ b/doc/src/pair_fep_soft.rst @@ -187,8 +187,14 @@ are suited for "alchemical" free energy calculations using the :doc:`fix adapt/f The *lj/cut/soft* style and related sub-styles compute the 12-6 Lennard-Jones and Coulomb potentials modified by a soft core, with the functional form -.. image:: Eqs/pair_lj_soft.jpg - :align: center +.. math:: + + E = \lambda^n 4 \epsilon \left\{ + \frac{1}{ \left[ \alpha_{\mathrm{LJ}} (1-\lambda)^2 + + \left( \displaystyle\frac{r}{\sigma} \right)^6 \right]^2 } - + \frac{1}{ \alpha_{\mathrm{LJ}} (1-\lambda)^2 + + \left( \displaystyle\frac{r}{\sigma} \right)^6 } + \right\} \qquad r < r_c The *lj/class2/soft* style is a 9-6 potential with the exponent of the denominator of the first term in brackets taking the value 1.5 instead of 2 @@ -197,25 +203,30 @@ denominator of the first term in brackets taking the value 1.5 instead of 2 Coulomb interactions can also be damped with a soft core at short distance, -.. image:: Eqs/pair_coul_soft.jpg - :align: center +.. math:: -In the Coulomb part C is an energy-conversion constant, q\_i and q\_j -are the charges on the 2 atoms, and epsilon is the dielectric constant -which can be set by the :doc:`dielectric ` command. + E = \lambda^n \frac{ C q_i q_j}{\epsilon \left[ \alpha_{\mathrm{C}} + (1-\lambda)^2 + r^2 \right]^{1/2}} \qquad r < r_c -The coefficient lambda is an activation parameter. When lambda = 1 the pair -potential is identical to a Lennard-Jones term or a Coulomb term or a -combination of both. When lambda = 0 the interactions are deactivated. The -transition between these two extrema is smoothed by a soft repulsive core in -order to avoid singularities in potential energy and forces when sites are -created or annihilated and can overlap :ref:`(Beutler) `. +In the Coulomb part :math:`C` is an energy-conversion constant, :math:`q_i` and +:math:`q_j` are the charges on the 2 atoms, and epsilon is the dielectric +constant which can be set by the :doc:`dielectric ` command. -The parameters n, alpha\_LJ and alpha\_C are set in the -:doc:`pair_style ` command, before the cutoffs. Usual choices for the -exponent are n = 2 or n = 1. For the remaining coefficients alpha\_LJ = 0.5 and -alpha\_C = 10 Angstrom\^2 are appropriate choices. Plots of the 12/6 LJ and -Coulomb terms are shown below, for lambda ranging from 1 to 0 every 0.1. +The coefficient lambda is an activation parameter. When :math:`\lambda = 1` the +pair potential is identical to a Lennard-Jones term or a Coulomb term or a +combination of both. When :math:`\lambda = 0` the interactions are +deactivated. The transition between these two extrema is smoothed by a soft +repulsive core in order to avoid singularities in potential energy and forces +when sites are created or annihilated and can overlap :ref:`(Beutler) +`. + +The parameters :math:`n`, :math:`\alpha_\mathrm{LJ}` and +:math:`\alpha_\mathrm{C}` are set in the :doc:`pair_style ` command, +before the cutoffs. Usual choices for the exponent are :math:`n = 2` or +:math:`n = 1`. For the remaining coefficients :math:`\alpha_\mathrm{LJ} = 0.5` +and :math:`\alpha_\mathrm{C} = 10~\text{A}^2` are appropriate choices. Plots of +the 12-6 LJ and Coulomb terms are shown below, for lambda ranging from 1 to 0 +every 0.1. .. image:: JPG/lj_soft.jpg .. image:: JPG/coul_soft.jpg @@ -225,12 +236,12 @@ For the *lj/cut/coul/cut/soft* or *lj/cut/coul/long/soft* pair styles, as well as for the equivalent *class2* versions, the following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples above, or in the data file or restart files read by -the :doc:`read_data ` or :doc:`read_restart ` commands, or -by mixing as described below: +the :doc:`read_data ` or :doc:`read_restart ` commands, +or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) -* lambda (activation parameter, between 0 and 1) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) +* :math:`\lambda` (activation parameter, between 0 and 1) * cutoff1 (distance units) * cutoff2 (distance units) @@ -245,61 +256,62 @@ since it has no Coulombic terms. For the *coul/cut/soft* and specified. Style *lj/cut/tip4p/long/soft* implements a soft-core version of the TIP4P water -model. The usage of the TIP4P pair style is documented in the -:doc:`pair_lj ` styles. In the soft version the parameters n, alpha\_LJ -and alpha\_C are set in the :doc:`pair_style ` command, after the -specific parameters of the TIP4P water model and before the cutoffs. The -activation parameter lambda is supplied as an argument of the -:doc:`pair_coeff ` command, after epsilon and sigma and before the -optional cutoffs. +model. The usage of the TIP4P pair style is documented in the :doc:`pair_lj +` styles. In the soft version the parameters :math:`n`, +:math:`\alpha_\mathrm{LJ}` and :math:`\alpha_\mathrm {C}` are set in the +:doc:`pair_style ` command, after the specific parameters of the +TIP4P water model and before the cutoffs. The activation parameter lambda is +supplied as an argument of the :doc:`pair_coeff ` command, after +epsilon and sigma and before the optional cutoffs. Style *lj/charmm/coul/long/soft* implements a soft-core version of the modified -12-6 LJ potential used in CHARMM and documented in the -:doc:`pair_style lj/charmm/coul/long ` style. In the soft version the parameters n, -alpha\_LJ and alpha\_C are set in the :doc:`pair_style ` command, before -the global cutoffs. The activation parameter lambda is introduced as an argument -of the :doc:`pair_coeff ` command, after epsilon and sigma and -before the optional eps14 and sigma14. +12-6 LJ potential used in CHARMM and documented in the :doc:`pair_style +lj/charmm/coul/long ` style. In the soft version the parameters +:math:`n`, :math:`\alpha_\mathrm{LJ}` and :math:`\alpha_\mathrm{C}` are set in +the :doc:`pair_style ` command, before the global cutoffs. The +activation parameter lambda is introduced as an argument of the :doc:`pair_coeff +` command, after :math:`\epsilon` and :math:`\sigma` and before the +optional eps14 and sigma14. Style *lj/class2/soft* implements a soft-core version of the 9-6 potential in -:doc:`pair_style lj/class2 `. In the soft version the parameters n, alpha\_LJ -and alpha\_C are set in the :doc:`pair_style ` command, before the -global cutoffs. The activation parameter lambda is introduced as an argument of -the the :doc:`pair_coeff ` command, after epsilon and sigma and before -the optional cutoffs. +:doc:`pair_style lj/class2 `. In the soft version the parameters +:math:`n`, :math:`\alpha_\mathrm{LJ}` and :math:`\alpha_\mathrm{C}` are set in the +:doc:`pair_style ` command, before the global cutoffs. The +activation parameter lambda is introduced as an argument of the the +:doc:`pair_coeff ` command, after :math:`\epsilon` and +:math:`\sigma` and before the optional cutoffs. -The *coul/cut/soft*\ , *coul/long/soft* and *tip4p/long/soft* sub-styles -are designed to be combined with other pair potentials via the -:doc:`pair_style hybrid/overlay ` command. This is because -they have no repulsive core. Hence, if used by themselves, there will -be no repulsion to keep two oppositely charged particles from -overlapping each other. In this case, if lambda = 1, a singularity may -occur. These sub-styles are suitable to represent charges embedded in -the Lennard-Jones radius of another site (for example hydrogen atoms -in several water models). +The *coul/cut/soft*\ , *coul/long/soft* and *tip4p/long/soft* sub-styles are +designed to be combined with other pair potentials via the :doc:`pair_style +hybrid/overlay ` command. This is because they have no repulsive +core. Hence, if used by themselves, there will be no repulsion to keep two +oppositely charged particles from overlapping each other. In this case, if +:math:`\lambda = 1`, a singularity may occur. These sub-styles are suitable to +represent charges embedded in the Lennard-Jones radius of another site (for +example hydrogen atoms in several water models). .. note:: - When using the soft-core Coulomb potentials with long-range - solvers (\ *coul/long/soft*\ , *lj/cut/coul/long/soft*\ , etc.) in a free - energy calculation in which sites holding electrostatic charges are - being created or annihilated (using :doc:`fix adapt/fep ` - and :doc:`compute fep `) it is important to adapt both the - lambda activation parameter (from 0 to 1, or the reverse) and the - value of the charge (from 0 to its final value, or the reverse). This - ensures that long-range electrostatic terms (kspace) are correct. It - is not necessary to use soft-core Coulomb potentials if the van der - Waals site is present during the free-energy route, thus avoiding - overlap of the charges. Examples are provided in the LAMMPS source - directory tree, under examples/USER/fep. + When using the soft-core Coulomb potentials with long-range solvers (\ + *coul/long/soft*\ , *lj/cut/coul/long/soft*\ , etc.) in a free energy + calculation in which sites holding electrostatic charges are being created or + annihilated (using :doc:`fix adapt/fep ` and :doc:`compute fep + `) it is important to adapt both the :math:`\lambda` activation + parameter (from 0 to 1, or the reverse) and the value of the charge (from 0 + to its final value, or the reverse). This ensures that long-range + electrostatic terms (kspace) are correct. It is not necessary to use + soft-core Coulomb potentials if the van der Waals site is present during the + free-energy route, thus avoiding overlap of the charges. Examples are + provided in the LAMMPS source directory tree, under examples/USER/fep. .. note:: - To avoid division by zero do not set sigma = 0 in the *lj/cut/soft* and - related styles; use the lambda parameter instead to activate/deactivate - interactions, or use epsilon = 0 and sigma = 1. Alternatively, when sites do not - interact though the Lennard-Jones term the *coul/long/soft* or similar sub-style - can be used via the :doc:`pair_style hybrid/overlay ` command. + To avoid division by zero do not set :math:`\sigma = 0` in the *lj/cut/soft* + and related styles; use the lambda parameter instead to activate/deactivate + interactions, or use :math:`\epsilon = 0` and :math:`\sigma = 1`. + Alternatively, when sites do not interact though the Lennard-Jones term + the *coul/long/soft* or similar sub-style can be used via the + :doc:`pair_style hybrid/overlay ` command. ---------- @@ -309,15 +321,25 @@ The *morse/soft* variant modifies the :doc:`pair_morse ` style at short range to have a soft core. The functional form differs from that of the *lj/soft* styles, and is instead given by: -.. image:: Eqs/pair_morse_soft.jpg - :align: center +.. math:: + + \begin{split} + s(\lambda) =& (1 - \lambda) / (1 - \lambda_f), \qquad B = -2D e^{-2 \alpha + r_0} (e^{\alpha r_0} - 1) / 3 \\ + E =& D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] + + s(\lambda) B e^{-3\alpha(r-r_0)}, \qquad \hspace{2.85em}\lambda \geq + \lambda_f,\quad r < r_c \\ + E =& \left( D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} + \right] + B e^{-3\alpha(r-r_0)} \right)(\lambda/\lambda_f)^n, \qquad \lambda + < \lambda_f,\quad r < r_c + \end{split} The *morse/soft* style requires the following pair coefficients: -* D0 (energy units) -* alpha (1/distance units) -* r0 (distance units) -* lambda (unitless, between 0.0 and 1.0) +* :math:`D_0` (energy units) +* :math:`\alpha` (1/distance units) +* :math:`r_0` (distance units) +* :math:`\lambda` (unitless, between 0.0 and 1.0) * cutoff (distance units) The last coefficient is optional. If not specified, the global morse cutoff is @@ -338,9 +360,10 @@ These accelerated styles are part of the GPU, USER-INTEL, KOKKOS, USER-OMP and OPT packages, respectively. They are only enabled if LAMMPS was built with those packages. See the :doc:`Build package ` doc page for more info. -You can specify the accelerated styles explicitly in your input script -by including their suffix, or you can use the :doc:`-suffix command-line switch ` when you invoke LAMMPS, or you can use the -:doc:`suffix ` command in your input script. +You can specify the accelerated styles explicitly in your input script by +including their suffix, or you can use the :doc:`-suffix command-line switch +` when you invoke LAMMPS, or you can use the :doc:`suffix ` +command in your input script. See the :doc:`Speed packages ` doc page for more instructions on how to use the accelerated styles effectively. @@ -351,16 +374,16 @@ instructions on how to use the accelerated styles effectively. **Mixing, shift, tail correction, restart info**\ : -The different versions of the *lj/cut/soft* pair styles support mixing. For atom -type pairs I,J and I != J, the epsilon and sigma coefficients and cutoff -distance for these pair style can be mixed. The default mix value is -*geometric* for 12-6 styles. +The different versions of the *lj/cut/soft* pair styles support mixing. For +atom type pairs I,J and I != J, the :math:`\epsilon` and :math:`\sigma` +coefficients and cutoff distance for these pair style can be mixed. The default +mix value is *geometric* for 12-6 styles. -The mixing rule for epsilon and sigma for *lj/class2/soft* 9-6 potentials is to use the -*sixthpower* formulas. The :doc:`pair_modify mix ` setting is thus -ignored for class2 potentials for epsilon and sigma. However it is still -followed for mixing the cutoff distance. See the :doc:`pair_modify ` -command for details. +The mixing rule for epsilon and sigma for *lj/class2/soft* 9-6 potentials is to +use the *sixthpower* formulas. The :doc:`pair_modify mix ` setting +is thus ignored for class2 potentials for :math:`\epsilon` and +:math:`\sigma`. However it is still followed for mixing the cutoff distance. See +the :doc:`pair_modify ` command for details. The *morse/soft* pair style does not support mixing. Thus, coefficients for all LJ pairs must be specified explicitly. @@ -376,22 +399,25 @@ interaction. .. note:: - The analytical form of the tail corrections for energy and pressure used - in the *lj/cut/soft* potentials are approximate, being identical to that of the - corresponding non-soft potentials scaled by a factor lambda\^n. The errors due to - this approximation should be negligible. For example, for a cutoff of 2.5 sigma - this approximation leads to maximum relative errors in tail corrections of the - order of 1e-4 for energy and virial (alpha\_LJ = 0.5, n = 2). The error vanishes - when lambda approaches 0 or 1. Note that these are the errors affecting the - long-range tail (itself a correction to the interaction energy) which includes - other approximations, namely that the system is homogeneous (local density equal + The analytical form of the tail corrections for energy and pressure used in + the *lj/cut/soft* potentials are approximate, being identical to that of the + corresponding non-soft potentials scaled by a factor :math:`\lambda^n`. The + errors due to this approximation should be negligible. For example, for a + cutoff of :math:`2.5\sigma` this approximation leads to maximum relative + errors in tail corrections of the order of 1e-4 for energy and virial + (:math:`\alpha_\mathrm{LJ} = 0.5, n = 2`). The error vanishes when lambda + approaches 0 or 1. Note that these are the errors affecting the long-range + tail (itself a correction to the interaction energy) which includes other + approximations, namely that the system is homogeneous (local density equal the average density) beyond the cutoff. -The *morse/soft* pair style does not support the :doc:`pair_modify ` -tail option for adding long-range tail corrections to energy and pressure. +The *morse/soft* pair style does not support the :doc:`pair_modify +` tail option for adding long-range tail corrections to energy and +pressure. -All of these pair styles write information to :doc:`binary restart files `, so pair\_style and pair\_coeff commands do not need to be -specified in an input script that reads a restart file. +All of these pair styles write information to :doc:`binary restart files +`, so pair\_style and pair\_coeff commands do not need to be specified +in an input script that reads a restart file. ---------- diff --git a/doc/src/pair_nm.rst b/doc/src/pair_nm.rst index f8ae4f7a91..6d319c6d06 100644 --- a/doc/src/pair_nm.rst +++ b/doc/src/pair_nm.rst @@ -68,22 +68,25 @@ by :ref:`Clarke `, mainly used for ionic liquids. A site can represent a single atom or a united-atom site. The energy of an interaction has the following form: -.. image:: Eqs/pair_nm.jpg - :align: center +.. math:: -Rc is the cutoff. + E = \frac{E_0}{(n-m)} \left[ m \left(\frac{r_0}{r}\right)^n - n + \left(\frac{r_0}{r}\right)^m \right] \qquad r < r_c + +where :math:`r_c` is the cutoff. Style *nm/cut/coul/cut* adds a Coulombic pairwise interaction given by -.. image:: Eqs/pair_coulomb.jpg - :align: center +.. math:: -where C is an energy-conversion constant, Qi and Qj are the charges on -the 2 atoms, and epsilon is the dielectric constant which can be set -by the :doc:`dielectric ` command. If one cutoff is -specified in the pair\_style command, it is used for both the NM and -Coulombic terms. If two cutoffs are specified, they are used as -cutoffs for the NM and Coulombic terms respectively. + E = \frac{C q_i q_j}{\epsilon r} \qquad r < r_c + +where :math:`C` is an energy-conversion constant, :math:`q_i` and :math:`q_j` +are the charges on the 2 atoms, and epsilon is the dielectric constant which can +be set by the :doc:`dielectric ` command. If one cutoff is +specified in the pair\_style command, it is used for both the N-M and Coulombic +terms. If two cutoffs are specified, they are used as cutoffs for the N-M and +Coulombic terms respectively. Styles *nm/cut/coul/long* compute the same Coulombic interactions as style *nm/cut/coul/cut* except that an @@ -101,22 +104,22 @@ examples above, or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands. -* E0 (energy units) -* r0 (distance units) -* n (unitless) -* m (unitless) +* :math:`E_0` (energy units) +* :math:`r_0` (distance units) +* :math:`n` (unitless) +* :math:`m` (unitless) * cutoff1 (distance units) * cutoff2 (distance units) The latter 2 coefficients are optional. If not specified, the global -NM and Coulombic cutoffs specified in the pair\_style command are used. -If only one cutoff is specified, it is used as the cutoff for both NM +N-M and Coulombic cutoffs specified in the pair\_style command are used. +If only one cutoff is specified, it is used as the cutoff for both N-M and Coulombic interactions for this type pair. If both coefficients -are specified, they are used as the NM and Coulombic cutoffs for this +are specified, they are used as the N-M and Coulombic cutoffs for this type pair. You cannot specify 2 cutoffs for style *nm*\ , since it has no Coulombic terms. -For *nm/cut/coul/long* only the NM cutoff can be specified since a +For *nm/cut/coul/long* only the N-M cutoff can be specified since a Coulombic cutoff cannot be specified for an individual I,J type pair. All type pairs use the same global Coulombic cutoff specified in the pair\_style command. @@ -140,7 +143,7 @@ the short-range portion of the long-range Coulombic interaction. All of the *nm* pair styles support the :doc:`pair_modify ` tail option for adding a long-range tail correction to the energy and -pressure for the NM portion of the pair interaction. +pressure for the N-M portion of the pair interaction. All of the *nm* pair styles write their information to :doc:`binary restart files `, so pair\_style and pair\_coeff commands do not need to be specified in an input script that reads a restart file. diff --git a/doc/src/pair_srp.rst b/doc/src/pair_srp.rst index a1138db382..822bd0dddb 100644 --- a/doc/src/pair_srp.rst +++ b/doc/src/pair_srp.rst @@ -56,19 +56,25 @@ Bonds of specified type *btype* interact with one another through a bond-pairwise potential, such that the force on bond *i* due to bond *j* is as follows -.. image:: Eqs/pair_srp1.jpg - :align: center +.. math:: -where *r* and *rij* are the distance and unit vector between the two -bonds. Note that *btype* can be specified as an asterisk "\*", which -case the interaction is applied to all bond types. The *mid* option -computes *r* and *rij* from the midpoint distance between bonds. The -*min* option computes *r* and *rij* from the minimum distance between -bonds. The force acting on a bond is mapped onto the two bond atoms -according to the lever rule, + F^{SRP}_{ij} & = C(1-r/r_c)\hat{r}_{ij} \qquad r < r_c + + +where *r* and :math:`\hat{r}_{ij}` are the distance and unit vector +between the two bonds. Note that *btype* can be specified as an +asterisk "\*", which case the interaction is applied to all bond types. +The *mid* option computes *r* and :math:`\hat{r}_{ij}` from the midpoint +distance between bonds. The *min* option computes *r* and +:math:`\hat{r}_{ij}` from the minimum distance between bonds. The force +acting on a bond is mapped onto the two bond atoms according to the +lever rule, + +.. math:: + + F_{i1}^{SRP} & = F^{SRP}_{ij}(L) \\ + F_{i2}^{SRP} & = F^{SRP}_{ij}(1-L) -.. image:: Eqs/pair_srp2.jpg - :align: center where *L* is the normalized distance from the atom to the point of closest approach of bond *i* and *j*\ . The *mid* option takes *L* as @@ -80,7 +86,7 @@ the data file or restart file read by the :doc:`read_data ` or :doc:`read_restart ` commands: * *C* (force units) -* *rc* (distance units) +* :math:`r_c` (distance units) The last coefficient is optional. If not specified, the global cutoff is used. @@ -114,7 +120,7 @@ Pair style *srp* turns off normalization of thermodynamic properties by particle number, as if the command :doc:`thermo_modify norm no ` had been issued. The pairwise energy associated with style *srp* is shifted to be zero -at the cutoff distance *rc*\ . +at the cutoff distance :math:`r_c`. ---------- @@ -127,7 +133,7 @@ This pair styles does not support mixing. This pair style does not support the :doc:`pair_modify ` shift option for the energy of the pair interaction. Note that as discussed above, the energy term is already shifted to be 0.0 at the -cutoff distance *rc*\ . +cutoff distance :math:`r_c`. The :doc:`pair_modify ` table option is not relevant for this pair style. diff --git a/doc/src/pair_sw.rst b/doc/src/pair_sw.rst index 425dcf1f16..2df9958ba1 100644 --- a/doc/src/pair_sw.rst +++ b/doc/src/pair_sw.rst @@ -39,12 +39,23 @@ Description The *sw* style computes a 3-body :ref:`Stillinger-Weber ` potential for the energy E of a system of atoms as -.. image:: Eqs/pair_sw.jpg - :align: center +.. math:: -where phi2 is a two-body term and phi3 is a three-body term. The -summations in the formula are over all neighbors J and K of atom I -within a cutoff distance = a\*sigma. + E & = \sum_i \sum_{j > i} \phi_2 (r_{ij}) + + \sum_i \sum_{j \neq i} \sum_{k > j} + \phi_3 (r_{ij}, r_{ik}, \theta_{ijk}) \\ + \phi_2(r_{ij}) & = A_{ij} \epsilon_{ij} \left[ B_{ij} (\frac{\sigma_{ij}}{r_{ij}})^{p_{ij}} - + (\frac{\sigma_{ij}}{r_{ij}})^{q_{ij}} \right] + \exp \left( \frac{\sigma_{ij}}{r_{ij} - a_{ij} \sigma_{ij}} \right) \\ + \phi_3(r_{ij},r_{ik},\theta_{ijk}) & = \lambda_{ijk} \epsilon_{ijk} \left[ \cos \theta_{ijk} - + \cos \theta_{0ijk} \right]^2 + \exp \left( \frac{\gamma_{ij} \sigma_{ij}}{r_{ij} - a_{ij} \sigma_{ij}} \right) + \exp \left( \frac{\gamma_{ik} \sigma_{ik}}{r_{ik} - a_{ik} \sigma_{ik}} \right) + + +where :math:`\phi_2` is a two-body term and :math:`\phi_3` is a +three-body term. The summations in the formula are over all neighbors J +and K of atom I within a cutoff distance :math:`a `\sigma`. Only a single pair\_coeff command is used with the *sw* style which specifies a Stillinger-Weber potential file with parameters for all @@ -86,24 +97,25 @@ and three-body coefficients in the formula above: * element 1 (the center atom in a 3-body interaction) * element 2 * element 3 -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) * a -* lambda -* gamma -* costheta0 +* :math:`\lambda` +* :math:`\gamma` +* :math:`\cos\theta_0` * A * B * p * q * tol -The A, B, p, and q parameters are used only for two-body -interactions. The lambda and costheta0 parameters are used only for -three-body interactions. The epsilon, sigma and a parameters are used -for both two-body and three-body interactions. gamma is used only in the -three-body interactions, but is defined for pairs of atoms. -The non-annotated parameters are unitless. +The A, B, p, and q parameters are used only for two-body interactions. +The :math:`\lambda` and :math:`\cos\theta_0` parameters are used only +for three-body interactions. The :math:`\epsilon`, :math:`\sigma` and +*a* parameters are used for both two-body and three-body +interactions. :math:`\gamma` is used only in the three-body +interactions, but is defined for pairs of atoms. The non-annotated +parameters are unitless. LAMMPS introduces an additional performance-optimization parameter tol that is used for both two-body and three-body interactions. In the @@ -141,9 +153,9 @@ are usually defined by simple formulas involving two sets of pair-wise parameters, corresponding to the ij and ik pairs, where i is the center atom. The user must ensure that the correct combining rule is used to calculate the values of the three-body parameters for -alloys. Note also that the function phi3 contains two exponential +alloys. Note also that the function :math:`\phi_3` contains two exponential screening factors with parameter values from the ij pair and ik -pairs. So phi3 for a C atom bonded to a Si atom and a second C atom +pairs. So :math:`\phi_3` for a C atom bonded to a Si atom and a second C atom will depend on the three-body parameters for the CSiC entry, and also on the two-body parameters for the CCC and CSiSi entries. Since the order of the two neighbors is arbitrary, the three-body parameters for @@ -152,8 +164,8 @@ parameters for entries SiCC and CSiSi should also be the same. The parameters used only for two-body interactions (A, B, p, and q) in entries whose 2nd and 3rd element are different (e.g. SiCSi) are not used for anything and can be set to 0.0 if desired. -This is also true for the parameters in phi3 that are -taken from the ij and ik pairs (sigma, a, gamma) +This is also true for the parameters in :math:`\phi_3` that are +taken from the ij and ik pairs (:math:`\sigma`, *a*\ , :math:`\gamma`) ---------- diff --git a/doc/src/pair_tersoff.rst b/doc/src/pair_tersoff.rst index ab9d714499..f2e44d0362 100644 --- a/doc/src/pair_tersoff.rst +++ b/doc/src/pair_tersoff.rst @@ -50,12 +50,28 @@ Description The *tersoff* style computes a 3-body Tersoff potential :ref:`(Tersoff\_1) ` for the energy E of a system of atoms as -.. image:: Eqs/pair_tersoff_1.jpg - :align: center +.. math:: -where f\_R is a two-body term and f\_A includes three-body interactions. -The summations in the formula are over all neighbors J and K of atom I -within a cutoff distance = R + D. + E & = \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ + V_{ij} & = f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) \right] \\ + f_C(r) & = \left\{ \begin{array} {r@{\quad:\quad}l} + 1 & r < R - D \\ + \frac{1}{2} - \frac{1}{2} \sin \left( \frac{\pi}{2} \frac{r-R}{D} \right) & + R-D < r < R + D \\ + 0 & r > R + D + \end{array} \right. \\ + f_R(r) & = A \exp (-\lambda_1 r) \\ + f_A(r) & = -B \exp (-\lambda_2 r) \\ + b_{ij} & = \left( 1 + \beta^n {\zeta_{ij}}^n \right)^{-\frac{1}{2n}} \\ + \zeta_{ij} & = \sum_{k \neq i,j} f_C(r_{ik}) g(\theta_{ijk}) + \exp \left[ {\lambda_3}^m (r_{ij} - r_{ik})^m \right] \\ + g(\theta) & = \gamma_{ijk} \left( 1 + \frac{c^2}{d^2} - + \frac{c^2}{\left[ d^2 + (\cos \theta - \cos \theta_0)^2\right]} \right) + + +where :math:`f_R` is a two-body term and :math:`f_A` includes three-body +interactions. The summations in the formula are over all neighbors +J and K of atom I within a cutoff distance = R + D. The *tersoff/table* style uses tabulated forms for the two-body, environment and angular functions. Linear interpolation is performed @@ -104,22 +120,24 @@ above: * element 2 (the atom bonded to the center atom) * element 3 (the atom influencing the 1-2 bond in a bond-order sense) * m -* gamma -* lambda3 (1/distance units) +* :math:`\gamma` +* :math:`\lambda_3` (1/distance units) * c * d -* costheta0 (can be a value < -1 or > 1) +* :math:`\cos\theta_0` (can be a value < -1 or > 1) * n -* beta -* lambda2 (1/distance units) +* :math:`\beta` +* :math:`\lambda_2` (1/distance units) * B (energy units) * R (distance units) * D (distance units) -* lambda1 (1/distance units) +* :math:`\lambda_1` (1/distance units) * A (energy units) -The n, beta, lambda2, B, lambda1, and A parameters are only used for -two-body interactions. The m, gamma, lambda3, c, d, and costheta0 +The n, :math:`\beta`, :math:`\lambda_2`, B, :math:`\lambda_1`, and A +parameters are only used for +two-body interactions. The m, :math:`\gamma`, :math:`\lambda_3`, c, d, +and :math:`\cos\theta_0` parameters are only used for three-body interactions. The R and D parameters are used for both two-body and three-body interactions. The non-annotated parameters are unitless. The value of m must be 3 or 1. @@ -149,7 +167,8 @@ SiCC entry. The parameters used for a particular three-body interaction come from the entry with the corresponding three elements. The parameters used only for two-body interactions -(n, beta, lambda2, B, lambda1, and A) in entries whose 2nd and 3rd +(n, :math:`\beta`, :math:`\lambda_2`, B, :math:`\lambda_1`, and A) +in entries whose 2nd and 3rd element are different (e.g. SiCSi) are not used for anything and can be set to 0.0 if desired. @@ -165,16 +184,24 @@ it reduces to the form of :ref:`Albe et al. ` when beta = 1 and m = 1. Note that in the current Tersoff implementation in LAMMPS, m must be specified as either 3 or 1. Tersoff used a slightly different but equivalent form for alloys, which we will refer to as Tersoff\_2 -potential :ref:`(Tersoff\_2) `. The *tersoff/table* style implements +potential :ref:`(Tersoff\_2) `. +The *tersoff/table* style implements Tersoff\_2 parameterization only. LAMMPS parameter values for Tersoff\_2 can be obtained as follows: -gamma\_ijk = omega\_ik, lambda3 = 0 and the value of +:math:`\gamma_{ijk} = \omega_{ik}`, :math:`\lambda_3 = 0` and the value of m has no effect. The parameters for species i and j can be calculated using the Tersoff\_2 mixing rules: -.. image:: Eqs/pair_tersoff_2.jpg - :align: center +.. math:: + + \lambda_1^{i,j} & = \frac{1}{2}(\lambda_1^i + \lambda_1^j)\\ + \lambda_2^{i,j} & = \frac{1}{2}(\lambda_2^i + \lambda_2^j)\\ + A_{i,j} & = (A_{i}A_{j})^{1/2}\\ + B_{i,j} & = \chi_{ij}(B_{i}B_{j})^{1/2}\\ + R_{i,j} & = (R_{i}R_{j})^{1/2}\\ + S_{i,j} & = (S_{i}S_{j})^{1/2} + Tersoff\_2 parameters R and S must be converted to the LAMMPS parameters R and D (R is different in both forms), using the following diff --git a/doc/src/pair_tersoff_mod.rst b/doc/src/pair_tersoff_mod.rst index dbe0b4d95b..94cc9300ed 100644 --- a/doc/src/pair_tersoff_mod.rst +++ b/doc/src/pair_tersoff_mod.rst @@ -49,21 +49,40 @@ potential :ref:`(Tersoff\_1) `, :ref:`(Tersoff\_2) ` wit modified cutoff function and angular-dependent term, giving the energy E of a system of atoms as -.. image:: Eqs/pair_tersoff_mod.jpg - :align: center +.. math:: -where f\_R is a two-body term and f\_A includes three-body interactions. + E & = \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ + V_{ij} & = f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) \right] \\ + f_C(r) & = \left\{ \begin{array} {r@{\quad:\quad}l} + 1 & r < R - D \\ + \frac{1}{2} - \frac{9}{16} \sin \left( \frac{\pi}{2} \frac{r-R}{D} \right) - \frac{1}{16} \sin \left( \frac{3\pi}{2} \frac{r-R}{D} \right) & + R-D < r < R + D \\ + 0 & r > R + D + \end{array} \right. \\ + f_R(r) & = A \exp (-\lambda_1 r) \\ + f_A(r) & = -B \exp (-\lambda_2 r) \\ + b_{ij} & = \left( 1 + {\zeta_{ij}}^\eta \right)^{-\frac{1}{2n}} \\ + \zeta_{ij} & = \sum_{k \neq i,j} f_C(r_{ik}) g(\theta_{ijk}) + \exp \left[ \alpha (r_{ij} - r_{ik})^\beta \right] \\ + g(\theta) & = c_1 + g_o(\theta) g_a(\theta) \\ + g_o(\theta) & = \frac{c_2 (h - \cos \theta)^2}{c_3 + (h - \cos \theta)^2} \\ + g_a(\theta) & = 1 + c_4 \exp \left[ -c_5 (h - \cos \theta)^2 \right] \\ + + +where :math:`f_R` is a two-body term and :math:`f_A` includes three-body interactions. The summations in the formula are over all neighbors J and K of atom I within a cutoff distance = R + D. The *tersoff/mod/c* style differs from *tersoff/mod* only in the formulation of the V\_ij term, where it contains an additional c0 term. -.. image:: Eqs/pair_tersoff_mod_c.jpg - :align: center +.. math:: -The modified cutoff function f\_C proposed by :ref:`(Murty) ` and + V_{ij} & = f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) + c_0 \right] + + +The modified cutoff function :math:`f_C` proposed by :ref:`(Murty) ` and having a continuous second-order differential is employed. The -angular-dependent term g(theta) was modified to increase the +angular-dependent term :math:`g(\theta)` was modified to increase the flexibility of the potential. The *tersoff/mod* potential is fitted to both the elastic constants @@ -105,30 +124,30 @@ not blank or comments (starting with #) define parameters for a triplet of elements. The parameters in a single entry correspond to coefficients in the formulae above: -element 1 (the center atom in a 3-body interaction) -element 2 (the atom bonded to the center atom) -element 3 (the atom influencing the 1-2 bond in a bond-order sense) -beta -alpha -h -eta -beta\_ters = 1 (dummy parameter) -lambda2 (1/distance units) -B (energy units) -R (distance units) -D (distance units) -lambda1 (1/distance units) -A (energy units) -n -c1 -c2 -c3 -c4 -c5 -c0 (energy units, tersoff/mod/c only):ul +* element 1 (the center atom in a 3-body interaction) +* element 2 (the atom bonded to the center atom) +* element 3 (the atom influencing the 1-2 bond in a bond-order sense) +* :math:`\beta` +* :math:`\alpha` +* h +* :math:`\eta` +* :math:`\beta_{ters}` = 1 (dummy parameter) +* :math:`\lambda_2` (1/distance units) +* B (energy units) +* R (distance units) +* D (distance units) +* :math:`\lambda_1` (1/distance units) +* A (energy units) +* n +* c1 +* c2 +* c3 +* c4 +* c5 +* c0 (energy units, tersoff/mod/c only):ul -The n, eta, lambda2, B, lambda1, and A parameters are only used for -two-body interactions. The beta, alpha, c1, c2, c3, c4, c5, h +The n, :math:`\eta`, :math:`\lambda_2`, B, :math:`\lambda_1`, and A parameters are only used for +two-body interactions. The :math:`\beta`, :math:`\alpha`, c1, c2, c3, c4, c5, h parameters are only used for three-body interactions. The R and D parameters are used for both two-body and three-body interactions. The c0 term applies to *tersoff/mod/c* only. The non-annotated diff --git a/doc/src/pair_tersoff_zbl.rst b/doc/src/pair_tersoff_zbl.rst index 2ad3be9d7d..e60de64f28 100644 --- a/doc/src/pair_tersoff_zbl.rst +++ b/doc/src/pair_tersoff_zbl.rst @@ -38,26 +38,53 @@ based on a Coulomb potential and the Ziegler-Biersack-Littmark universal screening function :ref:`(ZBL) `, giving the energy E of a system of atoms as -.. image:: Eqs/pair_tersoff_zbl.jpg - :align: center +.. math:: -The f\_F term is a fermi-like function used to smoothly connect the ZBL + E & = \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\ + V_{ij} & = (1 - f_F(r_{ij})) V^{ZBL}_{ij} + f_F(r_{ij}) V^{Tersoff}_{ij} \\ + f_F(r_{ij}) & = \frac{1}{1 + e^{-A_F(r_{ij} - r_C)}}\\ + \\ + \\ + V^{ZBL}_{ij} & = \frac{1}{4\pi\epsilon_0} \frac{Z_1 Z_2 \,e^2}{r_{ij}} \phi(r_{ij}/a) \\ + a & = \frac{0.8854\,a_0}{Z_{1}^{0.23} + Z_{2}^{0.23}}\\ + \phi(x) & = 0.1818e^{-3.2x} + 0.5099e^{-0.9423x} + 0.2802e^{-0.4029x} + 0.02817e^{-0.2016x}\\ + \\ + \\ + V^{Tersoff}_{ij} & = f_C(r_{ij}) \left[ f_R(r_{ij}) + b_{ij} f_A(r_{ij}) \right] \\ + f_C(r) & = \left\{ \begin{array} {r@{\quad:\quad}l} + 1 & r < R - D \\ + \frac{1}{2} - \frac{1}{2} \sin \left( \frac{\pi}{2} \frac{r-R}{D} \right) & + R-D < r < R + D \\ + 0 & r > R + D + \end{array} \right. \\ + f_R(r) & = A \exp (-\lambda_1 r) \\ + f_A(r) & = -B \exp (-\lambda_2 r) \\ + b_{ij} & = \left( 1 + \beta^n {\zeta_{ij}}^n \right)^{-\frac{1}{2n}} \\ + \zeta_{ij} & = \sum_{k \neq i,j} f_C(r_{ik}) g(\theta_{ijk}) + \exp \left[ {\lambda_3}^m (r_{ij} - r_{ik})^m \right] \\ + g(\theta) & = \gamma_{ijk} \left( 1 + \frac{c^2}{d^2} - + \frac{c^2}{\left[ d^2 + (\cos \theta - \cos \theta_0)^2\right]} \right) + + +The :math:`f_F` term is a fermi-like function used to smoothly connect the ZBL repulsive potential with the Tersoff potential. There are 2 -parameters used to adjust it: A\_F and r\_C. A\_F controls how "sharp" -the transition is between the two, and r\_C is essentially the cutoff +parameters used to adjust it: :math:`A_F` and :math:`r_C`. :math:`A_F` +controls how "sharp" +the transition is between the two, and :math:`r_C` is essentially the cutoff for the ZBL potential. For the ZBL portion, there are two terms. The first is the Coulomb repulsive term, with Z1, Z2 as the number of protons in each nucleus, -e as the electron charge (1 for metal and real units) and epsilon0 as -the permittivity of vacuum. The second part is the ZBL universal +e as the electron charge (1 for metal and real units) and :math:`\epsilon_0` +as the permittivity of vacuum. The second part is the ZBL universal screening function, with a0 being the Bohr radius (typically 0.529 Angstroms), and the remainder of the coefficients provided by the original paper. This screening function should be applicable to most systems. However, it is only accurate for small separations (i.e. less than 1 Angstrom). -For the Tersoff portion, f\_R is a two-body term and f\_A includes +For the Tersoff portion, :math:`f_R` is a two-body term and :math:`f_A` +includes three-body interactions. The summations in the formula are over all neighbors J and K of atom I within a cutoff distance = R + D. @@ -102,29 +129,32 @@ in the formula above: * element 2 (the atom bonded to the center atom) * element 3 (the atom influencing the 1-2 bond in a bond-order sense) * m -* gamma -* lambda3 (1/distance units) +* :math:`\gamma` +* :math:`\lambda_3` (1/distance units) * c * d -* costheta0 (can be a value < -1 or > 1) +* :math:`\cos\theta_0` (can be a value < -1 or > 1) * n -* beta -* lambda2 (1/distance units) +* :math:`\beta` +* :math:`\lambda_2` (1/distance units) * B (energy units) * R (distance units) * D (distance units) -* lambda1 (1/distance units) +* :math:`\lambda_1` (1/distance units) * A (energy units) -* Z\_i -* Z\_j +* :math:`Z_i` +* :math:`Z_j` * ZBLcut (distance units) * ZBLexpscale (1/distance units) -The n, beta, lambda2, B, lambda1, and A parameters are only used for -two-body interactions. The m, gamma, lambda3, c, d, and costheta0 +The n, :math:`\beta`, :math:`\lambda_2`, B, :math:`\lambda_1`, and A +parameters are only used for +two-body interactions. The m, :math:`\gamma`, :math:`\lambda_3`, c, d, +and :math:`\cos\theta_0` parameters are only used for three-body interactions. The R and D parameters are used for both two-body and three-body interactions. The -Z\_i,Z\_j, ZBLcut, ZBLexpscale parameters are used in the ZBL repulsive +:math:`Z_i`, :math:`Z_j`, ZBLcut, ZBLexpscale parameters are used in the +ZBL repulsive portion of the potential and in the Fermi-like function. The non-annotated parameters are unitless. The value of m must be 3 or 1. @@ -153,7 +183,8 @@ SiCC entry. The parameters used for a particular three-body interaction come from the entry with the corresponding three elements. The parameters used only for two-body interactions -(n, beta, lambda2, B, lambda1, and A) in entries whose 2nd and 3rd +(n, :math:`\beta`, :math:`\lambda_2`, B, :math:`\lambda_1`, and A) +in entries whose 2nd and 3rd element are different (e.g. SiCSi) are not used for anything and can be set to 0.0 if desired. @@ -172,12 +203,19 @@ different but equivalent form for alloys, which we will refer to as Tersoff\_2 potential :ref:`(Tersoff\_2) `. LAMMPS parameter values for Tersoff\_2 can be obtained as follows: -gamma = omega\_ijk, lambda3 = 0 and the value of +:math:`\gamma = \omega_{ijk}`, :math:`\lambda_3 = 0` and the value of m has no effect. The parameters for species i and j can be calculated using the Tersoff\_2 mixing rules: -.. image:: Eqs/pair_tersoff_2.jpg - :align: center +.. math:: + + \lambda_1^{i,j} & = \frac{1}{2}(\lambda_1^i + \lambda_1^j)\\ + \lambda_2^{i,j} & = \frac{1}{2}(\lambda_2^i + \lambda_2^j)\\ + A_{i,j} & = (A_{i}A_{j})^{1/2}\\ + B_{i,j} & = \chi_{ij}(B_{i}B_{j})^{1/2}\\ + R_{i,j} & = (R_{i}R_{j})^{1/2}\\ + S_{i,j} & = (S_{i}S_{j})^{1/2}\\ + Tersoff\_2 parameters R and S must be converted to the LAMMPS parameters R and D (R is different in both forms), using the following diff --git a/doc/src/pair_ufm.rst b/doc/src/pair_ufm.rst index 3bb4e83a0e..c8a7e42743 100644 --- a/doc/src/pair_ufm.rst +++ b/doc/src/pair_ufm.rst @@ -42,10 +42,16 @@ Description Style *ufm* computes pairwise interactions using the Uhlenbeck-Ford model (UFM) potential :ref:`(Paula Leite2016) ` which is given by -.. image:: Eqs/pair_ufm.jpg - :align: center +.. math:: -where rc is the cutoff, sigma is a distance-scale and epsilon is an energy-scale, i.e., a product of Boltzmann constant kB, temperature T and the Uhlenbeck-Ford p-parameter which is responsible + E & = -\varepsilon\, \ln{\left[1-\exp{\left(-r^{2}/\sigma^{2}\right)}\right]} \qquad r < r_c \\ + \varepsilon & = p\,k_B\,T + + +where :math:`r_c` is the cutoff, :math:`\sigma` is a distance-scale and +:math:`\epsilon` is an energy-scale, i.e., a product of Boltzmann constant +:math:`k_B`, temperature *T* and the Uhlenbeck-Ford p-parameter which +is responsible to control the softness of the interactions :ref:`(Paula Leite2017) `. This model is useful as a reference system for fluid-phase free-energy calculations :ref:`(Paula Leite2016) `. @@ -55,8 +61,8 @@ or in the data file or restart files read by the :doc:`read_data ` or :doc:`read_restart ` commands, or by mixing as described below: -* epsilon (energy units) -* sigma (distance units) +* :math:`\epsilon` (energy units) +* :math:`\sigma` (distance units) * cutoff (distance units) The last coefficient is optional. If not specified, the global *ufm* @@ -76,7 +82,13 @@ of a run: .. note:: - The thermodynamic integration procedure can be performed with this potential using :doc:`fix adapt `. This command will rescale the force on each atom by varying a scale variable, which always starts with value 1.0. The syntax is the same described above, however, changing epsilon to scale. A detailed explanation of how to use this command and perform nonequilibrium thermodynamic integration in LAMMPS is given in the paper by :ref:`(Freitas) `. + The thermodynamic integration procedure can be performed with this + potential using :doc:`fix adapt `. This command will + rescale the force on each atom by varying a scale variable, which + always starts with value 1.0. The syntax is the same described above, + however, changing epsilon to scale. A detailed explanation of how to + use this command and perform nonequilibrium thermodynamic integration + in LAMMPS is given in the paper by :ref:`(Freitas) `. ---------- diff --git a/doc/src/pair_vashishta.rst b/doc/src/pair_vashishta.rst index de29985f56..2dde0482be 100644 --- a/doc/src/pair_vashishta.rst +++ b/doc/src/pair_vashishta.rst @@ -63,16 +63,21 @@ including SiO2 :ref:`Vashishta1990 `, SiC The potential for the energy U of a system of atoms is -.. image:: Eqs/pair_vashishta.jpg - :align: center +.. math:: + + U & = \sum_i^N \sum_{j > i}^N U_{ij}^{(2)} (r_{ij}) + \sum_i^N \sum_{j \neq i}^N \sum_{k > j, k \neq i}^N U_{ijk}^{(3)} (r_{ij}, r_{ik}, \theta_{ijk}) \\ + U_{ij}^{(2)} (r) & = \frac{H_{ij}}{r^{\eta_{ij}}} + \frac{Z_i Z_j}{r}\exp(-r/\lambda_{1,ij}) - \frac{D_{ij}}{r^4}\exp(-r/\lambda_{4,ij}) - \frac{W_{ij}}{r^6}, r < r_{c,{ij}} \\ + U_{ijk}^{(3)}(r_{ij},r_{ik},\theta_{ijk}) & = B_{ijk} \frac{\left[ \cos \theta_{ijk} - \cos \theta_{0ijk} \right]^2} {1+C_{ijk}\left[ \cos \theta_{ijk} - \cos \theta_{0ijk} \right]^2} \times \\ + & \exp \left( \frac{\gamma_{ij}}{r_{ij} - r_{0,ij}} \right) \exp \left( \frac{\gamma_{ik}}{r_{ik} - r_{0,ik}} \right), r_{ij} < r_{0,ij}, r_{ik} < r_{0,ik} + where we follow the notation used in :ref:`Branicio2009 `. -U2 is a two-body term and U3 is a three-body term. The +:math:`U^2` is a two-body term and U3 is a three-body term. The summation over two-body terms is over all neighbors J within -a cutoff distance = *rc*\ . The twobody terms are shifted and +a cutoff distance = :math:`r_c`. The twobody terms are shifted and tilted by a linear function so that the energy and force are -both zero at *rc*\ . The summation over three-body terms -is over all neighbors J and K within a cut-off distance = *r0*\ , +both zero at :math:`r_c`. The summation over three-body terms +is over all neighbors *i* and *k* within a cut-off distance :math:`= r_0`, where the exponential screening function becomes zero. The *vashishta* style computes these formulas analytically. The @@ -126,20 +131,20 @@ and three-body coefficients in the formulae above: * element 1 (the center atom in a 3-body interaction) * element 2 * element 3 -* H (energy units) -* eta -* Zi (electron charge units) -* Zj (electron charge units) -* lambda1 (distance units) -* D (energy units) -* lambda4 (distance units) -* W (energy units) -* rc (distance units) -* B (energy units) -* gamma -* r0 (distance units) -* C -* costheta0 +* *H* (energy units) +* :math:`\eta` +* :math:`Z_i` (electron charge units) +* :math:`Z_j` (electron charge units) +* :math:`\lambda_1` (distance units) +* *D* (energy units) +* :math:`\lambda_4` (distance units) +* *W* (energy units) +* :math:`r_c` (distance units) +* *B* (energy units) +* :math:`\gamma` +* :math:`r_0` (distance units) +* *C* +* :math:`\cos\theta_0` The non-annotated parameters are unitless. The Vashishta potential file must contain entries for all the elements listed in the @@ -159,12 +164,14 @@ unambiguous, general, and simple to code, LAMMPS uses a slightly confusing method for specifying parameters. All parameters are divided into two classes: two-body and three-body. Two-body and three-body parameters are handled differently, as described below. -The two-body parameters are H, eta, lambda1, D, lambda4, W, rc, gamma, -and r0. They appear in the above formulae with two subscripts. The -parameters Zi and Zj are also classified as two-body parameters, even -though they only have 1 subscript. The three-body parameters are B, -C, costheta0. They appear in the above formulae with three -subscripts. Two-body and three-body parameters are handled +The two-body parameters are *H*\ , :math:`\eta`, :math:`\lambda_1`, +*D*\ , :math:`\lambda_4`, *W*, :math:`r_c`, :math:`\gamma`, +and :math:`r_0`. They appear in the above formulae with two subscripts. +The parameters :math:`Z_i` and :math:`Z_j` are also classified +as two-body parameters, even +though they only have 1 subscript. The three-body parameters are *B*\ , +*C*\ , :math:`\cos\theta_0`. They appear in the above formulae with +three subscripts. Two-body and three-body parameters are handled differently, as described below. The first element in each entry is the center atom in a three-body @@ -184,7 +191,8 @@ ensure that these values are equal. Two-body parameters appearing in entries where the 2nd and 3rd elements are different are stored but never used. It is good practice to enter zero for these values. Note that the three-body function U3 above contains the two-body parameters -gamma and r0. So U3 for a central C atom bonded to an Si atom and a +:math:`\gamma` and :math:`r_0`. So U3 for a central C atom bonded to +an Si atom and a second C atom will take three-body parameters from the CSiC entry, but two-body parameters from the CCC and CSiSi entries. diff --git a/doc/src/pair_yukawa.rst b/doc/src/pair_yukawa.rst index c3a8e9fc71..b7cb6818d2 100644 --- a/doc/src/pair_yukawa.rst +++ b/doc/src/pair_yukawa.rst @@ -38,10 +38,12 @@ Description Style *yukawa* computes pairwise interactions with the formula -.. image:: Eqs/pair_yukawa.jpg - :align: center +.. math:: -Rc is the cutoff. + E = A \frac{e^{- \kappa r}}{r} \qquad r < r_c + + +:math:`r_c` is the cutoff. The following coefficients must be defined for each pair of atoms types via the :doc:`pair_coeff ` command as in the examples diff --git a/doc/src/pair_yukawa_colloid.rst b/doc/src/pair_yukawa_colloid.rst index 76bf010fb9..2c337bdb94 100644 --- a/doc/src/pair_yukawa_colloid.rst +++ b/doc/src/pair_yukawa_colloid.rst @@ -35,11 +35,13 @@ Description Style *yukawa/colloid* computes pairwise interactions with the formula -.. image:: Eqs/pair_yukawa_colloid.jpg - :align: center +.. math:: -where Ri and Rj are the radii of the two particles and Rc is the -cutoff. + E = \frac{A}{\kappa} e^{- \kappa (r - (r_i + r_j))} \qquad r < r_c + + +where :math:`r_i` and :math:`r_j` are the radii of the two particles +and :math:`r_c` is the cutoff. In contrast to :doc:`pair_style yukawa `, this functional form arises from the Coulombic interaction between two colloid @@ -49,7 +51,7 @@ theory. :doc:`Pair\_style yukawa ` is a screened Coulombic potential between two point-charges and uses no such approximation. This potential applies to nearby particle pairs for which the Derjagin -approximation holds, meaning h << Ri + Rj, where h is the +approximation holds, meaning :math:`h << r_i + r_j`, where *h* is the surface-to-surface separation of the two particles. When used in combination with :doc:`pair_style colloid `, @@ -72,17 +74,17 @@ used in :doc:`pair_style yukawa `. For low surface potentials, i.e. less than about 25 mV, A can be written as: -.. parsed-literal:: +.. math:: - A = 2 \* PI \* R\*eps\*eps0 \* kappa \* psi\^2 + A = 2 \pi R\varepsilon\varepsilon_0 \kappa \psi^2 where -* R = colloid radius (distance units) -* eps0 = permittivity of free space (charge\^2/energy/distance units) -* eps = relative permittivity of fluid medium (dimensionless) -* kappa = inverse screening length (1/distance units) -* psi = surface potential (energy/charge units) +* *R* = colloid radius (distance units) +* :math:`\varepsilon_0` = permittivity of free space (charge\^2/energy/distance units) +* :math:`\varepsilon` = relative permittivity of fluid medium (dimensionless) +* :math:`\kappa` = inverse screening length (1/distance units) +* :math:`\psi` = surface potential (energy/charge units) The last coefficient is optional. If not specified, the global yukawa/colloid cutoff is used. diff --git a/doc/src/pair_zbl.rst b/doc/src/pair_zbl.rst index 8e34341172..bffcf9fbda 100644 --- a/doc/src/pair_zbl.rst +++ b/doc/src/pair_zbl.rst @@ -43,12 +43,16 @@ that ramps the energy, force, and curvature smoothly to zero between an inner and outer cutoff. The potential energy due to a pair of atoms at a distance r\_ij is given by: -.. image:: Eqs/pair_zbl.jpg - :align: center +.. math:: -where e is the electron charge, epsilon\_0 is the electrical -permittivity of vacuum, and Z\_i and Z\_j are the nuclear charges of the -two atoms. The switching function S(r) is identical to that used by + E^{ZBL}_{ij} & = \frac{1}{4\pi\epsilon_0} \frac{Z_i Z_j \,e^2}{r_{ij}} \phi(r_{ij}/a)+ S(r_{ij})\\ + a & = \frac{0.46850}{Z_{i}^{0.23} + Z_{j}^{0.23}}\\ + \phi(x) & = 0.18175e^{-3.19980x} + 0.50986e^{-0.94229x} + 0.28022e^{-0.40290x} + 0.02817e^{-0.20162x}\\ + +where *e* is the electron charge, :math:`\epsilon_0` is the electrical +permittivity of vacuum, and :math:`Z_i` and :math:`Z_j` are the nuclear +charges of the +two atoms. The switching function :math:`S(r)` is identical to that used by :doc:`pair_style lj/gromacs `. Here, the inner and outer cutoff are the same for all pairs of atom types. @@ -56,16 +60,17 @@ The following coefficients must be defined for each pair of atom types via the :doc:`pair_coeff ` command as in the examples above, or in the LAMMPS data file. -* Z\_i (atomic number for first atom type, e.g. 13.0 for aluminum) +* :math:`Z_i` (atomic number for first atom type, e.g. 13.0 for aluminum) -* Z\_j (ditto for second atom type) +* :math:`Z_j` (ditto for second atom type) -The values of Z\_i and Z\_j are normally equal to the atomic +The values of :math:`Z_i` and :math:`Z_j` are normally equal to the atomic numbers of the two atom types. Thus, the user may optionally -specify only the coefficients for each I==I pair, and rely +specify only the coefficients for each :math:`i==i` pair, and rely on the obvious mixing rule for cross interactions (see below). -Note that when I==I it is required that Z\_i == Z\_j. When used -with :doc:`hybrid/overlay ` and pairs are assigned +Note that when :math:`i==i` it is required that :math:`Z_i == Z_j`. +When used with :doc:`hybrid/overlay ` and pairs are +assigned to more than one sub-style, the mixing rule is not used and each pair of types interacting with the ZBL sub-style must be included in a pair\_coeff command. @@ -108,9 +113,11 @@ instructions on how to use the accelerated styles effectively. **Mixing, shift, table, tail correction, restart, rRESPA info**\ : -For atom type pairs I,J and I != J, the Z\_i and Z\_j coefficients -can be mixed by taking Z\_i and Z\_j from the values specified for -I == I and J == J cases. When used +For atom type pairs *i,j* and :math:`i \neq i`, the :math:`Z_i` and +:math:`Z_j` coefficients +can be mixed by taking :math:`Z_i` and :math:`Z_j` from the values +specified for +:math:`i == i` and :math:`j == j` cases. When used with :doc:`hybrid/overlay ` and pairs are assigned to more than one sub-style, the mixing rule is not used and each pair of types interacting with the ZBL sub-style diff --git a/doc/src/set.rst b/doc/src/set.rst index 8214ce8ba9..c633587b25 100644 --- a/doc/src/set.rst +++ b/doc/src/set.rst @@ -235,7 +235,7 @@ that a particular atom is changed or not changed, regardless of how many processors are being used. This keyword does not allow use of an atom-style variable. -Keywords *type/ratio* and *type/subset" also set the atom type for a +Keywords *type/ratio* and *type/subset* also set the atom type for a fraction of the selected atoms. The actual number of atoms changed will be exactly the requested number. For *type/ratio* the specified fraction (0 <= *fraction* <= 1) determines the number. For diff --git a/examples/USER/plumed/log.27Nov18.peptide-plumed.g++.1 b/examples/USER/plumed/log.4Feb20.peptide-plumed.g++.1 similarity index 82% rename from examples/USER/plumed/log.27Nov18.peptide-plumed.g++.1 rename to examples/USER/plumed/log.4Feb20.peptide-plumed.g++.1 index eb67b96fce..fb77bee0cc 100644 --- a/examples/USER/plumed/log.27Nov18.peptide-plumed.g++.1 +++ b/examples/USER/plumed/log.4Feb20.peptide-plumed.g++.1 @@ -1,5 +1,4 @@ -LAMMPS (27 Nov 2018) - using 1 OpenMP thread(s) per MPI task +LAMMPS (4 Feb 2020) # Solvated 5-mer peptide units real @@ -39,6 +38,8 @@ read_data data.peptide 7 = max # of 1-3 neighbors 14 = max # of 1-4 neighbors 18 = max # of special neighbors + special bonds CPU = 0.000809431 secs + read_data CPU = 0.0102327 secs neighbor 2.0 bin neigh_modify delay 5 @@ -66,6 +67,7 @@ fix 4 all shake 0.0001 10 100 b 4 6 8 10 12 14 18 a 31 6 = # of size 3 clusters 3 = # of size 4 clusters 640 = # of frozen angles + find clusters CPU = 0.000631809 secs #dump 1 colvar custom 1 dump.colvar.lammpstrj id xu yu zu fx fy fz #dump_modify 1 sort id @@ -77,13 +79,13 @@ variable pe equal pe run 101 PPPM initialization ... - using 12-bit tables for long-range coulomb (src/kspace.cpp:321) + using 12-bit tables for long-range coulomb (src/kspace.cpp:332) G vector (1/distance) = 0.268725 grid = 15 15 15 stencil order = 5 estimated absolute RMS force accuracy = 0.0228209 estimated relative force accuracy = 6.87243e-05 - using double precision FFTs + using double precision FFTW3 3d grid and FFT values/proc = 10648 3375 Neighbor list info ... update every 1 steps, delay 5 steps, check yes @@ -106,7 +108,7 @@ SHAKE stats (type/ave/delta) on step 0 14 0.96 0 18 0.957206 4.37979e-05 31 104.519 0.00396029 -Per MPI rank memory allocation (min/avg/max) = 18.74 | 18.74 | 18.74 Mbytes +Per MPI rank memory allocation (min/avg/max) = 19.07 | 19.07 | 19.07 Mbytes Step Temp TotEng PotEng KinEng E_pair E_bond f_2 0 282.10052 -5237.458 -6372.3766 1134.9186 -6442.768 16.557152 0 10 276.9783 -5234.3057 -6348.6171 1114.3114 -6421.6171 17.024361 0.47785504 @@ -129,22 +131,22 @@ SHAKE stats (type/ave/delta) on step 100 31 104.52 0.000760401 100 270.40648 -5234.9604 -6322.8327 1087.8723 -6417.73 19.666404 0.0094784372 101 270.99811 -5235.8295 -6326.082 1090.2525 -6418.8974 17.285816 0.086681332 -Loop time of 2.73445 on 1 procs for 101 steps with 2004 atoms +Loop time of 2.69839 on 1 procs for 101 steps with 2004 atoms -Performance: 6.383 ns/day, 3.760 hours/ns, 36.936 timesteps/s -99.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 6.468 ns/day, 3.711 hours/ns, 37.430 timesteps/s +99.7% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 2.2617 | 2.2617 | 2.2617 | 0.0 | 82.71 -Bond | 0.0044148 | 0.0044148 | 0.0044148 | 0.0 | 0.16 -Kspace | 0.17883 | 0.17883 | 0.17883 | 0.0 | 6.54 -Neigh | 0.23945 | 0.23945 | 0.23945 | 0.0 | 8.76 -Comm | 0.011672 | 0.011672 | 0.011672 | 0.0 | 0.43 -Output | 0.00028348 | 0.00028348 | 0.00028348 | 0.0 | 0.01 -Modify | 0.0365 | 0.0365 | 0.0365 | 0.0 | 1.33 -Other | | 0.001611 | | | 0.06 +Pair | 2.2853 | 2.2853 | 2.2853 | 0.0 | 84.69 +Bond | 0.0065637 | 0.0065637 | 0.0065637 | 0.0 | 0.24 +Kspace | 0.14949 | 0.14949 | 0.14949 | 0.0 | 5.54 +Neigh | 0.1938 | 0.1938 | 0.1938 | 0.0 | 7.18 +Comm | 0.0096588 | 0.0096588 | 0.0096588 | 0.0 | 0.36 +Output | 0.00039172 | 0.00039172 | 0.00039172 | 0.0 | 0.01 +Modify | 0.050643 | 0.050643 | 0.050643 | 0.0 | 1.88 +Other | | 0.00258 | | | 0.10 Nlocal: 2004 ave 2004 max 2004 min Histogram: 1 0 0 0 0 0 0 0 0 0 diff --git a/examples/USER/plumed/log.27Nov18.peptide-plumed.g++.4 b/examples/USER/plumed/log.4Feb20.peptide-plumed.g++.4 similarity index 82% rename from examples/USER/plumed/log.27Nov18.peptide-plumed.g++.4 rename to examples/USER/plumed/log.4Feb20.peptide-plumed.g++.4 index 72b851c2ff..1bbbed6cd8 100644 --- a/examples/USER/plumed/log.27Nov18.peptide-plumed.g++.4 +++ b/examples/USER/plumed/log.4Feb20.peptide-plumed.g++.4 @@ -1,5 +1,4 @@ -LAMMPS (27 Nov 2018) - using 1 OpenMP thread(s) per MPI task +LAMMPS (4 Feb 2020) # Solvated 5-mer peptide units real @@ -39,6 +38,8 @@ read_data data.peptide 7 = max # of 1-3 neighbors 14 = max # of 1-4 neighbors 18 = max # of special neighbors + special bonds CPU = 0.00095129 secs + read_data CPU = 0.0199838 secs neighbor 2.0 bin neigh_modify delay 5 @@ -66,6 +67,7 @@ fix 4 all shake 0.0001 10 100 b 4 6 8 10 12 14 18 a 31 6 = # of size 3 clusters 3 = # of size 4 clusters 640 = # of frozen angles + find clusters CPU = 0.000829935 secs #dump 1 colvar custom 1 dump.colvar.lammpstrj id xu yu zu fx fy fz #dump_modify 1 sort id @@ -77,13 +79,13 @@ variable pe equal pe run 101 PPPM initialization ... - using 12-bit tables for long-range coulomb (src/kspace.cpp:321) + using 12-bit tables for long-range coulomb (src/kspace.cpp:332) G vector (1/distance) = 0.268725 grid = 15 15 15 stencil order = 5 estimated absolute RMS force accuracy = 0.0228209 estimated relative force accuracy = 6.87243e-05 - using double precision FFTs + using double precision FFTW3 3d grid and FFT values/proc = 4312 960 Neighbor list info ... update every 1 steps, delay 5 steps, check yes @@ -106,7 +108,7 @@ SHAKE stats (type/ave/delta) on step 0 14 0.96 0 18 0.957206 4.37979e-05 31 104.519 0.00396029 -Per MPI rank memory allocation (min/avg/max) = 15.66 | 15.87 | 16.06 Mbytes +Per MPI rank memory allocation (min/avg/max) = 16.02 | 16.23 | 16.42 Mbytes Step Temp TotEng PotEng KinEng E_pair E_bond f_2 0 282.10052 -5237.458 -6372.3766 1134.9186 -6442.768 16.557152 0 10 276.9783 -5234.3057 -6348.6171 1114.3114 -6421.6171 17.024361 0.47785504 @@ -129,22 +131,22 @@ SHAKE stats (type/ave/delta) on step 100 31 104.52 0.000760401 100 270.40648 -5234.9604 -6322.8327 1087.8723 -6417.73 19.666404 0.0094784372 101 270.99811 -5235.8295 -6326.082 1090.2525 -6418.8974 17.285816 0.086681332 -Loop time of 0.812799 on 4 procs for 101 steps with 2004 atoms +Loop time of 0.873215 on 4 procs for 101 steps with 2004 atoms -Performance: 21.472 ns/day, 1.118 hours/ns, 124.262 timesteps/s -97.5% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 19.987 ns/day, 1.201 hours/ns, 115.664 timesteps/s +92.5% CPU use with 4 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.57957 | 0.59988 | 0.62504 | 2.6 | 73.80 -Bond | 0.00080013 | 0.0017412 | 0.0028315 | 2.1 | 0.21 -Kspace | 0.075724 | 0.10008 | 0.12023 | 6.4 | 12.31 -Neigh | 0.067733 | 0.067947 | 0.068168 | 0.1 | 8.36 -Comm | 0.01375 | 0.014175 | 0.014681 | 0.3 | 1.74 -Output | 0.00025511 | 0.00051183 | 0.001277 | 0.0 | 0.06 -Modify | 0.026406 | 0.026436 | 0.026462 | 0.0 | 3.25 -Other | | 0.002027 | | | 0.25 +Pair | 0.58191 | 0.61681 | 0.66371 | 3.8 | 70.64 +Bond | 0.00099587 | 0.0023546 | 0.0041356 | 2.8 | 0.27 +Kspace | 0.096162 | 0.14486 | 0.18119 | 8.1 | 16.59 +Neigh | 0.059843 | 0.059864 | 0.059876 | 0.0 | 6.86 +Comm | 0.013623 | 0.01368 | 0.013723 | 0.0 | 1.57 +Output | 0.00031137 | 0.0010193 | 0.0024326 | 2.6 | 0.12 +Modify | 0.031552 | 0.031697 | 0.032087 | 0.1 | 3.63 +Other | | 0.002938 | | | 0.34 Nlocal: 501 ave 512 max 492 min Histogram: 1 0 0 1 0 1 0 0 0 1 diff --git a/examples/USER/plumed/reference/p.log b/examples/USER/plumed/reference/p.log index 79d0bbd84c..29d99077e4 100644 --- a/examples/USER/plumed/reference/p.log +++ b/examples/USER/plumed/reference/p.log @@ -1,12 +1,12 @@ PLUMED: PLUMED is starting -PLUMED: Version: 2.4.2 (git: Unknown) compiled on Jul 11 2018 at 19:09:03 -PLUMED: Please cite this paper when using PLUMED [1] +PLUMED: Version: 2.6.0 (git: Unknown) compiled on Feb 13 2020 at 15:49:44 +PLUMED: Please cite these papers when using PLUMED [1][2] PLUMED: For further information see the PLUMED web page at http://www.plumed.org -PLUMED: Root: /Users/gareth/MD_code/lammps-permanent/lammps/lib/plumed/plumed2-2.4.2/ -PLUMED: For installed feature, see /Users/gareth/MD_code/lammps-permanent/lammps/lib/plumed/plumed2-2.4.2//src/config/config.txt +PLUMED: Root: /home/akohlmey/compile/lammps/build-gcc/plumed_build-prefix/lib/plumed +PLUMED: For installed feature, see /home/akohlmey/compile/lammps/build-gcc/plumed_build-prefix/lib/plumed/src/config/config.txt PLUMED: Molecular dynamics engine: LAMMPS PLUMED: Precision of reals: 8 -PLUMED: Running over 1 node +PLUMED: Running over 4 nodes PLUMED: Number of threads: 1 PLUMED: Cache line size: 512 PLUMED: Number of atoms: 2004 @@ -14,13 +14,13 @@ PLUMED: File suffix: PLUMED: FILE: plumed.dat PLUMED: Action UNITS PLUMED: with label @0 -PLUMED: length: A -PLUMED: energy: kcal/mol +PLUMED: length: A = 0.1 nm +PLUMED: energy: kcal/mol = 4.184 kj/mol PLUMED: time: ps PLUMED: charge: e PLUMED: mass: amu PLUMED: using physical units -PLUMED: inside PLUMED, Boltzmann constant is 0.001987 +PLUMED: inside PLUMED, Boltzmann constant is 0.0019872 PLUMED: Action DISTANCE PLUMED: with label dd PLUMED: between atoms 45 48 @@ -44,14 +44,15 @@ PLUMED: Timestep: 0.002000 PLUMED: KbT has not been set by the MD engine PLUMED: It should be set by hand where needed PLUMED: Relevant bibliography: -PLUMED: [1] Tribello, Bonomi, Branduardi, Camilloni, and Bussi, Comput. Phys. Commun. 185, 604 (2014) +PLUMED: [1] The PLUMED consortium, Nat. Methods 16, 670 (2019) +PLUMED: [2] Tribello, Bonomi, Branduardi, Camilloni, and Bussi, Comput. Phys. Commun. 185, 604 (2014) PLUMED: Please read and cite where appropriate! PLUMED: Finished setup PLUMED: Cycles Total Average Minumum Maximum -PLUMED: 1 0.020354 0.020354 0.020354 0.020354 -PLUMED: 1 Prepare dependencies 102 0.000256 0.000003 0.000001 0.000006 -PLUMED: 2 Sharing data 102 0.010002 0.000098 0.000078 0.000546 -PLUMED: 3 Waiting for data 102 0.001398 0.000014 0.000011 0.000072 -PLUMED: 4 Calculating (forward loop) 102 0.001797 0.000018 0.000013 0.000058 -PLUMED: 5 Applying (backward loop) 102 0.002666 0.000026 0.000022 0.000062 -PLUMED: 6 Update 102 0.001126 0.000011 0.000007 0.000055 +PLUMED: 1 0.010018 0.010018 0.010018 0.010018 +PLUMED: 1 Prepare dependencies 102 0.000241 0.000002 0.000001 0.000003 +PLUMED: 2 Sharing data 102 0.002132 0.000021 0.000006 0.000151 +PLUMED: 3 Waiting for data 102 0.001640 0.000016 0.000008 0.000067 +PLUMED: 4 Calculating (forward loop) 102 0.000825 0.000008 0.000005 0.000013 +PLUMED: 5 Applying (backward loop) 102 0.000522 0.000005 0.000002 0.000015 +PLUMED: 6 Update 102 0.001755 0.000017 0.000011 0.000067 diff --git a/lib/gpu/lal_lj_tip4p_long.cpp b/lib/gpu/lal_lj_tip4p_long.cpp index d44edc8cbd..f60f162d7b 100644 --- a/lib/gpu/lal_lj_tip4p_long.cpp +++ b/lib/gpu/lal_lj_tip4p_long.cpp @@ -74,11 +74,11 @@ int LJTIP4PLongT::init(const int ntypes, // If atom type constants fit in shared memory use fast kernel int lj_types=ntypes; shared_types=false; -// int max_shared_types=this->device->max_shared_types(); -// if (lj_types<=max_shared_types && this->_block_size>=max_shared_types) { -// lj_types=max_shared_types; -// shared_types=true; -// } + int max_shared_types=this->device->max_shared_types(); + if (lj_types<=max_shared_types && this->_block_size>=max_shared_types) { + lj_types=max_shared_types; + shared_types=true; + } _lj_types=lj_types; // Allocate a host write buffer for data initialization @@ -202,7 +202,6 @@ void LJTIP4PLongT::loop(const bool _eflag, const bool _vflag) { GX=static_cast(ceil(static_cast(this->ans->inum())/ (BX/this->_threads_per_atom))); - this->k_pair.set_size(GX,BX); if (vflag) { this->ansO.resize_ib(ainum*3); } else { @@ -210,13 +209,25 @@ void LJTIP4PLongT::loop(const bool _eflag, const bool _vflag) { } this->ansO.zero(); this->device->gpu->sync(); - this->k_pair.run(&this->atom->x, &lj1, &lj3, &_lj_types, &sp_lj, + if(shared_types) { + this->k_pair_fast.set_size(GX,BX); + this->k_pair_fast.run(&this->atom->x, &lj1, &lj3, &_lj_types, &sp_lj, &this->nbor->dev_nbor, &this->_nbor_data->begin(), &this->ans->force, &this->ans->engv, &eflag, &vflag, &ainum, &nbor_pitch, &this->_threads_per_atom, &hneight, &m, &TypeO, &TypeH, &alpha, &this->atom->q, &cutsq, &_qqrd2e, &_g_ewald, &cut_coulsq, &cut_coulsqplus, &this->ansO); + } else { + this->k_pair.set_size(GX,BX); + this->k_pair.run(&this->atom->x, &lj1, &lj3, &_lj_types, &sp_lj, + &this->nbor->dev_nbor, &this->_nbor_data->begin(), + &this->ans->force, &this->ans->engv, &eflag, &vflag, + &ainum, &nbor_pitch, &this->_threads_per_atom, + &hneight, &m, &TypeO, &TypeH, &alpha, + &this->atom->q, &cutsq, &_qqrd2e, &_g_ewald, + &cut_coulsq, &cut_coulsqplus, &this->ansO); + } GX=static_cast(ceil(static_cast(this->ans->inum())/BX)); this->k_pair_distrib.set_size(GX,BX); this->k_pair_distrib.run(&this->atom->x, &this->ans->force, &this->ans->engv, diff --git a/lib/gpu/lal_lj_tip4p_long.cu b/lib/gpu/lal_lj_tip4p_long.cu index 147c460795..c101196433 100644 --- a/lib/gpu/lal_lj_tip4p_long.cu +++ b/lib/gpu/lal_lj_tip4p_long.cu @@ -572,4 +572,328 @@ __kernel void k_lj_tip4p_long(const __global numtyp4 *restrict x_, } // if ii } -__kernel void k_lj_tip4p_long_fast() {} +__kernel void k_lj_tip4p_long_fast(const __global numtyp4 *restrict x_, + const __global numtyp4 *restrict lj1_in, + const __global numtyp4 *restrict lj3_in, + const int lj_types, + const __global numtyp *restrict sp_lj_in, + const __global int * dev_nbor, + const __global int * dev_packed, + __global acctyp4 *restrict ans, + __global acctyp *restrict engv, + const int eflag, const int vflag, const int inum, + const int nbor_pitch, const int t_per_atom, + __global int *restrict hneigh, + __global numtyp4 *restrict m, + const int typeO, const int typeH, + const numtyp alpha, + const __global numtyp *restrict q_, + const __global numtyp *restrict cutsq, + const numtyp qqrd2e, const numtyp g_ewald, + const numtyp cut_coulsq, const numtyp cut_coulsqplus, + __global acctyp4 *restrict ansO) { + int tid, ii, offset; + atom_info(t_per_atom,ii,tid,offset); + + const numtyp eq_zero = 1e-6; + + __local numtyp4 lj1[MAX_SHARED_TYPES*MAX_SHARED_TYPES]; + __local numtyp4 lj3[MAX_SHARED_TYPES*MAX_SHARED_TYPES]; + __local numtyp sp_lj[8]; + if (tid<8) + sp_lj[tid]=sp_lj_in[tid]; + if (tid0) + lj3[tid]=lj3_in[tid]; + } + acctyp energy = (acctyp)0; + acctyp e_coul = (acctyp)0; + acctyp4 f, fO; + f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0; + fO.x=(acctyp)0; fO.y=(acctyp)0; fO.z=(acctyp)0; + acctyp virial[6],vO[6]; + for (int i=0; i<6; i++) { + virial[i]=(acctyp)0; + vO[i]=(acctyp)0; + } + + __syncthreads(); + if (ii= inum) { + non_local_oxy = 1; + } + } + + for ( ; nbor0) { + numtyp e = r6inv * (lj3[mtype].x*r6inv-lj3[mtype].y); + energy += factor_lj * (e - lj3[mtype].z); + } + if (vflag>0) { + virial[0] += delx*delx*forcelj; + virial[1] += dely*dely*forcelj; + virial[2] += delz*delz*forcelj; + virial[3] += delx*dely*forcelj; + virial[4] += delx*delz*forcelj; + virial[5] += dely*delz*forcelj; + } + } // if LJ + + if (rsq < cut_coulsqplus) { //cut_coulsqplus + int jH1, jH2, jO; + numtyp qj; fetch(qj,j,q_tex); + numtyp4 x2 = jx; + if(itype == typeO || jtype == typeO) { + if (jtype == typeO) { + jO = j; + jH1 = hneigh[j*4 ]; + jH2 = hneigh[j*4+1]; + x2 = m[j]; + } + delx = x1.x-x2.x; + dely = x1.y-x2.y; + delz = x1.z-x2.z; + rsq = delx*delx+dely*dely+delz*delz; + } + if (rsq < cut_coulsq) { + numtyp r2inv = ucl_recip(rsq); + numtyp r = ucl_rsqrt(r2inv); + numtyp grij = g_ewald * r; + numtyp expm2 = ucl_exp(-grij*grij); + numtyp t = ucl_recip((numtyp)1.0 + EWALD_P*grij); + numtyp _erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; + + numtyp prefactor = qj; + prefactor *= qqrd2e*qtmp/r; + numtyp force_coul = r2inv*prefactor * (_erfc + EWALD_F*grij*expm2 - factor_coul); + + if (itype == typeH) { + f.x += delx * force_coul; + f.y += dely * force_coul; + f.z += delz * force_coul; + f.w += 0; + } else { + fO.x += delx * force_coul; + fO.y += dely * force_coul; + fO.z += delz * force_coul; + fO.w += 0; + } + if (eflag>0) { + e_coul += prefactor*(_erfc-factor_coul); + } + if (vflag>0) { + acctyp4 fd; + fd.x = delx*force_coul; + fd.y = dely*force_coul; + fd.z = delz*force_coul; + if (itype == typeH) { + if (jtype == typeH) { + virial[0] += delx*fd.x; + virial[1] += dely*fd.y; + virial[2] += delz*fd.z; + virial[3] += delx*fd.y; + virial[4] += delx*fd.z; + virial[5] += dely*fd.z; + } else { + numtyp cO = 1 - alpha, cH = 0.5*alpha; + numtyp4 vdj; + numtyp4 xjH1; fetch4(xjH1,jH1,pos_tex); + numtyp4 xjH2; fetch4(xjH2,jH2,pos_tex); + numtyp4 xjO; fetch4(xjO,jO,pos_tex); + vdj.x = xjO.x*cO + xjH1.x*cH + xjH2.x*cH; + vdj.y = xjO.y*cO + xjH1.y*cH + xjH2.y*cH; + vdj.z = xjO.z*cO + xjH1.z*cH + xjH2.z*cH; + //vdj.w = vdj.w; + virial[0] += (ix.x - vdj.x)*fd.x; + virial[1] += (ix.y - vdj.y)*fd.y; + virial[2] += (ix.z - vdj.z)*fd.z; + virial[3] += (ix.x - vdj.x)*fd.y; + virial[4] += (ix.x - vdj.x)*fd.z; + virial[5] += (ix.y - vdj.y)*fd.z; + } + } else { + numtyp cO = 1 - alpha, cH = 0.5*alpha; + numtyp4 vdi, vdj; + numtyp4 xH1; fetch4(xH1,iH1,pos_tex); + numtyp4 xH2; fetch4(xH2,iH2,pos_tex); + numtyp4 xO; fetch4(xO,iO,pos_tex); + vdi.x = xO.x*cO + xH1.x*cH + xH2.x*cH; + vdi.y = xO.y*cO + xH1.y*cH + xH2.y*cH; + vdi.z = xO.z*cO + xH1.z*cH + xH2.z*cH; + //vdi.w = vdi.w; + if (jtype != typeH) { + numtyp4 xjH1; fetch4(xjH1,jH1,pos_tex); + numtyp4 xjH2; fetch4(xjH2,jH2,pos_tex); + numtyp4 xjO; fetch4(xjO,jO,pos_tex); + vdj.x = xjO.x*cO + xjH1.x*cH + xjH2.x*cH; + vdj.y = xjO.y*cO + xjH1.y*cH + xjH2.y*cH; + vdj.z = xjO.z*cO + xjH1.z*cH + xjH2.z*cH; + //vdj.w = vdj.w; + } else vdj = jx; + vO[0] += 0.5*(vdi.x - vdj.x)*fd.x; + vO[1] += 0.5*(vdi.y - vdj.y)*fd.y; + vO[2] += 0.5*(vdi.z - vdj.z)*fd.z; + vO[3] += 0.5*(vdi.x - vdj.x)*fd.y; + vO[4] += 0.5*(vdi.x - vdj.x)*fd.z; + vO[5] += 0.5*(vdi.y - vdj.y)*fd.z; + } + } + } + if (non_local_oxy == 1) { + if (iO == j) { + x2 = ix; + qj = qtmp; + } + numtyp4 x1m = m[iO]; + delx = x1m.x-x2.x; + dely = x1m.y-x2.y; + delz = x1m.z-x2.z; + rsq = delx*delx+dely*dely+delz*delz; + if (rsq < cut_coulsq) { + numtyp r2inv = ucl_recip(rsq); + numtyp r = ucl_rsqrt(r2inv); + numtyp grij = g_ewald * r; + numtyp expm2 = ucl_exp(-grij*grij); + numtyp t = ucl_recip((numtyp)1.0 + EWALD_P*grij); + numtyp _erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; + + numtyp prefactor = qj; + prefactor *= qqrd2e*x1m.w/r; + numtyp force_coul = r2inv*prefactor * (_erfc + EWALD_F*grij*expm2 - factor_coul); + + numtyp cO = 1 - alpha, cH = 0.5*alpha; + numtyp4 fd; + fd.x = delx * force_coul * cH; + fd.y = dely * force_coul * cH; + fd.z = delz * force_coul * cH; + + f.x += fd.x; + f.y += fd.y; + f.z += fd.z; + + if (eflag>0) { + e_coul += prefactor*(_erfc-factor_coul) * (acctyp)0.5 * alpha; + } + if (vflag>0) { + numtyp4 xH1; fetch4(xH1,iH1,pos_tex); + numtyp4 xH2; fetch4(xH2,iH2,pos_tex); + numtyp4 xO; fetch4(xO,iO,pos_tex); + + virial[0] += ((xO.x*cO + xH1.x*cH + xH2.x*cH) - x2.x) * fd.x; + virial[1] += ((xO.y*cO + xH1.y*cH + xH2.y*cH) - x2.y) * fd.y; + virial[2] += ((xO.z*cO + xH1.z*cH + xH2.z*cH) - x2.z) * fd.z; + virial[3] += ((xO.x*cO + xH1.x*cH + xH2.x*cH) - x2.x) * fd.y; + virial[4] += ((xO.x*cO + xH1.x*cH + xH2.x*cH) - x2.x) * fd.z; + virial[5] += ((xO.y*cO + xH1.y*cH + xH2.y*cH) - x2.y) * fd.z; + } + } + } + } // if cut_coulsqplus + } // for nbor + if (t_per_atom>1) { +#if (ARCH < 300) + __local acctyp red_acc[6][BLOCK_PAIR]; + red_acc[0][tid]=fO.x; + red_acc[1][tid]=fO.y; + red_acc[2][tid]=fO.z; + red_acc[3][tid]=fO.w; + for (unsigned int s=t_per_atom/2; s>0; s>>=1) { + if (offset < s) { + for (int r=0; r<4; r++) + red_acc[r][tid] += red_acc[r][tid+s]; + } + } + fO.x=red_acc[0][tid]; + fO.y=red_acc[1][tid]; + fO.z=red_acc[2][tid]; + fO.w=red_acc[3][tid]; + if (vflag>0) { + for (int r=0; r<6; r++) red_acc[r][tid]=vO[r]; + for (unsigned int s=t_per_atom/2; s>0; s>>=1) { + if (offset < s) { + for (int r=0; r<6; r++) + red_acc[r][tid] += red_acc[r][tid+s]; + } + } + for (int r=0; r<6; r++) vO[r]=red_acc[r][tid]; + } +#else + for (unsigned int s=t_per_atom/2; s>0; s>>=1) { + fO.x += shfl_xor(fO.x, s, t_per_atom); + fO.y += shfl_xor(fO.y, s, t_per_atom); + fO.z += shfl_xor(fO.z, s, t_per_atom); + fO.w += shfl_xor(fO.w, s, t_per_atom); + } + if (vflag>0) { + for (unsigned int s=t_per_atom/2; s>0; s>>=1) { + for (int r=0; r<6; r++) + vO[r] += shfl_xor(vO[r], s, t_per_atom); + } + } +#endif + } + if(offset == 0) { + ansO[i] = fO; + if (vflag>0) { + ansO[inum + i].x = vO[0]; + ansO[inum + i].y = vO[1]; + ansO[inum + i].z = vO[2]; + ansO[inum*2 + i].x = vO[3]; + ansO[inum*2 + i].y = vO[4]; + ansO[inum*2 + i].z = vO[5]; + } + } + store_answers_q(f,energy,e_coul,virial,ii,inum,tid,t_per_atom,offset,eflag, + vflag,ans,engv); + } // if ii +} diff --git a/lib/plumed/Install.py b/lib/plumed/Install.py index 668e681b3c..b6b00d1511 100644 --- a/lib/plumed/Install.py +++ b/lib/plumed/Install.py @@ -17,7 +17,7 @@ parser = ArgumentParser(prog='Install.py', # settings -version = "2.5.3" +version = "2.6.0" mode = "static" # help message @@ -46,6 +46,8 @@ checksums = { \ '2.5.1' : 'c2a7b519e32197a120cdf47e0f194f81', \ '2.5.2' : 'bd2f18346c788eb54e1e52f4f6acf41a', \ '2.5.3' : 'de30d6e7c2dcc0973298e24a6da24286', \ + '2.5.4' : 'f31b7d16a4be2e30aa7d5c19c3d37853', \ + '2.6.0' : '204d2edae58d9b10ba3ad460cad64191', \ } # parse and process arguments diff --git a/lib/qmmm/Makefile.gfortran b/lib/qmmm/Makefile.gfortran index 717922b4b6..9b43d2eaa0 100644 --- a/lib/qmmm/Makefile.gfortran +++ b/lib/qmmm/Makefile.gfortran @@ -7,9 +7,9 @@ EXTRAMAKE = Makefile.lammps.empty QETOPDIR=$(HOME)/compile/espresso # import compiler settings from Quantum ESPRESSO -sinclude $(QETOPDIR)/make.sys +sinclude $(QETOPDIR)/make.inc -# FLAGS for c++ OpenMPI 1.8.8 or later when QE was compiled with GNU Fortran 4.x +# FLAGS for c++ OpenMPI 3.x.x or later when QE was compiled with GNU Fortran 6.x or 7.x MPICXX=mpicxx MPICXXFLAGS=-DOMPI_SKIP_MPICXX=1 -O2 -Wall -g -fPIC\ -I../../src -I$(QETOPDIR)/COUPLE/include @@ -24,13 +24,21 @@ $(QETOPDIR)/Modules/libqemod.a # part 2: lo-level libraries for all of Q-E LIBOBJS = \ $(QETOPDIR)/FFTXlib/libqefft.a \ +$(QETOPDIR)/dft-d3/libdftd3qe.a \ +$(QETOPDIR)/KS_Solvers/PPCG/libppcg.a \ +$(QETOPDIR)/KS_Solvers/CG/libcg.a \ +$(QETOPDIR)/KS_Solvers/Davidson/libdavid.a \ +$(QETOPDIR)/UtilXlib/libutil.a \ $(QETOPDIR)/LAXlib/libqela.a \ $(QETOPDIR)/clib/clib.a \ $(QETOPDIR)/iotk/src/libiotk.a +# foxlibs + +LIBS += -L${QETOPDIR}/FoX/lib -lFoX_dom -lFoX_sax -lFoX_wxml -lFoX_common -lFoX_utils -lFoX_fsys -L${LAPACK_LIB} -L${BLAS_LIB} -llapack -lblas # part 3: add-on libraries and main library for LAMMPS sinclude ../../src/Makefile.package -LAMMPSCFG = openmpi-omp +LAMMPSCFG = mpi LAMMPSLIB = ../../src/liblammps_$(LAMMPSCFG).a # part 4: local QM/MM library and progams diff --git a/lib/qmmm/Makefile.ifort b/lib/qmmm/Makefile.ifort index d03e67b8a0..1a4f4b600e 100644 --- a/lib/qmmm/Makefile.ifort +++ b/lib/qmmm/Makefile.ifort @@ -3,17 +3,20 @@ # this file will be copied to Makefile.lammps EXTRAMAKE = Makefile.lammps.empty -# top level directory of Quantum ESPRESSO 5.4.1 or later +# top level directory of Quantum ESPRESSO 6.4 or later QETOPDIR=$(HOME)/compile/espresso # import compiler settings from Quantum ESPRESSO -sinclude $(QETOPDIR)/make.sys +sinclude $(QETOPDIR)/make.inc # FLAGS for c++ with IntelMPI when QE was compiled with Intel Fortran -MPICXX=icpc -MPICXXFLAGS=-DOMPI_SKIP_MPICXX=1 -O2 -Wall -g -fPIC\ - -I../../src -I$(QETOPDIR)/COUPLE/include -I${INTELMPI_HOME}/include64 -MPILIBS=-openmp -L${INTELMPI_HOME}/lib64 -lz -lifcore -L$(I_MPI_ROOT)/lib64 -lmpi -lmpiif + +MPICXX=mpiicpc +MPICXXFLAGS=-DOMPI_SKIP_MPICXX=1 -DFC_ABORT_ARG -O2 -Wall -g -fPIC -I${INTEL_HOME}/include -I${INTELMPI_HOME}/include64 \ + -I../../src -I$(QETOPDIR)/COUPLE/include -I$(QETOPDIR)/LAXlib -I$(QETOPDIR)/UtilXlib -I$(QETOPDIR)/FoX/finclude -tbb + +MPILIBS=-qopenmp -L${INTELMPI_HOME}/lib64 -lz -lifcore -lifport -L$(I_MPI_ROOT)/lib64 -lmpi -lmpifort + # location of required libraries # part 1: hi-level libraries for building pw.x @@ -24,13 +27,20 @@ $(QETOPDIR)/Modules/libqemod.a # part 2: lo-level libraries for all of Q-E LIBOBJS = \ $(QETOPDIR)/FFTXlib/libqefft.a \ +$(QETOPDIR)/dft-d3/libdftd3qe.a \ +$(QETOPDIR)/KS_Solvers/PPCG/libppcg.a \ +$(QETOPDIR)/KS_Solvers/CG/libcg.a \ +$(QETOPDIR)/KS_Solvers/Davidson/libdavid.a \ +$(QETOPDIR)/UtilXlib/libutil.a \ $(QETOPDIR)/LAXlib/libqela.a \ $(QETOPDIR)/clib/clib.a \ $(QETOPDIR)/iotk/src/libiotk.a +# foxlibs +LIBS += -L${QETOPDIR}/FoX/lib -lFoX_dom -lFoX_sax -lFoX_wxml -lFoX_common -lFoX_utils -lFoX_fsys -mkl -ltbbmalloc # part 3: add-on libraries and main library for LAMMPS sinclude ../../src/Makefile.package -LAMMPSCFG = galileo-omp +LAMMPSCFG =intel_cpu LAMMPSLIB = ../../src/liblammps_$(LAMMPSCFG).a # part 4: local QM/MM library and progams diff --git a/lib/qmmm/README b/lib/qmmm/README index 2746c9e86e..9046cf59de 100644 --- a/lib/qmmm/README +++ b/lib/qmmm/README @@ -4,7 +4,7 @@ Axel Kohlmeyer, akohlmey@gmail.com Temple University, Philadelphia and ICTP, Trieste with contributions by -Carlo Cavazzoni & Mariella Ippolito +Mariella Ippolito & Carlo Cavazzoni Cineca, Italy This library provides the basic glue code to combine LAMMPS with the @@ -32,9 +32,7 @@ and 4 manually, as outlined below. WARNING: This is experimental code under developement and is provided at this early stage to encourage others to write interfaces to other QM codes. Please test *very* carefully before using this software for -production calculations. At the time of the last update of this README -(July 2016) you have to download a QE snapshot (revision 12611) from -the QE subversion repository. +production calculations. At this point, both mechanical and multipole based electrostatic coupling have been successfully tested on a cluster of water @@ -70,12 +68,7 @@ to confirm that the classical part of the code is set up correctly. Step 3) Build a standalone pw.x executable in the Quantum ESPRESSO directory -and also make the "couple" target. At the time of this writing -(July 2016) you have to download a QE snapshot (revision 12611) -from the SVN repository, since no official release with the -completed QM/MM support code has been made available yet. The current -plan is to have a usable QM/MM interface released with the next -Quantum ESPRESSO release version 6.0. Building the standalone pw.x +and also make the "couple" target. Building the standalone pw.x binary is also needed to confirm that corresponding QM input is working correctly and to run test calculations on QM atoms only. diff --git a/src/GPU/pair_born_coul_long_gpu.cpp b/src/GPU/pair_born_coul_long_gpu.cpp index 39d34420a8..1b548edab6 100644 --- a/src/GPU/pair_born_coul_long_gpu.cpp +++ b/src/GPU/pair_born_coul_long_gpu.cpp @@ -177,6 +177,10 @@ void PairBornCoulLongGPU::init_style() error->all(FLERR,"Pair style requires a KSpace style"); g_ewald = force->kspace->g_ewald; + // setup force tables + + if (ncoultablebits) init_tables(cut_coul,cut_respa); + int maxspecial=0; if (atom->molecular) maxspecial=atom->maxspecial; diff --git a/src/GPU/pair_buck_coul_long_gpu.cpp b/src/GPU/pair_buck_coul_long_gpu.cpp index e30230d5a0..7e59562ebf 100644 --- a/src/GPU/pair_buck_coul_long_gpu.cpp +++ b/src/GPU/pair_buck_coul_long_gpu.cpp @@ -173,6 +173,10 @@ void PairBuckCoulLongGPU::init_style() error->all(FLERR,"Pair style requires a KSpace style"); g_ewald = force->kspace->g_ewald; + // setup force tables + + if (ncoultablebits) init_tables(cut_coul,cut_respa); + int maxspecial=0; if (atom->molecular) maxspecial=atom->maxspecial; diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.cpp b/src/GPU/pair_lj_class2_coul_long_gpu.cpp index 4ee776b4ff..96ba4e0a09 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_class2_coul_long_gpu.cpp @@ -170,6 +170,10 @@ void PairLJClass2CoulLongGPU::init_style() error->all(FLERR,"Pair style requires a KSpace style"); g_ewald = force->kspace->g_ewald; + // setup force tables + + if (ncoultablebits) init_tables(cut_coul,cut_respa); + int maxspecial=0; if (atom->molecular) maxspecial=atom->maxspecial; diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index e0b1c92821..540389f599 100755 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -85,6 +85,8 @@ action comm_kokkos.cpp action comm_kokkos.h action comm_tiled_kokkos.cpp action comm_tiled_kokkos.h +action compute_orientorder_atom_kokkos.cpp +action compute_orientorder_atom_kokkos.h action compute_temp_kokkos.cpp action compute_temp_kokkos.h action dihedral_charmm_kokkos.cpp dihedral_charmm.cpp diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp new file mode 100644 index 0000000000..7915e4faa9 --- /dev/null +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp @@ -0,0 +1,698 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Stan Moore (SNL) +------------------------------------------------------------------------- */ + +#include "compute_orientorder_atom_kokkos.h" +#include +#include +#include +#include "atom_kokkos.h" +#include "update.h" +#include "modify.h" +#include "neighbor_kokkos.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "force.h" +#include "pair.h" +#include "comm.h" +#include "memory_kokkos.h" +#include "error.h" +#include "math_const.h" +#include "atom_masks.h" +#include "kokkos.h" + +using namespace LAMMPS_NS; +using namespace MathConst; +using namespace std; + +#ifdef DBL_EPSILON + #define MY_EPSILON (10.0*DBL_EPSILON) +#else + #define MY_EPSILON (10.0*2.220446049250313e-16) +#endif + +#define QEPSILON 1.0e-6 + +/* ---------------------------------------------------------------------- */ + +template +ComputeOrientOrderAtomKokkos::ComputeOrientOrderAtomKokkos(LAMMPS *lmp, int narg, char **arg) : + ComputeOrientOrderAtom(lmp, narg, arg) +{ + atomKK = (AtomKokkos *) atom; + execution_space = ExecutionSpaceFromDevice::space; + datamask_read = EMPTY_MASK; + datamask_modify = EMPTY_MASK; +} + +/* ---------------------------------------------------------------------- */ + +template +ComputeOrientOrderAtomKokkos::~ComputeOrientOrderAtomKokkos() +{ + if (copymode) return; + + memoryKK->destroy_kokkos(k_qnarray,qnarray); +} + +/* ---------------------------------------------------------------------- */ + +template +void ComputeOrientOrderAtomKokkos::init() +{ + ComputeOrientOrderAtom::init(); + + d_qlist = t_sna_1i("orientorder/atom:qlist",nqlist); + auto h_qlist = Kokkos::create_mirror_view(d_qlist); + for (int i = 0; i < nqlist; i++) + h_qlist(i) = qlist[i]; + Kokkos::deep_copy(d_qlist,h_qlist); + + // need an occasional full neighbor list + + // irequest = neigh request made by parent class + + int irequest = neighbor->nrequest - 1; + + neighbor->requests[irequest]-> + kokkos_host = Kokkos::Impl::is_same::value && + !Kokkos::Impl::is_same::value; + neighbor->requests[irequest]-> + kokkos_device = Kokkos::Impl::is_same::value; +} + +/* ---------------------------------------------------------------------- */ + +template +struct FindMaxNumNeighs { + typedef DeviceType device_type; + NeighListKokkos k_list; + + FindMaxNumNeighs(NeighListKokkos* nl): k_list(*nl) {} + ~FindMaxNumNeighs() {k_list.copymode = 1;} + + KOKKOS_INLINE_FUNCTION + void operator() (const int& ii, int& maxneigh) const { + const int i = k_list.d_ilist[ii]; + const int num_neighs = k_list.d_numneigh[i]; + if (maxneigh < num_neighs) maxneigh = num_neighs; + } +}; + +/* ---------------------------------------------------------------------- */ + +template +void ComputeOrientOrderAtomKokkos::compute_peratom() +{ + invoked_peratom = update->ntimestep; + + // invoke full neighbor list (will copy or build if necessary) + + neighbor->build_one(list); + + inum = list->inum; + NeighListKokkos* k_list = static_cast*>(list); + d_numneigh = k_list->d_numneigh; + d_neighbors = k_list->d_neighbors; + d_ilist = k_list->d_ilist; + + maxneigh = 0; + Kokkos::parallel_reduce("ComputeOrientOrderAtomKokkos::find_max_neighs",inum, FindMaxNumNeighs(k_list), Kokkos::Experimental::Max(maxneigh)); + + // grow order parameter array if necessary + + if (atom->nmax > nmax) { + memoryKK->destroy_kokkos(k_qnarray,qnarray); + nmax = atom->nmax; + memoryKK->create_kokkos(k_qnarray,qnarray,nmax,ncol,"orientorder/atom:qnarray"); + array_atom = qnarray; + d_qnarray = k_qnarray.template view(); + + d_qnm = t_sna_3c("orientorder/atom:qnm",nmax,nqlist,2*qmax+1); + d_ncount = t_sna_1i("orientorder/atom:ncount",nmax); + + // insure distsq and nearest arrays are long enough + + if (maxneigh > d_distsq.extent(1)) { + d_distsq = t_sna_2d_lr("orientorder/atom:distsq",nmax,maxneigh); + d_nearest = t_sna_2i_lr("orientorder/atom:nearest",nmax,maxneigh); + d_rlist = t_sna_3d_lr("orientorder/atom:rlist",nmax,maxneigh,3); + + d_distsq_um = d_distsq; + d_rlist_um = d_rlist; + d_nearest_um = d_nearest; + } + } + + // compute order parameter for each atom in group + // use full neighbor list to count atoms less than cutoff + + atomKK->sync(execution_space,X_MASK|MASK_MASK); + x = atomKK->k_x.view(); + mask = atomKK->k_mask.view(); + + Kokkos::deep_copy(d_qnm,{0.0,0.0}); + + int vector_length = 1; + int team_size = 1; + int team_size_max = Kokkos::TeamPolicy::team_size_max(*this); +#ifdef KOKKOS_ENABLE_CUDA + team_size = 32;//maxneigh; + if (team_size*vector_length > team_size_max) + team_size = team_size_max/vector_length; +#endif + + copymode = 1; + + //Neigh + typename Kokkos::TeamPolicy policy_neigh(inum,team_size,vector_length); + Kokkos::parallel_for("ComputeOrientOrderAtomNeigh",policy_neigh,*this); + + //Select3 + typename Kokkos::RangePolicy policy_select3(0,inum); + Kokkos::parallel_for("ComputeOrientOrderAtomSelect3",policy_select3,*this); + + //BOOP1 + typename Kokkos::TeamPolicy policy_boop1(((inum+team_size-1)/team_size)*maxneigh,team_size,vector_length); + Kokkos::parallel_for("ComputeOrientOrderAtomBOOP1",policy_boop1,*this); + + //BOOP2 + typename Kokkos::RangePolicy policy_boop2(0,inum); + Kokkos::parallel_for("ComputeOrientOrderAtomBOOP2",policy_boop2,*this); + + copymode = 0; + + k_qnarray.template modify(); + k_qnarray.template sync(); +} + +/* ---------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomNeigh,const typename Kokkos::TeamPolicy::member_type& team) const +{ + const int ii = team.league_rank(); + const int i = d_ilist[ii]; + if (mask[i] & groupbit) { + const X_FLOAT xtmp = x(i,0); + const X_FLOAT ytmp = x(i,1); + const X_FLOAT ztmp = x(i,2); + const int jnum = d_numneigh[i]; + + // loop over list of all neighbors within force cutoff + // distsq[] = distance sq to each + // rlist[] = distance vector to each + // nearest[] = atom indices of neighbors + + int ncount = 0; + Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,jnum), + [&] (const int jj, int& count) { + Kokkos::single(Kokkos::PerThread(team), [&] (){ + int j = d_neighbors(i,jj); + j &= NEIGHMASK; + const F_FLOAT delx = x(j,0) - xtmp; + const F_FLOAT dely = x(j,1) - ytmp; + const F_FLOAT delz = x(j,2) - ztmp; + const F_FLOAT rsq = delx*delx + dely*dely + delz*delz; + if (rsq < cutsq) + count++; + }); + },ncount); + + d_ncount(ii) = ncount; + + if (team.team_rank() == 0) + Kokkos::parallel_scan(Kokkos::ThreadVectorRange(team,jnum), + [&] (const int jj, int& offset, bool final) { + int j = d_neighbors(i,jj); + j &= NEIGHMASK; + const F_FLOAT delx = x(j,0) - xtmp; + const F_FLOAT dely = x(j,1) - ytmp; + const F_FLOAT delz = x(j,2) - ztmp; + const F_FLOAT rsq = delx*delx + dely*dely + delz*delz; + if (rsq < cutsq) { + if (final) { + d_distsq(ii,offset) = rsq; + d_rlist(ii,offset,0) = delx; + d_rlist(ii,offset,1) = dely; + d_rlist(ii,offset,2) = delz; + d_nearest(ii,offset) = j; + } + offset++; + } + }); + } +} + +template +KOKKOS_INLINE_FUNCTION +void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomSelect3,const int& ii) const { + + const int i = d_ilist[ii]; + const int ncount = d_ncount(ii); + + // if not nnn neighbors, order parameter = 0; + + if ((ncount == 0) || (ncount < nnn)) { + for (int jj = 0; jj < ncol; jj++) + d_qnarray(i,jj) = 0.0; + return; + } + + // if nnn > 0, use only nearest nnn neighbors + + if (nnn > 0) { + select3(nnn, ncount, ii); + d_ncount(ii) = nnn; + } +} + +template +KOKKOS_INLINE_FUNCTION +void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomBOOP1,const typename Kokkos::TeamPolicy::member_type& team) const { + + // Extract the atom number + int ii = team.team_rank() + team.team_size() * (team.league_rank() % ((inum+team.team_size()-1)/team.team_size())); + if (ii >= inum) return; + + // Extract the neighbor number + const int jj = team.league_rank() / ((inum+team.team_size()-1)/team.team_size()); + const int ncount = d_ncount(ii); + if (jj >= ncount) return; + + // if not nnn neighbors, order parameter = 0; + + if ((ncount == 0) || (ncount < nnn)) + return; + + calc_boop1(ncount, ii, jj); +} + +template +KOKKOS_INLINE_FUNCTION +void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomBOOP2,const int& ii) const { + const int i = d_ilist[ii]; + const int ncount = d_ncount(ii); + calc_boop2(ncount, ii); +} + + +/* ---------------------------------------------------------------------- + select3 routine from Numerical Recipes (slightly modified) + find k smallest values in array of length n + sort auxiliary arrays at same time +------------------------------------------------------------------------- */ + +// Use no-op do while to create single statement + +#define SWAP(view,i,j) do { \ + tmp = view(i); view(i) = view(j); view(j) = tmp; \ + } while(0) + +#define ISWAP(view,i,j) do { \ + itmp = view(i); view(i) = view(j); view(j) = itmp; \ + } while(0) + +#define SWAP3(view,i,j) do { \ + tmp = view(i,0); view(i,0) = view(j,0); view(j,0) = tmp; \ + tmp = view(i,1); view(i,1) = view(j,1); view(j,1) = tmp; \ + tmp = view(i,2); view(i,2) = view(j,2); view(j,2) = tmp; \ + } while(0) + +/* ---------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +void ComputeOrientOrderAtomKokkos::select3(int k, int n, int iatom) const +{ + int i,ir,j,l,mid,ia,itmp; + double a,tmp,a3[3]; + + auto arr = Kokkos::subview(d_distsq_um, iatom, Kokkos::ALL); + auto iarr = Kokkos::subview(d_nearest_um, iatom, Kokkos::ALL); + auto arr3 = Kokkos::subview(d_rlist_um, iatom, Kokkos::ALL, Kokkos::ALL); + + l = 0; + ir = n-1; + for (;;) { + if (ir <= l+1) { + if (ir == l+1 && arr[ir] < arr[l]) { + SWAP(arr,l,ir); + ISWAP(iarr,l,ir); + SWAP3(arr3,l,ir); + } + return; + } else { + mid=((l+ir+2) >> 1) - 1; + SWAP(arr,mid,l+1); + ISWAP(iarr,mid,l+1); + SWAP3(arr3,mid,l+1); + if (arr[l] > arr[ir]) { + SWAP(arr,l,ir); + ISWAP(iarr,l,ir); + SWAP3(arr3,l,ir); + } + if (arr[l+1] > arr[ir]) { + SWAP(arr,l+1,ir); + ISWAP(iarr,l+1,ir); + SWAP3(arr3,l+1,ir); + } + if (arr[l] > arr[l+1]) { + SWAP(arr,l,l+1); + ISWAP(iarr,l,l+1); + SWAP3(arr3,l,l+1); + } + i = l+1; + j = ir; + a = arr[l+1]; + ia = iarr[l+1]; + a3[0] = arr3(l+1,0); + a3[1] = arr3(l+1,1); + a3[2] = arr3(l+1,2); + for (;;) { + do i++; while (arr[i] < a); + do j--; while (arr[j] > a); + if (j < i) break; + SWAP(arr,i,j); + ISWAP(iarr,i,j); + SWAP3(arr3,i,j); + } + arr[l+1] = arr[j]; + arr[j] = a; + iarr[l+1] = iarr[j]; + iarr[j] = ia; + arr3(l+1,0) = arr3(j,0); + arr3(l+1,1) = arr3(j,1); + arr3(l+1,2) = arr3(j,2); + arr3(j,0) = a3[0]; + arr3(j,1) = a3[1]; + arr3(j,2) = a3[2]; + if (j+1 >= k) ir = j-1; + if (j+1 <= k) l = i; + } + } +} + +/* ---------------------------------------------------------------------- + calculate the bond orientational order parameters +------------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +void ComputeOrientOrderAtomKokkos::calc_boop1(int ncount, int iatom, int ineigh) const +{ + const double r0 = d_rlist(iatom,ineigh,0); + const double r1 = d_rlist(iatom,ineigh,1); + const double r2 = d_rlist(iatom,ineigh,2); + const double rmag = sqrt(r0*r0 + r1*r1 + r2*r2); + if(rmag <= MY_EPSILON) { + return; + } + + const double costheta = r2 / rmag; + SNAcomplex expphi = {r0,r1}; + const double rxymag = sqrt(expphi.re*expphi.re+expphi.im*expphi.im); + if(rxymag <= MY_EPSILON) { + expphi.re = 1.0; + expphi.im = 0.0; + } else { + const double rxymaginv = 1.0/rxymag; + expphi.re *= rxymaginv; + expphi.im *= rxymaginv; + } + + for (int il = 0; il < nqlist; il++) { + const int l = d_qlist[il]; + + //d_qnm(iatom,il,l).re += polar_prefactor(l, 0, costheta); + const double polar_pf = polar_prefactor(l, 0, costheta); + Kokkos::atomic_add(&(d_qnm(iatom,il,l).re), polar_pf); + SNAcomplex expphim = {expphi.re,expphi.im}; + for(int m = 1; m <= +l; m++) { + const double prefactor = polar_prefactor(l, m, costheta); + SNAcomplex c = {prefactor * expphim.re, prefactor * expphim.im}; + //d_qnm(iatom,il,m+l).re += c.re; + //d_qnm(iatom,il,m+l).im += c.im; + Kokkos::atomic_add(&(d_qnm(iatom,il,m+l).re), c.re); + Kokkos::atomic_add(&(d_qnm(iatom,il,m+l).im), c.im); + if(m & 1) { + //d_qnm(iatom,il,-m+l).re -= c.re; + //d_qnm(iatom,il,-m+l).im += c.im; + Kokkos::atomic_add(&(d_qnm(iatom,il,-m+l).re), -c.re); + Kokkos::atomic_add(&(d_qnm(iatom,il,-m+l).im), c.im); + } else { + //d_qnm(iatom,il,-m+l).re += c.re; + //d_qnm(iatom,il,-m+l).im -= c.im; + Kokkos::atomic_add(&(d_qnm(iatom,il,-m+l).re), c.re); + Kokkos::atomic_add(&(d_qnm(iatom,il,-m+l).im), -c.im); + } + SNAcomplex tmp; + tmp.re = expphim.re*expphi.re - expphim.im*expphi.im; + tmp.im = expphim.re*expphi.im + expphim.im*expphi.re; + expphim.re = tmp.re; + expphim.im = tmp.im; + } + } +} + +/* ---------------------------------------------------------------------- + calculate the bond orientational order parameters +------------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +void ComputeOrientOrderAtomKokkos::calc_boop2(int ncount, int iatom) const +{ + // convert sums to averages + + double facn = 1.0 / ncount; + for (int il = 0; il < nqlist; il++) { + int l = d_qlist[il]; + for(int m = 0; m < 2*l+1; m++) { + d_qnm(iatom,il,m).re *= facn; + d_qnm(iatom,il,m).im *= facn; + } + } + + // calculate Q_l + // NOTE: optional W_l_hat and components of Q_qlcomp use these stored Q_l values + + int jj = 0; + for (int il = 0; il < nqlist; il++) { + int l = d_qlist[il]; + double qnormfac = sqrt(MY_4PI/(2*l+1)); + double qm_sum = 0.0; + for(int m = 0; m < 2*l+1; m++) + qm_sum += d_qnm(iatom,il,m).re*d_qnm(iatom,il,m).re + d_qnm(iatom,il,m).im*d_qnm(iatom,il,m).im; + d_qnarray(iatom,jj++) = qnormfac * sqrt(qm_sum); + } + + // calculate W_l + + if (wlflag) { + int idxcg_count = 0; + for (int il = 0; il < nqlist; il++) { + int l = d_qlist[il]; + double wlsum = 0.0; + for(int m1 = 0; m1 < 2*l+1; m1++) { + for(int m2 = MAX(0,l-m1); m2 < MIN(2*l+1,3*l-m1+1); m2++) { + int m = m1 + m2 - l; + SNAcomplex qm1qm2; + qm1qm2.re = d_qnm(iatom,il,m1).re*d_qnm(iatom,il,m2).re - d_qnm(iatom,il,m1).im*d_qnm(iatom,il,m2).im; + qm1qm2.im = d_qnm(iatom,il,m1).re*d_qnm(iatom,il,m2).im + d_qnm(iatom,il,m1).im*d_qnm(iatom,il,m2).re; + wlsum += (qm1qm2.re*d_qnm(iatom,il,m).re + qm1qm2.im*d_qnm(iatom,il,m).im)*d_cglist[idxcg_count]; + idxcg_count++; + } + } + d_qnarray(iatom,jj++) = wlsum/sqrt(2.0*l+1.0); + } + } + + // calculate W_l_hat + + if (wlhatflag) { + int idxcg_count = 0; + for (int il = 0; il < nqlist; il++) { + int l = d_qlist[il]; + double wlsum = 0.0; + for(int m1 = 0; m1 < 2*l+1; m1++) { + for(int m2 = MAX(0,l-m1); m2 < MIN(2*l+1,3*l-m1+1); m2++) { + const int m = m1 + m2 - l; + SNAcomplex qm1qm2; + qm1qm2.re = d_qnm(iatom,il,m1).re*d_qnm(iatom,il,m2).re - d_qnm(iatom,il,m1).im*d_qnm(iatom,il,m2).im; + qm1qm2.im = d_qnm(iatom,il,m1).re*d_qnm(iatom,il,m2).im + d_qnm(iatom,il,m1).im*d_qnm(iatom,il,m2).re; + wlsum += (qm1qm2.re*d_qnm(iatom,il,m).re + qm1qm2.im*d_qnm(iatom,il,m).im)*d_cglist[idxcg_count]; + idxcg_count++; + } + } + // Whats = [w/(q/np.sqrt(np.pi * 4 / (2 * l + 1)))**3 if abs(q) > 1.0e-6 else 0.0 for l,q,w in zip(range(1,max_l+1),Qs,Ws)] + if (d_qnarray(iatom,il) < QEPSILON) + d_qnarray(iatom,jj++) = 0.0; + else { + const double qnormfac = sqrt(MY_4PI/(2*l+1)); + const double qnfac = qnormfac/d_qnarray(iatom,il); + d_qnarray(iatom,jj++) = wlsum/sqrt(2.0*l+1.0)*(qnfac*qnfac*qnfac); + } + } + } + + // Calculate components of Q_l, for l=qlcomp + + if (qlcompflag) { + const int il = iqlcomp; + const int l = qlcomp; + if (d_qnarray(iatom,il) < QEPSILON) + for(int m = 0; m < 2*l+1; m++) { + d_qnarray(iatom,jj++) = 0.0; + d_qnarray(iatom,jj++) = 0.0; + } + else { + const double qnormfac = sqrt(MY_4PI/(2*l+1)); + const double qnfac = qnormfac/d_qnarray(iatom,il); + for(int m = 0; m < 2*l+1; m++) { + d_qnarray(iatom,jj++) = d_qnm(iatom,il,m).re * qnfac; + d_qnarray(iatom,jj++) = d_qnm(iatom,il,m).im * qnfac; + } + } + } + +} + +/* ---------------------------------------------------------------------- + polar prefactor for spherical harmonic Y_l^m, where + Y_l^m (theta, phi) = prefactor(l, m, cos(theta)) * exp(i*m*phi) +------------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +double ComputeOrientOrderAtomKokkos::polar_prefactor(int l, int m, double costheta) const +{ + const int mabs = abs(m); + + double prefactor = 1.0; + for (int i=l-mabs+1; i < l+mabs+1; ++i) + prefactor *= static_cast(i); + + prefactor = sqrt(static_cast(2*l+1)/(MY_4PI*prefactor)) + * associated_legendre(l,mabs,costheta); + + if ((m < 0) && (m % 2)) prefactor = -prefactor; + + return prefactor; +} + +/* ---------------------------------------------------------------------- + associated legendre polynomial +------------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +double ComputeOrientOrderAtomKokkos::associated_legendre(int l, int m, double x) const +{ + if (l < m) return 0.0; + + double p(1.0), pm1(0.0), pm2(0.0); + + if (m != 0) { + const double sqx = sqrt(1.0-x*x); + for (int i=1; i < m+1; ++i) + p *= static_cast(2*i-1) * sqx; + } + + for (int i=m+1; i < l+1; ++i) { + pm2 = pm1; + pm1 = p; + p = (static_cast(2*i-1)*x*pm1 + - static_cast(i+m-1)*pm2) / static_cast(i-m); + } + + return p; +} + +/* ---------------------------------------------------------------------- + assign Clebsch-Gordan coefficients + using the quasi-binomial formula VMK 8.2.1(3) + specialized for case j1=j2=j=l +------------------------------------------------------------------------- */ + +template +void ComputeOrientOrderAtomKokkos::init_clebsch_gordan() +{ + double sum,dcg,sfaccg, sfac1, sfac2; + int m, aa2, bb2, cc2; + int ifac, idxcg_count; + + idxcg_count = 0; + for (int il = 0; il < nqlist; il++) { + int l = qlist[il]; + for(int m1 = 0; m1 < 2*l+1; m1++) + for(int m2 = MAX(0,l-m1); m2 < MIN(2*l+1,3*l-m1+1); m2++) + idxcg_count++; + } + idxcg_max = idxcg_count; + d_cglist = t_sna_1d("orientorder/atom:d_cglist",idxcg_max); + auto h_cglist = Kokkos::create_mirror_view(d_cglist); + + idxcg_count = 0; + for (int il = 0; il < nqlist; il++) { + int l = qlist[il]; + for(int m1 = 0; m1 < 2*l+1; m1++) { + aa2 = m1 - l; + for(int m2 = MAX(0,l-m1); m2 < MIN(2*l+1,3*l-m1+1); m2++) { + bb2 = m2 - l; + m = aa2 + bb2 + l; + + sum = 0.0; + for (int z = MAX(0, MAX(-aa2, bb2)); + z <= MIN(l, MIN(l - aa2, l + bb2)); z++) { + ifac = z % 2 ? -1 : 1; + sum += ifac / + (factorial(z) * + factorial(l - z) * + factorial(l - aa2 - z) * + factorial(l + bb2 - z) * + factorial(aa2 + z) * + factorial(-bb2 + z)); + } + + cc2 = m - l; + sfaccg = sqrt(factorial(l + aa2) * + factorial(l - aa2) * + factorial(l + bb2) * + factorial(l - bb2) * + factorial(l + cc2) * + factorial(l - cc2) * + (2*l + 1)); + + sfac1 = factorial(3*l + 1); + sfac2 = factorial(l); + dcg = sqrt(sfac2*sfac2*sfac2 / sfac1); + + h_cglist[idxcg_count] = sum * dcg * sfaccg; + idxcg_count++; + } + } + } + Kokkos::deep_copy(d_cglist,h_cglist); +} + +namespace LAMMPS_NS { +template class ComputeOrientOrderAtomKokkos; +#ifdef KOKKOS_ENABLE_CUDA +template class ComputeOrientOrderAtomKokkos; +#endif +} diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.h b/src/KOKKOS/compute_orientorder_atom_kokkos.h new file mode 100644 index 0000000000..b0e96df0ec --- /dev/null +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.h @@ -0,0 +1,150 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef COMPUTE_CLASS + +ComputeStyle(orientorder/atom/kk,ComputeOrientOrderAtomKokkos) +ComputeStyle(orientorder/atom/kk/device,ComputeOrientOrderAtomKokkos) +ComputeStyle(orientorder/atom/kk/host,ComputeOrientOrderAtomKokkos) + +#else + +#ifndef LMP_COMPUTE_ORIENTORDER_ATOM_KOKKOS_H +#define LMP_COMPUTE_ORIENTORDER_ATOM_KOKKOS_H + +#include "compute_orientorder_atom.h" +#include "kokkos_type.h" + +namespace LAMMPS_NS { + +typedef double SNAreal; + +struct alignas(2*sizeof(SNAreal)) SNAcomplex{ + SNAreal re, im; + + KOKKOS_INLINE_FUNCTION + SNAcomplex() : re(0),im(0) + {} + + KOKKOS_INLINE_FUNCTION + SNAcomplex(SNAreal real_in, SNAreal imag_in) + :re(real_in),im(imag_in) + {} +}; + +struct TagComputeOrientOrderAtomNeigh{}; +struct TagComputeOrientOrderAtomSelect3{}; +struct TagComputeOrientOrderAtomBOOP1{}; +struct TagComputeOrientOrderAtomBOOP2{}; + +template +class ComputeOrientOrderAtomKokkos : public ComputeOrientOrderAtom { + public: + typedef Kokkos::View t_sna_1i; + typedef Kokkos::View t_sna_1d; + typedef Kokkos::View > t_sna_1d_atomic; + typedef Kokkos::View t_sna_2i_lr; + typedef Kokkos::View > t_sna_2i_lr_um; + typedef Kokkos::View t_sna_2i; + typedef Kokkos::View t_sna_2d; + typedef Kokkos::View t_sna_2d_lr; + typedef Kokkos::DualView tdual_sna_2d_lr; + typedef Kokkos::View > t_sna_2d_lr_um; + typedef Kokkos::View t_sna_3d; + typedef Kokkos::View t_sna_3d_lr; + typedef Kokkos::View > t_sna_3d_lr_um; + typedef Kokkos::View t_sna_4d; + typedef Kokkos::View t_sna_3d3; + typedef Kokkos::View t_sna_5d; + + typedef Kokkos::View t_sna_1c; + typedef Kokkos::View > t_sna_1c_atomic; + typedef Kokkos::View t_sna_2c; + typedef Kokkos::View t_sna_2c_lr; + typedef Kokkos::View t_sna_3c; + typedef Kokkos::View t_sna_4c; + typedef Kokkos::View t_sna_3c3; + typedef Kokkos::View t_sna_5c; + + typedef DeviceType device_type; + typedef ArrayTypes AT; + typedef int value_type; + + ComputeOrientOrderAtomKokkos(class LAMMPS *, int, char **); + ~ComputeOrientOrderAtomKokkos(); + void init(); + void compute_peratom(); + t_sna_1i d_qlist; + + KOKKOS_INLINE_FUNCTION + void operator() (TagComputeOrientOrderAtomNeigh, const typename Kokkos::TeamPolicy::member_type& team) const; + + KOKKOS_INLINE_FUNCTION + void operator() (TagComputeOrientOrderAtomSelect3, const int& ii) const; + + KOKKOS_INLINE_FUNCTION + void operator() (TagComputeOrientOrderAtomBOOP1, const typename Kokkos::TeamPolicy::member_type& team) const; + + KOKKOS_INLINE_FUNCTION + void operator() (TagComputeOrientOrderAtomBOOP2, const int& ii) const; + + private: + int inum; + + typename AT::t_x_array_randomread x; + typename ArrayTypes::t_int_1d mask; + + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; + + t_sna_1i d_ncount; + t_sna_2d_lr d_distsq; + t_sna_2i_lr d_nearest; + t_sna_3d_lr d_rlist; + + t_sna_2d_lr_um d_distsq_um; + t_sna_2i_lr_um d_nearest_um; + t_sna_3d_lr_um d_rlist_um; + + tdual_sna_2d_lr k_qnarray; + t_sna_2d_lr d_qnarray; + t_sna_3c d_qnm; + + KOKKOS_INLINE_FUNCTION + void select3(int, int, int) const; + + KOKKOS_INLINE_FUNCTION + void calc_boop1(int, int, int) const; + + KOKKOS_INLINE_FUNCTION + void calc_boop2(int, int) const; + + KOKKOS_INLINE_FUNCTION + double polar_prefactor(int, int, double) const; + + KOKKOS_INLINE_FUNCTION + double associated_legendre(int, int, double) const; + + void init_clebsch_gordan(); + t_sna_1d d_cglist; // Clebsch-Gordan coeffs +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +*/ diff --git a/src/KSPACE/pair_born_coul_long.cpp b/src/KSPACE/pair_born_coul_long.cpp index b5b3eda64f..b4d050412a 100644 --- a/src/KSPACE/pair_born_coul_long.cpp +++ b/src/KSPACE/pair_born_coul_long.cpp @@ -47,6 +47,7 @@ PairBornCoulLong::PairBornCoulLong(LAMMPS *lmp) : Pair(lmp) ewaldflag = pppmflag = 1; ftable = NULL; writedata = 1; + cut_respa = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index 7f369045c3..6c731b73b3 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -52,6 +52,7 @@ PairBuckLongCoulLong::PairBuckLongCoulLong(LAMMPS *lmp) : Pair(lmp) writedata = 1; ftable = NULL; fdisptable = NULL; + cut_respa = NULL; } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pair_coul_long.cpp b/src/KSPACE/pair_coul_long.cpp index 004835007d..9a9f2f3783 100644 --- a/src/KSPACE/pair_coul_long.cpp +++ b/src/KSPACE/pair_coul_long.cpp @@ -46,6 +46,7 @@ PairCoulLong::PairCoulLong(LAMMPS *lmp) : Pair(lmp) ewaldflag = pppmflag = 1; ftable = NULL; qdist = 0.0; + cut_respa = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index 22ed923b49..390005d80e 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -51,6 +51,7 @@ PairLJCharmmCoulLong::PairLJCharmmCoulLong(LAMMPS *lmp) : Pair(lmp) implicit = 0; mix_flag = ARITHMETIC; writedata = 1; + cut_respa = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index ce7fda5f18..0371ac42c5 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -55,6 +55,7 @@ PairLJCharmmfswCoulLong::PairLJCharmmfswCoulLong(LAMMPS *lmp) : Pair(lmp) implicit = 0; mix_flag = ARITHMETIC; writedata = 1; + cut_respa = NULL; // short-range/long-range flag accessed by DihedralCharmmfsw diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index 23e182435d..ff20dc2570 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -53,6 +53,7 @@ PairLJCutCoulLong::PairLJCutCoulLong(LAMMPS *lmp) : Pair(lmp) writedata = 1; ftable = NULL; qdist = 0.0; + cut_respa = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index 4af3cdeecd..94955d2d6d 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -55,6 +55,7 @@ PairLJLongCoulLong::PairLJLongCoulLong(LAMMPS *lmp) : Pair(lmp) ftable = NULL; fdisptable = NULL; qdist = 0.0; + cut_respa = NULL; } /* ---------------------------------------------------------------------- diff --git a/src/USER-PLUMED/fix_plumed.cpp b/src/USER-PLUMED/fix_plumed.cpp index b02de2af0d..e1f0ea0bfe 100644 --- a/src/USER-PLUMED/fix_plumed.cpp +++ b/src/USER-PLUMED/fix_plumed.cpp @@ -78,8 +78,9 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) : int api_version; p->cmd("getApiVersion",&api_version); - if (api_version > 6) - error->all(FLERR,"Incompatible API version for PLUMED in fix plumed"); + if ((api_version < 5) || (api_version > 7)) + error->all(FLERR,"Incompatible API version for PLUMED in fix plumed. " + "Only Plumed 2.4.x, 2.5.x, and 2.6.x are tested and supported."); // If the -partition option is activated then enable // inter-partition communication diff --git a/src/compute_orientorder_atom.cpp b/src/compute_orientorder_atom.cpp index dcb104fc3a..2abe4e3bb3 100644 --- a/src/compute_orientorder_atom.cpp +++ b/src/compute_orientorder_atom.cpp @@ -162,6 +162,8 @@ ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg ComputeOrientOrderAtom::~ComputeOrientOrderAtom() { + if (copymode) return; + memory->destroy(qnarray); memory->destroy(distsq); memory->destroy(rlist); diff --git a/src/compute_orientorder_atom.h b/src/compute_orientorder_atom.h index 643875ccd0..46894db373 100644 --- a/src/compute_orientorder_atom.h +++ b/src/compute_orientorder_atom.h @@ -28,16 +28,16 @@ class ComputeOrientOrderAtom : public Compute { public: ComputeOrientOrderAtom(class LAMMPS *, int, char **); ~ComputeOrientOrderAtom(); - void init(); + virtual void init(); void init_list(int, class NeighList *); - void compute_peratom(); + virtual void compute_peratom(); double memory_usage(); double cutsq; int iqlcomp, qlcomp, qlcompflag, wlflag, wlhatflag; int *qlist; int nqlist; - private: + protected: int nmax,maxneigh,ncol,nnn; class NeighList *list; double *distsq; @@ -59,7 +59,7 @@ class ComputeOrientOrderAtom : public Compute { static const int nmaxfactorial = 167; static const double nfac_table[]; double factorial(int); - void init_clebsch_gordan(); + virtual void init_clebsch_gordan(); double *cglist; // Clebsch-Gordan coeffs int idxcg_max; }; diff --git a/src/lmptype.h b/src/lmptype.h index c1902e7ebe..65e46535fc 100644 --- a/src/lmptype.h +++ b/src/lmptype.h @@ -28,13 +28,6 @@ #ifndef LMP_LMPTYPE_H #define LMP_LMPTYPE_H -// C++11 check -#ifndef LAMMPS_CXX98 -#if __cplusplus <= 199711L - #error LAMMPS is planning to transition to C++11. To disable this error please use a C++11 compliant compiler, enable C++11 (or later) compliance, or define LAMMPS_CXX98 in your makefile -#endif -#endif - #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #endif diff --git a/src/modify.cpp b/src/modify.cpp index 101540f786..864bc8f2b4 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -50,6 +50,7 @@ Modify::Modify(LAMMPS *lmp) : Pointers(lmp) n_pre_force_respa = n_post_force_respa = n_final_integrate_respa = 0; n_min_pre_exchange = n_min_pre_force = n_min_pre_reverse = 0; n_min_post_force = n_min_energy = 0; + n_timeflag = -1; fix = NULL; fmask = NULL; @@ -526,6 +527,11 @@ void Modify::thermo_energy_atom(int nlocal, double *energy) void Modify::post_run() { for (int i = 0; i < nfix; i++) fix[i]->post_run(); + + // must reset this to its default value, since computes may be added + // or removed between runs and with this change we will redirect any + // calls to addstep_compute() to addstep_compute_all() instead. + n_timeflag = -1; } /* ---------------------------------------------------------------------- @@ -1283,6 +1289,14 @@ void Modify::clearstep_compute() void Modify::addstep_compute(bigint newstep) { + // If we are called before the first run init, n_timeflag is not yet + // initialized, thus defer to addstep_compute_all() instead + + if (n_timeflag < 0) { + addstep_compute_all(newstep); + return; + } + for (int icompute = 0; icompute < n_timeflag; icompute++) if (compute[list_timeflag[icompute]]->invoked_flag) compute[list_timeflag[icompute]]->addstep(newstep); diff --git a/src/pair_coul_streitz.h b/src/pair_coul_streitz.h index c304365270..0f23c111c7 100644 --- a/src/pair_coul_streitz.h +++ b/src/pair_coul_streitz.h @@ -55,7 +55,6 @@ class PairCoulStreitz : public Pair { // Kspace parameters int kspacetype; double cut_coul, cut_coulsq; - double *cut_respa; double **scale; // Wolf diff --git a/src/pair_lj96_cut.cpp b/src/pair_lj96_cut.cpp index f554872965..8be6fefa44 100644 --- a/src/pair_lj96_cut.cpp +++ b/src/pair_lj96_cut.cpp @@ -41,6 +41,7 @@ PairLJ96Cut::PairLJ96Cut(LAMMPS *lmp) : Pair(lmp) { respa_enable = 1; writedata = 1; + cut_respa = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_mie_cut.cpp b/src/pair_mie_cut.cpp index 4ce82381f3..f031401a00 100644 --- a/src/pair_mie_cut.cpp +++ b/src/pair_mie_cut.cpp @@ -40,6 +40,7 @@ using namespace MathConst; PairMIECut::PairMIECut(LAMMPS *lmp) : Pair(lmp) { respa_enable = 1; + cut_respa = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/reader_native.cpp b/src/reader_native.cpp index da2c97bbe5..26cb45a686 100644 --- a/src/reader_native.cpp +++ b/src/reader_native.cpp @@ -17,6 +17,7 @@ #include "atom.h" #include "memory.h" #include "error.h" +#include "utils.h" using namespace LAMMPS_NS; @@ -56,12 +57,15 @@ int ReaderNative::read_time(bigint &ntimestep) char *eof = fgets(line,MAXLINE,fp); if (eof == NULL) return 1; - // skip over unit information, if present. + // skip over unit and time information, if present. - if (strstr(line,"ITEM: UNITS") == line) + if (utils::strmatch(line,"^\\s*ITEM: UNITS\\s*$")) read_lines(2); - if (strstr(line,"ITEM: TIMESTEP") != line) + if (utils::strmatch(line,"^\\s*ITEM: TIME\\s*$")) + read_lines(2); + + if (!utils::strmatch(line,"^\\s*ITEM: TIMESTEP\\s*$")) error->one(FLERR,"Dump file is incorrectly formatted"); read_lines(1); diff --git a/src/set.cpp b/src/set.cpp index 9807b07ea4..e3b1962d5d 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -1084,13 +1084,18 @@ void Set::setrandom(int keyword) ranmars->select_subset(nsubset,count,flag,work); // change types of selected atoms + // flag vector from select_subset() is only for eligible atoms count = 0; - for (i = 0; i < nlocal; i++) - if (select[i] && flag[i]) { + int eligible = 0; + for (i = 0; i < nlocal; i++) { + if (!select[i]) continue; + if (flag[eligible]) { atom->type[i] = newtype; count++; } + eligible++; + } // clean up diff --git a/src/suffix.h b/src/suffix.h index 88629aa796..177990eb68 100644 --- a/src/suffix.h +++ b/src/suffix.h @@ -16,15 +16,16 @@ namespace LAMMPS_NS { -enum Suffix { - NONE = 0, - OPT = 1<<0, - GPU = 1<<1, - OMP = 1<<2, - INTEL = 1<<3, - KOKKOS = 1<<4 -}; - +namespace Suffix { + enum { + NONE = 0, + OPT = 1<<0, + GPU = 1<<1, + OMP = 1<<2, + INTEL = 1<<3, + KOKKOS = 1<<4 + }; +} } #endif diff --git a/src/version.h b/src/version.h index e43844a567..352680380b 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "4 Feb 2020" +#define LAMMPS_VERSION "18 Feb 2020" From 796e1ac4e90d94bfdefb962af4b48c6eb659908e Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Mon, 24 Feb 2020 13:29:22 -0700 Subject: [PATCH 033/577] Update docs --- doc/src/compute_orientorder_atom.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/src/compute_orientorder_atom.rst b/doc/src/compute_orientorder_atom.rst index b864db82a7..7a294bed5e 100644 --- a/doc/src/compute_orientorder_atom.rst +++ b/doc/src/compute_orientorder_atom.rst @@ -3,6 +3,9 @@ compute orientorder/atom command ================================ +compute orientorder/atom/kk command +======================= + Syntax """""" @@ -132,6 +135,30 @@ too frequently. :doc:`special_bonds ` command that includes all pairs in the neighbor list. +---------- + + +Styles with a *gpu*\ , *intel*\ , *kk*\ , *omp*\ , or *opt* suffix are +functionally the same as the corresponding style without the suffix. +They have been optimized to run faster, depending on your available +hardware, as discussed on the :doc:`Speed packages ` doc +page. The accelerated styles take the same arguments and should +produce the same results, except for round-off and precision issues. + +These accelerated styles are part of the GPU, USER-INTEL, KOKKOS, +USER-OMP and OPT packages, respectively. They are only enabled if +LAMMPS was built with those packages. See the :doc:`Build package ` doc page for more info. + +You can specify the accelerated styles explicitly in your input script +by including their suffix, or you can use the :doc:`-suffix command-line switch ` when you invoke LAMMPS, or you can use the +:doc:`suffix ` command in your input script. + +See the :doc:`Speed packages ` doc page for more +instructions on how to use the accelerated styles effectively. + + +---------- + **Output info:** This compute calculates a per-atom array with *nlvalues* columns, From 29075c8257b20a6bb6df2b9bd9e8f89f672ce9b9 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Mon, 24 Feb 2020 13:31:13 -0700 Subject: [PATCH 034/577] Fix compile issue --- src/KOKKOS/compute_orientorder_atom_kokkos.h | 15 ------------ src/KOKKOS/kokkos_type.h | 18 +++++++++++++++ src/KOKKOS/sna_kokkos.h | 24 -------------------- 3 files changed, 18 insertions(+), 39 deletions(-) diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.h b/src/KOKKOS/compute_orientorder_atom_kokkos.h index b0e96df0ec..9caa17136b 100644 --- a/src/KOKKOS/compute_orientorder_atom_kokkos.h +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.h @@ -27,21 +27,6 @@ ComputeStyle(orientorder/atom/kk/host,ComputeOrientOrderAtomKokkos) namespace LAMMPS_NS { -typedef double SNAreal; - -struct alignas(2*sizeof(SNAreal)) SNAcomplex{ - SNAreal re, im; - - KOKKOS_INLINE_FUNCTION - SNAcomplex() : re(0),im(0) - {} - - KOKKOS_INLINE_FUNCTION - SNAcomplex(SNAreal real_in, SNAreal imag_in) - :re(real_in),im(imag_in) - {} -}; - struct TagComputeOrientOrderAtomNeigh{}; struct TagComputeOrientOrderAtomSelect3{}; struct TagComputeOrientOrderAtomBOOP1{}; diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index d21b9eecd2..7b6e86106d 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -1023,6 +1023,24 @@ struct params_lj_coul { F_FLOAT cut_ljsq,cut_coulsq,lj1,lj2,lj3,lj4,offset; }; +// Pair SNAP + +typedef double SNAreal; + +//typedef struct { SNAreal re, im; } SNAcomplex; +struct alignas(2*sizeof(SNAreal)) SNAcomplex{ + SNAreal re, im; + + KOKKOS_INLINE_FUNCTION + SNAcomplex() : re(0),im(0) + {} + + KOKKOS_INLINE_FUNCTION + SNAcomplex(SNAreal real_in, SNAreal imag_in) + :re(real_in),im(imag_in) + {} +}; + #if defined(KOKKOS_ENABLE_CXX11) #undef ISFINITE #define ISFINITE(x) std::isfinite(x) diff --git a/src/KOKKOS/sna_kokkos.h b/src/KOKKOS/sna_kokkos.h index 775c8eead4..12c986cc93 100644 --- a/src/KOKKOS/sna_kokkos.h +++ b/src/KOKKOS/sna_kokkos.h @@ -25,30 +25,6 @@ namespace LAMMPS_NS { -typedef double SNAreal; - -//typedef struct { SNAreal re, im; } SNAcomplex; -struct alignas(2*sizeof(SNAreal)) SNAcomplex{ - SNAreal re, im; - - KOKKOS_INLINE_FUNCTION - SNAcomplex() : re(0),im(0) - {} - - KOKKOS_INLINE_FUNCTION - SNAcomplex(SNAreal real_in, SNAreal imag_in) - :re(real_in),im(imag_in) - {} -}; - -//struct SNAKK_ZINDICES { -// int j1, j2, j, ma1min, ma2max, mb1min, mb2max, na, nb, jju; -//}; -// -//struct SNAKK_BINDICES { -// int j1, j2, j; -//}; - template class SNAKokkos { From c505058c5c7b9235e0d7e8e580d686974ddc0a96 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Mon, 24 Feb 2020 15:43:29 -0700 Subject: [PATCH 035/577] Add flag for Kokkos computes --- src/KOKKOS/compute_orientorder_atom_kokkos.cpp | 1 + src/KOKKOS/compute_temp_kokkos.cpp | 1 + src/compute.cpp | 1 + src/compute.h | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp index 7915e4faa9..65bb08b18d 100644 --- a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp @@ -52,6 +52,7 @@ template ComputeOrientOrderAtomKokkos::ComputeOrientOrderAtomKokkos(LAMMPS *lmp, int narg, char **arg) : ComputeOrientOrderAtom(lmp, narg, arg) { + kokkosable = 1; atomKK = (AtomKokkos *) atom; execution_space = ExecutionSpaceFromDevice::space; datamask_read = EMPTY_MASK; diff --git a/src/KOKKOS/compute_temp_kokkos.cpp b/src/KOKKOS/compute_temp_kokkos.cpp index a2fcf63125..f5547d0200 100644 --- a/src/KOKKOS/compute_temp_kokkos.cpp +++ b/src/KOKKOS/compute_temp_kokkos.cpp @@ -31,6 +31,7 @@ template ComputeTempKokkos::ComputeTempKokkos(LAMMPS *lmp, int narg, char **arg) : ComputeTemp(lmp, narg, arg) { + kokkosable = 1; atomKK = (AtomKokkos *) atom; execution_space = ExecutionSpaceFromDevice::space; diff --git a/src/compute.cpp b/src/compute.cpp index cc92d2b5d3..4009396eb0 100644 --- a/src/compute.cpp +++ b/src/compute.cpp @@ -102,6 +102,7 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) : datamask_modify = ALL_MASK; copymode = 0; + kokkosable = 0; } /* ---------------------------------------------------------------------- */ diff --git a/src/compute.h b/src/compute.h index c28af32c26..66974bf106 100644 --- a/src/compute.h +++ b/src/compute.h @@ -91,7 +91,7 @@ class Compute : protected Pointers { ExecutionSpace execution_space; unsigned int datamask_read,datamask_modify; - int copymode; + int copymode,kokkosable; Compute(class LAMMPS *, int, char **); virtual ~Compute(); From 59370d797f46ae2bfb66cc3ace93173f646bdc20 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Tue, 25 Feb 2020 08:58:01 -0700 Subject: [PATCH 036/577] Use more generic type for k_qnarray --- src/KOKKOS/compute_orientorder_atom_kokkos.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.h b/src/KOKKOS/compute_orientorder_atom_kokkos.h index 9caa17136b..d99942533f 100644 --- a/src/KOKKOS/compute_orientorder_atom_kokkos.h +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.h @@ -102,8 +102,8 @@ class ComputeOrientOrderAtomKokkos : public ComputeOrientOrderAtom { t_sna_2i_lr_um d_nearest_um; t_sna_3d_lr_um d_rlist_um; - tdual_sna_2d_lr k_qnarray; - t_sna_2d_lr d_qnarray; + DAT::tdual_float_2d k_qnarray; + typename AT::t_float_2d d_qnarray; t_sna_3c d_qnm; KOKKOS_INLINE_FUNCTION From a3c5c49a6b8316fa4a4a9fcf2ca1513d2f42f6be Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Tue, 25 Feb 2020 10:20:21 -0700 Subject: [PATCH 037/577] Make k_qnarray public --- src/KOKKOS/compute_orientorder_atom_kokkos.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.h b/src/KOKKOS/compute_orientorder_atom_kokkos.h index d99942533f..01d9993af2 100644 --- a/src/KOKKOS/compute_orientorder_atom_kokkos.h +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.h @@ -83,6 +83,9 @@ class ComputeOrientOrderAtomKokkos : public ComputeOrientOrderAtom { KOKKOS_INLINE_FUNCTION void operator() (TagComputeOrientOrderAtomBOOP2, const int& ii) const; + DAT::tdual_float_2d k_qnarray; + typename AT::t_float_2d d_qnarray; + private: int inum; @@ -102,8 +105,6 @@ class ComputeOrientOrderAtomKokkos : public ComputeOrientOrderAtom { t_sna_2i_lr_um d_nearest_um; t_sna_3d_lr_um d_rlist_um; - DAT::tdual_float_2d k_qnarray; - typename AT::t_float_2d d_qnarray; t_sna_3c d_qnm; KOKKOS_INLINE_FUNCTION From a44e49e27630eb92873b0a93cd95ea600883fa1d Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Tue, 25 Feb 2020 10:22:30 -0700 Subject: [PATCH 038/577] Add Kokkos version of compute coord/atom --- src/KOKKOS/Install.sh | 2 + src/KOKKOS/compute_coord_atom_kokkos.cpp | 249 +++++++++++++++++++++++ src/KOKKOS/compute_coord_atom_kokkos.h | 78 +++++++ src/compute_coord_atom.cpp | 2 + src/compute_coord_atom.h | 8 +- 5 files changed, 335 insertions(+), 4 deletions(-) create mode 100644 src/KOKKOS/compute_coord_atom_kokkos.cpp create mode 100644 src/KOKKOS/compute_coord_atom_kokkos.h diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index 540389f599..e9a8ff96c8 100755 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -85,6 +85,8 @@ action comm_kokkos.cpp action comm_kokkos.h action comm_tiled_kokkos.cpp action comm_tiled_kokkos.h +action compute_coord_atom_kokkos.cpp +action compute_coord_atom_kokkos.h action compute_orientorder_atom_kokkos.cpp action compute_orientorder_atom_kokkos.h action compute_temp_kokkos.cpp diff --git a/src/KOKKOS/compute_coord_atom_kokkos.cpp b/src/KOKKOS/compute_coord_atom_kokkos.cpp new file mode 100644 index 0000000000..3ce4e3b852 --- /dev/null +++ b/src/KOKKOS/compute_coord_atom_kokkos.cpp @@ -0,0 +1,249 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "compute_coord_atom_kokkos.h" +#include +#include +#include "compute_orientorder_atom_kokkos.h" +#include "atom_kokkos.h" +#include "update.h" +#include "modify.h" +#include "neighbor_kokkos.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "force.h" +#include "pair.h" +#include "comm.h" +#include "group.h" +#include "memory_kokkos.h" +#include "error.h" +#include "atom_masks.h" + +using namespace LAMMPS_NS; + +#define INVOKED_PERATOM 8 + +/* ---------------------------------------------------------------------- */ + +template +ComputeCoordAtomKokkos::ComputeCoordAtomKokkos(LAMMPS *lmp, int narg, char **arg) : + ComputeCoordAtom(lmp, narg, arg) +{ + kokkosable = 1; + atomKK = (AtomKokkos *) atom; + execution_space = ExecutionSpaceFromDevice::space; + datamask_read = EMPTY_MASK; + datamask_modify = EMPTY_MASK; + + d_typelo = typename AT::t_int_1d("coord/atom:typelo",ncol); + d_typehi = typename AT::t_int_1d("coord/atom:typehi",ncol); + + auto h_typelo = Kokkos::create_mirror_view(d_typelo); + auto h_typehi = Kokkos::create_mirror_view(d_typehi); + + for (int i = 0; i < ncol; i++) { + h_typelo(i) = typelo[i]; + h_typehi(i) = typehi[i]; + } + + Kokkos::deep_copy(d_typelo,h_typelo); + Kokkos::deep_copy(d_typehi,h_typehi); +} + +/* ---------------------------------------------------------------------- */ + +template +ComputeCoordAtomKokkos::~ComputeCoordAtomKokkos() +{ + if (copymode) return; + + memoryKK->destroy_kokkos(k_cvec,cvec); + memoryKK->destroy_kokkos(k_carray,carray); +} + +/* ---------------------------------------------------------------------- */ + +template +void ComputeCoordAtomKokkos::init() +{ + ComputeCoordAtom::init(); + + // need an occasional full neighbor list + + // irequest = neigh request made by parent class + + int irequest = neighbor->nrequest - 1; + + neighbor->requests[irequest]-> + kokkos_host = Kokkos::Impl::is_same::value && + !Kokkos::Impl::is_same::value; + neighbor->requests[irequest]-> + kokkos_device = Kokkos::Impl::is_same::value; +} + +/* ---------------------------------------------------------------------- */ + +template +void ComputeCoordAtomKokkos::compute_peratom() +{ + invoked_peratom = update->ntimestep; + + // grow coordination array if necessary + + if (atom->nmax > nmax) { + if (ncol == 1) { + memoryKK->destroy_kokkos(k_cvec,cvec); + nmax = atom->nmax; + memoryKK->create_kokkos(k_cvec,cvec,nmax,"coord/atom:cvec"); + vector_atom = cvec; + d_cvec = k_cvec.template view(); + } else { + memoryKK->destroy_kokkos(k_carray,carray); + nmax = atom->nmax; + memoryKK->create_kokkos(k_carray,carray,nmax,ncol,"coord/atom:carray"); + array_atom = carray; + d_carray = k_carray.template view(); + } + } + + if (cstyle == ORIENT) { + if (!(c_orientorder->invoked_flag & INVOKED_PERATOM)) { + c_orientorder->compute_peratom(); + c_orientorder->invoked_flag |= INVOKED_PERATOM; + } + nqlist = c_orientorder->nqlist; + normv = c_orientorder->array_atom; + comm->forward_comm_compute(this); + + if (!c_orientorder->kokkosable) + error->all(FLERR,"Must use compute orientorder/atom/kk with compute coord/atom/kk"); + + if (c_orientorder->execution_space == Host) { + ComputeOrientOrderAtomKokkos* c_orientorder_kk; + c_orientorder_kk = (ComputeOrientOrderAtomKokkos*) c_orientorder; + c_orientorder_kk->k_qnarray.modify(); + c_orientorder_kk->k_qnarray.sync(); + d_normv = c_orientorder_kk->k_qnarray.view(); + } else { + ComputeOrientOrderAtomKokkos* c_orientorder_kk; + c_orientorder_kk = (ComputeOrientOrderAtomKokkos*) c_orientorder; + c_orientorder_kk->k_qnarray.modify(); + c_orientorder_kk->k_qnarray.sync(); + d_normv = c_orientorder_kk->k_qnarray.view(); + } + } + + // invoke full neighbor list (will copy or build if necessary) + + neighbor->build_one(list); + + inum = list->inum; + NeighListKokkos* k_list = static_cast*>(list); + d_numneigh = k_list->d_numneigh; + d_neighbors = k_list->d_neighbors; + d_ilist = k_list->d_ilist; + + // compute coordination number(s) for each atom in group + // use full neighbor list to count atoms less than cutoff + + atomKK->sync(execution_space,X_MASK|TYPE_MASK|MASK_MASK); + x = atomKK->k_x.view(); + type = atomKK->k_type.view(); + mask = atomKK->k_mask.view(); + + copymode = 1; + if (cstyle == CUTOFF) { + if (ncol == 1) { + typename Kokkos::RangePolicy > policy(0,inum); + Kokkos::parallel_for("ComputeCoordAtom",policy,*this); + } else { + typename Kokkos::RangePolicy > policy(0,inum); + Kokkos::parallel_for("ComputeCoordAtom",policy,*this); + } + } else if (cstyle == ORIENT) { + typename Kokkos::RangePolicy > policy(0,inum); + Kokkos::parallel_for("ComputeCoordAtom",policy,*this); + } + copymode = 0; + + if (ncol == 1 || cstyle == ORIENT) { + k_cvec.modify(); + k_cvec.sync(); + } else { + k_carray.modify(); + k_carray.sync(); + } + +} + +template +template +KOKKOS_INLINE_FUNCTION +void ComputeCoordAtomKokkos::operator()(TagComputeCoordAtom, const int &ii) const +{ + const int i = d_ilist[ii]; + if (NCOL == 1 || CSTYLE == ORIENT) + d_cvec(i) = 0.0; + else + for (int m = 0; m < ncol; m++) d_carray(i,m) = 0.0; + if (mask[i] & groupbit) { + const X_FLOAT xtmp = x(i,0); + const X_FLOAT ytmp = x(i,1); + const X_FLOAT ztmp = x(i,2); + const int jnum = d_numneigh[i]; + + int n = 0; + for (int jj = 0; jj < jnum; jj++) { + int j = d_neighbors(i,jj); + j &= NEIGHMASK; + + if (NCOL == 1) + if (!(mask[j] & jgroupbit)) continue; + + const int jtype = type[j]; + const F_FLOAT delx = x(j,0) - xtmp; + const F_FLOAT dely = x(j,1) - ytmp; + const F_FLOAT delz = x(j,2) - ztmp; + const F_FLOAT rsq = delx*delx + dely*dely + delz*delz; + if (rsq < cutsq) { + if (CSTYLE == CUTOFF) { + if (NCOL == 1) { + if (jtype >= d_typelo[0] && jtype <= d_typehi[0]) + n++; + } else { + for (int m = 0; m < ncol; m++) + if (jtype >= d_typelo[m] && jtype <= d_typehi[m]) + d_carray(i,m) += 1.0; + } + } else if (CSTYLE == ORIENT) { + double dot_product = 0.0; + for (int m=0; m < 2*(2*l+1); m++) { + dot_product += d_normv(i,nqlist+m)*d_normv(j,nqlist+m); + } + if (dot_product > threshold) n++; + } + } + } + + if (NCOL == 1 || CSTYLE == ORIENT) + d_cvec[i] = n; + } + +} + +namespace LAMMPS_NS { +template class ComputeCoordAtomKokkos; +#ifdef KOKKOS_ENABLE_CUDA +template class ComputeCoordAtomKokkos; +#endif +} diff --git a/src/KOKKOS/compute_coord_atom_kokkos.h b/src/KOKKOS/compute_coord_atom_kokkos.h new file mode 100644 index 0000000000..c77e8f8b45 --- /dev/null +++ b/src/KOKKOS/compute_coord_atom_kokkos.h @@ -0,0 +1,78 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef COMPUTE_CLASS + +ComputeStyle(orientorder/atom/kk,ComputeCoordAtomKokkos) +ComputeStyle(orientorder/atom/kk/device,ComputeCoordAtomKokkos) +ComputeStyle(orientorder/atom/kk/host,ComputeCoordAtomKokkos) + +#else + +#ifndef LMP_COMPUTE_COORD_ATOM_KOKKOS_H +#define LMP_COMPUTE_COORD_ATOM_KOKKOS_H + +#include "compute_coord_atom.h" +#include "kokkos_type.h" + +namespace LAMMPS_NS { + +template +struct TagComputeCoordAtom{}; + +template +class ComputeCoordAtomKokkos : public ComputeCoordAtom { + public: + typedef DeviceType device_type; + typedef ArrayTypes AT; + + ComputeCoordAtomKokkos(class LAMMPS *, int, char **); + virtual ~ComputeCoordAtomKokkos(); + void init(); + void compute_peratom(); + enum {NONE,CUTOFF,ORIENT}; + + template + KOKKOS_INLINE_FUNCTION + void operator()(TagComputeCoordAtom, const int&) const; + + private: + int inum; + + typename AT::t_x_array_randomread x; + typename ArrayTypes::t_int_1d_randomread type; + typename ArrayTypes::t_int_1d mask; + + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; + + typename AT::t_int_1d d_typelo; + typename AT::t_int_1d d_typehi; + + DAT::tdual_float_1d k_cvec; + typename AT::t_float_1d d_cvec; + DAT::tdual_float_2d k_carray; + typename AT::t_float_2d d_carray; + + typename AT::t_float_2d d_normv; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +*/ diff --git a/src/compute_coord_atom.cpp b/src/compute_coord_atom.cpp index 30747c1314..8f5e028390 100644 --- a/src/compute_coord_atom.cpp +++ b/src/compute_coord_atom.cpp @@ -119,6 +119,8 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) : ComputeCoordAtom::~ComputeCoordAtom() { + if (copymode) return; + delete [] group2; delete [] typelo; delete [] typehi; diff --git a/src/compute_coord_atom.h b/src/compute_coord_atom.h index 2a54613cc6..31bab18d87 100644 --- a/src/compute_coord_atom.h +++ b/src/compute_coord_atom.h @@ -27,16 +27,16 @@ namespace LAMMPS_NS { class ComputeCoordAtom : public Compute { public: ComputeCoordAtom(class LAMMPS *, int, char **); - ~ComputeCoordAtom(); - void init(); + virtual ~ComputeCoordAtom(); + virtual void init(); void init_list(int, class NeighList *); - void compute_peratom(); + virtual void compute_peratom(); int pack_forward_comm(int, int *, double *, int, int *); void unpack_forward_comm(int, int, double *); double memory_usage(); enum {NONE,CUTOFF,ORIENT}; - private: + protected: int nmax,ncol; double cutsq; class NeighList *list; From 928ac7f2711021568691a981d115083e14973f0c Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Tue, 25 Feb 2020 10:34:29 -0700 Subject: [PATCH 039/577] Fix typo --- src/KOKKOS/compute_coord_atom_kokkos.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/KOKKOS/compute_coord_atom_kokkos.h b/src/KOKKOS/compute_coord_atom_kokkos.h index c77e8f8b45..f292994a18 100644 --- a/src/KOKKOS/compute_coord_atom_kokkos.h +++ b/src/KOKKOS/compute_coord_atom_kokkos.h @@ -13,9 +13,9 @@ #ifdef COMPUTE_CLASS -ComputeStyle(orientorder/atom/kk,ComputeCoordAtomKokkos) -ComputeStyle(orientorder/atom/kk/device,ComputeCoordAtomKokkos) -ComputeStyle(orientorder/atom/kk/host,ComputeCoordAtomKokkos) +ComputeStyle(coord/atom/kk,ComputeCoordAtomKokkos) +ComputeStyle(coord/atom/kk/device,ComputeCoordAtomKokkos) +ComputeStyle(coord/atom/kk/host,ComputeCoordAtomKokkos) #else From eb80fd303192df6fd7e5904131004d6bd7772831 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 26 Feb 2020 14:26:46 -0700 Subject: [PATCH 040/577] Add method to copy Kokkos neighbor list to CPU list --- src/KOKKOS/neigh_list_kokkos.cpp | 24 ++++----- src/KOKKOS/neigh_list_kokkos.h | 16 +++--- src/KOKKOS/npair_copy_kokkos.cpp | 76 ++++++++++++++++++++++++++++ src/KOKKOS/npair_copy_kokkos.h | 3 ++ src/KOKKOS/npair_halffull_kokkos.cpp | 6 ++- src/KOKKOS/npair_kokkos.cpp | 5 +- src/KOKKOS/npair_ssa_kokkos.cpp | 2 + src/neigh_list.cpp | 6 ++- src/neigh_list.h | 1 + src/neighbor.cpp | 27 ++++++---- 10 files changed, 133 insertions(+), 33 deletions(-) diff --git a/src/KOKKOS/neigh_list_kokkos.cpp b/src/KOKKOS/neigh_list_kokkos.cpp index 2b9c5ef645..afaf0dd1b8 100644 --- a/src/KOKKOS/neigh_list_kokkos.cpp +++ b/src/KOKKOS/neigh_list_kokkos.cpp @@ -19,20 +19,20 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -template -NeighListKokkos::NeighListKokkos(class LAMMPS *lmp):NeighList(lmp) +template +NeighListKokkos::NeighListKokkos(class LAMMPS *lmp):NeighList(lmp) { _stride = 1; maxneighs = 16; kokkos = 1; maxatoms = 0; - execution_space = ExecutionSpaceFromDevice::space; + execution_space = ExecutionSpaceFromDevice::space; }; /* ---------------------------------------------------------------------- */ -template -void NeighListKokkos::grow(int nmax) +template +void NeighListKokkos::grow(int nmax) { // skip if this list is already long enough to store nmax atoms // and maxneighs neighbors @@ -40,14 +40,12 @@ void NeighListKokkos::grow(int nmax) if (nmax <= maxatoms && d_neighbors.extent(1) >= maxneighs) return; maxatoms = nmax; - k_ilist = - DAT::tdual_int_1d("neighlist:ilist",maxatoms); - d_ilist = k_ilist.view(); - d_numneigh = - typename ArrayTypes::t_int_1d("neighlist:numneigh",maxatoms); - d_neighbors = - typename ArrayTypes::t_neighbors_2d("neighlist:neighbors", - maxatoms,maxneighs); + k_ilist = DAT::tdual_int_1d("neighlist:ilist",maxatoms); + d_ilist = k_ilist.view(); + k_numneigh = DAT::tdual_int_1d("neighlist:numneigh",maxatoms); + d_numneigh = k_numneigh.view(); + k_neighbors = DAT::tdual_neighbors_2d("neighlist:neighbors",maxatoms,maxneighs); + d_neighbors = k_neighbors.view(); } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/neigh_list_kokkos.h b/src/KOKKOS/neigh_list_kokkos.h index 585422c54f..f8195a01f4 100644 --- a/src/KOKKOS/neigh_list_kokkos.h +++ b/src/KOKKOS/neigh_list_kokkos.h @@ -59,7 +59,7 @@ class AtomNeighborsConst const int _stride; }; -template +template class NeighListKokkos: public NeighList { int _stride; @@ -67,10 +67,12 @@ public: int maxneighs; void grow(int nmax); - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename DAT::tdual_int_1d k_ilist; // local indices of I atoms - typename ArrayTypes::t_int_1d d_ilist; - typename ArrayTypes::t_int_1d d_numneigh; // # of J neighs for each I + DAT::tdual_neighbors_2d k_neighbors; + typename ArrayTypes::t_neighbors_2d d_neighbors; + DAT::tdual_int_1d k_ilist; // local indices of I atoms + typename ArrayTypes::t_int_1d d_ilist; + DAT::tdual_int_1d k_numneigh; // # of J neighs for each I + typename ArrayTypes::t_int_1d d_numneigh; NeighListKokkos(class LAMMPS *lmp); @@ -82,8 +84,8 @@ public: KOKKOS_INLINE_FUNCTION static AtomNeighborsConst static_neighbors_const(int i, - typename ArrayTypes::t_neighbors_2d_const const& d_neighbors, - typename ArrayTypes::t_int_1d_const const& d_numneigh) { + typename ArrayTypes::t_neighbors_2d_const const& d_neighbors, + typename ArrayTypes::t_int_1d_const const& d_numneigh) { return AtomNeighborsConst(&d_neighbors(i,0),d_numneigh(i), &d_neighbors(i,1)-&d_neighbors(i,0)); } diff --git a/src/KOKKOS/npair_copy_kokkos.cpp b/src/KOKKOS/npair_copy_kokkos.cpp index 0ce0f4d3ff..b0554db9ea 100644 --- a/src/KOKKOS/npair_copy_kokkos.cpp +++ b/src/KOKKOS/npair_copy_kokkos.cpp @@ -13,6 +13,8 @@ #include "npair_copy_kokkos.h" #include "neigh_list_kokkos.h" +#include "my_page.h" +#include "error.h" using namespace LAMMPS_NS; @@ -30,6 +32,24 @@ void NPairCopyKokkos::build(NeighList *list) { NeighList *listcopy = list->listcopy; + if (list->kokkos) { + if (!listcopy->kokkos) + error->all(FLERR,"Cannot copy non-Kokkos neighbor list to Kokkos neigh list"); + copy_to_kokkos(list); + } else { + if (!listcopy->kokkos) + error->all(FLERR,"Missing Kokkos neighbor list for copy"); + copy_to_cpu(list); + } +} + +/* ---------------------------------------------------------------------- */ + +template +void NPairCopyKokkos::copy_to_kokkos(NeighList *list) +{ + NeighList *listcopy = list->listcopy; + list->inum = listcopy->inum; list->gnum = listcopy->gnum; list->ilist = listcopy->ilist; @@ -44,6 +64,62 @@ void NPairCopyKokkos::build(NeighList *list) list_kk->d_neighbors = listcopy_kk->d_neighbors; } +/* ---------------------------------------------------------------------- */ + +template +void NPairCopyKokkos::copy_to_cpu(NeighList *list) +{ + NeighList *listcopy = list->listcopy; + NeighListKokkos* listcopy_kk = (NeighListKokkos*) listcopy; + + listcopy_kk->k_ilist.template sync(); + listcopy_kk->k_numneigh.template sync(); + listcopy_kk->k_neighbors.template sync(); + + int inum = listcopy->inum; + int gnum = listcopy->gnum; + int inum_all = inum; + if (list->ghost) inum_all += gnum; + auto h_ilist = listcopy_kk->k_ilist.h_view; + auto h_numneigh = listcopy_kk->k_numneigh.h_view; + auto h_neighbors = listcopy_kk->k_neighbors.h_view; + + list->inum = inum; + list->gnum = gnum; + auto ilist = list->ilist; + auto numneigh = list->numneigh; + + // Kokkos neighbor data is stored differently than regular CPU, + // must copy element by element + + int *neighptr; + int **firstneigh = list->firstneigh; + MyPage *ipage = list->ipage; + ipage->reset(); + + for (int ii = 0; ii < inum_all; ii++) { + neighptr = ipage->vget(); + + const int i = h_ilist[ii]; + ilist[ii] = i; + + // loop over Kokkos neighbor list + + const int jnum = h_numneigh[i]; + numneigh[i] = jnum; + + for (int jj = 0; jj < jnum; jj++) { + const int joriginal = h_neighbors(i,jj); + neighptr[jj] = joriginal; + } + + firstneigh[i] = neighptr; + ipage->vgot(jnum); + if (ipage->status()) + error->one(FLERR,"Neighbor list overflow, boost neigh_modify one"); + } +} + namespace LAMMPS_NS { template class NPairCopyKokkos; #ifdef KOKKOS_ENABLE_CUDA diff --git a/src/KOKKOS/npair_copy_kokkos.h b/src/KOKKOS/npair_copy_kokkos.h index 84eb10b204..4bbb2749e5 100644 --- a/src/KOKKOS/npair_copy_kokkos.h +++ b/src/KOKKOS/npair_copy_kokkos.h @@ -36,6 +36,9 @@ class NPairCopyKokkos : public NPair { NPairCopyKokkos(class LAMMPS *); ~NPairCopyKokkos() {} void build(class NeighList *); + private: + void copy_to_kokkos(class NeighList *); + void copy_to_cpu(class NeighList *); }; } diff --git a/src/KOKKOS/npair_halffull_kokkos.cpp b/src/KOKKOS/npair_halffull_kokkos.cpp index cc8f663ef2..754a5ca010 100644 --- a/src/KOKKOS/npair_halffull_kokkos.cpp +++ b/src/KOKKOS/npair_halffull_kokkos.cpp @@ -68,12 +68,14 @@ void NPairHalffullKokkos::build(NeighList *list) copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,inum_full),*this); + copymode = 0; list->inum = k_list_full->inum; list->gnum = k_list_full->gnum; - k_list->k_ilist.template modify(); - copymode = 0; + k_list->k_ilist.template modify(); + k_list->k_numneigh.template modify(); + k_list->k_neighbors.template modify(); } template diff --git a/src/KOKKOS/npair_kokkos.cpp b/src/KOKKOS/npair_kokkos.cpp index aa2a1fc5ff..8dce226ef0 100644 --- a/src/KOKKOS/npair_kokkos.cpp +++ b/src/KOKKOS/npair_kokkos.cpp @@ -273,7 +273,8 @@ void NPairKokkos::build(NeighList *list_) if(data.h_resize()) { list->maxneighs = data.h_new_maxneighs() * 1.2; - list->d_neighbors = typename ArrayTypes::t_neighbors_2d("neighbors", list->d_neighbors.extent(0), list->maxneighs); + list->k_neighbors = DAT::tdual_neighbors_2d("neighbors", list->d_neighbors.extent(0), list->maxneighs); + list->d_neighbors = list->k_neighbors.template view(); data.neigh_list.d_neighbors = list->d_neighbors; data.neigh_list.maxneighs = list->maxneighs; } @@ -288,6 +289,8 @@ void NPairKokkos::build(NeighList *list_) } list->k_ilist.template modify(); + list->k_numneigh.template modify(); + list->k_neighbors.template modify(); } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/npair_ssa_kokkos.cpp b/src/KOKKOS/npair_ssa_kokkos.cpp index 5234c4e6d2..b5f892958b 100644 --- a/src/KOKKOS/npair_ssa_kokkos.cpp +++ b/src/KOKKOS/npair_ssa_kokkos.cpp @@ -519,6 +519,8 @@ fprintf(stdout, "Fina%03d %6d inum %6d gnum, total used %6d, allocated %6d\n" #endif list->k_ilist.template modify(); + list->k_numneigh.template modify(); + list->k_neighbors.template modify(); } diff --git a/src/neigh_list.cpp b/src/neigh_list.cpp index 1c53b2f7a4..c01f8ca595 100644 --- a/src/neigh_list.cpp +++ b/src/neigh_list.cpp @@ -80,6 +80,7 @@ NeighList::NeighList(LAMMPS *lmp) : Pointers(lmp) // Kokkos package kokkos = 0; + kk2cpu = 0; execution_space = Host; // USER-DPD package @@ -143,8 +144,11 @@ void NeighList::post_constructor(NeighRequest *nq) respainner = nq->respainner; copy = nq->copy; - if (nq->copy) + if (nq->copy) { listcopy = neighbor->lists[nq->copylist]; + if (listcopy->kokkos && !this->kokkos) + kk2cpu = 1; + } if (nq->skip) { listskip = neighbor->lists[nq->skiplist]; diff --git a/src/neigh_list.h b/src/neigh_list.h index 146a01e7b5..501188a724 100644 --- a/src/neigh_list.h +++ b/src/neigh_list.h @@ -42,6 +42,7 @@ class NeighList : protected Pointers { int respamiddle; // 1 if there is also a rRespa middle list int respainner; // 1 if there is also a rRespa inner list int copy; // 1 if this list is copied from another list + int kk2cpu; // 1 if this list is copied from Kokkos to CPU int copymode; // 1 if this is a Kokkos on-device copy // data structs to store neighbor pairs I,J and associated values diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 3d1f37a03b..5783c24d2d 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -849,7 +849,8 @@ int Neighbor::init_pair() // allocate initial pages for each list, except if copy flag set for (i = 0; i < nlist; i++) { - if (lists[i]->copy) continue; + if (lists[i]->copy && !lists[i]->kk2cpu) + continue; lists[i]->setup_pages(pgsize,oneatom); } @@ -860,8 +861,10 @@ int Neighbor::init_pair() // also Kokkos list initialization int maxatom = atom->nmax; - for (i = 0; i < nlist; i++) - if (neigh_pair[i] && !lists[i]->copy) lists[i]->grow(maxatom,maxatom); + for (i = 0; i < nlist; i++) { + if (neigh_pair[i] && (!lists[i]->copy || lists[i]->kk2cpu)) + lists[i]->grow(maxatom,maxatom); + } // plist = indices of perpetual NPair classes // perpetual = non-occasional, re-built at every reneighboring @@ -1257,8 +1260,8 @@ void Neighbor::morph_copy() if (irq->history != jrq->history) continue; if (irq->bond != jrq->bond) continue; if (irq->intel != jrq->intel) continue; - if (irq->kokkos_host != jrq->kokkos_host) continue; - if (irq->kokkos_device != jrq->kokkos_device) continue; + if (irq->kokkos_host && !jrq->kokkos_host) continue; + if (irq->kokkos_device && !jrq->kokkos_device) continue; if (irq->ssa != jrq->ssa) continue; if (irq->cut != jrq->cut) continue; if (irq->cutoff != jrq->cutoff) continue; @@ -1789,8 +1792,12 @@ int Neighbor::choose_pair(NeighRequest *rq) if (rq->copy) { if (!(mask & NP_COPY)) continue; - if (!rq->kokkos_device != !(mask & NP_KOKKOS_DEVICE)) continue; - if (!rq->kokkos_host != !(mask & NP_KOKKOS_HOST)) continue; + if (rq->kokkos_device || rq->kokkos_host) { + if (!rq->kokkos_device != !(mask & NP_KOKKOS_DEVICE)) continue; + if (!rq->kokkos_host != !(mask & NP_KOKKOS_HOST)) continue; + } + if (!requests[rq->copylist]->kokkos_device != !(mask & NP_KOKKOS_DEVICE)) continue; + if (!requests[rq->copylist]->kokkos_host != !(mask & NP_KOKKOS_HOST)) continue; return i+1; } @@ -2102,7 +2109,8 @@ void Neighbor::build(int topoflag) for (i = 0; i < npair_perpetual; i++) { m = plist[i]; - if (!lists[m]->copy) lists[m]->grow(nlocal,nall); + if (!lists[i]->copy || lists[i]->kk2cpu) + lists[m]->grow(nlocal,nall); neigh_pair[m]->build_setup(); neigh_pair[m]->build(lists[m]); } @@ -2191,7 +2199,8 @@ void Neighbor::build_one(class NeighList *mylist, int preflag) // build the list - if (!mylist->copy) mylist->grow(atom->nlocal,atom->nlocal+atom->nghost); + if (!mylist->copy || mylist->kk2cpu) + mylist->grow(atom->nlocal,atom->nlocal+atom->nghost); np->build_setup(); np->build(mylist); } From c31917186ec6d5dd3be52a327df36c36c840b417 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 26 Feb 2020 14:34:42 -0700 Subject: [PATCH 041/577] Tweak error message --- src/KOKKOS/npair_copy_kokkos.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KOKKOS/npair_copy_kokkos.cpp b/src/KOKKOS/npair_copy_kokkos.cpp index b0554db9ea..016d68400f 100644 --- a/src/KOKKOS/npair_copy_kokkos.cpp +++ b/src/KOKKOS/npair_copy_kokkos.cpp @@ -34,7 +34,7 @@ void NPairCopyKokkos::build(NeighList *list) if (list->kokkos) { if (!listcopy->kokkos) - error->all(FLERR,"Cannot copy non-Kokkos neighbor list to Kokkos neigh list"); + error->all(FLERR,"Cannot copy non-Kokkos neighbor list to Kokkos neighbor list"); copy_to_kokkos(list); } else { if (!listcopy->kokkos) From a739b8c6b766709a67265966753c9b401f9180af Mon Sep 17 00:00:00 2001 From: julient31 Date: Tue, 3 Mar 2020 07:32:13 -0700 Subject: [PATCH 042/577] Commit JT 030320 - modified fix/precession for correct mag energy calc. - reran all benchmark / examples in serial for verif - to do: rerun mpi examples, and clean code --- examples/SPIN/bfo/in.spin.bfo | 8 +- examples/SPIN/cobalt_fcc/in.spin.cobalt_fcc | 4 +- examples/SPIN/cobalt_hcp/in.spin.cobalt_hcp | 9 +- examples/SPIN/iron/in.spin.iron | 1 + examples/SPIN/nickel/in.spin.nickel | 3 +- examples/SPIN/nickel/in.spin.nickel_cubic | 2 +- examples/SPIN/read_restart/in.spin.read_data | 4 +- examples/SPIN/read_restart/in.spin.restart | 4 +- .../SPIN/read_restart/in.spin.write_restart | 3 +- examples/SPIN/run_spin_examples.sh | 2 +- examples/SPIN/run_spin_examples_serial.sh | 120 ++++++++++++++++++ examples/SPIN/setforce_spin/in.spin.setforce | 2 +- examples/SPIN/test_problems/README | 22 ++-- .../run-test-exchange.sh | 2 +- ...-precession.in => test-spin-precession.in} | 0 .../validation_damped_exchange/two_spins.data | 22 ++++ .../run-test-prec.sh | 2 +- ...-precession.in => test-spin-precession.in} | 1 + .../bench-prec-spin.in | 46 +++++++ .../run-test-prec.sh | 7 +- ...-spin.template => test-prec-spin.template} | 0 src/SPIN/compute_spin.cpp | 21 ++- src/SPIN/fix_precession_spin.cpp | 28 +++- src/SPIN/fix_precession_spin.h | 4 + src/SPIN/pair_spin.cpp | 2 +- 25 files changed, 272 insertions(+), 47 deletions(-) create mode 100755 examples/SPIN/run_spin_examples_serial.sh rename examples/SPIN/test_problems/validation_damped_exchange/{bench-spin-precession.in => test-spin-precession.in} (100%) create mode 100644 examples/SPIN/test_problems/validation_damped_exchange/two_spins.data rename examples/SPIN/test_problems/validation_damped_precession/{bench-spin-precession.in => test-spin-precession.in} (92%) create mode 100644 examples/SPIN/test_problems/validation_langevin_precession/bench-prec-spin.in rename examples/SPIN/test_problems/validation_langevin_precession/{bench-prec-spin.template => test-prec-spin.template} (100%) diff --git a/examples/SPIN/bfo/in.spin.bfo b/examples/SPIN/bfo/in.spin.bfo index b97f7e2d61..47ba535ab6 100644 --- a/examples/SPIN/bfo/in.spin.bfo +++ b/examples/SPIN/bfo/in.spin.bfo @@ -27,7 +27,8 @@ pair_coeff * * spin/dmi dmi 4.5 0.00005 1.0 1.0 1.0 neighbor 0.1 bin neigh_modify every 10 check yes delay 20 -fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0 +fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 anisotropy 0.00033 0.0 0.0 1.0 +fix_modify 1 energy yes fix 2 all langevin/spin 0.0 0.1 21 fix 3 all nve/spin lattice frozen @@ -43,9 +44,8 @@ variable magnorm equal c_out_mag[4] variable emag equal c_out_mag[5] variable tmag equal c_out_mag[6] -#thermo_style custom step time v_magnorm v_emag temp etotal -thermo_style custom step time v_magnorm pe ke v_emag temp etotal -thermo 10 +thermo_style custom step time v_magnorm pe v_emag temp etotal +thermo 50 compute outsp all property/atom spx spy spz sp fmx fmy fmz dump 1 all custom 100 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] diff --git a/examples/SPIN/cobalt_fcc/in.spin.cobalt_fcc b/examples/SPIN/cobalt_fcc/in.spin.cobalt_fcc index dd9ed890ee..f81a962e3f 100644 --- a/examples/SPIN/cobalt_fcc/in.spin.cobalt_fcc +++ b/examples/SPIN/cobalt_fcc/in.spin.cobalt_fcc @@ -45,8 +45,6 @@ compute out_pe all pe compute out_ke all ke compute out_temp all temp -thermo_style custom f_1 - variable magx equal c_out_mag[1] variable magy equal c_out_mag[2] variable magz equal c_out_mag[3] @@ -54,7 +52,7 @@ variable magnorm equal c_out_mag[4] variable emag equal c_out_mag[5] variable tmag equal c_out_mag[6] -thermo_style custom step time f_1 v_magx v_magy v_magnorm v_emag temp etotal +thermo_style custom step time v_magx v_magy v_magnorm pe v_emag temp etotal thermo 50 # compute outsp all property/atom spx spy spz sp fmx fmy fmz diff --git a/examples/SPIN/cobalt_hcp/in.spin.cobalt_hcp b/examples/SPIN/cobalt_hcp/in.spin.cobalt_hcp index dd114202cb..2bfa8393f3 100644 --- a/examples/SPIN/cobalt_hcp/in.spin.cobalt_hcp +++ b/examples/SPIN/cobalt_hcp/in.spin.cobalt_hcp @@ -32,10 +32,9 @@ pair_coeff * * spin/exchange exchange 4.0 -0.3593 1.135028015e-05 1.064568567 neighbor 0.1 bin neigh_modify every 10 check yes delay 20 -#fix 1 all precession/spin zeeman 1.0 0.0 0.0 1.0 fix 1 all precession/spin anisotropy 0.01 0.0 0.0 1.0 -#fix 2 all langevin/spin 0.0 0.0 21 -fix 2 all langevin/spin 0.0 0.1 21 +fix_modify 1 energy yes +fix 2 all langevin/spin 0.0 0.0 21 fix 3 all nve/spin lattice moving timestep 0.0001 @@ -51,8 +50,8 @@ variable magnorm equal c_out_mag[4] variable emag equal c_out_mag[5] variable tmag equal c_out_mag[6] -thermo_style custom step time v_magnorm v_emag temp press etotal -thermo 10 +thermo_style custom step time v_magnorm pe v_emag temp press etotal +thermo 50 compute outsp all property/atom spx spy spz sp fmx fmy fmz dump 1 all custom 100 dump_cobalt_hcp.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] diff --git a/examples/SPIN/iron/in.spin.iron b/examples/SPIN/iron/in.spin.iron index d60e6b86f5..58c0537af7 100644 --- a/examples/SPIN/iron/in.spin.iron +++ b/examples/SPIN/iron/in.spin.iron @@ -31,6 +31,7 @@ neighbor 0.1 bin neigh_modify every 10 check yes delay 20 fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 +fix_modify 1 energy yes fix 2 all langevin/spin 0.0 0.0 21 fix 3 all nve/spin lattice moving diff --git a/examples/SPIN/nickel/in.spin.nickel b/examples/SPIN/nickel/in.spin.nickel index 1d62188d8f..0fd2e5f345 100644 --- a/examples/SPIN/nickel/in.spin.nickel +++ b/examples/SPIN/nickel/in.spin.nickel @@ -31,6 +31,7 @@ neighbor 0.1 bin neigh_modify every 10 check yes delay 20 fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 +fix_modify 1 energy yes fix 2 all langevin/spin 0.0 0.0 21 fix 3 all nve/spin lattice moving @@ -48,7 +49,7 @@ variable magnorm equal c_out_mag[4] variable emag equal c_out_mag[5] variable tmag equal c_out_mag[6] -thermo_style custom step time v_magnorm v_emag temp v_tmag etotal +thermo_style custom step time v_magnorm pe v_emag temp v_tmag etotal thermo 50 compute outsp all property/atom spx spy spz sp fmx fmy fmz diff --git a/examples/SPIN/nickel/in.spin.nickel_cubic b/examples/SPIN/nickel/in.spin.nickel_cubic index 1ae069a64f..88c477132e 100644 --- a/examples/SPIN/nickel/in.spin.nickel_cubic +++ b/examples/SPIN/nickel/in.spin.nickel_cubic @@ -50,7 +50,7 @@ variable magnorm equal c_out_mag[4] variable emag equal c_out_mag[5] variable tmag equal c_out_mag[6] -thermo_style custom step time v_magnorm v_emag temp v_tmag etotal +thermo_style custom step time v_magnorm pe v_emag temp v_tmag etotal thermo 50 compute outsp all property/atom spx spy spz sp fmx fmy fmz diff --git a/examples/SPIN/read_restart/in.spin.read_data b/examples/SPIN/read_restart/in.spin.read_data index e788ecf67e..b2b55a9fcb 100644 --- a/examples/SPIN/read_restart/in.spin.read_data +++ b/examples/SPIN/read_restart/in.spin.read_data @@ -35,8 +35,8 @@ variable magnorm equal c_out_mag[4] variable emag equal c_out_mag[5] variable tmag equal c_out_mag[6] -thermo 10 -thermo_style custom step time v_magnorm v_emag v_tmag temp etotal +thermo 20 +thermo_style custom step time v_magnorm pe v_emag v_tmag temp etotal thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz diff --git a/examples/SPIN/read_restart/in.spin.restart b/examples/SPIN/read_restart/in.spin.restart index ccce25b254..985da65eb4 100644 --- a/examples/SPIN/read_restart/in.spin.restart +++ b/examples/SPIN/read_restart/in.spin.restart @@ -39,8 +39,8 @@ variable magnorm equal c_out_mag[4] variable emag equal c_out_mag[5] variable tmag equal c_out_mag[6] -thermo 10 -thermo_style custom step time v_magnorm v_emag v_tmag temp etotal +thermo 20 +thermo_style custom step time v_magnorm pe v_emag v_tmag temp etotal thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz diff --git a/examples/SPIN/read_restart/in.spin.write_restart b/examples/SPIN/read_restart/in.spin.write_restart index c127101093..19ab8e6b30 100644 --- a/examples/SPIN/read_restart/in.spin.write_restart +++ b/examples/SPIN/read_restart/in.spin.write_restart @@ -44,7 +44,7 @@ variable magnorm equal c_out_mag[4] variable emag equal c_out_mag[5] variable tmag equal c_out_mag[6] -thermo_style custom step time v_magnorm v_emag temp etotal +thermo_style custom step time v_magnorm pe v_emag temp etotal thermo 100 compute outsp all property/atom spx spy spz sp fmx fmy fmz @@ -52,4 +52,3 @@ dump 100 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[ run 1000 write_restart restart_hcp_cobalt.equil - diff --git a/examples/SPIN/run_spin_examples.sh b/examples/SPIN/run_spin_examples.sh index a71da82a04..b2188503ee 100755 --- a/examples/SPIN/run_spin_examples.sh +++ b/examples/SPIN/run_spin_examples.sh @@ -1,6 +1,6 @@ #!/bin/bash -DATE=19Nov19 +DATE=21Fev20 # bfo cd bfo/ diff --git a/examples/SPIN/run_spin_examples_serial.sh b/examples/SPIN/run_spin_examples_serial.sh new file mode 100755 index 0000000000..f367dfd8f4 --- /dev/null +++ b/examples/SPIN/run_spin_examples_serial.sh @@ -0,0 +1,120 @@ +#!/bin/bash + +DATE=21Fev20 + +# bfo +cd bfo/ +../../../src/lmp_serial -in in.spin.bfo +cp log.lammps log.${DATE}.spin.bfo.g++.1 +../../../src/lmp_serial -in in.spin.bfo +cp log.lammps log.${DATE}.spin.bfo.g++.4 +rm log.lammps log.cite dump*.lammpstrj +cd .. + +# fcc cobalt +cd cobalt_fcc/ +../../../src/lmp_serial -in in.spin.cobalt_fcc +cp log.lammps log.${DATE}.spin.cobalt_fcc.g++.1 +../../../src/lmp_serial -in in.spin.cobalt_fcc +cp log.lammps log.${DATE}.spin.cobalt_fcc.g++.4 +rm log.lammps log.cite dump*.lammpstrj +cd .. + +# hcp cobalt +cd cobalt_hcp/ +../../../src/lmp_serial -in in.spin.cobalt_hcp +cp log.lammps log.${DATE}.spin.cobalt_hcp.g++.1 +../../../src/lmp_serial -in in.spin.cobalt_hcp +cp log.lammps log.${DATE}.spin.cobalt_hcp.g++.4 +rm log.lammps log.cite dump*.lammpstrj +cd .. + +# dipole spin +cd dipole_spin/ +../../../src/lmp_serial -in in.spin.iron_dipole_cut +cp log.lammps log.${DATE}.spin.iron_dipole_cut.g++.1 +../../../src/lmp_serial -in in.spin.iron_dipole_cut +cp log.lammps log.${DATE}.spin.iron_dipole_cut.g++.4 +../../../src/lmp_serial -in in.spin.iron_dipole_ewald +cp log.lammps log.${DATE}.spin.iron_dipole_ewald.g++.1 +../../../src/lmp_serial -in in.spin.iron_dipole_ewald +cp log.lammps log.${DATE}.spin.iron_dipole_ewald.g++.4 +../../../src/lmp_serial -in in.spin.iron_dipole_pppm +cp log.lammps log.${DATE}.spin.iron_dipole_pppm.g++.1 +../../../src/lmp_serial -in in.spin.iron_dipole_pppm +cp log.lammps log.${DATE}.spin.iron_dipole_pppm.g++.4 +rm log.lammps log.cite dump*.lammpstrj +cd .. + +# bcc iron +cd iron/ +../../../src/lmp_serial -in in.spin.iron +cp log.lammps log.${DATE}.spin.iron.g++.1 +../../../src/lmp_serial -in in.spin.iron +cp log.lammps log.${DATE}.spin.iron.g++.4 +../../../src/lmp_serial -in in.spin.iron_cubic +cp log.lammps log.${DATE}.spin.iron_cubic.g++.1 +../../../src/lmp_serial -in in.spin.iron_cubic +cp log.lammps log.${DATE}.spin.iron_cubic.g++.4 +rm log.lammps log.cite dump*.lammpstrj +cd .. + +# fcc nickel +cd nickel/ +../../../src/lmp_serial -in in.spin.nickel +cp log.lammps log.${DATE}.spin.nickel.g++.1 +../../../src/lmp_serial -in in.spin.nickel +cp log.lammps log.${DATE}.spin.nickel.g++.4 +../../../src/lmp_serial -in in.spin.nickel_cubic +cp log.lammps log.${DATE}.spin.nickel_cubic.g++.1 +../../../src/lmp_serial -in in.spin.nickel_cubic +cp log.lammps log.${DATE}.spin.nickel_cubic.g++.4 +rm log.lammps log.cite dump*.lammpstrj +cd .. + +# read restart +cd read_restart/ +../../../src/lmp_serial -in in.spin.write_restart +cp log.lammps log.${DATE}.spin.write_restart.g++.1 +../../../src/lmp_serial -in in.spin.write_restart +cp log.lammps log.${DATE}.spin.write_restart.g++.4 +../../../src/lmp_serial -in in.spin.restart +cp log.lammps log.${DATE}.spin.restart.g++.1 +../../../src/lmp_serial -in in.spin.restart +cp log.lammps log.${DATE}.spin.restart.g++.4 +../../../src/lmp_serial -in in.spin.read_data +cp log.lammps log.${DATE}.spin.read_data.g++.1 +../../../src/lmp_serial -in in.spin.read_data +cp log.lammps log.${DATE}.spin.read_data.g++.4 +rm log.lammps log.cite dump*.lammpstrj +cd .. + +# setforce +cd setforce_spin/ +../../../src/lmp_serial -in in.spin.setforce +cp log.lammps log.${DATE}.spin.setforce.g++.1 +../../../src/lmp_serial -in in.spin.setforce +cp log.lammps log.${DATE}.spin.setforce.g++.4 +rm log.lammps log.cite dump*.lammpstrj +cd .. + +# spin minimizers +cd spinmin/ +../../../src/lmp_serial -in in.spin.bfo_min +cp log.lammps log.${DATE}.spin.bfo_min.g++.1 +../../../src/lmp_serial -in in.spin.bfo_min +cp log.lammps log.${DATE}.spin.bfo_min.g++.4 +../../../src/lmp_serial -in in.spin.bfo_min_cg +cp log.lammps log.${DATE}.spin.bfo_min_cg.g++.1 +../../../src/lmp_serial -in in.spin.bfo_min_cg +cp log.lammps log.${DATE}.spin.bfo_min_cg.g++.4 +../../../src/lmp_serial -in in.spin.bfo_min_lbfgs +cp log.lammps log.${DATE}.spin.bfo_min_lbfgs.g++.1 +../../../src/lmp_serial -in in.spin.bfo_min_lbfgs +cp log.lammps log.${DATE}.spin.bfo_min_lbfgs.g++.4 +../../../src/lmp_serial -in in.spin.iron_min +cp log.lammps log.${DATE}.spin.iron_min.g++.1 +../../../src/lmp_serial -in in.spin.iron_min +cp log.lammps log.${DATE}.spin.iron_min.g++.4 +rm log.lammps log.cite dump*.lammpstrj +cd .. diff --git a/examples/SPIN/setforce_spin/in.spin.setforce b/examples/SPIN/setforce_spin/in.spin.setforce index 0d65955a29..4edf70eb52 100644 --- a/examples/SPIN/setforce_spin/in.spin.setforce +++ b/examples/SPIN/setforce_spin/in.spin.setforce @@ -48,7 +48,7 @@ variable emag equal c_out_mag[5] variable tmag equal c_out_mag[6] thermo 100 -thermo_style custom step time v_magx v_magz v_magnorm v_tmag etotal +thermo_style custom step time v_magx v_magz v_magnorm v_tmag pe v_emag etotal thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz diff --git a/examples/SPIN/test_problems/README b/examples/SPIN/test_problems/README index 5557e3d42b..0a1362ec9c 100644 --- a/examples/SPIN/test_problems/README +++ b/examples/SPIN/test_problems/README @@ -1,4 +1,4 @@ -** The objective of the benchmark examples in this directory +** The objective of the test problems in this directory is the following twofold: - verify the implementation of the LAMMPS' SPIN package by comparing its results to well-known analytic results, or @@ -6,39 +6,39 @@ - provide users with simple comparisons, allowing them to better understand what is implemented in the code. -The LAMMPS input file (bench-*) can be modified, as well as the +The LAMMPS input file (test-*) can be modified, as well as the associated python script, in order to try different comparisons. All scripts can be run by executing the shell script from its directory. Example: -./run-bench-exchange.sh from the benchmarck_damped_exchange/ +./run-test-exchange.sh from the validation_damped_exchange/ directory. -** Below a brief description of the different benchmark +** Below a brief description of the different validation problems: -- benchmarck_damped_precession: +- validation_damped_precession: simulates the damped precession of a single spin in a magnetic field. - Run as: ./run-bench-prec.sh + Run as: ./run-test-prec.sh Output: x, y and z components of the magnetization, and magnetic energy. -- benchmarck_damped_exchange: +- validation_damped_exchange: simulates two spins interacting through the exchange interaction. The parameters in the LAMMPS input script - (bench-spin-precession.in) are calibrated to match the + (test-spin-precession.in) are calibrated to match the exchange definition in the python script (llg_exchange.py). - Run as: ./run-bench-exchange.sh + Run as: ./run-test-exchange.sh Output: average magnetization resulting from the damped precession of the two interacting spins. Also plots the evolution of the magnetic energy. -- benchmarck_langevin_precession: +- validation_langevin_precession: simulates a single spin in a magnetic field and in contact with a thermal bath, and compares the statistical averages of the output to the analytical result of the Langevin function. - Run as: ./run-bench-prec.sh + Run as: ./run-test-prec.sh Output: statistical average of the z-component of the magnetization (along the applied field) and of the magnetic energy versus temperature. Comparison to the Langevin function diff --git a/examples/SPIN/test_problems/validation_damped_exchange/run-test-exchange.sh b/examples/SPIN/test_problems/validation_damped_exchange/run-test-exchange.sh index 15de8d350e..599730fe7b 100755 --- a/examples/SPIN/test_problems/validation_damped_exchange/run-test-exchange.sh +++ b/examples/SPIN/test_problems/validation_damped_exchange/run-test-exchange.sh @@ -5,7 +5,7 @@ rm res_*.dat # compute Lammps ./../../../../src/lmp_serial \ - -in bench-spin-precession.in + -in test-spin-precession.in in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')" en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')" in="$(echo "$in+1" | bc -l)" diff --git a/examples/SPIN/test_problems/validation_damped_exchange/bench-spin-precession.in b/examples/SPIN/test_problems/validation_damped_exchange/test-spin-precession.in similarity index 100% rename from examples/SPIN/test_problems/validation_damped_exchange/bench-spin-precession.in rename to examples/SPIN/test_problems/validation_damped_exchange/test-spin-precession.in diff --git a/examples/SPIN/test_problems/validation_damped_exchange/two_spins.data b/examples/SPIN/test_problems/validation_damped_exchange/two_spins.data new file mode 100644 index 0000000000..013f813751 --- /dev/null +++ b/examples/SPIN/test_problems/validation_damped_exchange/two_spins.data @@ -0,0 +1,22 @@ +LAMMPS data file via write_data, version 19 Sep 2019, timestep = 0 + +2 atoms +1 atom types + +0.0 6.0 xlo xhi +0.0 3.0 ylo yhi +0.0 3.0 zlo zhi + +Masses + +1 1 + +Atoms # spin + +1 1 2.0 0.0 0.0 0.0 1.0 0.0 0.0 0 0 0 +2 1 2.0 3.0 0.0 0.0 0.0 1.0 0.0 0 0 0 + +Velocities + +1 0.0 0.0 0.0 +2 0.0 0.0 0.0 diff --git a/examples/SPIN/test_problems/validation_damped_precession/run-test-prec.sh b/examples/SPIN/test_problems/validation_damped_precession/run-test-prec.sh index 49ebc2ac4e..e21f28521a 100755 --- a/examples/SPIN/test_problems/validation_damped_precession/run-test-prec.sh +++ b/examples/SPIN/test_problems/validation_damped_precession/run-test-prec.sh @@ -5,7 +5,7 @@ rm res_*.dat # compute Lammps ./../../../../src/lmp_serial \ - -in bench-spin-precession.in + -in test-spin-precession.in in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')" en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')" in="$(echo "$in+1" | bc -l)" diff --git a/examples/SPIN/test_problems/validation_damped_precession/bench-spin-precession.in b/examples/SPIN/test_problems/validation_damped_precession/test-spin-precession.in similarity index 92% rename from examples/SPIN/test_problems/validation_damped_precession/bench-spin-precession.in rename to examples/SPIN/test_problems/validation_damped_precession/test-spin-precession.in index ed8a5caeaf..6722e2a5ed 100644 --- a/examples/SPIN/test_problems/validation_damped_precession/bench-spin-precession.in +++ b/examples/SPIN/test_problems/validation_damped_precession/test-spin-precession.in @@ -26,6 +26,7 @@ variable Temperature equal 0.0 variable Nsteps equal 500000 fix 1 all nve/spin lattice no +# fix 2 all precession/spin zeeman ${H} 0.0 0.0 1.0 anisotropy ${Kan} 0.0 0.0 1.0 fix 2 all precession/spin zeeman ${H} 0.0 0.0 1.0 anisotropy ${Kan} 0.0 0.0 1.0 fix_modify 2 energy yes fix 3 all langevin/spin ${Temperature} 0.01 12345 diff --git a/examples/SPIN/test_problems/validation_langevin_precession/bench-prec-spin.in b/examples/SPIN/test_problems/validation_langevin_precession/bench-prec-spin.in new file mode 100644 index 0000000000..45da087477 --- /dev/null +++ b/examples/SPIN/test_problems/validation_langevin_precession/bench-prec-spin.in @@ -0,0 +1,46 @@ +#LAMMPS in.run + +units metal +atom_style spin +atom_modify map array +boundary p p p + +# read_data singlespin.data + +lattice sc 3.0 +region box block 0.0 1.0 0.0 1.0 0.0 1.0 +create_box 1 box +create_atoms 1 box + +mass 1 1.0 +set type 1 spin 1.0 0.0 0.0 1.0 + +# defines a pair/style for neighbor list, but do not use it +pair_style spin/exchange 4.0 +pair_coeff * * exchange 1.0 0.0 0.0 1.0 + +group bead type 1 + +variable H equal 10.0 +variable Kan equal 0.0 +variable Temperature equal 19.00000000000000000000 +variable RUN equal 1000000 + +fix 1 all nve/spin lattice no +fix 2 all precession/spin zeeman ${H} 0.0 0.0 1.0 anisotropy ${Kan} 0.0 0.0 1.0 +fix_modify 2 energy yes +fix 3 all langevin/spin ${Temperature} 0.01 12345 + +compute compute_spin all spin +compute outsp all property/atom spx spy spz sp +compute magsz all reduce ave c_outsp[3] + +thermo 50000 +thermo_style custom step time temp vol pe c_compute_spin[5] etotal + +variable magnetic_energy equal c_compute_spin[5] + +fix avespin all ave/time 1 ${RUN} ${RUN} v_Temperature v_H v_Kan c_magsz v_magnetic_energy file average_spin + +timestep 0.1 +run ${RUN} diff --git a/examples/SPIN/test_problems/validation_langevin_precession/run-test-prec.sh b/examples/SPIN/test_problems/validation_langevin_precession/run-test-prec.sh index 98fceeca95..2427e20095 100755 --- a/examples/SPIN/test_problems/validation_langevin_precession/run-test-prec.sh +++ b/examples/SPIN/test_problems/validation_langevin_precession/run-test-prec.sh @@ -10,10 +10,9 @@ N=20 for (( i=0; i<$N; i++ )) do temp="$(echo "$tempi+$i*($tempf-$tempi)/$N" | bc -l)" - sed s/temperature/${temp}/g bench-prec-spin.template > \ - bench-prec-spin.in - ./../../../../src/lmp_serial \ - -in bench-prec-spin.in + sed s/temperature/${temp}/g test-prec-spin.template > \ + test-prec-spin.in + ./../../../../src/lmp_serial -in test-prec-spin.in Hz="$(tail -n 1 average_spin | awk -F " " '{print $3}')" sz="$(tail -n 1 average_spin | awk -F " " '{print $5}')" en="$(tail -n 1 average_spin | awk -F " " '{print $6}')" diff --git a/examples/SPIN/test_problems/validation_langevin_precession/bench-prec-spin.template b/examples/SPIN/test_problems/validation_langevin_precession/test-prec-spin.template similarity index 100% rename from examples/SPIN/test_problems/validation_langevin_precession/bench-prec-spin.template rename to examples/SPIN/test_problems/validation_langevin_precession/test-prec-spin.template diff --git a/src/SPIN/compute_spin.cpp b/src/SPIN/compute_spin.cpp index 8a71be019b..9a759134b4 100644 --- a/src/SPIN/compute_spin.cpp +++ b/src/SPIN/compute_spin.cpp @@ -41,13 +41,20 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ ComputeSpin::ComputeSpin(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) + Compute(lmp, narg, arg), pair(NULL), spin_pairs(NULL) { if ((narg != 3) && (narg != 4)) error->all(FLERR,"Illegal compute compute/spin command"); vector_flag = 1; size_vector = 6; extvector = 0; + // npairs = npairspin = 0; + + // initialize the magnetic interaction flags + + pair_spin_flag = 0; + long_spin_flag = 0; + precession_spin_flag = 0; init(); @@ -60,6 +67,7 @@ ComputeSpin::ComputeSpin(LAMMPS *lmp, int narg, char **arg) : ComputeSpin::~ComputeSpin() { memory->destroy(vector); + delete [] spin_pairs; } /* ---------------------------------------------------------------------- */ @@ -68,7 +76,11 @@ void ComputeSpin::init() { hbar = force->hplanck/MY_2PI; kb = force->boltz; + npairs = npairspin = 0; + precession_spin_flag = 0; + // set ptrs on Pair/Spin styles + // loop 1: obtain # of Pairs, and # of Pair/Spin styles if (force->pair_match("spin",0,0)) { // only one Pair/Spin style @@ -173,9 +185,10 @@ void ComputeSpin::compute_vector() // update magnetic precession energies if (precession_spin_flag) { - magenergy -= lockprecessionspin->compute_zeeman_energy(sp[i]); - magenergy -= lockprecessionspin->compute_anisotropy_energy(sp[i]); - magenergy -= lockprecessionspin->compute_cubic_energy(sp[i]); + magenergy += lockprecessionspin->emag[i]; + // magenergy -= lockprecessionspin->compute_zeeman_energy(sp[i]); + // magenergy -= lockprecessionspin->compute_anisotropy_energy(sp[i]); + // magenergy -= lockprecessionspin->compute_cubic_energy(sp[i]); } // update magnetic pair interactions diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 57e4549718..ffe3fc838c 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -30,6 +30,7 @@ #include "force.h" #include "input.h" #include "math_const.h" +#include "memory.h" #include "modify.h" #include "respa.h" #include "update.h" @@ -43,7 +44,7 @@ enum{CONSTANT,EQUAL}; /* ---------------------------------------------------------------------- */ -FixPrecessionSpin::FixPrecessionSpin(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) +FixPrecessionSpin::FixPrecessionSpin(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), emag(NULL) { if (narg < 7) error->all(FLERR,"Illegal precession/spin command"); @@ -154,6 +155,9 @@ FixPrecessionSpin::FixPrecessionSpin(LAMMPS *lmp, int narg, char **arg) : Fix(lm FixPrecessionSpin::~FixPrecessionSpin() { delete [] magstr; + + // test emag list storing mag energies + memory->destroy(emag); } /* ---------------------------------------------------------------------- */ @@ -213,6 +217,11 @@ void FixPrecessionSpin::init() if (varflag == CONSTANT) set_magneticprecession(); + // test emag list storing mag energies + // init. size of energy stacking lists + + nlocal_max = atom->nlocal; + memory->grow(emag,nlocal_max,"pair/spin:emag"); } /* ---------------------------------------------------------------------- */ @@ -252,21 +261,33 @@ void FixPrecessionSpin::post_force(int /* vflag */) double **fm = atom->fm; double **sp = atom->sp; const int nlocal = atom->nlocal; - double spi[3], fmi[3], epreci; + double spi[4], fmi[3], epreci; + // test emag list storing mag energies + // checking size of emag + if (nlocal_max < nlocal) { // grow emag lists if necessary + nlocal_max = nlocal; + memory->grow(emag,nlocal_max,"pair/spin:emag"); + } + eflag = 0; eprec = 0.0; for (int i = 0; i < nlocal; i++) { + + // test emag list storing mag energies + emag[i] = 0.0; + if (mask[i] & groupbit) { epreci = 0.0; spi[0] = sp[i][0]; spi[1] = sp[i][1]; spi[2] = sp[i][2]; + spi[3] = sp[i][3]; fmi[0] = fmi[1] = fmi[2] = 0.0; if (zeeman_flag) { // compute Zeeman interaction compute_zeeman(i,fmi); - epreci -= hbar*(spi[0]*fmi[0] + spi[1]*fmi[1] + spi[2]*fmi[2]); + epreci -= compute_zeeman_energy(spi); } if (aniso_flag) { // compute magnetic anisotropy @@ -279,6 +300,7 @@ void FixPrecessionSpin::post_force(int /* vflag */) epreci -= compute_cubic_energy(spi); } + emag[i] += epreci; eprec += epreci; fm[i][0] += fmi[0]; fm[i][1] += fmi[1]; diff --git a/src/SPIN/fix_precession_spin.h b/src/SPIN/fix_precession_spin.h index 3c809506c1..7767864655 100644 --- a/src/SPIN/fix_precession_spin.h +++ b/src/SPIN/fix_precession_spin.h @@ -57,6 +57,10 @@ class FixPrecessionSpin : public Fix { void compute_cubic(double *, double *); double compute_cubic_energy(double *); + // test emag list storing mag energies + int nlocal_max; // max value of nlocal (for size of lists) + double *emag; // energy list + protected: int style; // style of the magnetic precession diff --git a/src/SPIN/pair_spin.cpp b/src/SPIN/pair_spin.cpp index 01b8775eab..112f404bc0 100644 --- a/src/SPIN/pair_spin.cpp +++ b/src/SPIN/pair_spin.cpp @@ -42,7 +42,7 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -PairSpin::PairSpin(LAMMPS *lmp) : Pair(lmp) +PairSpin::PairSpin(LAMMPS *lmp) : Pair(lmp), emag(NULL) { hbar = force->hplanck/MY_2PI; single_enable = 0; From 72a9ce0f323f00375cfaed51df0c868c2e21eaff Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 4 Mar 2020 12:31:37 -0700 Subject: [PATCH 043/577] Add loop chunking option to compute_orientorder_atom_kokkos --- .../compute_orientorder_atom_kokkos.cpp | 173 ++++++++++-------- src/KOKKOS/compute_orientorder_atom_kokkos.h | 2 +- src/compute_orientorder_atom.cpp | 8 + src/compute_orientorder_atom.h | 1 + 4 files changed, 105 insertions(+), 79 deletions(-) diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp index 65bb08b18d..a4a4451197 100644 --- a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp @@ -130,9 +130,6 @@ void ComputeOrientOrderAtomKokkos::compute_peratom() d_neighbors = k_list->d_neighbors; d_ilist = k_list->d_ilist; - maxneigh = 0; - Kokkos::parallel_reduce("ComputeOrientOrderAtomKokkos::find_max_neighs",inum, FindMaxNumNeighs(k_list), Kokkos::Experimental::Max(maxneigh)); - // grow order parameter array if necessary if (atom->nmax > nmax) { @@ -141,21 +138,29 @@ void ComputeOrientOrderAtomKokkos::compute_peratom() memoryKK->create_kokkos(k_qnarray,qnarray,nmax,ncol,"orientorder/atom:qnarray"); array_atom = qnarray; d_qnarray = k_qnarray.template view(); + } - d_qnm = t_sna_3c("orientorder/atom:qnm",nmax,nqlist,2*qmax+1); - d_ncount = t_sna_1i("orientorder/atom:ncount",nmax); + chunk_size = MIN(chunksize,inum); // "chunksize" variable is set by user + chunk_offset = 0; - // insure distsq and nearest arrays are long enough - - if (maxneigh > d_distsq.extent(1)) { - d_distsq = t_sna_2d_lr("orientorder/atom:distsq",nmax,maxneigh); - d_nearest = t_sna_2i_lr("orientorder/atom:nearest",nmax,maxneigh); - d_rlist = t_sna_3d_lr("orientorder/atom:rlist",nmax,maxneigh,3); - - d_distsq_um = d_distsq; - d_rlist_um = d_rlist; - d_nearest_um = d_nearest; - } + if (chunk_size > d_ncount.extent(0)) { + d_qnm = t_sna_3c("orientorder/atom:qnm",chunk_size,nqlist,2*qmax+1); + d_ncount = t_sna_1i("orientorder/atom:ncount",chunk_size); + } + + // insure distsq and nearest arrays are long enough + + maxneigh = 0; + Kokkos::parallel_reduce("ComputeOrientOrderAtomKokkos::find_max_neighs",inum, FindMaxNumNeighs(k_list), Kokkos::Experimental::Max(maxneigh)); + + if (chunk_size > d_distsq.extent(0) || maxneigh > d_distsq.extent(1)) { + d_distsq = t_sna_2d_lr("orientorder/atom:distsq",nmax,maxneigh); + d_nearest = t_sna_2i_lr("orientorder/atom:nearest",nmax,maxneigh); + d_rlist = t_sna_3d_lr("orientorder/atom:rlist",nmax,maxneigh,3); + + d_distsq_um = d_distsq; + d_rlist_um = d_rlist; + d_nearest_um = d_nearest; } // compute order parameter for each atom in group @@ -178,21 +183,29 @@ void ComputeOrientOrderAtomKokkos::compute_peratom() copymode = 1; - //Neigh - typename Kokkos::TeamPolicy policy_neigh(inum,team_size,vector_length); - Kokkos::parallel_for("ComputeOrientOrderAtomNeigh",policy_neigh,*this); + while (chunk_offset < inum) { // chunk up loop to prevent running out of memory - //Select3 - typename Kokkos::RangePolicy policy_select3(0,inum); - Kokkos::parallel_for("ComputeOrientOrderAtomSelect3",policy_select3,*this); + if (chunk_size > inum - chunk_offset) + chunk_size = inum - chunk_offset; - //BOOP1 - typename Kokkos::TeamPolicy policy_boop1(((inum+team_size-1)/team_size)*maxneigh,team_size,vector_length); - Kokkos::parallel_for("ComputeOrientOrderAtomBOOP1",policy_boop1,*this); + //Neigh + typename Kokkos::TeamPolicy policy_neigh(chunk_size,team_size,vector_length); + Kokkos::parallel_for("ComputeOrientOrderAtomNeigh",policy_neigh,*this); + + //Select3 + typename Kokkos::RangePolicy policy_select3(0,chunk_size); + Kokkos::parallel_for("ComputeOrientOrderAtomSelect3",policy_select3,*this); + + //BOOP1 + typename Kokkos::TeamPolicy policy_boop1(((chunk_size+team_size-1)/team_size)*maxneigh,team_size,vector_length); + Kokkos::parallel_for("ComputeOrientOrderAtomBOOP1",policy_boop1,*this); + + //BOOP2 + typename Kokkos::RangePolicy policy_boop2(0,chunk_size); + Kokkos::parallel_for("ComputeOrientOrderAtomBOOP2",policy_boop2,*this); - //BOOP2 - typename Kokkos::RangePolicy policy_boop2(0,inum); - Kokkos::parallel_for("ComputeOrientOrderAtomBOOP2",policy_boop2,*this); + chunk_offset += chunk_size; + } // end while copymode = 0; @@ -207,7 +220,7 @@ KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomNeigh,const typename Kokkos::TeamPolicy::member_type& team) const { const int ii = team.league_rank(); - const int i = d_ilist[ii]; + const int i = d_ilist[ii + chunk_offset]; if (mask[i] & groupbit) { const X_FLOAT xtmp = x(i,0); const X_FLOAT ytmp = x(i,1); @@ -263,7 +276,7 @@ template KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomSelect3,const int& ii) const { - const int i = d_ilist[ii]; + const int i = d_ilist[ii + chunk_offset]; const int ncount = d_ncount(ii); // if not nnn neighbors, order parameter = 0; @@ -287,11 +300,12 @@ KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomBOOP1,const typename Kokkos::TeamPolicy::member_type& team) const { // Extract the atom number - int ii = team.team_rank() + team.team_size() * (team.league_rank() % ((inum+team.team_size()-1)/team.team_size())); - if (ii >= inum) return; + int ii = team.team_rank() + team.team_size() * (team.league_rank() % + ((chunk_size+team.team_size()-1)/team.team_size())); + if (ii >= chunk_size) return; // Extract the neighbor number - const int jj = team.league_rank() / ((inum+team.team_size()-1)/team.team_size()); + const int jj = team.league_rank() / ((chunk_size+team.team_size()-1)/team.team_size()); const int ncount = d_ncount(ii); if (jj >= ncount) return; @@ -306,7 +320,6 @@ void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrder template KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomBOOP2,const int& ii) const { - const int i = d_ilist[ii]; const int ncount = d_ncount(ii); calc_boop2(ncount, ii); } @@ -338,14 +351,14 @@ void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrder template KOKKOS_INLINE_FUNCTION -void ComputeOrientOrderAtomKokkos::select3(int k, int n, int iatom) const +void ComputeOrientOrderAtomKokkos::select3(int k, int n, int ii) const { int i,ir,j,l,mid,ia,itmp; double a,tmp,a3[3]; - auto arr = Kokkos::subview(d_distsq_um, iatom, Kokkos::ALL); - auto iarr = Kokkos::subview(d_nearest_um, iatom, Kokkos::ALL); - auto arr3 = Kokkos::subview(d_rlist_um, iatom, Kokkos::ALL, Kokkos::ALL); + auto arr = Kokkos::subview(d_distsq_um, ii, Kokkos::ALL); + auto iarr = Kokkos::subview(d_nearest_um, ii, Kokkos::ALL); + auto arr3 = Kokkos::subview(d_rlist_um, ii, Kokkos::ALL, Kokkos::ALL); l = 0; ir = n-1; @@ -414,11 +427,13 @@ void ComputeOrientOrderAtomKokkos::select3(int k, int n, int iatom) template KOKKOS_INLINE_FUNCTION -void ComputeOrientOrderAtomKokkos::calc_boop1(int ncount, int iatom, int ineigh) const +void ComputeOrientOrderAtomKokkos::calc_boop1(int ncount, int ii, int ineigh) const { - const double r0 = d_rlist(iatom,ineigh,0); - const double r1 = d_rlist(iatom,ineigh,1); - const double r2 = d_rlist(iatom,ineigh,2); + const int i = d_ilist[ii + chunk_offset]; + + const double r0 = d_rlist(ii,ineigh,0); + const double r1 = d_rlist(ii,ineigh,1); + const double r2 = d_rlist(ii,ineigh,2); const double rmag = sqrt(r0*r0 + r1*r1 + r2*r2); if(rmag <= MY_EPSILON) { return; @@ -439,27 +454,27 @@ void ComputeOrientOrderAtomKokkos::calc_boop1(int ncount, int iatom, for (int il = 0; il < nqlist; il++) { const int l = d_qlist[il]; - //d_qnm(iatom,il,l).re += polar_prefactor(l, 0, costheta); + //d_qnm(ii,il,l).re += polar_prefactor(l, 0, costheta); const double polar_pf = polar_prefactor(l, 0, costheta); - Kokkos::atomic_add(&(d_qnm(iatom,il,l).re), polar_pf); + Kokkos::atomic_add(&(d_qnm(ii,il,l).re), polar_pf); SNAcomplex expphim = {expphi.re,expphi.im}; for(int m = 1; m <= +l; m++) { const double prefactor = polar_prefactor(l, m, costheta); SNAcomplex c = {prefactor * expphim.re, prefactor * expphim.im}; - //d_qnm(iatom,il,m+l).re += c.re; - //d_qnm(iatom,il,m+l).im += c.im; - Kokkos::atomic_add(&(d_qnm(iatom,il,m+l).re), c.re); - Kokkos::atomic_add(&(d_qnm(iatom,il,m+l).im), c.im); + //d_qnm(ii,il,m+l).re += c.re; + //d_qnm(ii,il,m+l).im += c.im; + Kokkos::atomic_add(&(d_qnm(ii,il,m+l).re), c.re); + Kokkos::atomic_add(&(d_qnm(ii,il,m+l).im), c.im); if(m & 1) { - //d_qnm(iatom,il,-m+l).re -= c.re; - //d_qnm(iatom,il,-m+l).im += c.im; - Kokkos::atomic_add(&(d_qnm(iatom,il,-m+l).re), -c.re); - Kokkos::atomic_add(&(d_qnm(iatom,il,-m+l).im), c.im); + //d_qnm(ii,il,-m+l).re -= c.re; + //d_qnm(ii,il,-m+l).im += c.im; + Kokkos::atomic_add(&(d_qnm(ii,il,-m+l).re), -c.re); + Kokkos::atomic_add(&(d_qnm(ii,il,-m+l).im), c.im); } else { - //d_qnm(iatom,il,-m+l).re += c.re; - //d_qnm(iatom,il,-m+l).im -= c.im; - Kokkos::atomic_add(&(d_qnm(iatom,il,-m+l).re), c.re); - Kokkos::atomic_add(&(d_qnm(iatom,il,-m+l).im), -c.im); + //d_qnm(ii,il,-m+l).re += c.re; + //d_qnm(ii,il,-m+l).im -= c.im; + Kokkos::atomic_add(&(d_qnm(ii,il,-m+l).re), c.re); + Kokkos::atomic_add(&(d_qnm(ii,il,-m+l).im), -c.im); } SNAcomplex tmp; tmp.re = expphim.re*expphi.re - expphim.im*expphi.im; @@ -476,16 +491,18 @@ void ComputeOrientOrderAtomKokkos::calc_boop1(int ncount, int iatom, template KOKKOS_INLINE_FUNCTION -void ComputeOrientOrderAtomKokkos::calc_boop2(int ncount, int iatom) const +void ComputeOrientOrderAtomKokkos::calc_boop2(int ncount, int ii) const { + const int i = d_ilist[ii + chunk_offset]; + // convert sums to averages double facn = 1.0 / ncount; for (int il = 0; il < nqlist; il++) { int l = d_qlist[il]; for(int m = 0; m < 2*l+1; m++) { - d_qnm(iatom,il,m).re *= facn; - d_qnm(iatom,il,m).im *= facn; + d_qnm(ii,il,m).re *= facn; + d_qnm(ii,il,m).im *= facn; } } @@ -498,8 +515,8 @@ void ComputeOrientOrderAtomKokkos::calc_boop2(int ncount, int iatom) double qnormfac = sqrt(MY_4PI/(2*l+1)); double qm_sum = 0.0; for(int m = 0; m < 2*l+1; m++) - qm_sum += d_qnm(iatom,il,m).re*d_qnm(iatom,il,m).re + d_qnm(iatom,il,m).im*d_qnm(iatom,il,m).im; - d_qnarray(iatom,jj++) = qnormfac * sqrt(qm_sum); + qm_sum += d_qnm(ii,il,m).re*d_qnm(ii,il,m).re + d_qnm(ii,il,m).im*d_qnm(ii,il,m).im; + d_qnarray(i,jj++) = qnormfac * sqrt(qm_sum); } // calculate W_l @@ -513,13 +530,13 @@ void ComputeOrientOrderAtomKokkos::calc_boop2(int ncount, int iatom) for(int m2 = MAX(0,l-m1); m2 < MIN(2*l+1,3*l-m1+1); m2++) { int m = m1 + m2 - l; SNAcomplex qm1qm2; - qm1qm2.re = d_qnm(iatom,il,m1).re*d_qnm(iatom,il,m2).re - d_qnm(iatom,il,m1).im*d_qnm(iatom,il,m2).im; - qm1qm2.im = d_qnm(iatom,il,m1).re*d_qnm(iatom,il,m2).im + d_qnm(iatom,il,m1).im*d_qnm(iatom,il,m2).re; - wlsum += (qm1qm2.re*d_qnm(iatom,il,m).re + qm1qm2.im*d_qnm(iatom,il,m).im)*d_cglist[idxcg_count]; + qm1qm2.re = d_qnm(ii,il,m1).re*d_qnm(ii,il,m2).re - d_qnm(ii,il,m1).im*d_qnm(ii,il,m2).im; + qm1qm2.im = d_qnm(ii,il,m1).re*d_qnm(ii,il,m2).im + d_qnm(ii,il,m1).im*d_qnm(ii,il,m2).re; + wlsum += (qm1qm2.re*d_qnm(ii,il,m).re + qm1qm2.im*d_qnm(ii,il,m).im)*d_cglist[idxcg_count]; idxcg_count++; } } - d_qnarray(iatom,jj++) = wlsum/sqrt(2.0*l+1.0); + d_qnarray(i,jj++) = wlsum/sqrt(2.0*l+1.0); } } @@ -534,19 +551,19 @@ void ComputeOrientOrderAtomKokkos::calc_boop2(int ncount, int iatom) for(int m2 = MAX(0,l-m1); m2 < MIN(2*l+1,3*l-m1+1); m2++) { const int m = m1 + m2 - l; SNAcomplex qm1qm2; - qm1qm2.re = d_qnm(iatom,il,m1).re*d_qnm(iatom,il,m2).re - d_qnm(iatom,il,m1).im*d_qnm(iatom,il,m2).im; - qm1qm2.im = d_qnm(iatom,il,m1).re*d_qnm(iatom,il,m2).im + d_qnm(iatom,il,m1).im*d_qnm(iatom,il,m2).re; - wlsum += (qm1qm2.re*d_qnm(iatom,il,m).re + qm1qm2.im*d_qnm(iatom,il,m).im)*d_cglist[idxcg_count]; + qm1qm2.re = d_qnm(ii,il,m1).re*d_qnm(ii,il,m2).re - d_qnm(ii,il,m1).im*d_qnm(ii,il,m2).im; + qm1qm2.im = d_qnm(ii,il,m1).re*d_qnm(ii,il,m2).im + d_qnm(ii,il,m1).im*d_qnm(ii,il,m2).re; + wlsum += (qm1qm2.re*d_qnm(ii,il,m).re + qm1qm2.im*d_qnm(ii,il,m).im)*d_cglist[idxcg_count]; idxcg_count++; } } // Whats = [w/(q/np.sqrt(np.pi * 4 / (2 * l + 1)))**3 if abs(q) > 1.0e-6 else 0.0 for l,q,w in zip(range(1,max_l+1),Qs,Ws)] - if (d_qnarray(iatom,il) < QEPSILON) - d_qnarray(iatom,jj++) = 0.0; + if (d_qnarray(i,il) < QEPSILON) + d_qnarray(i,jj++) = 0.0; else { const double qnormfac = sqrt(MY_4PI/(2*l+1)); - const double qnfac = qnormfac/d_qnarray(iatom,il); - d_qnarray(iatom,jj++) = wlsum/sqrt(2.0*l+1.0)*(qnfac*qnfac*qnfac); + const double qnfac = qnormfac/d_qnarray(i,il); + d_qnarray(i,jj++) = wlsum/sqrt(2.0*l+1.0)*(qnfac*qnfac*qnfac); } } } @@ -556,17 +573,17 @@ void ComputeOrientOrderAtomKokkos::calc_boop2(int ncount, int iatom) if (qlcompflag) { const int il = iqlcomp; const int l = qlcomp; - if (d_qnarray(iatom,il) < QEPSILON) + if (d_qnarray(i,il) < QEPSILON) for(int m = 0; m < 2*l+1; m++) { - d_qnarray(iatom,jj++) = 0.0; - d_qnarray(iatom,jj++) = 0.0; + d_qnarray(i,jj++) = 0.0; + d_qnarray(i,jj++) = 0.0; } else { const double qnormfac = sqrt(MY_4PI/(2*l+1)); - const double qnfac = qnormfac/d_qnarray(iatom,il); + const double qnfac = qnormfac/d_qnarray(i,il); for(int m = 0; m < 2*l+1; m++) { - d_qnarray(iatom,jj++) = d_qnm(iatom,il,m).re * qnfac; - d_qnarray(iatom,jj++) = d_qnm(iatom,il,m).im * qnfac; + d_qnarray(i,jj++) = d_qnm(ii,il,m).re * qnfac; + d_qnarray(i,jj++) = d_qnm(ii,il,m).im * qnfac; } } } diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.h b/src/KOKKOS/compute_orientorder_atom_kokkos.h index 01d9993af2..4964df52d4 100644 --- a/src/KOKKOS/compute_orientorder_atom_kokkos.h +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.h @@ -87,7 +87,7 @@ class ComputeOrientOrderAtomKokkos : public ComputeOrientOrderAtom { typename AT::t_float_2d d_qnarray; private: - int inum; + int inum,chunk_size,chunk_offset; typename AT::t_x_array_randomread x; typename ArrayTypes::t_int_1d mask; diff --git a/src/compute_orientorder_atom.cpp b/src/compute_orientorder_atom.cpp index 2abe4e3bb3..c759d14030 100644 --- a/src/compute_orientorder_atom.cpp +++ b/src/compute_orientorder_atom.cpp @@ -61,6 +61,7 @@ ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg wlflag = 0; wlhatflag = 0; qlcompflag = 0; + chunksize = 16384; // specify which orders to request @@ -143,6 +144,13 @@ ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg error->all(FLERR,"Illegal compute orientorder/atom command"); cutsq = cutoff*cutoff; iarg += 2; + } else if (strcmp(arg[iarg],"chunksize") == 0) { + if (iarg+2 > narg) + error->all(FLERR,"Illegal compute orientorder/atom command"); + chunksize = force->numeric(FLERR,arg[iarg+1]); + if (chunksize <= 0) + error->all(FLERR,"Illegal compute orientorder/atom command"); + iarg += 2; } else error->all(FLERR,"Illegal compute orientorder/atom command"); } diff --git a/src/compute_orientorder_atom.h b/src/compute_orientorder_atom.h index 46894db373..4e5084bfcd 100644 --- a/src/compute_orientorder_atom.h +++ b/src/compute_orientorder_atom.h @@ -62,6 +62,7 @@ class ComputeOrientOrderAtom : public Compute { virtual void init_clebsch_gordan(); double *cglist; // Clebsch-Gordan coeffs int idxcg_max; + int chunksize; }; } From 60bba3e238d7adbc0f5705f9db112ab34c1df4a2 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 4 Mar 2020 13:08:55 -0700 Subject: [PATCH 044/577] Fix var name --- src/KOKKOS/compute_orientorder_atom_kokkos.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp index a4a4451197..0b32d10ace 100644 --- a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp @@ -154,9 +154,9 @@ void ComputeOrientOrderAtomKokkos::compute_peratom() Kokkos::parallel_reduce("ComputeOrientOrderAtomKokkos::find_max_neighs",inum, FindMaxNumNeighs(k_list), Kokkos::Experimental::Max(maxneigh)); if (chunk_size > d_distsq.extent(0) || maxneigh > d_distsq.extent(1)) { - d_distsq = t_sna_2d_lr("orientorder/atom:distsq",nmax,maxneigh); - d_nearest = t_sna_2i_lr("orientorder/atom:nearest",nmax,maxneigh); - d_rlist = t_sna_3d_lr("orientorder/atom:rlist",nmax,maxneigh,3); + d_distsq = t_sna_2d_lr("orientorder/atom:distsq",chunk_size,maxneigh); + d_nearest = t_sna_2i_lr("orientorder/atom:nearest",chunk_size,maxneigh); + d_rlist = t_sna_3d_lr("orientorder/atom:rlist",chunk_size,maxneigh,3); d_distsq_um = d_distsq; d_rlist_um = d_rlist; From 437055f9130b1e083ec78d9a6cceb37503f14189 Mon Sep 17 00:00:00 2001 From: "Jibril B. Coulibaly" Date: Thu, 12 Mar 2020 11:11:38 -0500 Subject: [PATCH 045/577] implement the `scale` keyword of `fix adapt` for diameter and charge --- src/fix_adapt.cpp | 51 ++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 8668690e1d..10ac290d02 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -235,7 +235,7 @@ int FixAdapt::setmask() void FixAdapt::post_constructor() { - if (!resetflag) return; + // Create local Fix Store even when ressetflag == false, to be able to use `scale` keyword for charge and diameter if (!diamflag && !chgflag) return; // new id = fix-ID + FIX_STORE_ATTRIBUTE @@ -251,7 +251,7 @@ void FixAdapt::post_constructor() newarg[4] = (char *) "1"; newarg[5] = (char *) "1"; - if (diamflag) { + if (diamflag && atom->radius_flag) {// Previously unsafe! The radius_flag was not checked, could run an atom_style w/o radius attribute and get here without a previous check / error ! int n = strlen(id) + strlen("_FIX_STORE_DIAM") + 1; id_fix_diam = new char[n]; strcpy(id_fix_diam,id); @@ -274,7 +274,7 @@ void FixAdapt::post_constructor() } } - if (chgflag) { + if (chgflag && atom->q_flag) {// Previously unsafe! The q_flag was not checked, could run an atom_style w/o charge attribute and get here without a previous check / error ! int n = strlen(id) + strlen("_FIX_STORE_CHG") + 1; id_fix_chg = new char[n]; strcpy(id_fix_chg,id); @@ -455,7 +455,7 @@ void FixAdapt::init() } // fixes that store initial per-atom values - + /* Unnecessary ? `fix_diam` and `fix_chg` seem to be already defined in FixAdapt::post_constructor(), commenting them out does not crash my MWE if (id_fix_diam) { int ifix = modify->find_fix(id_fix_diam); if (ifix < 0) error->all(FLERR,"Could not find fix adapt storage fix ID"); @@ -465,7 +465,7 @@ void FixAdapt::init() int ifix = modify->find_fix(id_fix_chg); if (ifix < 0) error->all(FLERR,"Could not find fix adapt storage fix ID"); fix_chg = (FixStore *) modify->fix[ifix]; - } + }*/ if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; @@ -568,38 +568,39 @@ void FixAdapt::change_settings() // also scale rmass to new value if (ad->aparam == DIAMETER) { - int mflag = 0; - if (atom->rmass_flag) mflag = 1; + /* `mflag` unnecessary ? the test if (!atom->radius_flag) in FixAdapt::init() should perevent `atom->rmass_flag == false`. Unless there can be combinations of atoms with `radius` but without `rmass` + It could also be unsafe since rmass_flag could be added using `fix property/atom` even for an atom_style that does not have radius attributes */ double density; - double *radius = atom->radius; + double *vec = fix_diam->vstore; // Get initial radius to use `scale` keyword + double *radius = atom->radius; double *rmass = atom->rmass; int *mask = atom->mask; int nlocal = atom->nlocal; int nall = nlocal + atom->nghost; - if (mflag == 0) { - for (i = 0; i < nall; i++) - if (mask[i] & groupbit) - radius[i] = 0.5*value; - } else { - for (i = 0; i < nall; i++) - if (mask[i] & groupbit) { - density = rmass[i] / (4.0*MY_PI/3.0 * - radius[i]*radius[i]*radius[i]); - radius[i] = 0.5*value; - rmass[i] = 4.0*MY_PI/3.0 * - radius[i]*radius[i]*radius[i] * density; - } - } + for (i = 0; i < nall; i++) + if (mask[i] & groupbit) { + density = rmass[i] / (4.0*MY_PI/3.0 * + radius[i]*radius[i]*radius[i]); + if (scaleflag) radius[i] = value * vec[i]; + else radius[i] = 0.5*value; + rmass[i] = 4.0*MY_PI/3.0 * + radius[i]*radius[i]*radius[i] * density; + } + } else if (ad->aparam == CHARGE) { - double *q = atom->q; + double *vec = fix_chg->vstore; // Get initial charge to use `scale` keyword + double *q = atom->q; int *mask = atom->mask; int nlocal = atom->nlocal; int nall = nlocal + atom->nghost; for (i = 0; i < nall; i++) - if (mask[i] & groupbit) q[i] = value; + if (mask[i] & groupbit) { + if (scaleflag) q[i] = value * vec[i]; + else q[i] = value; + } } } } @@ -607,7 +608,7 @@ void FixAdapt::change_settings() modify->addstep_compute(update->ntimestep + nevery); // re-initialize pair styles if any PAIR settings were changed - // ditto for bond styles if any BOND setitings were changes + // ditto for bond styles if any BOND settings were changed // this resets other coeffs that may depend on changed values, // and also offset and tail corrections From 14bade977e8064c9cc5b09f3701940832585d080 Mon Sep 17 00:00:00 2001 From: "Jibril B. Coulibaly" Date: Fri, 13 Mar 2020 10:59:11 -0500 Subject: [PATCH 046/577] implement diameter/disc option for 2d simulations --- src/fix_adapt.cpp | 30 ++++++++++++++++++++---------- src/fix_adapt.h | 1 + 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 10ac290d02..ee85d054c8 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -15,6 +15,7 @@ #include #include "atom.h" #include "bond.h" +#include "domain.h" #include "update.h" #include "group.h" #include "modify.h" @@ -139,9 +140,11 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL) } else if (strcmp(arg[iarg],"atom") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal fix adapt command"); adapt[nadapt].which = ATOM; - if (strcmp(arg[iarg+1],"diameter") == 0) { + if (strcmp(arg[iarg+1],"diameter") == 0 || strcmp(arg[iarg+1],"diameter/disc") == 0) { adapt[nadapt].aparam = DIAMETER; diamflag = 1; + discflag = 0; + if(strcmp(arg[iarg+1],"diameter/disc") == 0) discflag = 1; } else if (strcmp(arg[iarg+1],"charge") == 0) { adapt[nadapt].aparam = CHARGE; chgflag = 1; @@ -428,6 +431,8 @@ void FixAdapt::init() if (ad->aparam == DIAMETER) { if (!atom->radius_flag) error->all(FLERR,"Fix adapt requires atom attribute diameter"); + if(discflag && domain->dimension!=2) + error->all(FLERR,"Fix adapt requires 2d simulation"); } if (ad->aparam == CHARGE) { if (!atom->q_flag) @@ -568,8 +573,8 @@ void FixAdapt::change_settings() // also scale rmass to new value if (ad->aparam == DIAMETER) { - /* `mflag` unnecessary ? the test if (!atom->radius_flag) in FixAdapt::init() should perevent `atom->rmass_flag == false`. Unless there can be combinations of atoms with `radius` but without `rmass` - It could also be unsafe since rmass_flag could be added using `fix property/atom` even for an atom_style that does not have radius attributes */ + /* `mflag` unnecessary ? the test `if(!atom->radius_flag)` in `FixAdapt::init()` should perevent `atom->rmass_flag == false`. Unless there can be combinations of atom styles with `radius` but without `rmass` + It could also be unsafe since rmass_flag could be added using `fix property/atom` even for an atom_style that does not have radius attribute, although that possibility should be avoided as well with the test `if(!atom->radius_flag)` in `FixAdapt::init()` */ double density; double *vec = fix_diam->vstore; // Get initial radius to use `scale` keyword @@ -581,12 +586,14 @@ void FixAdapt::change_settings() for (i = 0; i < nall; i++) if (mask[i] & groupbit) { - density = rmass[i] / (4.0*MY_PI/3.0 * - radius[i]*radius[i]*radius[i]); + if(discflag) density = rmass[i] / (MY_PI * radius[i]*radius[i]); + else density = rmass[i] / (4.0*MY_PI/3.0 * + radius[i]*radius[i]*radius[i]); if (scaleflag) radius[i] = value * vec[i]; else radius[i] = 0.5*value; - rmass[i] = 4.0*MY_PI/3.0 * - radius[i]*radius[i]*radius[i] * density; + if(discflag) rmass[i] = MY_PI * radius[i]*radius[i] * density; + else rmass[i] = 4.0*MY_PI/3.0 * + radius[i]*radius[i]*radius[i] * density; } } else if (ad->aparam == CHARGE) { @@ -671,10 +678,13 @@ void FixAdapt::restore_settings() for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - density = rmass[i] / (4.0*MY_PI/3.0 * - radius[i]*radius[i]*radius[i]); + if(discflag) density = rmass[i] / (MY_PI * radius[i]*radius[i]); + else density = rmass[i] / (4.0*MY_PI/3.0 * + radius[i]*radius[i]*radius[i]); radius[i] = vec[i]; - rmass[i] = 4.0*MY_PI/3.0 * radius[i]*radius[i]*radius[i] * density; + if(discflag) rmass[i] = MY_PI * radius[i]*radius[i] * density; + else rmass[i] = 4.0*MY_PI/3.0 * + radius[i]*radius[i]*radius[i] * density; } } if (chgflag) { diff --git a/src/fix_adapt.h b/src/fix_adapt.h index 0bb594b7a4..dbf8f5f792 100644 --- a/src/fix_adapt.h +++ b/src/fix_adapt.h @@ -47,6 +47,7 @@ class FixAdapt : public Fix { int nlevels_respa; char *id_fix_diam,*id_fix_chg; class FixStore *fix_diam,*fix_chg; + int discflag; struct Adapt { int which,ivar; From 8b8f928347812d959d940f9d9e0132e187df16fc Mon Sep 17 00:00:00 2001 From: "Jibril B. Coulibaly" Date: Fri, 13 Mar 2020 12:19:16 -0500 Subject: [PATCH 047/577] update documentation --- doc/src/fix_adapt.rst | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/doc/src/fix_adapt.rst b/doc/src/fix_adapt.rst index 0e57ec98c1..e96a4ed654 100644 --- a/doc/src/fix_adapt.rst +++ b/doc/src/fix_adapt.rst @@ -15,7 +15,7 @@ Syntax * adapt = style name of this fix command * N = adapt simulation settings every this many timesteps * one or more attribute/arg pairs may be appended -* attribute = *pair* or *kspace* or *atom* +* attribute = *pair* or *bond* or *kspace* or *atom* .. parsed-literal:: @@ -90,8 +90,8 @@ the end of a simulation. Even if *reset* is specified as *yes*\ , a restart file written during a simulation will contain the modified settings. -If the *scale* keyword is set to *no*\ , then the value the parameter is -set to will be whatever the variable generates. If the *scale* +If the *scale* keyword is set to *no*\ , then the value of the altered +parameter will be whatever the variable generates. If the *scale* keyword is set to *yes*\ , then the value of the altered parameter will be the initial value of that parameter multiplied by whatever the variable generates. I.e. the variable is now a "scale factor" applied @@ -324,26 +324,23 @@ The *atom* keyword enables various atom properties to be changed. The current list of atom parameters that can be varied by this fix: * charge = charge on particle -* diameter = diameter of particle +* diameter, or, diameter/disc = diameter of particle The *v\_name* argument of the *atom* keyword is the name of an :doc:`equal-style variable ` which will be evaluated each time -this fix is invoked to set the parameter to a new value. It should be -specified as v\_name, where name is the variable name. See the +this fix is invoked to set, or scale, the parameter to a new value. +It should be specified as v\_name, where name is the variable name. See the discussion above describing the formulas associated with equal-style variables. The new value is assigned to the corresponding attribute for all atoms in the fix group. -.. note:: - - The *atom* keyword works this way whether the *scale* keyword is - set to *no* or *yes*\ . I.e. the use of scale yes is not yet supported - by the *atom* keyword. - If the atom parameter is *diameter* and per-atom density and per-atom mass are defined for particles (e.g. :doc:`atom_style granular `), then the mass of each particle is also -changed when the diameter changes (density is assumed to stay -constant). +changed when the diameter changes. The mass is set from the particle volume +for 3d systems (density is assumed to stay constant). For 2d, the default is +for LAMMPS to model particles with a radius attribute as spheres. +However, if the atom parameter is *diameter/disc*, then the mass is +set from the particle area (the density is assumed to be in mass/distance^2 units). For example, these commands would shrink the diameter of all granular particles in the "center" group from 1.0 to 0.1 in a linear fashion From 05b273d73176a11bfb3911cb0b00e99ad33b43e2 Mon Sep 17 00:00:00 2001 From: Yaser Afshar Date: Mon, 16 Mar 2020 08:11:58 -0500 Subject: [PATCH 048/577] kim_property command A new KIM command to make it as easy as possible to write material properties computed in LAMMPS to standard KIM property instance format. --- src/KIM/kim_property.cpp | 489 +++++++++++++++++++++++++++++++++++++++ src/KIM/kim_property.h | 85 +++++++ 2 files changed, 574 insertions(+) create mode 100644 src/KIM/kim_property.cpp create mode 100644 src/KIM/kim_property.h diff --git a/src/KIM/kim_property.cpp b/src/KIM/kim_property.cpp new file mode 100644 index 0000000000..888aa4da0c --- /dev/null +++ b/src/KIM/kim_property.cpp @@ -0,0 +1,489 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Yaser Afshar (UMN) +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . + + Linking LAMMPS statically or dynamically with other modules is making a + combined work based on LAMMPS. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + In addition, as a special exception, the copyright holders of LAMMPS give + you permission to combine LAMMPS with free software programs or libraries + that are released under the GNU LGPL and with code included in the standard + release of the "kim-api" under the CDDL (or modified versions of such code, + with unchanged license). You may copy and distribute such a system following + the terms of the GNU GPL for LAMMPS and the licenses of the other code + concerned, provided that you include the source code of that other code + when and as the GNU GPL requires distribution of source code. + + Note that people who make modified versions of LAMMPS are not obligated to + grant this special exception for their modified versions; it is their choice + whether to do so. The GNU General Public License gives permission to release + a modified version without this exception; this exception also makes it + possible to release a modified version which carries forward this exception. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Designed for use with the kim-api-2.1.0 (and newer) package +------------------------------------------------------------------------- */ + +#if LMP_PYTHON +#define PY_SSIZE_T_CLEAN +#include +#endif + +#include "kim_property.h" + +#include "comm.h" +#include "input.h" +#include "variable.h" +#include "utils.h" +#include "error.h" + +#include + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +kimProperty::kimProperty(LAMMPS *lmp) : Pointers(lmp) +{ +#if LMP_PYTHON +#if PY_MAJOR_VERSION != 3 + error->all(FLERR, "Invalid Python version.\n" + "The kim-property Python package requires Python " + "3 >= 3.6 support."); +#endif + // one-time initialization of Python interpreter + if (!Py_IsInitialized()) { + Py_Initialize(); + PyEval_InitThreads(); + } +#else + error->all(FLERR, "Error Python support missing! Compile with PYTHON " + "package installed!"); +#endif // LMP_PYTHON +} + +void kimProperty::command(int narg, char **arg) +{ +#if LMP_PYTHON +#if PY_MAJOR_VERSION == 3 + if (narg < 2) + error->all(FLERR, "Invalid `kim_property` command."); + + if (!(strcmp(arg[0], "create") == 0) && + !(strcmp(arg[0], "destroy") == 0) && + !(strcmp(arg[0], "modify") == 0) && + !(strcmp(arg[0], "remove") == 0) && + !(strcmp(arg[0], "dump") == 0)) { + std::string msg("Error incorrect arguments in kim_property command.\n"); + msg += "`kim_property create/destroy/modify/remove/dump` "; + msg += "is mandatory."; + error->all(FLERR, msg.c_str()); + } + + if (comm->me == 0) { + std::string msg; + msg = "#=== kim-property ===========================================\n"; + input->write_echo(msg.c_str()); + } + + // Get the kim_str ptr to the data associated with a kim_property_str + // variable + char *kim_str = + input->variable->retrieve(const_cast("kim_property_str")); + + char **kim_str_cmd = new char *[3]; + kim_str_cmd[0] = const_cast("kim_property_str"); + + PyGILState_STATE gstate = PyGILState_Ensure(); + + // kim_property module + PyObject *kim_property = NULL; + + // import kim_property + { + PyObject *obj = PyUnicode_FromString("kim_property"); + if (!obj) { + PyGILState_Release(gstate); + error->all(FLERR, "Error creating a `PyObject`!"); + } + + kim_property = PyImport_Import(obj); + if (!kim_property) { + PyGILState_Release(gstate); + error->all(FLERR, "Error unable to import Python `kim_property` module!" + "\nkim-property Python package can be installed " + "with pip:\n`pip install kim-property`\n" + "See the installation instructions at\n" + "https://github.com/openkim/kim-property#installing-kim-property\n") + "for detailed information."); + } + + // Decrementing of the reference count + Py_XDECREF(obj); + } + + // kim_property create 1 cohesive-potential-energy-cubic-crystal + if (strcmp(arg[0], "create") == 0) { + if (narg != 3) { + PyGILState_Release(gstate); + error->all(FLERR, "Error invalid `kim_property create` command."); + } + + int const ID = utils::inumeric(FLERR, arg[1], true, lmp); + + Py_ssize_t const nSize = (kim_str ? 3 : 2); + + // Python function + // This is the equivalent of the Python expression: + // kim_property.kim_property_create. + PyObject *pFunc = + PyObject_GetAttrString(kim_property, "kim_property_create"); + if (!pFunc) { + PyGILState_Release(gstate); + error->all(FLERR, "Error unable to get an attribute named " + "`kim_property_create` from a kim_property object!"); + } + + // Decrementing of the reference count + Py_XDECREF(kim_property); + + // create Python tuple of input arguments + PyObject *pArgs = PyTuple_New(nSize); + if (!pArgs) { + PyGILState_Release(gstate); + error->all(FLERR, "Error could not create Python function arguments."); + } + + // Python object to set the tuple + // Property ID + PyObject *pValue = PyLong_FromLong(ID); + PyTuple_SetItem(pArgs, 0, pValue); + + // Property name + pValue = PyUnicode_FromString(arg[2]); + PyTuple_SetItem(pArgs, 1, pValue); + + if (nSize == 3) { + pValue = PyUnicode_FromString(kim_str); + PyTuple_SetItem(pArgs, 2, pValue); + } + + // call the Python kim_property_create function + // error check with one() since only some procs may fail + pValue = PyObject_CallObject(pFunc, pArgs); + if (!pValue) { + PyErr_Print(); + PyGILState_Release(gstate); + error->one(FLERR, "Error Python `kim_property_create` function " + "evaluation failed!"); + } + + // Python function returned a string value + const char *pystr = PyUnicode_AsUTF8(pValue); + + kim_str_cmd[2] = const_cast(pystr); + + if (kim_str) { + input->variable->set_string(kim_str_cmd[0], kim_str_cmd[2]); + } else { + kim_str_cmd[1] = const_cast("string"); + input->variable->set(3, kim_str_cmd); + } + + Py_XDECREF(pArgs); + Py_XDECREF(pFunc); + Py_XDECREF(pValue); + } + else if (strcmp(arg[0], "destroy") == 0) { + if (narg != 2) { + PyGILState_Release(gstate); + error->all(FLERR, "Error invalid `kim_property destroy` command."); + } + + if (!kim_str) { + PyGILState_Release(gstate); + return; + } + + int const ID = utils::inumeric(FLERR, arg[1], true, lmp); + + // Python function + // This is the equivalent of the Python expression kim_property.kim_property_destroy + PyObject *pFunc = + PyObject_GetAttrString(kim_property, "kim_property_destroy"); + if (!pFunc) { + PyGILState_Release(gstate); + error->all(FLERR, "Error unable to get an attribute named " + "`kim_property_destroy` from a kim_property object!"); + } + + // Decrementing of the reference count + Py_XDECREF(kim_property); + + // create Python tuple of input arguments + PyObject *pArgs = PyTuple_New(2); + if (!pArgs) { + PyGILState_Release(gstate); + error->all(FLERR, "Error could not create Python function arguments."); + } + + // Python object to set the tuple + PyObject *pValue = PyUnicode_FromString(kim_str); + PyTuple_SetItem(pArgs, 0, pValue); + + pValue = PyLong_FromLong(ID); + PyTuple_SetItem(pArgs, 1, pValue); + + // call the Python kim_property_destroy function + // error check with one() since only some procs may fail + pValue = PyObject_CallObject(pFunc, pArgs); + if (!pValue) { + PyErr_Print(); + PyGILState_Release(gstate); + error->one(FLERR, "Error Python `kim_property_destroy` function " + "evaluation failed!"); + } + + // Python function returned a string value + const char *pystr = PyUnicode_AsUTF8(pValue); + + kim_str_cmd[2] = const_cast(pystr); + + input->variable->set_string(kim_str_cmd[0], kim_str_cmd[2]); + + Py_XDECREF(pArgs); + Py_XDECREF(pFunc); + Py_XDECREF(pValue); + } + else if (strcmp(arg[0], "modify") == 0) { + if (narg < 6) { + PyGILState_Release(gstate); + error->all(FLERR, "Error invalid `kim_property modify` command."); + } + + if (!kim_str) { + PyGILState_Release(gstate); + error->all(FLERR, "Error There is no property instance to modify " + "the content."); + } + + int const ID = utils::inumeric(FLERR, arg[1], true, lmp); + + // Python function + // This is the equivalent of the Python expression + // kim_property.kim_property_modify + PyObject *pFunc = + PyObject_GetAttrString(kim_property, "kim_property_modify"); + if (!pFunc) { + PyGILState_Release(gstate); + error->all(FLERR, "Error unable to get an attribute named " + "`kim_property_modify` from a kim_property object!"); + } + + // Decrementing of the reference count + Py_XDECREF(kim_property); + + // create Python tuple of input arguments + PyObject *pArgs = PyTuple_New(static_cast(narg)); + if (!pArgs) { + PyGILState_Release(gstate); + error->all(FLERR, "Error could not create Python function arguments."); + } + + // Python object to set the tuple + PyObject *pValue = PyUnicode_FromString(kim_str); + PyTuple_SetItem(pArgs, 0, pValue); + + pValue = PyLong_FromLong(ID); + PyTuple_SetItem(pArgs, 1, pValue); + + for (Py_ssize_t i = 2; i < static_cast(narg); ++i) { + pValue = PyUnicode_FromString(arg[i]); + PyTuple_SetItem(pArgs, i, pValue); + } + + // call the Python kim_property_modify function + // error check with one() since only some procs may fail + pValue = PyObject_CallObject(pFunc, pArgs); + if (!pValue) { + PyErr_Print(); + PyGILState_Release(gstate); + error->one(FLERR, "Error Python `kim_property_modify` function " + "evaluation failed!"); + } + + // Python function returned a string value + const char *pystr = PyUnicode_AsUTF8(pValue); + + kim_str_cmd[2] = const_cast(pystr); + + input->variable->set_string(kim_str_cmd[0], kim_str_cmd[2]); + + Py_XDECREF(pArgs); + Py_XDECREF(pFunc); + Py_XDECREF(pValue); + } + else if (strcmp(arg[0], "remove") == 0) { + if (narg < 4) { + PyGILState_Release(gstate); + error->all(FLERR, "Error invalid `kim_property remove` command."); + } + + if (!kim_str) { + PyGILState_Release(gstate); + error->all(FLERR, "Error There is no property instance to remove " + "the content."); + } + + int const ID = utils::inumeric(FLERR, arg[1], true, lmp); + + // Python function + // This is the equivalent of the Python expression + // kim_property.kim_property_remove + PyObject *pFunc = + PyObject_GetAttrString(kim_property, "kim_property_remove"); + if (!pFunc) { + PyGILState_Release(gstate); + error->all(FLERR, "Error unable to get an attribute named " + "`kim_property_remove` from a kim_property object!"); + } + + // Decrementing of the reference count + Py_XDECREF(kim_property); + + // create Python tuple of input arguments + PyObject *pArgs = PyTuple_New(static_cast(narg)); + if (!pArgs) { + PyGILState_Release(gstate); + error->all(FLERR, "Error could not create Python function arguments."); + } + + // Python object to set the tuple + PyObject *pValue = PyUnicode_FromString(kim_str); + PyTuple_SetItem(pArgs, 0, pValue); + + pValue = PyLong_FromLong(ID); + PyTuple_SetItem(pArgs, 1, pValue); + + for (Py_ssize_t i = 2; i < static_cast(narg); ++i) { + pValue = PyUnicode_FromString(arg[i]); + PyTuple_SetItem(pArgs, i, pValue); + } + + // call the Python kim_property_remove function + // error check with one() since only some procs may fail + pValue = PyObject_CallObject(pFunc, pArgs); + if (!pValue) { + PyErr_Print(); + PyGILState_Release(gstate); + error->one(FLERR, "Error Python `kim_property_remove` function " + "evaluation failed!"); + } + + // Python function returned a string value + const char *pystr = PyUnicode_AsUTF8(pValue); + + kim_str_cmd[2] = const_cast(pystr); + + input->variable->set_string(kim_str_cmd[0], kim_str_cmd[2]); + + Py_XDECREF(pArgs); + Py_XDECREF(pFunc); + Py_XDECREF(pValue); + } + else if (strcmp(arg[0], "dump") == 0) { + if (narg != 2) { + PyGILState_Release(gstate); + error->all(FLERR, "Error invalid `kim_property dump` command."); + } + + if (!kim_str) { + PyGILState_Release(gstate); + error->all(FLERR, "Error There is no property instance to dump " + "the content."); + } + + // Python function + // This is the equivalent of the Python expression + // kim_property.kim_property_dump + PyObject *pFunc = + PyObject_GetAttrString(kim_property, "kim_property_dump"); + if (!pFunc) { + PyGILState_Release(gstate); + error->all(FLERR, "Error unable to get an attribute named " + "`kim_property_dump` from a kim_property object!"); + } + + // Decrementing of the reference count + Py_XDECREF(kim_property); + + // create Python tuple of input arguments + PyObject *pArgs = PyTuple_New(2); + if (!pArgs) { + PyGILState_Release(gstate); + error->all(FLERR, "Could not create Python function arguments."); + } + + // Python object to set the tuple + PyObject *pValue = PyUnicode_FromString(kim_str); + PyTuple_SetItem(pArgs, 0, pValue); + + pValue = PyUnicode_FromString(arg[1]); + PyTuple_SetItem(pArgs, 1, pValue); + + if (comm->me == 0) { + // call the Python kim_property_dump function + // error check with one() since only some procs may fail + pValue = PyObject_CallObject(pFunc, pArgs); + if (!pValue) { + PyErr_Print(); + PyGILState_Release(gstate); + error->one(FLERR, "Error Python `kim_property_dump` function " + "evaluation failed!"); + } + } + + // Destroy the variable + kim_str_cmd[1] = const_cast("delete"); + input->variable->set(2, kim_str_cmd); + + Py_XDECREF(pArgs); + Py_XDECREF(pFunc); + Py_XDECREF(pValue); + } + + PyGILState_Release(gstate); + + delete[] kim_str_cmd; +#endif // PY_MAJOR_VERSION +#endif // LMP_PYTHON +} diff --git a/src/KIM/kim_property.h b/src/KIM/kim_property.h new file mode 100644 index 0000000000..ff5faa6781 --- /dev/null +++ b/src/KIM/kim_property.h @@ -0,0 +1,85 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Yaser Afshar (UMN) +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . + + Linking LAMMPS statically or dynamically with other modules is making a + combined work based on LAMMPS. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + In addition, as a special exception, the copyright holders of LAMMPS give + you permission to combine LAMMPS with free software programs or libraries + that are released under the GNU LGPL and with code included in the standard + release of the "kim-api" under the CDDL (or modified versions of such code, + with unchanged license). You may copy and distribute such a system following + the terms of the GNU GPL for LAMMPS and the licenses of the other code + concerned, provided that you include the source code of that other code + when and as the GNU GPL requires distribution of source code. + + Note that people who make modified versions of LAMMPS are not obligated to + grant this special exception for their modified versions; it is their choice + whether to do so. The GNU General Public License gives permission to release + a modified version without this exception; this exception also makes it + possible to release a modified version which carries forward this exception. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Designed for use with the kim-api-2.1.0 (and newer) package +------------------------------------------------------------------------- */ + +#ifdef COMMAND_CLASS + +CommandStyle(kim_property, kimProperty) + +#else + +#ifndef LMP_KIM_PROPERTY_H +#define LMP_KIM_PROPERTY_H + +#include "pointers.h" + +namespace LAMMPS_NS +{ + +class kimProperty : protected Pointers +{ +public: + kimProperty(class LAMMPS *lmp); + + void command(int, char **); +}; + +} // namespace LAMMPS_NS + +#endif // LMP_KIM_PROPERTY_H +#endif // COMMAND_CLASS + +/* ERROR/WARNING messages: + +*/ From dc373dbdeb23b2dd1fd23cd3900dd034915da008 Mon Sep 17 00:00:00 2001 From: Yaser Afshar Date: Mon, 16 Mar 2020 08:15:59 -0500 Subject: [PATCH 049/577] updating the kim_commands doc --- doc/src/kim_commands.rst | 550 +++++++++++++++++++++++++++++++++++---- 1 file changed, 503 insertions(+), 47 deletions(-) diff --git a/doc/src/kim_commands.rst b/doc/src/kim_commands.rst index c710ddfe5d..aca2529ec7 100644 --- a/doc/src/kim_commands.rst +++ b/doc/src/kim_commands.rst @@ -1,16 +1,19 @@ -.. index:: kim_init, kim_interactions, kim_query, kim_param +.. index:: kim_init, kim_interactions, kim_query, kim_param, kim_property -kim_init command -================= +:ref:`kim_init` command +========================================= -kim_interactions command -========================= +:ref:`kim_interactions` command +========================================================= -kim_query command -================== +:ref:`kim_query` command +=========================================== -kim_param command -================== +:ref:`kim_param` command +=========================================== + +:ref:`kim_property` command +================================================= Syntax """""" @@ -22,6 +25,11 @@ Syntax kim_query variable formatarg query_function queryargs kim_param get param_name index_range variables formatarg kim_param set param_name index_range values + kim_property create instance_id property_id + kim_property modify instance_id key key_name key_name_key key_name_value + kim_property remove instance_id key key_name + kim_property destroy instance_id + kim_property dump file .. _formatarg_options: @@ -41,13 +49,19 @@ Syntax on the prefix specified in *variable* and a number appended to indicate which element in the list of values is in the variable. *explicit* = returns the values separately in one more more variable names - provided as arguments that precede *formatarg*\ . [default for *kim_param*] + provided as arguments that preceed *formatarg*\ . [default for *kim_param*] * query_function = name of the OpenKIM web API query function to be used * queryargs = a series of *keyword=value* pairs that represent the web query; supported keywords depend on the query function * param_name = name of a KIM portable model parameter * index_range = KIM portable model parameter index range (an integer for a single element, or pair of integers separated by a colon for a range of elements) * values = new value(s) to replace the current value(s) of a KIM portable model parameter +* instance_id = a positive integer identifying the KIM property instance +* property_id = identifier of a `KIM Property Definition `_, which can be (1) a property short name, (2) the full unique ID of the property (including the contributor and date), (3) a file name corresponding to a local property definition file +* key_name = one of the keys belonging to the specified KIM property definition +* key_name_key = a key belonging to a key-value pair (standardized in the `KIM Properties Framework `__) +* key_name_value = value to be associated with a key_name_key in a key-value pair +* file = name of a file to write the currently defined set of KIM property instances to Examples """""""" @@ -64,6 +78,15 @@ Examples kim_query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Al"] units=["angstrom"] kim_param get gamma 1 varGamma kim_param set gamma 1 3.0 + kim_property create 1 atomic-mass + kim_property modify 1 key mass source-value 26.98154 + kim_property modify 1 key species source-value Al + kim_property remove 1 key species + kim_property destroy 1 + kim_property dump results.edn + + +.. _kim_description: Description """"""""""" @@ -157,11 +180,10 @@ See the `current list of KIM PMs and SMs archived in OpenKIM `_ to -learn how to install a pre-build binary of the OpenKIM Repository of Models. +See `Obtaining KIM Models `_ to +learn how to install a pre-built binary of the OpenKIM Repository of Models. .. note:: - It is also possible to locally install IMs not archived in OpenKIM, in which case their names do not have to conform to the KIM ID format. @@ -169,15 +191,17 @@ Using OpenKIM IMs with LAMMPS ----------------------------- Two commands are employed when using OpenKIM IMs, one to select the -IM and perform necessary initialization (*kim_init*), and the second +IM and perform necessary initialization (\ *kim_init*\ ), and the second to set up the IM for use by executing any necessary LAMMPS commands -(*kim_interactions*). Both are required. +(\ *kim_interactions*\ ). Both are required. See the *examples/kim* directory for example input scripts that use KIM PMs and KIM SMs. +.. _kim_init command: + OpenKIM IM Initialization (*kim_init*) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The *kim_init* mode command must be issued **before** the simulation box is created (normally at the top of the file). @@ -219,7 +243,7 @@ either match the required units of the IM or the IM must be able to adjust its units to match. (The latter is only possible with some KIM PMs; SMs can never adjust their units.) If a match is possible, the LAMMPS :doc:`units ` command is called to set the units to -*user_units*. If the match fails, the simulation is terminated with +*user_units*\ . If the match fails, the simulation is terminated with an error. Here is an example of a LAMMPS script to compute the cohesive energy @@ -324,8 +348,10 @@ be done to convert the box and all atomic positions to the correct units: all appropriate places in the input script. It is up to the user to do this correctly. +.. _kim_interactions command: + OpenKIM IM Execution (*kim_interactions*) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The second and final step in using an OpenKIM IM is to execute the *kim_interactions* command. This command must be preceded by a *kim_init* @@ -399,12 +425,17 @@ the *kim_interactions* command executes the following LAMMPS input commands: pair_coeff * * ffield.reax.rdx C H N O fix reaxqeq all qeq/reax 1 0.0 10.0 1.0e-6 param.qeq -Note that the files *lmp_control*, *ffield.reax.rdx* and *param.qeq* -are specific to the Strachan et al. (2003) ReaxFF parameterization -and are archived as part of the SM package in OpenKIM. -Note also that parameters like cutoff radii and charge tolerances, -which have an effect on IM predictions, are also included in the -SM definition ensuring reproducibility. +.. note:: + + The files *lmp_control*, *ffield.reax.rdx* and *param.qeq* + are specific to the Strachan et al. (2003) ReaxFF parameterization + and are archived as part of the SM package in OpenKIM. + +.. note:: + + Parameters like cutoff radii and charge tolerances, + which have an effect on IM predictions, are also included in the + SM definition ensuring reproducibility. .. note:: @@ -414,8 +445,10 @@ SM definition ensuring reproducibility. bond_coeff, fixes related to charge equilibration, etc.) should normally not appear in the input script. +.. _kim_query command: + Using OpenKIM Web Queries in LAMMPS (*kim_query*) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The *kim_query* command performs a web query to retrieve the predictions of an IM set by *kim_init* for material properties archived in @@ -427,6 +460,7 @@ of an IM set by *kim_init* for material properties archived in The syntax for the *kim_query* command is as follows: + .. code-block:: LAMMPS kim_query variable formatarg query_function queryargs @@ -442,7 +476,7 @@ individual variables of the form *prefix_I*, where *prefix* is set to the *kim_query* *variable* argument and *I* ranges from 1 to the number of returned values. The number and order of the returned values is determined by the type of query performed. (Note that the "explicit" setting of -*formatarg* is not supported by *kim_query*.) +*formatarg* is not supported by *kim_query*\ .) .. note:: @@ -452,7 +486,7 @@ by the type of query performed. (Note that the "explicit" setting of cases will generate an error. The second required argument *query_function* is the name of the -query function to be called (e.g. *get_lattice_constant_cubic*). +query function to be called (e.g. *get_lattice_constant_cubic*\ ). All following :doc:`arguments ` are parameters handed over to the web query in the format *keyword=value*\ , where *value* is always an array of one or more comma-separated items in brackets. @@ -466,7 +500,7 @@ is available on the OpenKIM webpage at All query functions require the *model* keyword, which identifies the IM whose predictions are being queried. This keyword is automatically generated by *kim_query* based on the IM set in *kim_init* and must not - be specified as an argument to *kim_query*. + be specified as an argument to *kim_query*\ . .. note:: @@ -475,11 +509,11 @@ is available on the OpenKIM webpage at used to compute this property. In cases where there are multiple methods in OpenKIM for computing a property, a *method* keyword can be provided to select the method of choice. See the - `query documentation `_ - to see which methods are available for a given *query function*\ . + `query documentation `_ + to see which methods are available for a given *query_function*\ . *kim_query* Usage Examples and Further Clarifications -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The data obtained by *kim_query* commands can be used as part of the setup or analysis phases of LAMMPS simulations. Some examples are given below. @@ -502,10 +536,12 @@ crystal. By using *kim_query*, the user is saved the trouble and possible error of tracking this value down, or of having to perform an energy minimization to find the equilibrium lattice constant. -Note that in *unit_conversion_mode* the results obtained from a -*kim_query* would need to be converted to the appropriate units system. -For example, in the above script, the lattice command would need to be -changed to: "lattice fcc ${a0}\*${_u_distance}". +.. note:: + + In *unit_conversion_mode* the results obtained from a + *kim_query* would need to be converted to the appropriate units system. + For example, in the above script, the lattice command would need to be + changed to: "lattice fcc ${a0}*${_u_distance}". **Define an equilibrium hcp crystal** @@ -524,7 +560,7 @@ changed to: "lattice fcc ${a0}\*${_u_distance}". In this case the *kim_query* returns two arguments (since the hexagonal close packed (hcp) structure has two independent lattice constants). The *formatarg* keyword "split" places the two values into -the variables *latconst_1* and *latconst_2*. (These variables are +the variables *latconst_1* and *latconst_2*\ . (These variables are created if they do not already exist.) For convenience the variables *a0* and *c0* are created in order to make the remainder of the input script more readable. @@ -555,9 +591,9 @@ potential. If no tolerance is passed a default value is used. If multiple results are returned (indicating that the tolerance is too large), *kim_query* will return an error. See the - `query documentation `_ + `query documentation `_ to see which numerical arguments and tolerances are available for a - given *query function*\ . + given *query_function*\ . **Compute defect formation energy** @@ -586,8 +622,10 @@ ideal fcc cohesive energy of the atoms in the system obtained from from these programs are queried is tracked. No other information about the nature of the query or its source is recorded. +.. _kim_param command: + Accessing KIM Model Parameters from LAMMPS (*kim_param*) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ All IMs are functional forms containing a set of parameters. The values of these parameters are typically @@ -620,7 +658,7 @@ for details). .. note:: - The *kim_param get/set* commands must be preceded by *kim_init*. + The *kim_param get/set* commands must be preceded by *kim_init*\ . The *kim_param set* command must additionally be preceded by a *kim_interactions* command (or alternatively by a *pair_style kim* and *pair_coeff* commands). The *kim_param set* command may be used wherever a *pair_coeff* command may occur. @@ -674,13 +712,13 @@ Multiple parameters can be retrieved with a single call to *kim_param get* by repeating the argument list following *get*\ . For a *set* operation, the *values* argument contains the new value(s) -for the element(s) of the parameter specified by *index_range*. For the case +for the element(s) of the parameter specified by *index_range*\ . For the case where multiple values are being set, *values* contains a set of values separated by spaces. Multiple parameters can be set with a single call to *kim_param set* by repeating the argument list following *set*\ . *kim_param* Usage Examples and Further Clarifications -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Examples of getting and setting KIM PM parameters with further clarifications are provided below. @@ -722,7 +760,7 @@ determined by the *formatarg* argument. In this case, *formatarg* is not specified and therefore the default "explicit" mode is used. (The behavior would be the same if the word -*explicit* were added after *LAM_TeSe*.) Elements 7, 8 and 9 of parameter +*explicit* were added after *LAM_TeSe*\ .) Elements 7, 8 and 9 of parameter lambda retrieved by the *get* operation are placed in the LAMMPS variables *LAM_TeTe*, *LAM_TeZn* and *LAM_TeSe*, respectively. @@ -765,7 +803,7 @@ contains the current value of lambda. In this case, the "split" mode of *formatarg* is used. The three values retrieved by the *get* operation are stored in -the three LAMMPS variables *LAM_15*, *LAM_16* and *LAM_17*. +the three LAMMPS variables *LAM_15*, *LAM_16* and *LAM_17*\ . The provided name "LAM" is used as prefix and the location in the lambda array is appended to create the variable names. @@ -797,7 +835,7 @@ potential, while *NEW_GAMMA* will contain the value 2.6. **Setting multiple scalar parameters with a single call** -.. parsed-literal:: +.. code-block:: LAMMPS kim_init SW_ZhouWardMartin_2013_CdTeZnSeHgS__MO_503261197030_002 metal ... @@ -824,6 +862,421 @@ In this case, elements 2 through 6 of the parameter *sigma* are set to the values 2.35214, 2.23869, 2.04516, 2.43269 and 1.80415 in order. +.. _kim_property command: + +Writing material properties computed in LAMMPS to standard KIM property instance format (*kim_property*) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +As explained :ref:`above`, +The OpenKIM system includes a collection of Tests (material property calculation codes), +Models (interatomic potentials), Predictions, and Reference Data (DFT or experiments). +Specifically, a KIM Test is a computation that when coupled with a KIM Model generates +the prediction of that model for a specific material property rigorously defined +by a KIM Property Definition (see the +`KIM Properties Framework `__ +for further details). A prediction of a material property for a given model is a specific +numerical realization of a property definition, referred to as a "Property +Instance." The objective of the *kim_property* command is to make it easy to +output material properties in a standardized, machine readable, format that can be easily +ingested by other programs. +Additionally, it aims to make it as easy as possible to convert a LAMMPS script that computes a +material property into a KIM Test that can then be uploaded to `openkim.org `_ + +A developer interested in creating a KIM Test using a LAMMPS script should +first determine whether a property definition that applies to their calculation +already exists in OpenKIM by searching the `properties page +`_. If none exists, it is possible to use a +locally defined property definition contained in a file until it can be +uploaded to the official repository (see below). Once one or more applicable +property definitions have been identified, the *kim_property create*, +*kim_property modify*, *kim_property remove*, and *kim_property destroy*, +commands provide an interface to create, set, modify, remove, and destroy +instances of them within a LAMMPS script. Their general syntax is as follows: + +.. code-block:: LAMMPS + + kim_property create instance_id property_id + kim_property modify instance_id key key_name key_name_key key_name_value + kim_property remove instance_id key key_name + kim_property destroy instance_id + kim_property dump file + +Here, *instance_id* is a positive integer used to uniquely identify each +property instance; (note that the results file can contain multiple property +instances). A property_id is an identifier of a +`KIM Property Definition `_, +which can be (1) a property short name, (2) the full unique ID of the property +(including the contributor and date), (3) a file name corresponding to a local +property definition file. Examples of each of these cases are shown below: + +.. code-block:: LAMMPS + + kim_property create 1 atomic-mass + kim_property create 2 cohesive-energy-relation-cubic-crystal + +.. code-block:: LAMMPS + + kim_property create 1 tag:brunnels@noreply.openkim.org,2016-05-11:property/atomic-mass + kim_property create 2 tag:staff@noreply.openkim.org,2014-04-15:property/cohesive-energy-relation-cubic-crystal + +.. code-block:: LAMMPS + + kim_property create 1 new-property.edn + kim_property create 2 /home/mary/marys-kim-properties/dissociation-energy.edn + +In the last example, "new-property.edn" and "/home/mary/marys-kim-properties/dissociation-energy.edn" are the +names of files that contain user-defined (local) property definitions. + +A KIM property instance takes the form of a "map," i.e. a set of key-value +pairs akin to Perl's hash, Python's dictionary, or Java's Hashtable. It +consists of a set of property key names, each of which is referred to here by +the *key_name* argument, that are defined as part of the relevant KIM Property +Definition and include only lowercase alphanumeric characters and dashes. The +value paired with each property key is itself a map whose possible keys are +defined as part of the `KIM Properties Framework +`__; these keys are +referred to by the *key_name_key* argument and their associated values by the +*key_name_value* argument. These values may either be scalars or arrays, +as stipulated in the property definition. + +.. note:: + + Each map assigned to a *key_name* must contain the *key_name_key* + "source-value" and an associated *key_name_value* of the appropriate + type (as defined in the relevant KIM Property Definition). For keys that are + defined as having physical units, the + "source-unit" *key_name_key* must also be given a string value recognized + by `GNU units `_. + +Once a *kim_property create* command has been given to instantiate a property +instance, maps associated with the property's keys can be edited using the +*kim_property modify* command. In using this command, the special keyword +"key" should be given, followed by the property key name and the key-value pair +in the map associated with the key that is to be set. For example, the +`atomic-mass `_ +property definition consists of two property keys named "mass" and "species." +An instance of this property could be created like so: + +.. code-block:: LAMMPS + + kim_property create 1 atomic-mass + kim_property modify 1 key species source-value Al + kim_property modify 1 key mass source-value 26.98154 + kim_property modify 1 key mass source-unit amu + +or, equivalently, + +.. code-block:: LAMMPS + + kim_property create 1 atomic-mass + kim_property modify 1 key species source-value Al & + key mass source-value 26.98154 & + source-unit amu + +*kim_property* Usage Examples and Further Clarifications +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Create** + +.. code-block:: LAMMPS + + kim_property create instance_id property_id + +The *kim_property create* command takes as input a property instance ID and the +property definition name, and creates an initial empty property instance data +structure. For example, + +.. code-block:: LAMMPS + + kim_property create 1 atomic-mass + kim_property create 2 cohesive-energy-relation-cubic-crystal + +creates an empty property instance of the "atomic-mass" property definition +with instance ID 1 and an empty instance of the +"cohesive-energy-relation-cubic-crystal" property with ID 2. A list of +published property definitions in OpenKIM can be found on the `properties page +`_. + +One can also provide the name of a file in the current working directory or the +path of a file containing a valid property definition. For example, + +.. code-block:: LAMMPS + + kim_property create 1 new-property.edn + +where "new-property.edn" refers to a file name containing a new property +definition that does not exist in OpenKIM. + +If the *property_id* given cannot be found in OpenKIM and no file of this name +containing a valid property definition can be found, this command will produce +an error with an appropriate message. Calling *kim_property create* with the +same instance ID multiple times will also produce an error. + +**Modify** + +.. code-block:: LAMMPS + + kim_property modify instance_id key key_name key_name_key key_name_value + +The *kim_property modify* command incrementally builds the property instance +by receiving property definition keys along with associated arguments. Each +*key_name* is associated with a map containing one or more key-value pairs (in +the form of *key_name_key*-*key_name_value* pairs). For example, + +.. code-block:: LAMMPS + + kim_property modify 1 key species source-value Al + kim_property modify 1 key mass source-value 26.98154 + kim_property modify 1 key mass source-unit amu + +where the special keyword "key" is followed by a *key_name* ("species" or +"mass" in the above) and one or more key-value pairs. These key-value pairs +may continue until either another "key" keyword is given or the end of the +command line is reached. Thus, the above could equivalently be written as + +.. code-block:: LAMMPS + + kim_property modify 1 key species source-value Al & + key mass source-value 26.98154 & + key mass source-unit amu + +As an example of modifying multiple key-value pairs belonging to the map of a +single property key, the following command modifies the map of the +"cohesive-potential-energy" property key to contain the key "source-unit" which +is assigned a value of "eV" and the key "digits" which is assigned a value of +5: + +.. code-block:: LAMMPS + + kim_property modify 2 key cohesive-potential-energy source-unit eV digits 5 + +.. note:: + + The relevant data types of the values in the map are handled + automatically based on the specification of the key in the + KIM Property Definition. In the example above, + this means that the value "eV" will automatically be interpreted as a string + while the value 5 will be interpreted as an integer. + +The values contained in maps can either be scalars, as in all of the examples +above, or arrays depending on which is stipulated in the corresponding Property +Definition. For one-dimensional arrays, a single one-based index must be +supplied that indicates which element of the array is to be modified. For +multidimensional arrays, multiple indices must be given depending on the +dimensionality of the array. + +.. note:: + + All array indexing used by *kim_property modify* is one-based, i.e. the + indices are enumerated 1, 2, 3, ... + +.. note:: + + The dimensionality of arrays are defined in the the corresponding Property + Definition. The extent of each dimension of an array can either be a + specific finite number or indefinite and determined at run time. If + an array has a fixed extent, attempting to modify an out-of-range index will + fail with an error message. + +For example, the "species" property key of the +`cohesive-energy-relation-cubic-crystal +`_ +property is a one-dimensional array that can contain any number of entries +based on the number of atoms in the unit cell of a given cubic crystal. To +assign an array containing the string "Al" four times to the "source-value" key +of the "species" property key, we can do so by issuing: + +.. code-block:: LAMMPS + + kim_property modify 2 key species source-value 1 Al + kim_property modify 2 key species source-value 2 Al + kim_property modify 2 key species source-value 3 Al + kim_property modify 2 key species source-value 4 Al + +.. note:: + + No declaration of the number of elements in this array was given; + *kim_property modify* will automatically handle memory management to allow + an arbitrary number of elements to be added to the array. + +.. note:: + + In the event that *kim_property modify* is used to set the value of an + array index without having set the values of all lesser indices, they will + be assigned default values based on the data type associated with the key in + the map: + + .. table_from_list:: + :columns: 2 + + * Data type + * Default value + * int + * 0 + * float + * 0.0 + * string + * \"\" + * file + * \"\" + + For example, doing the following: + + .. code-block:: LAMMPS + + kim_property create 2 cohesive-energy-relation-cubic-crystal + kim_property modify 2 key species source-value 4 Al + + will result in the "source-value" key in the map for the property key + "species" being assigned the array ["", "", "", "Al"]. + +For convenience, the index argument provided may refer to an inclusive range of +indices by specifying two integers separated by a colon (the first integer must +be less than or equal to the second integer, and no whitespace should be +included). Thus, the snippet above could equivalently be written: + +.. code-block:: LAMMPS + + kim_property modify 2 key species source-value 1:4 Al Al Al Al + +Calling this command with a non-positive index, e.g. +``kim_property modify 2 key species source-value 0 Al``, or an incorrect +number of input arguments, e.g. +``kim_property modify 2 key species source-value 1:4 Al Al``, will result in an +error. + +As an example of modifying multidimensional arrays, consider the "basis-atoms" +key in the `cohesive-energy-relation-cubic-crystal +`_ +property definition. This is a two-dimensional array containing the fractional +coordinates of atoms in the unit cell of the cubic crystal. In the case of, +e.g. a conventional fcc unit cell, the "source-value" key in the map associated +with this key should be assigned the following value: + +.. code-block:: LAMMPS + + [[0.0, 0.0, 0.0], + [0.5, 0.5, 0.0], + [0.5, 0.0, 0.5], + [0.0, 0.5, 0.5]] + +While each of the twelve components could be set individually, we can instead set +each row at a time using colon notation: + +.. code-block:: LAMMPS + + kim_property modify 2 key basis-atom-coordinates source-value 1 1:3 0.0 0.0 0.0 + kim_property modify 2 key basis-atom-coordinates source-value 2 1:3 0.5 0.5 0.0 + kim_property modify 2 key basis-atom-coordinates source-value 3 1:3 0.5 0.0 0.5 + kim_property modify 2 key basis-atom-coordinates source-value 4 1:3 0.0 0.5 0.5 + +Where the first index given refers to a row and the second index refers to a +column. We could, instead, choose to set each column at a time like so: + +.. code-block:: LAMMPS + + kim_property modify 2 key basis-atom-coordinates source-value 1:4 1 0.0 0.5 0.5 0.0 & + key basis-atom-coordinates source-value 1:4 2 0.0 0.5 0.0 0.5 & + key basis-atom-coordinates source-value 1:4 3 0.0 0.0 0.5 0.5 + +.. note:: + + Multiple calls of *kim_property modify* made for the same instance ID + can be combined into a single invocation, meaning the following are + both valid: + + .. code-block:: LAMMPS + + kim_property modify 2 key basis-atom-coordinates source-value 1 1:3 0.0 0.0 0.0 & + key basis-atom-coordinates source-value 2 1:3 0.5 0.5 0.0 & + key basis-atom-coordinates source-value 3 1:3 0.5 0.0 0.5 & + key basis-atom-coordinates source-value 4 1:3 0.0 0.5 0.5 + + .. code-block:: LAMMPS + + kim_property modify 2 key short-name source-value 1 fcc & + key species source-value 1:4 Al Al Al Al & + key a source-value 1:5 3.9149 4.0000 4.032 4.0817 4.1602 & + source-unit angstrom & + digits 5 & + key basis-atom-coordinates source-value 1 1:3 0.0 0.0 0.0 & + key basis-atom-coordinates source-value 2 1:3 0.5 0.5 0.0 & + key basis-atom-coordinates source-value 3 1:3 0.5 0.0 0.5 & + key basis-atom-coordinates source-value 4 1:3 0.0 0.5 0.5 + +.. note:: + + For multidimensional arrays, only one colon-separated range is allowed + in the index listing. Therefore, + + .. code-block:: LAMMPS + + kim_property modify 2 key basis-atom-coordinates 1 1:3 0.0 0.0 0.0 + + is valid but + + .. code-block:: LAMMPS + + kim_property modify 2 key basis-atom-coordinates 1:2 1:3 0.0 0.0 0.0 0.0 0.0 0.0 + + is not. + +.. note:: + + After one sets a value in a map with the *kim_property modify* command, + additional calls will overwrite the previous value. + +**Remove** + +.. code-block:: LAMMPS + + kim_property remove instance_id key key_name + +The *kim_property remove* command can be used to remove a property key from a +property instance. For example, + +.. code-block:: LAMMPS + + kim_property remove 2 key basis-atom-coordinates + +**Destroy** + +.. code-block:: LAMMPS + + kim_property destroy instance_id + +The *kim_property destroy* command deletes a previously created property +instance ID. For example, + +.. code-block:: LAMMPS + + kim_property destroy 2 + +.. note:: + + If this command is called with an instance ID that does not exist, no + error is raised. + +**Dump** + +The *kim_property dump* command can be used to write the content of all +currently defined property instances to a file: + +.. code-block:: LAMMPS + + kim_property dump file + +For example, + +.. code-block:: LAMMPS + + kim_property dump results.edn + +.. note:: + + Issuing the *kim_property dump* command clears all existing property + instances from memory. + Citation of OpenKIM IMs ----------------------- @@ -847,8 +1300,11 @@ LAMMPS is built with that package. A requirement for the KIM package, is the KIM API library that must be downloaded from the `OpenKIM website `_ and installed before LAMMPS is compiled. When installing LAMMPS from binary, the kim-api package -is a dependency that is automatically downloaded and installed. See the KIM -section of the :doc:`Packages details ` for details. +is a dependency that is automatically downloaded and installed. The *kim_query* +command requires the *libcurl* library to be installed. The *kim_property* +command requires *Python* 3.6 or later and the *kim-property* python package to +be installed. See the KIM section of the :doc:`Packages details ` +for details. Furthermore, when using *kim_commands* to run KIM SMs, any packages required by the native potential being used or other commands or fixes that it invokes From f203258ad59c6d6462e11c3907d17d398dd339df Mon Sep 17 00:00:00 2001 From: Yaser Afshar Date: Mon, 16 Mar 2020 08:17:27 -0500 Subject: [PATCH 050/577] updating the Build_extras, KIM package --- doc/src/Build_extras.rst | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 4589015e35..45c876d84a 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -189,13 +189,27 @@ KIM package --------------------- To build with this package, the KIM library with API v2 must be downloaded -and built on your system. It must include the KIM models that you want to -use with LAMMPS. If you want to use the :doc:`kim_query ` +and built on your system. It must include the KIM models that you want to +use with LAMMPS. + +If you would like to use the :doc:`kim_query ` command, you also need to have libcurl installed with the matching development headers and the curl-config tool. -See the `Obtaining KIM Models `_ -web page to +If you would like to use the :doc:`kim_property ` +command, you need to build LAMMPS with the Python 3.6 or later package +installed. See the :doc:`Python ` doc page for more info on building +LAMMPS with the version of Python on your system. +After successfully building LAMMPS with Python, you need to +install the kim-property Python package, which can be easily done using +*pip* as ``pip install kim-property``, or from the *conda-forge* channel as +``conda install kim-property`` if LAMMPS is built in Conda. More detailed +information is available at: +`kim-property installation `_. + +In addition to installing the KIM API, it is also necessary to install the +library of KIM models (interatomic potentials). +See `Obtaining KIM Models `_ to learn how to install a pre-build binary of the OpenKIM Repository of Models. See the list of all KIM models here: https://openkim.org/browse/models From cfc9fe7e39a451109b4f32a47fd1d11dd082e0ae Mon Sep 17 00:00:00 2001 From: Yaser Afshar Date: Mon, 16 Mar 2020 08:18:19 -0500 Subject: [PATCH 051/577] updating the Commands_all, adding kim_property command --- doc/src/Commands_all.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/src/Commands_all.rst b/doc/src/Commands_all.rst index 36ae112527..92c0ba107a 100644 --- a/doc/src/Commands_all.rst +++ b/doc/src/Commands_all.rst @@ -70,6 +70,7 @@ An alphabetic list of all general LAMMPS commands. * :doc:`kim_init ` * :doc:`kim_interactions ` * :doc:`kim_param ` + * :doc:`kim_property ` * :doc:`kim_query ` * :doc:`kspace_modify ` * :doc:`kspace_style ` From 2d3423a49309830e6969f5870248e4bc01f3e0e9 Mon Sep 17 00:00:00 2001 From: Yaser Afshar Date: Mon, 16 Mar 2020 08:19:13 -0500 Subject: [PATCH 052/577] updating the Packages_details, KIM package --- doc/src/Packages_details.rst | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index e20c2886ed..8251c5301e 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -365,12 +365,17 @@ KIM package This package contains a set of commands that serve as a wrapper on the `Open Knowledgebase of Interatomic Models (OpenKIM) `_ -repository of interatomic models (IMs) -enabling compatible ones to be used in LAMMPS simulations. -This includes :doc:`kim_init and kim_interactions ` -commands to select, initialize and instantiate the IM, and a -:doc:`kim_query ` command to perform web queries -for material property predictions of OpenKIM IMs. +repository of interatomic models (IMs) enabling compatible ones to be used in +LAMMPS simulations. + +This includes :doc:`kim_init `, and +:doc:`kim_interactions ` commands to select, initialize and +instantiate the IM, a :doc:`kim_query ` command to perform web +queries for material property predictions of OpenKIM IMs, a +:doc:`kim_param ` command to access KIM Model Parameters from +LAMMPS, and a :doc:`kim_property ` command to write material +properties computed in LAMMPS to standard KIM property instance format. + Support for KIM IMs that conform to the `KIM Application Programming Interface (API) `_ is provided by the :doc:`pair_style kim ` command. @@ -392,13 +397,16 @@ The KIM project is led by Ellad Tadmor and Ryan Elliott (U Minnesota) and is funded by the `National Science Foundation `_. **Authors:** Ryan Elliott (U Minnesota) is the main developer for the KIM -API and the *pair_style kim* command. Axel Kohlmeyer (Temple U) and -Ellad Tadmor (U Minnesota) contributed to the :doc:`kim_commands ` -interface in close collaboration with Ryan Elliott. +API and the *pair_style kim* command. Yaser Afshar (U Minnesota), +Axel Kohlmeyer (Temple U), Ellad Tadmor (U Minnesota), and +Daniel Karls (U Minnesota) contributed to the +:doc:`kim_commands ` interface in close collaboration with +Ryan Elliott. **Install:** -This package has :ref:`specific installation instructions ` on the :doc:`Build extras ` doc page. +This package has :ref:`specific installation instructions ` on the +:doc:`Build extras ` doc page. **Supporting info:** From 3da1e127bf82049d220ae2f6cfe21f9837b3977e Mon Sep 17 00:00:00 2001 From: Yaser Afshar Date: Mon, 16 Mar 2020 08:42:11 -0500 Subject: [PATCH 053/577] updating the false_positives with names causing warning --- doc/utils/sphinx-config/false_positives.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 264c3fab50..4110682e6c 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -714,6 +714,7 @@ edgeIDs edihed edim edip +edn edpd eDPD edu @@ -1087,6 +1088,7 @@ Harting Hartree Hartrees Hasan +Hashtable Haswell Haugk Hayoun @@ -1344,6 +1346,7 @@ Kai Kalia Kamberaj Kapfer +Karls Karlsruhe Karniadakis Karplus @@ -1630,6 +1633,8 @@ Marroquin Marsaglia Marseille Martyna +mary +marys Masaglia Mashayak Massimilliano @@ -3135,6 +3140,7 @@ Westview wget Whelan whitesmoke +whitespace Wi Wicaksono Wijk @@ -3201,6 +3207,7 @@ xzhou yaff YAFF Yamada +Yaser Yazdani Ybar ybox From f1e03aefc6503423993ddcd329df6944ccbb7c64 Mon Sep 17 00:00:00 2001 From: Yaser Afshar Date: Tue, 17 Mar 2020 16:07:22 -0500 Subject: [PATCH 054/577] updating the pair potential docs, adding reference to OpenKIM --- doc/src/pair_adp.rst | 6 ++++-- doc/src/pair_eam.rst | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/src/pair_adp.rst b/doc/src/pair_adp.rst index 6c4796fb85..bbfd98f677 100644 --- a/doc/src/pair_adp.rst +++ b/doc/src/pair_adp.rst @@ -56,8 +56,10 @@ command to specify them. * The NIST WWW site at http://www.ctcms.nist.gov/potentials. Note that ADP potentials obtained from NIST must be converted into the extended DYNAMO *setfl* format discussed below. -* The OpenKIM Project at https://openkim.org/browse/models/by-type provides - ADP potentials that can be used directly in LAMMPS with the :doc:`kim_commands interface `. +* The OpenKIM Project at + `https://openkim.org/browse/models/by-type `_ + provides ADP potentials that can be used directly in LAMMPS with the + :doc:`kim_commands ` interface. ---------- diff --git a/doc/src/pair_eam.rst b/doc/src/pair_eam.rst index 4710f8a9a1..7384a4d54c 100644 --- a/doc/src/pair_eam.rst +++ b/doc/src/pair_eam.rst @@ -149,6 +149,7 @@ potentials stored in DYNAMO or other formats: http://www.ctcms.nist.gov/potentials http://cst-www.nrl.navy.mil/ccm6/ap http://enpub.fulton.asu.edu/cms/potentials/main/main.htm + https://openkim.org These potentials should be usable with LAMMPS, though the alternate formats would need to be converted to the DYNAMO format used by LAMMPS @@ -156,6 +157,11 @@ and described on this page. The NIST site is maintained by Chandler Becker (cbecker at nist.gov) who is good resource for info on interatomic potentials and file formats. +The OpenKIM Project at +`https://openkim.org/browse/models/by-type `_ +provides EAM potentials that can be used directly in LAMMPS with the +:doc:`kim_commands ` interface. + ---------- For style *eam*\ , potential values are read from a file that is in the From d8a948d9b75bc21cb174e85a91070438a20416db Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 17 Mar 2020 21:13:03 -0400 Subject: [PATCH 055/577] correct spelling --- doc/src/kim_commands.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/kim_commands.rst b/doc/src/kim_commands.rst index aca2529ec7..99f7efffd5 100644 --- a/doc/src/kim_commands.rst +++ b/doc/src/kim_commands.rst @@ -49,7 +49,7 @@ Syntax on the prefix specified in *variable* and a number appended to indicate which element in the list of values is in the variable. *explicit* = returns the values separately in one more more variable names - provided as arguments that preceed *formatarg*\ . [default for *kim_param*] + provided as arguments that precede *formatarg*\ . [default for *kim_param*] * query_function = name of the OpenKIM web API query function to be used * queryargs = a series of *keyword=value* pairs that represent the web query; supported keywords depend on the query function From 8b75fb295039f005a4eeb073817cdaa792c56920 Mon Sep 17 00:00:00 2001 From: Yaser Afshar Date: Wed, 18 Mar 2020 16:56:47 -0500 Subject: [PATCH 056/577] initialize the python interpreter instance with python->init() --- src/KIM/kim_property.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/KIM/kim_property.cpp b/src/KIM/kim_property.cpp index 888aa4da0c..0a55d6aae9 100644 --- a/src/KIM/kim_property.cpp +++ b/src/KIM/kim_property.cpp @@ -65,6 +65,7 @@ #include "variable.h" #include "utils.h" #include "error.h" +#include "lmppython.h" #include @@ -81,10 +82,7 @@ kimProperty::kimProperty(LAMMPS *lmp) : Pointers(lmp) "3 >= 3.6 support."); #endif // one-time initialization of Python interpreter - if (!Py_IsInitialized()) { - Py_Initialize(); - PyEval_InitThreads(); - } + python->init(); #else error->all(FLERR, "Error Python support missing! Compile with PYTHON " "package installed!"); @@ -143,7 +141,7 @@ void kimProperty::command(int narg, char **arg) "\nkim-property Python package can be installed " "with pip:\n`pip install kim-property`\n" "See the installation instructions at\n" - "https://github.com/openkim/kim-property#installing-kim-property\n") + "https://github.com/openkim/kim-property#installing-kim-property\n" "for detailed information."); } From 986e5b746e1c9a2ed8e7fd3c0585ec693ca3961a Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 18 Mar 2020 16:40:29 -0600 Subject: [PATCH 057/577] new doc edits for refactored AtomVec styles --- doc/src/Modify.rst | 6 - doc/src/Modify_atom.rst | 224 +++++++++------- doc/src/atom_style.rst | 64 +++-- doc/src/compute_property_atom.rst | 88 +++--- doc/src/read_data.rst | 428 +++++++++++------------------- 5 files changed, 360 insertions(+), 450 deletions(-) diff --git a/doc/src/Modify.rst b/doc/src/Modify.rst index f875084d50..531fb6b1f3 100644 --- a/doc/src/Modify.rst +++ b/doc/src/Modify.rst @@ -10,7 +10,6 @@ If you add a new feature to LAMMPS and think it will be of interest to general users, we encourage you to submit it for inclusion in LAMMPS as a pull request on our `GitHub site `_, after reading the :doc:`Modify contribute ` doc page. - .. toctree:: :maxdepth: 1 @@ -33,8 +32,3 @@ as a pull request on our `GitHub site `_, afte Modify_body Modify_thermo Modify_variable - - -.. _lws: http://lammps.sandia.gov -.. _ld: Manual.html -.. _lc: Commands_all.html diff --git a/doc/src/Modify_atom.rst b/doc/src/Modify_atom.rst index d44a805161..64f44797b5 100644 --- a/doc/src/Modify_atom.rst +++ b/doc/src/Modify_atom.rst @@ -3,122 +3,168 @@ Atom styles Classes that define an :doc:`atom style ` are derived from the AtomVec class and managed by the Atom class. The atom style -determines what attributes are associated with an atom. A new atom -style can be created if one of the existing atom styles does not -define all the attributes you need to store and communicate with -atoms. +determines what attributes are associated with an atom and +communicated when it is a ghost atom or migrates to a new processor. +A new atom style can be created if one of the existing atom styles +does not define all the attributes you need to store and communicate +with atoms. -Atom\_vec\_atomic.cpp is a simple example of an atom style. +Atom\_vec\_atomic.cpp is the simplest example of an atom style. +Examining the code for others will make these instructions more clear. -Here is a brief description of methods you define in your new derived -class. See atom\_vec.h for details. +Note that the :doc:`atom style hybrid ` command can be +used to define atoms or particles which have the union of properties +of individual styles. Also the :doc:`fix property/atom ` command can be used to add a single property (e.g. charge +or a molecule ID) to a style that does not have it. It can also be +used to add custom properties to an atom, with options to communicate +them with ghost atoms or read them from a data file. Other LAMMPS +commands can access these custom properties, as can new pair, fix, +compute styles that are written to work with these properties. For +example, the :doc:`set ` command can be used to set the values of +custom per-atom properties from an input script. All of these methods +are less work than writing code for a new atom style. + +If you follow these directions your new style will automatically work +in tandem with others via the :doc:`atom_style hybrid ` +command. + +The first step is to define a set of strings in the constructor of the +new derived class. Each string will have zero or more space-separated +variable names which are identical to those used in the atom.h header +file for per-atom properties. Note that some represent per-atom +vectors (q, molecule) while other are per-atom arrays (x,v). For all +but the last 2 strings you do not need to specify any of +(id,type,x,v,f). Those are included automatically as needed in the +other strings. +-------------------------+--------------------------------------------------------------------------------+ -| init | one time setup (optional) | +| fields\_grow | full list of properties which is allocated and stored | +-------------------------+--------------------------------------------------------------------------------+ -| grow | re-allocate atom arrays to longer lengths (required) | +| fields\_copy | list of properties to copy atoms are rearranged on-processor | +-------------------------+--------------------------------------------------------------------------------+ -| grow\_reset | make array pointers in Atom and AtomVec classes consistent (required) | +| fields\_comm | list of properties communicated to ghost atoms every step | +-------------------------+--------------------------------------------------------------------------------+ -| copy | copy info for one atom to another atom's array locations (required) | +| fields\_comm\_vel | additional properties communicated if :doc:`comm_modify vel ` is used | +-------------------------+--------------------------------------------------------------------------------+ -| pack\_comm | store an atom's info in a buffer communicated every timestep (required) | +| fields\_reverse | list of properties summed from ghost atoms every step | +-------------------------+--------------------------------------------------------------------------------+ -| pack\_comm\_vel | add velocity info to communication buffer (required) | +| fields\_border | list of properties communicated with ghost atoms every reneighboring step | +-------------------------+--------------------------------------------------------------------------------+ -| pack\_comm\_hybrid | store extra info unique to this atom style (optional) | +| fields\_border\_vel | additional properties communicated if :doc:`comm_modify vel ` is used | +-------------------------+--------------------------------------------------------------------------------+ -| unpack\_comm | retrieve an atom's info from the buffer (required) | +| fields\_exchange | list of properties communicated when an atom migrates to another processor | +-------------------------+--------------------------------------------------------------------------------+ -| unpack\_comm\_vel | also retrieve velocity info (required) | +| fields\_restart | list of properties written/read to/from a restart file | +-------------------------+--------------------------------------------------------------------------------+ -| unpack\_comm\_hybrid | retrieve extra info unique to this atom style (optional) | +| fields\_create | list of properties defined when an atom is created by :doc:`create_atoms ` | +-------------------------+--------------------------------------------------------------------------------+ -| pack\_reverse | store an atom's info in a buffer communicating partial forces (required) | +| fields\_data\_atom | list of properties (in order) in the Atoms section of a data file, as read by :doc:`read_data ` | +-------------------------+--------------------------------------------------------------------------------+ -| pack\_reverse\_hybrid | store extra info unique to this atom style (optional) | -+-------------------------+--------------------------------------------------------------------------------+ -| unpack\_reverse | retrieve an atom's info from the buffer (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| unpack\_reverse\_hybrid | retrieve extra info unique to this atom style (optional) | -+-------------------------+--------------------------------------------------------------------------------+ -| pack\_border | store an atom's info in a buffer communicated on neighbor re-builds (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| pack\_border\_vel | add velocity info to buffer (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| pack\_border\_hybrid | store extra info unique to this atom style (optional) | -+-------------------------+--------------------------------------------------------------------------------+ -| unpack\_border | retrieve an atom's info from the buffer (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| unpack\_border\_vel | also retrieve velocity info (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| unpack\_border\_hybrid | retrieve extra info unique to this atom style (optional) | -+-------------------------+--------------------------------------------------------------------------------+ -| pack\_exchange | store all an atom's info to migrate to another processor (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| unpack\_exchange | retrieve an atom's info from the buffer (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| size\_restart | number of restart quantities associated with proc's atoms (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| pack\_restart | pack atom quantities into a buffer (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| unpack\_restart | unpack atom quantities from a buffer (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| create\_atom | create an individual atom of this style (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| data\_atom | parse an atom line from the data file (required) | -+-------------------------+--------------------------------------------------------------------------------+ -| data\_atom\_hybrid | parse additional atom info unique to this atom style (optional) | -+-------------------------+--------------------------------------------------------------------------------+ -| data\_vel | parse one line of velocity information from data file (optional) | -+-------------------------+--------------------------------------------------------------------------------+ -| data\_vel\_hybrid | parse additional velocity data unique to this atom style (optional) | -+-------------------------+--------------------------------------------------------------------------------+ -| memory\_usage | tally memory allocated by atom arrays (required) | +| fields\_data\_vel | list of properties (in order) in the Velocities section of a data file, as read by :doc:`read_data ` | +-------------------------+--------------------------------------------------------------------------------+ -The constructor of the derived class sets values for several variables -that you must set when defining a new atom style, which are documented -in atom\_vec.h. New atom arrays are defined in atom.cpp. Search for -the word "customize" and you will find locations you will need to -modify. +In these strings you can list variable names which LAMMPS already +defines (in some other atom style), or you can create new variable +names. You should not re-use a LAMMPS variable for something with +different meaning in your atom style. If the meaning is related, but +interpreted differently by your atom style, then using the same +variable name means a user should not use your style and the other +style together in a :doc:`atom_style hybrid ` command. +Because there will only be one value of the variable and different +parts of LAMMPS will then likely use it differently. LAMMPS has +no way of checking for this. -.. note:: +If you are defining new variable names then make them descriptive and +unique to your new atom style. For example choosing "e" for energy is +a bad choice; it is too generic. A better choice would be "e\_foo", +where "foo" is specific to your style. - It is possible to add some attributes, such as a molecule ID, to - atom styles that do not have them via the :doc:`fix property/atom ` command. This command also - allows new custom attributes consisting of extra integer or - floating-point values to be added to atoms. See the :doc:`fix property/atom ` doc page for examples of cases - where this is useful and details on how to initialize, access, and - output the custom values. +If any of the variable names in your new atom style do not exist in +LAMMPS, you need to add them to the src/atom.h and atom.cpp files. -New :doc:`pair styles `, :doc:`fixes `, or -:doc:`computes ` can be added to LAMMPS, as discussed below. -The code for these classes can use the per-atom properties defined by -fix property/atom. The Atom class has a find\_custom() method that is -useful in this context: +Search for the word "customize" or "customization" in these 2 files to +see where to add your variable. Adding a flag to the 2nd +customization section in atom.h is only necessary if your code (e.g. a +pair style) needs to check that a per-atom property is defined. These +flags should also be set in the constructor of the atom style child +class. +In atom.cpp, aside from the constructor and destructor, there are 3 +methods that a new variable name or flag needs to be added to. -.. parsed-literal:: +In Atom::peratom\_create() when using the add_peratom() method, a +final length argument of 0 is for per-atom vectors, a length > 1 is +for per-atom arrays. Note the use of an extra per-thread flag and the +add_peratom_vary() method when last dimension of the array is +variable-length. - int index = atom->find_custom(char \*name, int &flag); +Adding the variable name to Atom::extract() enable the per-atom data +to be accessed through the :doc:`LAMMPS library interface +` by a calling code, including from :doc:`Python +`. -The "name" of a custom attribute, as specified in the :doc:`fix property/atom ` command, is checked to verify -that it exists and its index is returned. The method also sets flag = -0/1 depending on whether it is an integer or floating-point attribute. -The vector of values associated with the attribute can then be -accessed using the returned index as +The constructor of the new atom style will also typically set a few +flags which are defined at the top of atom_vec.h. If these are +unclear, see how other atom styles use them. +The grow_pointers() method is also required to make +a copy of peratom data pointers, as explained in the code. -.. parsed-literal:: +There are a number of other optional methods which your atom style can +implement. These are only needed if you need to do something +out-of-the-oridinary which the default operation of the AtomVec parent +class does not take care of. The best way to figure out why they are +sometimes useful is to look at how other atom styles use them. - int \*ivector = atom->ivector[index]; - double \*dvector = atom->dvector[index]; +* process_args = use if the atom style has arguments +* init = called before each run +* force_clear = called before force computations each timestep -Ivector or dvector are vectors of length Nlocal = # of owned atoms, -which store the attributes of individual atoms. +A few atom styles define "bonus" data associated with some or all of +their particles, such as :doc:`atom_style ellipsoid or tri +`. These methods work with that data: +* copy_bonus +* clear_bonus +* pack_comm_bonus +* unpack_comm_bonus +* pack_border_bonus +* unpack_border_bonus +* pack_exchange_bonus +* unpack_exchange_bonus +* size_restart_bonus +* pack_restart_bonus +* unpack_restart_bonus +* data_atom_bonus +* memory_usage_bonus -.. _lws: http://lammps.sandia.gov -.. _ld: Manual.html -.. _lc: Commands_all.html +The :doc:`atom_style body ` command can define a particle +geomerty with an arbitrary number of values. This method reads it +from a data file: + +* data_body + +These methods are called before or after operations handled by the +parent AtomVec class. They allow an atom style to do customized +operations on the per-atom values. For example :doc:`atom_style +sphere ` reads a diameter and density of each particle +from a data file. But these need to be converted internally to a +radius and mass. That operation is done in the data_\atom\_post() +method. + +* pack_restart_pre +* pack_restart_post +* unpack_restart_init +* create_atom_post +* data_atom_post +* pack_data_pre +* pack_data_post + +These methods enable the :doc:`compute property/atom ` command to access per-atom variables it does not +already define as arguments, so that they can be written to a dump +file or used by other LAMMPS commands. + +* property_atom +* pack_property_atom diff --git a/doc/src/atom_style.rst b/doc/src/atom_style.rst index d2ebc220d6..a44741f891 100644 --- a/doc/src/atom_style.rst +++ b/doc/src/atom_style.rst @@ -6,20 +6,21 @@ atom_style command Syntax """""" - .. code-block:: LAMMPS atom_style style args -* style = *angle* or *atomic* or *body* or *bond* or *charge* or *dipole* or *dpd* or *edpd* or *mdpd* or *tdpd* or *electron* or *ellipsoid* or *full* or *line* or *meso* or *molecular* or *peri* or *smd* or *sphere* or *spin* or *tri* or *template* or *hybrid* - +* style = *angle* or *atomic* or *body* or *bond* or *charge* or *dipole* or *dpd* or *edpd* or *electron* or *ellipsoid* or *full* or *line* or *mdpd* or *meso* or *molecular* or *peri* or *smd* or *sphere* or *spin* or *tdpd* or *tri* or *template* or *hybrid* + .. parsed-literal:: - + args = none for any style except the following *body* args = bstyle bstyle-args bstyle = style of body particles bstyle-args = additional arguments specific to the bstyle - see the :doc:`Howto body ` doc page for details + see the :doc:`Howto body ` doc + page for details + *sphere* arg = 0/1 (optional) for static/dynamic particle radii *tdpd* arg = Nspecies Nspecies = # of chemical species *template* arg = template-ID @@ -28,11 +29,9 @@ Syntax * accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk* - Examples """""""" - .. code-block:: LAMMPS atom_style atomic @@ -50,8 +49,8 @@ Description Define what style of atoms to use in a simulation. This determines what attributes are associated with the atoms. This command must be -used before a simulation is setup via a :doc:`read\_data `, -:doc:`read\_restart `, or :doc:`create\_box ` +used before a simulation is setup via a :doc:`read_data `, +:doc:`read_restart `, or :doc:`create_box ` command. .. note:: @@ -68,12 +67,12 @@ style more general than needed, though it may be slightly inefficient. The choice of style affects what quantities are stored by each atom, what quantities are communicated between processors to enable forces to be computed, and what quantities are listed in the data file read -by the :doc:`read\_data ` command. +by the :doc:`read_data ` command. These are the additional attributes of each style and the typical kinds of physical systems they are used to model. All styles store coordinates, velocities, atom IDs and types. See the -:doc:`read\_data `, :doc:`create\_atoms `, and +:doc:`read_data `, :doc:`create_atoms `, and :doc:`set ` commands for info on how to set these various quantities. @@ -94,10 +93,6 @@ quantities. +--------------+-----------------------------------------------------+--------------------------------------+ | *edpd* | temperature and heat capacity | eDPD particles | +--------------+-----------------------------------------------------+--------------------------------------+ -| *mdpd* | density | mDPD particles | -+--------------+-----------------------------------------------------+--------------------------------------+ -| *tdpd* | chemical concentration | tDPD particles | -+--------------+-----------------------------------------------------+--------------------------------------+ | *electron* | charge and spin and eradius | electronic force field | +--------------+-----------------------------------------------------+--------------------------------------+ | *ellipsoid* | shape, quaternion, angular momentum | aspherical particles | @@ -106,6 +101,8 @@ quantities. +--------------+-----------------------------------------------------+--------------------------------------+ | *line* | end points, angular velocity | rigid bodies | +--------------+-----------------------------------------------------+--------------------------------------+ +| *mdpd* | density | mDPD particles | ++--------------+-----------------------------------------------------+--------------------------------------+ | *meso* | rho, e, cv | SPH particles | +--------------+-----------------------------------------------------+--------------------------------------+ | *molecular* | bonds, angles, dihedrals, impropers | uncharged molecules | @@ -118,6 +115,8 @@ quantities. +--------------+-----------------------------------------------------+--------------------------------------+ | *spin* | magnetic moment | system with magnetic particles | +--------------+-----------------------------------------------------+--------------------------------------+ +| *tdpd* | chemical concentration | tDPD particles | ++--------------+-----------------------------------------------------+--------------------------------------+ | *template* | template index, template atom | small molecules with fixed topology | +--------------+-----------------------------------------------------+--------------------------------------+ | *tri* | corner points, angular momentum | rigid bodies | @@ -147,9 +146,16 @@ basis. For the *sphere* style, the particles are spheres and each stores a per-particle diameter and mass. If the diameter > 0.0, the particle is a finite-size sphere. If the diameter = 0.0, it is a point -particle. Note that by use of the *disc* keyword with the :doc:`fix nve/sphere `, :doc:`fix nvt/sphere `, -:doc:`fix nph/sphere `, :doc:`fix npt/sphere ` commands, spheres can be effectively -treated as 2d discs for a 2d simulation if desired. See also the :doc:`set density/disc ` command. +particle. Note that by use of the *disc* keyword with the :doc:`fix +nve/sphere `, :doc:`fix nvt/sphere `, +:doc:`fix nph/sphere `, :doc:`fix npt/sphere +` commands, spheres can be effectively treated as 2d +discs for a 2d simulation if desired. See also the :doc:`set +density/disc ` command. The *sphere* style takes an optional 0 +or 1 argument. A value of 0 means the radius of each sphere is +constant for the duration of the simulation. A value of 1 means the +radii may vary dynamically during the simulation, e.g. due to use of +the :doc:`fix adapt ` command. For the *ellipsoid* style, the particles are ellipsoids and each stores a flag which indicates whether it is a finite-size ellipsoid or @@ -173,7 +179,7 @@ per-particle mass and volume. The *dpd* style is for dissipative particle dynamics (DPD) particles. Note that it is part of the USER-DPD package, and is not for use with -the :doc:`pair\_style dpd or dpd/stat ` commands, which can +the :doc:`pair_style dpd or dpd/stat ` commands, which can simply use atom\_style atomic. Atom\_style dpd extends DPD particle properties with internal temperature (dpdTheta), internal conductive energy (uCond), internal mechanical energy (uMech), and internal @@ -240,7 +246,7 @@ can be advantageous for large-scale coarse-grained systems. another CO2, then you probably do not want each molecule file to define 2 atom types and a single bond type, because they will conflict with each other when a mixture system of H2O and CO2 molecules is - defined, e.g. by the :doc:`read\_data ` command. Rather the + defined, e.g. by the :doc:`read_data ` command. Rather the H2O molecule should define atom types 1 and 2, and bond type 1. And the CO2 molecule should define atom types 3 and 4 (or atom types 3 and 2 if a single oxygen type is desired), and bond type 2. @@ -262,10 +268,8 @@ Note that there may be additional arguments required along with the *bstyle* specification, in the atom\_style body command. These arguments are described on the :doc:`Howto body ` doc page. - ---------- - Typically, simulations require only a single (non-hybrid) atom style. If some atoms in the simulation do not have all the properties defined by a particular style, use the simplest style that defines all the @@ -287,10 +291,8 @@ per-atom basis. LAMMPS can be extended with new atom styles as well as new body styles; see the :doc:`Modify ` doc page. - ---------- - Styles with a *kk* suffix are functionally the same as the corresponding style without the suffix. They have been optimized to run faster, depending on your available hardware, as discussed in on @@ -315,9 +317,8 @@ instructions on how to use the accelerated styles effectively. Restrictions """""""""""" - This command cannot be used after the simulation box is defined by a -:doc:`read\_data ` or :doc:`create\_box ` command. +:doc:`read_data ` or :doc:`create_box ` command. Many of the styles listed above are only enabled if LAMMPS was built with a specific package, as listed below. See the :doc:`Build package ` doc page for more info. @@ -338,7 +339,7 @@ The *electron* style is part of the USER-EFF package for :doc:`electronic force The *dpd* style is part of the USER-DPD package for dissipative particle dynamics (DPD). -The *edpd*\ , *mdpd*\ , and *tdpd* styles are part of the USER-MESO package +The *edpd*\ , *mdpd*\ , and *tdpd* styles are part of the USER-MESODPD package for energy-conserving dissipative particle dynamics (eDPD), many-body dissipative particle dynamics (mDPD), and transport dissipative particle dynamics (tDPD), respectively. @@ -354,20 +355,17 @@ The *wavepacket* style is part of the USER-AWPMD package for the Related commands """""""""""""""" -:doc:`read\_data `, :doc:`pair\_style ` +:doc:`read_data `, :doc:`pair_style ` Default """"""" -atom\_style atomic - +The default atom style is atomic. If atom\_style sphere is used its +default argument is 0. ---------- - .. _Grime: - - **(Grime)** Grime and Voth, to appear in J Chem Theory & Computation (2014). diff --git a/doc/src/compute_property_atom.rst b/doc/src/compute_property_atom.rst index f78798e6f5..0ce0f32e96 100644 --- a/doc/src/compute_property_atom.rst +++ b/doc/src/compute_property_atom.rst @@ -6,7 +6,6 @@ compute property/atom command Syntax """""" - .. parsed-literal:: compute ID group-ID property/atom input1 input2 ... @@ -14,9 +13,9 @@ Syntax * ID, group-ID are documented in :doc:`compute ` command * property/atom = style name of this compute command * input = one or more atom attributes - + .. parsed-literal:: - + possible attributes = id, mol, proc, type, mass, x, y, z, xs, ys, zs, xu, yu, zu, ix, iy, iz, vx, vy, vz, fx, fy, fz, @@ -36,9 +35,8 @@ Syntax rho, drho, e, de, cv, i_name, d_name - .. parsed-literal:: - + id = atom ID mol = molecule ID proc = ID of processor that owns atom @@ -66,46 +64,39 @@ Syntax corner123x, corner123y, corner123z = corner points of triangle nbonds = number of bonds assigned to an atom - .. parsed-literal:: - - PERI package per-atom properties: - vfrac = ??? - s0 = ??? - + PERI package per-atom properties: + vfrac = volume fraction + s0 = max stretch of any bond a particle is part of + .. parsed-literal:: - + USER-EFF and USER-AWPMD package per-atom properties: spin = electron spin eradius = electron radius ervel = electron radial velocity erforce = electron radial force - .. parsed-literal:: - - USER-SPH package per-atom properties: - rho = ??? - drho = ??? - e = ??? - de = ??? - cv = ??? - + USER-SPH package per-atom properties: + rho = density of SPH particles + drho = change in density + e = energy + de = change in thermal energy + cv = heat capacity + .. parsed-literal:: - + :doc:`fix property/atom ` per-atom properties: i_name = custom integer vector with name d_name = custom integer vector with name - - Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS compute 1 all property/atom xs vx fx mux compute 2 all property/atom type @@ -117,13 +108,17 @@ Description Define a computation that simply stores atom attributes for each atom in the group. This is useful so that the values can be used by other -:doc:`output commands ` that take computes as inputs. See -for example, the :doc:`compute reduce `, :doc:`fix ave/atom `, :doc:`fix ave/histo `, :doc:`fix ave/chunk `, and :doc:`atom-style variable ` -commands. +:doc:`output commands ` that take computes as inputs. +See for example, the :doc:`compute reduce `, :doc:`fix +ave/atom `, :doc:`fix ave/histo `, +:doc:`fix ave/chunk `, and :doc:`atom-style variable +` commands. -The list of possible attributes is the same as that used by the :doc:`dump custom ` command, which describes their meaning, with some -additional quantities that are only defined for certain :doc:`atom styles `. Basically, this augmented list gives an -input script access to any per-atom quantity stored by LAMMPS. +The list of possible attributes is the same as that used by the +:doc:`dump custom ` command, which describes their meaning, with +some additional quantities that are only defined for certain +:doc:`atom styles `. Basically, this augmented list gives +an input script access to any per-atom quantity stored by LAMMPS. The values are stored in a per-atom vector or array as discussed below. Zeroes are stored for atoms not in the specified group or for @@ -141,8 +136,9 @@ particles and body particles and store the 4-vector quaternion representing the orientation of each particle. See the :doc:`set ` command for an explanation of the quaternion vector. -*End1x*\ , *end1y*\ , *end1z*\ , *end2x*\ , *end2y*\ , *end2z*\ , are defined for -line segment particles and define the end points of each line segment. +*End1x*\ , *end1y*\ , *end1z*\ , *end2x*\ , *end2y*\ , *end2z*\ , are +defined for line segment particles and define the end points of each +line segment. *Corner1x*\ , *corner1y*\ , *corner1z*\ , *corner2x*\ , *corner2y*\ , *corner2z*\ , *corner3x*\ , *corner3y*\ , *corner3z*\ , are defined for @@ -153,14 +149,14 @@ number of explicit bonds assigned to an atom. Note that if the :doc:`newton bond ` command is set to *on*\ , which is the default, then every bond in the system is assigned to only one of the two atoms in the bond. Thus a bond between atoms I,J may be tallied -for either atom I or atom J. If :doc:`newton bond off ` is set, -it will be tallied with both atom I and atom J. +for either atom I or atom J. If :doc:`newton bond off ` is +set, it will be tallied with both atom I and atom J. The *i\_name* and *d\_name* attributes refer to custom integer and floating-point properties that have been added to each atom via the -:doc:`fix property/atom ` command. When that command -is used specific names are given to each attribute which are what is -specified as the "name" portion of *i\_name* or *d\_name*. +:doc:`fix property/atom ` command. When that +command is used specific names are given to each attribute which are +what is specified as the "name" portion of *i\_name* or *d\_name*. **Output info:** @@ -169,8 +165,8 @@ on the number of input values. If a single input is specified, a per-atom vector is produced. If two or more inputs are specified, a per-atom array is produced where the number of columns = the number of inputs. The vector or array can be accessed by any command that uses -per-atom values from a compute as input. See the :doc:`Howto output ` doc page for an overview of LAMMPS output -options. +per-atom values from a compute as input. See the :doc:`Howto output +` doc page for an overview of LAMMPS output options. The vector or array values will be in whatever :doc:`units ` the corresponding attribute is in, e.g. velocity units for vx, charge @@ -187,12 +183,8 @@ Restrictions Related commands """""""""""""""" -:doc:`dump custom `, :doc:`compute reduce `, :doc:`fix ave/atom `, :doc:`fix ave/chunk `, -:doc:`fix property/atom ` +:doc:`dump custom `, :doc:`compute reduce `, +:doc::doc:`fix ave/atom `, :doc:`fix ave/chunk +:doc:`, `fix property/atom ` **Default:** none - - -.. _lws: http://lammps.sandia.gov -.. _ld: Manual.html -.. _lc: Commands_all.html diff --git a/doc/src/read_data.rst b/doc/src/read_data.rst index 798f95e5ec..410a372a34 100644 --- a/doc/src/read_data.rst +++ b/doc/src/read_data.rst @@ -1,22 +1,21 @@ -.. index:: read\_data +.. index:: read_data -read\_data command -================== +read_data command +================= Syntax """""" - -.. parsed-literal:: +.. code-block:: LAMMPS read_data file keyword args ... * file = name of data file to read in * zero or more keyword/arg pairs may be appended * keyword = *add* or *offset* or *shift* or *extra/atom/types* or *extra/bond/types* or *extra/angle/types* or *extra/dihedral/types* or *extra/improper/types* or *extra/bond/per/atom* or *extra/angle/per/atom* or *extra/dihedral/per/atom* or *extra/improper/per/atom* or *group* or *nocoeff* or *fix* - + .. parsed-literal:: - + *add* arg = *append* or *IDoffset* or *IDoffset MOLoffset* or *merge* append = add new atoms with atom IDs appended to current IDs IDoffset = add new atoms with atom IDs having IDoffset added @@ -48,13 +47,10 @@ Syntax header-string = header lines containing this string will be passed to fix section-string = section names with this string will be passed to fix - - Examples """""""" - -.. parsed-literal:: +.. code-block:: LAMMPS read_data data.lj read_data ../run7/data.polymer.gz @@ -68,8 +64,8 @@ Description Read in a data file containing information LAMMPS needs to run a simulation. The file can be ASCII text or a gzipped text file (detected by a .gz suffix). This is one of 3 ways to specify initial -atom coordinates; see the :doc:`read\_restart ` and -:doc:`create\_atoms ` commands for alternative methods. +atom coordinates; see the :doc:`read_restart ` and +:doc:`create_atoms ` commands for alternative methods. Also see the explanation of the :doc:`-restart command-line switch ` which can convert a restart file to a data file. @@ -83,7 +79,7 @@ specified group-ID. The group will be created if it does not already exist. This is useful if you are reading multiple data files and wish to put sets of atoms into different groups so they can be operated on later. E.g. a group of added atoms can be moved to new positions via -the :doc:`displace\_atoms ` command. Note that atoms +the :doc:`displace_atoms ` command. Note that atoms read from the data file are also always added to the "all" group. The :doc:`group ` command discusses atom groups, as used in LAMMPS. @@ -95,10 +91,8 @@ styles defined, or to read a data file for a different force field. The use of the *fix* keyword is discussed below. - ---------- - **Reading multiple data files** The read\_data command can be used multiple times with the same or @@ -107,7 +101,7 @@ contained in individual data files. For example one data file could contain fluid in a confined domain; a second could contain wall atoms, and the second file could be read a third time to create a wall on the other side of the fluid. The third set of atoms could be rotated to -an opposing direction using the :doc:`displace\_atoms ` +an opposing direction using the :doc:`displace_atoms ` command, after the third read\_data command is used. The *add*\ , *offset*\ , *shift*\ , *extra*\ , and *group* keywords are @@ -116,7 +110,7 @@ useful in this context. If a simulation box does not yet exist, the *add* keyword cannot be used; the read\_data command is being used for the first time. If a simulation box does exist, due to using the -:doc:`create\_box ` command, or a previous read\_data command, +:doc:`create_box ` command, or a previous read\_data command, then the *add* keyword must be used. .. note:: @@ -175,9 +169,9 @@ for a 2d simulation. This is a mechanism for adding structured collections of atoms at different locations within the simulation box, to build up a complex geometry. It is up to you to insure atoms do not end up overlapping unphysically which would lead to bad dynamics. -Note that the :doc:`displace\_atoms ` command can be used +Note that the :doc:`displace_atoms ` command can be used to move a subset of atoms after they have been read from a data file. -Likewise, the :doc:`delete\_atoms ` command can be used to +Likewise, the :doc:`delete_atoms ` command can be used to remove overlapping atoms. Note that the shift values (Sx, Sy, Sz) are also added to the simulation box information (xlo, xhi, ylo, yhi, zlo, zhi) in the data file to shift its boundaries. E.g. xlo\_new = xlo + @@ -212,17 +206,15 @@ interactions in your input script to have a complete pairwise interaction model. An alternative to using the *extra* keywords with the read\_data -command, is to use the :doc:`create\_box ` command to +command, is to use the :doc:`create_box ` command to initialize the simulation box and all the various type limits you need via its *extra* keywords. Then use the read\_data command one or more times to populate the system with atoms, bonds, angles, etc, using the *offset* keyword if desired to alter types used in the various data files you read. - ---------- - **Format of a data file** The structure of the data file is important, though many settings and @@ -266,10 +258,8 @@ be capitalized as shown and can't have extra white-space between their words - e.g. two spaces or a tab between the 2 words in "xlo xhi" or the 2 words in "Bond Coeffs", is not valid. - ---------- - **Format of the header of a data file** These are the recognized header keywords. Header lines can come in @@ -408,7 +398,7 @@ molecules defined in the data file. Using this header flag is deprecated; please use the *extra/special/per/atom* keyword instead. Using this setting will pre-allocate space in the LAMMPS data structures for storing these neighbors. See the -:doc:`special\_bonds ` and :doc:`molecule ` doc +:doc:`special_bonds ` and :doc:`molecule ` doc pages for more discussion of 1-2,1-3,1-4 neighbors. .. note:: @@ -421,7 +411,7 @@ pages for more discussion of 1-2,1-3,1-4 neighbors. If they appear in later data files, they are ignored. The "ellipsoids" and "lines" and "triangles" and "bodies" settings are -only used with :doc:`atom\_style ellipsoid or line or tri or body ` and specify how many of the atoms are +only used with :doc:`atom_style ellipsoid or line or tri or body ` and specify how many of the atoms are finite-size ellipsoids or lines or triangles or bodies; the remainder are point particles. See the discussion of ellipsoidflag and the *Ellipsoids* section below. See the discussion of lineflag and the @@ -431,7 +421,7 @@ are point particles. See the discussion of ellipsoidflag and the .. note:: - For :doc:`atom\_style template `, the molecular + For :doc:`atom_style template `, the molecular topology (bonds,angles,etc) is contained in the molecule templates read-in by the :doc:`molecule ` command. This means you cannot set the *bonds*\ , *angles*\ , etc header keywords in the data @@ -440,10 +430,8 @@ are point particles. See the discussion of ellipsoidflag and the keywords, though it is not necessary. If specified, they must match the maximum values defined in any of the template molecules. - ---------- - **Format of the body of a data file** These are the section keywords for the body of the file. @@ -460,14 +448,13 @@ currently defined style: For example, these lines: - .. parsed-literal:: Atoms # sphere Pair Coeffs # lj/cut -will check if the currently-defined :doc:`atom\_style ` is -*sphere*\ , and the current :doc:`pair\_style ` is *lj/cut*\ . +will check if the currently-defined :doc:`atom_style ` is +*sphere*\ , and the current :doc:`pair_style ` is *lj/cut*\ . If not, LAMMPS will issue a warning to indicate that the data file section likely does not contain the correct number or type of parameters expected for the currently-defined style. @@ -480,120 +467,97 @@ Any individual line in the various sections can have a trailing comment starting with "#" for annotation purposes. E.g. in the Atoms section: - .. parsed-literal:: 10 1 17 -1.0 10.0 5.0 6.0 # salt ion - ---------- - *Angle Coeffs* section: * one line per angle type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = angle type (1-N) coeffs = list of coeffs * example: - + .. parsed-literal:: - + 6 70 108.5 0 0 - - The number and meaning of the coefficients are specific to the defined -angle style. See the :doc:`angle\_style ` and -:doc:`angle\_coeff ` commands for details. Coefficients can -also be set via the :doc:`angle\_coeff ` command in the +angle style. See the :doc:`angle_style ` and +:doc:`angle_coeff ` commands for details. Coefficients can +also be set via the :doc:`angle_coeff ` command in the input script. - ---------- - *AngleAngle Coeffs* section: * one line per improper type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = improper type (1-N) coeffs = list of coeffs (see :doc:`improper_coeff `) - - - ---------- - *AngleAngleTorsion Coeffs* section: * one line per dihedral type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = dihedral type (1-N) coeffs = list of coeffs (see :doc:`dihedral_coeff `) - - - ---------- - *Angles* section: * one line per angle * line syntax: ID type atom1 atom2 atom3 - + .. parsed-literal:: - + ID = number of angle (1-Nangles) type = angle type (1-Nangletype) atom1,atom2,atom3 = IDs of 1st,2nd,3rd atoms in angle example: - + .. parsed-literal:: - + 2 2 17 29 430 - - The 3 atoms are ordered linearly within the angle. Thus the central atom (around which the angle is computed) is the atom2 in the list. E.g. H,O,H for a water molecule. The *Angles* section must appear after the *Atoms* section. All values in this section must be integers (1, not 1.0). - ---------- - *AngleTorsion Coeffs* section: * one line per dihedral type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = dihedral type (1-N) coeffs = list of coeffs (see :doc:`dihedral_coeff `) - - - ---------- - *Atoms* section: * one line per atom @@ -624,10 +588,6 @@ of analysis. +------------+---------------------------------------------------------------------------+ | edpd | atom-ID atom-type edpd\_temp edpd\_cv x y z | +------------+---------------------------------------------------------------------------+ -| mdpd | atom-ID atom-type rho x y z | -+------------+---------------------------------------------------------------------------+ -| tdpd | atom-ID atom-type x y z cc1 cc2 ... ccNspecies | -+------------+---------------------------------------------------------------------------+ | electron | atom-ID atom-type q spin eradius x y z | +------------+---------------------------------------------------------------------------+ | ellipsoid | atom-ID atom-type ellipsoidflag density x y z | @@ -636,17 +596,22 @@ of analysis. +------------+---------------------------------------------------------------------------+ | line | atom-ID molecule-ID atom-type lineflag density x y z | +------------+---------------------------------------------------------------------------+ +| mdpd | atom-ID atom-type rho x y z | ++------------+---------------------------------------------------------------------------+ | meso | atom-ID atom-type rho e cv x y z | +------------+---------------------------------------------------------------------------+ | molecular | atom-ID molecule-ID atom-type x y z | +------------+---------------------------------------------------------------------------+ | peri | atom-ID atom-type volume density x y z | +------------+---------------------------------------------------------------------------+ -| smd | atom-ID atom-type molecule volume mass kernel-radius contact-radius x y z | +| smd | atom-ID atom-type molecule volume mass kernel-radius +contact-radius x0 y0 z0 x y z | +------------+---------------------------------------------------------------------------+ | sphere | atom-ID atom-type diameter density x y z | +------------+---------------------------------------------------------------------------+ -| spin | atom-ID atom-type sp x y z spx spy spz | +| spin | atom-ID atom-type x y z spx spy spz sp | ++------------+---------------------------------------------------------------------------+ +| tdpd | atom-ID atom-type x y z cc1 cc2 ... ccNspecies | +------------+---------------------------------------------------------------------------+ | template | atom-ID molecule-ID template-index template-atom atom-type x y z | +------------+---------------------------------------------------------------------------+ @@ -662,7 +627,7 @@ The per-atom values have these meanings and units, listed alphabetically: * atom-ID = integer ID of atom * atom-type = type of atom (1-Ntype) * bodyflag = 1 for body particles, 0 for point particles -* cc = chemical concentration for tDPD particles for each species (mole/volume units) +* ccN = chemical concentration for tDPD particles for each species (mole/volume units) * contact-radius = ??? (distance units) * cs\_re,cs\_im = real/imaginary parts of wave packet coefficients * cv = heat capacity (need units) for SPH particles @@ -682,14 +647,15 @@ The per-atom values have these meanings and units, listed alphabetically: * q = charge on atom (charge units) * rho = density (need units) for SPH particles * spin = electron spin (+1/-1), 0 = nuclei, 2 = fixed-core, 3 = pseudo-cores (i.e. ECP) -* sp = norm of magnetic spin of atom (in number of Bohr magnetons) -* spx,spy,spz = components of magnetic spin of atom (adim normalized vector) +* sp = magnitude of magnetic spin of atom (Bohr magnetons) +* spx,spy,spz = components of magnetic spin of atom (unit vector) * template-atom = which atom within a template molecule the atom is * template-index = which molecule within the molecule template the atom is part of * theta = internal temperature of a DPD particle * triangleflag = 1 for triangular particles, 0 for point or spherical particles * volume = volume of Peridynamic particle (distance\^3 units) * x,y,z = coordinates of atom (distance units) +* x0,y0,z0 = original (strain-free) coordinates of atom (distance units) The units for these quantities depend on the unit style; see the :doc:`units ` command for details. @@ -702,7 +668,7 @@ in dump files. Normally, it is a unique value from 1 to Natoms for each atom. Unique values larger than Natoms can be used, but they will cause extra memory to be allocated on each processor, if an atom map array is used, but not if an atom map hash is used; see the -:doc:`atom\_modify ` command for details. If an atom map is +:doc:`atom_modify ` command for details. If an atom map is not used (e.g. an atomic system with no bonds), and you don't care if unique atom IDs appear in dump files, then the atom-IDs can all be set to 0. @@ -723,7 +689,7 @@ triangle, or body in the corresponding *Ellipsoids*\ , *Lines*\ , *Triangles*\ , or *Bodies* section. The *template-index* and *template-atom* are only defined used by -:doc:`atom\_style template `. In this case the +:doc:`atom_style template `. In this case the :doc:`molecule ` command is used to define a molecule template which contains one or more molecules. If an atom belongs to one of those molecules, its *template-index* and *template-atom* are both set @@ -754,15 +720,14 @@ used. A *disc* keyword can also be used with time integration fixes, such as :doc:`fix nve/sphere ` and :doc:`fix nvt/sphere ` to time integrate their motion as 2d discs (not 3d spheres), by changing their moment of inertia. -For atom\_style hybrid, following the 5 initial values (ID,type,x,y,z), -specific values for each sub-style must be listed. The order of the -sub-styles is the same as they were listed in the -:doc:`atom\_style ` command. The sub-style specific values -are those that are not the 5 standard ones (ID,type,x,y,z). For -example, for the "charge" sub-style, a "q" value would appear. For -the "full" sub-style, a "molecule-ID" and "q" would appear. These are -listed in the same order they appear as listed above. Thus if - +For atom\_style hybrid, following the 5 initial values +(ID,type,x,y,z), specific values for each sub-style must be listed. +The order of the sub-styles is the same as they were listed in the +:doc:`atom_style ` command. The specific values for each +sub-style are those that are not the 5 standard ones (ID,type,x,y,z). +For example, for the "charge" sub-style, a "q" value would appear. +For the "full" sub-style, a "molecule-ID" and "q" would appear. These +are listed in the same order they appear as listed above. Thus if .. parsed-literal:: @@ -770,19 +735,19 @@ listed in the same order they appear as listed above. Thus if were used in the input script, each atom line would have these fields: - .. parsed-literal:: atom-ID atom-type x y z q diameter density Note that if a non-standard value is defined by multiple sub-styles, -it must appear multiple times in the atom line. E.g. the atom line -for atom\_style hybrid dipole full would list "q" twice: - +it only appears once in the atom line. E.g. the atom line for +atom\_style hybrid dipole full would list "q" only once, with the +dipole sub-style fields; "q" does not appear with the full sub-style +fields. .. parsed-literal:: - atom-ID atom-type x y z q mux muy myz molecule-ID q + atom-ID atom-type x y z q mux muy myz molecule-ID Atom lines specify the (x,y,z) coordinates of atoms. These can be inside or outside the simulation box. When the data file is read, @@ -827,7 +792,6 @@ that use unwrapped coordinates internally are as follows: continued run (restarted from a data file) begins with image flags that are consistent with the previous run. - .. note:: If your system is an infinite periodic crystal with bonds then @@ -841,41 +805,37 @@ a *Velocities* section in the data file or by a :doc:`velocity ` or :doc:`set ` command in the input script. - ---------- - *Bodies* section: * one or more lines per body * first line syntax: atom-ID Ninteger Ndouble - + .. parsed-literal:: - + Ninteger = # of integer quantities for this particle Ndouble = # of floating-point quantities for this particle * 0 or more integer lines with total of Ninteger values * 0 or more double lines with total of Ndouble values * example: - + .. parsed-literal:: - + 12 3 6 2 3 2 1.0 2.0 3.0 1.0 2.0 4.0 * example: - + .. parsed-literal:: - + 12 0 14 1.0 2.0 3.0 1.0 2.0 4.0 1.0 2.0 3.0 1.0 2.0 4.0 4.0 2.0 - - -The *Bodies* section must appear if :doc:`atom\_style body ` +The *Bodies* section must appear if :doc:`atom_style body ` is used and any atoms listed in the *Atoms* section have a bodyflag = 1. The number of bodies should be specified in the header section via the "bodies" keyword. @@ -883,7 +843,7 @@ the "bodies" keyword. Each body can have a variable number of integer and/or floating-point values. The number and meaning of the values is defined by the body style, as described in the :doc:`Howto body ` doc page. The -body style is given as an argument to the :doc:`atom\_style body ` command. +body style is given as an argument to the :doc:`atom_style body ` command. The Ninteger and Ndouble values determine how many integer and floating-point values are specified for this particle. Ninteger and @@ -896,187 +856,155 @@ particular type, no lines appear for that type. The *Bodies* section must appear after the *Atoms* section. - ---------- - *Bond Coeffs* section: * one line per bond type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = bond type (1-N) coeffs = list of coeffs * example: - + .. parsed-literal:: - + 4 250 1.49 - - The number and meaning of the coefficients are specific to the defined -bond style. See the :doc:`bond\_style ` and -:doc:`bond\_coeff ` commands for details. Coefficients can -also be set via the :doc:`bond\_coeff ` command in the input +bond style. See the :doc:`bond_style ` and +:doc:`bond_coeff ` commands for details. Coefficients can +also be set via the :doc:`bond_coeff ` command in the input script. - ---------- - *BondAngle Coeffs* section: * one line per angle type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = angle type (1-N) coeffs = list of coeffs (see class 2 section of :doc:`angle_coeff `) - - - ---------- - *BondBond Coeffs* section: * one line per angle type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = angle type (1-N) coeffs = list of coeffs (see class 2 section of :doc:`angle_coeff `) - - - ---------- - *BondBond13 Coeffs* section: * one line per dihedral type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = dihedral type (1-N) coeffs = list of coeffs (see class 2 section of :doc:`dihedral_coeff `) - - - ---------- - *Bonds* section: * one line per bond * line syntax: ID type atom1 atom2 - + .. parsed-literal:: - + ID = bond number (1-Nbonds) type = bond type (1-Nbondtype) atom1,atom2 = IDs of 1st,2nd atoms in bond * example: - + .. parsed-literal:: - + 12 3 17 29 - - The *Bonds* section must appear after the *Atoms* section. All values in this section must be integers (1, not 1.0). - ---------- - *Dihedral Coeffs* section: * one line per dihedral type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = dihedral type (1-N) coeffs = list of coeffs * example: - + .. parsed-literal:: - + 3 0.6 1 0 1 - - The number and meaning of the coefficients are specific to the defined -dihedral style. See the :doc:`dihedral\_style ` and -:doc:`dihedral\_coeff ` commands for details. +dihedral style. See the :doc:`dihedral_style ` and +:doc:`dihedral_coeff ` commands for details. Coefficients can also be set via the -:doc:`dihedral\_coeff ` command in the input script. - +:doc:`dihedral_coeff ` command in the input script. ---------- - *Dihedrals* section: * one line per dihedral * line syntax: ID type atom1 atom2 atom3 atom4 - + .. parsed-literal:: - + ID = number of dihedral (1-Ndihedrals) type = dihedral type (1-Ndihedraltype) atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atoms in dihedral * example: - + .. parsed-literal:: - + 12 4 17 29 30 21 - - The 4 atoms are ordered linearly within the dihedral. The *Dihedrals* section must appear after the *Atoms* section. All values in this section must be integers (1, not 1.0). - ---------- - *Ellipsoids* section: * one line per ellipsoid * line syntax: atom-ID shapex shapey shapez quatw quati quatj quatk - + .. parsed-literal:: - + atom-ID = ID of atom which is an ellipsoid shapex,shapey,shapez = 3 diameters of ellipsoid (distance units) quatw,quati,quatj,quatk = quaternion components for orientation of atom * example: - + .. parsed-literal:: - + 12 1 2 1 1 0 0 0 - - -The *Ellipsoids* section must appear if :doc:`atom\_style ellipsoid ` is used and any atoms are listed in the +The *Ellipsoids* section must appear if :doc:`atom_style ellipsoid ` is used and any atoms are listed in the *Atoms* section with an ellipsoidflag = 1. The number of ellipsoids should be specified in the header section via the "ellipsoids" keyword. @@ -1099,73 +1027,61 @@ specified as a unit vector. The *Ellipsoids* section must appear after the *Atoms* section. - ---------- - *EndBondTorsion Coeffs* section: * one line per dihedral type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = dihedral type (1-N) coeffs = list of coeffs (see class 2 section of :doc:`dihedral_coeff `) - - - ---------- - *Improper Coeffs* section: * one line per improper type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = improper type (1-N) coeffs = list of coeffs * example: - + .. parsed-literal:: - + 2 20 0.0548311 - - The number and meaning of the coefficients are specific to the defined -improper style. See the :doc:`improper\_style ` and -:doc:`improper\_coeff ` commands for details. +improper style. See the :doc:`improper_style ` and +:doc:`improper_coeff ` commands for details. Coefficients can also be set via the -:doc:`improper\_coeff ` command in the input script. - +:doc:`improper_coeff ` command in the input script. ---------- - *Impropers* section: * one line per improper * line syntax: ID type atom1 atom2 atom3 atom4 - + .. parsed-literal:: - + ID = number of improper (1-Nimpropers) type = improper type (1-Nimpropertype) atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atoms in improper * example: - + .. parsed-literal:: - + 12 3 17 29 13 100 - - The ordering of the 4 atoms determines the definition of the improper angle used in the formula for each :doc:`improper style `. See the doc pages for individual styles for details. @@ -1173,30 +1089,26 @@ for details. The *Impropers* section must appear after the *Atoms* section. All values in this section must be integers (1, not 1.0). - ---------- - *Lines* section: * one line per line segment * line syntax: atom-ID x1 y1 x2 y2 - + .. parsed-literal:: - + atom-ID = ID of atom which is a line segment x1,y1 = 1st end point x2,y2 = 2nd end point * example: - + .. parsed-literal:: - + 12 1.0 0.0 2.0 0.0 - - -The *Lines* section must appear if :doc:`atom\_style line ` +The *Lines* section must appear if :doc:`atom_style line ` is used and any atoms are listed in the *Atoms* section with a lineflag = 1. The number of lines should be specified in the header section via the "lines" keyword. @@ -1210,139 +1122,119 @@ for defining some interactions. The *Lines* section must appear after the *Atoms* section. - ---------- - *Masses* section: * one line per atom type * line syntax: ID mass - + .. parsed-literal:: - + ID = atom type (1-N) mass = mass value * example: - + .. parsed-literal:: - + 3 1.01 - - This defines the mass of each atom type. This can also be set via the :doc:`mass ` command in the input script. This section cannot be used for atom styles that define a mass for individual atoms - -e.g. :doc:`atom\_style sphere `. - +e.g. :doc:`atom_style sphere `. ---------- - *MiddleBondTorsion Coeffs* section: * one line per dihedral type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = dihedral type (1-N) coeffs = list of coeffs (see class 2 section of :doc:`dihedral_coeff `) - - - ---------- - *Pair Coeffs* section: * one line per atom type * line syntax: ID coeffs - + .. parsed-literal:: - + ID = atom type (1-N) coeffs = list of coeffs * example: - + .. parsed-literal:: - + 3 0.022 2.35197 0.022 2.35197 - - The number and meaning of the coefficients are specific to the defined -pair style. See the :doc:`pair\_style ` and -:doc:`pair\_coeff ` commands for details. Since pair +pair style. See the :doc:`pair_style ` and +:doc:`pair_coeff ` commands for details. Since pair coefficients for types I != J are not specified, these will be generated automatically by the pair style's mixing rule. See the -individual pair\_style doc pages and the :doc:`pair\_modify mix ` command for details. Pair coefficients can also -be set via the :doc:`pair\_coeff ` command in the input +individual pair\_style doc pages and the :doc:`pair_modify mix ` command for details. Pair coefficients can also +be set via the :doc:`pair_coeff ` command in the input script. - ---------- - *PairIJ Coeffs* section: * one line per pair of atom types for all I,J with I <= J * line syntax: ID1 ID2 coeffs - + .. parsed-literal:: - + ID1 = atom type I = 1-N ID2 = atom type J = I-N, with I <= J coeffs = list of coeffs * examples: - + .. parsed-literal:: - + 3 3 0.022 2.35197 0.022 2.35197 3 5 0.022 2.35197 0.022 2.35197 - - This section must have N\*(N+1)/2 lines where N = # of atom types. The number and meaning of the coefficients are specific to the defined -pair style. See the :doc:`pair\_style ` and -:doc:`pair\_coeff ` commands for details. Since pair +pair style. See the :doc:`pair_style ` and +:doc:`pair_coeff ` commands for details. Since pair coefficients for types I != J are all specified, these values will turn off the default mixing rule defined by the pair style. See the -individual pair\_style doc pages and the :doc:`pair\_modify mix ` command for details. Pair coefficients can also -be set via the :doc:`pair\_coeff ` command in the input +individual pair\_style doc pages and the :doc:`pair_modify mix ` command for details. Pair coefficients can also +be set via the :doc:`pair_coeff ` command in the input script. - ---------- - *Triangles* section: * one line per triangle * line syntax: atom-ID x1 y1 z1 x2 y2 z2 x3 y3 z3 - + .. parsed-literal:: - + atom-ID = ID of atom which is a line segment x1,y1,z1 = 1st corner point x2,y2,z2 = 2nd corner point x3,y3,z3 = 3rd corner point * example: - + .. parsed-literal:: - + 12 0.0 0.0 0.0 2.0 0.0 1.0 0.0 2.0 1.0 - - -The *Triangles* section must appear if :doc:`atom\_style tri ` is used and any atoms are listed in the *Atoms* +The *Triangles* section must appear if :doc:`atom_style tri ` is used and any atoms are listed in the *Atoms* section with a triangleflag = 1. The number of lines should be specified in the header section via the "triangles" keyword. @@ -1354,10 +1246,8 @@ orientation may be important for defining some interactions. The *Triangles* section must appear after the *Atoms* section. - ---------- - *Velocities* section: * one line per atom @@ -1394,21 +1284,19 @@ Wz are in units of angular velocity (radians/time). For atom\_style hybrid, following the 4 initial values (ID,vx,vy,vz), specific values for each sub-style must be listed. The order of the sub-styles is the same as they were listed in the -:doc:`atom\_style ` command. The sub-style specific values +:doc:`atom_style ` command. The sub-style specific values are those that are not the 5 standard ones (ID,vx,vy,vz). For example, for the "sphere" sub-style, "wx", "wy", "wz" values would appear. These are listed in the same order they appear as listed above. Thus if - -.. parsed-literal:: +.. code-block:: LAMMPS atom_style hybrid electron sphere were used in the input script, each velocity line would have these fields: - .. parsed-literal:: atom-ID vx vy vz ervel wx wy wz @@ -1416,14 +1304,11 @@ fields: Translational velocities can also be set by the :doc:`velocity ` command in the input script. - ---------- - Restrictions """""""""""" - To read gzipped data files, you must compile LAMMPS with the -DLAMMPS\_GZIP option. See the :doc:`Build settings ` doc page for details. @@ -1431,15 +1316,10 @@ doc page for details. Related commands """""""""""""""" -:doc:`read\_dump `, :doc:`read\_restart `, -:doc:`create\_atoms `, :doc:`write\_data ` +:doc:`read_dump `, :doc:`read_restart `, +:doc:`create_atoms `, :doc:`write_data ` Default """"""" The default for all the *extra* keywords is 0. - - -.. _lws: http://lammps.sandia.gov -.. _ld: Manual.html -.. _lc: Commands_all.html From 9a1b4a8edb9f1d19f79b0f6ab65a9ec4b1ebc9eb Mon Sep 17 00:00:00 2001 From: Michael Lamparski Date: Wed, 28 Aug 2019 11:09:57 -0400 Subject: [PATCH 058/577] Add infrastructure for openmp4 compat --- cmake/CMakeLists.txt | 18 ++++++------ doc/src/Build_basics.rst | 8 ++---- src/USER-OMP/README | 8 ------ src/USER-OMP/hack_openmp_for_pgi_gcc9.sh | 12 -------- src/omp_compat.h | 35 ++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 35 deletions(-) delete mode 100755 src/USER-OMP/hack_openmp_for_pgi_gcc9.sh create mode 100644 src/omp_compat.h diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 4dd079eaae..3dea0db8b0 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -229,16 +229,7 @@ pkg_depends(USER-SCAFACOS MPI) find_package(OpenMP QUIET) -# TODO: this is a temporary workaround until a better solution is found. AK 2019-05-30 -# GNU GCC 9.x uses settings incompatible with our use of 'default(none)' in OpenMP pragmas -# where we assume older GCC semantics. For the time being, we disable OpenMP by default -# for GCC 9.x and beyond. People may manually turn it on, but need to run the script -# src/USER-OMP/hack_openmp_for_pgi_gcc9.sh on all sources to make it compatible with gcc 9. -if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9)) - option(BUILD_OMP "Build with OpenMP support" OFF) -else() - option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND}) -endif() +option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND}) if(BUILD_OMP) find_package(OpenMP REQUIRED) @@ -248,6 +239,13 @@ if(BUILD_OMP) endif() set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + + if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9)) + # GCC 9.x strictly implements OpenMP 4.0 semantics for consts. + add_definitions(-DLMP_OMP_COMPAT=4) + else() + add_definitions(-DLMP_OMP_COMPAT=3) + endif() endif() if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE) diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index 8ad48b0810..96bc0f5bd1 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -145,11 +145,9 @@ Some compilers do not fully support the ``default(none)`` directive and others (e.g. GCC version 9 and beyond) may implement OpenMP 4.0 semantics, which are incompatible with the OpenMP 3.1 semantics used in LAMMPS (for maximal compatibility with compiler versions in use). -In those case, all ``default(none)`` directives (which aid in detecting -incorrect and unwanted sharing) can be replaced with ``default(shared)`` -while dropping all ``shared()`` directives. The script -'src/USER-OMP/hack_openmp_for_pgi_gcc9.sh' can be used to automate -this conversion. +LAMMPS will try to detect compilers that use OpenMP 4.0 semantics and +change the directives accordingly, but if your compiler is not +detected, you may set the CMake variable ``-D LMP_OMP_COMPAT=4``. ---------- diff --git a/src/USER-OMP/README b/src/USER-OMP/README index 46f63f646b..0aef853bca 100644 --- a/src/USER-OMP/README +++ b/src/USER-OMP/README @@ -9,11 +9,3 @@ doc/Section_accelerate.html, sub-section 5.2 The person who created this package is Axel Kohlmeyer at Temple U (akohlmey at gmail.com). Contact him directly if you have questions. --------------------------- - -This directory also contains a shell script: - -hack_openmp_for_pgi.sh - -which will convert OpenMP directives in src files -into a form compatible with the PGI compiler. diff --git a/src/USER-OMP/hack_openmp_for_pgi_gcc9.sh b/src/USER-OMP/hack_openmp_for_pgi_gcc9.sh deleted file mode 100755 index 6f9f30cedd..0000000000 --- a/src/USER-OMP/hack_openmp_for_pgi_gcc9.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# convert default(none) directives for OpenMP pragmas to default(shared) and remove shared() directive -# this allows compiling OpenMP pragmas in LAMMPS with compilers that don't support default(none) properly -# or require backward incompatible OpenMP 4 and OpenMP 5 semantics - -for f in *.h *.cpp -do \ - sed -e '/#pragma omp/s/^\(.*default\)(none)\(.*\)$/\1(shared)\2/' \ - -e '/#pragma omp/s/shared([a-z0-9,_]\+)//' \ - -i.bak $f -done diff --git a/src/omp_compat.h b/src/omp_compat.h new file mode 100644 index 0000000000..8abf1c54bc --- /dev/null +++ b/src/omp_compat.h @@ -0,0 +1,35 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2020) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +// There is no way to annotate an OpenMP construct that +// (a) accesses const variables, (b) has default(none), +// and (c) is valid in both OpenMP 3.0 and 4.0. +// +// (in OpenMP 3.0, the const variables have a predetermined +// sharing attribute and are *forbidden* from being declared +// in the omp construct. In OpenMP 4.0, this predetermined +// sharing attribute is removed, and thus they are *required* +// to be declared in the omp construct) +// +// To date, most compilers still accept the OpenMP 3.0 form, +// so this is what LAMMPS primarily uses. For those compilers +// that strictly implement OpenMP 4.0 (such as GCC 9.0), we +// give up default(none). +#if LMP_OMP_COMPAT == 4 +# define LMP_SHARED(...) +# define LMP_DEFAULT_NONE default(shared) +#else +# define LMP_SHARED(...) shared(__VA_ARGS__) +# define LMP_DEFAULT_NONE default(none) +#endif + From 0bedebc083d326a4a8c32554dc46c98d2c379016 Mon Sep 17 00:00:00 2001 From: Michael Lamparski Date: Fri, 20 Mar 2020 12:16:22 -0400 Subject: [PATCH 059/577] migrate omp constructs to new macros These changes were automatically generated using the script posted in https://github.com/lammps/lammps/pull/1651#issuecomment-525814475 --- src/MPIIO/dump_atom_mpiio.cpp | 5 ++- src/MPIIO/dump_cfg_mpiio.cpp | 3 +- src/MPIIO/dump_custom_mpiio.cpp | 3 +- src/MPIIO/dump_xyz_mpiio.cpp | 3 +- src/USER-DIFFRACTION/compute_saed.cpp | 3 +- src/USER-DIFFRACTION/compute_xrd.cpp | 3 +- src/USER-INTEL/angle_charmm_intel.cpp | 3 +- src/USER-INTEL/angle_harmonic_intel.cpp | 3 +- src/USER-INTEL/bond_fene_intel.cpp | 3 +- src/USER-INTEL/bond_harmonic_intel.cpp | 3 +- src/USER-INTEL/dihedral_charmm_intel.cpp | 5 ++- src/USER-INTEL/dihedral_fourier_intel.cpp | 3 +- src/USER-INTEL/dihedral_harmonic_intel.cpp | 3 +- src/USER-INTEL/dihedral_opls_intel.cpp | 3 +- src/USER-INTEL/fix_intel.cpp | 3 +- src/USER-INTEL/improper_cvff_intel.cpp | 3 +- src/USER-INTEL/improper_harmonic_intel.cpp | 3 +- src/USER-INTEL/npair_intel.cpp | 3 +- src/USER-INTEL/pppm_disp_intel.cpp | 31 ++++++++-------- src/USER-INTEL/pppm_intel.cpp | 11 +++--- src/USER-OMP/angle_charmm_omp.cpp | 3 +- src/USER-OMP/angle_class2_omp.cpp | 3 +- src/USER-OMP/angle_cosine_delta_omp.cpp | 3 +- src/USER-OMP/angle_cosine_omp.cpp | 3 +- src/USER-OMP/angle_cosine_periodic_omp.cpp | 3 +- src/USER-OMP/angle_cosine_shift_exp_omp.cpp | 3 +- src/USER-OMP/angle_cosine_shift_omp.cpp | 3 +- src/USER-OMP/angle_cosine_squared_omp.cpp | 3 +- src/USER-OMP/angle_dipole_omp.cpp | 3 +- src/USER-OMP/angle_fourier_omp.cpp | 3 +- src/USER-OMP/angle_fourier_simple_omp.cpp | 3 +- src/USER-OMP/angle_harmonic_omp.cpp | 3 +- src/USER-OMP/angle_quartic_omp.cpp | 3 +- src/USER-OMP/angle_sdk_omp.cpp | 3 +- src/USER-OMP/angle_table_omp.cpp | 3 +- src/USER-OMP/bond_class2_omp.cpp | 3 +- src/USER-OMP/bond_fene_expand_omp.cpp | 3 +- src/USER-OMP/bond_fene_omp.cpp | 3 +- src/USER-OMP/bond_gromos_omp.cpp | 3 +- src/USER-OMP/bond_harmonic_omp.cpp | 3 +- src/USER-OMP/bond_harmonic_shift_cut_omp.cpp | 3 +- src/USER-OMP/bond_harmonic_shift_omp.cpp | 3 +- src/USER-OMP/bond_morse_omp.cpp | 3 +- src/USER-OMP/bond_nonlinear_omp.cpp | 3 +- src/USER-OMP/bond_quartic_omp.cpp | 3 +- src/USER-OMP/bond_table_omp.cpp | 3 +- src/USER-OMP/dihedral_charmm_omp.cpp | 3 +- src/USER-OMP/dihedral_class2_omp.cpp | 3 +- .../dihedral_cosine_shift_exp_omp.cpp | 3 +- src/USER-OMP/dihedral_fourier_omp.cpp | 3 +- src/USER-OMP/dihedral_harmonic_omp.cpp | 3 +- src/USER-OMP/dihedral_helix_omp.cpp | 3 +- src/USER-OMP/dihedral_multi_harmonic_omp.cpp | 3 +- src/USER-OMP/dihedral_nharmonic_omp.cpp | 3 +- src/USER-OMP/dihedral_opls_omp.cpp | 3 +- src/USER-OMP/dihedral_quadratic_omp.cpp | 3 +- src/USER-OMP/dihedral_table_omp.cpp | 3 +- src/USER-OMP/domain_omp.cpp | 7 ++-- src/USER-OMP/ewald_omp.cpp | 5 ++- src/USER-OMP/fix_gravity_omp.cpp | 5 ++- src/USER-OMP/fix_neigh_history_omp.cpp | 9 +++-- src/USER-OMP/fix_nh_asphere_omp.cpp | 9 +++-- src/USER-OMP/fix_nh_omp.cpp | 19 +++++----- src/USER-OMP/fix_nh_sphere_omp.cpp | 7 ++-- src/USER-OMP/fix_nve_omp.cpp | 9 +++-- src/USER-OMP/fix_nve_sphere_omp.cpp | 9 +++-- src/USER-OMP/fix_nvt_sllod_omp.cpp | 3 +- src/USER-OMP/fix_omp.cpp | 9 +++-- src/USER-OMP/fix_rigid_nh_omp.cpp | 23 ++++++------ src/USER-OMP/fix_rigid_omp.cpp | 19 +++++----- src/USER-OMP/fix_rigid_small_omp.cpp | 17 +++++---- src/USER-OMP/improper_class2_omp.cpp | 3 +- src/USER-OMP/improper_cossq_omp.cpp | 3 +- src/USER-OMP/improper_cvff_omp.cpp | 3 +- src/USER-OMP/improper_fourier_omp.cpp | 3 +- src/USER-OMP/improper_harmonic_omp.cpp | 3 +- src/USER-OMP/improper_ring_omp.cpp | 3 +- src/USER-OMP/improper_umbrella_omp.cpp | 3 +- src/USER-OMP/msm_cg_omp.cpp | 3 +- src/USER-OMP/msm_omp.cpp | 5 ++- src/USER-OMP/npair_full_bin_atomonly_omp.cpp | 3 +- src/USER-OMP/npair_full_bin_ghost_omp.cpp | 3 +- src/USER-OMP/npair_full_bin_omp.cpp | 3 +- src/USER-OMP/npair_full_multi_omp.cpp | 3 +- src/USER-OMP/npair_full_nsq_ghost_omp.cpp | 3 +- src/USER-OMP/npair_full_nsq_omp.cpp | 3 +- .../npair_half_bin_atomonly_newton_omp.cpp | 3 +- .../npair_half_bin_newtoff_ghost_omp.cpp | 3 +- src/USER-OMP/npair_half_bin_newtoff_omp.cpp | 3 +- src/USER-OMP/npair_half_bin_newton_omp.cpp | 3 +- .../npair_half_bin_newton_tri_omp.cpp | 3 +- src/USER-OMP/npair_half_multi_newtoff_omp.cpp | 3 +- src/USER-OMP/npair_half_multi_newton_omp.cpp | 3 +- .../npair_half_multi_newton_tri_omp.cpp | 3 +- .../npair_half_nsq_newtoff_ghost_omp.cpp | 3 +- src/USER-OMP/npair_half_nsq_newtoff_omp.cpp | 3 +- src/USER-OMP/npair_half_nsq_newton_omp.cpp | 3 +- .../npair_half_respa_bin_newtoff_omp.cpp | 3 +- .../npair_half_respa_bin_newton_omp.cpp | 3 +- .../npair_half_respa_bin_newton_tri_omp.cpp | 3 +- .../npair_half_respa_nsq_newtoff_omp.cpp | 3 +- .../npair_half_respa_nsq_newton_omp.cpp | 3 +- .../npair_half_size_bin_newtoff_omp.cpp | 3 +- .../npair_half_size_bin_newton_omp.cpp | 3 +- .../npair_half_size_bin_newton_tri_omp.cpp | 3 +- .../npair_half_size_nsq_newtoff_omp.cpp | 3 +- .../npair_half_size_nsq_newton_omp.cpp | 3 +- src/USER-OMP/npair_halffull_newtoff_omp.cpp | 3 +- src/USER-OMP/npair_halffull_newton_omp.cpp | 3 +- src/USER-OMP/pair_adp_omp.cpp | 3 +- src/USER-OMP/pair_agni_omp.cpp | 3 +- src/USER-OMP/pair_airebo_omp.cpp | 5 ++- src/USER-OMP/pair_beck_omp.cpp | 3 +- src/USER-OMP/pair_born_coul_long_omp.cpp | 3 +- src/USER-OMP/pair_born_coul_msm_omp.cpp | 3 +- src/USER-OMP/pair_born_coul_wolf_omp.cpp | 3 +- src/USER-OMP/pair_born_omp.cpp | 3 +- src/USER-OMP/pair_brownian_omp.cpp | 3 +- src/USER-OMP/pair_brownian_poly_omp.cpp | 3 +- src/USER-OMP/pair_buck_coul_cut_omp.cpp | 3 +- src/USER-OMP/pair_buck_coul_long_omp.cpp | 3 +- src/USER-OMP/pair_buck_coul_msm_omp.cpp | 3 +- src/USER-OMP/pair_buck_long_coul_long_omp.cpp | 9 +++-- src/USER-OMP/pair_buck_omp.cpp | 3 +- src/USER-OMP/pair_colloid_omp.cpp | 3 +- src/USER-OMP/pair_comb_omp.cpp | 7 ++-- src/USER-OMP/pair_coul_cut_omp.cpp | 3 +- src/USER-OMP/pair_coul_cut_soft_omp.cpp | 3 +- src/USER-OMP/pair_coul_debye_omp.cpp | 3 +- src/USER-OMP/pair_coul_diel_omp.cpp | 3 +- src/USER-OMP/pair_coul_dsf_omp.cpp | 3 +- src/USER-OMP/pair_coul_long_omp.cpp | 3 +- src/USER-OMP/pair_coul_long_soft_omp.cpp | 3 +- src/USER-OMP/pair_coul_msm_omp.cpp | 3 +- src/USER-OMP/pair_coul_wolf_omp.cpp | 3 +- src/USER-OMP/pair_dpd_omp.cpp | 3 +- src/USER-OMP/pair_dpd_tstat_omp.cpp | 3 +- src/USER-OMP/pair_eam_cd_omp.cpp | 3 +- src/USER-OMP/pair_eam_omp.cpp | 3 +- src/USER-OMP/pair_edip_omp.cpp | 3 +- src/USER-OMP/pair_eim_omp.cpp | 3 +- src/USER-OMP/pair_gauss_cut_omp.cpp | 3 +- src/USER-OMP/pair_gauss_omp.cpp | 3 +- src/USER-OMP/pair_gayberne_omp.cpp | 3 +- src/USER-OMP/pair_gran_hertz_history_omp.cpp | 3 +- src/USER-OMP/pair_gran_hooke_history_omp.cpp | 3 +- src/USER-OMP/pair_gran_hooke_omp.cpp | 3 +- src/USER-OMP/pair_hbond_dreiding_lj_omp.cpp | 3 +- .../pair_hbond_dreiding_morse_omp.cpp | 3 +- src/USER-OMP/pair_lj96_cut_omp.cpp | 3 +- ...air_lj_charmm_coul_charmm_implicit_omp.cpp | 3 +- .../pair_lj_charmm_coul_charmm_omp.cpp | 3 +- src/USER-OMP/pair_lj_charmm_coul_long_omp.cpp | 3 +- .../pair_lj_charmm_coul_long_soft_omp.cpp | 3 +- src/USER-OMP/pair_lj_charmm_coul_msm_omp.cpp | 3 +- src/USER-OMP/pair_lj_class2_coul_cut_omp.cpp | 3 +- src/USER-OMP/pair_lj_class2_coul_long_omp.cpp | 3 +- src/USER-OMP/pair_lj_class2_omp.cpp | 3 +- src/USER-OMP/pair_lj_cubic_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_coul_cut_omp.cpp | 3 +- .../pair_lj_cut_coul_cut_soft_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_coul_debye_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_coul_dsf_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_coul_long_omp.cpp | 3 +- .../pair_lj_cut_coul_long_soft_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_coul_msm_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_coul_wolf_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_dipole_cut_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_soft_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_thole_long_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_tip4p_cut_omp.cpp | 3 +- src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp | 3 +- .../pair_lj_cut_tip4p_long_soft_omp.cpp | 3 +- src/USER-OMP/pair_lj_expand_omp.cpp | 3 +- .../pair_lj_gromacs_coul_gromacs_omp.cpp | 3 +- src/USER-OMP/pair_lj_gromacs_omp.cpp | 3 +- src/USER-OMP/pair_lj_long_coul_long_omp.cpp | 9 +++-- src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp | 9 +++-- src/USER-OMP/pair_lj_sdk_coul_long_omp.cpp | 3 +- src/USER-OMP/pair_lj_sdk_coul_msm_omp.cpp | 3 +- src/USER-OMP/pair_lj_sdk_omp.cpp | 3 +- src/USER-OMP/pair_lj_sf_dipole_sf_omp.cpp | 3 +- src/USER-OMP/pair_lj_smooth_linear_omp.cpp | 3 +- src/USER-OMP/pair_lj_smooth_omp.cpp | 3 +- src/USER-OMP/pair_lubricate_omp.cpp | 3 +- src/USER-OMP/pair_lubricate_poly_omp.cpp | 3 +- src/USER-OMP/pair_meam_spline_omp.cpp | 3 +- src/USER-OMP/pair_morse_omp.cpp | 3 +- src/USER-OMP/pair_morse_smooth_linear_omp.cpp | 3 +- src/USER-OMP/pair_nm_cut_coul_cut_omp.cpp | 3 +- src/USER-OMP/pair_nm_cut_coul_long_omp.cpp | 3 +- src/USER-OMP/pair_nm_cut_omp.cpp | 3 +- src/USER-OMP/pair_peri_lps_omp.cpp | 3 +- src/USER-OMP/pair_peri_pmb_omp.cpp | 3 +- src/USER-OMP/pair_resquared_omp.cpp | 3 +- src/USER-OMP/pair_soft_omp.cpp | 3 +- src/USER-OMP/pair_sw_omp.cpp | 3 +- src/USER-OMP/pair_table_omp.cpp | 3 +- src/USER-OMP/pair_tersoff_mod_c_omp.cpp | 3 +- src/USER-OMP/pair_tersoff_mod_omp.cpp | 3 +- src/USER-OMP/pair_tersoff_omp.cpp | 3 +- src/USER-OMP/pair_tersoff_table_omp.cpp | 3 +- src/USER-OMP/pair_tip4p_cut_omp.cpp | 3 +- src/USER-OMP/pair_tip4p_long_omp.cpp | 3 +- src/USER-OMP/pair_tip4p_long_soft_omp.cpp | 3 +- src/USER-OMP/pair_ufm_omp.cpp | 3 +- src/USER-OMP/pair_vashishta_omp.cpp | 3 +- src/USER-OMP/pair_vashishta_table_omp.cpp | 3 +- src/USER-OMP/pair_yukawa_colloid_omp.cpp | 3 +- src/USER-OMP/pair_yukawa_omp.cpp | 3 +- src/USER-OMP/pair_zbl_omp.cpp | 3 +- src/USER-OMP/pppm_cg_omp.cpp | 19 +++++----- src/USER-OMP/pppm_disp_omp.cpp | 37 ++++++++++--------- src/USER-OMP/pppm_disp_tip4p_omp.cpp | 37 ++++++++++--------- src/USER-OMP/pppm_omp.cpp | 19 +++++----- src/USER-OMP/pppm_tip4p_omp.cpp | 19 +++++----- src/USER-OMP/reaxc_forces_omp.cpp | 3 +- src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp | 3 +- src/USER-OMP/respa_omp.cpp | 7 ++-- 220 files changed, 587 insertions(+), 367 deletions(-) diff --git a/src/MPIIO/dump_atom_mpiio.cpp b/src/MPIIO/dump_atom_mpiio.cpp index 2b663554cc..d59ed7bde8 100644 --- a/src/MPIIO/dump_atom_mpiio.cpp +++ b/src/MPIIO/dump_atom_mpiio.cpp @@ -15,6 +15,7 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "dump_atom_mpiio.h" #include #include @@ -587,7 +588,7 @@ int DumpAtomMPIIO::convert_image_omp(int n, double *mybuf) mpifh_buffer_line_per_thread[i] = (char *) malloc(DUMP_BUF_CHUNK_SIZE * sizeof(char)); mpifh_buffer_line_per_thread[i][0] = '\0'; -#pragma omp parallel default(none) shared(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf) { int tid = omp_get_thread_num(); int m=0; @@ -677,7 +678,7 @@ int DumpAtomMPIIO::convert_noimage_omp(int n, double *mybuf) mpifh_buffer_line_per_thread[i] = (char *) malloc(DUMP_BUF_CHUNK_SIZE * sizeof(char)); mpifh_buffer_line_per_thread[i][0] = '\0'; -#pragma omp parallel default(none) shared(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf) { int tid = omp_get_thread_num(); int m=0; diff --git a/src/MPIIO/dump_cfg_mpiio.cpp b/src/MPIIO/dump_cfg_mpiio.cpp index 31848b550c..18368db330 100644 --- a/src/MPIIO/dump_cfg_mpiio.cpp +++ b/src/MPIIO/dump_cfg_mpiio.cpp @@ -15,6 +15,7 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "dump_cfg_mpiio.h" #include #include @@ -365,7 +366,7 @@ int DumpCFGMPIIO::convert_string_omp(int n, double *mybuf) mpifh_buffer_line_per_thread[i] = (char *) malloc(DUMP_BUF_CHUNK_SIZE * sizeof(char)); mpifh_buffer_line_per_thread[i][0] = '\0'; -#pragma omp parallel default(none) shared(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf) { int tid = omp_get_thread_num(); int m=0; diff --git a/src/MPIIO/dump_custom_mpiio.cpp b/src/MPIIO/dump_custom_mpiio.cpp index dca5833c5b..526021d895 100644 --- a/src/MPIIO/dump_custom_mpiio.cpp +++ b/src/MPIIO/dump_custom_mpiio.cpp @@ -15,6 +15,7 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "dump_custom_mpiio.h" #include #include @@ -612,7 +613,7 @@ int DumpCustomMPIIO::convert_string_omp(int n, double *mybuf) mpifh_buffer_line_per_thread[i] = (char *) malloc(DUMP_BUF_CHUNK_SIZE * sizeof(char)); mpifh_buffer_line_per_thread[i][0] = '\0'; -#pragma omp parallel default(none) shared(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf) { int tid = omp_get_thread_num(); int m=0; diff --git a/src/MPIIO/dump_xyz_mpiio.cpp b/src/MPIIO/dump_xyz_mpiio.cpp index f5caab3a9c..a1e4f21a79 100644 --- a/src/MPIIO/dump_xyz_mpiio.cpp +++ b/src/MPIIO/dump_xyz_mpiio.cpp @@ -15,6 +15,7 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "dump_xyz_mpiio.h" #include #include @@ -350,7 +351,7 @@ int DumpXYZMPIIO::convert_string_omp(int n, double *mybuf) mpifh_buffer_line_per_thread[i] = (char *) malloc(DUMP_BUF_CHUNK_SIZE * sizeof(char)); mpifh_buffer_line_per_thread[i][0] = '\0'; -#pragma omp parallel default(none) shared(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(bufOffset, bufRange, bufLength, mpifhStringCountPerThread, mpifh_buffer_line_per_thread, mybuf) { int tid = omp_get_thread_num(); int m=0; diff --git a/src/USER-DIFFRACTION/compute_saed.cpp b/src/USER-DIFFRACTION/compute_saed.cpp index 7b5b2f4f5b..5dd47b28bd 100644 --- a/src/USER-DIFFRACTION/compute_saed.cpp +++ b/src/USER-DIFFRACTION/compute_saed.cpp @@ -15,6 +15,7 @@ Contributing authors: Shawn Coleman & Douglas Spearot (Arkansas) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "compute_saed.h" #include #include @@ -418,7 +419,7 @@ void ComputeSAED::compute_vector() double frac = 0.1; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(offset,ASFSAED,typelocal,xlocal,Fvec,m,frac) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(offset,ASFSAED,typelocal,xlocal,Fvec,m,frac) #endif { double *f = new double[ntypes]; // atomic structure factor by type diff --git a/src/USER-DIFFRACTION/compute_xrd.cpp b/src/USER-DIFFRACTION/compute_xrd.cpp index 7f69449282..e75546b548 100644 --- a/src/USER-DIFFRACTION/compute_xrd.cpp +++ b/src/USER-DIFFRACTION/compute_xrd.cpp @@ -16,6 +16,7 @@ Updated: 06/17/2015-2 ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "compute_xrd.h" #include #include @@ -353,7 +354,7 @@ void ComputeXRD::compute_array() double frac = 0.1; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(typelocal,xlocal,Fvec,m,frac,ASFXRD) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(typelocal,xlocal,Fvec,m,frac,ASFXRD) #endif { double *f = new double[ntypes]; // atomic structure factor by type diff --git a/src/USER-INTEL/angle_charmm_intel.cpp b/src/USER-INTEL/angle_charmm_intel.cpp index 43de50e7fa..9275e82f1c 100644 --- a/src/USER-INTEL/angle_charmm_intel.cpp +++ b/src/USER-INTEL/angle_charmm_intel.cpp @@ -15,6 +15,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "angle_charmm_intel.h" @@ -134,7 +135,7 @@ void AngleCharmmIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oeangle,ov0,ov1,ov2,ov3,ov4,ov5) #endif diff --git a/src/USER-INTEL/angle_harmonic_intel.cpp b/src/USER-INTEL/angle_harmonic_intel.cpp index d073e7bc56..49a71038da 100644 --- a/src/USER-INTEL/angle_harmonic_intel.cpp +++ b/src/USER-INTEL/angle_harmonic_intel.cpp @@ -15,6 +15,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "angle_harmonic_intel.h" @@ -134,7 +135,7 @@ void AngleHarmonicIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oeangle,ov0,ov1,ov2,ov3,ov4,ov5) #endif diff --git a/src/USER-INTEL/bond_fene_intel.cpp b/src/USER-INTEL/bond_fene_intel.cpp index 6578706a9b..5c58e7bf10 100644 --- a/src/USER-INTEL/bond_fene_intel.cpp +++ b/src/USER-INTEL/bond_fene_intel.cpp @@ -15,6 +15,7 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "bond_fene_intel.h" @@ -127,7 +128,7 @@ void BondFENEIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oebond,ov0,ov1,ov2,ov3,ov4,ov5) #endif diff --git a/src/USER-INTEL/bond_harmonic_intel.cpp b/src/USER-INTEL/bond_harmonic_intel.cpp index 55dda9fa15..8bf0a82218 100644 --- a/src/USER-INTEL/bond_harmonic_intel.cpp +++ b/src/USER-INTEL/bond_harmonic_intel.cpp @@ -15,6 +15,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "bond_harmonic_intel.h" @@ -127,7 +128,7 @@ void BondHarmonicIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oebond,ov0,ov1,ov2,ov3,ov4,ov5) #endif diff --git a/src/USER-INTEL/dihedral_charmm_intel.cpp b/src/USER-INTEL/dihedral_charmm_intel.cpp index 2ea4eb6d21..61fc1dfbd5 100644 --- a/src/USER-INTEL/dihedral_charmm_intel.cpp +++ b/src/USER-INTEL/dihedral_charmm_intel.cpp @@ -15,6 +15,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "dihedral_charmm_intel.h" @@ -148,7 +149,7 @@ void DihedralCharmmIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oevdwl,oecoul,oedihedral,ov0,ov1,ov2,ov3,ov4,ov5, \ opv0,opv1,opv2,opv3,opv4,opv5) @@ -522,7 +523,7 @@ void DihedralCharmmIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oevdwl,oecoul,oedihedral,ov0,ov1,ov2,ov3,ov4,ov5, \ opv0,opv1,opv2,opv3,opv4,opv5) diff --git a/src/USER-INTEL/dihedral_fourier_intel.cpp b/src/USER-INTEL/dihedral_fourier_intel.cpp index 8c4a2ce921..fb8051474e 100644 --- a/src/USER-INTEL/dihedral_fourier_intel.cpp +++ b/src/USER-INTEL/dihedral_fourier_intel.cpp @@ -15,6 +15,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "dihedral_fourier_intel.h" @@ -127,7 +128,7 @@ void DihedralFourierIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oedihedral,ov0,ov1,ov2,ov3,ov4,ov5) #endif diff --git a/src/USER-INTEL/dihedral_harmonic_intel.cpp b/src/USER-INTEL/dihedral_harmonic_intel.cpp index 60655f2618..f6c4ea0fde 100644 --- a/src/USER-INTEL/dihedral_harmonic_intel.cpp +++ b/src/USER-INTEL/dihedral_harmonic_intel.cpp @@ -15,6 +15,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "dihedral_harmonic_intel.h" @@ -127,7 +128,7 @@ void DihedralHarmonicIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oedihedral,ov0,ov1,ov2,ov3,ov4,ov5) #endif diff --git a/src/USER-INTEL/dihedral_opls_intel.cpp b/src/USER-INTEL/dihedral_opls_intel.cpp index 5b580cd7d9..79a8874a72 100644 --- a/src/USER-INTEL/dihedral_opls_intel.cpp +++ b/src/USER-INTEL/dihedral_opls_intel.cpp @@ -15,6 +15,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "dihedral_opls_intel.h" @@ -131,7 +132,7 @@ void DihedralOPLSIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oedihedral,ov0,ov1,ov2,ov3,ov4,ov5) #endif diff --git a/src/USER-INTEL/fix_intel.cpp b/src/USER-INTEL/fix_intel.cpp index 5ecae79b30..c62a6a432a 100644 --- a/src/USER-INTEL/fix_intel.cpp +++ b/src/USER-INTEL/fix_intel.cpp @@ -16,6 +16,7 @@ Anupama Kurpad (Intel) - Host Affinitization ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_intel.h" #include "comm.h" #include "error.h" @@ -220,7 +221,7 @@ FixIntel::FixIntel(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) comm->nthreads = nomp; } else { int nthreads; - #pragma omp parallel default(none) shared(nthreads) + #pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(nthreads) nthreads = omp_get_num_threads(); comm->nthreads = nthreads; } diff --git a/src/USER-INTEL/improper_cvff_intel.cpp b/src/USER-INTEL/improper_cvff_intel.cpp index f198e47d5c..4562c63cdb 100644 --- a/src/USER-INTEL/improper_cvff_intel.cpp +++ b/src/USER-INTEL/improper_cvff_intel.cpp @@ -15,6 +15,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include @@ -138,7 +139,7 @@ void ImproperCvffIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oeimproper,ov0,ov1,ov2,ov3,ov4,ov5) #endif diff --git a/src/USER-INTEL/improper_harmonic_intel.cpp b/src/USER-INTEL/improper_harmonic_intel.cpp index d638e6a66e..fc5cf08c52 100644 --- a/src/USER-INTEL/improper_harmonic_intel.cpp +++ b/src/USER-INTEL/improper_harmonic_intel.cpp @@ -15,6 +15,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include @@ -139,7 +140,7 @@ void ImproperHarmonicIntel::eval(const int vflag, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(f_start,f_stride,fc) \ reduction(+:oeimproper,ov0,ov1,ov2,ov3,ov4,ov5) #endif diff --git a/src/USER-INTEL/npair_intel.cpp b/src/USER-INTEL/npair_intel.cpp index 4256e03b3c..f7a233efc9 100644 --- a/src/USER-INTEL/npair_intel.cpp +++ b/src/USER-INTEL/npair_intel.cpp @@ -15,6 +15,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "comm.h" #include "domain.h" #include "timer.h" @@ -263,7 +264,7 @@ void NPairIntel::bin_newton(const int offload, NeighList *list, } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(overflow, nstencilp, binstart, binend) #endif { diff --git a/src/USER-INTEL/pppm_disp_intel.cpp b/src/USER-INTEL/pppm_disp_intel.cpp index fd1302da98..75fdc3b1df 100644 --- a/src/USER-INTEL/pppm_disp_intel.cpp +++ b/src/USER-INTEL/pppm_disp_intel.cpp @@ -15,6 +15,7 @@ Contributing authors: William McDoniel (RWTH Aachen University) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include @@ -729,7 +730,7 @@ void PPPMDispIntel::particle_map(double delx, double dely, double delz, int flag = 0; #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr, delx, dely, delz, sft, p2g, nup, nlow, nxlo,\ nylo, nzlo, nxhi, nyhi, nzhi) reduction(+:flag) if(!_use_lrt) #endif @@ -803,7 +804,7 @@ void PPPMDispIntel::make_rho_c(IntelBuffers * /*buffers*/) int nthr = comm->nthreads; #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nthr, nlocal, global_density) if(!_use_lrt) #endif { @@ -909,7 +910,7 @@ void PPPMDispIntel::make_rho_c(IntelBuffers * /*buffers*/) // reduce all the perthread_densities into global_density #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nthr, global_density) if(!_use_lrt) #endif { @@ -951,7 +952,7 @@ void PPPMDispIntel::make_rho_g(IntelBuffers * /*buffers*/) int nthr = comm->nthreads; #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nthr, nlocal, global_density) if(!_use_lrt) #endif { @@ -1059,7 +1060,7 @@ void PPPMDispIntel::make_rho_g(IntelBuffers * /*buffers*/) // reduce all the perthread_densities into global_density #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nthr, global_density) if(!_use_lrt) #endif { @@ -1234,7 +1235,7 @@ void PPPMDispIntel::make_rho_none(IntelBuffers * /*buffers*/) int nthr = comm->nthreads; #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nthr, nlocal, global_density) if(!_use_lrt) #endif { @@ -1343,7 +1344,7 @@ void PPPMDispIntel::make_rho_none(IntelBuffers * /*buffers*/) // reduce all the perthread_densities into global_density #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nthr, global_density) if(!_use_lrt) #endif { @@ -1386,7 +1387,7 @@ void PPPMDispIntel::fieldforce_c_ik(IntelBuffers * /*buffers*/) #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) if(!_use_lrt) #endif { @@ -1536,7 +1537,7 @@ void PPPMDispIntel::fieldforce_c_ad(IntelBuffers * /*buffers*/) FFT_SCALAR * _noalias const particle_ekz = this->particle_ekz; #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) if(!_use_lrt) #endif { @@ -1734,7 +1735,7 @@ void PPPMDispIntel::fieldforce_g_ik(IntelBuffers * /*buffers*/) #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) if(!_use_lrt) #endif { @@ -1881,7 +1882,7 @@ void PPPMDispIntel::fieldforce_g_ad(IntelBuffers * /*buffers*/) FFT_SCALAR * _noalias const particle_ekz = this->particle_ekz; #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) if(!_use_lrt) #endif { @@ -2078,7 +2079,7 @@ void PPPMDispIntel::fieldforce_a_ik(IntelBuffers * /*buffers*/) #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) if(!_use_lrt) #endif { @@ -2312,7 +2313,7 @@ void PPPMDispIntel::fieldforce_a_ad(IntelBuffers * /*buffers*/) FFT_SCALAR * _noalias const particle_ekz6 = this->particle_ekz6; #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) if(!_use_lrt) #endif { @@ -2603,7 +2604,7 @@ void PPPMDispIntel::fieldforce_none_ik(IntelBuffers * /*buffers*/) #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) if(!_use_lrt) #endif { @@ -2762,7 +2763,7 @@ void PPPMDispIntel::fieldforce_none_ad(IntelBuffers * /*buffers*/) int nthr = comm->nthreads; #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) if(!_use_lrt) #endif { diff --git a/src/USER-INTEL/pppm_intel.cpp b/src/USER-INTEL/pppm_intel.cpp index e3bf779cc1..d643da96b2 100644 --- a/src/USER-INTEL/pppm_intel.cpp +++ b/src/USER-INTEL/pppm_intel.cpp @@ -18,6 +18,7 @@ W. Michael Brown (Intel) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include @@ -372,7 +373,7 @@ void PPPMIntel::particle_map(IntelBuffers *buffers) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) reduction(+:flag) if(!_use_lrt) #endif { @@ -446,7 +447,7 @@ void PPPMIntel::make_rho(IntelBuffers *buffers) nthr = comm->nthreads; #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nthr, nlocal, global_density) if(!_use_lrt) #endif { @@ -549,7 +550,7 @@ void PPPMIntel::make_rho(IntelBuffers *buffers) // reduce all the perthread_densities into global_density if (nthr > 1) { #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nthr, global_density) if(!_use_lrt) #endif { @@ -598,7 +599,7 @@ void PPPMIntel::fieldforce_ik(IntelBuffers *buffers) } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) if(!_use_lrt) #endif { @@ -749,7 +750,7 @@ void PPPMIntel::fieldforce_ad(IntelBuffers *buffers) } #if defined(_OPENMP) - #pragma omp parallel default(none) \ + #pragma omp parallel LMP_DEFAULT_NONE \ shared(nlocal, nthr) if(!_use_lrt) #endif { diff --git a/src/USER-OMP/angle_charmm_omp.cpp b/src/USER-OMP/angle_charmm_omp.cpp index 116c937788..6933afdcd9 100644 --- a/src/USER-OMP/angle_charmm_omp.cpp +++ b/src/USER-OMP/angle_charmm_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_charmm_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleCharmmOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_class2_omp.cpp b/src/USER-OMP/angle_class2_omp.cpp index 9aab1d73b3..09ee59d5af 100644 --- a/src/USER-OMP/angle_class2_omp.cpp +++ b/src/USER-OMP/angle_class2_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_class2_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleClass2OMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_cosine_delta_omp.cpp b/src/USER-OMP/angle_cosine_delta_omp.cpp index 44326c124e..ca5afe1449 100644 --- a/src/USER-OMP/angle_cosine_delta_omp.cpp +++ b/src/USER-OMP/angle_cosine_delta_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_cosine_delta_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleCosineDeltaOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_cosine_omp.cpp b/src/USER-OMP/angle_cosine_omp.cpp index 3bfa2aa39c..48fdd9ba60 100644 --- a/src/USER-OMP/angle_cosine_omp.cpp +++ b/src/USER-OMP/angle_cosine_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_cosine_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleCosineOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_cosine_periodic_omp.cpp b/src/USER-OMP/angle_cosine_periodic_omp.cpp index 700179119c..a0e45fe131 100644 --- a/src/USER-OMP/angle_cosine_periodic_omp.cpp +++ b/src/USER-OMP/angle_cosine_periodic_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_cosine_periodic_omp.h" #include #include "atom.h" @@ -49,7 +50,7 @@ void AngleCosinePeriodicOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_cosine_shift_exp_omp.cpp b/src/USER-OMP/angle_cosine_shift_exp_omp.cpp index 1e37688425..21019336b3 100644 --- a/src/USER-OMP/angle_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/angle_cosine_shift_exp_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_cosine_shift_exp_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleCosineShiftExpOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_cosine_shift_omp.cpp b/src/USER-OMP/angle_cosine_shift_omp.cpp index 35b409edf1..1e6d712b62 100644 --- a/src/USER-OMP/angle_cosine_shift_omp.cpp +++ b/src/USER-OMP/angle_cosine_shift_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_cosine_shift_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleCosineShiftOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_cosine_squared_omp.cpp b/src/USER-OMP/angle_cosine_squared_omp.cpp index 9da5a0fce3..6df1e028a0 100644 --- a/src/USER-OMP/angle_cosine_squared_omp.cpp +++ b/src/USER-OMP/angle_cosine_squared_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_cosine_squared_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleCosineSquaredOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_dipole_omp.cpp b/src/USER-OMP/angle_dipole_omp.cpp index 33ec216f6a..26d8a7817e 100644 --- a/src/USER-OMP/angle_dipole_omp.cpp +++ b/src/USER-OMP/angle_dipole_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_dipole_omp.h" #include #include "atom.h" @@ -51,7 +52,7 @@ void AngleDipoleOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_fourier_omp.cpp b/src/USER-OMP/angle_fourier_omp.cpp index 64ff99e6c6..b6ddea3ff9 100644 --- a/src/USER-OMP/angle_fourier_omp.cpp +++ b/src/USER-OMP/angle_fourier_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_fourier_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleFourierOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_fourier_simple_omp.cpp b/src/USER-OMP/angle_fourier_simple_omp.cpp index 2ae8c5561d..992acf7c99 100644 --- a/src/USER-OMP/angle_fourier_simple_omp.cpp +++ b/src/USER-OMP/angle_fourier_simple_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_fourier_simple_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleFourierSimpleOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_harmonic_omp.cpp b/src/USER-OMP/angle_harmonic_omp.cpp index 66c0602396..0cfc6f95af 100644 --- a/src/USER-OMP/angle_harmonic_omp.cpp +++ b/src/USER-OMP/angle_harmonic_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_harmonic_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleHarmonicOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_quartic_omp.cpp b/src/USER-OMP/angle_quartic_omp.cpp index 903b0e4225..a774edb8c4 100644 --- a/src/USER-OMP/angle_quartic_omp.cpp +++ b/src/USER-OMP/angle_quartic_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_quartic_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleQuarticOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_sdk_omp.cpp b/src/USER-OMP/angle_sdk_omp.cpp index 3c8ee9cde8..e0bc021f1b 100644 --- a/src/USER-OMP/angle_sdk_omp.cpp +++ b/src/USER-OMP/angle_sdk_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_sdk_omp.h" #include #include "atom.h" @@ -49,7 +50,7 @@ void AngleSDKOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/angle_table_omp.cpp b/src/USER-OMP/angle_table_omp.cpp index de36d09980..1af60f85f6 100644 --- a/src/USER-OMP/angle_table_omp.cpp +++ b/src/USER-OMP/angle_table_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "angle_table_omp.h" #include #include "atom.h" @@ -47,7 +48,7 @@ void AngleTableOMP::compute(int eflag, int vflag) const int inum = neighbor->nanglelist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_class2_omp.cpp b/src/USER-OMP/bond_class2_omp.cpp index 9da50d1aa0..06edf46024 100644 --- a/src/USER-OMP/bond_class2_omp.cpp +++ b/src/USER-OMP/bond_class2_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_class2_omp.h" #include "atom.h" #include "comm.h" @@ -47,7 +48,7 @@ void BondClass2OMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_fene_expand_omp.cpp b/src/USER-OMP/bond_fene_expand_omp.cpp index a937cb6c34..5f3dd48841 100644 --- a/src/USER-OMP/bond_fene_expand_omp.cpp +++ b/src/USER-OMP/bond_fene_expand_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_fene_expand_omp.h" #include "atom.h" #include "comm.h" @@ -48,7 +49,7 @@ void BondFENEExpandOMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_fene_omp.cpp b/src/USER-OMP/bond_fene_omp.cpp index 3c653fedae..ebf5afdc57 100644 --- a/src/USER-OMP/bond_fene_omp.cpp +++ b/src/USER-OMP/bond_fene_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_fene_omp.h" #include "atom.h" #include "comm.h" @@ -48,7 +49,7 @@ void BondFENEOMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_gromos_omp.cpp b/src/USER-OMP/bond_gromos_omp.cpp index cedd5f96b7..e5eebfebfc 100644 --- a/src/USER-OMP/bond_gromos_omp.cpp +++ b/src/USER-OMP/bond_gromos_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_gromos_omp.h" #include "atom.h" #include "comm.h" @@ -44,7 +45,7 @@ void BondGromosOMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_harmonic_omp.cpp b/src/USER-OMP/bond_harmonic_omp.cpp index 4144f02a39..9160ee7023 100644 --- a/src/USER-OMP/bond_harmonic_omp.cpp +++ b/src/USER-OMP/bond_harmonic_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_harmonic_omp.h" #include "atom.h" #include "comm.h" @@ -46,7 +47,7 @@ void BondHarmonicOMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp b/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp index 10e4cdcd1c..7a6c616e4a 100644 --- a/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp +++ b/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_harmonic_shift_cut_omp.h" #include "atom.h" #include "comm.h" @@ -46,7 +47,7 @@ void BondHarmonicShiftCutOMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_harmonic_shift_omp.cpp b/src/USER-OMP/bond_harmonic_shift_omp.cpp index a0a7750890..19f0a08510 100644 --- a/src/USER-OMP/bond_harmonic_shift_omp.cpp +++ b/src/USER-OMP/bond_harmonic_shift_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_harmonic_shift_omp.h" #include "atom.h" #include "comm.h" @@ -46,7 +47,7 @@ void BondHarmonicShiftOMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_morse_omp.cpp b/src/USER-OMP/bond_morse_omp.cpp index 32361cb5de..90318c8faf 100644 --- a/src/USER-OMP/bond_morse_omp.cpp +++ b/src/USER-OMP/bond_morse_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_morse_omp.h" #include "atom.h" #include "comm.h" @@ -46,7 +47,7 @@ void BondMorseOMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_nonlinear_omp.cpp b/src/USER-OMP/bond_nonlinear_omp.cpp index f21772435f..809950f2b7 100644 --- a/src/USER-OMP/bond_nonlinear_omp.cpp +++ b/src/USER-OMP/bond_nonlinear_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_nonlinear_omp.h" #include "atom.h" #include "comm.h" @@ -46,7 +47,7 @@ void BondNonlinearOMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_quartic_omp.cpp b/src/USER-OMP/bond_quartic_omp.cpp index 46ee4ab96b..0efaa10e37 100644 --- a/src/USER-OMP/bond_quartic_omp.cpp +++ b/src/USER-OMP/bond_quartic_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_quartic_omp.h" #include "atom.h" #include "comm.h" @@ -52,7 +53,7 @@ void BondQuarticOMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/bond_table_omp.cpp b/src/USER-OMP/bond_table_omp.cpp index db1599fbcc..f503bcab26 100644 --- a/src/USER-OMP/bond_table_omp.cpp +++ b/src/USER-OMP/bond_table_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "bond_table_omp.h" #include "atom.h" #include "comm.h" @@ -46,7 +47,7 @@ void BondTableOMP::compute(int eflag, int vflag) const int inum = neighbor->nbondlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_charmm_omp.cpp b/src/USER-OMP/dihedral_charmm_omp.cpp index 242a0a1d86..afd3071434 100644 --- a/src/USER-OMP/dihedral_charmm_omp.cpp +++ b/src/USER-OMP/dihedral_charmm_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "dihedral_charmm_omp.h" #include #include "atom.h" @@ -56,7 +57,7 @@ void DihedralCharmmOMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_class2_omp.cpp b/src/USER-OMP/dihedral_class2_omp.cpp index 215677612b..49b8659e2f 100644 --- a/src/USER-OMP/dihedral_class2_omp.cpp +++ b/src/USER-OMP/dihedral_class2_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "dihedral_class2_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void DihedralClass2OMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp index f42121f8a9..cea22adf1b 100644 --- a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "dihedral_cosine_shift_exp_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void DihedralCosineShiftExpOMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_fourier_omp.cpp b/src/USER-OMP/dihedral_fourier_omp.cpp index cd12b3630e..756931774a 100644 --- a/src/USER-OMP/dihedral_fourier_omp.cpp +++ b/src/USER-OMP/dihedral_fourier_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "dihedral_fourier_omp.h" #include #include "atom.h" @@ -49,7 +50,7 @@ void DihedralFourierOMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_harmonic_omp.cpp b/src/USER-OMP/dihedral_harmonic_omp.cpp index c3adb113e2..d1f511954e 100644 --- a/src/USER-OMP/dihedral_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_harmonic_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "dihedral_harmonic_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void DihedralHarmonicOMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_helix_omp.cpp b/src/USER-OMP/dihedral_helix_omp.cpp index b38ff2739a..5289fc2c62 100644 --- a/src/USER-OMP/dihedral_helix_omp.cpp +++ b/src/USER-OMP/dihedral_helix_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "dihedral_helix_omp.h" #include "atom.h" @@ -53,7 +54,7 @@ void DihedralHelixOMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp index 7b79a63722..edf8a20899 100644 --- a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "dihedral_multi_harmonic_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void DihedralMultiHarmonicOMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_nharmonic_omp.cpp b/src/USER-OMP/dihedral_nharmonic_omp.cpp index f3d8471c95..bf51a01713 100644 --- a/src/USER-OMP/dihedral_nharmonic_omp.cpp +++ b/src/USER-OMP/dihedral_nharmonic_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "dihedral_nharmonic_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void DihedralNHarmonicOMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_opls_omp.cpp b/src/USER-OMP/dihedral_opls_omp.cpp index 24cc4cd064..8814d3f3f0 100644 --- a/src/USER-OMP/dihedral_opls_omp.cpp +++ b/src/USER-OMP/dihedral_opls_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "dihedral_opls_omp.h" #include "atom.h" @@ -51,7 +52,7 @@ void DihedralOPLSOMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_quadratic_omp.cpp b/src/USER-OMP/dihedral_quadratic_omp.cpp index 6f82c1e6b0..e61c5f0d85 100644 --- a/src/USER-OMP/dihedral_quadratic_omp.cpp +++ b/src/USER-OMP/dihedral_quadratic_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "dihedral_quadratic_omp.h" #include "atom.h" @@ -51,7 +52,7 @@ void DihedralQuadraticOMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/dihedral_table_omp.cpp b/src/USER-OMP/dihedral_table_omp.cpp index a760fc6094..bf5332a1c1 100644 --- a/src/USER-OMP/dihedral_table_omp.cpp +++ b/src/USER-OMP/dihedral_table_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "dihedral_table_omp.h" #include #include "atom.h" @@ -113,7 +114,7 @@ void DihedralTableOMP::compute(int eflag, int vflag) const int inum = neighbor->ndihedrallist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/domain_omp.cpp b/src/USER-OMP/domain_omp.cpp index 18d2a587ca..dfd3d3590f 100644 --- a/src/USER-OMP/domain_omp.cpp +++ b/src/USER-OMP/domain_omp.cpp @@ -15,6 +15,7 @@ Contributing author : Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "accelerator_omp.h" #include "atom.h" @@ -45,7 +46,7 @@ void DomainOMP::pbc() const int nlocal = atom->nlocal; #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { imageint idim,otherdims; @@ -143,7 +144,7 @@ void DomainOMP::lamda2x(int n) const int num = n; #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < num; i++) { x[i].x = h[0]*x[i].x + h[5]*x[i].y + h[4]*x[i].z + boxlo[0]; @@ -163,7 +164,7 @@ void DomainOMP::x2lamda(int n) const int num = n; #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < num; i++) { double delta0 = x[i].x - boxlo[0]; diff --git a/src/USER-OMP/ewald_omp.cpp b/src/USER-OMP/ewald_omp.cpp index a539394f69..fd776e46a6 100644 --- a/src/USER-OMP/ewald_omp.cpp +++ b/src/USER-OMP/ewald_omp.cpp @@ -15,6 +15,7 @@ Contributing authors: Roy Pollock (LLNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "ewald_omp.h" #include #include @@ -104,7 +105,7 @@ void EwaldOMP::compute(int eflag, int vflag) v0=v1=v2=v3=v4=v5=0.0; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) reduction(+:eng_tmp,v0,v1,v2,v3,v4,v5) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) reduction(+:eng_tmp,v0,v1,v2,v3,v4,v5) #endif { @@ -234,7 +235,7 @@ void EwaldOMP::eik_dot_r() const int nthreads = comm->nthreads; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { int i,ifrom,ito,k,l,m,n,ic,tid; diff --git a/src/USER-OMP/fix_gravity_omp.cpp b/src/USER-OMP/fix_gravity_omp.cpp index 5bc1085f34..830fa0c4eb 100644 --- a/src/USER-OMP/fix_gravity_omp.cpp +++ b/src/USER-OMP/fix_gravity_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_gravity_omp.h" #include "atom.h" #include "update.h" @@ -69,7 +70,7 @@ void FixGravityOMP::post_force(int /* vflag */) if (rmass) { #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(-:grav) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(-:grav) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -81,7 +82,7 @@ void FixGravityOMP::post_force(int /* vflag */) } } else { #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(-:grav) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(-:grav) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { diff --git a/src/USER-OMP/fix_neigh_history_omp.cpp b/src/USER-OMP/fix_neigh_history_omp.cpp index 22d3fa944c..7acded0ab2 100644 --- a/src/USER-OMP/fix_neigh_history_omp.cpp +++ b/src/USER-OMP/fix_neigh_history_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_neigh_history_omp.h" #include #include "my_page.h" @@ -73,7 +74,7 @@ void FixNeighHistoryOMP::pre_exchange_onesided() maxpartner = 0; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { @@ -199,7 +200,7 @@ void FixNeighHistoryOMP::pre_exchange_newton() for (int i = 0; i < nall_neigh; i++) npartner[i] = 0; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { @@ -373,7 +374,7 @@ void FixNeighHistoryOMP::pre_exchange_no_newton() maxpartner = 0; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { @@ -525,7 +526,7 @@ void FixNeighHistoryOMP::post_neighbor() #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { diff --git a/src/USER-OMP/fix_nh_asphere_omp.cpp b/src/USER-OMP/fix_nh_asphere_omp.cpp index 185eab5f47..9c7317bebd 100644 --- a/src/USER-OMP/fix_nh_asphere_omp.cpp +++ b/src/USER-OMP/fix_nh_asphere_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include @@ -82,7 +83,7 @@ void FixNHAsphereOMP::nve_v() // merged with FixNHOMP instead of calling it for the COM update. #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -122,7 +123,7 @@ void FixNHAsphereOMP::nve_x() // principal moments of inertia #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -163,7 +164,7 @@ void FixNHAsphereOMP::nh_v_temp() if (which == NOBIAS) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -177,7 +178,7 @@ void FixNHAsphereOMP::nh_v_temp() } } else if (which == BIAS) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { double buf[3]; diff --git a/src/USER-OMP/fix_nh_omp.cpp b/src/USER-OMP/fix_nh_omp.cpp index d584bcd11f..b30169b2dc 100644 --- a/src/USER-OMP/fix_nh_omp.cpp +++ b/src/USER-OMP/fix_nh_omp.cpp @@ -15,6 +15,7 @@ Contributing authors: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_nh_omp.h" #include #include "atom.h" @@ -57,7 +58,7 @@ void FixNHOMP::remap() if (allremap) domain->x2lamda(nlocal); else { #if defined (_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & dilate_group_bit) @@ -207,7 +208,7 @@ void FixNHOMP::remap() if (allremap) domain->lamda2x(nlocal); else { #if defined (_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & dilate_group_bit) @@ -235,7 +236,7 @@ void FixNHOMP::nh_v_press() if (which == NOBIAS) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -253,7 +254,7 @@ void FixNHOMP::nh_v_press() } } else if (which == BIAS) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { double buf[3]; @@ -289,7 +290,7 @@ void FixNHOMP::nve_v() if (atom->rmass) { const double * _noalias const rmass = atom->rmass; #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -303,7 +304,7 @@ void FixNHOMP::nve_v() const double *_noalias const mass = atom->mass; const int * _noalias const type = atom->type; #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -330,7 +331,7 @@ void FixNHOMP::nve_x() // x update by full step only for atoms in group #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -352,7 +353,7 @@ void FixNHOMP::nh_v_temp() if (which == NOBIAS) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -363,7 +364,7 @@ void FixNHOMP::nh_v_temp() } } else if (which == BIAS) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { double buf[3]; diff --git a/src/USER-OMP/fix_nh_sphere_omp.cpp b/src/USER-OMP/fix_nh_sphere_omp.cpp index 0048ae7ff7..dd9a8addf4 100644 --- a/src/USER-OMP/fix_nh_sphere_omp.cpp +++ b/src/USER-OMP/fix_nh_sphere_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_nh_sphere_omp.h" #include "atom.h" #include "compute.h" @@ -85,7 +86,7 @@ void FixNHSphereOMP::nve_v() // 4 cases depending on radius vs shape and rmass vs mass #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -115,7 +116,7 @@ void FixNHSphereOMP::nh_v_temp() if (which == NOBIAS) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -129,7 +130,7 @@ void FixNHSphereOMP::nh_v_temp() } } else if (which == BIAS) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) { double buf[3]; diff --git a/src/USER-OMP/fix_nve_omp.cpp b/src/USER-OMP/fix_nve_omp.cpp index f693c2fa20..13c1dfb642 100644 --- a/src/USER-OMP/fix_nve_omp.cpp +++ b/src/USER-OMP/fix_nve_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_nve_omp.h" #include "atom.h" @@ -41,7 +42,7 @@ void FixNVEOMP::initial_integrate(int /* vflag */) if (atom->rmass) { const double * const rmass = atom->rmass; #if defined (_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -58,7 +59,7 @@ void FixNVEOMP::initial_integrate(int /* vflag */) const double * const mass = atom->mass; const int * const type = atom->type; #if defined (_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -87,7 +88,7 @@ void FixNVEOMP::final_integrate() if (atom->rmass) { const double * const rmass = atom->rmass; #if defined (_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { @@ -101,7 +102,7 @@ void FixNVEOMP::final_integrate() const double * const mass = atom->mass; const int * const type = atom->type; #if defined (_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { diff --git a/src/USER-OMP/fix_nve_sphere_omp.cpp b/src/USER-OMP/fix_nve_sphere_omp.cpp index bc7be4019c..4a1bd4dfda 100644 --- a/src/USER-OMP/fix_nve_sphere_omp.cpp +++ b/src/USER-OMP/fix_nve_sphere_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_nve_sphere_omp.h" #include #include "atom.h" @@ -49,7 +50,7 @@ void FixNVESphereOMP::initial_integrate(int /* vflag */) // update v,x,omega for all particles // d_omega/dt = torque / inertia #if defined(_OPENMP) -#pragma omp parallel for default(none) +#pragma omp parallel for LMP_DEFAULT_NONE #endif for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -76,7 +77,7 @@ void FixNVESphereOMP::initial_integrate(int /* vflag */) double * const * const mu = atom->mu; if (dlm == NODLM) { #if defined(_OPENMP) -#pragma omp parallel for default(none) +#pragma omp parallel for LMP_DEFAULT_NONE #endif for (int i = 0; i < nlocal; i++) { double g0,g1,g2,msq,scale; @@ -95,7 +96,7 @@ void FixNVESphereOMP::initial_integrate(int /* vflag */) } } else { #if defined(_OPENMP) -#pragma omp parallel for default(none) +#pragma omp parallel for LMP_DEFAULT_NONE #endif // Integrate orientation following Dullweber-Leimkuhler-Maclachlan scheme for (int i = 0; i < nlocal; i++) { @@ -223,7 +224,7 @@ void FixNVESphereOMP::final_integrate() // d_omega/dt = torque / inertia #if defined(_OPENMP) -#pragma omp parallel for default(none) +#pragma omp parallel for LMP_DEFAULT_NONE #endif for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { diff --git a/src/USER-OMP/fix_nvt_sllod_omp.cpp b/src/USER-OMP/fix_nvt_sllod_omp.cpp index 9b3b515415..0d23d6c03f 100644 --- a/src/USER-OMP/fix_nvt_sllod_omp.cpp +++ b/src/USER-OMP/fix_nvt_sllod_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_nvt_sllod_omp.h" #include #include "math_extra.h" @@ -114,7 +115,7 @@ void FixNVTSllodOMP::nh_v_temp() MathExtra::multiply_shape_shape(domain->h_rate,domain->h_inv,h_two); #if defined(_OPENMP) -#pragma omp parallel for default(none) shared(h_two) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE LMP_SHARED(h_two) schedule(static) #endif for (int i = 0; i < nlocal; i++) { double vdelu0,vdelu1,vdelu2,buf[3]; diff --git a/src/USER-OMP/fix_omp.cpp b/src/USER-OMP/fix_omp.cpp index 1fca1e739b..25a3a09816 100644 --- a/src/USER-OMP/fix_omp.cpp +++ b/src/USER-OMP/fix_omp.cpp @@ -16,6 +16,7 @@ OpenMP based threading support for LAMMPS ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "atom.h" #include "comm.h" #include "error.h" @@ -70,7 +71,7 @@ FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg) if (narg > 3) { #if defined(_OPENMP) if (strcmp(arg[3],"0") == 0) -#pragma omp parallel default(none) shared(nthreads) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(nthreads) nthreads = omp_get_num_threads(); else nthreads = force->inumeric(FLERR,arg[3]); @@ -134,7 +135,7 @@ FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg) thr = new ThrData *[nthreads]; _nthr = nthreads; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(lmp) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(lmp) #endif { const int tid = get_tid(); @@ -186,7 +187,7 @@ void FixOMP::init() thr = new ThrData *[nthreads]; _nthr = nthreads; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { const int tid = get_tid(); @@ -350,7 +351,7 @@ void FixOMP::pre_force(int) double *drho = atom->drho; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(f,torque,erforce,de,drho) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(f,torque,erforce,de,drho) #endif { const int tid = get_tid(); diff --git a/src/USER-OMP/fix_rigid_nh_omp.cpp b/src/USER-OMP/fix_rigid_nh_omp.cpp index da512cb428..63084fcc9e 100644 --- a/src/USER-OMP/fix_rigid_nh_omp.cpp +++ b/src/USER-OMP/fix_rigid_nh_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_rigid_nh_omp.h" #include #include @@ -89,7 +90,7 @@ void FixRigidNHOMP::initial_integrate(int vflag) double akt=0.0, akr=0.0; #if defined(_OPENMP) -#pragma omp parallel for default(none) shared(scale_r,scale_t,scale_v) schedule(static) reduction(+:akt,akr) +#pragma omp parallel for LMP_DEFAULT_NONE LMP_SHARED(scale_r,scale_t,scale_v) schedule(static) reduction(+:akt,akr) #endif for (int ibody = 0; ibody < nbody; ibody++) { double mbody[3],tbody[3],fquat[4]; @@ -250,7 +251,7 @@ void FixRigidNHOMP::compute_forces_and_torques() int i; #if defined(_OPENMP) -#pragma omp parallel for default(none) private(i) reduction(+:s0,s1,s2,s3,s4,s5) +#pragma omp parallel for LMP_DEFAULT_NONE private(i) reduction(+:s0,s1,s2,s3,s4,s5) #endif for (i = 0; i < nlocal; i++) { const int ibody = body[i]; @@ -289,7 +290,7 @@ void FixRigidNHOMP::compute_forces_and_torques() int i; #if defined(_OPENMP) -#pragma omp parallel for default(none) private(i) shared(ib) reduction(+:s0,s1,s2,s3,s4,s5) +#pragma omp parallel for LMP_DEFAULT_NONE private(i) LMP_SHARED(ib) reduction(+:s0,s1,s2,s3,s4,s5) #endif for (i = 0; i < nlocal; i++) { const int ibody = body[i]; @@ -330,7 +331,7 @@ void FixRigidNHOMP::compute_forces_and_torques() memset(&sum[0][0],0,6*nbody*sizeof(double)); #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -373,7 +374,7 @@ void FixRigidNHOMP::compute_forces_and_torques() MPI_Allreduce(sum[0],all[0],6*nbody,MPI_DOUBLE,MPI_SUM,world); #if defined(_OPENMP) -#pragma omp parallel for default(none) private(ibody) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE private(ibody) schedule(static) #endif for (ibody = 0; ibody < nbody; ibody++) { fcm[ibody][0] = all[ibody][0] + langextra[ibody][0]; @@ -388,7 +389,7 @@ void FixRigidNHOMP::compute_forces_and_torques() if (id_gravity) { #if defined(_OPENMP) -#pragma omp parallel for default(none) private(ibody) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE private(ibody) schedule(static) #endif for (ibody = 0; ibody < nbody; ibody++) { fcm[ibody][0] += gvec[0]*masstotal[ibody]; @@ -433,7 +434,7 @@ void FixRigidNHOMP::final_integrate() const double dtf2 = dtf * 2.0; #if defined(_OPENMP) -#pragma omp parallel for default(none) shared(scale_t,scale_r) schedule(static) reduction(+:akt,akr) +#pragma omp parallel for LMP_DEFAULT_NONE LMP_SHARED(scale_t,scale_r) schedule(static) reduction(+:akt,akr) #endif for (int ibody = 0; ibody < nbody; ibody++) { double mbody[3],tbody[3],fquat[4]; @@ -554,7 +555,7 @@ void FixRigidNHOMP::remap() if (allremap) domain->x2lamda(nlocal); else { #if defined (_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & dilate_group_bit) @@ -586,7 +587,7 @@ void FixRigidNHOMP::remap() if (allremap) domain->lamda2x(nlocal); else { #if defined (_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int i = 0; i < nlocal; i++) if (mask[i] & dilate_group_bit) @@ -631,7 +632,7 @@ void FixRigidNHOMP::set_xv_thr() int i; #if defined(_OPENMP) -#pragma omp parallel for default(none) private(i) reduction(+:v0,v1,v2,v3,v4,v5) +#pragma omp parallel for LMP_DEFAULT_NONE private(i) reduction(+:v0,v1,v2,v3,v4,v5) #endif for (i = 0; i < nlocal; i++) { const int ibody = body[i]; @@ -832,7 +833,7 @@ void FixRigidNHOMP::set_v_thr() int i; #if defined(_OPENMP) -#pragma omp parallel for default(none) private(i) reduction(+:v0,v1,v2,v3,v4,v5) +#pragma omp parallel for LMP_DEFAULT_NONE private(i) reduction(+:v0,v1,v2,v3,v4,v5) #endif for (i = 0; i < nlocal; i++) { const int ibody = body[i]; diff --git a/src/USER-OMP/fix_rigid_omp.cpp b/src/USER-OMP/fix_rigid_omp.cpp index 770361d557..9f78f6dc26 100644 --- a/src/USER-OMP/fix_rigid_omp.cpp +++ b/src/USER-OMP/fix_rigid_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_rigid_omp.h" #include #include @@ -47,7 +48,7 @@ typedef struct { double x,y,z; } dbl3_t; void FixRigidOMP::initial_integrate(int vflag) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int ibody = 0; ibody < nbody; ibody++) { @@ -120,7 +121,7 @@ void FixRigidOMP::compute_forces_and_torques() double s0=0.0,s1=0.0,s2=0.0,s3=0.0,s4=0.0,s5=0.0; #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(+:s0,s1,s2,s3,s4,s5) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:s0,s1,s2,s3,s4,s5) #endif for (int i = 0; i < nlocal; i++) { const int ibody = body[i]; @@ -158,7 +159,7 @@ void FixRigidOMP::compute_forces_and_torques() double s0=0.0,s1=0.0,s2=0.0,s3=0.0,s4=0.0,s5=0.0; #if defined(_OPENMP) -#pragma omp parallel for default(none) shared(ib) reduction(+:s0,s1,s2,s3,s4,s5) +#pragma omp parallel for LMP_DEFAULT_NONE LMP_SHARED(ib) reduction(+:s0,s1,s2,s3,s4,s5) #endif for (int i = 0; i < nlocal; i++) { const int ibody = body[i]; @@ -199,7 +200,7 @@ void FixRigidOMP::compute_forces_and_torques() memset(&sum[0][0],0,6*nbody*sizeof(double)); #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -246,7 +247,7 @@ void FixRigidOMP::compute_forces_and_torques() // fflag,tflag = 0 for some dimensions in 2d #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int ibody = 0; ibody < nbody; ibody++) { fcm[ibody][0] = all[ibody][0] + langextra[ibody][0]; @@ -261,7 +262,7 @@ void FixRigidOMP::compute_forces_and_torques() if (id_gravity) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int ibody = 0; ibody < nbody; ibody++) { fcm[ibody][0] += gvec[0]*masstotal[ibody]; @@ -280,7 +281,7 @@ void FixRigidOMP::final_integrate() // update vcm and angmom #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int ibody = 0; ibody < nbody; ibody++) { @@ -346,7 +347,7 @@ void FixRigidOMP::set_xv_thr() const int nlocal = atom->nlocal; #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(+:v0,v1,v2,v3,v4,v5) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:v0,v1,v2,v3,v4,v5) #endif for (int i = 0; i < nlocal; i++) { const int ibody = body[i]; @@ -546,7 +547,7 @@ void FixRigidOMP::set_v_thr() const int nlocal = atom->nlocal; #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(+:v0,v1,v2,v3,v4,v5) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:v0,v1,v2,v3,v4,v5) #endif for (int i = 0; i < nlocal; i++) { const int ibody = body[i]; diff --git a/src/USER-OMP/fix_rigid_small_omp.cpp b/src/USER-OMP/fix_rigid_small_omp.cpp index fc6b6fa57a..227b0e1f8a 100644 --- a/src/USER-OMP/fix_rigid_small_omp.cpp +++ b/src/USER-OMP/fix_rigid_small_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "fix_rigid_small_omp.h" #include #include "atom.h" @@ -46,7 +47,7 @@ void FixRigidSmallOMP::initial_integrate(int vflag) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int ibody = 0; ibody < nlocal_body; ibody++) { @@ -117,7 +118,7 @@ void FixRigidSmallOMP::compute_forces_and_torques() const int nthreads=comm->nthreads; #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int ibody = 0; ibody < nlocal_body+nghost_body; ibody++) { double * _noalias const fcm = body[ibody].fcm; @@ -132,7 +133,7 @@ void FixRigidSmallOMP::compute_forces_and_torques() // and then each thread only processes some bodies. #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -183,7 +184,7 @@ void FixRigidSmallOMP::compute_forces_and_torques() if (langflag) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int ibody = 0; ibody < nlocal_body; ibody++) { double * _noalias const fcm = body[ibody].fcm; @@ -201,7 +202,7 @@ void FixRigidSmallOMP::compute_forces_and_torques() if (id_gravity) { #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int ibody = 0; ibody < nbody; ibody++) { double * _noalias const fcm = body[ibody].fcm; @@ -222,7 +223,7 @@ void FixRigidSmallOMP::final_integrate() // update vcm and angmom, recompute omega #if defined(_OPENMP) -#pragma omp parallel for default(none) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE schedule(static) #endif for (int ibody = 0; ibody < nlocal_body; ibody++) { Body &b = body[ibody]; @@ -294,7 +295,7 @@ void FixRigidSmallOMP::set_xv_thr() const int nlocal = atom->nlocal; #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(+:v0,v1,v2,v3,v4,v5) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:v0,v1,v2,v3,v4,v5) #endif for (int i = 0; i < nlocal; i++) { const int ibody = atom2body[i]; @@ -489,7 +490,7 @@ void FixRigidSmallOMP::set_v_thr() const int nlocal = atom->nlocal; #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(+:v0,v1,v2,v3,v4,v5) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:v0,v1,v2,v3,v4,v5) #endif for (int i = 0; i < nlocal; i++) { const int ibody = atom2body[i]; diff --git a/src/USER-OMP/improper_class2_omp.cpp b/src/USER-OMP/improper_class2_omp.cpp index 32c7406ada..8927980951 100644 --- a/src/USER-OMP/improper_class2_omp.cpp +++ b/src/USER-OMP/improper_class2_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "improper_class2_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void ImproperClass2OMP::compute(int eflag, int vflag) const int inum = neighbor->nimproperlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/improper_cossq_omp.cpp b/src/USER-OMP/improper_cossq_omp.cpp index 230f13eac7..72d76e8c42 100644 --- a/src/USER-OMP/improper_cossq_omp.cpp +++ b/src/USER-OMP/improper_cossq_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "improper_cossq_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void ImproperCossqOMP::compute(int eflag, int vflag) const int inum = neighbor->nimproperlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/improper_cvff_omp.cpp b/src/USER-OMP/improper_cvff_omp.cpp index f5ff590775..e9ff4bfc73 100644 --- a/src/USER-OMP/improper_cvff_omp.cpp +++ b/src/USER-OMP/improper_cvff_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "improper_cvff_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void ImproperCvffOMP::compute(int eflag, int vflag) const int inum = neighbor->nimproperlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/improper_fourier_omp.cpp b/src/USER-OMP/improper_fourier_omp.cpp index 4e83c025d0..0671bdc375 100644 --- a/src/USER-OMP/improper_fourier_omp.cpp +++ b/src/USER-OMP/improper_fourier_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "improper_fourier_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void ImproperFourierOMP::compute(int eflag, int vflag) const int inum = neighbor->nimproperlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/improper_harmonic_omp.cpp b/src/USER-OMP/improper_harmonic_omp.cpp index f2f19557d9..8bef42bf23 100644 --- a/src/USER-OMP/improper_harmonic_omp.cpp +++ b/src/USER-OMP/improper_harmonic_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "improper_harmonic_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void ImproperHarmonicOMP::compute(int eflag, int vflag) const int inum = neighbor->nimproperlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/improper_ring_omp.cpp b/src/USER-OMP/improper_ring_omp.cpp index 1d0cc6cc46..4ba67aab70 100644 --- a/src/USER-OMP/improper_ring_omp.cpp +++ b/src/USER-OMP/improper_ring_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "improper_ring_omp.h" #include #include "atom.h" @@ -50,7 +51,7 @@ void ImproperRingOMP::compute(int eflag, int vflag) const int inum = neighbor->nimproperlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/improper_umbrella_omp.cpp b/src/USER-OMP/improper_umbrella_omp.cpp index 4cea8a4b63..bf466afb19 100644 --- a/src/USER-OMP/improper_umbrella_omp.cpp +++ b/src/USER-OMP/improper_umbrella_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "improper_umbrella_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void ImproperUmbrellaOMP::compute(int eflag, int vflag) const int inum = neighbor->nimproperlist; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/msm_cg_omp.cpp b/src/USER-OMP/msm_cg_omp.cpp index 7ca01dbd6a..16db4857d6 100644 --- a/src/USER-OMP/msm_cg_omp.cpp +++ b/src/USER-OMP/msm_cg_omp.cpp @@ -16,6 +16,7 @@ Original MSM class by: Paul Crozier, Stan Moore, Stephen Bond, (all SNL) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "msm_cg_omp.h" #include #include @@ -310,7 +311,7 @@ void MSMCGOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { #if defined(_OPENMP) diff --git a/src/USER-OMP/msm_omp.cpp b/src/USER-OMP/msm_omp.cpp index 81f84e8f6f..2689226725 100644 --- a/src/USER-OMP/msm_omp.cpp +++ b/src/USER-OMP/msm_omp.cpp @@ -15,6 +15,7 @@ Contributing authors: Axel Kohlmeyer (Temple U), Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "msm_omp.h" #include #include "comm.h" @@ -52,7 +53,7 @@ void MSMOMP::compute(int eflag, int vflag) MSM::compute(eflag,vflag); #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { #if defined(_OPENMP) @@ -158,7 +159,7 @@ void MSMOMP::direct_eval(const int nn) const int n=nn; #if defined(_OPENMP) -#pragma omp parallel default(none) reduction(+:v0,v1,v2,v3,v4,v5,emsm) +#pragma omp parallel LMP_DEFAULT_NONE reduction(+:v0,v1,v2,v3,v4,v5,emsm) #endif { double esum,v0sum,v1sum,v2sum,v3sum,v4sum,v5sum; diff --git a/src/USER-OMP/npair_full_bin_atomonly_omp.cpp b/src/USER-OMP/npair_full_bin_atomonly_omp.cpp index 3bda2e4c5a..226b2dcf6d 100644 --- a/src/USER-OMP/npair_full_bin_atomonly_omp.cpp +++ b/src/USER-OMP/npair_full_bin_atomonly_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_full_bin_atomonly_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -36,7 +37,7 @@ void NPairFullBinAtomonlyOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_full_bin_ghost_omp.cpp b/src/USER-OMP/npair_full_bin_ghost_omp.cpp index b0b0070df5..e9297538d9 100644 --- a/src/USER-OMP/npair_full_bin_ghost_omp.cpp +++ b/src/USER-OMP/npair_full_bin_ghost_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_full_bin_ghost_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -42,7 +43,7 @@ void NPairFullBinGhostOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nall); diff --git a/src/USER-OMP/npair_full_bin_omp.cpp b/src/USER-OMP/npair_full_bin_omp.cpp index d3e30b4932..35835cae1d 100644 --- a/src/USER-OMP/npair_full_bin_omp.cpp +++ b/src/USER-OMP/npair_full_bin_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_full_bin_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -40,7 +41,7 @@ void NPairFullBinOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_full_multi_omp.cpp b/src/USER-OMP/npair_full_multi_omp.cpp index 707db2edcf..b4b0ea3033 100644 --- a/src/USER-OMP/npair_full_multi_omp.cpp +++ b/src/USER-OMP/npair_full_multi_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_full_multi_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -41,7 +42,7 @@ void NPairFullMultiOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_full_nsq_ghost_omp.cpp b/src/USER-OMP/npair_full_nsq_ghost_omp.cpp index 527df58fd6..8b940f3724 100644 --- a/src/USER-OMP/npair_full_nsq_ghost_omp.cpp +++ b/src/USER-OMP/npair_full_nsq_ghost_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_full_nsq_ghost_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -42,7 +43,7 @@ void NPairFullNsqGhostOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nall); diff --git a/src/USER-OMP/npair_full_nsq_omp.cpp b/src/USER-OMP/npair_full_nsq_omp.cpp index 2719f5dc2c..95c5caa148 100644 --- a/src/USER-OMP/npair_full_nsq_omp.cpp +++ b/src/USER-OMP/npair_full_nsq_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_full_nsq_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -42,7 +43,7 @@ void NPairFullNsqOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp b/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp index a69779d96d..230d10a267 100644 --- a/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp +++ b/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_bin_atomonly_newton_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -37,7 +38,7 @@ void NPairHalfBinAtomonlyNewtonOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp b/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp index 5f8ffdab29..33fa4ed685 100644 --- a/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_bin_newtoff_ghost_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -46,7 +47,7 @@ void NPairHalfBinNewtoffGhostOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nall); diff --git a/src/USER-OMP/npair_half_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_bin_newtoff_omp.cpp index 35807645cf..8e756d5072 100644 --- a/src/USER-OMP/npair_half_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newtoff_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_bin_newtoff_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -42,7 +43,7 @@ void NPairHalfBinNewtoffOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_bin_newton_omp.cpp b/src/USER-OMP/npair_half_bin_newton_omp.cpp index 2700d6863b..e27a58de46 100644 --- a/src/USER-OMP/npair_half_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newton_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_bin_newton_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -41,7 +42,7 @@ void NPairHalfBinNewtonOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp index d94845898c..f88df4aed4 100644 --- a/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_bin_newton_tri_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -41,7 +42,7 @@ void NPairHalfBinNewtonTriOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_multi_newtoff_omp.cpp b/src/USER-OMP/npair_half_multi_newtoff_omp.cpp index c06737dc1c..586809c174 100644 --- a/src/USER-OMP/npair_half_multi_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_multi_newtoff_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_multi_newtoff_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -43,7 +44,7 @@ void NPairHalfMultiNewtoffOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_multi_newton_omp.cpp b/src/USER-OMP/npair_half_multi_newton_omp.cpp index 50df756be4..9b8fc78f09 100644 --- a/src/USER-OMP/npair_half_multi_newton_omp.cpp +++ b/src/USER-OMP/npair_half_multi_newton_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_multi_newton_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -42,7 +43,7 @@ void NPairHalfMultiNewtonOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp b/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp index 8b78b311dd..fec687d075 100644 --- a/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_multi_newton_tri_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -43,7 +44,7 @@ void NPairHalfMultiNewtonTriOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp b/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp index f0eb211425..316c63d541 100644 --- a/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp +++ b/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_nsq_newtoff_ghost_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -47,7 +48,7 @@ void NPairHalfNsqNewtoffGhostOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nall); diff --git a/src/USER-OMP/npair_half_nsq_newtoff_omp.cpp b/src/USER-OMP/npair_half_nsq_newtoff_omp.cpp index 55b9f9e512..c937b5bc68 100644 --- a/src/USER-OMP/npair_half_nsq_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_nsq_newtoff_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_nsq_newtoff_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -44,7 +45,7 @@ void NPairHalfNsqNewtoffOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_nsq_newton_omp.cpp b/src/USER-OMP/npair_half_nsq_newton_omp.cpp index 223da622e8..6baab97aa0 100644 --- a/src/USER-OMP/npair_half_nsq_newton_omp.cpp +++ b/src/USER-OMP/npair_half_nsq_newton_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_nsq_newton_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -43,7 +44,7 @@ void NPairHalfNsqNewtonOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp index 9bb4d277fe..c8dc37f978 100644 --- a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_respa_bin_newtoff_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -47,7 +48,7 @@ void NPairHalfRespaBinNewtoffOmp::build(NeighList *list) const int respamiddle = list->respamiddle; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp index 9ed0ae482d..98732a62ea 100644 --- a/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_respa_bin_newton_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -46,7 +47,7 @@ void NPairHalfRespaBinNewtonOmp::build(NeighList *list) const int respamiddle = list->respamiddle; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp index cd03684940..65315a2905 100644 --- a/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_respa_bin_newton_tri_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -46,7 +47,7 @@ void NPairHalfRespaBinNewtonTriOmp::build(NeighList *list) const int respamiddle = list->respamiddle; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp b/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp index b1e7467ec7..45d81069fc 100644 --- a/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_respa_nsq_newtoff_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -48,7 +49,7 @@ void NPairHalfRespaNsqNewtoffOmp::build(NeighList *list) const int respamiddle = list->respamiddle; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp b/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp index c22965895d..1237ce7858 100644 --- a/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp +++ b/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_respa_nsq_newton_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -49,7 +50,7 @@ void NPairHalfRespaNsqNewtonOmp::build(NeighList *list) const int respamiddle = list->respamiddle; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp index 1b437482c4..c979c1384d 100644 --- a/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_size_bin_newtoff_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -43,7 +44,7 @@ void NPairHalfSizeBinNewtoffOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_size_bin_newton_omp.cpp b/src/USER-OMP/npair_half_size_bin_newton_omp.cpp index 8e0581d4ce..c83cf77e50 100644 --- a/src/USER-OMP/npair_half_size_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newton_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_size_bin_newton_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -42,7 +43,7 @@ void NPairHalfSizeBinNewtonOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp index 38a2c0d61f..a615b11d93 100644 --- a/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_size_bin_newton_tri_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -41,7 +42,7 @@ void NPairHalfSizeBinNewtonTriOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp b/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp index d1505e1b2e..f42cc3e9bf 100644 --- a/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_size_nsq_newtoff_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -45,7 +46,7 @@ void NPairHalfSizeNsqNewtoffOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp b/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp index 9027b0728d..10d7d26b3d 100644 --- a/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp +++ b/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_half_size_nsq_newton_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -46,7 +47,7 @@ void NPairHalfSizeNsqNewtonOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(nlocal); diff --git a/src/USER-OMP/npair_halffull_newtoff_omp.cpp b/src/USER-OMP/npair_halffull_newtoff_omp.cpp index 7d2fe4f109..7ad0157076 100644 --- a/src/USER-OMP/npair_halffull_newtoff_omp.cpp +++ b/src/USER-OMP/npair_halffull_newtoff_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_halffull_newtoff_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -38,7 +39,7 @@ void NPairHalffullNewtoffOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(inum_full); diff --git a/src/USER-OMP/npair_halffull_newton_omp.cpp b/src/USER-OMP/npair_halffull_newton_omp.cpp index 3fcc8c2e98..9e248ee609 100644 --- a/src/USER-OMP/npair_halffull_newton_omp.cpp +++ b/src/USER-OMP/npair_halffull_newton_omp.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "npair_halffull_newton_omp.h" #include "npair_omp.h" #include "neigh_list.h" @@ -38,7 +39,7 @@ void NPairHalffullNewtonOmp::build(NeighList *list) NPAIR_OMP_INIT; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(list) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(list) #endif NPAIR_OMP_SETUP(inum_full); diff --git a/src/USER-OMP/pair_adp_omp.cpp b/src/USER-OMP/pair_adp_omp.cpp index 0a48de453e..63a539c93c 100644 --- a/src/USER-OMP/pair_adp_omp.cpp +++ b/src/USER-OMP/pair_adp_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include @@ -62,7 +63,7 @@ void PairADPOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_agni_omp.cpp b/src/USER-OMP/pair_agni_omp.cpp index 1580256e35..b61bf52e4e 100644 --- a/src/USER-OMP/pair_agni_omp.cpp +++ b/src/USER-OMP/pair_agni_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include // requires C++-11 @@ -49,7 +50,7 @@ void PairAGNIOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_airebo_omp.cpp b/src/USER-OMP/pair_airebo_omp.cpp index aedf5056a6..25d6c35174 100644 --- a/src/USER-OMP/pair_airebo_omp.cpp +++ b/src/USER-OMP/pair_airebo_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_airebo_omp.h" #include "atom.h" @@ -58,7 +59,7 @@ void PairAIREBOOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) reduction(+:pv0,pv1,pv2) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) reduction(+:pv0,pv1,pv2) #endif { int ifrom, ito, tid; @@ -104,7 +105,7 @@ void PairAIREBOOMP::REBO_neigh_thr() } #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { int i,j,ii,jj,n,jnum,itype,jtype; diff --git a/src/USER-OMP/pair_beck_omp.cpp b/src/USER-OMP/pair_beck_omp.cpp index 72e41f074c..48e6f9b0fe 100644 --- a/src/USER-OMP/pair_beck_omp.cpp +++ b/src/USER-OMP/pair_beck_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_beck_omp.h" #include #include "atom.h" @@ -45,7 +46,7 @@ void PairBeckOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_born_coul_long_omp.cpp b/src/USER-OMP/pair_born_coul_long_omp.cpp index f7e3fced46..7f92ab6734 100644 --- a/src/USER-OMP/pair_born_coul_long_omp.cpp +++ b/src/USER-OMP/pair_born_coul_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_born_coul_long_omp.h" #include "atom.h" @@ -51,7 +52,7 @@ void PairBornCoulLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_born_coul_msm_omp.cpp b/src/USER-OMP/pair_born_coul_msm_omp.cpp index b057cbc706..eec1765859 100644 --- a/src/USER-OMP/pair_born_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_born_coul_msm_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_born_coul_msm_omp.h" #include "atom.h" @@ -48,7 +49,7 @@ void PairBornCoulMSMOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_born_coul_wolf_omp.cpp b/src/USER-OMP/pair_born_coul_wolf_omp.cpp index bac38ae43a..ffa069ec4e 100644 --- a/src/USER-OMP/pair_born_coul_wolf_omp.cpp +++ b/src/USER-OMP/pair_born_coul_wolf_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_born_coul_wolf_omp.h" #include #include "atom.h" @@ -45,7 +46,7 @@ void PairBornCoulWolfOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_born_omp.cpp b/src/USER-OMP/pair_born_omp.cpp index 6cacd5625b..aaac28d07c 100644 --- a/src/USER-OMP/pair_born_omp.cpp +++ b/src/USER-OMP/pair_born_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_born_omp.h" #include #include "atom.h" @@ -43,7 +44,7 @@ void PairBornOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_brownian_omp.cpp b/src/USER-OMP/pair_brownian_omp.cpp index 907a447332..ca28fa14bb 100644 --- a/src/USER-OMP/pair_brownian_omp.cpp +++ b/src/USER-OMP/pair_brownian_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_brownian_omp.h" #include #include "atom.h" @@ -135,7 +136,7 @@ void PairBrownianOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_brownian_poly_omp.cpp b/src/USER-OMP/pair_brownian_poly_omp.cpp index f6f5f269a5..939bc223eb 100644 --- a/src/USER-OMP/pair_brownian_poly_omp.cpp +++ b/src/USER-OMP/pair_brownian_poly_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_brownian_poly_omp.h" #include #include "atom.h" @@ -135,7 +136,7 @@ void PairBrownianPolyOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_buck_coul_cut_omp.cpp b/src/USER-OMP/pair_buck_coul_cut_omp.cpp index c9ccb12447..2cff0d749d 100644 --- a/src/USER-OMP/pair_buck_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_buck_coul_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_buck_coul_cut_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairBuckCoulCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_buck_coul_long_omp.cpp b/src/USER-OMP/pair_buck_coul_long_omp.cpp index 0929157895..759a8b2118 100644 --- a/src/USER-OMP/pair_buck_coul_long_omp.cpp +++ b/src/USER-OMP/pair_buck_coul_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_buck_coul_long_omp.h" #include "atom.h" @@ -51,7 +52,7 @@ void PairBuckCoulLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_buck_coul_msm_omp.cpp b/src/USER-OMP/pair_buck_coul_msm_omp.cpp index a4d322890a..b26243b19a 100644 --- a/src/USER-OMP/pair_buck_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_buck_coul_msm_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_buck_coul_msm_omp.h" #include "atom.h" @@ -48,7 +49,7 @@ void PairBuckCoulMSMOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_buck_long_coul_long_omp.cpp b/src/USER-OMP/pair_buck_long_coul_long_omp.cpp index d30e8949b3..a2e34b9a1b 100644 --- a/src/USER-OMP/pair_buck_long_coul_long_omp.cpp +++ b/src/USER-OMP/pair_buck_long_coul_long_omp.cpp @@ -12,6 +12,7 @@ ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "math_vector.h" #include "pair_buck_long_coul_long_omp.h" @@ -56,7 +57,7 @@ void PairBuckLongCoulLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; @@ -320,7 +321,7 @@ void PairBuckLongCoulLongOMP::compute_inner() const int nthreads = comm->nthreads; const int inum = list->inum_inner; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { int ifrom, ito, tid; @@ -345,7 +346,7 @@ void PairBuckLongCoulLongOMP::compute_middle() const int inum = list->inum_middle; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { int ifrom, ito, tid; @@ -375,7 +376,7 @@ void PairBuckLongCoulLongOMP::compute_outer(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_buck_omp.cpp b/src/USER-OMP/pair_buck_omp.cpp index 563133e1cd..fc85d79c81 100644 --- a/src/USER-OMP/pair_buck_omp.cpp +++ b/src/USER-OMP/pair_buck_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_buck_omp.h" #include #include "atom.h" @@ -43,7 +44,7 @@ void PairBuckOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_colloid_omp.cpp b/src/USER-OMP/pair_colloid_omp.cpp index 0fc4b1bdf2..cce588f516 100644 --- a/src/USER-OMP/pair_colloid_omp.cpp +++ b/src/USER-OMP/pair_colloid_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_colloid_omp.h" #include "atom.h" @@ -46,7 +47,7 @@ void PairColloidOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_comb_omp.cpp b/src/USER-OMP/pair_comb_omp.cpp index 4b5f0ea6c7..8912cbc243 100644 --- a/src/USER-OMP/pair_comb_omp.cpp +++ b/src/USER-OMP/pair_comb_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_comb_omp.h" #include "atom.h" @@ -52,7 +53,7 @@ void PairCombOMP::compute(int eflag, int vflag) Short_neigh_thr(); #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; @@ -411,7 +412,7 @@ double PairCombOMP::yasu_char(double *qf_fix, int &igroup) // loop over full neighbor list of my atoms #if defined(_OPENMP) -#pragma omp parallel for private(ii) default(none) shared(potal,fac11e) +#pragma omp parallel for private(ii) LMP_DEFAULT_NONE LMP_SHARED(potal,fac11e) #endif for (ii = 0; ii < inum; ii ++) { double fqi,fqj,fqij,fqji,fqjj,delr1[3]; @@ -564,7 +565,7 @@ void PairCombOMP::Short_neigh_thr() const int nthreads = comm->nthreads; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { int nj,*neighptrj; diff --git a/src/USER-OMP/pair_coul_cut_omp.cpp b/src/USER-OMP/pair_coul_cut_omp.cpp index ce858666cb..69eb9ac0f3 100644 --- a/src/USER-OMP/pair_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_coul_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_coul_cut_omp.h" #include #include "atom.h" @@ -43,7 +44,7 @@ void PairCoulCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_coul_cut_soft_omp.cpp b/src/USER-OMP/pair_coul_cut_soft_omp.cpp index 7b6ed22f0c..89222903ec 100644 --- a/src/USER-OMP/pair_coul_cut_soft_omp.cpp +++ b/src/USER-OMP/pair_coul_cut_soft_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_coul_cut_soft_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairCoulCutSoftOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_coul_debye_omp.cpp b/src/USER-OMP/pair_coul_debye_omp.cpp index 270770ee5d..c22f7340c4 100644 --- a/src/USER-OMP/pair_coul_debye_omp.cpp +++ b/src/USER-OMP/pair_coul_debye_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_coul_debye_omp.h" #include #include "atom.h" @@ -43,7 +44,7 @@ void PairCoulDebyeOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_coul_diel_omp.cpp b/src/USER-OMP/pair_coul_diel_omp.cpp index 67e09690de..656cdc9421 100644 --- a/src/USER-OMP/pair_coul_diel_omp.cpp +++ b/src/USER-OMP/pair_coul_diel_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_coul_diel_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairCoulDielOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_coul_dsf_omp.cpp b/src/USER-OMP/pair_coul_dsf_omp.cpp index 40e285e7c8..ddcc8dbeb0 100644 --- a/src/USER-OMP/pair_coul_dsf_omp.cpp +++ b/src/USER-OMP/pair_coul_dsf_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_coul_dsf_omp.h" #include #include "atom.h" @@ -52,7 +53,7 @@ void PairCoulDSFOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_coul_long_omp.cpp b/src/USER-OMP/pair_coul_long_omp.cpp index b135ffa7e6..6c9b9d034d 100644 --- a/src/USER-OMP/pair_coul_long_omp.cpp +++ b/src/USER-OMP/pair_coul_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_coul_long_omp.h" #include "atom.h" @@ -52,7 +53,7 @@ void PairCoulLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_coul_long_soft_omp.cpp b/src/USER-OMP/pair_coul_long_soft_omp.cpp index 891123b8b3..ff3267fb38 100644 --- a/src/USER-OMP/pair_coul_long_soft_omp.cpp +++ b/src/USER-OMP/pair_coul_long_soft_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_coul_long_soft_omp.h" #include "atom.h" @@ -51,7 +52,7 @@ void PairCoulLongSoftOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_coul_msm_omp.cpp b/src/USER-OMP/pair_coul_msm_omp.cpp index 9417df7ac6..32a657e286 100644 --- a/src/USER-OMP/pair_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_coul_msm_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_coul_msm_omp.h" #include "atom.h" @@ -49,7 +50,7 @@ void PairCoulMSMOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_coul_wolf_omp.cpp b/src/USER-OMP/pair_coul_wolf_omp.cpp index 9163eff086..d0f6fdb125 100644 --- a/src/USER-OMP/pair_coul_wolf_omp.cpp +++ b/src/USER-OMP/pair_coul_wolf_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_coul_wolf_omp.h" #include #include "atom.h" @@ -45,7 +46,7 @@ void PairCoulWolfOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_dpd_omp.cpp b/src/USER-OMP/pair_dpd_omp.cpp index 7c265b2b7b..f3a1c29a70 100644 --- a/src/USER-OMP/pair_dpd_omp.cpp +++ b/src/USER-OMP/pair_dpd_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_dpd_omp.h" #include #include "atom.h" @@ -80,7 +81,7 @@ void PairDPDOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_dpd_tstat_omp.cpp b/src/USER-OMP/pair_dpd_tstat_omp.cpp index 076e27a299..06e80274bd 100644 --- a/src/USER-OMP/pair_dpd_tstat_omp.cpp +++ b/src/USER-OMP/pair_dpd_tstat_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_dpd_tstat_omp.h" #include "atom.h" @@ -79,7 +80,7 @@ void PairDPDTstatOMP::compute(int eflag, int vflag) random_thr[0] = random; } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_eam_cd_omp.cpp b/src/USER-OMP/pair_eam_cd_omp.cpp index 1d945e06a8..874a2fa252 100644 --- a/src/USER-OMP/pair_eam_cd_omp.cpp +++ b/src/USER-OMP/pair_eam_cd_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include @@ -77,7 +78,7 @@ void PairEAMCDOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_eam_omp.cpp b/src/USER-OMP/pair_eam_omp.cpp index 899323a680..60ae65def5 100644 --- a/src/USER-OMP/pair_eam_omp.cpp +++ b/src/USER-OMP/pair_eam_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include @@ -59,7 +60,7 @@ void PairEAMOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_edip_omp.cpp b/src/USER-OMP/pair_edip_omp.cpp index d1fa4c1c7a..efba197153 100644 --- a/src/USER-OMP/pair_edip_omp.cpp +++ b/src/USER-OMP/pair_edip_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_edip_omp.h" #include "atom.h" @@ -50,7 +51,7 @@ void PairEDIPOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_eim_omp.cpp b/src/USER-OMP/pair_eim_omp.cpp index dd590b75e2..02b765a956 100644 --- a/src/USER-OMP/pair_eim_omp.cpp +++ b/src/USER-OMP/pair_eim_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include @@ -57,7 +58,7 @@ void PairEIMOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_gauss_cut_omp.cpp b/src/USER-OMP/pair_gauss_cut_omp.cpp index e14a85fc95..6d5344701d 100644 --- a/src/USER-OMP/pair_gauss_cut_omp.cpp +++ b/src/USER-OMP/pair_gauss_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_gauss_cut_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairGaussCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_gauss_omp.cpp b/src/USER-OMP/pair_gauss_omp.cpp index de212c9213..106d520fa1 100644 --- a/src/USER-OMP/pair_gauss_omp.cpp +++ b/src/USER-OMP/pair_gauss_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_gauss_omp.h" #include "atom.h" @@ -45,7 +46,7 @@ void PairGaussOMP::compute(int eflag, int vflag) double occ = 0.0; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) reduction(+:occ) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) reduction(+:occ) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_gayberne_omp.cpp b/src/USER-OMP/pair_gayberne_omp.cpp index a58c16eafc..f0fd60a309 100644 --- a/src/USER-OMP/pair_gayberne_omp.cpp +++ b/src/USER-OMP/pair_gayberne_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_gayberne_omp.h" #include "math_extra.h" @@ -45,7 +46,7 @@ void PairGayBerneOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_gran_hertz_history_omp.cpp b/src/USER-OMP/pair_gran_hertz_history_omp.cpp index 1e3d86a1a5..9ad84afb92 100644 --- a/src/USER-OMP/pair_gran_hertz_history_omp.cpp +++ b/src/USER-OMP/pair_gran_hertz_history_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_gran_hertz_history_omp.h" #include "fix_neigh_history.h" @@ -69,7 +70,7 @@ void PairGranHertzHistoryOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_gran_hooke_history_omp.cpp b/src/USER-OMP/pair_gran_hooke_history_omp.cpp index d0e44cc430..3e519fc0d0 100644 --- a/src/USER-OMP/pair_gran_hooke_history_omp.cpp +++ b/src/USER-OMP/pair_gran_hooke_history_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "pair_gran_hooke_history_omp.h" @@ -70,7 +71,7 @@ void PairGranHookeHistoryOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_gran_hooke_omp.cpp b/src/USER-OMP/pair_gran_hooke_omp.cpp index 33296e22fa..8de959a91d 100644 --- a/src/USER-OMP/pair_gran_hooke_omp.cpp +++ b/src/USER-OMP/pair_gran_hooke_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_gran_hooke_omp.h" #include "atom.h" @@ -65,7 +66,7 @@ void PairGranHookeOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_hbond_dreiding_lj_omp.cpp b/src/USER-OMP/pair_hbond_dreiding_lj_omp.cpp index 77cc60e437..bb8bbcc984 100644 --- a/src/USER-OMP/pair_hbond_dreiding_lj_omp.cpp +++ b/src/USER-OMP/pair_hbond_dreiding_lj_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_hbond_dreiding_lj_omp.h" #include "atom.h" @@ -74,7 +75,7 @@ void PairHbondDreidingLJOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_hbond_dreiding_morse_omp.cpp b/src/USER-OMP/pair_hbond_dreiding_morse_omp.cpp index 47b2818be8..4ad3a8f057 100644 --- a/src/USER-OMP/pair_hbond_dreiding_morse_omp.cpp +++ b/src/USER-OMP/pair_hbond_dreiding_morse_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_hbond_dreiding_morse_omp.h" #include "atom.h" @@ -74,7 +75,7 @@ void PairHbondDreidingMorseOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj96_cut_omp.cpp b/src/USER-OMP/pair_lj96_cut_omp.cpp index b48946b3f9..adf0aac9b2 100644 --- a/src/USER-OMP/pair_lj96_cut_omp.cpp +++ b/src/USER-OMP/pair_lj96_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj96_cut_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairLJ96CutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp b/src/USER-OMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp index 10a253de6c..1c8e4c3e6b 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp +++ b/src/USER-OMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_charmm_coul_charmm_implicit_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJCharmmCoulCharmmImplicitOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_charmm_coul_charmm_omp.cpp b/src/USER-OMP/pair_lj_charmm_coul_charmm_omp.cpp index c4c5a9650e..55227e2e10 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_charmm_omp.cpp +++ b/src/USER-OMP/pair_lj_charmm_coul_charmm_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_charmm_coul_charmm_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJCharmmCoulCharmmOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_charmm_coul_long_omp.cpp b/src/USER-OMP/pair_lj_charmm_coul_long_omp.cpp index 949ea3ded7..437bd183ed 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_long_omp.cpp +++ b/src/USER-OMP/pair_lj_charmm_coul_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_charmm_coul_long_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairLJCharmmCoulLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_charmm_coul_long_soft_omp.cpp b/src/USER-OMP/pair_lj_charmm_coul_long_soft_omp.cpp index 2a41b0690b..b32f108098 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_long_soft_omp.cpp +++ b/src/USER-OMP/pair_lj_charmm_coul_long_soft_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_charmm_coul_long_soft_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairLJCharmmCoulLongSoftOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_charmm_coul_msm_omp.cpp b/src/USER-OMP/pair_lj_charmm_coul_msm_omp.cpp index cecd27bfdc..9a0b44c1ec 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_lj_charmm_coul_msm_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_charmm_coul_msm_omp.h" #include "atom.h" @@ -49,7 +50,7 @@ void PairLJCharmmCoulMSMOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_class2_coul_cut_omp.cpp b/src/USER-OMP/pair_lj_class2_coul_cut_omp.cpp index 9e4dc08fd5..59a6841c9e 100644 --- a/src/USER-OMP/pair_lj_class2_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_lj_class2_coul_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_class2_coul_cut_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJClass2CoulCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_class2_coul_long_omp.cpp b/src/USER-OMP/pair_lj_class2_coul_long_omp.cpp index 4fd371e2eb..c0734e39d6 100644 --- a/src/USER-OMP/pair_lj_class2_coul_long_omp.cpp +++ b/src/USER-OMP/pair_lj_class2_coul_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_class2_coul_long_omp.h" #include "atom.h" @@ -51,7 +52,7 @@ void PairLJClass2CoulLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_class2_omp.cpp b/src/USER-OMP/pair_lj_class2_omp.cpp index fa9b6ae703..2b91e10cfa 100644 --- a/src/USER-OMP/pair_lj_class2_omp.cpp +++ b/src/USER-OMP/pair_lj_class2_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_class2_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJClass2OMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cubic_omp.cpp b/src/USER-OMP/pair_lj_cubic_omp.cpp index 3fe6fab5de..778c25393d 100644 --- a/src/USER-OMP/pair_lj_cubic_omp.cpp +++ b/src/USER-OMP/pair_lj_cubic_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cubic_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairLJCubicOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_coul_cut_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_cut_omp.cpp index 6c0a3706f7..d560b803f1 100644 --- a/src/USER-OMP/pair_lj_cut_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_coul_cut_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJCutCoulCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_coul_cut_soft_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_cut_soft_omp.cpp index 742565d19c..1c88600e7a 100644 --- a/src/USER-OMP/pair_lj_cut_coul_cut_soft_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_cut_soft_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_coul_cut_soft_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJCutCoulCutSoftOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_coul_debye_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_debye_omp.cpp index 413758cc4a..79754e704b 100644 --- a/src/USER-OMP/pair_lj_cut_coul_debye_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_debye_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_coul_debye_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJCutCoulDebyeOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_coul_dsf_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_dsf_omp.cpp index 3295ede132..ec69a1a1ca 100644 --- a/src/USER-OMP/pair_lj_cut_coul_dsf_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_dsf_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_coul_dsf_omp.h" #include "atom.h" @@ -53,7 +54,7 @@ void PairLJCutCoulDSFOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_coul_long_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_long_omp.cpp index d32ec58607..618986389c 100644 --- a/src/USER-OMP/pair_lj_cut_coul_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_coul_long_omp.h" #include "atom.h" @@ -52,7 +53,7 @@ void PairLJCutCoulLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_coul_long_soft_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_long_soft_omp.cpp index d1f97941f5..ce84ba01c3 100644 --- a/src/USER-OMP/pair_lj_cut_coul_long_soft_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_long_soft_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_coul_long_soft_omp.h" #include "atom.h" @@ -52,7 +53,7 @@ void PairLJCutCoulLongSoftOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_coul_msm_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_msm_omp.cpp index 9c48e03a13..58e5cee0c2 100644 --- a/src/USER-OMP/pair_lj_cut_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_msm_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_coul_msm_omp.h" #include "atom.h" @@ -49,7 +50,7 @@ void PairLJCutCoulMSMOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_coul_wolf_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_wolf_omp.cpp index 09403b893c..4111c5b22c 100644 --- a/src/USER-OMP/pair_lj_cut_coul_wolf_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_wolf_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_coul_wolf_omp.h" #include "atom.h" @@ -45,7 +46,7 @@ void PairLJCutCoulWolfOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_dipole_cut_omp.cpp b/src/USER-OMP/pair_lj_cut_dipole_cut_omp.cpp index c259b006c5..7d5d25c39b 100644 --- a/src/USER-OMP/pair_lj_cut_dipole_cut_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_dipole_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_dipole_cut_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJCutDipoleCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_omp.cpp b/src/USER-OMP/pair_lj_cut_omp.cpp index f8670b7c28..3e7e92de21 100644 --- a/src/USER-OMP/pair_lj_cut_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairLJCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_soft_omp.cpp b/src/USER-OMP/pair_lj_cut_soft_omp.cpp index 988af13938..5064c4705e 100644 --- a/src/USER-OMP/pair_lj_cut_soft_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_soft_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_soft_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairLJCutSoftOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp index a8f2d2a081..72a7d5f16a 100644 --- a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_lj_cut_thole_long_omp.h" #include #include @@ -70,7 +71,7 @@ void PairLJCutTholeLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_tip4p_cut_omp.cpp b/src/USER-OMP/pair_lj_cut_tip4p_cut_omp.cpp index 40cfcb6bc2..2d1b828822 100644 --- a/src/USER-OMP/pair_lj_cut_tip4p_cut_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_tip4p_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_tip4p_cut_omp.h" #include "atom.h" @@ -93,7 +94,7 @@ void PairLJCutTIP4PCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp b/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp index d51382c0f1..a60f9d6a57 100644 --- a/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_lj_cut_tip4p_long_omp.h" #include #include "atom.h" @@ -93,7 +94,7 @@ void PairLJCutTIP4PLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_cut_tip4p_long_soft_omp.cpp b/src/USER-OMP/pair_lj_cut_tip4p_long_soft_omp.cpp index 350bea884d..f4a75b9af8 100644 --- a/src/USER-OMP/pair_lj_cut_tip4p_long_soft_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_tip4p_long_soft_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_cut_tip4p_long_soft_omp.h" #include "atom.h" @@ -93,7 +94,7 @@ void PairLJCutTIP4PLongSoftOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_expand_omp.cpp b/src/USER-OMP/pair_lj_expand_omp.cpp index d3d1da263c..70b5e436fa 100644 --- a/src/USER-OMP/pair_lj_expand_omp.cpp +++ b/src/USER-OMP/pair_lj_expand_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_expand_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJExpandOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_gromacs_coul_gromacs_omp.cpp b/src/USER-OMP/pair_lj_gromacs_coul_gromacs_omp.cpp index 2fe7c39afe..0f0a8de2ff 100644 --- a/src/USER-OMP/pair_lj_gromacs_coul_gromacs_omp.cpp +++ b/src/USER-OMP/pair_lj_gromacs_coul_gromacs_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_gromacs_coul_gromacs_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJGromacsCoulGromacsOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_gromacs_omp.cpp b/src/USER-OMP/pair_lj_gromacs_omp.cpp index 4a4e68ec6e..ea2c9e8f55 100644 --- a/src/USER-OMP/pair_lj_gromacs_omp.cpp +++ b/src/USER-OMP/pair_lj_gromacs_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_gromacs_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJGromacsOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_long_coul_long_omp.cpp b/src/USER-OMP/pair_lj_long_coul_long_omp.cpp index 7286771c26..e74f487129 100644 --- a/src/USER-OMP/pair_lj_long_coul_long_omp.cpp +++ b/src/USER-OMP/pair_lj_long_coul_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_long_coul_long_omp.h" #include "atom.h" @@ -56,7 +57,7 @@ void PairLJLongCoulLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; @@ -318,7 +319,7 @@ void PairLJLongCoulLongOMP::compute_inner() const int nthreads = comm->nthreads; const int inum = list->inum_inner; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { int ifrom, ito, tid; @@ -343,7 +344,7 @@ void PairLJLongCoulLongOMP::compute_middle() const int inum = list->inum_middle; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { int ifrom, ito, tid; @@ -373,7 +374,7 @@ void PairLJLongCoulLongOMP::compute_outer(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp b/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp index d8eedc6c0b..9c8de110d7 100644 --- a/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_long_tip4p_long_omp.h" #include "atom.h" @@ -96,7 +97,7 @@ void PairLJLongTIP4PLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; @@ -379,7 +380,7 @@ void PairLJLongTIP4PLongOMP::compute_inner() const int nthreads = comm->nthreads; const int inum = list->inum_inner; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { int ifrom, ito, tid; @@ -404,7 +405,7 @@ void PairLJLongTIP4PLongOMP::compute_middle() const int inum = list->inum_middle; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { int ifrom, ito, tid; @@ -458,7 +459,7 @@ void PairLJLongTIP4PLongOMP::compute_outer(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_sdk_coul_long_omp.cpp b/src/USER-OMP/pair_lj_sdk_coul_long_omp.cpp index 15fea32f53..4ad082cde1 100644 --- a/src/USER-OMP/pair_lj_sdk_coul_long_omp.cpp +++ b/src/USER-OMP/pair_lj_sdk_coul_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_sdk_coul_long_omp.h" #include "atom.h" @@ -45,7 +46,7 @@ void PairLJSDKCoulLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_sdk_coul_msm_omp.cpp b/src/USER-OMP/pair_lj_sdk_coul_msm_omp.cpp index 3326034da8..4871356b18 100644 --- a/src/USER-OMP/pair_lj_sdk_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_lj_sdk_coul_msm_omp.cpp @@ -13,6 +13,7 @@ This style is a simplified re-implementation of the CG/CMM pair style ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_sdk_coul_msm_omp.h" #include "atom.h" @@ -51,7 +52,7 @@ void PairLJSDKCoulMSMOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_sdk_omp.cpp b/src/USER-OMP/pair_lj_sdk_omp.cpp index 9ba90a2937..9f0671c61c 100644 --- a/src/USER-OMP/pair_lj_sdk_omp.cpp +++ b/src/USER-OMP/pair_lj_sdk_omp.cpp @@ -13,6 +13,7 @@ This style is a simplified re-implementation of the CG/CMM pair style ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_sdk_omp.h" #include "atom.h" @@ -47,7 +48,7 @@ void PairLJSDKOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_sf_dipole_sf_omp.cpp b/src/USER-OMP/pair_lj_sf_dipole_sf_omp.cpp index ca08f817dc..1adaf93953 100644 --- a/src/USER-OMP/pair_lj_sf_dipole_sf_omp.cpp +++ b/src/USER-OMP/pair_lj_sf_dipole_sf_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_sf_dipole_sf_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJSFDipoleSFOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_smooth_linear_omp.cpp b/src/USER-OMP/pair_lj_smooth_linear_omp.cpp index 0b29a8fc30..497c2c3a43 100644 --- a/src/USER-OMP/pair_lj_smooth_linear_omp.cpp +++ b/src/USER-OMP/pair_lj_smooth_linear_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_smooth_linear_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJSmoothLinearOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lj_smooth_omp.cpp b/src/USER-OMP/pair_lj_smooth_omp.cpp index fe3d64cbf6..bdb9b3141e 100644 --- a/src/USER-OMP/pair_lj_smooth_omp.cpp +++ b/src/USER-OMP/pair_lj_smooth_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lj_smooth_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairLJSmoothOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lubricate_omp.cpp b/src/USER-OMP/pair_lubricate_omp.cpp index dc6be0b96a..9db4239587 100644 --- a/src/USER-OMP/pair_lubricate_omp.cpp +++ b/src/USER-OMP/pair_lubricate_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_lubricate_omp.h" #include "atom.h" @@ -109,7 +110,7 @@ void PairLubricateOMP::compute(int eflag, int vflag) #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_lubricate_poly_omp.cpp b/src/USER-OMP/pair_lubricate_poly_omp.cpp index 648b10b114..dc143a3160 100644 --- a/src/USER-OMP/pair_lubricate_poly_omp.cpp +++ b/src/USER-OMP/pair_lubricate_poly_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pair_lubricate_poly_omp.h" #include #include "atom.h" @@ -106,7 +107,7 @@ void PairLubricatePolyOMP::compute(int eflag, int vflag) #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_meam_spline_omp.cpp b/src/USER-OMP/pair_meam_spline_omp.cpp index f4aff69881..19fb09dd7b 100644 --- a/src/USER-OMP/pair_meam_spline_omp.cpp +++ b/src/USER-OMP/pair_meam_spline_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include @@ -57,7 +58,7 @@ void PairMEAMSplineOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_morse_omp.cpp b/src/USER-OMP/pair_morse_omp.cpp index c77196d1c5..1f566dbd42 100644 --- a/src/USER-OMP/pair_morse_omp.cpp +++ b/src/USER-OMP/pair_morse_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_morse_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairMorseOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_morse_smooth_linear_omp.cpp b/src/USER-OMP/pair_morse_smooth_linear_omp.cpp index e30a774bf2..ac73344c67 100644 --- a/src/USER-OMP/pair_morse_smooth_linear_omp.cpp +++ b/src/USER-OMP/pair_morse_smooth_linear_omp.cpp @@ -13,6 +13,7 @@ Most code borrowed from pair_morse_omp.cpp ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_morse_smooth_linear_omp.h" #include "atom.h" @@ -47,7 +48,7 @@ void PairMorseSmoothLinearOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_nm_cut_coul_cut_omp.cpp b/src/USER-OMP/pair_nm_cut_coul_cut_omp.cpp index 7ffd189a5b..4326434450 100644 --- a/src/USER-OMP/pair_nm_cut_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_nm_cut_coul_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_nm_cut_coul_cut_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairNMCutCoulCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_nm_cut_coul_long_omp.cpp b/src/USER-OMP/pair_nm_cut_coul_long_omp.cpp index 0a0a861b6f..970b383f7e 100644 --- a/src/USER-OMP/pair_nm_cut_coul_long_omp.cpp +++ b/src/USER-OMP/pair_nm_cut_coul_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_nm_cut_coul_long_omp.h" #include "atom.h" @@ -51,7 +52,7 @@ void PairNMCutCoulLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_nm_cut_omp.cpp b/src/USER-OMP/pair_nm_cut_omp.cpp index cb74eed3f1..ef68071b68 100644 --- a/src/USER-OMP/pair_nm_cut_omp.cpp +++ b/src/USER-OMP/pair_nm_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_nm_cut_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairNMCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_peri_lps_omp.cpp b/src/USER-OMP/pair_peri_lps_omp.cpp index 3ea41321a7..cf29b5cab8 100644 --- a/src/USER-OMP/pair_peri_lps_omp.cpp +++ b/src/USER-OMP/pair_peri_lps_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "pair_peri_lps_omp.h" @@ -62,7 +63,7 @@ void PairPeriLPSOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_peri_pmb_omp.cpp b/src/USER-OMP/pair_peri_pmb_omp.cpp index 95e50df50d..1990b46fe5 100644 --- a/src/USER-OMP/pair_peri_pmb_omp.cpp +++ b/src/USER-OMP/pair_peri_pmb_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include #include "pair_peri_pmb_omp.h" @@ -58,7 +59,7 @@ void PairPeriPMBOMP::compute(int eflag, int vflag) } #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_resquared_omp.cpp b/src/USER-OMP/pair_resquared_omp.cpp index 65f1c7289f..557d212531 100644 --- a/src/USER-OMP/pair_resquared_omp.cpp +++ b/src/USER-OMP/pair_resquared_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_resquared_omp.h" #include "math_extra.h" @@ -45,7 +46,7 @@ void PairRESquaredOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_soft_omp.cpp b/src/USER-OMP/pair_soft_omp.cpp index 7de94a2cd1..85425974cc 100644 --- a/src/USER-OMP/pair_soft_omp.cpp +++ b/src/USER-OMP/pair_soft_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_soft_omp.h" #include "atom.h" @@ -47,7 +48,7 @@ void PairSoftOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_sw_omp.cpp b/src/USER-OMP/pair_sw_omp.cpp index 9812cf06ba..ebe501ff8e 100644 --- a/src/USER-OMP/pair_sw_omp.cpp +++ b/src/USER-OMP/pair_sw_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_sw_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairSWOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_table_omp.cpp b/src/USER-OMP/pair_table_omp.cpp index bf18d53d2e..2546bfdc9a 100644 --- a/src/USER-OMP/pair_table_omp.cpp +++ b/src/USER-OMP/pair_table_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_table_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairTableOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_tersoff_mod_c_omp.cpp b/src/USER-OMP/pair_tersoff_mod_c_omp.cpp index 6b6b130c65..5e1e6b1b0e 100644 --- a/src/USER-OMP/pair_tersoff_mod_c_omp.cpp +++ b/src/USER-OMP/pair_tersoff_mod_c_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_tersoff_mod_c_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairTersoffMODCOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_tersoff_mod_omp.cpp b/src/USER-OMP/pair_tersoff_mod_omp.cpp index 634676ee49..aa90b88375 100644 --- a/src/USER-OMP/pair_tersoff_mod_omp.cpp +++ b/src/USER-OMP/pair_tersoff_mod_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_tersoff_mod_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairTersoffMODOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_tersoff_omp.cpp b/src/USER-OMP/pair_tersoff_omp.cpp index 9735ccaa1f..34dbfb73b6 100644 --- a/src/USER-OMP/pair_tersoff_omp.cpp +++ b/src/USER-OMP/pair_tersoff_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_tersoff_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairTersoffOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_tersoff_table_omp.cpp b/src/USER-OMP/pair_tersoff_table_omp.cpp index fa9512bf71..a0a7f4c810 100644 --- a/src/USER-OMP/pair_tersoff_table_omp.cpp +++ b/src/USER-OMP/pair_tersoff_table_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_tersoff_table_omp.h" #include "atom.h" @@ -68,7 +69,7 @@ void PairTersoffTableOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_tip4p_cut_omp.cpp b/src/USER-OMP/pair_tip4p_cut_omp.cpp index c8584b4fe3..5b983d3db5 100644 --- a/src/USER-OMP/pair_tip4p_cut_omp.cpp +++ b/src/USER-OMP/pair_tip4p_cut_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_tip4p_cut_omp.h" #include "atom.h" @@ -92,7 +93,7 @@ void PairTIP4PCutOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_tip4p_long_omp.cpp b/src/USER-OMP/pair_tip4p_long_omp.cpp index 89c3c17684..86bebdbeff 100644 --- a/src/USER-OMP/pair_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_tip4p_long_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_tip4p_long_omp.h" #include "atom.h" @@ -93,7 +94,7 @@ void PairTIP4PLongOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_tip4p_long_soft_omp.cpp b/src/USER-OMP/pair_tip4p_long_soft_omp.cpp index 88da3d02a8..26e0420955 100644 --- a/src/USER-OMP/pair_tip4p_long_soft_omp.cpp +++ b/src/USER-OMP/pair_tip4p_long_soft_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_tip4p_long_soft_omp.h" #include "atom.h" @@ -93,7 +94,7 @@ void PairTIP4PLongSoftOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_ufm_omp.cpp b/src/USER-OMP/pair_ufm_omp.cpp index 23e76186c0..605d6dd2c6 100644 --- a/src/USER-OMP/pair_ufm_omp.cpp +++ b/src/USER-OMP/pair_ufm_omp.cpp @@ -14,6 +14,7 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_ufm_omp.h" #include "atom.h" @@ -45,7 +46,7 @@ void PairUFMOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_vashishta_omp.cpp b/src/USER-OMP/pair_vashishta_omp.cpp index a218ddf3ed..425a06c296 100644 --- a/src/USER-OMP/pair_vashishta_omp.cpp +++ b/src/USER-OMP/pair_vashishta_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_vashishta_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairVashishtaOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_vashishta_table_omp.cpp b/src/USER-OMP/pair_vashishta_table_omp.cpp index 0986128bf6..36c86a8995 100644 --- a/src/USER-OMP/pair_vashishta_table_omp.cpp +++ b/src/USER-OMP/pair_vashishta_table_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_vashishta_table_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairVashishtaTableOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_yukawa_colloid_omp.cpp b/src/USER-OMP/pair_yukawa_colloid_omp.cpp index 9b8428c648..e6ac3fa9fb 100644 --- a/src/USER-OMP/pair_yukawa_colloid_omp.cpp +++ b/src/USER-OMP/pair_yukawa_colloid_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_yukawa_colloid_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairYukawaColloidOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_yukawa_omp.cpp b/src/USER-OMP/pair_yukawa_omp.cpp index 20d557e605..f222876cb5 100644 --- a/src/USER-OMP/pair_yukawa_omp.cpp +++ b/src/USER-OMP/pair_yukawa_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_yukawa_omp.h" #include "atom.h" @@ -43,7 +44,7 @@ void PairYukawaOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pair_zbl_omp.cpp b/src/USER-OMP/pair_zbl_omp.cpp index 3a300ce477..284ebbf09c 100644 --- a/src/USER-OMP/pair_zbl_omp.cpp +++ b/src/USER-OMP/pair_zbl_omp.cpp @@ -12,6 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include #include "pair_zbl_omp.h" #include "atom.h" @@ -44,7 +45,7 @@ void PairZBLOMP::compute(int eflag, int vflag) const int inum = list->inum; #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { int ifrom, ito, tid; diff --git a/src/USER-OMP/pppm_cg_omp.cpp b/src/USER-OMP/pppm_cg_omp.cpp index f9967bf52a..31098d2675 100644 --- a/src/USER-OMP/pppm_cg_omp.cpp +++ b/src/USER-OMP/pppm_cg_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pppm_cg_omp.h" #include #include @@ -59,7 +60,7 @@ PPPMCGOMP::PPPMCGOMP(LAMMPS *lmp) : PPPMCG(lmp), ThrOMP(lmp, THR_KSPACE) PPPMCGOMP::~PPPMCGOMP() { #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -81,7 +82,7 @@ void PPPMCGOMP::allocate() PPPMCG::allocate(); #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -122,7 +123,7 @@ void PPPMCGOMP::compute_gf_ik() const int twoorder = 2*order; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { double snx,sny,snz; @@ -216,7 +217,7 @@ void PPPMCGOMP::compute_gf_ad() double sf0=0.0,sf1=0.0,sf2=0.0,sf3=0.0,sf4=0.0,sf5=0.0; #if defined(_OPENMP) -#pragma omp parallel default(none) reduction(+:sf0,sf1,sf2,sf3,sf4,sf5) +#pragma omp parallel LMP_DEFAULT_NONE reduction(+:sf0,sf1,sf2,sf3,sf4,sf5) #endif { double snx,sny,snz,sqk; @@ -314,7 +315,7 @@ void PPPMCGOMP::compute(int eflag, int vflag) PPPMCG::compute(eflag,vflag); #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { #if defined(_OPENMP) @@ -351,7 +352,7 @@ void PPPMCGOMP::make_rho() const int iy = nyhi_out - nylo_out + 1; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { const double * _noalias const q = atom->q; @@ -443,7 +444,7 @@ void PPPMCGOMP::fieldforce_ik() const int nthreads = comm->nthreads; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { FFT_SCALAR dx,dy,dz,x0,y0,z0,ekx,eky,ekz; @@ -524,7 +525,7 @@ void PPPMCGOMP::fieldforce_ad() const int nthreads = comm->nthreads; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { int i,ifrom,ito,tid,l,m,n,nx,ny,nz,mx,my,mz; @@ -617,7 +618,7 @@ void PPPMCGOMP::fieldforce_peratom() const int nthreads = comm->nthreads; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { FFT_SCALAR dx,dy,dz,x0,y0,z0; diff --git a/src/USER-OMP/pppm_disp_omp.cpp b/src/USER-OMP/pppm_disp_omp.cpp index 6b2c180a3f..aad77cffc7 100644 --- a/src/USER-OMP/pppm_disp_omp.cpp +++ b/src/USER-OMP/pppm_disp_omp.cpp @@ -16,6 +16,7 @@ Rolf Isele-Holder (RWTH Aachen University) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pppm_disp_omp.h" #include #include @@ -59,7 +60,7 @@ PPPMDispOMP::PPPMDispOMP(LAMMPS *lmp) : PPPMDisp(lmp), ThrOMP(lmp, THR_KSPACE) PPPMDispOMP::~PPPMDispOMP() { #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -87,7 +88,7 @@ void PPPMDispOMP::allocate() PPPMDisp::allocate(); #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -114,7 +115,7 @@ void PPPMDispOMP::allocate() void PPPMDispOMP::compute_gf() { #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { @@ -204,7 +205,7 @@ void PPPMDispOMP::compute_gf() void PPPMDispOMP::compute_gf_6() { #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { double *prd; @@ -311,7 +312,7 @@ void PPPMDispOMP::compute(int eflag, int vflag) PPPMDisp::compute(eflag,vflag); #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { #if defined(_OPENMP) @@ -366,7 +367,7 @@ void PPPMDispOMP::particle_map(double dxinv, double dyinv, int flag = 0; #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(+:flag) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:flag) schedule(static) #endif for (int i = 0; i < nlocal; i++) { @@ -419,7 +420,7 @@ void PPPMDispOMP::make_rho_c() const int iy = nyhi_out - nylo_out + 1; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { const double * _noalias const q = atom->q; @@ -509,7 +510,7 @@ void PPPMDispOMP::make_rho_g() const int iy = nyhi_out_6 - nylo_out_6 + 1; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; @@ -613,7 +614,7 @@ void PPPMDispOMP::make_rho_a() const int iy = nyhi_out_6 - nylo_out_6 + 1; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; @@ -723,7 +724,7 @@ void PPPMDispOMP::fieldforce_c_ik() #if defined(_OPENMP) const int nthreads = comm->nthreads; -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -828,7 +829,7 @@ void PPPMDispOMP::fieldforce_c_ad() #if defined(_OPENMP) const int nthreads = comm->nthreads; -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -935,7 +936,7 @@ void PPPMDispOMP::fieldforce_c_peratom() #if defined(_OPENMP) const int nthreads = comm->nthreads; -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1034,7 +1035,7 @@ void PPPMDispOMP::fieldforce_g_ik() #if defined(_OPENMP) const int nthreads = comm->nthreads; -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1138,7 +1139,7 @@ void PPPMDispOMP::fieldforce_g_ad() #if defined(_OPENMP) const int nthreads = comm->nthreads; -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1248,7 +1249,7 @@ void PPPMDispOMP::fieldforce_g_peratom() #if defined(_OPENMP) const int nthreads = comm->nthreads; -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1350,7 +1351,7 @@ void PPPMDispOMP::fieldforce_a_ik() #if defined(_OPENMP) const int nthreads = comm->nthreads; -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1486,7 +1487,7 @@ void PPPMDispOMP::fieldforce_a_ad() #if defined(_OPENMP) const int nthreads = comm->nthreads; -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1663,7 +1664,7 @@ void PPPMDispOMP::fieldforce_a_peratom() #if defined(_OPENMP) const int nthreads = comm->nthreads; -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) diff --git a/src/USER-OMP/pppm_disp_tip4p_omp.cpp b/src/USER-OMP/pppm_disp_tip4p_omp.cpp index ec294cd56d..7da4257e07 100644 --- a/src/USER-OMP/pppm_disp_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_disp_tip4p_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pppm_disp_tip4p_omp.h" #include #include @@ -56,7 +57,7 @@ PPPMDispTIP4POMP::~PPPMDispTIP4POMP() { #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -84,7 +85,7 @@ void PPPMDispTIP4POMP::allocate() PPPMDispTIP4P::allocate(); #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -111,7 +112,7 @@ void PPPMDispTIP4POMP::allocate() void PPPMDispTIP4POMP::compute_gf() { #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { @@ -198,7 +199,7 @@ void PPPMDispTIP4POMP::compute_gf() void PPPMDispTIP4POMP::compute_gf_6() { #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { double *prd; @@ -302,7 +303,7 @@ void PPPMDispTIP4POMP::compute(int eflag, int vflag) PPPMDispTIP4P::compute(eflag,vflag); #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { #if defined(_OPENMP) @@ -358,7 +359,7 @@ void PPPMDispTIP4POMP::particle_map_c(double dxinv, double dyinv, int flag = 0; #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(+:flag) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:flag) schedule(static) #endif for (int i = 0; i < nlocal; i++) { dbl3_t xM; @@ -434,7 +435,7 @@ void PPPMDispTIP4POMP::particle_map(double dxinv, double dyinv, int flag = 0; #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(+:flag) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:flag) schedule(static) #endif for (int i = 0; i < nlocal; i++) { @@ -487,7 +488,7 @@ void PPPMDispTIP4POMP::make_rho_c() const int iy = nyhi_out - nylo_out + 1; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { const double * _noalias const q = atom->q; @@ -582,7 +583,7 @@ void PPPMDispTIP4POMP::make_rho_g() const int iy = nyhi_out_6 - nylo_out_6 + 1; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; @@ -684,7 +685,7 @@ void PPPMDispTIP4POMP::make_rho_a() const int iy = nyhi_out_6 - nylo_out_6 + 1; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; @@ -795,7 +796,7 @@ void PPPMDispTIP4POMP::fieldforce_c_ik() const double boxloz = boxlo[2]; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { dbl3_t xM; @@ -903,7 +904,7 @@ void PPPMDispTIP4POMP::fieldforce_c_ad() const double boxloz = boxlo[2]; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { double s1,s2,s3,sf; @@ -1018,7 +1019,7 @@ void PPPMDispTIP4POMP::fieldforce_g_ik() const double * const * const x = atom->x; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1119,7 +1120,7 @@ void PPPMDispTIP4POMP::fieldforce_g_ad() const double hz_inv = nz_pppm_6/zprd_slab; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1226,7 +1227,7 @@ void PPPMDispTIP4POMP::fieldforce_g_peratom() const double * const * const x = atom->x; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1325,7 +1326,7 @@ void PPPMDispTIP4POMP::fieldforce_a_ik() const double * const * const x = atom->x; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1458,7 +1459,7 @@ void PPPMDispTIP4POMP::fieldforce_a_ad() const double hz_inv = nz_pppm_6/zprd_slab; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -1632,7 +1633,7 @@ void PPPMDispTIP4POMP::fieldforce_a_peratom() const double * const * const x = atom->x; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) diff --git a/src/USER-OMP/pppm_omp.cpp b/src/USER-OMP/pppm_omp.cpp index b9b39826ff..e3e46f4de0 100644 --- a/src/USER-OMP/pppm_omp.cpp +++ b/src/USER-OMP/pppm_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pppm_omp.h" #include #include @@ -61,7 +62,7 @@ void PPPMOMP::allocate() PPPM::allocate(); #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -81,7 +82,7 @@ void PPPMOMP::allocate() PPPMOMP::~PPPMOMP() { #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -122,7 +123,7 @@ void PPPMOMP::compute_gf_ik() const int twoorder = 2*order; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { double snx,sny,snz; @@ -216,7 +217,7 @@ void PPPMOMP::compute_gf_ad() double sf0=0.0,sf1=0.0,sf2=0.0,sf3=0.0,sf4=0.0,sf5=0.0; #if defined(_OPENMP) -#pragma omp parallel default(none) reduction(+:sf0,sf1,sf2,sf3,sf4,sf5) +#pragma omp parallel LMP_DEFAULT_NONE reduction(+:sf0,sf1,sf2,sf3,sf4,sf5) #endif { double snx,sny,snz,sqk; @@ -314,7 +315,7 @@ void PPPMOMP::compute(int eflag, int vflag) PPPM::compute(eflag,vflag); #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { #if defined(_OPENMP) @@ -352,7 +353,7 @@ void PPPMOMP::make_rho() const int iy = nyhi_out - nylo_out + 1; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { const double * _noalias const q = atom->q; @@ -449,7 +450,7 @@ void PPPMOMP::fieldforce_ik() const double boxloz = boxlo[2]; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { FFT_SCALAR x0,y0,z0,ekx,eky,ekz; @@ -534,7 +535,7 @@ void PPPMOMP::fieldforce_ad() const double boxloz = boxlo[2]; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { double s1,s2,s3,sf; @@ -627,7 +628,7 @@ void PPPMOMP::fieldforce_peratom() const double * _noalias const q = atom->q; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { FFT_SCALAR dx,dy,dz,x0,y0,z0; diff --git a/src/USER-OMP/pppm_tip4p_omp.cpp b/src/USER-OMP/pppm_tip4p_omp.cpp index 359b5dcc8d..6b3316943e 100644 --- a/src/USER-OMP/pppm_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_tip4p_omp.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "pppm_tip4p_omp.h" #include #include @@ -61,7 +62,7 @@ PPPMTIP4POMP::PPPMTIP4POMP(LAMMPS *lmp) : PPPMTIP4POMP::~PPPMTIP4POMP() { #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -83,7 +84,7 @@ void PPPMTIP4POMP::allocate() PPPMTIP4P::allocate(); #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -124,7 +125,7 @@ void PPPMTIP4POMP::compute_gf_ik() const int twoorder = 2*order; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { double snx,sny,snz; @@ -218,7 +219,7 @@ void PPPMTIP4POMP::compute_gf_ad() double sf0=0.0,sf1=0.0,sf2=0.0,sf3=0.0,sf4=0.0,sf5=0.0; #if defined(_OPENMP) -#pragma omp parallel default(none) reduction(+:sf0,sf1,sf2,sf3,sf4,sf5) +#pragma omp parallel LMP_DEFAULT_NONE reduction(+:sf0,sf1,sf2,sf3,sf4,sf5) #endif { double snx,sny,snz,sqk; @@ -316,7 +317,7 @@ void PPPMTIP4POMP::compute(int eflag, int vflag) PPPMTIP4P::compute(eflag,vflag); #if defined(_OPENMP) -#pragma omp parallel default(none) shared(eflag,vflag) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag,vflag) #endif { #if defined(_OPENMP) @@ -355,7 +356,7 @@ void PPPMTIP4POMP::particle_map() int flag = 0; #if defined(_OPENMP) -#pragma omp parallel for default(none) reduction(+:flag) schedule(static) +#pragma omp parallel for LMP_DEFAULT_NONE reduction(+:flag) schedule(static) #endif for (int i = 0; i < nlocal; i++) { dbl3_t xM; @@ -416,7 +417,7 @@ void PPPMTIP4POMP::make_rho() const int iy = nyhi_out - nylo_out + 1; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { const double * _noalias const q = atom->q; @@ -521,7 +522,7 @@ void PPPMTIP4POMP::fieldforce_ik() const double boxloz = boxlo[2]; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { dbl3_t xM; @@ -632,7 +633,7 @@ void PPPMTIP4POMP::fieldforce_ad() const double boxloz = boxlo[2]; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { double s1,s2,s3,sf; diff --git a/src/USER-OMP/reaxc_forces_omp.cpp b/src/USER-OMP/reaxc_forces_omp.cpp index e48a5c11d4..381b2e5525 100644 --- a/src/USER-OMP/reaxc_forces_omp.cpp +++ b/src/USER-OMP/reaxc_forces_omp.cpp @@ -26,6 +26,7 @@ . ----------------------------------------------------------------------*/ +#include "omp_compat.h" #include "reaxc_forces_omp.h" #include #include @@ -146,7 +147,7 @@ void Compute_Total_ForceOMP( reax_system *system, control_params *control, reax_list *bonds = (*lists) + BONDS; #if defined(_OPENMP) -#pragma omp parallel default(shared) //default(none) +#pragma omp parallel default(shared) //LMP_DEFAULT_NONE #endif { int i, j, k, pj, pk, start_j, end_j; diff --git a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp index d06966a92d..22d9df7702 100644 --- a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp @@ -26,6 +26,7 @@ . ----------------------------------------------------------------------*/ +#include "omp_compat.h" #include "reaxc_hydrogen_bonds_omp.h" #include #include @@ -57,7 +58,7 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control, const int nthreads = control->nthreads; #if defined(_OPENMP) -#pragma omp parallel default(shared) //default(none) +#pragma omp parallel default(shared) //LMP_DEFAULT_NONE #endif { int i, j, k, pi, pk; diff --git a/src/USER-OMP/respa_omp.cpp b/src/USER-OMP/respa_omp.cpp index 5add419253..b5e5293aa4 100644 --- a/src/USER-OMP/respa_omp.cpp +++ b/src/USER-OMP/respa_omp.cpp @@ -15,6 +15,7 @@ Contributing authors: Mark Stevens (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "omp_compat.h" #include "respa_omp.h" #include "neighbor.h" #include "comm.h" @@ -146,7 +147,7 @@ void RespaOMP::setup(int flag) const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -241,7 +242,7 @@ void RespaOMP::setup_minimal(int flag) const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) @@ -394,7 +395,7 @@ void RespaOMP::recurse(int ilevel) const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; #if defined(_OPENMP) -#pragma omp parallel default(none) +#pragma omp parallel LMP_DEFAULT_NONE #endif { #if defined(_OPENMP) From 6563331d6e11da18a763143562a3b80b61ee9761 Mon Sep 17 00:00:00 2001 From: Michael Lamparski Date: Fri, 20 Mar 2020 13:21:21 -0400 Subject: [PATCH 060/577] rename to LAMMPS_OMP_COMPAT, improve docs --- cmake/CMakeLists.txt | 4 ++-- cmake/README.md | 10 ++++++++++ doc/src/Build_basics.rst | 3 ++- src/omp_compat.h | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 3dea0db8b0..60cbc8e5c0 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -242,9 +242,9 @@ if(BUILD_OMP) if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9)) # GCC 9.x strictly implements OpenMP 4.0 semantics for consts. - add_definitions(-DLMP_OMP_COMPAT=4) + add_definitions(-DLAMMPS_OMP_COMPAT=4) else() - add_definitions(-DLMP_OMP_COMPAT=3) + add_definitions(-DLAMMPS_OMP_COMPAT=3) endif() endif() diff --git a/cmake/README.md b/cmake/README.md index b9dd6d4373..cd90bc7020 100644 --- a/cmake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C;`EVmS9l$<`pdxln_ z_1N^OyD+D?0T?PwNkfh!=a~kK_?@bW2d@>@uJz!)?x=T(m=IKy z0xw$@^Yq~#b&U~yK!S{to3nv0z2P7jc7!xK!eTC*dPDP=xzckTE-Mi6+E7^clMJE>t{vB39gKf3?fOg& f3<5*c)IqATM*Tkl$Nov1|Bm`k{Qo#=`uX->6xEgr diff --git a/doc/src/Eqs/pair_morse_soft.tex b/doc/src/Eqs/pair_morse_soft.tex deleted file mode 100644 index 5e724077e8..0000000000 --- a/doc/src/Eqs/pair_morse_soft.tex +++ /dev/null @@ -1,13 +0,0 @@ -\documentclass[12pt]{article} -\usepackage{amsmath} - -\begin{document} - - -\begin{align*} - s(\lambda) =& (1 - \lambda) / (1 - \lambda_f), \qquad B = -2D e^{-2 \alpha r_0} (e^{\alpha r_0} - 1) / 3 \\ - E =& D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] + s(\lambda) B e^{-3\alpha(r-r_0)}, \qquad \hspace{2.85em}\lambda \geq \lambda_f,\quad r < r_c \\ - E =& \left( D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] + B e^{-3\alpha(r-r_0)} \right)(\lambda/\lambda_f)^n, \qquad \lambda < \lambda_f,\quad r < r_c -\end{align*} - -\end{document} diff --git a/doc/src/Eqs/pair_nm.jpg b/doc/src/Eqs/pair_nm.jpg deleted file mode 100644 index 1e7fe0981c9e35855471a040ba5a83c38fb0fa37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6304 zcmb_gc{CK>+aK8~TM}Ys$X+44F~*XFh9qPeTNtv9tio|8JKy*J_jAv==iGCjbDs0u=eeKzdG6Wh*)-sawkBK?Kt)9bcyK-d zXJmjnfR>tuhK8ECe5LoBXw=p`~M`zskoZrDk*S8aux}r?io0P)gO1fIQ@$?TZ8s8H48- zLF2@?d3YfWLlbl*>1-Tu@vjF}z@L=x{~tt(m%Uh^zb~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,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} - E & = & \sum_i \sum_{j > i} \phi_2 (r_{ij}) + - \sum_i \sum_{j \neq i} \sum_{k > j} - \phi_3 (r_{ij}, r_{ik}, \theta_{ijk}) \\ - \phi_2(r_{ij}) & = & A_{ij} \epsilon_{ij} \left[ B_{ij} (\frac{\sigma_{ij}}{r_{ij}})^{p_{ij}} - - (\frac{\sigma_{ij}}{r_{ij}})^{q_{ij}} \right] - \exp \left( \frac{\sigma_{ij}}{r_{ij} - a_{ij} \sigma_{ij}} \right) \\ - \phi_3(r_{ij},r_{ik},\theta_{ijk}) & = & \lambda_{ijk} \epsilon_{ijk} \left[ \cos \theta_{ijk} - - \cos \theta_{0ijk} \right]^2 - \exp \left( \frac{\gamma_{ij} \sigma_{ij}}{r_{ij} - a_{ij} \sigma_{ij}} \right) - \exp \left( \frac{\gamma_{ik} \sigma_{ik}}{r_{ik} - a_{ik} \sigma_{ik}} \right) -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_tersoff.jpg b/doc/src/Eqs/pair_tersoff.jpg deleted file mode 100644 index bd3e147192707ee8845611fb31abb71410e67006..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 36139 zcmcG#cT`i~w=Wu`sWbtlg{FY0H0hmyNLNrqq)7|a1TcgiItmCR^xhOiL~7{0NC}}A z>7CGp0HOEC_nbT4?~QZLJLld%?%ZSSvBp|!ueJA>bIkRbbAI;K_|-h%j;5-HDu9TH z2%vs_0j{P1$^cSg5)u+(((4;3DJdB_3ZLrhY7@Sv>cD&I@n+DEP?0XP5I z7X-LS2>rh%>|`V6u76%m)+5d(^J@w_Q|0Q*wn9mWC)%>*#5mQX~=l$g^yRIh!? zO*+-X5b;)D??9UP%Kyzb%D;G)r|-*_l;Jhd&Cm4rA!FmyRn-^T6ZQ&oEvhcOmn2dg zCsn8`fDO`QkoJEPhG2Km@D}h)RF7F8Qk6}{K7DdCvVlGuKMK8q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z4Nh5gY_yNADb;Q6ZVWVAv_&Fvjp9+C`hskXzqj+00>VipHEp+ScNy9FKkG$8*& zF_Kypf}v02ccQzxKq~&F8SDspJw{eQ2|3*=e{iBQgZDNj%=BRM`2D97>ij;=czMz! zXA-L$D}!2L?$n#MSx#vgNv=x|KFY0lM^@khq9;9UucG!G?a{Nh5WkgMND`LBkc9Xw ziT|avkwBi9O7gBb%wcL&&`<~@?zL6T2Jqg{=p&dk)i~=nqd06@q)B09XmO6z61oPowD)rl=zMWlz(mK@CH+YC6OR&ptlGzRNLIbni&q+G(wlWsy-=oMZKbuX zj&7qf`&K@vZPJ%~zAUR)5EsCWyF|!wON+NwvorFX_08E3Ox$EYl?OL_GBxA4unu%M zY?|(_@IQpRG9ucU#+_ZN*v;B7onA_B?orj7)W66|E~*)*aPIb7Ru>?I5qdD!SfhR> zxh^Y8u3PQfS8n7EsFuAVh6~?JF8ijs&qiU4q|$m=skaMaLD*&jQwmks)#4I` zRS?Hxi6uXL&5Xl1-d?vV*8oai&Y+e|8InUNS>Bgzc!m&!j>Q>wcywG_zW_W!q=vfg zW>HnAne*&>c0AACE| R + D - \end{array} \right. \\ - f_R(r) & = & A \exp (-\lambda_1 r) \\ - f_A(r) & = & -B \exp (-\lambda_2 r) \\ - b_{ij} & = & \left( 1 + \beta^n {\zeta_{ij}}^n \right)^{-\frac{1}{2n}} \\ - \zeta_{ij} & = & \sum_{k \neq i,j} f_C(r_{ik}) g(\theta_{ijk}) - \exp \left[ {\lambda_3}^m (r_{ij} - r_{ik})^m \right] \\ - g(\theta) & = & \gamma_{ijk} \left( 1 + \frac{c^2}{d^2} - - \frac{c^2}{\left[ d^2 + - (\cos \theta - \cos \theta_0)^2\right]} \right) -\end{eqnarray*} - -\end{document} diff --git a/doc/src/Eqs/pair_tersoff_2.jpg b/doc/src/Eqs/pair_tersoff_2.jpg deleted file mode 100644 index 6cb8778a094253cc38776e110baef3e89948b75b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d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LmVaFA!n!&xaV~t)2Idg9w{k|8ef^V@X zkCA2lu3)rOYMO=Zy4cb~d;f&!%5@Ou60XCw<)ggbOo~(Zw8rqVL_sFPk|m6qF6ahD z*($XwmiCSjPk>!Nq(S@_B;ml1+e?cHpZA*i7n_j`2bAC30BvVpRi?Zm?6I~akt!;M z$?bkZPc{luL$l7T0(<~_hQCLF!ks5?EbkjV(VSV+2w8slt%xoehSslA{hY6Eq& zb182uf;y@Pz-3;CZg0oBI&7KDSFh+jUt*p07y*mec_4nKzkZ5451UeTslgrZPx# diff --git a/doc/src/Eqs/pair_tersoff_2.tex b/doc/src/Eqs/pair_tersoff_2.tex deleted file mode 100644 index 7b5beb8ef3..0000000000 --- a/doc/src/Eqs/pair_tersoff_2.tex +++ /dev/null @@ -1,14 +0,0 @@ -\documentclass[12pt]{article} - -\begin{document} - -\begin{eqnarray*} -\lambda_1^{i,j} &=& \frac{1}{2}(\lambda_1^i + \lambda_1^j)\\ -\lambda_2^{i,j} &=& \frac{1}{2}(\lambda_2^i + \lambda_2^j)\\ -A_{i,j} &=& (A_{i}A_{j})^{1/2}\\ -B_{i,j} &=& \chi_{ij}(B_{i}B_{j})^{1/2}\\ -R_{i,j} &=& (R_{i}R_{j})^{1/2}\\ -S_{i,j} &=& (S_{i}S_{j})^{1/2}\\ -\end{eqnarray*} - -\end{document} \ No newline at end of file diff --git a/doc/src/Eqs/pair_tersoff_mod.jpg b/doc/src/Eqs/pair_tersoff_mod.jpg deleted file mode 100644 index 2618943d85d79e82873253fea293fb98c4d5ac21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 91727 zcmdqI2UJr{+cvuCU3!-yU1>^}77!_c2WirUNGBjfdQTMTRX{*ML@5H&lqyJ(uAm}a zdXwG~ln_Y*|Mq$Q@BO~>uk)|wIUD*}1c4_GGS^duFbC?#cQ0^JRd^P!FmH zkdTl72H*=gU!^C9>gd2s%}w;6f9Zk=06_Q4>HhtDq)Y(d;~VI2u75+&#@0@d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ST_LENGTH_MASK = ~(SUCCESS | EXISTING | FREED_EXISTING) +class UnorderedMapInsertResult { + private: + enum Status { + SUCCESS = 1u << 31, + EXISTING = 1u << 30, + FREED_EXISTING = 1u << 29, + LIST_LENGTH_MASK = ~(SUCCESS | EXISTING | FREED_EXISTING) }; -public: + public: /// Did the map successful insert the key/value pair KOKKOS_FORCEINLINE_FUNCTION bool success() const { return (m_status & SUCCESS); } @@ -102,7 +100,7 @@ public: KOKKOS_FORCEINLINE_FUNCTION bool existing() const { return (m_status & EXISTING); } - /// Did the map fail to insert the key due to insufficient capacity + /// Did the map fail to insert the key due to insufficent capacity KOKKOS_FORCEINLINE_FUNCTION bool failed() const { return m_index == UnorderedMapInvalidIndex; } @@ -121,32 +119,27 @@ public: uint32_t index() const { return m_index; } KOKKOS_FORCEINLINE_FUNCTION - UnorderedMapInsertResult() - : m_index(UnorderedMapInvalidIndex) - , m_status(0) - {} + UnorderedMapInsertResult() : m_index(UnorderedMapInvalidIndex), m_status(0) {} KOKKOS_FORCEINLINE_FUNCTION - void increment_list_position() - { + void increment_list_position() { m_status += (list_position() < LIST_LENGTH_MASK) ? 1u : 0u; } KOKKOS_FORCEINLINE_FUNCTION - void set_existing(uint32_t i, bool arg_freed_existing) - { + void set_existing(uint32_t i, bool arg_freed_existing) { m_index = i; - m_status = EXISTING | (arg_freed_existing ? FREED_EXISTING : 0u) | list_position(); + m_status = + EXISTING | (arg_freed_existing ? FREED_EXISTING : 0u) | list_position(); } KOKKOS_FORCEINLINE_FUNCTION - void set_success(uint32_t i) - { - m_index = i; + void set_success(uint32_t i) { + m_index = i; m_status = SUCCESS | list_position(); } -private: + private: uint32_t m_index; uint32_t m_status; }; @@ -206,26 +199,26 @@ private: /// \tparam EqualTo Definition of the equality function for instances of /// Key. The default will do a bitwise equality comparison. /// -template < typename Key - , typename Value - , typename Device = Kokkos::DefaultExecutionSpace - , typename Hasher = pod_hash::type> - , typename EqualTo = pod_equal_to::type> - > -class UnorderedMap -{ -private: - typedef typename ViewTraits::host_mirror_space host_mirror_space ; -public: +template ::type>, + typename EqualTo = + pod_equal_to::type> > +class UnorderedMap { + private: + typedef typename ViewTraits::host_mirror_space + host_mirror_space; + + public: //! \name Public types and constants //@{ - //key_types + // key_types typedef Key declared_key_type; typedef typename Impl::remove_const::type key_type; typedef typename Impl::add_const::type const_key_type; - //value_types + // value_types typedef Value declared_value_type; typedef typename Impl::remove_const::type value_type; typedef typename Impl::add_const::type const_value_type; @@ -233,116 +226,126 @@ public: typedef Device device_type; typedef typename Device::execution_space execution_space; typedef Hasher hasher_type; - typedef EqualTo equal_to_type; + typedef EqualTo equal_to_type; typedef uint32_t size_type; - //map_types - typedef UnorderedMap declared_map_type; - typedef UnorderedMap insertable_map_type; - typedef UnorderedMap modifiable_map_type; - typedef UnorderedMap const_map_type; + // map_types + typedef UnorderedMap + declared_map_type; + typedef UnorderedMap + insertable_map_type; + typedef UnorderedMap + modifiable_map_type; + typedef UnorderedMap + const_map_type; - static const bool is_set = std::is_same::value; - static const bool has_const_key = std::is_same::value; - static const bool has_const_value = is_set || std::is_same::value; + static const bool is_set = std::is_same::value; + static const bool has_const_key = + std::is_same::value; + static const bool has_const_value = + is_set || std::is_same::value; - static const bool is_insertable_map = !has_const_key && (is_set || !has_const_value); + static const bool is_insertable_map = + !has_const_key && (is_set || !has_const_value); static const bool is_modifiable_map = has_const_key && !has_const_value; - static const bool is_const_map = has_const_key && has_const_value; - + static const bool is_const_map = has_const_key && has_const_value; typedef UnorderedMapInsertResult insert_result; - typedef UnorderedMap HostMirror; + typedef UnorderedMap + HostMirror; typedef Impl::UnorderedMapHistogram histogram_type; //@} -private: + private: enum { invalid_index = ~static_cast(0) }; - typedef typename Impl::if_c< is_set, int, declared_value_type>::type impl_value_type; + typedef typename Impl::if_c::type + impl_value_type; - typedef typename Impl::if_c< is_insertable_map - , View< key_type *, device_type> - , View< const key_type *, device_type, MemoryTraits > - >::type key_type_view; + typedef typename Impl::if_c< + is_insertable_map, View, + View > >::type + key_type_view; - typedef typename Impl::if_c< is_insertable_map || is_modifiable_map - , View< impl_value_type *, device_type> - , View< const impl_value_type *, device_type, MemoryTraits > - >::type value_type_view; + typedef typename Impl::if_c, + View > >::type + value_type_view; - typedef typename Impl::if_c< is_insertable_map - , View< size_type *, device_type> - , View< const size_type *, device_type, MemoryTraits > - >::type size_type_view; + typedef typename Impl::if_c< + is_insertable_map, View, + View > >::type + size_type_view; - typedef typename Impl::if_c< is_insertable_map - , Bitset< execution_space > - , ConstBitset< execution_space> - >::type bitset_type; + typedef typename Impl::if_c, + ConstBitset >::type bitset_type; enum { modified_idx = 0, erasable_idx = 1, failed_insert_idx = 2 }; enum { num_scalars = 3 }; - typedef View< int[num_scalars], LayoutLeft, device_type> scalars_view; + typedef View scalars_view; -public: + public: //! \name Public member functions //@{ UnorderedMap() - : m_bounded_insert() - , m_hasher() - , m_equal_to() - , m_size() - , m_available_indexes() - , m_hash_lists() - , m_next_index() - , m_keys() - , m_values() - , m_scalars() - {} + : m_bounded_insert(), + m_hasher(), + m_equal_to(), + m_size(), + m_available_indexes(), + m_hash_lists(), + m_next_index(), + m_keys(), + m_values(), + m_scalars() {} /// \brief Constructor /// - /// \param capacity_hint [in] Initial guess of how many unique keys will be inserted into the map - /// \param hash [in] Hasher function for \c Key instances. The + /// \param capacity_hint [in] Initial guess of how many unique keys will be + /// inserted into the map \param hash [in] Hasher function for \c Key + /// instances. The /// default value usually suffices. - UnorderedMap( size_type capacity_hint, hasher_type hasher = hasher_type(), equal_to_type equal_to = equal_to_type() ) - : m_bounded_insert(true) - , m_hasher(hasher) - , m_equal_to(equal_to) - , m_size() - , m_available_indexes(calculate_capacity(capacity_hint)) - , m_hash_lists(ViewAllocateWithoutInitializing("UnorderedMap hash list"), Impl::find_hash_size(capacity())) - , m_next_index(ViewAllocateWithoutInitializing("UnorderedMap next index"), capacity()+1) // +1 so that the *_at functions can always return a valid reference - , m_keys("UnorderedMap keys",capacity()+1) - , m_values("UnorderedMap values",(is_set? 1 : capacity()+1)) - , m_scalars("UnorderedMap scalars") - { + UnorderedMap(size_type capacity_hint, hasher_type hasher = hasher_type(), + equal_to_type equal_to = equal_to_type()) + : m_bounded_insert(true), + m_hasher(hasher), + m_equal_to(equal_to), + m_size(), + m_available_indexes(calculate_capacity(capacity_hint)), + m_hash_lists(ViewAllocateWithoutInitializing("UnorderedMap hash list"), + Impl::find_hash_size(capacity())), + m_next_index(ViewAllocateWithoutInitializing("UnorderedMap next index"), + capacity() + 1) // +1 so that the *_at functions can + // always return a valid reference + , + m_keys("UnorderedMap keys", capacity() + 1), + m_values("UnorderedMap values", (is_set ? 1 : capacity() + 1)), + m_scalars("UnorderedMap scalars") { if (!is_insertable_map) { - throw std::runtime_error("Cannot construct a non-insertable (i.e. const key_type) unordered_map"); + throw std::runtime_error( + "Cannot construct a non-insertable (i.e. const key_type) " + "unordered_map"); } Kokkos::deep_copy(m_hash_lists, invalid_index); Kokkos::deep_copy(m_next_index, invalid_index); } - void reset_failed_insert_flag() - { - reset_flag(failed_insert_idx); - } + void reset_failed_insert_flag() { reset_flag(failed_insert_idx); } - histogram_type get_histogram() - { - return histogram_type(*this); - } + histogram_type get_histogram() { return histogram_type(*this); } //! Clear all entries in the table. - void clear() - { + void clear() { m_bounded_insert = true; if (capacity() == 0) return; @@ -353,15 +356,13 @@ public: Kokkos::deep_copy(m_next_index, invalid_index); { const key_type tmp = key_type(); - Kokkos::deep_copy(m_keys,tmp); + Kokkos::deep_copy(m_keys, tmp); } - if (is_set){ + if (is_set) { const impl_value_type tmp = impl_value_type(); - Kokkos::deep_copy(m_values,tmp); - } - { - Kokkos::deep_copy(m_scalars, 0); + Kokkos::deep_copy(m_values, tmp); } + { Kokkos::deep_copy(m_scalars, 0); } } /// \brief Change the capacity of the the map @@ -374,24 +375,23 @@ public: /// /// This is not a device function; it may not be /// called in a parallel kernel. - bool rehash(size_type requested_capacity = 0) - { + bool rehash(size_type requested_capacity = 0) { const bool bounded_insert = (capacity() == 0) || (size() == 0u); - return rehash(requested_capacity, bounded_insert ); + return rehash(requested_capacity, bounded_insert); } - bool rehash(size_type requested_capacity, bool bounded_insert) - { - if(!is_insertable_map) return false; + bool rehash(size_type requested_capacity, bool bounded_insert) { + if (!is_insertable_map) return false; const size_type curr_size = size(); - requested_capacity = (requested_capacity < curr_size) ? curr_size : requested_capacity; + requested_capacity = + (requested_capacity < curr_size) ? curr_size : requested_capacity; insertable_map_type tmp(requested_capacity, m_hasher, m_equal_to); if (curr_size) { tmp.m_bounded_insert = false; - Impl::UnorderedMapRehash f(tmp,*this); + Impl::UnorderedMapRehash f(tmp, *this); f.apply(); } tmp.m_bounded_insert = bounded_insert; @@ -408,9 +408,8 @@ public: /// Note that this is not a device function; it cannot be called in /// a parallel kernel. The value is not stored as a variable; it /// must be computed. - size_type size() const - { - if( capacity() == 0u ) return 0u; + size_type size() const { + if (capacity() == 0u) return 0u; if (modified()) { m_size = m_available_indexes.count(); reset_flag(modified_idx); @@ -423,18 +422,13 @@ public: /// This is not a device function; it may not be /// called in a parallel kernel. The value is not stored as a /// variable; it must be computed. - bool failed_insert() const - { - return get_flag(failed_insert_idx); - } + bool failed_insert() const { return get_flag(failed_insert_idx); } - bool erasable() const - { + bool erasable() const { return is_insertable_map ? get_flag(erasable_idx) : false; } - bool begin_erase() - { + bool begin_erase() { bool result = !erasable(); if (is_insertable_map && result) { execution_space().fence(); @@ -444,8 +438,7 @@ public: return result; } - bool end_erase() - { + bool end_erase() { bool result = erasable(); if (is_insertable_map && result) { execution_space().fence(); @@ -462,8 +455,7 @@ public: /// This is a device function; it may be called in a parallel /// kernel. KOKKOS_FORCEINLINE_FUNCTION - size_type capacity() const - { return m_available_indexes.size(); } + size_type capacity() const { return m_available_indexes.size(); } /// \brief The number of hash table "buckets." /// @@ -476,13 +468,11 @@ public: /// This is a device function; it may be called in a parallel /// kernel. KOKKOS_INLINE_FUNCTION - size_type hash_capacity() const - { return m_hash_lists.extent(0); } + size_type hash_capacity() const { return m_hash_lists.extent(0); } //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- - /// This is a device function; it may be called in a parallel /// kernel. As discussed in the class documentation, it need not /// succeed. The return value tells you if it did. @@ -492,136 +482,138 @@ public: /// using this class as a set (with Value = void), then you need not /// provide this value. KOKKOS_INLINE_FUNCTION - insert_result insert(key_type const& k, impl_value_type const&v = impl_value_type()) const - { + insert_result insert(key_type const &k, + impl_value_type const &v = impl_value_type()) const { insert_result result; - if ( !is_insertable_map || capacity() == 0u || m_scalars((int)erasable_idx) ) { + if (!is_insertable_map || capacity() == 0u || + m_scalars((int)erasable_idx)) { return result; } - if ( !m_scalars((int)modified_idx) ) { + if (!m_scalars((int)modified_idx)) { m_scalars((int)modified_idx) = true; } - int volatile & failed_insert_ref = m_scalars((int)failed_insert_idx) ; + int volatile &failed_insert_ref = m_scalars((int)failed_insert_idx); const size_type hash_value = m_hasher(k); - const size_type hash_list = hash_value % m_hash_lists.extent(0); + const size_type hash_list = hash_value % m_hash_lists.extent(0); - size_type * curr_ptr = & m_hash_lists[ hash_list ]; - size_type new_index = invalid_index ; + size_type *curr_ptr = &m_hash_lists[hash_list]; + size_type new_index = invalid_index; // Force integer multiply to long - size_type index_hint = static_cast( (static_cast(hash_list) * capacity()) / m_hash_lists.extent(0)); + size_type index_hint = static_cast( + (static_cast(hash_list) * capacity()) / m_hash_lists.extent(0)); size_type find_attempts = 0; enum : unsigned { bounded_find_attempts = 32u }; - const size_type max_attempts = (m_bounded_insert && (bounded_find_attempts < m_available_indexes.max_hint()) ) ? - bounded_find_attempts : - m_available_indexes.max_hint(); + const size_type max_attempts = + (m_bounded_insert && + (bounded_find_attempts < m_available_indexes.max_hint())) + ? bounded_find_attempts + : m_available_indexes.max_hint(); - bool not_done = true ; + bool not_done = true; -#if defined( __MIC__ ) - #pragma noprefetch +#if defined(__MIC__) +#pragma noprefetch #endif - while ( not_done ) { - + while (not_done) { // Continue searching the unordered list for this key, // list will only be appended during insert phase. // Need volatile_load as other threads may be appending. size_type curr = volatile_load(curr_ptr); - KOKKOS_NONTEMPORAL_PREFETCH_LOAD(&m_keys[curr != invalid_index ? curr : 0]); -#if defined( __MIC__ ) - #pragma noprefetch + KOKKOS_NONTEMPORAL_PREFETCH_LOAD( + &m_keys[curr != invalid_index ? curr : 0]); +#if defined(__MIC__) +#pragma noprefetch #endif - while ( curr != invalid_index && ! m_equal_to( volatile_load(&m_keys[curr]), k) ) { + while (curr != invalid_index && + !m_equal_to(volatile_load(&m_keys[curr]), k)) { result.increment_list_position(); index_hint = curr; - curr_ptr = &m_next_index[curr]; - curr = volatile_load(curr_ptr); - KOKKOS_NONTEMPORAL_PREFETCH_LOAD(&m_keys[curr != invalid_index ? curr : 0]); + curr_ptr = &m_next_index[curr]; + curr = volatile_load(curr_ptr); + KOKKOS_NONTEMPORAL_PREFETCH_LOAD( + &m_keys[curr != invalid_index ? curr : 0]); } //------------------------------------------------------------ // If key already present then return that index. - if ( curr != invalid_index ) { - + if (curr != invalid_index) { const bool free_existing = new_index != invalid_index; - if ( free_existing ) { + if (free_existing) { // Previously claimed an unused entry that was not inserted. // Release this unused entry immediately. - if (!m_available_indexes.reset(new_index) ) { + if (!m_available_indexes.reset(new_index)) { printf("Unable to free existing\n"); } - } result.set_existing(curr, free_existing); - not_done = false ; + not_done = false; } //------------------------------------------------------------ // Key is not currently in the map. // If the thread has claimed an entry try to insert now. else { - //------------------------------------------------------------ // If have not already claimed an unused entry then do so now. if (new_index == invalid_index) { - bool found = false; // use the hash_list as the flag for the search direction - Kokkos::tie(found, index_hint) = m_available_indexes.find_any_unset_near( index_hint, hash_list ); + Kokkos::tie(found, index_hint) = + m_available_indexes.find_any_unset_near(index_hint, hash_list); // found and index and this thread set it - if ( !found && ++find_attempts >= max_attempts ) { + if (!found && ++find_attempts >= max_attempts) { failed_insert_ref = true; - not_done = false ; - } - else if (m_available_indexes.set(index_hint) ) { + not_done = false; + } else if (m_available_indexes.set(index_hint)) { new_index = index_hint; // Set key and value KOKKOS_NONTEMPORAL_PREFETCH_STORE(&m_keys[new_index]); - m_keys[new_index] = k ; + m_keys[new_index] = k; if (!is_set) { KOKKOS_NONTEMPORAL_PREFETCH_STORE(&m_values[new_index]); - m_values[new_index] = v ; + m_values[new_index] = v; } // Do not proceed until key and value are updated in global memory memory_fence(); } - } - else if (failed_insert_ref) { + } else if (failed_insert_ref) { not_done = false; } // Attempt to append claimed entry into the list. - // Another thread may also be trying to append the same list so protect with atomic. - if ( new_index != invalid_index && - curr == atomic_compare_exchange(curr_ptr, static_cast(invalid_index), new_index) ) { + // Another thread may also be trying to append the same list so protect + // with atomic. + if (new_index != invalid_index && + curr == atomic_compare_exchange( + curr_ptr, static_cast(invalid_index), + new_index)) { // Succeeded in appending result.set_success(new_index); - not_done = false ; + not_done = false; } } - } // while ( not_done ) + } // while ( not_done ) - return result ; + return result; } KOKKOS_INLINE_FUNCTION - bool erase(key_type const& k) const - { + bool erase(key_type const &k) const { bool result = false; - if(is_insertable_map && 0u < capacity() && m_scalars((int)erasable_idx)) { - - if ( ! m_scalars((int)modified_idx) ) { + if (is_insertable_map && 0u < capacity() && m_scalars((int)erasable_idx)) { + if (!m_scalars((int)modified_idx)) { m_scalars((int)modified_idx) = true; } @@ -643,13 +635,15 @@ public: /// This is a device function; it may be called in a parallel /// kernel. KOKKOS_INLINE_FUNCTION - size_type find( const key_type & k) const - { - size_type curr = 0u < capacity() ? m_hash_lists( m_hasher(k) % m_hash_lists.extent(0) ) : invalid_index ; + size_type find(const key_type &k) const { + size_type curr = 0u < capacity() + ? m_hash_lists(m_hasher(k) % m_hash_lists.extent(0)) + : invalid_index; KOKKOS_NONTEMPORAL_PREFETCH_LOAD(&m_keys[curr != invalid_index ? curr : 0]); - while (curr != invalid_index && !m_equal_to( m_keys[curr], k) ) { - KOKKOS_NONTEMPORAL_PREFETCH_LOAD(&m_keys[curr != invalid_index ? curr : 0]); + while (curr != invalid_index && !m_equal_to(m_keys[curr], k)) { + KOKKOS_NONTEMPORAL_PREFETCH_LOAD( + &m_keys[curr != invalid_index ? curr : 0]); curr = m_next_index[curr]; } @@ -661,11 +655,7 @@ public: /// This is a device function; it may be called in a parallel /// kernel. KOKKOS_INLINE_FUNCTION - bool exists( const key_type & k) const - { - return valid_at(find(k)); - } - + bool exists(const key_type &k) const { return valid_at(find(k)); } /// \brief Get the value with \c i as its direct index. /// @@ -676,10 +666,10 @@ public: /// /// 'const value_type' via Cuda texture fetch must return by value. KOKKOS_FORCEINLINE_FUNCTION - typename Impl::if_c< (is_set || has_const_value), impl_value_type, impl_value_type &>::type - value_at(size_type i) const - { - return m_values[ is_set ? 0 : (i < capacity() ? i : capacity()) ]; + typename Impl::if_c<(is_set || has_const_value), impl_value_type, + impl_value_type &>::type + value_at(size_type i) const { + return m_values[is_set ? 0 : (i < capacity() ? i : capacity())]; } /// \brief Get the key with \c i as its direct index. @@ -689,138 +679,154 @@ public: /// This is a device function; it may be called in a parallel /// kernel. KOKKOS_FORCEINLINE_FUNCTION - key_type key_at(size_type i) const - { - return m_keys[ i < capacity() ? i : capacity() ]; + key_type key_at(size_type i) const { + return m_keys[i < capacity() ? i : capacity()]; } KOKKOS_FORCEINLINE_FUNCTION - bool valid_at(size_type i) const - { - return m_available_indexes.test(i); - } + bool valid_at(size_type i) const { return m_available_indexes.test(i); } template - UnorderedMap( UnorderedMap const& src, - typename Impl::enable_if< Impl::UnorderedMapCanAssign::value,int>::type = 0 - ) - : m_bounded_insert(src.m_bounded_insert) - , m_hasher(src.m_hasher) - , m_equal_to(src.m_equal_to) - , m_size(src.m_size) - , m_available_indexes(src.m_available_indexes) - , m_hash_lists(src.m_hash_lists) - , m_next_index(src.m_next_index) - , m_keys(src.m_keys) - , m_values(src.m_values) - , m_scalars(src.m_scalars) - {} - + UnorderedMap( + UnorderedMap const &src, + typename Impl::enable_if< + Impl::UnorderedMapCanAssign::value, + int>::type = 0) + : m_bounded_insert(src.m_bounded_insert), + m_hasher(src.m_hasher), + m_equal_to(src.m_equal_to), + m_size(src.m_size), + m_available_indexes(src.m_available_indexes), + m_hash_lists(src.m_hash_lists), + m_next_index(src.m_next_index), + m_keys(src.m_keys), + m_values(src.m_values), + m_scalars(src.m_scalars) {} template - typename Impl::enable_if< Impl::UnorderedMapCanAssign::value - ,declared_map_type & >::type - operator=( UnorderedMap const& src) - { - m_bounded_insert = src.m_bounded_insert; - m_hasher = src.m_hasher; - m_equal_to = src.m_equal_to; - m_size = src.m_size; + typename Impl::enable_if< + Impl::UnorderedMapCanAssign::value, + declared_map_type &>::type + operator=(UnorderedMap const &src) { + m_bounded_insert = src.m_bounded_insert; + m_hasher = src.m_hasher; + m_equal_to = src.m_equal_to; + m_size = src.m_size; m_available_indexes = src.m_available_indexes; - m_hash_lists = src.m_hash_lists; - m_next_index = src.m_next_index; - m_keys = src.m_keys; - m_values = src.m_values; - m_scalars = src.m_scalars; + m_hash_lists = src.m_hash_lists; + m_next_index = src.m_next_index; + m_keys = src.m_keys; + m_values = src.m_values; + m_scalars = src.m_scalars; return *this; } template - typename Impl::enable_if< std::is_same< typename Impl::remove_const::type, key_type>::value && - std::is_same< typename Impl::remove_const::type, value_type>::value - >::type - create_copy_view( UnorderedMap const& src) - { + typename Impl::enable_if< + std::is_same::type, key_type>::value && + std::is_same::type, + value_type>::value>::type + create_copy_view( + UnorderedMap const &src) { if (m_hash_lists.data() != src.m_hash_lists.data()) { - insertable_map_type tmp; - tmp.m_bounded_insert = src.m_bounded_insert; - tmp.m_hasher = src.m_hasher; - tmp.m_equal_to = src.m_equal_to; - tmp.m_size = src.size(); - tmp.m_available_indexes = bitset_type( src.capacity() ); - tmp.m_hash_lists = size_type_view( ViewAllocateWithoutInitializing("UnorderedMap hash list"), src.m_hash_lists.extent(0) ); - tmp.m_next_index = size_type_view( ViewAllocateWithoutInitializing("UnorderedMap next index"), src.m_next_index.extent(0) ); - tmp.m_keys = key_type_view( ViewAllocateWithoutInitializing("UnorderedMap keys"), src.m_keys.extent(0) ); - tmp.m_values = value_type_view( ViewAllocateWithoutInitializing("UnorderedMap values"), src.m_values.extent(0) ); - tmp.m_scalars = scalars_view("UnorderedMap scalars"); + tmp.m_bounded_insert = src.m_bounded_insert; + tmp.m_hasher = src.m_hasher; + tmp.m_equal_to = src.m_equal_to; + tmp.m_size = src.size(); + tmp.m_available_indexes = bitset_type(src.capacity()); + tmp.m_hash_lists = size_type_view( + ViewAllocateWithoutInitializing("UnorderedMap hash list"), + src.m_hash_lists.extent(0)); + tmp.m_next_index = size_type_view( + ViewAllocateWithoutInitializing("UnorderedMap next index"), + src.m_next_index.extent(0)); + tmp.m_keys = + key_type_view(ViewAllocateWithoutInitializing("UnorderedMap keys"), + src.m_keys.extent(0)); + tmp.m_values = value_type_view( + ViewAllocateWithoutInitializing("UnorderedMap values"), + src.m_values.extent(0)); + tmp.m_scalars = scalars_view("UnorderedMap scalars"); Kokkos::deep_copy(tmp.m_available_indexes, src.m_available_indexes); - typedef Kokkos::Impl::DeepCopy< typename device_type::memory_space, typename SDevice::memory_space > raw_deep_copy; + typedef Kokkos::Impl::DeepCopy + raw_deep_copy; - raw_deep_copy(tmp.m_hash_lists.data(), src.m_hash_lists.data(), sizeof(size_type)*src.m_hash_lists.extent(0)); - raw_deep_copy(tmp.m_next_index.data(), src.m_next_index.data(), sizeof(size_type)*src.m_next_index.extent(0)); - raw_deep_copy(tmp.m_keys.data(), src.m_keys.data(), sizeof(key_type)*src.m_keys.extent(0)); + raw_deep_copy(tmp.m_hash_lists.data(), src.m_hash_lists.data(), + sizeof(size_type) * src.m_hash_lists.extent(0)); + raw_deep_copy(tmp.m_next_index.data(), src.m_next_index.data(), + sizeof(size_type) * src.m_next_index.extent(0)); + raw_deep_copy(tmp.m_keys.data(), src.m_keys.data(), + sizeof(key_type) * src.m_keys.extent(0)); if (!is_set) { - raw_deep_copy(tmp.m_values.data(), src.m_values.data(), sizeof(impl_value_type)*src.m_values.extent(0)); + raw_deep_copy(tmp.m_values.data(), src.m_values.data(), + sizeof(impl_value_type) * src.m_values.extent(0)); } - raw_deep_copy(tmp.m_scalars.data(), src.m_scalars.data(), sizeof(int)*num_scalars ); + raw_deep_copy(tmp.m_scalars.data(), src.m_scalars.data(), + sizeof(int) * num_scalars); *this = tmp; } } //@} -private: // private member functions + private: // private member functions + bool modified() const { return get_flag(modified_idx); } - bool modified() const - { - return get_flag(modified_idx); - } - - void set_flag(int flag) const - { - typedef Kokkos::Impl::DeepCopy< typename device_type::memory_space, Kokkos::HostSpace > raw_deep_copy; + void set_flag(int flag) const { + typedef Kokkos::Impl::DeepCopy + raw_deep_copy; const int true_ = true; raw_deep_copy(m_scalars.data() + flag, &true_, sizeof(int)); } - void reset_flag(int flag) const - { - typedef Kokkos::Impl::DeepCopy< typename device_type::memory_space, Kokkos::HostSpace > raw_deep_copy; + void reset_flag(int flag) const { + typedef Kokkos::Impl::DeepCopy + raw_deep_copy; const int false_ = false; raw_deep_copy(m_scalars.data() + flag, &false_, sizeof(int)); } - bool get_flag(int flag) const - { - typedef Kokkos::Impl::DeepCopy< Kokkos::HostSpace, typename device_type::memory_space > raw_deep_copy; + bool get_flag(int flag) const { + typedef Kokkos::Impl::DeepCopy + raw_deep_copy; int result = false; raw_deep_copy(&result, m_scalars.data() + flag, sizeof(int)); return result; } - static uint32_t calculate_capacity(uint32_t capacity_hint) - { + static uint32_t calculate_capacity(uint32_t capacity_hint) { // increase by 16% and round to nears multiple of 128 - return capacity_hint ? ((static_cast(7ull*capacity_hint/6u) + 127u)/128u)*128u : 128u; + return capacity_hint + ? ((static_cast(7ull * capacity_hint / 6u) + 127u) / + 128u) * + 128u + : 128u; } -private: // private members - bool m_bounded_insert; - hasher_type m_hasher; - equal_to_type m_equal_to; + private: // private members + bool m_bounded_insert; + hasher_type m_hasher; + equal_to_type m_equal_to; mutable size_type m_size; - bitset_type m_available_indexes; - size_type_view m_hash_lists; - size_type_view m_next_index; - key_type_view m_keys; - value_type_view m_values; - scalars_view m_scalars; + bitset_type m_available_indexes; + size_type_view m_hash_lists; + size_type_view m_next_index; + key_type_view m_keys; + value_type_view m_values; + scalars_view m_scalars; - template + template friend class UnorderedMap; template @@ -834,17 +840,14 @@ private: // private members }; // Specialization of deep_copy for two UnorderedMap objects. -template < typename DKey, typename DT, typename DDevice - , typename SKey, typename ST, typename SDevice - , typename Hasher, typename EqualTo > -inline void deep_copy( UnorderedMap & dst - , const UnorderedMap & src ) -{ +template +inline void deep_copy( + UnorderedMap &dst, + const UnorderedMap &src) { dst.create_copy_view(src); } +} // namespace Kokkos -} // namespace Kokkos - -#endif //KOKKOS_UNORDERED_MAP_HPP - +#endif // KOKKOS_UNORDERED_MAP_HPP diff --git a/lib/kokkos/containers/src/Kokkos_Vector.hpp b/lib/kokkos/containers/src/Kokkos_Vector.hpp index a44d1f58b5..8962485abe 100644 --- a/lib/kokkos/containers/src/Kokkos_Vector.hpp +++ b/lib/kokkos/containers/src/Kokkos_Vector.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,15 +49,15 @@ #include /* Drop in replacement for std::vector based on Kokkos::DualView - * Most functions only work on the host (it will not compile if called from device kernel) + * Most functions only work on the host (it will not compile if called from + * device kernel) * */ - namespace Kokkos { +namespace Kokkos { -template< class Scalar, class Arg1Type = void> -class vector : public DualView { - -public: +template +class vector : public DualView { + public: typedef Scalar value_type; typedef Scalar* pointer; typedef const Scalar* const_pointer; @@ -64,213 +65,259 @@ public: typedef const Scalar& const_reference; typedef Scalar* iterator; typedef const Scalar* const_iterator; - -private: - size_t _size; typedef size_t size_type; + + private: + size_t _size; float _extra_storage; - typedef DualView DV; + typedef DualView DV; - -public: + public: #ifdef KOKKOS_ENABLE_CUDA_UVM - KOKKOS_INLINE_FUNCTION reference operator() (int i) const {return DV::h_view(i);}; - KOKKOS_INLINE_FUNCTION reference operator[] (int i) const {return DV::h_view(i);}; + KOKKOS_INLINE_FUNCTION reference operator()(int i) const { + return DV::h_view(i); + }; + KOKKOS_INLINE_FUNCTION reference operator[](int i) const { + return DV::h_view(i); + }; #else - inline reference operator() (int i) const {return DV::h_view(i);}; - inline reference operator[] (int i) const {return DV::h_view(i);}; + inline reference operator()(int i) const { return DV::h_view(i); }; + inline reference operator[](int i) const { return DV::h_view(i); }; #endif /* Member functions which behave like std::vector functions */ - vector():DV() { - _size = 0; + vector() : DV() { + _size = 0; _extra_storage = 1.1; } - - vector(int n, Scalar val=Scalar()):DualView("Vector",size_t(n*(1.1))) { - _size = n; - _extra_storage = 1.1; + vector(int n, Scalar val = Scalar()) + : DualView("Vector", size_t(n * (1.1))) { + _size = n; + _extra_storage = 1.1; DV::modified_flags(0) = 1; - assign(n,val); + assign(n, val); } - void resize(size_t n) { - if(n>=span()) - DV::resize(size_t (n*_extra_storage)); + if (n >= span()) DV::resize(size_t(n * _extra_storage)); _size = n; } - void resize(size_t n, const Scalar& val) { - assign(n,val); - } + void resize(size_t n, const Scalar& val) { assign(n, val); } - void assign (size_t n, const Scalar& val) { + void assign(size_t n, const Scalar& val) { + /* Resize if necessary (behavour of std:vector) */ - /* Resize if necessary (behavior of std:vector) */ - - if(n>span()) - DV::resize(size_t (n*_extra_storage)); + if (n > span()) DV::resize(size_t(n * _extra_storage)); _size = n; - /* Assign value either on host or on device */ + /* Assign value either on host or on device */ - if( DV::template need_sync() ) { - set_functor_host f(DV::h_view,val); - parallel_for(n,f); + if (DV::template need_sync()) { + set_functor_host f(DV::h_view, val); + parallel_for(n, f); typename DV::t_host::execution_space().fence(); DV::template modify(); } else { - set_functor f(DV::d_view,val); - parallel_for(n,f); + set_functor f(DV::d_view, val); + parallel_for(n, f); typename DV::t_dev::execution_space().fence(); DV::template modify(); } } - void reserve(size_t n) { - DV::resize(size_t (n*_extra_storage)); - } + void reserve(size_t n) { DV::resize(size_t(n * _extra_storage)); } void push_back(Scalar val) { DV::template sync(); DV::template modify(); - if(_size == span()) { - size_t new_size = _size*_extra_storage; - if(new_size == _size) new_size++; + if (_size == span()) { + size_t new_size = _size * _extra_storage; + if (new_size == _size) new_size++; DV::resize(new_size); } DV::h_view(_size) = val; _size++; - } - void pop_back() { - _size--; + void pop_back() { _size--; } + + void clear() { _size = 0; } + + iterator insert(iterator it, const value_type& val) { + return insert(it, 1, val); } - void clear() { - _size = 0; + iterator insert(iterator it, size_type count, const value_type& val) { + if ((size() == 0) && (it == begin())) { + resize(count, val); + DV::sync_host(); + return begin(); + } + DV::sync_host(); + DV::modify_host(); + if (it < begin() || it > end()) + Kokkos::abort("Kokkos::vector::insert : invalid insert iterator"); + if (count == 0) return it; + ptrdiff_t start = std::distance(begin(), it); + auto org_size = size(); + resize(size() + count); + + std::copy_backward(begin() + start, begin() + org_size, + begin() + org_size + count); + std::fill_n(begin() + start, count, val); + + return begin() + start; } - size_type size() const {return _size;} - size_type max_size() const {return 2000000000;} + private: + template + struct impl_is_input_iterator + : /* TODO replace this */ std::integral_constant< + bool, !std::is_convertible::value> {}; + + public: + // TODO: can use detection idiom to generate better error message here later + template + typename std::enable_if::value, + iterator>::type + insert(iterator it, InputIterator b, InputIterator e) { + ptrdiff_t count = std::distance(b, e); + if (count == 0) return it; + + DV::sync_host(); + DV::modify_host(); + if (it < begin() || it > end()) + Kokkos::abort("Kokkos::vector::insert : invalid insert iterator"); + + bool resized = false; + if ((size() == 0) && (it == begin())) { + resize(count); + it = begin(); + resized = true; + } + ptrdiff_t start = std::distance(begin(), it); + auto org_size = size(); + if (!resized) resize(size() + count); + it = begin() + start; + + std::copy_backward(begin() + start, begin() + org_size, + begin() + org_size + count); + std::copy(b, e, it); + + return begin() + start; + } + + size_type size() const { return _size; } + size_type max_size() const { return 2000000000; } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - size_type capacity() const {return DV::capacity();} + size_type capacity() const { return DV::capacity(); } #endif - size_type span() const {return DV::span();} - bool empty() const {return _size==0;} + size_type span() const { return DV::span(); } + bool empty() const { return _size == 0; } - iterator begin() const {return &DV::h_view(0);} + iterator begin() const { return DV::h_view.data(); } - iterator end() const {return &DV::h_view(_size);} + iterator end() const { + return _size > 0 ? DV::h_view.data() + _size : DV::h_view.data(); + } - reference front() {return DV::h_view(0);} + reference front() { return DV::h_view(0); } - reference back() {return DV::h_view(_size - 1);} + reference back() { return DV::h_view(_size - 1); } - const_reference front() const {return DV::h_view(0);} + const_reference front() const { return DV::h_view(0); } - const_reference back() const {return DV::h_view(_size - 1);} + const_reference back() const { return DV::h_view(_size - 1); } - /* std::algorithms which work originally with iterators, here they are implemented as member functions */ + /* std::algorithms wich work originally with iterators, here they are + * implemented as member functions */ - size_t - lower_bound (const size_t& start, - const size_t& theEnd, - const Scalar& comp_val) const - { - int lower = start; // FIXME (mfh 24 Apr 2014) narrowing conversion - int upper = _size > theEnd? theEnd : _size-1; // FIXME (mfh 24 Apr 2014) narrowing conversion + size_t lower_bound(const size_t& start, const size_t& theEnd, + const Scalar& comp_val) const { + int lower = start; // FIXME (mfh 24 Apr 2014) narrowing conversion + int upper = + _size > theEnd + ? theEnd + : _size - 1; // FIXME (mfh 24 Apr 2014) narrowing conversion if (upper <= lower) { return theEnd; } Scalar lower_val = DV::h_view(lower); Scalar upper_val = DV::h_view(upper); - size_t idx = (upper+lower)/2; - Scalar val = DV::h_view(idx); - if(val>upper_val) return upper; - if(val upper_val) return upper; + if (val < lower_val) return start; - while(upper>lower) { - if(comp_val>val) { + while (upper > lower) { + if (comp_val > val) { lower = ++idx; } else { upper = idx; } - idx = (upper+lower)/2; + idx = (upper + lower) / 2; val = DV::h_view(idx); } return idx; } bool is_sorted() { - for(int i=0;i<_size-1;i++) { - if(DV::h_view(i)>DV::h_view(i+1)) return false; + for (int i = 0; i < _size - 1; i++) { + if (DV::h_view(i) > DV::h_view(i + 1)) return false; } return true; } iterator find(Scalar val) const { - if(_size == 0) return end(); + if (_size == 0) return end(); - int upper,lower,current; - current = _size/2; - upper = _size-1; - lower = 0; + int upper, lower, current; + current = _size / 2; + upper = _size - 1; + lower = 0; - if((valDV::h_view(_size-1)) ) return end(); + if ((val < DV::h_view(0)) || (val > DV::h_view(_size - 1))) return end(); - while(upper>lower) - { - if(val>DV::h_view(current)) lower = current+1; - else upper = current; - current = (upper+lower)/2; + while (upper > lower) { + if (val > DV::h_view(current)) + lower = current + 1; + else + upper = current; + current = (upper + lower) / 2; } - if(val==DV::h_view(current)) return &DV::h_view(current); - else return end(); + if (val == DV::h_view(current)) + return &DV::h_view(current); + else + return end(); } /* Additional functions for data management */ - void device_to_host(){ - deep_copy(DV::h_view,DV::d_view); - } - void host_to_device() const { - deep_copy(DV::d_view,DV::h_view); - } + void device_to_host() { deep_copy(DV::h_view, DV::d_view); } + void host_to_device() const { deep_copy(DV::d_view, DV::h_view); } - void on_host() { - DV::template modify(); - } - void on_device() { - DV::template modify(); - } + void on_host() { DV::template modify(); } + void on_device() { DV::template modify(); } - void set_overallocation(float extra) { - _extra_storage = 1.0 + extra; - } + void set_overallocation(float extra) { _extra_storage = 1.0 + extra; } - -public: + public: struct set_functor { typedef typename DV::t_dev::execution_space execution_space; typename DV::t_dev _data; Scalar _val; - set_functor(typename DV::t_dev data, Scalar val) : - _data(data),_val(val) {} + set_functor(typename DV::t_dev data, Scalar val) : _data(data), _val(val) {} KOKKOS_INLINE_FUNCTION - void operator() (const int &i) const { - _data(i) = _val; - } + void operator()(const int& i) const { _data(i) = _val; } }; struct set_functor_host { @@ -278,18 +325,13 @@ public: typename DV::t_host _data; Scalar _val; - set_functor_host(typename DV::t_host data, Scalar val) : - _data(data),_val(val) {} + set_functor_host(typename DV::t_host data, Scalar val) + : _data(data), _val(val) {} KOKKOS_INLINE_FUNCTION - void operator() (const int &i) const { - _data(i) = _val; - } + void operator()(const int& i) const { _data(i) = _val; } }; - }; - -} +} // namespace Kokkos #endif - diff --git a/lib/kokkos/containers/src/impl/Kokkos_Bitset_impl.hpp b/lib/kokkos/containers/src/impl/Kokkos_Bitset_impl.hpp index 7ea2e102ce..f5fa4d518a 100644 --- a/lib/kokkos/containers/src/impl/Kokkos_Bitset_impl.hpp +++ b/lib/kokkos/containers/src/impl/Kokkos_Bitset_impl.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -57,53 +58,44 @@ namespace Kokkos { namespace Impl { KOKKOS_FORCEINLINE_FUNCTION -unsigned rotate_right( unsigned i, int r ) -{ - enum { size = static_cast( sizeof(unsigned) * CHAR_BIT ) }; - return r ? ( ( i >> r ) | ( i << ( size - r ) ) ) : i ; +unsigned rotate_right(unsigned i, int r) { + enum { size = static_cast(sizeof(unsigned) * CHAR_BIT) }; + return r ? ((i >> r) | (i << (size - r))) : i; } -template < typename Bitset > -struct BitsetCount -{ - typedef Bitset bitset_type; - typedef typename bitset_type::execution_space::execution_space execution_space; - typedef typename bitset_type::size_type size_type; - typedef size_type value_type; +template +struct BitsetCount { + typedef Bitset bitset_type; + typedef + typename bitset_type::execution_space::execution_space execution_space; + typedef typename bitset_type::size_type size_type; + typedef size_type value_type; bitset_type m_bitset; - BitsetCount( bitset_type const& bitset ) - : m_bitset(bitset) - {} + BitsetCount(bitset_type const& bitset) : m_bitset(bitset) {} - size_type apply() const - { + size_type apply() const { size_type count = 0u; - parallel_reduce( m_bitset.m_blocks.extent(0), *this, count ); + parallel_reduce(m_bitset.m_blocks.extent(0), *this, count); return count; } KOKKOS_INLINE_FUNCTION - void init( value_type & count ) const - { - count = 0u; - } + void init(value_type& count) const { count = 0u; } KOKKOS_INLINE_FUNCTION - void join( volatile value_type & count, const volatile size_type & incr ) const - { + void join(volatile value_type& count, const volatile size_type& incr) const { count += incr; } KOKKOS_INLINE_FUNCTION - void operator()( size_type i, value_type & count ) const - { - count += bit_count( m_bitset.m_blocks[i] ); + void operator()(size_type i, value_type& count) const { + count += bit_count(m_bitset.m_blocks[i]); } }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos -#endif // KOKKOS_BITSET_IMPL_HPP +#endif // KOKKOS_BITSET_IMPL_HPP diff --git a/lib/kokkos/containers/src/impl/Kokkos_Functional_impl.hpp b/lib/kokkos/containers/src/impl/Kokkos_Functional_impl.hpp index 8b17dcce4b..6ba67766aa 100644 --- a/lib/kokkos/containers/src/impl/Kokkos_Functional_impl.hpp +++ b/lib/kokkos/containers/src/impl/Kokkos_Functional_impl.hpp @@ -1,10 +1,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,28 +46,24 @@ #include #include -namespace Kokkos { namespace Impl { +namespace Kokkos { +namespace Impl { // MurmurHash3 was written by Austin Appleby, and is placed in the public // domain. The author hereby disclaims copyright to this source code. KOKKOS_FORCEINLINE_FUNCTION -uint32_t getblock32 ( const uint8_t * p, int i ) -{ -// used to avoid aliasing error which could cause errors with -// forced inlining - return ((uint32_t)p[i*4+0]) - | ((uint32_t)p[i*4+1] << 8) - | ((uint32_t)p[i*4+2] << 16) - | ((uint32_t)p[i*4+3] << 24); +uint32_t getblock32(const uint8_t* p, int i) { + // used to avoid aliasing error which could cause errors with + // forced inlining + return ((uint32_t)p[i * 4 + 0]) | ((uint32_t)p[i * 4 + 1] << 8) | + ((uint32_t)p[i * 4 + 2] << 16) | ((uint32_t)p[i * 4 + 3] << 24); } KOKKOS_FORCEINLINE_FUNCTION -uint32_t rotl32 ( uint32_t x, int8_t r ) -{ return (x << r) | (x >> (32 - r)); } +uint32_t rotl32(uint32_t x, int8_t r) { return (x << r) | (x >> (32 - r)); } KOKKOS_FORCEINLINE_FUNCTION -uint32_t fmix32 ( uint32_t h ) -{ +uint32_t fmix32(uint32_t h) { h ^= h >> 16; h *= 0x85ebca6b; h ^= h >> 13; @@ -77,10 +74,9 @@ uint32_t fmix32 ( uint32_t h ) } KOKKOS_INLINE_FUNCTION -uint32_t MurmurHash3_x86_32 ( const void * key, int len, uint32_t seed ) -{ - const uint8_t * data = (const uint8_t*)key; - const int nblocks = len / 4; +uint32_t MurmurHash3_x86_32(const void* key, int len, uint32_t seed) { + const uint8_t* data = (const uint8_t*)key; + const int nblocks = len / 4; uint32_t h1 = seed; @@ -90,32 +86,34 @@ uint32_t MurmurHash3_x86_32 ( const void * key, int len, uint32_t seed ) //---------- // body - for(int i=0; i -KOKKOS_FORCEINLINE_FUNCTION -bool bitwise_equal(T const * const a_ptr, T const * const b_ptr) -{ +KOKKOS_FORCEINLINE_FUNCTION bool bitwise_equal(T const* const a_ptr, + T const* const b_ptr) { typedef uint64_t KOKKOS_IMPL_MAY_ALIAS T64; typedef uint32_t KOKKOS_IMPL_MAY_ALIAS T32; typedef uint16_t KOKKOS_IMPL_MAY_ALIAS T16; - typedef uint8_t KOKKOS_IMPL_MAY_ALIAS T8; + typedef uint8_t KOKKOS_IMPL_MAY_ALIAS T8; enum { NUM_8 = sizeof(T), @@ -158,39 +153,37 @@ bool bitwise_equal(T const * const a_ptr, T const * const b_ptr) }; union { - T const * const ptr; - T64 const * const ptr64; - T32 const * const ptr32; - T16 const * const ptr16; - T8 const * const ptr8; + T const* const ptr; + T64 const* const ptr64; + T32 const* const ptr32; + T16 const* const ptr16; + T8 const* const ptr8; } a = {a_ptr}, b = {b_ptr}; bool result = true; - for (int i=0; i < NUM_64; ++i) { + for (int i = 0; i < NUM_64; ++i) { result = result && a.ptr64[i] == b.ptr64[i]; } - if ( NUM_64*2 < NUM_32 ) { - result = result && a.ptr32[NUM_64*2] == b.ptr32[NUM_64*2]; + if (NUM_64 * 2 < NUM_32) { + result = result && a.ptr32[NUM_64 * 2] == b.ptr32[NUM_64 * 2]; } - if ( NUM_32*2 < NUM_16 ) { - result = result && a.ptr16[NUM_32*2] == b.ptr16[NUM_32*2]; + if (NUM_32 * 2 < NUM_16) { + result = result && a.ptr16[NUM_32 * 2] == b.ptr16[NUM_32 * 2]; } - if ( NUM_16*2 < NUM_8 ) { - result = result && a.ptr8[NUM_16*2] == b.ptr8[NUM_16*2]; + if (NUM_16 * 2 < NUM_8) { + result = result && a.ptr8[NUM_16 * 2] == b.ptr8[NUM_16 * 2]; } return result; } - - #undef KOKKOS_IMPL_MAY_ALIAS -}} // namespace Kokkos::Impl - -#endif //KOKKOS_FUNCTIONAL_IMPL_HPP +} // namespace Impl +} // namespace Kokkos +#endif // KOKKOS_FUNCTIONAL_IMPL_HPP diff --git a/lib/kokkos/containers/src/impl/Kokkos_StaticCrsGraph_factory.hpp b/lib/kokkos/containers/src/impl/Kokkos_StaticCrsGraph_factory.hpp index 743c345b45..d644c57c0a 100644 --- a/lib/kokkos/containers/src/impl/Kokkos_StaticCrsGraph_factory.hpp +++ b/lib/kokkos/containers/src/impl/Kokkos_StaticCrsGraph_factory.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -50,193 +51,207 @@ namespace Kokkos { #ifdef KOKKOS_ENABLE_DEPRECATED_CODE -template< class DataType , class Arg1Type , class Arg2Type , typename SizeType , class Arg3Type> -inline -typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type >::HostMirror -create_mirror_view( const StaticCrsGraph & view , - typename Impl::enable_if< ViewTraits::is_hostspace >::type * = 0 ) -{ - return view ; +template +inline typename StaticCrsGraph::HostMirror +create_mirror_view( + const StaticCrsGraph& + view, + typename Impl::enable_if::is_hostspace>::type* = 0) { + return view; } #else -template< class DataType , class Arg1Type , class Arg2Type , class Arg3Type, typename SizeType > -inline -typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType >::HostMirror -create_mirror_view( const StaticCrsGraph & view , - typename Impl::enable_if< ViewTraits::is_hostspace >::type * = 0 ) -{ - return view ; +template +inline typename StaticCrsGraph::HostMirror +create_mirror_view( + const StaticCrsGraph& + view, + typename Impl::enable_if::is_hostspace>::type* = 0) { + return view; } #endif #ifdef KOKKOS_ENABLE_DEPRECATED_CODE -template< class DataType , class Arg1Type , class Arg2Type , typename SizeType , class Arg3Type> -inline -typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type >::HostMirror -create_mirror( const StaticCrsGraph & view ) -{ +template +inline typename StaticCrsGraph::HostMirror +create_mirror(const StaticCrsGraph& view) { // Force copy: - //typedef Impl::ViewAssignment< Impl::ViewDefault > alloc ; // unused - typedef StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type > staticcrsgraph_type ; + // typedef Impl::ViewAssignment< Impl::ViewDefault > alloc ; // unused + typedef StaticCrsGraph + staticcrsgraph_type; #else -template< class DataType , class Arg1Type , class Arg2Type , class Arg3Type, typename SizeType > -inline -typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType >::HostMirror -create_mirror( const StaticCrsGraph & view ) -{ +template +inline typename StaticCrsGraph::HostMirror +create_mirror(const StaticCrsGraph& view) { // Force copy: - //typedef Impl::ViewAssignment< Impl::ViewDefault > alloc ; // unused - typedef StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType > staticcrsgraph_type ; + // typedef Impl::ViewAssignment< Impl::ViewDefault > alloc ; // unused + typedef StaticCrsGraph + staticcrsgraph_type; #endif - typename staticcrsgraph_type::HostMirror tmp ; - typename staticcrsgraph_type::row_map_type::HostMirror tmp_row_map = create_mirror( view.row_map); - typename staticcrsgraph_type::row_block_type::HostMirror tmp_row_block_offsets = create_mirror( view.row_block_offsets); + typename staticcrsgraph_type::HostMirror tmp; + typename staticcrsgraph_type::row_map_type::HostMirror tmp_row_map = + create_mirror(view.row_map); + typename staticcrsgraph_type::row_block_type::HostMirror + tmp_row_block_offsets = create_mirror(view.row_block_offsets); // Allocation to match: - tmp.row_map = tmp_row_map ; // Assignment of 'const' from 'non-const' - tmp.entries = create_mirror( view.entries ); - tmp.row_block_offsets = tmp_row_block_offsets ; // Assignment of 'const' from 'non-const' + tmp.row_map = tmp_row_map; // Assignment of 'const' from 'non-const' + tmp.entries = create_mirror(view.entries); + tmp.row_block_offsets = + tmp_row_block_offsets; // Assignment of 'const' from 'non-const' // Deep copy: - deep_copy( tmp_row_map , view.row_map ); - deep_copy( tmp.entries , view.entries ); - deep_copy( tmp_row_block_offsets , view.row_block_offsets ); + deep_copy(tmp_row_map, view.row_map); + deep_copy(tmp.entries, view.entries); + deep_copy(tmp_row_block_offsets, view.row_block_offsets); - return tmp ; + return tmp; } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE -template< class DataType , class Arg1Type , class Arg2Type , typename SizeType , class Arg3Type> -inline -typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type >::HostMirror -create_mirror_view( const StaticCrsGraph & view , - typename Impl::enable_if< ! ViewTraits::is_hostspace >::type * = 0 ) +template +inline typename StaticCrsGraph::HostMirror +create_mirror_view( + const StaticCrsGraph& + view, + typename Impl::enable_if::is_hostspace>::type* = 0) #else -template< class DataType , class Arg1Type , class Arg2Type , class Arg3Type, typename SizeType > -inline -typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType >::HostMirror -create_mirror_view( const StaticCrsGraph & view , - typename Impl::enable_if< ! ViewTraits::is_hostspace >::type * = 0 ) +template +inline typename StaticCrsGraph::HostMirror +create_mirror_view( + const StaticCrsGraph& + view, + typename Impl::enable_if::is_hostspace>::type* = 0) #endif { - return create_mirror( view ); + return create_mirror(view); } -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { -template< class StaticCrsGraphType , class InputSizeType > -inline -typename StaticCrsGraphType::staticcrsgraph_type -create_staticcrsgraph( const std::string & label , - const std::vector< InputSizeType > & input ) -{ - typedef StaticCrsGraphType output_type ; - //typedef std::vector< InputSizeType > input_type ; // unused +template +inline typename StaticCrsGraphType::staticcrsgraph_type create_staticcrsgraph( + const std::string& label, const std::vector& input) { + typedef StaticCrsGraphType output_type; + // typedef std::vector< InputSizeType > input_type ; // unused - typedef typename output_type::entries_type entries_type ; + typedef typename output_type::entries_type entries_type; - typedef View< typename output_type::size_type [] , - typename output_type::array_layout , - typename output_type::execution_space, - typename output_type::memory_traits > work_type ; + typedef View + work_type; - output_type output ; + output_type output; // Create the row map: const size_t length = input.size(); { - work_type row_work( "tmp" , length + 1 ); + work_type row_work("tmp", length + 1); - typename work_type::HostMirror row_work_host = - create_mirror_view( row_work ); + typename work_type::HostMirror row_work_host = create_mirror_view(row_work); - size_t sum = 0 ; - row_work_host[0] = 0 ; - for ( size_t i = 0 ; i < length ; ++i ) { - row_work_host[i+1] = sum += input[i]; + size_t sum = 0; + row_work_host[0] = 0; + for (size_t i = 0; i < length; ++i) { + row_work_host[i + 1] = sum += input[i]; } - deep_copy( row_work , row_work_host ); + deep_copy(row_work, row_work_host); - output.entries = entries_type( label , sum ); - output.row_map = row_work ; + output.entries = entries_type(label, sum); + output.row_map = row_work; } - return output ; + return output; } //---------------------------------------------------------------------------- -template< class StaticCrsGraphType , class InputSizeType > -inline -typename StaticCrsGraphType::staticcrsgraph_type -create_staticcrsgraph( const std::string & label , - const std::vector< std::vector< InputSizeType > > & input ) -{ - typedef StaticCrsGraphType output_type ; - typedef typename output_type::entries_type entries_type ; +template +inline typename StaticCrsGraphType::staticcrsgraph_type create_staticcrsgraph( + const std::string& label, + const std::vector >& input) { + typedef StaticCrsGraphType output_type; + typedef typename output_type::entries_type entries_type; - static_assert( entries_type::rank == 1 - , "Graph entries view must be rank one" ); + static_assert(entries_type::rank == 1, "Graph entries view must be rank one"); - typedef View< typename output_type::size_type [] , - typename output_type::array_layout , - typename output_type::execution_space, - typename output_type::memory_traits > work_type ; + typedef View + work_type; - output_type output ; + output_type output; - // Create the row map: + // Create the row map: const size_t length = input.size(); { - work_type row_work( "tmp" , length + 1 ); + work_type row_work("tmp", length + 1); - typename work_type::HostMirror row_work_host = - create_mirror_view( row_work ); + typename work_type::HostMirror row_work_host = create_mirror_view(row_work); - size_t sum = 0 ; - row_work_host[0] = 0 ; - for ( size_t i = 0 ; i < length ; ++i ) { - row_work_host[i+1] = sum += input[i].size(); + size_t sum = 0; + row_work_host[0] = 0; + for (size_t i = 0; i < length; ++i) { + row_work_host[i + 1] = sum += input[i].size(); } - deep_copy( row_work , row_work_host ); + deep_copy(row_work, row_work_host); - output.entries = entries_type( label , sum ); - output.row_map = row_work ; + output.entries = entries_type(label, sum); + output.row_map = row_work; } // Fill in the entries: { typename entries_type::HostMirror host_entries = - create_mirror_view( output.entries ); + create_mirror_view(output.entries); - size_t sum = 0 ; - for ( size_t i = 0 ; i < length ; ++i ) { - for ( size_t j = 0 ; j < input[i].size() ; ++j , ++sum ) { - host_entries( sum ) = input[i][j] ; + size_t sum = 0; + for (size_t i = 0; i < length; ++i) { + for (size_t j = 0; j < input[i].size(); ++j, ++sum) { + host_entries(sum) = input[i][j]; } } - deep_copy( output.entries , host_entries ); + deep_copy(output.entries, host_entries); } - return output ; + return output; } -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- #endif /* #ifndef KOKKOS_IMPL_CRSARRAY_FACTORY_HPP */ - diff --git a/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.cpp b/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.cpp index 88ca200daf..e10e256b6a 100644 --- a/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.cpp +++ b/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.cpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,58 +37,62 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ #include -namespace Kokkos { namespace Impl { +namespace Kokkos { +namespace Impl { -uint32_t find_hash_size(uint32_t size) -{ +uint32_t find_hash_size(uint32_t size) { if (size == 0u) return 0u; // these primes try to preserve randomness of hash - static const uint32_t primes [] = { - 3, 7, 13, 23, 53, 97, 193, 389, 769, 1543 - , 2237, 2423, 2617, 2797, 2999, 3167, 3359, 3539 - , 3727, 3911, 4441 , 4787 , 5119 , 5471 , 5801 , 6143 , 6521 , 6827 - , 7177 , 7517 , 7853 , 8887 , 9587 , 10243 , 10937 , 11617 , 12289 - , 12967 , 13649 , 14341 , 15013 , 15727 - , 17749 , 19121 , 20479 , 21859 , 23209 , 24593 , 25939 , 27329 - , 28669 , 30047 , 31469 , 35507 , 38231 , 40961 , 43711 , 46439 - , 49157 , 51893 , 54617 , 57347 , 60077 , 62801 , 70583 , 75619 - , 80669 , 85703 , 90749 , 95783 , 100823 , 105871 , 110909 , 115963 - , 120997 , 126031 , 141157 , 151237 , 161323 , 171401 , 181499 , 191579 - , 201653 , 211741 , 221813 , 231893 , 241979 , 252079 - , 282311 , 302483 , 322649 , 342803 , 362969 , 383143 , 403301 , 423457 - , 443629 , 463787 , 483953 , 504121 , 564617 , 604949 , 645313 , 685609 - , 725939 , 766273 , 806609 , 846931 , 887261 , 927587 , 967919 , 1008239 - , 1123477 , 1198397 , 1273289 , 1348177 , 1423067 , 1497983 , 1572869 - , 1647761 , 1722667 , 1797581 , 1872461 , 1947359 , 2022253 - , 2246953 , 2396759 , 2546543 , 2696363 , 2846161 , 2995973 , 3145739 - , 3295541 , 3445357 , 3595117 , 3744941 , 3894707 , 4044503 - , 4493921 , 4793501 , 5093089 , 5392679 , 5692279 , 5991883 , 6291469 - , 6591059 , 6890641 , 7190243 , 7489829 , 7789447 , 8089033 - , 8987807 , 9586981 , 10186177 , 10785371 , 11384539 , 11983729 - , 12582917 , 13182109 , 13781291 , 14380469 , 14979667 , 15578861 - , 16178053 , 17895707 , 19014187 , 20132683 , 21251141 , 22369661 - , 23488103 , 24606583 , 25725083 , 26843549 , 27962027 , 29080529 - , 30198989 , 31317469 , 32435981 , 35791397 , 38028379 , 40265327 - , 42502283 , 44739259 , 46976221 , 49213237 , 51450131 , 53687099 - , 55924061 , 58161041 , 60397993 , 62634959 , 64871921 - , 71582857 , 76056727 , 80530643 , 85004567 , 89478503 , 93952427 - , 98426347 , 102900263 , 107374217 , 111848111 , 116322053 , 120795971 - , 125269877 , 129743807 , 143165587 , 152113427 , 161061283 , 170009141 - , 178956983 , 187904819 , 196852693 , 205800547 , 214748383 , 223696237 - , 232644089 , 241591943 , 250539763 , 259487603 , 268435399 - }; + static const uint32_t primes[] = { + 3, 7, 13, 23, 53, 97, + 193, 389, 769, 1543, 2237, 2423, + 2617, 2797, 2999, 3167, 3359, 3539, + 3727, 3911, 4441, 4787, 5119, 5471, + 5801, 6143, 6521, 6827, 7177, 7517, + 7853, 8887, 9587, 10243, 10937, 11617, + 12289, 12967, 13649, 14341, 15013, 15727, + 17749, 19121, 20479, 21859, 23209, 24593, + 25939, 27329, 28669, 30047, 31469, 35507, + 38231, 40961, 43711, 46439, 49157, 51893, + 54617, 57347, 60077, 62801, 70583, 75619, + 80669, 85703, 90749, 95783, 100823, 105871, + 110909, 115963, 120997, 126031, 141157, 151237, + 161323, 171401, 181499, 191579, 201653, 211741, + 221813, 231893, 241979, 252079, 282311, 302483, + 322649, 342803, 362969, 383143, 403301, 423457, + 443629, 463787, 483953, 504121, 564617, 604949, + 645313, 685609, 725939, 766273, 806609, 846931, + 887261, 927587, 967919, 1008239, 1123477, 1198397, + 1273289, 1348177, 1423067, 1497983, 1572869, 1647761, + 1722667, 1797581, 1872461, 1947359, 2022253, 2246953, + 2396759, 2546543, 2696363, 2846161, 2995973, 3145739, + 3295541, 3445357, 3595117, 3744941, 3894707, 4044503, + 4493921, 4793501, 5093089, 5392679, 5692279, 5991883, + 6291469, 6591059, 6890641, 7190243, 7489829, 7789447, + 8089033, 8987807, 9586981, 10186177, 10785371, 11384539, + 11983729, 12582917, 13182109, 13781291, 14380469, 14979667, + 15578861, 16178053, 17895707, 19014187, 20132683, 21251141, + 22369661, 23488103, 24606583, 25725083, 26843549, 27962027, + 29080529, 30198989, 31317469, 32435981, 35791397, 38028379, + 40265327, 42502283, 44739259, 46976221, 49213237, 51450131, + 53687099, 55924061, 58161041, 60397993, 62634959, 64871921, + 71582857, 76056727, 80530643, 85004567, 89478503, 93952427, + 98426347, 102900263, 107374217, 111848111, 116322053, 120795971, + 125269877, 129743807, 143165587, 152113427, 161061283, 170009141, + 178956983, 187904819, 196852693, 205800547, 214748383, 223696237, + 232644089, 241591943, 250539763, 259487603, 268435399}; - const uint32_t num_primes = sizeof(primes)/sizeof(uint32_t); + const uint32_t num_primes = sizeof(primes) / sizeof(uint32_t); - uint32_t hsize = primes[num_primes-1] ; + uint32_t hsize = primes[num_primes - 1]; for (uint32_t i = 0; i < num_primes; ++i) { if (size <= primes[i]) { hsize = primes[i]; @@ -97,5 +102,5 @@ uint32_t find_hash_size(uint32_t size) return hsize; } -}} // namespace Kokkos::Impl - +} // namespace Impl +} // namespace Kokkos diff --git a/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.hpp b/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.hpp index f97c1fc046..55e76c424d 100644 --- a/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.hpp +++ b/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -52,42 +53,34 @@ #include #include -namespace Kokkos { namespace Impl { +namespace Kokkos { +namespace Impl { -uint32_t find_hash_size( uint32_t size ); +uint32_t find_hash_size(uint32_t size); template -struct UnorderedMapRehash -{ +struct UnorderedMapRehash { typedef Map map_type; typedef typename map_type::const_map_type const_map_type; typedef typename map_type::execution_space execution_space; typedef typename map_type::size_type size_type; - map_type m_dst; + map_type m_dst; const_map_type m_src; - UnorderedMapRehash( map_type const& dst, const_map_type const& src) - : m_dst(dst), m_src(src) - {} + UnorderedMapRehash(map_type const& dst, const_map_type const& src) + : m_dst(dst), m_src(src) {} - void apply() const - { - parallel_for(m_src.capacity(), *this); - } + void apply() const { parallel_for(m_src.capacity(), *this); } KOKKOS_INLINE_FUNCTION - void operator()(size_type i) const - { - if ( m_src.valid_at(i) ) - m_dst.insert(m_src.key_at(i), m_src.value_at(i)); + void operator()(size_type i) const { + if (m_src.valid_at(i)) m_dst.insert(m_src.key_at(i), m_src.value_at(i)); } - }; template -struct UnorderedMapErase -{ +struct UnorderedMapErase { typedef UMap map_type; typedef typename map_type::execution_space execution_space; typedef typename map_type::size_type size_type; @@ -96,18 +89,12 @@ struct UnorderedMapErase map_type m_map; - UnorderedMapErase( map_type const& map) - : m_map(map) - {} + UnorderedMapErase(map_type const& map) : m_map(map) {} - void apply() const - { - parallel_for(m_map.m_hash_lists.extent(0), *this); - } + void apply() const { parallel_for(m_map.m_hash_lists.extent(0), *this); } KOKKOS_INLINE_FUNCTION - void operator()( size_type i ) const - { + void operator()(size_type i) const { const size_type invalid_index = map_type::invalid_index; size_type curr = m_map.m_hash_lists(i); @@ -115,29 +102,28 @@ struct UnorderedMapErase // remove erased head of the linked-list while (curr != invalid_index && !m_map.valid_at(curr)) { - next = m_map.m_next_index[curr]; + next = m_map.m_next_index[curr]; m_map.m_next_index[curr] = invalid_index; - m_map.m_keys[curr] = key_type(); + m_map.m_keys[curr] = key_type(); if (m_map.is_set) m_map.m_values[curr] = value_type(); - curr = next; + curr = next; m_map.m_hash_lists(i) = next; } // if the list is non-empty and the head is valid - if (curr != invalid_index && m_map.valid_at(curr) ) { + if (curr != invalid_index && m_map.valid_at(curr)) { size_type prev = curr; - curr = m_map.m_next_index[prev]; + curr = m_map.m_next_index[prev]; while (curr != invalid_index) { next = m_map.m_next_index[curr]; if (m_map.valid_at(curr)) { prev = curr; - } - else { + } else { // remove curr from list m_map.m_next_index[prev] = next; m_map.m_next_index[curr] = invalid_index; - m_map.m_keys[curr] = key_type(); + m_map.m_keys[curr] = key_type(); if (map_type::is_set) m_map.m_values[curr] = value_type(); } curr = next; @@ -147,8 +133,7 @@ struct UnorderedMapErase }; template -struct UnorderedMapHistogram -{ +struct UnorderedMapHistogram { typedef UMap map_type; typedef typename map_type::execution_space execution_space; typedef typename map_type::size_type size_type; @@ -161,117 +146,100 @@ struct UnorderedMapHistogram histogram_view m_distance; histogram_view m_block_distance; - UnorderedMapHistogram( map_type const& map) - : m_map(map) - , m_length("UnorderedMap Histogram") - , m_distance("UnorderedMap Histogram") - , m_block_distance("UnorderedMap Histogram") - {} + UnorderedMapHistogram(map_type const& map) + : m_map(map), + m_length("UnorderedMap Histogram"), + m_distance("UnorderedMap Histogram"), + m_block_distance("UnorderedMap Histogram") {} - void calculate() - { - parallel_for(m_map.m_hash_lists.extent(0), *this); - } + void calculate() { parallel_for(m_map.m_hash_lists.extent(0), *this); } - void clear() - { + void clear() { Kokkos::deep_copy(m_length, 0); Kokkos::deep_copy(m_distance, 0); Kokkos::deep_copy(m_block_distance, 0); } - void print_length(std::ostream &out) - { + void print_length(std::ostream& out) { host_histogram_view host_copy = create_mirror_view(m_length); Kokkos::deep_copy(host_copy, m_length); - for (int i=0, size = host_copy.extent(0); i -struct UnorderedMapPrint -{ +struct UnorderedMapPrint { typedef UMap map_type; typedef typename map_type::execution_space execution_space; typedef typename map_type::size_type size_type; map_type m_map; - UnorderedMapPrint( map_type const& map) - : m_map(map) - {} + UnorderedMapPrint(map_type const& map) : m_map(map) {} - void apply() - { - parallel_for(m_map.m_hash_lists.extent(0), *this); - } + void apply() { parallel_for(m_map.m_hash_lists.extent(0), *this); } KOKKOS_INLINE_FUNCTION - void operator()( size_type i ) const - { + void operator()(size_type i) const { const size_type invalid_index = map_type::invalid_index; uint32_t list = m_map.m_hash_lists(i); - for (size_type curr = list, ii=0; curr != invalid_index; curr = m_map.m_next_index[curr], ++ii) { - printf("%d[%d]: %d->%d\n", list, ii, m_map.key_at(curr), m_map.value_at(curr)); + for (size_type curr = list, ii = 0; curr != invalid_index; + curr = m_map.m_next_index[curr], ++ii) { + printf("%d[%d]: %d->%d\n", list, ii, m_map.key_at(curr), + m_map.value_at(curr)); } } }; @@ -280,19 +248,20 @@ template struct UnorderedMapCanAssign : public false_ {}; template -struct UnorderedMapCanAssign : public true_ {}; +struct UnorderedMapCanAssign : public true_ {}; template -struct UnorderedMapCanAssign : public true_ {}; +struct UnorderedMapCanAssign : public true_ {}; template -struct UnorderedMapCanAssign : public true_ {}; +struct UnorderedMapCanAssign + : public true_ {}; template -struct UnorderedMapCanAssign : public true_ {}; +struct UnorderedMapCanAssign + : public true_ {}; +} // namespace Impl +} // namespace Kokkos -}} //Kokkos::Impl - -#endif // KOKKOS_UNORDERED_MAP_IMPL_HPP - +#endif // KOKKOS_UNORDERED_MAP_IMPL_HPP diff --git a/lib/kokkos/containers/unit_tests/CMakeLists.txt b/lib/kokkos/containers/unit_tests/CMakeLists.txt index 8564bd9ddd..a83ab1293c 100644 --- a/lib/kokkos/containers/unit_tests/CMakeLists.txt +++ b/lib/kokkos/containers/unit_tests/CMakeLists.txt @@ -1,138 +1,35 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../src ) - -IF(NOT KOKKOS_HAS_TRILINOS) - IF(KOKKOS_SEPARATE_LIBS) - set(TEST_LINK_TARGETS kokkoscore) - ELSE() - set(TEST_LINK_TARGETS kokkos) - ENDIF() -ENDIF() - -IF(Kokkos_ENABLE_Pthread) -TRIBITS_ADD_EXECUTABLE_AND_TEST( - UnitTest_Threads - SOURCES - UnitTestMain.cpp - threads/TestThreads_BitSet.cpp - threads/TestThreads_DualView.cpp - threads/TestThreads_DynamicView.cpp - threads/TestThreads_DynRankViewAPI_generic.cpp - threads/TestThreads_DynRankViewAPI_rank12345.cpp - threads/TestThreads_DynRankViewAPI_rank67.cpp - threads/TestThreads_ErrorReporter.cpp - threads/TestThreads_OffsetView.cpp - threads/TestThreads_ScatterView.cpp - threads/TestThreads_StaticCrsGraph.cpp - threads/TestThreads_UnorderedMap.cpp - threads/TestThreads_Vector.cpp - threads/TestThreads_ViewCtorPropEmbeddedDim.cpp - COMM serial mpi - NUM_MPI_PROCS 1 - FAIL_REGULAR_EXPRESSION " FAILED " - TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS} - ) -ENDIF() - -IF(Kokkos_ENABLE_Serial) -TRIBITS_ADD_EXECUTABLE_AND_TEST( - UnitTest_Serial - SOURCES - UnitTestMain.cpp - serial/TestSerial_BitSet.cpp - serial/TestSerial_DualView.cpp - serial/TestSerial_DynamicView.cpp - serial/TestSerial_DynRankViewAPI_generic.cpp - serial/TestSerial_DynRankViewAPI_rank12345.cpp - serial/TestSerial_DynRankViewAPI_rank67.cpp - serial/TestSerial_ErrorReporter.cpp - serial/TestSerial_OffsetView.cpp - serial/TestSerial_ScatterView.cpp - serial/TestSerial_StaticCrsGraph.cpp - serial/TestSerial_UnorderedMap.cpp - serial/TestSerial_Vector.cpp - serial/TestSerial_ViewCtorPropEmbeddedDim.cpp - COMM serial mpi - NUM_MPI_PROCS 1 - FAIL_REGULAR_EXPRESSION " FAILED " - TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS} - ) -ENDIF() - -IF(Kokkos_ENABLE_OpenMP) -TRIBITS_ADD_EXECUTABLE_AND_TEST( - UnitTest_OpenMP - SOURCES - UnitTestMain.cpp - openmp/TestOpenMP_BitSet.cpp - openmp/TestOpenMP_DualView.cpp - openmp/TestOpenMP_DynamicView.cpp - openmp/TestOpenMP_DynRankViewAPI_generic.cpp - openmp/TestOpenMP_DynRankViewAPI_rank12345.cpp - openmp/TestOpenMP_DynRankViewAPI_rank67.cpp - openmp/TestOpenMP_ErrorReporter.cpp - openmp/TestOpenMP_OffsetView.cpp - openmp/TestOpenMP_ScatterView.cpp - openmp/TestOpenMP_StaticCrsGraph.cpp - openmp/TestOpenMP_UnorderedMap.cpp - openmp/TestOpenMP_Vector.cpp - openmp/TestOpenMP_ViewCtorPropEmbeddedDim.cpp - COMM serial mpi - NUM_MPI_PROCS 1 - FAIL_REGULAR_EXPRESSION " FAILED " - TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS} - ) -ENDIF() - -IF(Kokkos_ENABLE_HPX) -TRIBITS_ADD_EXECUTABLE_AND_TEST( - UnitTest_HPX - SOURCES - UnitTestMain.cpp - hpx/TestHPX_BitSet.cpp - hpx/TestHPX_DualView.cpp - hpx/TestHPX_DynamicView.cpp - hpx/TestHPX_DynRankViewAPI_generic.cpp - hpx/TestHPX_DynRankViewAPI_rank12345.cpp - hpx/TestHPX_DynRankViewAPI_rank67.cpp - hpx/TestHPX_ErrorReporter.cpp - hpx/TestHPX_OffsetView.cpp - hpx/TestHPX_ScatterView.cpp - hpx/TestHPX_StaticCrsGraph.cpp - hpx/TestHPX_UnorderedMap.cpp - hpx/TestHPX_Vector.cpp - hpx/TestHPX_ViewCtorPropEmbeddedDim.cpp - COMM serial mpi - NUM_MPI_PROCS 1 - FAIL_REGULAR_EXPRESSION " FAILED " - TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS} - ) -ENDIF() - -IF(Kokkos_ENABLE_Cuda) -TRIBITS_ADD_EXECUTABLE_AND_TEST( - UnitTest_Cuda - SOURCES - UnitTestMain.cpp - cuda/TestCuda_BitSet.cpp - cuda/TestCuda_DualView.cpp - cuda/TestCuda_DynamicView.cpp - cuda/TestCuda_DynRankViewAPI_generic.cpp - cuda/TestCuda_DynRankViewAPI_rank12345.cpp - cuda/TestCuda_DynRankViewAPI_rank67.cpp - cuda/TestCuda_ErrorReporter.cpp - cuda/TestCuda_OffsetView.cpp - cuda/TestCuda_ScatterView.cpp - cuda/TestCuda_StaticCrsGraph.cpp - cuda/TestCuda_UnorderedMap.cpp - cuda/TestCuda_Vector.cpp - cuda/TestCuda_ViewCtorPropEmbeddedDim.cpp - COMM serial mpi - NUM_MPI_PROCS 1 - FAIL_REGULAR_EXPRESSION " FAILED " - TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS} - ) -ENDIF() +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +KOKKOS_INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}) +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../src ) +foreach(Tag Threads;Serial;OpenMP;HPX;Cuda) + # Because there is always an exception to the rule + if(Tag STREQUAL "Threads") + set(DEVICE "PTHREAD") + else() + string(TOUPPER ${Tag} DEVICE) + endif() + string(TOLOWER ${Tag} dir) + # Add test for that backend if it is enabled + if(Kokkos_ENABLE_${DEVICE}) + KOKKOS_ADD_EXECUTABLE_AND_TEST( + UnitTest_${Tag} + SOURCES + UnitTestMain.cpp + ${dir}/Test${Tag}_BitSet.cpp + ${dir}/Test${Tag}_DualView.cpp + ${dir}/Test${Tag}_DynamicView.cpp + ${dir}/Test${Tag}_DynRankViewAPI_generic.cpp + ${dir}/Test${Tag}_DynRankViewAPI_rank12345.cpp + ${dir}/Test${Tag}_DynRankViewAPI_rank67.cpp + ${dir}/Test${Tag}_ErrorReporter.cpp + ${dir}/Test${Tag}_OffsetView.cpp + ${dir}/Test${Tag}_ScatterView.cpp + ${dir}/Test${Tag}_StaticCrsGraph.cpp + ${dir}/Test${Tag}_UnorderedMap.cpp + ${dir}/Test${Tag}_Vector.cpp + ${dir}/Test${Tag}_ViewCtorPropEmbeddedDim.cpp + ) + endif() +endforeach() diff --git a/lib/kokkos/containers/unit_tests/TestBitset.hpp b/lib/kokkos/containers/unit_tests/TestBitset.hpp index 55d0e8b938..70528880a4 100644 --- a/lib/kokkos/containers/unit_tests/TestBitset.hpp +++ b/lib/kokkos/containers/unit_tests/TestBitset.hpp @@ -1,12 +1,13 @@ //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -35,7 +36,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER @@ -52,240 +53,208 @@ namespace Test { namespace Impl { template -struct TestBitset -{ +struct TestBitset { typedef Bitset bitset_type; typedef typename bitset_type::execution_space execution_space; typedef uint32_t value_type; bitset_type m_bitset; - TestBitset( bitset_type const& bitset) - : m_bitset(bitset) - {} + TestBitset(bitset_type const& bitset) : m_bitset(bitset) {} - unsigned testit(unsigned collisions) - { + unsigned testit(unsigned collisions) { execution_space().fence(); unsigned count = 0; - Kokkos::parallel_reduce( m_bitset.size()*collisions, *this, count); + Kokkos::parallel_reduce(m_bitset.size() * collisions, *this, count); return count; } + KOKKOS_INLINE_FUNCTION + void init(value_type& v) const { v = 0; } KOKKOS_INLINE_FUNCTION - void init( value_type & v ) const { v = 0; } + void join(volatile value_type& dst, const volatile value_type& src) const { + dst += src; + } KOKKOS_INLINE_FUNCTION - void join( volatile value_type & dst, const volatile value_type & src ) const - { dst += src; } - - KOKKOS_INLINE_FUNCTION - void operator()(uint32_t i, value_type & v) const - { + void operator()(uint32_t i, value_type& v) const { i = i % m_bitset.size(); if (Set) { if (m_bitset.set(i)) { if (m_bitset.test(i)) ++v; } - } - else { + } else { if (m_bitset.reset(i)) { if (!m_bitset.test(i)) ++v; } } } - }; template -struct TestBitsetTest -{ +struct TestBitsetTest { typedef Bitset bitset_type; typedef typename bitset_type::execution_space execution_space; typedef uint32_t value_type; bitset_type m_bitset; - TestBitsetTest( bitset_type const& bitset) - : m_bitset(bitset) - {} + TestBitsetTest(bitset_type const& bitset) : m_bitset(bitset) {} - unsigned testit() - { + unsigned testit() { execution_space().fence(); unsigned count = 0; - Kokkos::parallel_reduce( m_bitset.size(), *this, count); + Kokkos::parallel_reduce(m_bitset.size(), *this, count); return count; } + KOKKOS_INLINE_FUNCTION + void init(value_type& v) const { v = 0; } KOKKOS_INLINE_FUNCTION - void init( value_type & v ) const { v = 0; } + void join(volatile value_type& dst, const volatile value_type& src) const { + dst += src; + } KOKKOS_INLINE_FUNCTION - void join( volatile value_type & dst, const volatile value_type & src ) const - { dst += src; } - - KOKKOS_INLINE_FUNCTION - void operator()(uint32_t i, value_type & v) const - { - if (m_bitset.test( i )) ++v; + void operator()(uint32_t i, value_type& v) const { + if (m_bitset.test(i)) ++v; } }; template -struct TestBitsetAny -{ +struct TestBitsetAny { typedef Bitset bitset_type; typedef typename bitset_type::execution_space execution_space; typedef uint32_t value_type; bitset_type m_bitset; - TestBitsetAny( bitset_type const& bitset) - : m_bitset(bitset) - {} + TestBitsetAny(bitset_type const& bitset) : m_bitset(bitset) {} - unsigned testit() - { + unsigned testit() { execution_space().fence(); unsigned count = 0; - Kokkos::parallel_reduce( m_bitset.size(), *this, count); + Kokkos::parallel_reduce(m_bitset.size(), *this, count); return count; } + KOKKOS_INLINE_FUNCTION + void init(value_type& v) const { v = 0; } KOKKOS_INLINE_FUNCTION - void init( value_type & v ) const { v = 0; } + void join(volatile value_type& dst, const volatile value_type& src) const { + dst += src; + } KOKKOS_INLINE_FUNCTION - void join( volatile value_type & dst, const volatile value_type & src ) const - { dst += src; } - - KOKKOS_INLINE_FUNCTION - void operator()(uint32_t i, value_type & v) const - { - bool result = false; + void operator()(uint32_t i, value_type& v) const { + bool result = false; unsigned attempts = 0; - uint32_t hint = (i >> 4) << 4; + uint32_t hint = (i >> 4) << 4; while (attempts < m_bitset.max_hint()) { if (Set) { Kokkos::tie(result, hint) = m_bitset.find_any_unset_near(hint, i); if (result && m_bitset.set(hint)) { ++v; break; - } - else if (!result) { + } else if (!result) { ++attempts; } - } - else { + } else { Kokkos::tie(result, hint) = m_bitset.find_any_set_near(hint, i); if (result && m_bitset.reset(hint)) { ++v; break; - } - else if (!result) { + } else if (!result) { ++attempts; } } } } - }; -} // namespace Impl - - +} // namespace Impl template -void test_bitset() -{ - typedef Kokkos::Bitset< Device > bitset_type; - typedef Kokkos::ConstBitset< Device > const_bitset_type; +void test_bitset() { + typedef Kokkos::Bitset bitset_type; + typedef Kokkos::ConstBitset const_bitset_type; - //unsigned test_sizes[] = { 0u, 1000u, 1u<<14, 1u<<16, 10000001 }; - unsigned test_sizes[] = { 1000u, 1u<<14, 1u<<16, 10000001 }; + // unsigned test_sizes[] = { 0u, 1000u, 1u<<14, 1u<<16, 10000001 }; + unsigned test_sizes[] = {1000u, 1u << 14, 1u << 16, 10000001}; - for (int i=0, end = sizeof(test_sizes)/sizeof(unsigned); i f(bitset); + Impl::TestBitsetTest f(bitset); uint32_t count = f.testit(); EXPECT_EQ(0u, count); EXPECT_EQ(count, bitset.count()); } - //std::cout << " Check set() " << std::endl; + // std::cout << " Check set() " << std::endl; bitset.set(); // everything should be set { - Impl::TestBitsetTest< const_bitset_type > f(bitset); + Impl::TestBitsetTest f(bitset); uint32_t count = f.testit(); EXPECT_EQ(bitset.size(), count); EXPECT_EQ(count, bitset.count()); } - //std::cout << " Check reset() " << std::endl; + // std::cout << " Check reset() " << std::endl; bitset.reset(); EXPECT_EQ(0u, bitset.count()); - //std::cout << " Check set(i) " << std::endl; + // std::cout << " Check set(i) " << std::endl; // test setting bits { - Impl::TestBitset< bitset_type, true > f(bitset); + Impl::TestBitset f(bitset); uint32_t count = f.testit(10u); - EXPECT_EQ( bitset.size(), bitset.count()); - EXPECT_EQ( bitset.size(), count ); + EXPECT_EQ(bitset.size(), bitset.count()); + EXPECT_EQ(bitset.size(), count); } - //std::cout << " Check reset(i) " << std::endl; + // std::cout << " Check reset(i) " << std::endl; // test resetting bits { - Impl::TestBitset< bitset_type, false > f(bitset); + Impl::TestBitset f(bitset); uint32_t count = f.testit(10u); - EXPECT_EQ( bitset.size(), count); - EXPECT_EQ( 0u, bitset.count() ); + EXPECT_EQ(bitset.size(), count); + EXPECT_EQ(0u, bitset.count()); } - - //std::cout << " Check find_any_set(i) " << std::endl; + // std::cout << " Check find_any_set(i) " << std::endl; // test setting any bits { - Impl::TestBitsetAny< bitset_type, true > f(bitset); + Impl::TestBitsetAny f(bitset); uint32_t count = f.testit(); - EXPECT_EQ( bitset.size(), bitset.count()); - EXPECT_EQ( bitset.size(), count ); + EXPECT_EQ(bitset.size(), bitset.count()); + EXPECT_EQ(bitset.size(), count); } - //std::cout << " Check find_any_unset(i) " << std::endl; + // std::cout << " Check find_any_unset(i) " << std::endl; // test resetting any bits { - Impl::TestBitsetAny< bitset_type, false > f(bitset); + Impl::TestBitsetAny f(bitset); uint32_t count = f.testit(); - EXPECT_EQ( bitset.size(), count); - EXPECT_EQ( 0u, bitset.count() ); + EXPECT_EQ(bitset.size(), count); + EXPECT_EQ(0u, bitset.count()); } - } - } -TEST_F( TEST_CATEGORY, bitset ) -{ - test_bitset(); -} +TEST(TEST_CATEGORY, bitset) { test_bitset(); } -} // namespace Test - -#endif //KOKKOS_TEST_BITSET_HPP +} // namespace Test +#endif // KOKKOS_TEST_BITSET_HPP diff --git a/lib/kokkos/containers/unit_tests/TestDualView.hpp b/lib/kokkos/containers/unit_tests/TestDualView.hpp index 767f93c093..572ef48839 100644 --- a/lib/kokkos/containers/unit_tests/TestDualView.hpp +++ b/lib/kokkos/containers/unit_tests/TestDualView.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -55,169 +56,159 @@ namespace Test { namespace Impl { - template - struct test_dualview_combinations - { - typedef test_dualview_combinations self_type; +template +struct test_dualview_combinations { + typedef test_dualview_combinations self_type; - typedef Scalar scalar_type; - typedef Device execution_space; + typedef Scalar scalar_type; + typedef Device execution_space; - Scalar reference; - Scalar result; + Scalar reference; + Scalar result; - template - Scalar run_me(unsigned int n,unsigned int m){ - if(n<10) n = 10; - if(m<3) m = 3; - ViewType a("A",n,m); + template + Scalar run_me(unsigned int n, unsigned int m) { + if (n < 10) n = 10; + if (m < 3) m = 3; + ViewType a("A", n, m); - Kokkos::deep_copy( a.d_view , 1 ); + Kokkos::deep_copy(a.d_view, 1); - a.template modify(); - a.template sync(); + a.template modify(); + a.template sync(); - a.h_view(5,1) = 3; - a.h_view(6,1) = 4; - a.h_view(7,2) = 5; - a.template modify(); - ViewType b = Kokkos::subview(a,std::pair(6,9),std::pair(0,1)); - a.template sync(); - b.template modify(); + a.h_view(5, 1) = 3; + a.h_view(6, 1) = 4; + a.h_view(7, 2) = 5; + a.template modify(); + ViewType b = Kokkos::subview(a, std::pair(6, 9), + std::pair(0, 1)); + a.template sync(); + b.template modify(); - Kokkos::deep_copy( b.d_view , 2 ); + Kokkos::deep_copy(b.d_view, 2); - a.template sync(); - Scalar count = 0; - for(unsigned int i = 0; i(); + Scalar count = 0; + for (unsigned int i = 0; i < a.d_view.extent(0); i++) + for (unsigned int j = 0; j < a.d_view.extent(1); j++) + count += a.h_view(i, j); + return count - a.d_view.extent(0) * a.d_view.extent(1) - 2 - 4 - 3 * 2; + } + + test_dualview_combinations(unsigned int size) { + result = run_me >( + size, 3); + } +}; + +template +struct SumViewEntriesFunctor { + typedef Scalar value_type; + + ViewType fv; + + SumViewEntriesFunctor(const ViewType& fv_) : fv(fv_) {} + + KOKKOS_INLINE_FUNCTION + void operator()(const int i, value_type& total) const { + for (size_t j = 0; j < fv.extent(1); ++j) { + total += fv(i, j); } + } +}; +template +struct test_dual_view_deep_copy { + typedef Scalar scalar_type; + typedef Device execution_space; - test_dualview_combinations(unsigned int size) - { - result = run_me< Kokkos::DualView >(size,3); - } + template + void run_me() { + const unsigned int n = 10; + const unsigned int m = 5; + const unsigned int sum_total = n * m; - }; + ViewType a("A", n, m); + ViewType b("B", n, m); - template < typename Scalar, class ViewType > - struct SumViewEntriesFunctor { + Kokkos::deep_copy(a.d_view, 1); - typedef Scalar value_type; + a.template modify(); + a.template sync(); - ViewType fv; + // Check device view is initialized as expected + scalar_type a_d_sum = 0; + // Execute on the execution_space associated with t_dev's memory space + typedef typename ViewType::t_dev::memory_space::execution_space + t_dev_exec_space; + Kokkos::parallel_reduce( + Kokkos::RangePolicy(0, n), + SumViewEntriesFunctor(a.d_view), + a_d_sum); + ASSERT_EQ(a_d_sum, sum_total); - SumViewEntriesFunctor ( const ViewType & fv_ ) : fv(fv_) {} - - KOKKOS_INLINE_FUNCTION - void operator() ( const int i , value_type & total ) const { - for ( size_t j = 0; j < fv.extent(1); ++j ) { - total += fv(i,j); + // Check host view is synced as expected + scalar_type a_h_sum = 0; + for (size_t i = 0; i < a.h_view.extent(0); ++i) + for (size_t j = 0; j < a.h_view.extent(1); ++j) { + a_h_sum += a.h_view(i, j); } - } - }; - + ASSERT_EQ(a_h_sum, sum_total); - template - struct test_dual_view_deep_copy - { - typedef Scalar scalar_type; - typedef Device execution_space; + // Test deep_copy + Kokkos::deep_copy(b, a); + b.template sync(); - template - void run_me() { + // Perform same checks on b as done on a + // Check device view is initialized as expected + scalar_type b_d_sum = 0; + // Execute on the execution_space associated with t_dev's memory space + Kokkos::parallel_reduce( + Kokkos::RangePolicy(0, n), + SumViewEntriesFunctor(b.d_view), + b_d_sum); + ASSERT_EQ(b_d_sum, sum_total); - const unsigned int n = 10; - const unsigned int m = 5; - const unsigned int sum_total = n * m; + // Check host view is synced as expected + scalar_type b_h_sum = 0; + for (size_t i = 0; i < b.h_view.extent(0); ++i) + for (size_t j = 0; j < b.h_view.extent(1); ++j) { + b_h_sum += b.h_view(i, j); + } - ViewType a("A",n,m); - ViewType b("B",n,m); + ASSERT_EQ(b_h_sum, sum_total); - Kokkos::deep_copy( a.d_view , 1 ); - - a.template modify(); - a.template sync(); - - // Check device view is initialized as expected - scalar_type a_d_sum = 0; - // Execute on the execution_space associated with t_dev's memory space - typedef typename ViewType::t_dev::memory_space::execution_space t_dev_exec_space; - Kokkos::parallel_reduce( Kokkos::RangePolicy(0,n), SumViewEntriesFunctor(a.d_view), a_d_sum ); - ASSERT_EQ(a_d_sum, sum_total); - - // Check host view is synced as expected - scalar_type a_h_sum = 0; - for ( size_t i = 0; i < a.h_view.extent(0); ++i ) - for ( size_t j = 0; j < a.h_view.extent(1); ++j ) { - a_h_sum += a.h_view(i,j); - } - - ASSERT_EQ(a_h_sum, sum_total); - - - // Test deep_copy - Kokkos::deep_copy( b, a ); - b.template sync(); - - // Perform same checks on b as done on a - // Check device view is initialized as expected - scalar_type b_d_sum = 0; - // Execute on the execution_space associated with t_dev's memory space - Kokkos::parallel_reduce( Kokkos::RangePolicy(0,n), SumViewEntriesFunctor(b.d_view), b_d_sum ); - ASSERT_EQ(b_d_sum, sum_total); - - // Check host view is synced as expected - scalar_type b_h_sum = 0; - for ( size_t i = 0; i < b.h_view.extent(0); ++i ) - for ( size_t j = 0; j < b.h_view.extent(1); ++j ) { - b_h_sum += b.h_view(i,j); - } - - ASSERT_EQ(b_h_sum, sum_total); - - } // end run_me - - test_dual_view_deep_copy() - { - run_me< Kokkos::DualView >(); - } - - }; - -} // namespace Impl + } // end run_me + test_dual_view_deep_copy() { + run_me >(); + } +}; +} // namespace Impl template -void test_dualview_combinations(unsigned int size) -{ - Impl::test_dualview_combinations test(size); - ASSERT_EQ( test.result,0); - +void test_dualview_combinations(unsigned int size) { + Impl::test_dualview_combinations test(size); + ASSERT_EQ(test.result, 0); } template -void test_dualview_deep_copy() -{ - Impl::test_dual_view_deep_copy (); +void test_dualview_deep_copy() { + Impl::test_dual_view_deep_copy(); } -TEST_F( TEST_CATEGORY, dualview_combination) { - test_dualview_combinations(10); +TEST(TEST_CATEGORY, dualview_combination) { + test_dualview_combinations(10); } -TEST_F( TEST_CATEGORY, dualview_deep_copy) { - test_dualview_deep_copy(); - test_dualview_deep_copy(); +TEST(TEST_CATEGORY, dualview_deep_copy) { + test_dualview_deep_copy(); + test_dualview_deep_copy(); } +} // namespace Test -} // namespace Test - -#endif //KOKKOS_TEST_UNORDERED_MAP_HPP - +#endif // KOKKOS_TEST_UNORDERED_MAP_HPP diff --git a/lib/kokkos/containers/unit_tests/TestDynViewAPI.hpp b/lib/kokkos/containers/unit_tests/TestDynViewAPI.hpp index 13e56c9f8d..3692aa8a12 100644 --- a/lib/kokkos/containers/unit_tests/TestDynViewAPI.hpp +++ b/lib/kokkos/containers/unit_tests/TestDynViewAPI.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -51,680 +52,661 @@ /*--------------------------------------------------------------------------*/ - /*--------------------------------------------------------------------------*/ namespace Test { -template< class T , class ... P > -size_t allocation_count( const Kokkos::DynRankView & view ) -{ +template +size_t allocation_count(const Kokkos::DynRankView& view) { const size_t card = view.size(); const size_t alloc = view.span(); - return card <= alloc ? alloc : 0 ; + return card <= alloc ? alloc : 0; } /*--------------------------------------------------------------------------*/ -template< typename T, class DeviceType> -struct TestViewOperator -{ - typedef DeviceType execution_space ; +template +struct TestViewOperator { + typedef DeviceType execution_space; - static const unsigned N = 100 ; - static const unsigned D = 3 ; + static const unsigned N = 100; + static const unsigned D = 3; - typedef Kokkos::DynRankView< T , execution_space > view_type ; + typedef Kokkos::DynRankView view_type; - const view_type v1 ; - const view_type v2 ; + const view_type v1; + const view_type v2; - TestViewOperator() - : v1( "v1" , N , D ) - , v2( "v2" , N , D ) - {} + TestViewOperator() : v1("v1", N, D), v2("v2", N, D) {} - static void testit() - { - Kokkos::parallel_for( N , TestViewOperator() ); - } + static void testit() { Kokkos::parallel_for(N, TestViewOperator()); } KOKKOS_INLINE_FUNCTION - void operator()( const unsigned i ) const - { - const unsigned X = 0 ; - const unsigned Y = 1 ; - const unsigned Z = 2 ; + void operator()(const unsigned i) const { + const unsigned X = 0; + const unsigned Y = 1; + const unsigned Z = 2; - v2(i,X) = v1(i,X); - v2(i,Y) = v1(i,Y); - v2(i,Z) = v1(i,Z); + v2(i, X) = v1(i, X); + v2(i, Y) = v1(i, Y); + v2(i, Z) = v1(i, Z); } }; /*--------------------------------------------------------------------------*/ -template< class DataType , - class DeviceType , - unsigned Rank > -struct TestViewOperator_LeftAndRight ; +template +struct TestViewOperator_LeftAndRight; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 7 > -{ - typedef DeviceType execution_space ; - typedef typename execution_space::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; +template +struct TestViewOperator_LeftAndRight { + typedef DeviceType execution_space; + typedef typename execution_space::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , - const volatile value_type & input ) - { update |= input ; } - - KOKKOS_INLINE_FUNCTION - static void init( value_type & update ) - { update = 0 ; } - - - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutLeft, execution_space > left_view ; - - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutRight, execution_space > right_view ; - - left_view left ; - right_view right ; - long left_alloc ; - long right_alloc ; - - TestViewOperator_LeftAndRight(unsigned N0, unsigned N1, unsigned N2, unsigned N3, unsigned N4, unsigned N5, unsigned N6 ) - : left( "left" , N0, N1, N2, N3, N4, N5, N6 ) - , right( "right" , N0, N1, N2, N3, N4, N5, N6 ) - , left_alloc( allocation_count( left ) ) - , right_alloc( allocation_count( right ) ) - {} - - static void testit(unsigned N0, unsigned N1, unsigned N2, unsigned N3, unsigned N4, unsigned N5, unsigned N6 ) - { - TestViewOperator_LeftAndRight driver(N0, N1, N2, N3, N4, N5, N6 ); - - int error_flag = 0 ; - - Kokkos::parallel_reduce( 1 , driver , error_flag ); - - ASSERT_EQ( error_flag , 0 ); + static void join(volatile value_type& update, + const volatile value_type& input) { + update |= input; } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const - { - long offset ; + static void init(value_type& update) { update = 0; } - offset = -1 ; - for ( unsigned i6 = 0 ; i6 < unsigned(left.extent(6)) ; ++i6 ) - for ( unsigned i5 = 0 ; i5 < unsigned(left.extent(5)) ; ++i5 ) - for ( unsigned i4 = 0 ; i4 < unsigned(left.extent(4)) ; ++i4 ) - for ( unsigned i3 = 0 ; i3 < unsigned(left.extent(3)) ; ++i3 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.extent(2)) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.extent(1)) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.extent(0)) ; ++i0 ) - { - const long j = & left( i0, i1, i2, i3, i4, i5, i6 ) - - & left( 0, 0, 0, 0, 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; - } + typedef Kokkos::DynRankView + left_view; - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.extent(0)) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.extent(1)) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.extent(2)) ; ++i2 ) - for ( unsigned i3 = 0 ; i3 < unsigned(right.extent(3)) ; ++i3 ) - for ( unsigned i4 = 0 ; i4 < unsigned(right.extent(4)) ; ++i4 ) - for ( unsigned i5 = 0 ; i5 < unsigned(right.extent(5)) ; ++i5 ) - for ( unsigned i6 = 0 ; i6 < unsigned(right.extent(6)) ; ++i6 ) - { - const long j = & right( i0, i1, i2, i3, i4, i5, i6 ) - - & right( 0, 0, 0, 0, 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; - } + typedef Kokkos::DynRankView + right_view; + + left_view left; + right_view right; + long left_alloc; + long right_alloc; + + TestViewOperator_LeftAndRight(unsigned N0, unsigned N1, unsigned N2, + unsigned N3, unsigned N4, unsigned N5, + unsigned N6) + : left("left", N0, N1, N2, N3, N4, N5, N6), + right("right", N0, N1, N2, N3, N4, N5, N6), + left_alloc(allocation_count(left)), + right_alloc(allocation_count(right)) {} + + static void testit(unsigned N0, unsigned N1, unsigned N2, unsigned N3, + unsigned N4, unsigned N5, unsigned N6) { + TestViewOperator_LeftAndRight driver(N0, N1, N2, N3, N4, N5, N6); + + int error_flag = 0; + + Kokkos::parallel_reduce(1, driver, error_flag); + + ASSERT_EQ(error_flag, 0); + } + + KOKKOS_INLINE_FUNCTION + void operator()(const size_type, value_type& update) const { + long offset; + + offset = -1; + for (unsigned i6 = 0; i6 < unsigned(left.extent(6)); ++i6) + for (unsigned i5 = 0; i5 < unsigned(left.extent(5)); ++i5) + for (unsigned i4 = 0; i4 < unsigned(left.extent(4)); ++i4) + for (unsigned i3 = 0; i3 < unsigned(left.extent(3)); ++i3) + for (unsigned i2 = 0; i2 < unsigned(left.extent(2)); ++i2) + for (unsigned i1 = 0; i1 < unsigned(left.extent(1)); ++i1) + for (unsigned i0 = 0; i0 < unsigned(left.extent(0)); ++i0) { + const long j = &left(i0, i1, i2, i3, i4, i5, i6) - + &left(0, 0, 0, 0, 0, 0, 0); + if (j <= offset || left_alloc <= j) { + update |= 1; + } + offset = j; + } + + offset = -1; + for (unsigned i0 = 0; i0 < unsigned(right.extent(0)); ++i0) + for (unsigned i1 = 0; i1 < unsigned(right.extent(1)); ++i1) + for (unsigned i2 = 0; i2 < unsigned(right.extent(2)); ++i2) + for (unsigned i3 = 0; i3 < unsigned(right.extent(3)); ++i3) + for (unsigned i4 = 0; i4 < unsigned(right.extent(4)); ++i4) + for (unsigned i5 = 0; i5 < unsigned(right.extent(5)); ++i5) + for (unsigned i6 = 0; i6 < unsigned(right.extent(6)); ++i6) { + const long j = &right(i0, i1, i2, i3, i4, i5, i6) - + &right(0, 0, 0, 0, 0, 0, 0); + if (j <= offset || right_alloc <= j) { + update |= 2; + } + offset = j; + } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 6 > -{ - typedef DeviceType execution_space ; - typedef typename execution_space::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; +template +struct TestViewOperator_LeftAndRight { + typedef DeviceType execution_space; + typedef typename execution_space::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , - const volatile value_type & input ) - { update |= input ; } - - KOKKOS_INLINE_FUNCTION - static void init( value_type & update ) - { update = 0 ; } - - - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutLeft, execution_space > left_view ; - - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutRight, execution_space > right_view ; - - left_view left ; - right_view right ; - long left_alloc ; - long right_alloc ; - - TestViewOperator_LeftAndRight(unsigned N0, unsigned N1, unsigned N2, unsigned N3, unsigned N4, unsigned N5 ) - : left( "left" , N0, N1, N2, N3, N4, N5 ) - , right( "right" , N0, N1, N2, N3, N4, N5 ) - , left_alloc( allocation_count( left ) ) - , right_alloc( allocation_count( right ) ) - {} - - static void testit(unsigned N0, unsigned N1, unsigned N2, unsigned N3, unsigned N4, unsigned N5) - { - TestViewOperator_LeftAndRight driver (N0, N1, N2, N3, N4, N5); - - int error_flag = 0 ; - - Kokkos::parallel_reduce( 1 , driver , error_flag ); - - ASSERT_EQ( error_flag , 0 ); + static void join(volatile value_type& update, + const volatile value_type& input) { + update |= input; } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const - { - long offset ; + static void init(value_type& update) { update = 0; } - offset = -1 ; - for ( unsigned i5 = 0 ; i5 < unsigned(left.extent(5)) ; ++i5 ) - for ( unsigned i4 = 0 ; i4 < unsigned(left.extent(4)) ; ++i4 ) - for ( unsigned i3 = 0 ; i3 < unsigned(left.extent(3)) ; ++i3 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.extent(2)) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.extent(1)) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.extent(0)) ; ++i0 ) - { - const long j = & left( i0, i1, i2, i3, i4, i5 ) - - & left( 0, 0, 0, 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; - } + typedef Kokkos::DynRankView + left_view; - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.extent(0)) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.extent(1)) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.extent(2)) ; ++i2 ) - for ( unsigned i3 = 0 ; i3 < unsigned(right.extent(3)) ; ++i3 ) - for ( unsigned i4 = 0 ; i4 < unsigned(right.extent(4)) ; ++i4 ) - for ( unsigned i5 = 0 ; i5 < unsigned(right.extent(5)) ; ++i5 ) - { - const long j = & right( i0, i1, i2, i3, i4, i5 ) - - & right( 0, 0, 0, 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; - } + typedef Kokkos::DynRankView + right_view; + + left_view left; + right_view right; + long left_alloc; + long right_alloc; + + TestViewOperator_LeftAndRight(unsigned N0, unsigned N1, unsigned N2, + unsigned N3, unsigned N4, unsigned N5) + : left("left", N0, N1, N2, N3, N4, N5), + right("right", N0, N1, N2, N3, N4, N5), + left_alloc(allocation_count(left)), + right_alloc(allocation_count(right)) {} + + static void testit(unsigned N0, unsigned N1, unsigned N2, unsigned N3, + unsigned N4, unsigned N5) { + TestViewOperator_LeftAndRight driver(N0, N1, N2, N3, N4, N5); + + int error_flag = 0; + + Kokkos::parallel_reduce(1, driver, error_flag); + + ASSERT_EQ(error_flag, 0); + } + + KOKKOS_INLINE_FUNCTION + void operator()(const size_type, value_type& update) const { + long offset; + + offset = -1; + for (unsigned i5 = 0; i5 < unsigned(left.extent(5)); ++i5) + for (unsigned i4 = 0; i4 < unsigned(left.extent(4)); ++i4) + for (unsigned i3 = 0; i3 < unsigned(left.extent(3)); ++i3) + for (unsigned i2 = 0; i2 < unsigned(left.extent(2)); ++i2) + for (unsigned i1 = 0; i1 < unsigned(left.extent(1)); ++i1) + for (unsigned i0 = 0; i0 < unsigned(left.extent(0)); ++i0) { + const long j = + &left(i0, i1, i2, i3, i4, i5) - &left(0, 0, 0, 0, 0, 0); + if (j <= offset || left_alloc <= j) { + update |= 1; + } + offset = j; + } + + offset = -1; + for (unsigned i0 = 0; i0 < unsigned(right.extent(0)); ++i0) + for (unsigned i1 = 0; i1 < unsigned(right.extent(1)); ++i1) + for (unsigned i2 = 0; i2 < unsigned(right.extent(2)); ++i2) + for (unsigned i3 = 0; i3 < unsigned(right.extent(3)); ++i3) + for (unsigned i4 = 0; i4 < unsigned(right.extent(4)); ++i4) + for (unsigned i5 = 0; i5 < unsigned(right.extent(5)); ++i5) { + const long j = + &right(i0, i1, i2, i3, i4, i5) - &right(0, 0, 0, 0, 0, 0); + if (j <= offset || right_alloc <= j) { + update |= 2; + } + offset = j; + } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 5 > -{ - typedef DeviceType execution_space ; - typedef typename execution_space::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; +template +struct TestViewOperator_LeftAndRight { + typedef DeviceType execution_space; + typedef typename execution_space::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , - const volatile value_type & input ) - { update |= input ; } + static void join(volatile value_type& update, + const volatile value_type& input) { + update |= input; + } KOKKOS_INLINE_FUNCTION - static void init( value_type & update ) - { update = 0 ; } + static void init(value_type& update) { update = 0; } + typedef Kokkos::DynRankView + left_view; - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutLeft, execution_space > left_view ; + typedef Kokkos::DynRankView + right_view; - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutRight, execution_space > right_view ; + typedef Kokkos::DynRankView + stride_view; - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutStride, execution_space > stride_view ; + left_view left; + right_view right; + stride_view left_stride; + stride_view right_stride; + long left_alloc; + long right_alloc; - left_view left ; - right_view right ; - stride_view left_stride ; - stride_view right_stride ; - long left_alloc ; - long right_alloc ; + TestViewOperator_LeftAndRight(unsigned N0, unsigned N1, unsigned N2, + unsigned N3, unsigned N4) + : left("left", N0, N1, N2, N3, N4), + right("right", N0, N1, N2, N3, N4), + left_stride(left), + right_stride(right), + left_alloc(allocation_count(left)), + right_alloc(allocation_count(right)) {} - TestViewOperator_LeftAndRight(unsigned N0, unsigned N1, unsigned N2, unsigned N3, unsigned N4 ) - : left( "left" , N0, N1, N2, N3, N4 ) - , right( "right" , N0, N1, N2, N3, N4 ) - , left_stride( left ) - , right_stride( right ) - , left_alloc( allocation_count( left ) ) - , right_alloc( allocation_count( right ) ) - {} - - static void testit(unsigned N0, unsigned N1, unsigned N2, unsigned N3, unsigned N4) - { + static void testit(unsigned N0, unsigned N1, unsigned N2, unsigned N3, + unsigned N4) { TestViewOperator_LeftAndRight driver(N0, N1, N2, N3, N4); - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce(1, driver, error_flag); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ(error_flag, 0); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const - { - long offset ; + void operator()(const size_type, value_type& update) const { + long offset; - offset = -1 ; - for ( unsigned i4 = 0 ; i4 < unsigned(left.extent(4)) ; ++i4 ) - for ( unsigned i3 = 0 ; i3 < unsigned(left.extent(3)) ; ++i3 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.extent(2)) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.extent(1)) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.extent(0)) ; ++i0 ) - { - const long j = & left( i0, i1, i2, i3, i4 ) - - & left( 0, 0, 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; + offset = -1; + for (unsigned i4 = 0; i4 < unsigned(left.extent(4)); ++i4) + for (unsigned i3 = 0; i3 < unsigned(left.extent(3)); ++i3) + for (unsigned i2 = 0; i2 < unsigned(left.extent(2)); ++i2) + for (unsigned i1 = 0; i1 < unsigned(left.extent(1)); ++i1) + for (unsigned i0 = 0; i0 < unsigned(left.extent(0)); ++i0) { + const long j = &left(i0, i1, i2, i3, i4) - &left(0, 0, 0, 0, 0); + if (j <= offset || left_alloc <= j) { + update |= 1; + } + offset = j; - if ( & left( i0, i1, i2, i3, i4 ) != - & left_stride( i0, i1, i2, i3, i4 ) ) { update |= 4 ; } - } + if (&left(i0, i1, i2, i3, i4) != + &left_stride(i0, i1, i2, i3, i4)) { + update |= 4; + } + } - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.extent(0)) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.extent(1)) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.extent(2)) ; ++i2 ) - for ( unsigned i3 = 0 ; i3 < unsigned(right.extent(3)) ; ++i3 ) - for ( unsigned i4 = 0 ; i4 < unsigned(right.extent(4)) ; ++i4 ) - { - const long j = & right( i0, i1, i2, i3, i4 ) - - & right( 0, 0, 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; + offset = -1; + for (unsigned i0 = 0; i0 < unsigned(right.extent(0)); ++i0) + for (unsigned i1 = 0; i1 < unsigned(right.extent(1)); ++i1) + for (unsigned i2 = 0; i2 < unsigned(right.extent(2)); ++i2) + for (unsigned i3 = 0; i3 < unsigned(right.extent(3)); ++i3) + for (unsigned i4 = 0; i4 < unsigned(right.extent(4)); ++i4) { + const long j = &right(i0, i1, i2, i3, i4) - &right(0, 0, 0, 0, 0); + if (j <= offset || right_alloc <= j) { + update |= 2; + } + offset = j; - if ( & right( i0, i1, i2, i3, i4 ) != - & right_stride( i0, i1, i2, i3, i4 ) ) { update |= 8 ; } - } + if (&right(i0, i1, i2, i3, i4) != + &right_stride(i0, i1, i2, i3, i4)) { + update |= 8; + } + } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 4 > -{ - typedef DeviceType execution_space ; - typedef typename execution_space::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; +template +struct TestViewOperator_LeftAndRight { + typedef DeviceType execution_space; + typedef typename execution_space::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , - const volatile value_type & input ) - { update |= input ; } - - KOKKOS_INLINE_FUNCTION - static void init( value_type & update ) - { update = 0 ; } - - - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutLeft, execution_space > left_view ; - - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutRight, execution_space > right_view ; - - left_view left ; - right_view right ; - long left_alloc ; - long right_alloc ; - - TestViewOperator_LeftAndRight(unsigned N0, unsigned N1, unsigned N2, unsigned N3) - : left( "left" , N0, N1, N2, N3 ) - , right( "right" , N0, N1, N2, N3 ) - , left_alloc( allocation_count( left ) ) - , right_alloc( allocation_count( right ) ) - {} - - static void testit(unsigned N0, unsigned N1, unsigned N2, unsigned N3) - { - TestViewOperator_LeftAndRight driver (N0, N1, N2, N3); - - int error_flag = 0 ; - - Kokkos::parallel_reduce( 1 , driver , error_flag ); - - ASSERT_EQ( error_flag , 0 ); + static void join(volatile value_type& update, + const volatile value_type& input) { + update |= input; } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const - { - long offset ; + static void init(value_type& update) { update = 0; } - offset = -1 ; - for ( unsigned i3 = 0 ; i3 < unsigned(left.extent(3)) ; ++i3 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.extent(2)) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.extent(1)) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.extent(0)) ; ++i0 ) - { - const long j = & left( i0, i1, i2, i3 ) - - & left( 0, 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; - } + typedef Kokkos::DynRankView + left_view; - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.extent(0)) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.extent(1)) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.extent(2)) ; ++i2 ) - for ( unsigned i3 = 0 ; i3 < unsigned(right.extent(3)) ; ++i3 ) - { - const long j = & right( i0, i1, i2, i3 ) - - & right( 0, 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; - } + typedef Kokkos::DynRankView + right_view; + + left_view left; + right_view right; + long left_alloc; + long right_alloc; + + TestViewOperator_LeftAndRight(unsigned N0, unsigned N1, unsigned N2, + unsigned N3) + : left("left", N0, N1, N2, N3), + right("right", N0, N1, N2, N3), + left_alloc(allocation_count(left)), + right_alloc(allocation_count(right)) {} + + static void testit(unsigned N0, unsigned N1, unsigned N2, unsigned N3) { + TestViewOperator_LeftAndRight driver(N0, N1, N2, N3); + + int error_flag = 0; + + Kokkos::parallel_reduce(1, driver, error_flag); + + ASSERT_EQ(error_flag, 0); + } + + KOKKOS_INLINE_FUNCTION + void operator()(const size_type, value_type& update) const { + long offset; + + offset = -1; + for (unsigned i3 = 0; i3 < unsigned(left.extent(3)); ++i3) + for (unsigned i2 = 0; i2 < unsigned(left.extent(2)); ++i2) + for (unsigned i1 = 0; i1 < unsigned(left.extent(1)); ++i1) + for (unsigned i0 = 0; i0 < unsigned(left.extent(0)); ++i0) { + const long j = &left(i0, i1, i2, i3) - &left(0, 0, 0, 0); + if (j <= offset || left_alloc <= j) { + update |= 1; + } + offset = j; + } + + offset = -1; + for (unsigned i0 = 0; i0 < unsigned(right.extent(0)); ++i0) + for (unsigned i1 = 0; i1 < unsigned(right.extent(1)); ++i1) + for (unsigned i2 = 0; i2 < unsigned(right.extent(2)); ++i2) + for (unsigned i3 = 0; i3 < unsigned(right.extent(3)); ++i3) { + const long j = &right(i0, i1, i2, i3) - &right(0, 0, 0, 0); + if (j <= offset || right_alloc <= j) { + update |= 2; + } + offset = j; + } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 3 > -{ - typedef DeviceType execution_space ; - typedef typename execution_space::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; +template +struct TestViewOperator_LeftAndRight { + typedef DeviceType execution_space; + typedef typename execution_space::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , - const volatile value_type & input ) - { update |= input ; } + static void join(volatile value_type& update, + const volatile value_type& input) { + update |= input; + } KOKKOS_INLINE_FUNCTION - static void init( value_type & update ) - { update = 0 ; } + static void init(value_type& update) { update = 0; } + typedef Kokkos::DynRankView + left_view; - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutLeft, execution_space > left_view ; + typedef Kokkos::DynRankView + right_view; - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutRight, execution_space > right_view ; + typedef Kokkos::DynRankView + stride_view; - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutStride, execution_space > stride_view ; - - left_view left ; - right_view right ; - stride_view left_stride ; - stride_view right_stride ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + stride_view left_stride; + stride_view right_stride; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight(unsigned N0, unsigned N1, unsigned N2) - : left( std::string("left") , N0, N1, N2 ) - , right( std::string("right") , N0, N1, N2 ) - , left_stride( left ) - , right_stride( right ) - , left_alloc( allocation_count( left ) ) - , right_alloc( allocation_count( right ) ) - {} + : left(std::string("left"), N0, N1, N2), + right(std::string("right"), N0, N1, N2), + left_stride(left), + right_stride(right), + left_alloc(allocation_count(left)), + right_alloc(allocation_count(right)) {} - static void testit(unsigned N0, unsigned N1, unsigned N2) - { - TestViewOperator_LeftAndRight driver (N0, N1, N2); + static void testit(unsigned N0, unsigned N1, unsigned N2) { + TestViewOperator_LeftAndRight driver(N0, N1, N2); - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce(1, driver, error_flag); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ(error_flag, 0); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const - { - long offset ; + void operator()(const size_type, value_type& update) const { + long offset; - offset = -1 ; - for ( unsigned i2 = 0 ; i2 < unsigned(left.extent(2)) ; ++i2 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.extent(1)) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.extent(0)) ; ++i0 ) - { - const long j = & left( i0, i1, i2 ) - - & left( 0, 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; + offset = -1; + for (unsigned i2 = 0; i2 < unsigned(left.extent(2)); ++i2) + for (unsigned i1 = 0; i1 < unsigned(left.extent(1)); ++i1) + for (unsigned i0 = 0; i0 < unsigned(left.extent(0)); ++i0) { + const long j = &left(i0, i1, i2) - &left(0, 0, 0); + if (j <= offset || left_alloc <= j) { + update |= 1; + } + offset = j; - if ( & left(i0,i1,i2) != & left_stride(i0,i1,i2) ) { update |= 4 ; } - } + if (&left(i0, i1, i2) != &left_stride(i0, i1, i2)) { + update |= 4; + } + } - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.extent(0)) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.extent(1)) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(right.extent(2)) ; ++i2 ) - { - const long j = & right( i0, i1, i2 ) - - & right( 0, 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; + offset = -1; + for (unsigned i0 = 0; i0 < unsigned(right.extent(0)); ++i0) + for (unsigned i1 = 0; i1 < unsigned(right.extent(1)); ++i1) + for (unsigned i2 = 0; i2 < unsigned(right.extent(2)); ++i2) { + const long j = &right(i0, i1, i2) - &right(0, 0, 0); + if (j <= offset || right_alloc <= j) { + update |= 2; + } + offset = j; - if ( & right(i0,i1,i2) != & right_stride(i0,i1,i2) ) { update |= 8 ; } - } + if (&right(i0, i1, i2) != &right_stride(i0, i1, i2)) { + update |= 8; + } + } - for ( unsigned i0 = 0 ; i0 < unsigned(left.extent(0)) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.extent(1)) ; ++i1 ) - for ( unsigned i2 = 0 ; i2 < unsigned(left.extent(2)) ; ++i2 ) - { - if ( & left(i0,i1,i2) != & left(i0,i1,i2,0,0,0,0) ) { update |= 3 ; } - if ( & right(i0,i1,i2) != & right(i0,i1,i2,0,0,0,0) ) { update |= 3 ; } - } + for (unsigned i0 = 0; i0 < unsigned(left.extent(0)); ++i0) + for (unsigned i1 = 0; i1 < unsigned(left.extent(1)); ++i1) + for (unsigned i2 = 0; i2 < unsigned(left.extent(2)); ++i2) { + if (&left(i0, i1, i2) != &left(i0, i1, i2, 0, 0, 0, 0)) { + update |= 3; + } + if (&right(i0, i1, i2) != &right(i0, i1, i2, 0, 0, 0, 0)) { + update |= 3; + } + } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 2 > -{ - typedef DeviceType execution_space ; - typedef typename execution_space::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; +template +struct TestViewOperator_LeftAndRight { + typedef DeviceType execution_space; + typedef typename execution_space::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , - const volatile value_type & input ) - { update |= input ; } + static void join(volatile value_type& update, + const volatile value_type& input) { + update |= input; + } KOKKOS_INLINE_FUNCTION - static void init( value_type & update ) - { update = 0 ; } + static void init(value_type& update) { update = 0; } + typedef Kokkos::DynRankView + left_view; - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutLeft, execution_space > left_view ; + typedef Kokkos::DynRankView + right_view; - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutRight, execution_space > right_view ; - - left_view left ; - right_view right ; - long left_alloc ; - long right_alloc ; + left_view left; + right_view right; + long left_alloc; + long right_alloc; TestViewOperator_LeftAndRight(unsigned N0, unsigned N1) - : left( "left" , N0, N1 ) - , right( "right" , N0, N1 ) - , left_alloc( allocation_count( left ) ) - , right_alloc( allocation_count( right ) ) - {} + : left("left", N0, N1), + right("right", N0, N1), + left_alloc(allocation_count(left)), + right_alloc(allocation_count(right)) {} - static void testit(unsigned N0, unsigned N1) - { + static void testit(unsigned N0, unsigned N1) { TestViewOperator_LeftAndRight driver(N0, N1); - int error_flag = 0 ; + int error_flag = 0; - Kokkos::parallel_reduce( 1 , driver , error_flag ); + Kokkos::parallel_reduce(1, driver, error_flag); - ASSERT_EQ( error_flag , 0 ); + ASSERT_EQ(error_flag, 0); } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const - { - long offset ; + void operator()(const size_type, value_type& update) const { + long offset; - offset = -1 ; - for ( unsigned i1 = 0 ; i1 < unsigned(left.extent(1)) ; ++i1 ) - for ( unsigned i0 = 0 ; i0 < unsigned(left.extent(0)) ; ++i0 ) - { - const long j = & left( i0, i1 ) - - & left( 0, 0 ); - if ( j <= offset || left_alloc <= j ) { update |= 1 ; } - offset = j ; - } + offset = -1; + for (unsigned i1 = 0; i1 < unsigned(left.extent(1)); ++i1) + for (unsigned i0 = 0; i0 < unsigned(left.extent(0)); ++i0) { + const long j = &left(i0, i1) - &left(0, 0); + if (j <= offset || left_alloc <= j) { + update |= 1; + } + offset = j; + } - offset = -1 ; - for ( unsigned i0 = 0 ; i0 < unsigned(right.extent(0)) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(right.extent(1)) ; ++i1 ) - { - const long j = & right( i0, i1 ) - - & right( 0, 0 ); - if ( j <= offset || right_alloc <= j ) { update |= 2 ; } - offset = j ; - } + offset = -1; + for (unsigned i0 = 0; i0 < unsigned(right.extent(0)); ++i0) + for (unsigned i1 = 0; i1 < unsigned(right.extent(1)); ++i1) { + const long j = &right(i0, i1) - &right(0, 0); + if (j <= offset || right_alloc <= j) { + update |= 2; + } + offset = j; + } - for ( unsigned i0 = 0 ; i0 < unsigned(left.extent(0)) ; ++i0 ) - for ( unsigned i1 = 0 ; i1 < unsigned(left.extent(1)) ; ++i1 ) - { - if ( & left(i0,i1) != & left(i0,i1,0,0,0,0,0) ) { update |= 3 ; } - if ( & right(i0,i1) != & right(i0,i1,0,0,0,0,0) ) { update |= 3 ; } - } + for (unsigned i0 = 0; i0 < unsigned(left.extent(0)); ++i0) + for (unsigned i1 = 0; i1 < unsigned(left.extent(1)); ++i1) { + if (&left(i0, i1) != &left(i0, i1, 0, 0, 0, 0, 0)) { + update |= 3; + } + if (&right(i0, i1) != &right(i0, i1, 0, 0, 0, 0, 0)) { + update |= 3; + } + } } }; -template< class DataType , class DeviceType > -struct TestViewOperator_LeftAndRight< DataType , DeviceType , 1 > -{ - typedef DeviceType execution_space ; - typedef typename execution_space::memory_space memory_space ; - typedef typename execution_space::size_type size_type ; +template +struct TestViewOperator_LeftAndRight { + typedef DeviceType execution_space; + typedef typename execution_space::memory_space memory_space; + typedef typename execution_space::size_type size_type; - typedef int value_type ; + typedef int value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , - const volatile value_type & input ) - { update |= input ; } - - KOKKOS_INLINE_FUNCTION - static void init( value_type & update ) - { update = 0 ; } - - - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutLeft, execution_space > left_view ; - - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutRight, execution_space > right_view ; - - typedef Kokkos:: - DynRankView< DataType, Kokkos::LayoutStride, execution_space > stride_view ; - - left_view left ; - right_view right ; - stride_view left_stride ; - stride_view right_stride ; - long left_alloc ; - long right_alloc ; - - TestViewOperator_LeftAndRight(unsigned N0) - : left( "left" , N0 ) - , right( "right" , N0 ) - , left_stride( left ) - , right_stride( right ) - , left_alloc( allocation_count( left ) ) - , right_alloc( allocation_count( right ) ) - {} - - static void testit(unsigned N0) - { - TestViewOperator_LeftAndRight driver (N0) ; - - int error_flag = 0 ; - - Kokkos::parallel_reduce( 1 , driver , error_flag ); - - ASSERT_EQ( error_flag , 0 ); + static void join(volatile value_type& update, + const volatile value_type& input) { + update |= input; } KOKKOS_INLINE_FUNCTION - void operator()( const size_type , value_type & update ) const - { - for ( unsigned i0 = 0 ; i0 < unsigned(left.extent(0)) ; ++i0 ) - { - if ( & left(i0) != & left(i0,0,0,0,0,0,0) ) { update |= 3 ; } - if ( & right(i0) != & right(i0,0,0,0,0,0,0) ) { update |= 3 ; } - if ( & left(i0) != & left_stride(i0) ) { update |= 4 ; } - if ( & right(i0) != & right_stride(i0) ) { update |= 8 ; } + static void init(value_type& update) { update = 0; } + + typedef Kokkos::DynRankView + left_view; + + typedef Kokkos::DynRankView + right_view; + + typedef Kokkos::DynRankView + stride_view; + + left_view left; + right_view right; + stride_view left_stride; + stride_view right_stride; + long left_alloc; + long right_alloc; + + TestViewOperator_LeftAndRight(unsigned N0) + : left("left", N0), + right("right", N0), + left_stride(left), + right_stride(right), + left_alloc(allocation_count(left)), + right_alloc(allocation_count(right)) {} + + static void testit(unsigned N0) { + TestViewOperator_LeftAndRight driver(N0); + + int error_flag = 0; + + Kokkos::parallel_reduce(1, driver, error_flag); + + ASSERT_EQ(error_flag, 0); + } + + KOKKOS_INLINE_FUNCTION + void operator()(const size_type, value_type& update) const { + for (unsigned i0 = 0; i0 < unsigned(left.extent(0)); ++i0) { + if (&left(i0) != &left(i0, 0, 0, 0, 0, 0, 0)) { + update |= 3; + } + if (&right(i0) != &right(i0, 0, 0, 0, 0, 0, 0)) { + update |= 3; + } + if (&left(i0) != &left_stride(i0)) { + update |= 4; + } + if (&right(i0) != &right_stride(i0)) { + update |= 8; + } } } }; /*--------------------------------------------------------------------------*/ -template< typename T, class DeviceType > -class TestDynViewAPI -{ -public: - typedef DeviceType device ; +template +class TestDynViewAPI { + public: + typedef DeviceType device; - enum { N0 = 1000 , - N1 = 3 , - N2 = 5 , - N3 = 7 }; + enum { N0 = 1000, N1 = 3, N2 = 5, N3 = 7 }; - typedef Kokkos::DynRankView< T , device > dView0 ; - typedef Kokkos::DynRankView< const T , device > const_dView0 ; + typedef Kokkos::DynRankView dView0; + typedef Kokkos::DynRankView const_dView0; - typedef Kokkos::DynRankView< T, device, Kokkos::MemoryUnmanaged > dView0_unmanaged ; - typedef typename dView0::host_mirror_space host_drv_space ; + typedef Kokkos::DynRankView + dView0_unmanaged; + typedef typename dView0::host_mirror_space host_drv_space; - typedef Kokkos::View< T , device > View0 ; - typedef Kokkos::View< T* , device > View1 ; - typedef Kokkos::View< T******* , device > View7 ; + typedef Kokkos::View View0; + typedef Kokkos::View View1; + typedef Kokkos::View View7; - typedef typename View0::host_mirror_space host_view_space ; + typedef typename View0::host_mirror_space host_view_space; - TestDynViewAPI() - { - } + TestDynViewAPI() {} static void run_tests() { run_test_resize_realloc(); @@ -738,459 +720,475 @@ public: run_test_vector(); } - static void run_operator_test_rank12345 () { - TestViewOperator< T , device >::testit(); - TestViewOperator_LeftAndRight< int , device , 5 >::testit(2,3,4,2,3); - TestViewOperator_LeftAndRight< int , device , 4 >::testit(2,3,4,2); - TestViewOperator_LeftAndRight< int , device , 3 >::testit(2,3,4); - TestViewOperator_LeftAndRight< int , device , 2 >::testit(2,3); - TestViewOperator_LeftAndRight< int , device , 1 >::testit(2); + static void run_operator_test_rank12345() { + TestViewOperator::testit(); + TestViewOperator_LeftAndRight::testit(2, 3, 4, 2, 3); + TestViewOperator_LeftAndRight::testit(2, 3, 4, 2); + TestViewOperator_LeftAndRight::testit(2, 3, 4); + TestViewOperator_LeftAndRight::testit(2, 3); + TestViewOperator_LeftAndRight::testit(2); } - static void run_operator_test_rank67 () { - TestViewOperator_LeftAndRight< int , device , 7 >::testit(2,3,4,2,3,4,2); - TestViewOperator_LeftAndRight< int , device , 6 >::testit(2,3,4,2,3,4); + static void run_operator_test_rank67() { + TestViewOperator_LeftAndRight::testit(2, 3, 4, 2, 3, 4, 2); + TestViewOperator_LeftAndRight::testit(2, 3, 4, 2, 3, 4); } - static void run_test_resize_realloc() - { + static void run_test_resize_realloc() { dView0 drv0("drv0", 10, 20, 30); - ASSERT_EQ( drv0.rank(), 3); + ASSERT_EQ(drv0.rank(), 3); Kokkos::resize(drv0, 5, 10); - ASSERT_EQ( drv0.rank(), 2); - ASSERT_EQ( drv0.extent(0), 5); - ASSERT_EQ( drv0.extent(1), 10); - ASSERT_EQ( drv0.extent(2), 1); + ASSERT_EQ(drv0.rank(), 2); + ASSERT_EQ(drv0.extent(0), 5); + ASSERT_EQ(drv0.extent(1), 10); + ASSERT_EQ(drv0.extent(2), 1); Kokkos::realloc(drv0, 10, 20); - ASSERT_EQ( drv0.rank(), 2); - ASSERT_EQ( drv0.extent(0), 10); - ASSERT_EQ( drv0.extent(1), 20); - ASSERT_EQ( drv0.extent(2), 1); - + ASSERT_EQ(drv0.rank(), 2); + ASSERT_EQ(drv0.extent(0), 10); + ASSERT_EQ(drv0.extent(1), 20); + ASSERT_EQ(drv0.extent(2), 1); } - static void run_test_mirror() - { - typedef Kokkos::DynRankView< int , host_drv_space > view_type ; - typedef typename view_type::HostMirror mirror_type ; + static void run_test_mirror() { + typedef Kokkos::DynRankView view_type; + typedef typename view_type::HostMirror mirror_type; view_type a("a"); mirror_type am = Kokkos::create_mirror_view(a); mirror_type ax = Kokkos::create_mirror(a); - ASSERT_EQ( & a() , & am() ); - ASSERT_EQ( a.rank() , am.rank() ); - ASSERT_EQ( ax.rank() , am.rank() ); + ASSERT_EQ(&a(), &am()); + ASSERT_EQ(a.rank(), am.rank()); + ASSERT_EQ(ax.rank(), am.rank()); { - Kokkos::DynRankView a_h("A",1000); - auto a_h2 = Kokkos::create_mirror(Kokkos::HostSpace(),a_h); - auto a_d = Kokkos::create_mirror(typename device::memory_space(),a_h); + Kokkos::DynRankView a_h( + "A", 1000); + auto a_h2 = Kokkos::create_mirror(Kokkos::HostSpace(), a_h); + auto a_d = Kokkos::create_mirror(typename device::memory_space(), a_h); - int equal_ptr_h_h2 = (a_h.data() ==a_h2.data())?1:0; - int equal_ptr_h_d = (a_h.data() ==a_d. data())?1:0; - int equal_ptr_h2_d = (a_h2.data()==a_d. data())?1:0; + int equal_ptr_h_h2 = (a_h.data() == a_h2.data()) ? 1 : 0; + int equal_ptr_h_d = (a_h.data() == a_d.data()) ? 1 : 0; + int equal_ptr_h2_d = (a_h2.data() == a_d.data()) ? 1 : 0; - ASSERT_EQ(equal_ptr_h_h2,0); - ASSERT_EQ(equal_ptr_h_d ,0); - ASSERT_EQ(equal_ptr_h2_d,0); - - ASSERT_EQ(a_h.extent(0),a_h2.extent(0)); - ASSERT_EQ(a_h.extent(0),a_d .extent(0)); + ASSERT_EQ(equal_ptr_h_h2, 0); + ASSERT_EQ(equal_ptr_h_d, 0); + ASSERT_EQ(equal_ptr_h2_d, 0); - ASSERT_EQ(a_h.rank(),a_h2.rank()); - ASSERT_EQ(a_h.rank(),a_d.rank()); + ASSERT_EQ(a_h.extent(0), a_h2.extent(0)); + ASSERT_EQ(a_h.extent(0), a_d.extent(0)); + + ASSERT_EQ(a_h.rank(), a_h2.rank()); + ASSERT_EQ(a_h.rank(), a_d.rank()); } { - Kokkos::DynRankView a_h("A",1000); - auto a_h2 = Kokkos::create_mirror(Kokkos::HostSpace(),a_h); - auto a_d = Kokkos::create_mirror(typename device::memory_space(),a_h); + Kokkos::DynRankView a_h( + "A", 1000); + auto a_h2 = Kokkos::create_mirror(Kokkos::HostSpace(), a_h); + auto a_d = Kokkos::create_mirror(typename device::memory_space(), a_h); - int equal_ptr_h_h2 = (a_h.data() ==a_h2.data())?1:0; - int equal_ptr_h_d = (a_h.data() ==a_d. data())?1:0; - int equal_ptr_h2_d = (a_h2.data()==a_d. data())?1:0; + int equal_ptr_h_h2 = (a_h.data() == a_h2.data()) ? 1 : 0; + int equal_ptr_h_d = (a_h.data() == a_d.data()) ? 1 : 0; + int equal_ptr_h2_d = (a_h2.data() == a_d.data()) ? 1 : 0; - ASSERT_EQ(equal_ptr_h_h2,0); - ASSERT_EQ(equal_ptr_h_d ,0); - ASSERT_EQ(equal_ptr_h2_d,0); - - ASSERT_EQ(a_h.extent(0),a_h2.extent(0)); - ASSERT_EQ(a_h.extent(0),a_d .extent(0)); + ASSERT_EQ(equal_ptr_h_h2, 0); + ASSERT_EQ(equal_ptr_h_d, 0); + ASSERT_EQ(equal_ptr_h2_d, 0); - ASSERT_EQ(a_h.rank(),a_h2.rank()); - ASSERT_EQ(a_h.rank(),a_d.rank()); + ASSERT_EQ(a_h.extent(0), a_h2.extent(0)); + ASSERT_EQ(a_h.extent(0), a_d.extent(0)); + + ASSERT_EQ(a_h.rank(), a_h2.rank()); + ASSERT_EQ(a_h.rank(), a_d.rank()); } { - Kokkos::DynRankView a_h("A",1000); - auto a_h2 = Kokkos::create_mirror_view(Kokkos::HostSpace(),a_h); - auto a_d = Kokkos::create_mirror_view(typename device::memory_space(),a_h); + Kokkos::DynRankView a_h( + "A", 1000); + auto a_h2 = Kokkos::create_mirror_view(Kokkos::HostSpace(), a_h); + auto a_d = + Kokkos::create_mirror_view(typename device::memory_space(), a_h); - int equal_ptr_h_h2 = a_h.data() ==a_h2.data()?1:0; - int equal_ptr_h_d = a_h.data() ==a_d. data()?1:0; - int equal_ptr_h2_d = a_h2.data()==a_d. data()?1:0; + int equal_ptr_h_h2 = a_h.data() == a_h2.data() ? 1 : 0; + int equal_ptr_h_d = a_h.data() == a_d.data() ? 1 : 0; + int equal_ptr_h2_d = a_h2.data() == a_d.data() ? 1 : 0; - int is_same_memspace = std::is_same::value?1:0; - ASSERT_EQ(equal_ptr_h_h2,1); - ASSERT_EQ(equal_ptr_h_d ,is_same_memspace); - ASSERT_EQ(equal_ptr_h2_d ,is_same_memspace); + int is_same_memspace = + std::is_same::value + ? 1 + : 0; + ASSERT_EQ(equal_ptr_h_h2, 1); + ASSERT_EQ(equal_ptr_h_d, is_same_memspace); + ASSERT_EQ(equal_ptr_h2_d, is_same_memspace); - ASSERT_EQ(a_h.extent(0),a_h2.extent(0)); - ASSERT_EQ(a_h.extent(0),a_d .extent(0)); + ASSERT_EQ(a_h.extent(0), a_h2.extent(0)); + ASSERT_EQ(a_h.extent(0), a_d.extent(0)); - ASSERT_EQ(a_h.rank(),a_h2.rank()); - ASSERT_EQ(a_h.rank(),a_d.rank()); + ASSERT_EQ(a_h.rank(), a_h2.rank()); + ASSERT_EQ(a_h.rank(), a_d.rank()); } { - Kokkos::DynRankView a_h("A",1000); - auto a_h2 = Kokkos::create_mirror_view(Kokkos::HostSpace(),a_h); - auto a_d = Kokkos::create_mirror_view(typename device::memory_space(),a_h); + Kokkos::DynRankView a_h( + "A", 1000); + auto a_h2 = Kokkos::create_mirror_view(Kokkos::HostSpace(), a_h); + auto a_d = + Kokkos::create_mirror_view(typename device::memory_space(), a_h); - int equal_ptr_h_h2 = a_h.data() ==a_h2.data()?1:0; - int equal_ptr_h_d = a_h.data() ==a_d. data()?1:0; - int equal_ptr_h2_d = a_h2.data()==a_d. data()?1:0; + int equal_ptr_h_h2 = a_h.data() == a_h2.data() ? 1 : 0; + int equal_ptr_h_d = a_h.data() == a_d.data() ? 1 : 0; + int equal_ptr_h2_d = a_h2.data() == a_d.data() ? 1 : 0; - int is_same_memspace = std::is_same::value?1:0; - ASSERT_EQ(equal_ptr_h_h2,1); - ASSERT_EQ(equal_ptr_h_d ,is_same_memspace); - ASSERT_EQ(equal_ptr_h2_d ,is_same_memspace); + int is_same_memspace = + std::is_same::value + ? 1 + : 0; + ASSERT_EQ(equal_ptr_h_h2, 1); + ASSERT_EQ(equal_ptr_h_d, is_same_memspace); + ASSERT_EQ(equal_ptr_h2_d, is_same_memspace); - - ASSERT_EQ(a_h.extent(0),a_h2.extent(0)); - ASSERT_EQ(a_h.extent(0),a_d .extent(0)); + ASSERT_EQ(a_h.extent(0), a_h2.extent(0)); + ASSERT_EQ(a_h.extent(0), a_d.extent(0)); - ASSERT_EQ(a_h.rank(),a_h2.rank()); - ASSERT_EQ(a_h.rank(),a_d.rank()); + ASSERT_EQ(a_h.rank(), a_h2.rank()); + ASSERT_EQ(a_h.rank(), a_d.rank()); } { - typedef Kokkos::DynRankView< int , Kokkos::LayoutStride , Kokkos::HostSpace > view_stride_type ; - unsigned order[] = { 6,5,4,3,2,1,0 }, dimen[] = { N0, N1, N2, 2, 2, 2, 2 }; //LayoutRight equivalent - view_stride_type a_h( "a" , Kokkos::LayoutStride::order_dimensions(7, order, dimen) ); - auto a_h2 = Kokkos::create_mirror_view(Kokkos::HostSpace(),a_h); - auto a_d = Kokkos::create_mirror_view(typename device::memory_space(),a_h); + typedef Kokkos::DynRankView + view_stride_type; + unsigned order[] = {6, 5, 4, 3, 2, 1, 0}, + dimen[] = {N0, N1, N2, 2, 2, 2, 2}; // LayoutRight equivalent + view_stride_type a_h( + "a", Kokkos::LayoutStride::order_dimensions(7, order, dimen)); + auto a_h2 = Kokkos::create_mirror_view(Kokkos::HostSpace(), a_h); + auto a_d = + Kokkos::create_mirror_view(typename device::memory_space(), a_h); - int equal_ptr_h_h2 = a_h.data() ==a_h2.data()?1:0; - int equal_ptr_h_d = a_h.data() ==a_d. data()?1:0; - int equal_ptr_h2_d = a_h2.data()==a_d. data()?1:0; + int equal_ptr_h_h2 = a_h.data() == a_h2.data() ? 1 : 0; + int equal_ptr_h_d = a_h.data() == a_d.data() ? 1 : 0; + int equal_ptr_h2_d = a_h2.data() == a_d.data() ? 1 : 0; - int is_same_memspace = std::is_same::value?1:0; - ASSERT_EQ(equal_ptr_h_h2,1); - ASSERT_EQ(equal_ptr_h_d ,is_same_memspace); - ASSERT_EQ(equal_ptr_h2_d ,is_same_memspace); + int is_same_memspace = + std::is_same::value + ? 1 + : 0; + ASSERT_EQ(equal_ptr_h_h2, 1); + ASSERT_EQ(equal_ptr_h_d, is_same_memspace); + ASSERT_EQ(equal_ptr_h2_d, is_same_memspace); - ASSERT_EQ(a_h.extent(0),a_h2.extent(0)); - ASSERT_EQ(a_h.extent(0),a_d .extent(0)); + ASSERT_EQ(a_h.extent(0), a_h2.extent(0)); + ASSERT_EQ(a_h.extent(0), a_d.extent(0)); - ASSERT_EQ(a_h.rank(),a_h2.rank()); - ASSERT_EQ(a_h.rank(),a_d.rank()); + ASSERT_EQ(a_h.rank(), a_h2.rank()); + ASSERT_EQ(a_h.rank(), a_d.rank()); } } - static void run_test_mirror_and_copy() - { + static void run_test_mirror_and_copy() { // LayoutLeft { - Kokkos::DynRankView< double, Kokkos::LayoutLeft, Kokkos::HostSpace > a_org( "A", 10 ); + Kokkos::DynRankView a_org( + "A", 10); a_org(5) = 42.0; - Kokkos::DynRankView< double, Kokkos::LayoutLeft, Kokkos::HostSpace > a_h = a_org; - auto a_h2 = Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), a_h ); - auto a_d = Kokkos::create_mirror_view_and_copy( DeviceType(), a_h ); - auto a_h3 = Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), a_d ); + Kokkos::DynRankView a_h = + a_org; + auto a_h2 = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), a_h); + auto a_d = Kokkos::create_mirror_view_and_copy(DeviceType(), a_h); + auto a_h3 = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), a_d); - int equal_ptr_h_h2 = a_h.data() == a_h2.data() ? 1 : 0; - int equal_ptr_h_d = a_h.data() == a_d.data() ? 1 : 0; - int equal_ptr_h2_d = a_h2.data() == a_d.data() ? 1 : 0; - int equal_ptr_h3_d = a_h3.data() == a_d.data() ? 1 : 0; + int equal_ptr_h_h2 = a_h.data() == a_h2.data() ? 1 : 0; + int equal_ptr_h_d = a_h.data() == a_d.data() ? 1 : 0; + int equal_ptr_h2_d = a_h2.data() == a_d.data() ? 1 : 0; + int equal_ptr_h3_d = a_h3.data() == a_d.data() ? 1 : 0; - int is_same_memspace = std::is_same< Kokkos::HostSpace, typename DeviceType::memory_space >::value ? 1 : 0; - ASSERT_EQ( equal_ptr_h_h2, 1 ); - ASSERT_EQ( equal_ptr_h_d, is_same_memspace ); - ASSERT_EQ( equal_ptr_h2_d, is_same_memspace ); - ASSERT_EQ( equal_ptr_h3_d, is_same_memspace ); + int is_same_memspace = + std::is_same::value + ? 1 + : 0; + ASSERT_EQ(equal_ptr_h_h2, 1); + ASSERT_EQ(equal_ptr_h_d, is_same_memspace); + ASSERT_EQ(equal_ptr_h2_d, is_same_memspace); + ASSERT_EQ(equal_ptr_h3_d, is_same_memspace); - ASSERT_EQ( a_h.extent(0), a_h3.extent(0) ); - ASSERT_EQ( a_h.extent(0), a_h2.extent(0) ); - ASSERT_EQ( a_h.extent(0), a_d .extent(0) ); - ASSERT_EQ( a_h.extent(0), a_h3.extent(0) ); - ASSERT_EQ( a_h.rank(), a_org.rank() ); - ASSERT_EQ( a_h.rank(), a_h2.rank() ); - ASSERT_EQ( a_h.rank(), a_h3.rank() ); - ASSERT_EQ( a_h.rank(), a_d.rank() ); - ASSERT_EQ( a_org(5), a_h3(5) ); + ASSERT_EQ(a_h.extent(0), a_h3.extent(0)); + ASSERT_EQ(a_h.extent(0), a_h2.extent(0)); + ASSERT_EQ(a_h.extent(0), a_d.extent(0)); + ASSERT_EQ(a_h.extent(0), a_h3.extent(0)); + ASSERT_EQ(a_h.rank(), a_org.rank()); + ASSERT_EQ(a_h.rank(), a_h2.rank()); + ASSERT_EQ(a_h.rank(), a_h3.rank()); + ASSERT_EQ(a_h.rank(), a_d.rank()); + ASSERT_EQ(a_org(5), a_h3(5)); } // LayoutRight { - Kokkos::DynRankView< double, Kokkos::LayoutRight, Kokkos::HostSpace > a_org( "A", 10 ); + Kokkos::DynRankView a_org( + "A", 10); a_org(5) = 42.0; - Kokkos::DynRankView< double, Kokkos::LayoutRight, Kokkos::HostSpace > a_h = a_org; - auto a_h2 = Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), a_h ); - auto a_d = Kokkos::create_mirror_view_and_copy( DeviceType(), a_h ); - auto a_h3 = Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), a_d ); + Kokkos::DynRankView a_h = + a_org; + auto a_h2 = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), a_h); + auto a_d = Kokkos::create_mirror_view_and_copy(DeviceType(), a_h); + auto a_h3 = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), a_d); - int equal_ptr_h_h2 = a_h.data() == a_h2.data() ? 1 : 0; - int equal_ptr_h_d = a_h.data() == a_d.data() ? 1 : 0; - int equal_ptr_h2_d = a_h2.data() == a_d.data() ? 1 : 0; - int equal_ptr_h3_d = a_h3.data() == a_d.data() ? 1 : 0; + int equal_ptr_h_h2 = a_h.data() == a_h2.data() ? 1 : 0; + int equal_ptr_h_d = a_h.data() == a_d.data() ? 1 : 0; + int equal_ptr_h2_d = a_h2.data() == a_d.data() ? 1 : 0; + int equal_ptr_h3_d = a_h3.data() == a_d.data() ? 1 : 0; - int is_same_memspace = std::is_same< Kokkos::HostSpace, typename DeviceType::memory_space >::value ? 1 : 0; - ASSERT_EQ( equal_ptr_h_h2, 1 ); - ASSERT_EQ( equal_ptr_h_d, is_same_memspace ); - ASSERT_EQ( equal_ptr_h2_d, is_same_memspace ); - ASSERT_EQ( equal_ptr_h3_d, is_same_memspace ); + int is_same_memspace = + std::is_same::value + ? 1 + : 0; + ASSERT_EQ(equal_ptr_h_h2, 1); + ASSERT_EQ(equal_ptr_h_d, is_same_memspace); + ASSERT_EQ(equal_ptr_h2_d, is_same_memspace); + ASSERT_EQ(equal_ptr_h3_d, is_same_memspace); - ASSERT_EQ( a_h.extent(0), a_h3.extent(0) ); - ASSERT_EQ( a_h.extent(0), a_h2.extent(0) ); - ASSERT_EQ( a_h.extent(0), a_d .extent(0) ); - ASSERT_EQ( a_h.rank(), a_org.rank() ); - ASSERT_EQ( a_h.rank(), a_h2.rank() ); - ASSERT_EQ( a_h.rank(), a_h3.rank() ); - ASSERT_EQ( a_h.rank(), a_d.rank() ); - ASSERT_EQ( a_org(5), a_h3(5) ); + ASSERT_EQ(a_h.extent(0), a_h3.extent(0)); + ASSERT_EQ(a_h.extent(0), a_h2.extent(0)); + ASSERT_EQ(a_h.extent(0), a_d.extent(0)); + ASSERT_EQ(a_h.rank(), a_org.rank()); + ASSERT_EQ(a_h.rank(), a_h2.rank()); + ASSERT_EQ(a_h.rank(), a_h3.rank()); + ASSERT_EQ(a_h.rank(), a_d.rank()); + ASSERT_EQ(a_org(5), a_h3(5)); } } - static void run_test_scalar() - { - typedef typename dView0::HostMirror hView0 ; //HostMirror of DynRankView is a DynRankView + static void run_test_scalar() { + typedef typename dView0::HostMirror + hView0; // HostMirror of DynRankView is a DynRankView - dView0 dx , dy ; - hView0 hx , hy ; + dView0 dx, dy; + hView0 hx, hy; - dx = dView0( "dx" ); - dy = dView0( "dy" ); + dx = dView0("dx"); + dy = dView0("dy"); - hx = Kokkos::create_mirror( dx ); - hy = Kokkos::create_mirror( dy ); + hx = Kokkos::create_mirror(dx); + hy = Kokkos::create_mirror(dy); - hx() = 1 ; + hx() = 1; - Kokkos::deep_copy( dx , hx ); - Kokkos::deep_copy( dy , dx ); - Kokkos::deep_copy( hy , dy ); + Kokkos::deep_copy(dx, hx); + Kokkos::deep_copy(dy, dx); + Kokkos::deep_copy(hy, dy); - ASSERT_EQ( hx(), hy() ); - ASSERT_EQ( dx.rank() , hx.rank() ); - ASSERT_EQ( dy.rank() , hy.rank() ); + ASSERT_EQ(hx(), hy()); + ASSERT_EQ(dx.rank(), hx.rank()); + ASSERT_EQ(dy.rank(), hy.rank()); - //View - DynRankView Interoperability tests - // deep_copy DynRankView to View + // View - DynRankView Interoperability tests + // deep_copy DynRankView to View View0 vx("vx"); - Kokkos::deep_copy( vx , dx ); - ASSERT_EQ( rank(dx) , rank(vx) ); + Kokkos::deep_copy(vx, dx); + ASSERT_EQ(rank(dx), rank(vx)); View0 vy("vy"); - Kokkos::deep_copy( vy , dy ); - ASSERT_EQ( rank(dy) , rank(vy) ); + Kokkos::deep_copy(vy, dy); + ASSERT_EQ(rank(dy), rank(vy)); - // deep_copy View to DynRankView + // deep_copy View to DynRankView dView0 dxx("dxx"); - Kokkos::deep_copy( dxx , vx ); - ASSERT_EQ( rank(dxx) , rank(vx) ); - + Kokkos::deep_copy(dxx, vx); + ASSERT_EQ(rank(dxx), rank(vx)); View7 vcast = dx.ConstDownCast(); - ASSERT_EQ( dx.extent(0) , vcast.extent(0) ); - ASSERT_EQ( dx.extent(1) , vcast.extent(1) ); - ASSERT_EQ( dx.extent(2) , vcast.extent(2) ); - ASSERT_EQ( dx.extent(3) , vcast.extent(3) ); - ASSERT_EQ( dx.extent(4) , vcast.extent(4) ); + ASSERT_EQ(dx.extent(0), vcast.extent(0)); + ASSERT_EQ(dx.extent(1), vcast.extent(1)); + ASSERT_EQ(dx.extent(2), vcast.extent(2)); + ASSERT_EQ(dx.extent(3), vcast.extent(3)); + ASSERT_EQ(dx.extent(4), vcast.extent(4)); - View7 vcast1( dy.ConstDownCast() ); - ASSERT_EQ( dy.extent(0) , vcast1.extent(0) ); - ASSERT_EQ( dy.extent(1) , vcast1.extent(1) ); - ASSERT_EQ( dy.extent(2) , vcast1.extent(2) ); - ASSERT_EQ( dy.extent(3) , vcast1.extent(3) ); - ASSERT_EQ( dy.extent(4) , vcast1.extent(4) ); + View7 vcast1(dy.ConstDownCast()); + ASSERT_EQ(dy.extent(0), vcast1.extent(0)); + ASSERT_EQ(dy.extent(1), vcast1.extent(1)); + ASSERT_EQ(dy.extent(2), vcast1.extent(2)); + ASSERT_EQ(dy.extent(3), vcast1.extent(3)); + ASSERT_EQ(dy.extent(4), vcast1.extent(4)); - //View - DynRankView Interoperability tests - // copy View to DynRankView - dView0 dfromvx( vx ); - auto hmx = Kokkos::create_mirror_view(dfromvx) ; - Kokkos::deep_copy(hmx , dfromvx); - auto hvx = Kokkos::create_mirror_view(vx) ; - Kokkos::deep_copy(hvx , vx); - ASSERT_EQ( rank(hvx) , rank(hmx) ); - ASSERT_EQ( hvx.extent(0) , hmx.extent(0) ); - ASSERT_EQ( hvx.extent(1) , hmx.extent(1) ); + // View - DynRankView Interoperability tests + // copy View to DynRankView + dView0 dfromvx(vx); + auto hmx = Kokkos::create_mirror_view(dfromvx); + Kokkos::deep_copy(hmx, dfromvx); + auto hvx = Kokkos::create_mirror_view(vx); + Kokkos::deep_copy(hvx, vx); + ASSERT_EQ(rank(hvx), rank(hmx)); + ASSERT_EQ(hvx.extent(0), hmx.extent(0)); + ASSERT_EQ(hvx.extent(1), hmx.extent(1)); - // copy-assign View to DynRankView - dView0 dfromvy = vy ; - auto hmy = Kokkos::create_mirror_view(dfromvy) ; - Kokkos::deep_copy(hmy , dfromvy); - auto hvy = Kokkos::create_mirror_view(vy) ; - Kokkos::deep_copy(hvy , vy); - ASSERT_EQ( rank(hvy) , rank(hmy) ); - ASSERT_EQ( hvy.extent(0) , hmy.extent(0) ); - ASSERT_EQ( hvy.extent(1) , hmy.extent(1) ); + // copy-assign View to DynRankView + dView0 dfromvy = vy; + auto hmy = Kokkos::create_mirror_view(dfromvy); + Kokkos::deep_copy(hmy, dfromvy); + auto hvy = Kokkos::create_mirror_view(vy); + Kokkos::deep_copy(hvy, vy); + ASSERT_EQ(rank(hvy), rank(hmy)); + ASSERT_EQ(hvy.extent(0), hmy.extent(0)); + ASSERT_EQ(hvy.extent(1), hmy.extent(1)); + View7 vtest1("vtest1", 2, 2, 2, 2, 2, 2, 2); + dView0 dfromv1(vtest1); + ASSERT_EQ(dfromv1.rank(), vtest1.Rank); + ASSERT_EQ(dfromv1.extent(0), vtest1.extent(0)); + ASSERT_EQ(dfromv1.extent(1), vtest1.extent(1)); + ASSERT_EQ(dfromv1.use_count(), vtest1.use_count()); - View7 vtest1("vtest1",2,2,2,2,2,2,2); - dView0 dfromv1( vtest1 ); - ASSERT_EQ( dfromv1.rank() , vtest1.Rank ); - ASSERT_EQ( dfromv1.extent(0) , vtest1.extent(0) ); - ASSERT_EQ( dfromv1.extent(1) , vtest1.extent(1) ); - ASSERT_EQ( dfromv1.use_count() , vtest1.use_count() ); - - dView0 dfromv2( vcast ); - ASSERT_EQ( dfromv2.rank() , vcast.Rank ); - ASSERT_EQ( dfromv2.extent(0) , vcast.extent(0) ); - ASSERT_EQ( dfromv2.extent(1) , vcast.extent(1) ); - ASSERT_EQ( dfromv2.use_count() , vcast.use_count() ); + dView0 dfromv2(vcast); + ASSERT_EQ(dfromv2.rank(), vcast.Rank); + ASSERT_EQ(dfromv2.extent(0), vcast.extent(0)); + ASSERT_EQ(dfromv2.extent(1), vcast.extent(1)); + ASSERT_EQ(dfromv2.use_count(), vcast.use_count()); dView0 dfromv3 = vcast1; - ASSERT_EQ( dfromv3.rank() , vcast1.Rank ); - ASSERT_EQ( dfromv3.extent(0) , vcast1.extent(0) ); - ASSERT_EQ( dfromv3.extent(1) , vcast1.extent(1) ); - ASSERT_EQ( dfromv3.use_count() , vcast1.use_count() ); + ASSERT_EQ(dfromv3.rank(), vcast1.Rank); + ASSERT_EQ(dfromv3.extent(0), vcast1.extent(0)); + ASSERT_EQ(dfromv3.extent(1), vcast1.extent(1)); + ASSERT_EQ(dfromv3.use_count(), vcast1.use_count()); } - static void run_test() - { + static void run_test() { // mfh 14 Feb 2014: This test doesn't actually create instances of // these types. In order to avoid "declared but unused typedef" // warnings, we declare empty instances of these types, with the // usual "(void)" marker to avoid compiler warnings for unused // variables. - typedef typename dView0::HostMirror hView0 ; + typedef typename dView0::HostMirror hView0; { hView0 thing; - (void) thing; + (void)thing; } - dView0 d_uninitialized(Kokkos::ViewAllocateWithoutInitializing("uninit"),10,20); - ASSERT_TRUE( d_uninitialized.data() != nullptr ); - ASSERT_EQ( d_uninitialized.rank() , 2 ); - ASSERT_EQ( d_uninitialized.extent(0) , 10 ); - ASSERT_EQ( d_uninitialized.extent(1) , 20 ); - ASSERT_EQ( d_uninitialized.extent(2) , 1 ); + dView0 d_uninitialized(Kokkos::ViewAllocateWithoutInitializing("uninit"), + 10, 20); + ASSERT_TRUE(d_uninitialized.data() != nullptr); + ASSERT_EQ(d_uninitialized.rank(), 2); + ASSERT_EQ(d_uninitialized.extent(0), 10); + ASSERT_EQ(d_uninitialized.extent(1), 20); + ASSERT_EQ(d_uninitialized.extent(2), 1); - dView0 dx , dy , dz ; - hView0 hx , hy , hz ; + dView0 dx, dy, dz; + hView0 hx, hy, hz; - ASSERT_TRUE( Kokkos::is_dyn_rank_view::value ); - ASSERT_FALSE( Kokkos::is_dyn_rank_view< Kokkos::View >::value ); + ASSERT_TRUE(Kokkos::is_dyn_rank_view::value); + ASSERT_FALSE(Kokkos::is_dyn_rank_view >::value); - ASSERT_TRUE( dx.data() == 0 ); //Okay with UVM - ASSERT_TRUE( dy.data() == 0 ); //Okay with UVM - ASSERT_TRUE( dz.data() == 0 ); //Okay with UVM - ASSERT_TRUE( hx.data() == 0 ); - ASSERT_TRUE( hy.data() == 0 ); - ASSERT_TRUE( hz.data() == 0 ); - ASSERT_EQ( dx.extent(0) , 0u ); //Okay with UVM - ASSERT_EQ( dy.extent(0) , 0u ); //Okay with UVM - ASSERT_EQ( dz.extent(0) , 0u ); //Okay with UVM - ASSERT_EQ( hx.extent(0) , 0u ); - ASSERT_EQ( hy.extent(0) , 0u ); - ASSERT_EQ( hz.extent(0) , 0u ); - ASSERT_EQ( dx.rank() , 0u ); //Okay with UVM - ASSERT_EQ( hx.rank() , 0u ); + ASSERT_TRUE(dx.data() == 0); // Okay with UVM + ASSERT_TRUE(dy.data() == 0); // Okay with UVM + ASSERT_TRUE(dz.data() == 0); // Okay with UVM + ASSERT_TRUE(hx.data() == 0); + ASSERT_TRUE(hy.data() == 0); + ASSERT_TRUE(hz.data() == 0); + ASSERT_EQ(dx.extent(0), 0u); // Okay with UVM + ASSERT_EQ(dy.extent(0), 0u); // Okay with UVM + ASSERT_EQ(dz.extent(0), 0u); // Okay with UVM + ASSERT_EQ(hx.extent(0), 0u); + ASSERT_EQ(hy.extent(0), 0u); + ASSERT_EQ(hz.extent(0), 0u); + ASSERT_EQ(dx.rank(), 0u); // Okay with UVM + ASSERT_EQ(hx.rank(), 0u); - dx = dView0( "dx" , N1 , N2 , N3 ); - dy = dView0( "dy" , N1 , N2 , N3 ); + dx = dView0("dx", N1, N2, N3); + dy = dView0("dy", N1, N2, N3); - hx = hView0( "hx" , N1 , N2 , N3 ); - hy = hView0( "hy" , N1 , N2 , N3 ); + hx = hView0("hx", N1, N2, N3); + hy = hView0("hy", N1, N2, N3); - ASSERT_EQ( dx.extent(0) , unsigned(N1) ); //Okay with UVM - ASSERT_EQ( dy.extent(0) , unsigned(N1) ); //Okay with UVM - ASSERT_EQ( hx.extent(0) , unsigned(N1) ); - ASSERT_EQ( hy.extent(0) , unsigned(N1) ); - ASSERT_EQ( dx.rank() , 3 ); //Okay with UVM - ASSERT_EQ( hx.rank() , 3 ); + ASSERT_EQ(dx.extent(0), unsigned(N1)); // Okay with UVM + ASSERT_EQ(dy.extent(0), unsigned(N1)); // Okay with UVM + ASSERT_EQ(hx.extent(0), unsigned(N1)); + ASSERT_EQ(hy.extent(0), unsigned(N1)); + ASSERT_EQ(dx.rank(), 3); // Okay with UVM + ASSERT_EQ(hx.rank(), 3); - dx = dView0( "dx" , N0 , N1 , N2 , N3 ); - dy = dView0( "dy" , N0 , N1 , N2 , N3 ); - hx = hView0( "hx" , N0 , N1 , N2 , N3 ); - hy = hView0( "hy" , N0 , N1 , N2 , N3 ); + dx = dView0("dx", N0, N1, N2, N3); + dy = dView0("dy", N0, N1, N2, N3); + hx = hView0("hx", N0, N1, N2, N3); + hy = hView0("hy", N0, N1, N2, N3); - ASSERT_EQ( dx.extent(0) , unsigned(N0) ); - ASSERT_EQ( dy.extent(0) , unsigned(N0) ); - ASSERT_EQ( hx.extent(0) , unsigned(N0) ); - ASSERT_EQ( hy.extent(0) , unsigned(N0) ); - ASSERT_EQ( dx.rank() , 4 ); - ASSERT_EQ( dy.rank() , 4 ); - ASSERT_EQ( hx.rank() , 4 ); - ASSERT_EQ( hy.rank() , 4 ); + ASSERT_EQ(dx.extent(0), unsigned(N0)); + ASSERT_EQ(dy.extent(0), unsigned(N0)); + ASSERT_EQ(hx.extent(0), unsigned(N0)); + ASSERT_EQ(hy.extent(0), unsigned(N0)); + ASSERT_EQ(dx.rank(), 4); + ASSERT_EQ(dy.rank(), 4); + ASSERT_EQ(hx.rank(), 4); + ASSERT_EQ(hy.rank(), 4); - ASSERT_EQ( dx.use_count() , size_t(1) ); + ASSERT_EQ(dx.use_count(), size_t(1)); dView0_unmanaged unmanaged_dx = dx; - ASSERT_EQ( dx.use_count() , size_t(1) ); - - - dView0_unmanaged unmanaged_from_ptr_dx = dView0_unmanaged(dx.data(), - dx.extent(0), - dx.extent(1), - dx.extent(2), - dx.extent(3)); + ASSERT_EQ(dx.use_count(), size_t(1)); + dView0_unmanaged unmanaged_from_ptr_dx = dView0_unmanaged( + dx.data(), dx.extent(0), dx.extent(1), dx.extent(2), dx.extent(3)); { // Destruction of this view should be harmless - const_dView0 unmanaged_from_ptr_const_dx( dx.data() , - dx.extent(0) , - dx.extent(1) , - dx.extent(2) , - dx.extent(3) ); + const_dView0 unmanaged_from_ptr_const_dx( + dx.data(), dx.extent(0), dx.extent(1), dx.extent(2), dx.extent(3)); } - const_dView0 const_dx = dx ; - ASSERT_EQ( dx.use_count() , size_t(2) ); + const_dView0 const_dx = dx; + ASSERT_EQ(dx.use_count(), size_t(2)); { const_dView0 const_dx2; const_dx2 = const_dx; - ASSERT_EQ( dx.use_count() , size_t(3) ); + ASSERT_EQ(dx.use_count(), size_t(3)); const_dx2 = dy; - ASSERT_EQ( dx.use_count() , size_t(2) ); + ASSERT_EQ(dx.use_count(), size_t(2)); const_dView0 const_dx3(dx); - ASSERT_EQ( dx.use_count() , size_t(3) ); - + ASSERT_EQ(dx.use_count(), size_t(3)); + dView0_unmanaged dx4_unmanaged(dx); - ASSERT_EQ( dx.use_count() , size_t(3) ); + ASSERT_EQ(dx.use_count(), size_t(3)); } - ASSERT_EQ( dx.use_count() , size_t(2) ); + ASSERT_EQ(dx.use_count(), size_t(2)); + ASSERT_FALSE(dx.data() == 0); + ASSERT_FALSE(const_dx.data() == 0); + ASSERT_FALSE(unmanaged_dx.data() == 0); + ASSERT_FALSE(unmanaged_from_ptr_dx.data() == 0); + ASSERT_FALSE(dy.data() == 0); + ASSERT_NE(dx, dy); - ASSERT_FALSE( dx.data() == 0 ); - ASSERT_FALSE( const_dx.data() == 0 ); - ASSERT_FALSE( unmanaged_dx.data() == 0 ); - ASSERT_FALSE( unmanaged_from_ptr_dx.data() == 0 ); - ASSERT_FALSE( dy.data() == 0 ); - ASSERT_NE( dx , dy ); + ASSERT_EQ(dx.extent(0), unsigned(N0)); + ASSERT_EQ(dx.extent(1), unsigned(N1)); + ASSERT_EQ(dx.extent(2), unsigned(N2)); + ASSERT_EQ(dx.extent(3), unsigned(N3)); - ASSERT_EQ( dx.extent(0) , unsigned(N0) ); - ASSERT_EQ( dx.extent(1) , unsigned(N1) ); - ASSERT_EQ( dx.extent(2) , unsigned(N2) ); - ASSERT_EQ( dx.extent(3) , unsigned(N3) ); + ASSERT_EQ(dy.extent(0), unsigned(N0)); + ASSERT_EQ(dy.extent(1), unsigned(N1)); + ASSERT_EQ(dy.extent(2), unsigned(N2)); + ASSERT_EQ(dy.extent(3), unsigned(N3)); - ASSERT_EQ( dy.extent(0) , unsigned(N0) ); - ASSERT_EQ( dy.extent(1) , unsigned(N1) ); - ASSERT_EQ( dy.extent(2) , unsigned(N2) ); - ASSERT_EQ( dy.extent(3) , unsigned(N3) ); + ASSERT_EQ(unmanaged_from_ptr_dx.span(), + unsigned(N0) * unsigned(N1) * unsigned(N2) * unsigned(N3)); - ASSERT_EQ( unmanaged_from_ptr_dx.span(),unsigned(N0)*unsigned(N1)*unsigned(N2)*unsigned(N3) ); + hx = Kokkos::create_mirror(dx); + hy = Kokkos::create_mirror(dy); - hx = Kokkos::create_mirror( dx ); - hy = Kokkos::create_mirror( dy ); + ASSERT_EQ(hx.rank(), dx.rank()); + ASSERT_EQ(hy.rank(), dy.rank()); - ASSERT_EQ( hx.rank() , dx.rank() ); - ASSERT_EQ( hy.rank() , dy.rank() ); + ASSERT_EQ(hx.extent(0), unsigned(N0)); + ASSERT_EQ(hx.extent(1), unsigned(N1)); + ASSERT_EQ(hx.extent(2), unsigned(N2)); + ASSERT_EQ(hx.extent(3), unsigned(N3)); - ASSERT_EQ( hx.extent(0) , unsigned(N0) ); - ASSERT_EQ( hx.extent(1) , unsigned(N1) ); - ASSERT_EQ( hx.extent(2) , unsigned(N2) ); - ASSERT_EQ( hx.extent(3) , unsigned(N3) ); - - ASSERT_EQ( hy.extent(0) , unsigned(N0) ); - ASSERT_EQ( hy.extent(1) , unsigned(N1) ); - ASSERT_EQ( hy.extent(2) , unsigned(N2) ); - ASSERT_EQ( hy.extent(3) , unsigned(N3) ); + ASSERT_EQ(hy.extent(0), unsigned(N0)); + ASSERT_EQ(hy.extent(1), unsigned(N1)); + ASSERT_EQ(hy.extent(2), unsigned(N2)); + ASSERT_EQ(hy.extent(3), unsigned(N3)); // T v1 = hx() ; // Generates compile error as intended // T v2 = hx(0,0) ; // Generates compile error as intended @@ -1265,365 +1263,422 @@ public: // Testing with synchronous deep copy { - size_t count = 0 ; - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < hx.extent(1) ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < hx.extent(2) ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < hx.extent(3) ; ++i3 ) { - hx(ip,i1,i2,i3) = ++count ; - }}}} + size_t count = 0; + for (size_t ip = 0; ip < N0; ++ip) { + for (size_t i1 = 0; i1 < hx.extent(1); ++i1) { + for (size_t i2 = 0; i2 < hx.extent(2); ++i2) { + for (size_t i3 = 0; i3 < hx.extent(3); ++i3) { + hx(ip, i1, i2, i3) = ++count; + } + } + } + } - Kokkos::deep_copy( dx , hx ); - Kokkos::deep_copy( dy , dx ); - Kokkos::deep_copy( hy , dy ); + Kokkos::deep_copy(dx, hx); + Kokkos::deep_copy(dy, dx); + Kokkos::deep_copy(hy, dy); Kokkos::fence(); - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - { ASSERT_EQ( hx(ip,i1,i2,i3) , hy(ip,i1,i2,i3) ); } - }}}} + for (size_t ip = 0; ip < N0; ++ip) { + for (size_t i1 = 0; i1 < N1; ++i1) { + for (size_t i2 = 0; i2 < N2; ++i2) { + for (size_t i3 = 0; i3 < N3; ++i3) { + { + ASSERT_EQ(hx(ip, i1, i2, i3), hy(ip, i1, i2, i3)); + } + } + } + } + } - Kokkos::deep_copy( dx , T(0) ); - Kokkos::deep_copy( hx , dx ); + Kokkos::deep_copy(dx, T(0)); + Kokkos::deep_copy(hx, dx); Kokkos::fence(); - for ( size_t ip = 0 ; ip < N0 ; ++ip ) { - for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) { - for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) { - for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) { - { ASSERT_EQ( hx(ip,i1,i2,i3) , T(0) ); } - }}}} -// ASSERT_EQ( hx(0,0,0,0,0,0,0,0) , T(0) ); //Test rank8 op behaves properly - if implemented + for (size_t ip = 0; ip < N0; ++ip) { + for (size_t i1 = 0; i1 < N1; ++i1) { + for (size_t i2 = 0; i2 < N2; ++i2) { + for (size_t i3 = 0; i3 < N3; ++i3) { + { + ASSERT_EQ(hx(ip, i1, i2, i3), T(0)); + } + } + } + } + } + // ASSERT_EQ( hx(0,0,0,0,0,0,0,0) , T(0) ); //Test rank8 op behaves + // properly - if implemented } - dz = dx ; ASSERT_EQ( dx, dz); ASSERT_NE( dy, dz); - dz = dy ; ASSERT_EQ( dy, dz); ASSERT_NE( dx, dz); + dz = dx; + ASSERT_EQ(dx, dz); + ASSERT_NE(dy, dz); + dz = dy; + ASSERT_EQ(dy, dz); + ASSERT_NE(dx, dz); dx = dView0(); - ASSERT_TRUE( dx.data() == 0 ); - ASSERT_FALSE( dy.data() == 0 ); - ASSERT_FALSE( dz.data() == 0 ); + ASSERT_TRUE(dx.data() == 0); + ASSERT_FALSE(dy.data() == 0); + ASSERT_FALSE(dz.data() == 0); dy = dView0(); - ASSERT_TRUE( dx.data() == 0 ); - ASSERT_TRUE( dy.data() == 0 ); - ASSERT_FALSE( dz.data() == 0 ); + ASSERT_TRUE(dx.data() == 0); + ASSERT_TRUE(dy.data() == 0); + ASSERT_FALSE(dz.data() == 0); dz = dView0(); - ASSERT_TRUE( dx.data() == 0 ); - ASSERT_TRUE( dy.data() == 0 ); - ASSERT_TRUE( dz.data() == 0 ); + ASSERT_TRUE(dx.data() == 0); + ASSERT_TRUE(dy.data() == 0); + ASSERT_TRUE(dz.data() == 0); - //View - DynRankView Interoperability tests + // View - DynRankView Interoperability tests // deep_copy from view to dynrankview const int testdim = 4; - dView0 dxx("dxx",testdim); - View1 vxx("vxx",testdim); - auto hvxx = Kokkos::create_mirror_view(vxx); - for (int i = 0; i < testdim; ++i) - { hvxx(i) = i; } - Kokkos::deep_copy(vxx,hvxx); - Kokkos::deep_copy(dxx,vxx); + dView0 dxx("dxx", testdim); + View1 vxx("vxx", testdim); + auto hvxx = Kokkos::create_mirror_view(vxx); + for (int i = 0; i < testdim; ++i) { + hvxx(i) = i; + } + Kokkos::deep_copy(vxx, hvxx); + Kokkos::deep_copy(dxx, vxx); auto hdxx = Kokkos::create_mirror_view(dxx); - Kokkos::deep_copy(hdxx,dxx); - for (int i = 0; i < testdim; ++i) - { ASSERT_EQ( hvxx(i) , hdxx(i) ); } + Kokkos::deep_copy(hdxx, dxx); + for (int i = 0; i < testdim; ++i) { + ASSERT_EQ(hvxx(i), hdxx(i)); + } - ASSERT_EQ( rank(hdxx) , rank(hvxx) ); - ASSERT_EQ( hdxx.extent(0) , testdim ); - ASSERT_EQ( hdxx.extent(0) , hvxx.extent(0) ); + ASSERT_EQ(rank(hdxx), rank(hvxx)); + ASSERT_EQ(hdxx.extent(0), testdim); + ASSERT_EQ(hdxx.extent(0), hvxx.extent(0)); // deep_copy from dynrankview to view - View1 vdxx("vdxx",testdim); + View1 vdxx("vdxx", testdim); auto hvdxx = Kokkos::create_mirror_view(vdxx); - Kokkos::deep_copy(hvdxx , hdxx); - ASSERT_EQ( rank(hdxx) , rank(hvdxx) ); - ASSERT_EQ( hvdxx.extent(0) , testdim ); - ASSERT_EQ( hdxx.extent(0) , hvdxx.extent(0) ); - for (int i = 0; i < testdim; ++i) - { ASSERT_EQ( hvxx(i) , hvdxx(i) ); } + Kokkos::deep_copy(hvdxx, hdxx); + ASSERT_EQ(rank(hdxx), rank(hvdxx)); + ASSERT_EQ(hvdxx.extent(0), testdim); + ASSERT_EQ(hdxx.extent(0), hvdxx.extent(0)); + for (int i = 0; i < testdim; ++i) { + ASSERT_EQ(hvxx(i), hvdxx(i)); + } } - typedef T DataType ; + typedef T DataType; - static void - check_auto_conversion_to_const( - const Kokkos::DynRankView< const DataType , device > & arg_const , - const Kokkos::DynRankView< DataType , device > & arg ) - { - ASSERT_TRUE( arg_const == arg ); + static void check_auto_conversion_to_const( + const Kokkos::DynRankView& arg_const, + const Kokkos::DynRankView& arg) { + ASSERT_TRUE(arg_const == arg); } - static void run_test_const() - { - typedef Kokkos::DynRankView< DataType , device > typeX ; - typedef Kokkos::DynRankView< const DataType , device > const_typeX ; - typedef Kokkos::DynRankView< const DataType , device , Kokkos::MemoryRandomAccess > const_typeR ; - typeX x( "X", 2 ); - const_typeX xc = x ; - const_typeR xr = x ; + static void run_test_const() { + typedef Kokkos::DynRankView typeX; + typedef Kokkos::DynRankView const_typeX; + typedef Kokkos::DynRankView + const_typeR; + typeX x("X", 2); + const_typeX xc = x; + const_typeR xr = x; - ASSERT_TRUE( xc == x ); - ASSERT_TRUE( x == xc ); + ASSERT_TRUE(xc == x); + ASSERT_TRUE(x == xc); // For CUDA the constant random access View does not return // an lvalue reference due to retrieving through texture cache // therefore not allowed to query the underlying pointer. #if defined(KOKKOS_ENABLE_CUDA) - if ( ! std::is_same< typename device::execution_space , Kokkos::Cuda >::value ) + if (!std::is_same::value) #endif { - ASSERT_TRUE( x.data() == xr.data() ); + ASSERT_TRUE(x.data() == xr.data()); } // typeX xf = xc ; // setting non-const from const must not compile - check_auto_conversion_to_const( x , x ); + check_auto_conversion_to_const(x, x); } + static void run_test_subview() { + typedef Kokkos::DynRankView cdView; + typedef Kokkos::DynRankView dView; + // LayoutStride required for all returned DynRankView subdynrankview's + typedef Kokkos::DynRankView sdView; - static void run_test_subview() - { - typedef Kokkos::DynRankView< const T , device > cdView ; - typedef Kokkos::DynRankView< T , device > dView ; - // LayoutStride required for all returned DynRankView subdynrankview's - typedef Kokkos::DynRankView< T , Kokkos::LayoutStride , device > sdView ; + dView0 d0("d0"); + cdView s0 = d0; - dView0 d0( "d0" ); - cdView s0 = d0 ; + // N0 = 1000,N1 = 3,N2 = 5,N3 = 7 + unsigned order[] = {6, 5, 4, 3, 2, 1, 0}, + dimen[] = {N0, N1, N2, 2, 2, 2, 2}; // LayoutRight equivalent + sdView d7("d7", Kokkos::LayoutStride::order_dimensions(7, order, dimen)); + ASSERT_EQ(d7.rank(), 7); - // N0 = 1000,N1 = 3,N2 = 5,N3 = 7 - unsigned order[] = { 6,5,4,3,2,1,0 }, dimen[] = { N0, N1, N2, 2, 2, 2, 2 }; //LayoutRight equivalent - sdView d7( "d7" , Kokkos::LayoutStride::order_dimensions(7, order, dimen) ); - ASSERT_EQ( d7.rank() , 7 ); + sdView ds0 = Kokkos::subdynrankview(d7, 1, 1, 1, 1, 1, 1, 1); + ASSERT_EQ(ds0.rank(), 0); - sdView ds0 = Kokkos::subdynrankview( d7 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ); - ASSERT_EQ( ds0.rank() , 0 ); + // Basic test - ALL + sdView dsALL = Kokkos::subdynrankview( + d7, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), + Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL()); + ASSERT_EQ(dsALL.rank(), 7); -//Basic test - ALL - sdView dsALL = Kokkos::subdynrankview( d7 , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() ); - ASSERT_EQ( dsALL.rank() , 7 ); + // Send a value to final rank returning rank 6 subview + sdView dsm1 = + Kokkos::subdynrankview(d7, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), + Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), 1); + ASSERT_EQ(dsm1.rank(), 6); -// Send a value to final rank returning rank 6 subview - sdView dsm1 = Kokkos::subdynrankview( d7 , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , 1 ); - ASSERT_EQ( dsm1.rank() , 6 ); + // Send a std::pair as argument to a rank + sdView dssp = Kokkos::subdynrankview( + d7, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), + Kokkos::ALL(), Kokkos::ALL(), std::pair(1, 2)); + ASSERT_EQ(dssp.rank(), 7); -// Send a std::pair as argument to a rank - sdView dssp = Kokkos::subdynrankview( d7 , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , std::pair(1,2) ); - ASSERT_EQ( dssp.rank() , 7 ); + // Send a kokkos::pair as argument to a rank; take default layout as input + dView0 dd0("dd0", N0, N1, N2, 2, 2, 2, 2); // default layout + ASSERT_EQ(dd0.rank(), 7); + sdView dtkp = Kokkos::subdynrankview( + dd0, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), + Kokkos::ALL(), Kokkos::ALL(), Kokkos::pair(0, 1)); + ASSERT_EQ(dtkp.rank(), 7); -// Send a kokkos::pair as argument to a rank; take default layout as input - dView0 dd0("dd0" , N0 , N1 , N2 , 2 , 2 , 2 , 2 ); //default layout - ASSERT_EQ( dd0.rank() , 7 ); - sdView dtkp = Kokkos::subdynrankview( dd0 , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::pair(0,1) ); - ASSERT_EQ( dtkp.rank() , 7 ); + // Return rank 7 subview, taking a pair as one argument, layout stride input + sdView ds7 = Kokkos::subdynrankview( + d7, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), + Kokkos::ALL(), Kokkos::ALL(), Kokkos::pair(0, 1)); + ASSERT_EQ(ds7.rank(), 7); -// Return rank 7 subview, taking a pair as one argument, layout stride input - sdView ds7 = Kokkos::subdynrankview( d7 , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::pair(0,1) ); - ASSERT_EQ( ds7.rank() , 7 ); + // Default Layout DynRankView + dView dv6("dv6", N0, N1, N2, N3, 2, 2); + ASSERT_EQ(dv6.rank(), 6); -// Default Layout DynRankView - dView dv6("dv6" , N0 , N1 , N2 , N3 , 2 , 2 ); - ASSERT_EQ( dv6.rank() , 6 ); + // DynRankView with LayoutRight + typedef Kokkos::DynRankView drView; + drView dr5("dr5", N0, N1, N2, 2, 2); + ASSERT_EQ(dr5.rank(), 5); -// DynRankView with LayoutRight - typedef Kokkos::DynRankView< T , Kokkos::LayoutRight , device > drView ; - drView dr5( "dr5" , N0 , N1 , N2 , 2 , 2 ); - ASSERT_EQ( dr5.rank() , 5 ); - -// LayoutStride but arranged as LayoutRight - // NOTE: unused arg_layout dimensions must be set toKOKKOS_INVALID_INDEX so that - // rank deduction can properly take place - unsigned order5[] = { 4,3,2,1,0 }, dimen5[] = { N0, N1, N2, 2, 2 }; - Kokkos::LayoutStride ls = Kokkos::LayoutStride::order_dimensions(5, order5, dimen5); - ls.dimension[5] =KOKKOS_INVALID_INDEX; - ls.dimension[6] =KOKKOS_INVALID_INDEX; - ls.dimension[7] =KOKKOS_INVALID_INDEX; + // LayoutStride but arranged as LayoutRight + // NOTE: unused arg_layout dimensions must be set toKOKKOS_INVALID_INDEX so + // that + // rank deduction can properly take place + unsigned order5[] = {4, 3, 2, 1, 0}, dimen5[] = {N0, N1, N2, 2, 2}; + Kokkos::LayoutStride ls = + Kokkos::LayoutStride::order_dimensions(5, order5, dimen5); + ls.dimension[5] = KOKKOS_INVALID_INDEX; + ls.dimension[6] = KOKKOS_INVALID_INDEX; + ls.dimension[7] = KOKKOS_INVALID_INDEX; sdView d5("d5", ls); - ASSERT_EQ( d5.rank() , 5 ); + ASSERT_EQ(d5.rank(), 5); -// LayoutStride arranged as LayoutRight - commented out as example that fails unit test -// unsigned order5[] = { 4,3,2,1,0 }, dimen5[] = { N0, N1, N2, 2, 2 }; -// sdView d5( "d5" , Kokkos::LayoutStride::order_dimensions(5, order5, dimen5) ); -// -// Fails the following unit test: -// ASSERT_EQ( d5.rank() , dr5.rank() ); -// -// Explanation: In construction of the Kokkos::LayoutStride below, since the -// remaining dimensions are not specified, they will default to values of 0 -// rather thanKOKKOS_INVALID_INDEX. -// When passed to the DynRankView constructor the default dimensions (of 0) -// will be counted toward the dynamic rank and returning an incorrect value -// (i.e. rank 7 rather than 5). + // LayoutStride arranged as LayoutRight - commented out as example that + // fails unit test + // unsigned order5[] = { 4,3,2,1,0 }, dimen5[] = { N0, N1, N2, 2, 2 }; + // sdView d5( "d5" , Kokkos::LayoutStride::order_dimensions(5, order5, + // dimen5) ); + // + // Fails the following unit test: + // ASSERT_EQ( d5.rank() , dr5.rank() ); + // + // Explanation: In construction of the Kokkos::LayoutStride below, since + // the + // remaining dimensions are not specified, they will default to values of + // 0 rather thanKOKKOS_INVALID_INDEX. + // When passed to the DynRankView constructor the default dimensions (of 0) + // will be counted toward the dynamic rank and returning an incorrect + // value (i.e. rank 7 rather than 5). -// Check LayoutRight dr5 and LayoutStride d5 dimensions agree (as they should) - ASSERT_EQ( d5.extent(0) , dr5.extent(0) ); - ASSERT_EQ( d5.extent(1) , dr5.extent(1) ); - ASSERT_EQ( d5.extent(2) , dr5.extent(2) ); - ASSERT_EQ( d5.extent(3) , dr5.extent(3) ); - ASSERT_EQ( d5.extent(4) , dr5.extent(4) ); - ASSERT_EQ( d5.extent(5) , dr5.extent(5) ); - ASSERT_EQ( d5.rank() , dr5.rank() ); + // Check LayoutRight dr5 and LayoutStride d5 dimensions agree (as they + // should) + ASSERT_EQ(d5.extent(0), dr5.extent(0)); + ASSERT_EQ(d5.extent(1), dr5.extent(1)); + ASSERT_EQ(d5.extent(2), dr5.extent(2)); + ASSERT_EQ(d5.extent(3), dr5.extent(3)); + ASSERT_EQ(d5.extent(4), dr5.extent(4)); + ASSERT_EQ(d5.extent(5), dr5.extent(5)); + ASSERT_EQ(d5.rank(), dr5.rank()); -// Rank 5 subview of rank 5 dynamic rank view, layout stride input - sdView ds5 = Kokkos::subdynrankview( d5 , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::pair(0,1) ); - ASSERT_EQ( ds5.rank() , 5 ); + // Rank 5 subview of rank 5 dynamic rank view, layout stride input + sdView ds5 = Kokkos::subdynrankview(d5, Kokkos::ALL(), Kokkos::ALL(), + Kokkos::ALL(), Kokkos::ALL(), + Kokkos::pair(0, 1)); + ASSERT_EQ(ds5.rank(), 5); -// Pass in extra ALL arguments beyond the rank of the DynRank View. -// This behavior is allowed - ignore the extra ALL arguments when -// the src.rank() < number of arguments, but be careful! - sdView ds5plus = Kokkos::subdynrankview( d5 , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::pair(0,1) , Kokkos::ALL() ); + // Pass in extra ALL arguments beyond the rank of the DynRank View. + // This behavior is allowed - ignore the extra ALL arguments when + // the src.rank() < number of arguments, but be careful! + sdView ds5plus = Kokkos::subdynrankview( + d5, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), + Kokkos::pair(0, 1), Kokkos::ALL()); - ASSERT_EQ( ds5.rank() , ds5plus.rank() ); - ASSERT_EQ( ds5.extent(0) , ds5plus.extent(0) ); - ASSERT_EQ( ds5.extent(4) , ds5plus.extent(4) ); - ASSERT_EQ( ds5.extent(5) , ds5plus.extent(5) ); + ASSERT_EQ(ds5.rank(), ds5plus.rank()); + ASSERT_EQ(ds5.extent(0), ds5plus.extent(0)); + ASSERT_EQ(ds5.extent(4), ds5plus.extent(4)); + ASSERT_EQ(ds5.extent(5), ds5plus.extent(5)); -#if ! defined( KOKKOS_ENABLE_CUDA ) || defined ( KOKKOS_ENABLE_CUDA_UVM ) - ASSERT_EQ( & ds5(1,1,1,1,0) - & ds5plus(1,1,1,1,0) , 0 ); - ASSERT_EQ( & ds5(1,1,1,1,0,0) - & ds5plus(1,1,1,1,0,0) , 0 ); // passing argument to rank beyond the view's rank is allowed iff it is a 0. +#if !defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_CUDA_UVM) + ASSERT_EQ(&ds5(1, 1, 1, 1, 0) - &ds5plus(1, 1, 1, 1, 0), 0); + ASSERT_EQ(&ds5(1, 1, 1, 1, 0, 0) - &ds5plus(1, 1, 1, 1, 0, 0), + 0); // passing argument to rank beyond the view's rank is allowed + // iff it is a 0. #endif -// Similar test to rank 5 above, but create rank 4 subview -// Check that the rank contracts (ds4 and ds4plus) and that subdynrankview can accept extra args (ds4plus) - sdView ds4 = Kokkos::subdynrankview( d5 , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , 0 ); - sdView ds4plus = Kokkos::subdynrankview( d5 , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , Kokkos::ALL() , 0 , Kokkos::ALL() ); + // Similar test to rank 5 above, but create rank 4 subview + // Check that the rank contracts (ds4 and ds4plus) and that subdynrankview + // can accept extra args (ds4plus) + sdView ds4 = Kokkos::subdynrankview(d5, Kokkos::ALL(), Kokkos::ALL(), + Kokkos::ALL(), Kokkos::ALL(), 0); + sdView ds4plus = + Kokkos::subdynrankview(d5, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), + Kokkos::ALL(), 0, Kokkos::ALL()); - ASSERT_EQ( ds4.rank() , ds4plus.rank() ); - ASSERT_EQ( ds4.rank() , 4 ); - ASSERT_EQ( ds4.extent(0) , ds4plus.extent(0) ); - ASSERT_EQ( ds4.extent(4) , ds4plus.extent(4) ); - ASSERT_EQ( ds4.extent(5) , ds4plus.extent(5) ); + ASSERT_EQ(ds4.rank(), ds4plus.rank()); + ASSERT_EQ(ds4.rank(), 4); + ASSERT_EQ(ds4.extent(0), ds4plus.extent(0)); + ASSERT_EQ(ds4.extent(4), ds4plus.extent(4)); + ASSERT_EQ(ds4.extent(5), ds4plus.extent(5)); } - static void run_test_subview_strided() - { - typedef Kokkos::DynRankView < int , Kokkos::LayoutLeft , host_drv_space > drview_left ; - typedef Kokkos::DynRankView < int , Kokkos::LayoutRight , host_drv_space > drview_right ; - typedef Kokkos::DynRankView < int , Kokkos::LayoutStride , host_drv_space > drview_stride ; + static void run_test_subview_strided() { + typedef Kokkos::DynRankView + drview_left; + typedef Kokkos::DynRankView + drview_right; + typedef Kokkos::DynRankView + drview_stride; - drview_left xl2( "xl2", 100 , 200 ); - drview_right xr2( "xr2", 100 , 200 ); - drview_stride yl1 = Kokkos::subdynrankview( xl2 , 0 , Kokkos::ALL() ); - drview_stride yl2 = Kokkos::subdynrankview( xl2 , 1 , Kokkos::ALL() ); - drview_stride ys1 = Kokkos::subdynrankview( xr2 , 0 , Kokkos::ALL() ); - drview_stride ys2 = Kokkos::subdynrankview( xr2 , 1 , Kokkos::ALL() ); - drview_stride yr1 = Kokkos::subdynrankview( xr2 , 0 , Kokkos::ALL() ); - drview_stride yr2 = Kokkos::subdynrankview( xr2 , 1 , Kokkos::ALL() ); + drview_left xl2("xl2", 100, 200); + drview_right xr2("xr2", 100, 200); + drview_stride yl1 = Kokkos::subdynrankview(xl2, 0, Kokkos::ALL()); + drview_stride yl2 = Kokkos::subdynrankview(xl2, 1, Kokkos::ALL()); + drview_stride ys1 = Kokkos::subdynrankview(xr2, 0, Kokkos::ALL()); + drview_stride ys2 = Kokkos::subdynrankview(xr2, 1, Kokkos::ALL()); + drview_stride yr1 = Kokkos::subdynrankview(xr2, 0, Kokkos::ALL()); + drview_stride yr2 = Kokkos::subdynrankview(xr2, 1, Kokkos::ALL()); - ASSERT_EQ( yl1.extent(0) , xl2.extent(1) ); - ASSERT_EQ( yl2.extent(0) , xl2.extent(1) ); + ASSERT_EQ(yl1.extent(0), xl2.extent(1)); + ASSERT_EQ(yl2.extent(0), xl2.extent(1)); - ASSERT_EQ( yr1.extent(0) , xr2.extent(1) ); - ASSERT_EQ( yr2.extent(0) , xr2.extent(1) ); + ASSERT_EQ(yr1.extent(0), xr2.extent(1)); + ASSERT_EQ(yr2.extent(0), xr2.extent(1)); - ASSERT_EQ( & yl1(0) - & xl2(0,0) , 0 ); - ASSERT_EQ( & yl2(0) - & xl2(1,0) , 0 ); - ASSERT_EQ( & yr1(0) - & xr2(0,0) , 0 ); - ASSERT_EQ( & yr2(0) - & xr2(1,0) , 0 ); + ASSERT_EQ(&yl1(0) - &xl2(0, 0), 0); + ASSERT_EQ(&yl2(0) - &xl2(1, 0), 0); + ASSERT_EQ(&yr1(0) - &xr2(0, 0), 0); + ASSERT_EQ(&yr2(0) - &xr2(1, 0), 0); + drview_left xl4("xl4", 10, 20, 30, 40); + drview_right xr4("xr4", 10, 20, 30, 40); - drview_left xl4( "xl4", 10 , 20 , 30 , 40 ); - drview_right xr4( "xr4", 10 , 20 , 30 , 40 ); + // Replace subdynrankview with subview - test + drview_stride yl4 = + Kokkos::subview(xl4, 1, Kokkos::ALL(), 2, Kokkos::ALL()); + drview_stride yr4 = + Kokkos::subview(xr4, 1, Kokkos::ALL(), 2, Kokkos::ALL()); - //Replace subdynrankview with subview - test - drview_stride yl4 = Kokkos::subview( xl4 , 1 , Kokkos::ALL() , 2 , Kokkos::ALL() ); - drview_stride yr4 = Kokkos::subview( xr4 , 1 , Kokkos::ALL() , 2 , Kokkos::ALL() ); + ASSERT_EQ(yl4.extent(0), xl4.extent(1)); + ASSERT_EQ(yl4.extent(1), xl4.extent(3)); + ASSERT_EQ(yr4.extent(0), xr4.extent(1)); + ASSERT_EQ(yr4.extent(1), xr4.extent(3)); + ASSERT_EQ(yl4.rank(), 2); + ASSERT_EQ(yr4.rank(), 2); - ASSERT_EQ( yl4.extent(0) , xl4.extent(1) ); - ASSERT_EQ( yl4.extent(1) , xl4.extent(3) ); - ASSERT_EQ( yr4.extent(0) , xr4.extent(1) ); - ASSERT_EQ( yr4.extent(1) , xr4.extent(3) ); - ASSERT_EQ( yl4.rank() , 2); - ASSERT_EQ( yr4.rank() , 2); - - ASSERT_EQ( & yl4(4,4) - & xl4(1,4,2,4) , 0 ); - ASSERT_EQ( & yr4(4,4) - & xr4(1,4,2,4) , 0 ); + ASSERT_EQ(&yl4(4, 4) - &xl4(1, 4, 2, 4), 0); + ASSERT_EQ(&yr4(4, 4) - &xr4(1, 4, 2, 4), 0); } - static void run_test_vector() - { - static const unsigned Length = 1000 , Count = 8 ; + static void run_test_vector() { + static const unsigned Length = 1000, Count = 8; - typedef typename Kokkos::DynRankView< T , Kokkos::LayoutLeft , host_drv_space > multivector_type ; + typedef typename Kokkos::DynRankView + multivector_type; - typedef typename Kokkos::DynRankView< T , Kokkos::LayoutRight , host_drv_space > multivector_right_type ; + typedef typename Kokkos::DynRankView + multivector_right_type; - multivector_type mv = multivector_type( "mv" , Length , Count ); - multivector_right_type mv_right = multivector_right_type( "mv" , Length , Count ); + multivector_type mv = multivector_type("mv", Length, Count); + multivector_right_type mv_right = + multivector_right_type("mv", Length, Count); - typedef typename Kokkos::DynRankView< T , Kokkos::LayoutStride , host_drv_space > svector_type ; - typedef typename Kokkos::DynRankView< T , Kokkos::LayoutStride , host_drv_space > smultivector_type ; - typedef typename Kokkos::DynRankView< const T , Kokkos::LayoutStride , host_drv_space > const_svector_right_type ; - typedef typename Kokkos::DynRankView< const T , Kokkos::LayoutStride , host_drv_space > const_svector_type ; - typedef typename Kokkos::DynRankView< const T , Kokkos::LayoutStride , host_drv_space > const_smultivector_type ; + typedef + typename Kokkos::DynRankView + svector_type; + typedef + typename Kokkos::DynRankView + smultivector_type; + typedef typename Kokkos::DynRankView + const_svector_right_type; + typedef typename Kokkos::DynRankView + const_svector_type; + typedef typename Kokkos::DynRankView + const_smultivector_type; - svector_type v1 = Kokkos::subdynrankview( mv , Kokkos::ALL() , 0 ); - svector_type v2 = Kokkos::subdynrankview( mv , Kokkos::ALL() , 1 ); - svector_type v3 = Kokkos::subdynrankview( mv , Kokkos::ALL() , 2 ); + svector_type v1 = Kokkos::subdynrankview(mv, Kokkos::ALL(), 0); + svector_type v2 = Kokkos::subdynrankview(mv, Kokkos::ALL(), 1); + svector_type v3 = Kokkos::subdynrankview(mv, Kokkos::ALL(), 2); - svector_type rv1 = Kokkos::subdynrankview( mv_right , 0 , Kokkos::ALL() ); - svector_type rv2 = Kokkos::subdynrankview( mv_right , 1 , Kokkos::ALL() ); - svector_type rv3 = Kokkos::subdynrankview( mv_right , 2 , Kokkos::ALL() ); + svector_type rv1 = Kokkos::subdynrankview(mv_right, 0, Kokkos::ALL()); + svector_type rv2 = Kokkos::subdynrankview(mv_right, 1, Kokkos::ALL()); + svector_type rv3 = Kokkos::subdynrankview(mv_right, 2, Kokkos::ALL()); - smultivector_type mv1 = Kokkos::subdynrankview( mv , std::make_pair( 1 , 998 ) , - std::make_pair( 2 , 5 ) ); + smultivector_type mv1 = Kokkos::subdynrankview(mv, std::make_pair(1, 998), + std::make_pair(2, 5)); - smultivector_type mvr1 = - Kokkos::subdynrankview( mv_right , - std::make_pair( 1 , 998 ) , - std::make_pair( 2 , 5 ) ); + smultivector_type mvr1 = Kokkos::subdynrankview( + mv_right, std::make_pair(1, 998), std::make_pair(2, 5)); - const_svector_type cv1 = Kokkos::subdynrankview( mv , Kokkos::ALL(), 0 ); - const_svector_type cv2 = Kokkos::subdynrankview( mv , Kokkos::ALL(), 1 ); - const_svector_type cv3 = Kokkos::subdynrankview( mv , Kokkos::ALL(), 2 ); + const_svector_type cv1 = Kokkos::subdynrankview(mv, Kokkos::ALL(), 0); + const_svector_type cv2 = Kokkos::subdynrankview(mv, Kokkos::ALL(), 1); + const_svector_type cv3 = Kokkos::subdynrankview(mv, Kokkos::ALL(), 2); - svector_type vr1 = Kokkos::subdynrankview( mv , Kokkos::ALL() , 0 ); - svector_type vr2 = Kokkos::subdynrankview( mv , Kokkos::ALL() , 1 ); - svector_type vr3 = Kokkos::subdynrankview( mv , Kokkos::ALL() , 2 ); + svector_type vr1 = Kokkos::subdynrankview(mv, Kokkos::ALL(), 0); + svector_type vr2 = Kokkos::subdynrankview(mv, Kokkos::ALL(), 1); + svector_type vr3 = Kokkos::subdynrankview(mv, Kokkos::ALL(), 2); - const_svector_right_type cvr1 = Kokkos::subdynrankview( mv , Kokkos::ALL() , 0 ); - const_svector_right_type cvr2 = Kokkos::subdynrankview( mv , Kokkos::ALL() , 1 ); - const_svector_right_type cvr3 = Kokkos::subdynrankview( mv , Kokkos::ALL() , 2 ); + const_svector_right_type cvr1 = + Kokkos::subdynrankview(mv, Kokkos::ALL(), 0); + const_svector_right_type cvr2 = + Kokkos::subdynrankview(mv, Kokkos::ALL(), 1); + const_svector_right_type cvr3 = + Kokkos::subdynrankview(mv, Kokkos::ALL(), 2); + ASSERT_TRUE(&v1[0] == &v1(0)); + ASSERT_TRUE(&v1[0] == &mv(0, 0)); + ASSERT_TRUE(&v2[0] == &mv(0, 1)); + ASSERT_TRUE(&v3[0] == &mv(0, 2)); - ASSERT_TRUE( & v1[0] == & v1(0) ); - ASSERT_TRUE( & v1[0] == & mv(0,0) ); - ASSERT_TRUE( & v2[0] == & mv(0,1) ); - ASSERT_TRUE( & v3[0] == & mv(0,2) ); + ASSERT_TRUE(&cv1[0] == &mv(0, 0)); + ASSERT_TRUE(&cv2[0] == &mv(0, 1)); + ASSERT_TRUE(&cv3[0] == &mv(0, 2)); - ASSERT_TRUE( & cv1[0] == & mv(0,0) ); - ASSERT_TRUE( & cv2[0] == & mv(0,1) ); - ASSERT_TRUE( & cv3[0] == & mv(0,2) ); + ASSERT_TRUE(&vr1[0] == &mv(0, 0)); + ASSERT_TRUE(&vr2[0] == &mv(0, 1)); + ASSERT_TRUE(&vr3[0] == &mv(0, 2)); - ASSERT_TRUE( & vr1[0] == & mv(0,0) ); - ASSERT_TRUE( & vr2[0] == & mv(0,1) ); - ASSERT_TRUE( & vr3[0] == & mv(0,2) ); + ASSERT_TRUE(&cvr1[0] == &mv(0, 0)); + ASSERT_TRUE(&cvr2[0] == &mv(0, 1)); + ASSERT_TRUE(&cvr3[0] == &mv(0, 2)); - ASSERT_TRUE( & cvr1[0] == & mv(0,0) ); - ASSERT_TRUE( & cvr2[0] == & mv(0,1) ); - ASSERT_TRUE( & cvr3[0] == & mv(0,2) ); + ASSERT_TRUE(&mv1(0, 0) == &mv(1, 2)); + ASSERT_TRUE(&mv1(1, 1) == &mv(2, 3)); + ASSERT_TRUE(&mv1(3, 2) == &mv(4, 4)); + ASSERT_TRUE(&mvr1(0, 0) == &mv_right(1, 2)); + ASSERT_TRUE(&mvr1(1, 1) == &mv_right(2, 3)); + ASSERT_TRUE(&mvr1(3, 2) == &mv_right(4, 4)); + const_svector_type c_cv1(v1); + typename svector_type::const_type c_cv2(v2); + typename const_svector_type::const_type c_ccv2(v2); - ASSERT_TRUE( & mv1(0,0) == & mv( 1 , 2 ) ); - ASSERT_TRUE( & mv1(1,1) == & mv( 2 , 3 ) ); - ASSERT_TRUE( & mv1(3,2) == & mv( 4 , 4 ) ); - ASSERT_TRUE( & mvr1(0,0) == & mv_right( 1 , 2 ) ); - ASSERT_TRUE( & mvr1(1,1) == & mv_right( 2 , 3 ) ); - ASSERT_TRUE( & mvr1(3,2) == & mv_right( 4 , 4 ) ); - - const_svector_type c_cv1( v1 ); - typename svector_type::const_type c_cv2( v2 ); - typename const_svector_type::const_type c_ccv2( v2 ); - - - const_smultivector_type cmv( mv ); - typename smultivector_type::const_type cmvX( cmv ); - typename const_smultivector_type::const_type ccmvX( cmv ); + const_smultivector_type cmv(mv); + typename smultivector_type::const_type cmvX(cmv); + typename const_smultivector_type::const_type ccmvX(cmv); } }; -} // namespace Test +} // namespace Test /*--------------------------------------------------------------------------*/ - diff --git a/lib/kokkos/containers/unit_tests/TestDynViewAPI_generic.hpp b/lib/kokkos/containers/unit_tests/TestDynViewAPI_generic.hpp index 2909e8cc76..90ca5df194 100644 --- a/lib/kokkos/containers/unit_tests/TestDynViewAPI_generic.hpp +++ b/lib/kokkos/containers/unit_tests/TestDynViewAPI_generic.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,9 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( TEST_CATEGORY , dyn_rank_view_api_generic) { - TestDynViewAPI< double , TEST_EXECSPACE >::run_tests(); +TEST(TEST_CATEGORY, dyn_rank_view_api_generic) { + TestDynViewAPI::run_tests(); } -} - +} // namespace Test diff --git a/lib/kokkos/containers/unit_tests/TestDynViewAPI_rank12345.hpp b/lib/kokkos/containers/unit_tests/TestDynViewAPI_rank12345.hpp index 5b2c22440d..050ebbe35c 100644 --- a/lib/kokkos/containers/unit_tests/TestDynViewAPI_rank12345.hpp +++ b/lib/kokkos/containers/unit_tests/TestDynViewAPI_rank12345.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,11 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( TEST_CATEGORY , dyn_rank_view_api_operator_rank12345) { - TestDynViewAPI< double , TEST_EXECSPACE >::run_operator_test_rank12345(); +TEST(TEST_CATEGORY, dyn_rank_view_api_operator_rank12345) { + TestDynViewAPI::run_operator_test_rank12345(); } -} - +} // namespace Test diff --git a/lib/kokkos/containers/unit_tests/TestDynViewAPI_rank67.hpp b/lib/kokkos/containers/unit_tests/TestDynViewAPI_rank67.hpp index 45a49fb819..eb8df60a89 100644 --- a/lib/kokkos/containers/unit_tests/TestDynViewAPI_rank67.hpp +++ b/lib/kokkos/containers/unit_tests/TestDynViewAPI_rank67.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,9 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( TEST_CATEGORY , dyn_rank_view_api_operator_rank67) { - TestDynViewAPI< double , TEST_EXECSPACE >::run_operator_test_rank67(); +TEST(TEST_CATEGORY, dyn_rank_view_api_operator_rank67) { + TestDynViewAPI::run_operator_test_rank67(); } -} - +} // namespace Test diff --git a/lib/kokkos/containers/unit_tests/TestDynamicView.hpp b/lib/kokkos/containers/unit_tests/TestDynamicView.hpp index 9e87fdf5cc..235464ef07 100644 --- a/lib/kokkos/containers/unit_tests/TestDynamicView.hpp +++ b/lib/kokkos/containers/unit_tests/TestDynamicView.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -55,45 +56,43 @@ namespace Test { -template< typename Scalar , class Space > -struct TestDynamicView -{ - typedef typename Space::execution_space execution_space ; - typedef typename Space::memory_space memory_space ; +template +struct TestDynamicView { + typedef typename Space::execution_space execution_space; + typedef typename Space::memory_space memory_space; - typedef Kokkos::Experimental::DynamicView view_type; + typedef Kokkos::Experimental::DynamicView view_type; typedef double value_type; - static void run( unsigned arg_total_size ) - { - // Test: Create DynamicView, initialize size (via resize), run through parallel_for to set values, check values (via parallel_reduce); resize values and repeat + static void run(unsigned arg_total_size) { + // Test: Create DynamicView, initialize size (via resize), run through + // parallel_for to set values, check values (via parallel_reduce); resize + // values and repeat // Case 1: min_chunk_size is a power of 2 { - view_type da("da", 1024, arg_total_size ); - ASSERT_EQ( da.size(), 0 ); + view_type da("da", 1024, arg_total_size); + ASSERT_EQ(da.size(), 0); // Init unsigned da_size = arg_total_size / 8; da.resize_serial(da_size); - ASSERT_EQ( da.size(), da_size ); + ASSERT_EQ(da.size(), da_size); -#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) -#if !defined(KOKKOS_ENABLE_CUDA) || ( 8000 <= CUDA_VERSION ) - Kokkos::parallel_for( Kokkos::RangePolicy(0, da_size), KOKKOS_LAMBDA ( const int i ) - { - da(i) = Scalar(i); - } - ); +#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) +#if !defined(KOKKOS_ENABLE_CUDA) || (8000 <= CUDA_VERSION) + Kokkos::parallel_for( + Kokkos::RangePolicy(0, da_size), + KOKKOS_LAMBDA(const int i) { da(i) = Scalar(i); }); value_type result_sum = 0.0; - Kokkos::parallel_reduce( Kokkos::RangePolicy(0, da_size), KOKKOS_LAMBDA ( const int i, value_type& partial_sum ) - { - partial_sum += (value_type)da(i); - } - , result_sum - ); + Kokkos::parallel_reduce( + Kokkos::RangePolicy(0, da_size), + KOKKOS_LAMBDA(const int i, value_type& partial_sum) { + partial_sum += (value_type)da(i); + }, + result_sum); - ASSERT_EQ(result_sum, (value_type)( da_size * (da_size - 1) / 2 ) ); + ASSERT_EQ(result_sum, (value_type)(da_size * (da_size - 1) / 2)); #endif #endif @@ -101,56 +100,55 @@ struct TestDynamicView // the first 1/4 should remain the same unsigned da_resize = arg_total_size / 2; da.resize_serial(da_resize); - ASSERT_EQ( da.size(), da_resize ); + ASSERT_EQ(da.size(), da_resize); -#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) -#if !defined(KOKKOS_ENABLE_CUDA) || ( 8000 <= CUDA_VERSION ) - Kokkos::parallel_for( Kokkos::RangePolicy(da_size, da_resize), KOKKOS_LAMBDA ( const int i ) - { - da(i) = Scalar(i); - } - ); +#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) +#if !defined(KOKKOS_ENABLE_CUDA) || (8000 <= CUDA_VERSION) + Kokkos::parallel_for( + Kokkos::RangePolicy(da_size, da_resize), + KOKKOS_LAMBDA(const int i) { da(i) = Scalar(i); }); value_type new_result_sum = 0.0; - Kokkos::parallel_reduce( Kokkos::RangePolicy(da_size, da_resize), KOKKOS_LAMBDA ( const int i, value_type& partial_sum ) - { - partial_sum += (value_type)da(i); - } - , new_result_sum - ); + Kokkos::parallel_reduce( + Kokkos::RangePolicy(da_size, da_resize), + KOKKOS_LAMBDA(const int i, value_type& partial_sum) { + partial_sum += (value_type)da(i); + }, + new_result_sum); - ASSERT_EQ(new_result_sum+result_sum, (value_type)( da_resize * (da_resize - 1) / 2 ) ); + ASSERT_EQ(new_result_sum + result_sum, + (value_type)(da_resize * (da_resize - 1) / 2)); #endif #endif - } // end scope + } // end scope - // Test: Create DynamicView, initialize size (via resize), run through parallel_for to set values, check values (via parallel_reduce); resize values and repeat + // Test: Create DynamicView, initialize size (via resize), run through + // parallel_for to set values, check values (via parallel_reduce); resize + // values and repeat // Case 2: min_chunk_size is NOT a power of 2 { - view_type da("da", 1023, arg_total_size ); - ASSERT_EQ( da.size(), 0 ); + view_type da("da", 1023, arg_total_size); + ASSERT_EQ(da.size(), 0); // Init unsigned da_size = arg_total_size / 8; da.resize_serial(da_size); - ASSERT_EQ( da.size(), da_size ); + ASSERT_EQ(da.size(), da_size); -#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) -#if !defined(KOKKOS_ENABLE_CUDA) || ( 8000 <= CUDA_VERSION ) - Kokkos::parallel_for( Kokkos::RangePolicy(0, da_size), KOKKOS_LAMBDA ( const int i ) - { - da(i) = Scalar(i); - } - ); +#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) +#if !defined(KOKKOS_ENABLE_CUDA) || (8000 <= CUDA_VERSION) + Kokkos::parallel_for( + Kokkos::RangePolicy(0, da_size), + KOKKOS_LAMBDA(const int i) { da(i) = Scalar(i); }); value_type result_sum = 0.0; - Kokkos::parallel_reduce( Kokkos::RangePolicy(0, da_size), KOKKOS_LAMBDA ( const int i, value_type& partial_sum ) - { - partial_sum += (value_type)da(i); - } - , result_sum - ); + Kokkos::parallel_reduce( + Kokkos::RangePolicy(0, da_size), + KOKKOS_LAMBDA(const int i, value_type& partial_sum) { + partial_sum += (value_type)da(i); + }, + result_sum); - ASSERT_EQ(result_sum, (value_type)( da_size * (da_size - 1) / 2 ) ); + ASSERT_EQ(result_sum, (value_type)(da_size * (da_size - 1) / 2)); #endif #endif @@ -158,99 +156,92 @@ struct TestDynamicView // the first 1/4 should remain the same unsigned da_resize = arg_total_size / 2; da.resize_serial(da_resize); - ASSERT_EQ( da.size(), da_resize ); + ASSERT_EQ(da.size(), da_resize); -#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) -#if !defined(KOKKOS_ENABLE_CUDA) || ( 8000 <= CUDA_VERSION ) - Kokkos::parallel_for( Kokkos::RangePolicy(da_size, da_resize), KOKKOS_LAMBDA ( const int i ) - { - da(i) = Scalar(i); - } - ); +#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) +#if !defined(KOKKOS_ENABLE_CUDA) || (8000 <= CUDA_VERSION) + Kokkos::parallel_for( + Kokkos::RangePolicy(da_size, da_resize), + KOKKOS_LAMBDA(const int i) { da(i) = Scalar(i); }); value_type new_result_sum = 0.0; - Kokkos::parallel_reduce( Kokkos::RangePolicy(da_size, da_resize), KOKKOS_LAMBDA ( const int i, value_type& partial_sum ) - { - partial_sum += (value_type)da(i); - } - , new_result_sum - ); + Kokkos::parallel_reduce( + Kokkos::RangePolicy(da_size, da_resize), + KOKKOS_LAMBDA(const int i, value_type& partial_sum) { + partial_sum += (value_type)da(i); + }, + new_result_sum); - ASSERT_EQ(new_result_sum+result_sum, (value_type)( da_resize * (da_resize - 1) / 2 ) ); + ASSERT_EQ(new_result_sum + result_sum, + (value_type)(da_resize * (da_resize - 1) / 2)); #endif #endif - } // end scope + } // end scope - // Test: Create DynamicView, initialize size (via resize), run through parallel_for to set values, check values (via parallel_reduce); resize values and repeat + // Test: Create DynamicView, initialize size (via resize), run through + // parallel_for to set values, check values (via parallel_reduce); resize + // values and repeat // Case 3: resize reduces the size { - view_type da("da", 1023, arg_total_size ); - ASSERT_EQ( da.size(), 0 ); + view_type da("da", 1023, arg_total_size); + ASSERT_EQ(da.size(), 0); // Init unsigned da_size = arg_total_size / 2; da.resize_serial(da_size); - ASSERT_EQ( da.size(), da_size ); + ASSERT_EQ(da.size(), da_size); -#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) -#if !defined(KOKKOS_ENABLE_CUDA) || ( 8000 <= CUDA_VERSION ) - Kokkos::parallel_for( Kokkos::RangePolicy(0, da_size), KOKKOS_LAMBDA ( const int i ) - { - da(i) = Scalar(i); - } - ); +#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) +#if !defined(KOKKOS_ENABLE_CUDA) || (8000 <= CUDA_VERSION) + Kokkos::parallel_for( + Kokkos::RangePolicy(0, da_size), + KOKKOS_LAMBDA(const int i) { da(i) = Scalar(i); }); value_type result_sum = 0.0; - Kokkos::parallel_reduce( Kokkos::RangePolicy(0, da_size), KOKKOS_LAMBDA ( const int i, value_type& partial_sum ) - { - partial_sum += (value_type)da(i); - } - , result_sum - ); + Kokkos::parallel_reduce( + Kokkos::RangePolicy(0, da_size), + KOKKOS_LAMBDA(const int i, value_type& partial_sum) { + partial_sum += (value_type)da(i); + }, + result_sum); - ASSERT_EQ(result_sum, (value_type)( da_size * (da_size - 1) / 2 ) ); + ASSERT_EQ(result_sum, (value_type)(da_size * (da_size - 1) / 2)); #endif #endif // remove the final 3/4 entries i.e. first 1/4 remain unsigned da_resize = arg_total_size / 8; da.resize_serial(da_resize); - ASSERT_EQ( da.size(), da_resize ); + ASSERT_EQ(da.size(), da_resize); -#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA ) -#if !defined(KOKKOS_ENABLE_CUDA) || ( 8000 <= CUDA_VERSION ) - Kokkos::parallel_for( Kokkos::RangePolicy(0, da_resize), KOKKOS_LAMBDA ( const int i ) - { - da(i) = Scalar(i); - } - ); +#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) +#if !defined(KOKKOS_ENABLE_CUDA) || (8000 <= CUDA_VERSION) + Kokkos::parallel_for( + Kokkos::RangePolicy(0, da_resize), + KOKKOS_LAMBDA(const int i) { da(i) = Scalar(i); }); value_type new_result_sum = 0.0; - Kokkos::parallel_reduce( Kokkos::RangePolicy(0, da_resize), KOKKOS_LAMBDA ( const int i, value_type& partial_sum ) - { - partial_sum += (value_type)da(i); - } - , new_result_sum - ); + Kokkos::parallel_reduce( + Kokkos::RangePolicy(0, da_resize), + KOKKOS_LAMBDA(const int i, value_type& partial_sum) { + partial_sum += (value_type)da(i); + }, + new_result_sum); - ASSERT_EQ(new_result_sum, (value_type)( da_resize * (da_resize - 1) / 2 ) ); + ASSERT_EQ(new_result_sum, (value_type)(da_resize * (da_resize - 1) / 2)); #endif #endif - } // end scope - + } // end scope } }; -TEST_F( TEST_CATEGORY , dynamic_view ) -{ - typedef TestDynamicView< double , TEST_EXECSPACE > - TestDynView ; +TEST(TEST_CATEGORY, dynamic_view) { + typedef TestDynamicView TestDynView; - for ( int i = 0 ; i < 10 ; ++i ) { - TestDynView::run( 100000 + 100 * i ); + for (int i = 0; i < 10; ++i) { + TestDynView::run(100000 + 100 * i); } } -} // namespace Test +} // namespace Test #endif /* #ifndef KOKKOS_TEST_DYNAMICVIEW_HPP */ - diff --git a/lib/kokkos/containers/unit_tests/TestErrorReporter.hpp b/lib/kokkos/containers/unit_tests/TestErrorReporter.hpp index 7e48089b43..49b71cdea7 100644 --- a/lib/kokkos/containers/unit_tests/TestErrorReporter.hpp +++ b/lib/kokkos/containers/unit_tests/TestErrorReporter.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -51,47 +52,47 @@ namespace Test { -// Just save the data in the report. Informative text goies in the operator<<(..). +// Just save the data in the report. Informative text goies in the +// operator<<(..). template -struct ThreeValReport -{ +struct ThreeValReport { DataType1 m_data1; DataType2 m_data2; DataType3 m_data3; - }; template -std::ostream &operator<<(std::ostream & os, const ThreeValReport &val) -{ - return os << "{" << val.m_data1 << " " << val.m_data2 << " " << val.m_data3 << "}"; +std::ostream &operator<<( + std::ostream &os, + const ThreeValReport &val) { + return os << "{" << val.m_data1 << " " << val.m_data2 << " " << val.m_data3 + << "}"; } -template +template void checkReportersAndReportsAgree(const std::vector &reporters, - const std::vector &reports) -{ + const std::vector &reports) { for (size_t i = 0; i < reports.size(); ++i) { EXPECT_EQ(1, reporters[i] % 2); EXPECT_EQ(reporters[i], reports[i].m_data1); } } - template struct ErrorReporterDriverBase { - - typedef ThreeValReport report_type; - typedef Kokkos::Experimental::ErrorReporter error_reporter_type; + typedef ThreeValReport report_type; + typedef Kokkos::Experimental::ErrorReporter + error_reporter_type; error_reporter_type m_errorReporter; ErrorReporterDriverBase(int reporter_capacity, int test_size) - : m_errorReporter(reporter_capacity) { } + : m_errorReporter(reporter_capacity) {} - KOKKOS_INLINE_FUNCTION bool error_condition(const int work_idx) const { return (work_idx % 2 != 0); } + KOKKOS_INLINE_FUNCTION bool error_condition(const int work_idx) const { + return (work_idx % 2 != 0); + } - void check_expectations(int reporter_capacity, int test_size) - { + void check_expectations(int reporter_capacity, int test_size) { int num_reported = m_errorReporter.getNumReports(); int num_attempts = m_errorReporter.getNumReportAttempts(); @@ -99,15 +100,14 @@ struct ErrorReporterDriverBase { EXPECT_EQ(expected_num_reports, num_reported); EXPECT_EQ(test_size / 2, num_attempts); - bool expect_full = (reporter_capacity <= (test_size / 2)); + bool expect_full = (reporter_capacity <= (test_size / 2)); bool reported_full = m_errorReporter.full(); EXPECT_EQ(expect_full, reported_full); } }; template -void TestErrorReporter() -{ +void TestErrorReporter() { typedef ErrorReporterDriverType tester_type; std::vector reporters; std::vector reports; @@ -120,9 +120,12 @@ void TestErrorReporter() test2.m_errorReporter.getReports(reporters, reports); checkReportersAndReportsAgree(reporters, reports); - typename Kokkos::View::HostMirror view_reporters; - typename Kokkos::View::HostMirror - view_reports; + typename Kokkos::View< + int *, typename ErrorReporterDriverType::execution_space>::HostMirror + view_reporters; + typename Kokkos::View:: + HostMirror view_reports; test2.m_errorReporter.getReports(view_reporters, view_reports); int num_reports = view_reporters.extent(0); @@ -136,19 +139,16 @@ void TestErrorReporter() reports.push_back(view_reports(i)); } checkReportersAndReportsAgree(reporters, reports); - } - template -struct ErrorReporterDriver : public ErrorReporterDriverBase -{ - typedef ErrorReporterDriverBase driver_base; - typedef typename driver_base::error_reporter_type::execution_space execution_space; +struct ErrorReporterDriver : public ErrorReporterDriverBase { + typedef ErrorReporterDriverBase driver_base; + typedef typename driver_base::error_reporter_type::execution_space + execution_space; ErrorReporterDriver(int reporter_capacity, int test_size) - : driver_base(reporter_capacity, test_size) - { + : driver_base(reporter_capacity, test_size) { execute(reporter_capacity, test_size); // Test that clear() and resize() work across memory spaces. @@ -159,19 +159,18 @@ struct ErrorReporterDriver : public ErrorReporterDriverBase } } - void execute(int reporter_capacity, int test_size) - { - Kokkos::parallel_for(Kokkos::RangePolicy(0,test_size), *this); + void execute(int reporter_capacity, int test_size) { + Kokkos::parallel_for(Kokkos::RangePolicy(0, test_size), + *this); Kokkos::fence(); driver_base::check_expectations(reporter_capacity, test_size); } KOKKOS_INLINE_FUNCTION - void operator()(const int work_idx) const - { + void operator()(const int work_idx) const { if (driver_base::error_condition(work_idx)) { double val = M_PI * static_cast(work_idx); - typename driver_base::report_type report = {work_idx, -2*work_idx, val}; + typename driver_base::report_type report = {work_idx, -2 * work_idx, val}; driver_base::m_errorReporter.add_report(work_idx, report); } } @@ -179,45 +178,45 @@ struct ErrorReporterDriver : public ErrorReporterDriverBase #if defined(KOKKOS_CLASS_LAMBDA) template -struct ErrorReporterDriverUseLambda : public ErrorReporterDriverBase -{ - - typedef ErrorReporterDriverBase driver_base; - typedef typename driver_base::error_reporter_type::execution_space execution_space; +struct ErrorReporterDriverUseLambda + : public ErrorReporterDriverBase { + typedef ErrorReporterDriverBase driver_base; + typedef typename driver_base::error_reporter_type::execution_space + execution_space; ErrorReporterDriverUseLambda(int reporter_capacity, int test_size) - : driver_base(reporter_capacity, test_size) - { - Kokkos::parallel_for(Kokkos::RangePolicy(0,test_size), KOKKOS_CLASS_LAMBDA (const int work_idx) { - if (driver_base::error_condition(work_idx)) { - double val = M_PI * static_cast(work_idx); - typename driver_base::report_type report = {work_idx, -2*work_idx, val}; - driver_base::m_errorReporter.add_report(work_idx, report); - } - }); + : driver_base(reporter_capacity, test_size) { + Kokkos::parallel_for( + Kokkos::RangePolicy(0, test_size), + KOKKOS_CLASS_LAMBDA(const int work_idx) { + if (driver_base::error_condition(work_idx)) { + double val = M_PI * static_cast(work_idx); + typename driver_base::report_type report = {work_idx, -2 * work_idx, + val}; + driver_base::m_errorReporter.add_report(work_idx, report); + } + }); Kokkos::fence(); driver_base::check_expectations(reporter_capacity, test_size); } - }; #endif - #ifdef KOKKOS_ENABLE_OPENMP -struct ErrorReporterDriverNativeOpenMP : public ErrorReporterDriverBase -{ - typedef ErrorReporterDriverBase driver_base; - typedef typename driver_base::error_reporter_type::execution_space execution_space; +struct ErrorReporterDriverNativeOpenMP + : public ErrorReporterDriverBase { + typedef ErrorReporterDriverBase driver_base; + typedef typename driver_base::error_reporter_type::execution_space + execution_space; ErrorReporterDriverNativeOpenMP(int reporter_capacity, int test_size) - : driver_base(reporter_capacity, test_size) - { + : driver_base(reporter_capacity, test_size) { #pragma omp parallel for - for(int work_idx = 0; work_idx < test_size; ++work_idx) - { + for (int work_idx = 0; work_idx < test_size; ++work_idx) { if (driver_base::error_condition(work_idx)) { double val = M_PI * static_cast(work_idx); - typename driver_base::report_type report = {work_idx, -2*work_idx, val}; + typename driver_base::report_type report = {work_idx, -2 * work_idx, + val}; driver_base::m_errorReporter.add_report(work_idx, report); } }; @@ -227,17 +226,14 @@ struct ErrorReporterDriverNativeOpenMP : public ErrorReporterDriverBase>(); } #endif -TEST_F(TEST_CATEGORY, ErrorReporter) -{ +TEST(TEST_CATEGORY, ErrorReporter) { TestErrorReporter>(); } -} // namespace Test -#endif // #ifndef KOKKOS_TEST_ERROR_REPORTING_HPP - +} // namespace Test +#endif // #ifndef KOKKOS_TEST_ERROR_REPORTING_HPP diff --git a/lib/kokkos/containers/unit_tests/TestOffsetView.hpp b/lib/kokkos/containers/unit_tests/TestOffsetView.hpp index 6965199d45..12bcda9524 100644 --- a/lib/kokkos/containers/unit_tests/TestOffsetView.hpp +++ b/lib/kokkos/containers/unit_tests/TestOffsetView.hpp @@ -1,10 +1,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,8 +46,6 @@ #ifndef CONTAINERS_UNIT_TESTS_TESTOFFSETVIEW_HPP_ #define CONTAINERS_UNIT_TESTS_TESTOFFSETVIEW_HPP_ - - #include #include #include @@ -55,372 +54,652 @@ #include #include -using std::endl; using std::cout; +using std::endl; -namespace Test{ +namespace Test { - template - void test_offsetview_construction(unsigned int size) - { +template +void test_offsetview_construction(unsigned int size) { + typedef Kokkos::Experimental::OffsetView offset_view_type; + typedef Kokkos::View view_type; - typedef Kokkos::Experimental::OffsetView offset_view_type; - typedef Kokkos::View view_type; + Kokkos::Experimental::index_list_type range0 = {-1, 3}; + Kokkos::Experimental::index_list_type range1 = {-2, 2}; - Kokkos::Experimental::index_list_type range0 = {-1, 3}; - Kokkos::Experimental::index_list_type range1 = {-2, 2}; + offset_view_type ov("firstOV", range0, range1); - offset_view_type ov("firstOV", range0, range1); + ASSERT_EQ("firstOV", ov.label()); + ASSERT_EQ(2, ov.Rank); - ASSERT_EQ("firstOV", ov.label()); - ASSERT_EQ(2, ov.Rank); + ASSERT_EQ(ov.begin(0), -1); + ASSERT_EQ(ov.end(0), 4); - ASSERT_EQ(ov.begin(0), -1); - ASSERT_EQ(ov.end(0), 4); + ASSERT_EQ(ov.begin(1), -2); + ASSERT_EQ(ov.end(1), 3); - ASSERT_EQ(ov.begin(1), -2); - ASSERT_EQ(ov.end(1), 3); - - ASSERT_EQ(ov.extent(0), 5); - ASSERT_EQ(ov.extent(1), 5); - - const int ovmin0 = ov.begin(0); - const int ovend0 = ov.end(0); - const int ovmin1 = ov.begin(1); - const int ovend1 = ov.end(1); + ASSERT_EQ(ov.extent(0), 5); + ASSERT_EQ(ov.extent(1), 5); #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) - { - Kokkos::Experimental::OffsetView offsetV1("OneDOffsetView", range0); + const int ovmin0 = ov.begin(0); + const int ovend0 = ov.end(0); + const int ovmin1 = ov.begin(1); + const int ovend1 = ov.end(1); + { + Kokkos::Experimental::OffsetView offsetV1("OneDOffsetView", + range0); - Kokkos::RangePolicy rangePolicy1(offsetV1.begin(0), offsetV1.end(0)); - Kokkos::parallel_for(rangePolicy1, KOKKOS_LAMBDA (const int i){ - offsetV1(i) = 1; - } - ); - Kokkos::fence(); + Kokkos::RangePolicy rangePolicy1(offsetV1.begin(0), + offsetV1.end(0)); + Kokkos::parallel_for( + rangePolicy1, KOKKOS_LAMBDA(const int i) { offsetV1(i) = 1; }); + Kokkos::fence(); - int OVResult = 0; - Kokkos::parallel_reduce(rangePolicy1, KOKKOS_LAMBDA(const int i, int & updateMe){ - updateMe += offsetV1(i); - }, OVResult); - - Kokkos::fence(); - ASSERT_EQ(OVResult, offsetV1.end(0) - offsetV1.begin(0)) << "found wrong number of elements in OffsetView that was summed."; + int OVResult = 0; + Kokkos::parallel_reduce( + rangePolicy1, + KOKKOS_LAMBDA(const int i, int& updateMe) { updateMe += offsetV1(i); }, + OVResult); + Kokkos::fence(); + ASSERT_EQ(OVResult, offsetV1.end(0) - offsetV1.begin(0)) + << "found wrong number of elements in OffsetView that was summed."; + } + { // test deep copy of scalar const value into mirro + const int constVal = 6; + typename offset_view_type::HostMirror hostOffsetView = + Kokkos::Experimental::create_mirror_view(ov); + + Kokkos::Experimental::deep_copy(hostOffsetView, constVal); + + for (int i = hostOffsetView.begin(0); i < hostOffsetView.end(0); ++i) { + for (int j = hostOffsetView.begin(1); j < hostOffsetView.end(1); ++j) { + ASSERT_EQ(hostOffsetView(i, j), constVal) + << "Bad data found in OffsetView"; } - { //test deep copy of scalar const value into mirro - const int constVal = 6; - typename offset_view_type::HostMirror hostOffsetView = - Kokkos::Experimental::create_mirror_view(ov); + } + } - Kokkos::Experimental::deep_copy(hostOffsetView, constVal); + typedef Kokkos::MDRangePolicy, + Kokkos::IndexType > + range_type; + typedef typename range_type::point_type point_type; - for(int i = hostOffsetView.begin(0); i < hostOffsetView.end(0); ++i) { - for(int j = hostOffsetView.begin(1); j < hostOffsetView.end(1); ++j) { - ASSERT_EQ(hostOffsetView(i,j), constVal) << "Bad data found in OffsetView"; - } - } - } + range_type rangePolicy2D(point_type{{ovmin0, ovmin1}}, + point_type{{ovend0, ovend1}}); - typedef Kokkos::MDRangePolicy, Kokkos::IndexType > range_type; + const int constValue = 9; + Kokkos::parallel_for( + rangePolicy2D, + KOKKOS_LAMBDA(const int i, const int j) { ov(i, j) = constValue; }); + + // test offsetview to offsetviewmirror deep copy + typename offset_view_type::HostMirror hostOffsetView = + Kokkos::Experimental::create_mirror_view(ov); + + Kokkos::Experimental::deep_copy(hostOffsetView, ov); + + for (int i = hostOffsetView.begin(0); i < hostOffsetView.end(0); ++i) { + for (int j = hostOffsetView.begin(1); j < hostOffsetView.end(1); ++j) { + ASSERT_EQ(hostOffsetView(i, j), constValue) + << "Bad data found in OffsetView"; + } + } + + int OVResult = 0; + Kokkos::parallel_reduce( + rangePolicy2D, + KOKKOS_LAMBDA(const int i, const int j, int& updateMe) { + updateMe += ov(i, j); + }, + OVResult); + + int answer = 0; + for (int i = ov.begin(0); i < ov.end(0); ++i) { + for (int j = ov.begin(1); j < ov.end(1); ++j) { + answer += constValue; + } + } + + ASSERT_EQ(OVResult, answer) << "Bad data found in OffsetView"; +#endif + + { + offset_view_type ovCopy(ov); + ASSERT_EQ(ovCopy == ov, true) + << "Copy constructor or equivalence operator broken"; + } + + { + offset_view_type ovAssigned = ov; + ASSERT_EQ(ovAssigned == ov, true) + << "Assignment operator or equivalence operator broken"; + } + + { // construct OffsetView from a View plus begins array + const int extent0 = 100; + const int extent1 = 200; + const int extent2 = 300; + Kokkos::View view3D("view3D", extent0, extent1, extent2); + + Kokkos::deep_copy(view3D, 1); + + Kokkos::Array begins = {{-10, -20, -30}}; + Kokkos::Experimental::OffsetView offsetView3D(view3D, + begins); + + typedef Kokkos::MDRangePolicy, + Kokkos::IndexType > + range3_type; + typedef typename range3_type::point_type point3_type; + + range3_type rangePolicy3DZero(point3_type{{0, 0, 0}}, + point3_type{{extent0, extent1, extent2}}); + +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) + int view3DSum = 0; + Kokkos::parallel_reduce( + rangePolicy3DZero, + KOKKOS_LAMBDA(const int i, const int j, int k, int& updateMe) { + updateMe += view3D(i, j, k); + }, + view3DSum); + + range3_type rangePolicy3D( + point3_type{{begins[0], begins[1], begins[2]}}, + point3_type{ + {begins[0] + extent0, begins[1] + extent1, begins[2] + extent2}}); + int offsetView3DSum = 0; + + Kokkos::parallel_reduce( + rangePolicy3D, + KOKKOS_LAMBDA(const int i, const int j, int k, int& updateMe) { + updateMe += offsetView3D(i, j, k); + }, + offsetView3DSum); + + ASSERT_EQ(view3DSum, offsetView3DSum) + << "construction of OffsetView from View and begins array broken."; +#endif + } + view_type viewFromOV = ov.view(); + + ASSERT_EQ(viewFromOV == ov, true) + << "OffsetView::view() or equivalence operator View == OffsetView broken"; + + { + offset_view_type ovFromV(viewFromOV, {-1, -2}); + + ASSERT_EQ(ovFromV == viewFromOV, true) + << "Construction of OffsetView from View or equivalence operator " + "OffsetView == View broken"; + } + { + offset_view_type ovFromV = viewFromOV; + ASSERT_EQ(ovFromV == viewFromOV, true) + << "Construction of OffsetView from View by assignment (implicit " + "conversion) or equivalence operator OffsetView == View broken"; + } + + { // test offsetview to view deep copy + view_type aView("aView", ov.extent(0), ov.extent(1)); + Kokkos::Experimental::deep_copy(aView, ov); + +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) + int sum = 0; + Kokkos::parallel_reduce( + rangePolicy2D, + KOKKOS_LAMBDA(const int i, const int j, int& updateMe) { + updateMe += ov(i, j) - aView(i - ov.begin(0), j - ov.begin(1)); + }, + sum); + + ASSERT_EQ(sum, 0) << "deep_copy(view, offsetView) broken."; +#endif + } + + { // test view to offsetview deep copy + view_type aView("aView", ov.extent(0), ov.extent(1)); + + Kokkos::deep_copy(aView, 99); + Kokkos::Experimental::deep_copy(ov, aView); + +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) + int sum = 0; + Kokkos::parallel_reduce( + rangePolicy2D, + KOKKOS_LAMBDA(const int i, const int j, int& updateMe) { + updateMe += ov(i, j) - aView(i - ov.begin(0), j - ov.begin(1)); + }, + sum); + + ASSERT_EQ(sum, 0) << "deep_copy(offsetView, view) broken."; +#endif + } +} + +template +void test_offsetview_unmanaged_construction() { + // Preallocated memory (Only need a valid address for this test) + Scalar s; + + { + // Constructing an OffsetView directly around our preallocated memory + Kokkos::Array begins1{{2}}; + Kokkos::Array ends1{{3}}; + Kokkos::Experimental::OffsetView ov1(&s, begins1, ends1); + + // Constructing an OffsetView around an unmanaged View of our preallocated + // memory + Kokkos::View v1(&s, ends1[0] - begins1[0]); + Kokkos::Experimental::OffsetView ovv1(v1, begins1); + + // They should match + ASSERT_EQ(ovv1, ov1) + << "OffsetView unmanaged construction fails for rank 1"; + } + + { + Kokkos::Array begins2{{-2, -7}}; + Kokkos::Array ends2{{5, -3}}; + Kokkos::Experimental::OffsetView ov2(&s, begins2, ends2); + + Kokkos::View v2(&s, ends2[0] - begins2[0], + ends2[1] - begins2[1]); + Kokkos::Experimental::OffsetView ovv2(v2, begins2); + + ASSERT_EQ(ovv2, ov2) + << "OffsetView unmanaged construction fails for rank 2"; + } + + { + Kokkos::Array begins3{{2, 3, 5}}; + Kokkos::Array ends3{{7, 11, 13}}; + Kokkos::Experimental::OffsetView ovv3(&s, begins3, + ends3); + + Kokkos::View v3(&s, ends3[0] - begins3[0], + ends3[1] - begins3[1], + ends3[2] - begins3[2]); + Kokkos::Experimental::OffsetView ov3(v3, begins3); + + ASSERT_EQ(ovv3, ov3) + << "OffsetView unmanaged construction fails for rank 3"; + } + + { + // Test all four public constructor overloads (begins_type x + // index_list_type) + Kokkos::Array begins{{-3}}; + Kokkos::Array ends{{2}}; + + Kokkos::Experimental::OffsetView bb(&s, begins, ends); + Kokkos::Experimental::OffsetView bi(&s, begins, {2}); + Kokkos::Experimental::OffsetView ib(&s, {-3}, ends); + Kokkos::Experimental::OffsetView ii(&s, {-3}, {2}); + + ASSERT_EQ(bb, bi); + ASSERT_EQ(bb, ib); + ASSERT_EQ(bb, ii); + } + +#ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST + { + using offset_view_type = Kokkos::Experimental::OffsetView; + + // Range calculations must be positive + ASSERT_NO_THROW(offset_view_type(&s, {0}, {1})); + ASSERT_NO_THROW(offset_view_type(&s, {0}, {0})); + ASSERT_THROW(offset_view_type(&s, {0}, {-1}), std::runtime_error); + } + + { + using offset_view_type = Kokkos::Experimental::OffsetView; + + // Range calculations must not overflow + ASSERT_NO_THROW(offset_view_type(&s, {0}, {0x7fffffffffffffffl})); + ASSERT_THROW(offset_view_type(&s, {-1}, {0x7fffffffffffffffl}), + std::runtime_error); + ASSERT_THROW( + offset_view_type(&s, {-0x7fffffffffffffffl - 1}, {0x7fffffffffffffffl}), + std::runtime_error); + ASSERT_THROW(offset_view_type(&s, {-0x7fffffffffffffffl - 1}, {0}), + std::runtime_error); + } + + { + using offset_view_type = Kokkos::Experimental::OffsetView; + + // Should throw when the rank of begins and/or ends doesn't match that of + // OffsetView + ASSERT_THROW(offset_view_type(&s, {0}, {1}), std::runtime_error); + ASSERT_THROW(offset_view_type(&s, {0}, {1, 1}), std::runtime_error); + ASSERT_THROW(offset_view_type(&s, {0}, {1, 1, 1}), std::runtime_error); + ASSERT_THROW(offset_view_type(&s, {0, 0}, {1}), std::runtime_error); + ASSERT_NO_THROW(offset_view_type(&s, {0, 0}, {1, 1})); + ASSERT_THROW(offset_view_type(&s, {0, 0}, {1, 1, 1}), std::runtime_error); + ASSERT_THROW(offset_view_type(&s, {0, 0, 0}, {1}), std::runtime_error); + ASSERT_THROW(offset_view_type(&s, {0, 0, 0}, {1, 1}), std::runtime_error); + ASSERT_THROW(offset_view_type(&s, {0, 0, 0}, {1, 1, 1}), + std::runtime_error); + } +#endif // KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST +} + +template +void test_offsetview_subview(unsigned int size) { + { // test subview 1 + Kokkos::Experimental::OffsetView sliceMe("offsetToSlice", + {-10, 20}); + { + auto offsetSubviewa = Kokkos::Experimental::subview(sliceMe, 0); + ASSERT_EQ(offsetSubviewa.Rank, 0) << "subview of offset is broken."; + } + } + { // test subview 2 + Kokkos::Experimental::OffsetView sliceMe( + "offsetToSlice", {-10, 20}, {-20, 30}); + { + auto offsetSubview = + Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), -2); + ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; + } + + { + auto offsetSubview = + Kokkos::Experimental::subview(sliceMe, 0, Kokkos::ALL()); + ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; + } + } + + { // test subview rank 3 + + Kokkos::Experimental::OffsetView sliceMe( + "offsetToSlice", {-10, 20}, {-20, 30}, {-30, 40}); + + // slice 1 + { + auto offsetSubview = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), + Kokkos::ALL(), 0); + ASSERT_EQ(offsetSubview.Rank, 2) << "subview of offset is broken."; + } + { + auto offsetSubview = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), + 0, Kokkos::ALL()); + ASSERT_EQ(offsetSubview.Rank, 2) << "subview of offset is broken."; + } + + { + auto offsetSubview = Kokkos::Experimental::subview( + sliceMe, 0, Kokkos::ALL(), Kokkos::ALL()); + ASSERT_EQ(offsetSubview.Rank, 2) << "subview of offset is broken."; + } + { + auto offsetSubview = Kokkos::Experimental::subview( + sliceMe, 0, Kokkos::ALL(), Kokkos::make_pair(-30, -21)); + ASSERT_EQ(offsetSubview.Rank, 2) << "subview of offset is broken."; + + ASSERT_EQ(offsetSubview.begin(0), -20); + ASSERT_EQ(offsetSubview.end(0), 31); + ASSERT_EQ(offsetSubview.begin(1), 0); + ASSERT_EQ(offsetSubview.end(1), 9); + +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) + typedef Kokkos::MDRangePolicy, + Kokkos::IndexType > + range_type; typedef typename range_type::point_type point_type; - range_type rangePolicy2D(point_type{ {ovmin0, ovmin1 } }, - point_type{ { ovend0, ovend1 } }); + const int b0 = offsetSubview.begin(0); + const int b1 = offsetSubview.begin(1); - const int constValue = 9; - Kokkos::parallel_for(rangePolicy2D, KOKKOS_LAMBDA (const int i, const int j) { - ov(i,j) = constValue; - } - ); - - //test offsetview to offsetviewmirror deep copy - typename offset_view_type::HostMirror hostOffsetView = - Kokkos::Experimental::create_mirror_view(ov); + const int e0 = offsetSubview.end(0); + const int e1 = offsetSubview.end(1); - Kokkos::Experimental::deep_copy(hostOffsetView, ov); + range_type rangeP2D(point_type{{b0, b1}}, point_type{{e0, e1}}); - for(int i = hostOffsetView.begin(0); i < hostOffsetView.end(0); ++i) { - for(int j = hostOffsetView.begin(1); j < hostOffsetView.end(1); ++j) { - ASSERT_EQ(hostOffsetView(i,j), constValue) << "Bad data found in OffsetView"; - } - } - - int OVResult = 0; - Kokkos::parallel_reduce(rangePolicy2D, KOKKOS_LAMBDA(const int i, const int j, int & updateMe){ - updateMe += ov(i, j); - }, OVResult); + Kokkos::parallel_for( + rangeP2D, + KOKKOS_LAMBDA(const int i, const int j) { offsetSubview(i, j) = 6; }); - int answer = 0; - for(int i = ov.begin(0); i < ov.end(0); ++i) { - for(int j = ov.begin(1); j < ov.end(1); ++j) { - answer += constValue; - } - } - - ASSERT_EQ(OVResult, answer) << "Bad data found in OffsetView"; + int sum = 0; + Kokkos::parallel_reduce( + rangeP2D, + KOKKOS_LAMBDA(const int i, const int j, int& updateMe) { + updateMe += offsetSubview(i, j); + }, + sum); + + ASSERT_EQ(sum, 6 * (e0 - b0) * (e1 - b1)); #endif + } - { - offset_view_type ovCopy(ov); - ASSERT_EQ(ovCopy==ov, true) << - "Copy constructor or equivalence operator broken"; - } - - { - offset_view_type ovAssigned = ov; - ASSERT_EQ(ovAssigned==ov, true) << - "Assignment operator or equivalence operator broken"; - } - - { //construct OffsetView from a View plus begins array - const int extent0 = 100; - const int extent1 = 200; - const int extent2 = 300; - Kokkos::View view3D("view3D", extent0, extent1, extent2); + // slice 2 + { + auto offsetSubview = + Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), 0, 0); + ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; + } + { + auto offsetSubview = + Kokkos::Experimental::subview(sliceMe, 0, 0, Kokkos::ALL()); + ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; + } - Kokkos::deep_copy(view3D, 1); + { + auto offsetSubview = + Kokkos::Experimental::subview(sliceMe, 0, Kokkos::ALL(), 0); + ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; + } + } - Kokkos::Array begins = {{-10, -20, -30}}; - Kokkos::Experimental::OffsetView offsetView3D(view3D, begins); + { // test subview rank 4 - typedef Kokkos::MDRangePolicy, Kokkos::IndexType > range3_type; - typedef typename range3_type::point_type point3_type; + Kokkos::Experimental::OffsetView sliceMe( + "offsetToSlice", {-10, 20}, {-20, 30}, {-30, 40}, {-40, 50}); - range3_type rangePolicy3DZero(point3_type{ {0, 0, 0 } }, - point3_type{ { extent0, extent1, extent2 } }); + // slice 1 + { + auto offsetSubview = Kokkos::Experimental::subview( + sliceMe, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), 0); + ASSERT_EQ(offsetSubview.Rank, 3) << "subview of offset is broken."; + } + { + auto offsetSubview = Kokkos::Experimental::subview( + sliceMe, Kokkos::ALL(), Kokkos::ALL(), 0, Kokkos::ALL()); + ASSERT_EQ(offsetSubview.Rank, 3) << "subview of offset is broken."; + } + { + auto offsetSubview = Kokkos::Experimental::subview( + sliceMe, Kokkos::ALL(), 0, Kokkos::ALL(), Kokkos::ALL()); + ASSERT_EQ(offsetSubview.Rank, 3) << "subview of offset is broken."; + } + { + auto offsetSubview = Kokkos::Experimental::subview( + sliceMe, 0, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL()); + ASSERT_EQ(offsetSubview.Rank, 3) << "subview of offset is broken."; + } + + // slice 2 + auto offsetSubview2a = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), + Kokkos::ALL(), 0, 0); + ASSERT_EQ(offsetSubview2a.Rank, 2) << "subview of offset is broken."; + { + auto offsetSubview2b = Kokkos::Experimental::subview( + sliceMe, Kokkos::ALL(), 0, Kokkos::ALL(), 0); + ASSERT_EQ(offsetSubview2b.Rank, 2) << "subview of offset is broken."; + } + { + auto offsetSubview2b = Kokkos::Experimental::subview( + sliceMe, Kokkos::ALL(), 0, 0, Kokkos::ALL()); + ASSERT_EQ(offsetSubview2b.Rank, 2) << "subview of offset is broken."; + } + { + auto offsetSubview2b = Kokkos::Experimental::subview( + sliceMe, 0, Kokkos::ALL(), 0, Kokkos::ALL()); + ASSERT_EQ(offsetSubview2b.Rank, 2) << "subview of offset is broken."; + } + { + auto offsetSubview2b = Kokkos::Experimental::subview( + sliceMe, 0, 0, Kokkos::ALL(), Kokkos::ALL()); + ASSERT_EQ(offsetSubview2b.Rank, 2) << "subview of offset is broken."; + } + // slice 3 + { + auto offsetSubview = + Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), 0, 0, 0); + ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; + } + { + auto offsetSubview = + Kokkos::Experimental::subview(sliceMe, 0, Kokkos::ALL(), 0, 0); + ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; + } + { + auto offsetSubview = + Kokkos::Experimental::subview(sliceMe, 0, 0, Kokkos::ALL(), 0); + ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; + } + { + auto offsetSubview = + Kokkos::Experimental::subview(sliceMe, 0, 0, 0, Kokkos::ALL()); + ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; + } + } +} #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) - int view3DSum = 0; - Kokkos::parallel_reduce(rangePolicy3DZero, KOKKOS_LAMBDA(const int i, const int j, int k, int & updateMe){ - updateMe += view3D(i, j, k); - }, view3DSum); +template +KOKKOS_INLINE_FUNCTION T std_accumulate(InputIt first, InputIt last, T init, + BinaryOperation op) { + for (; first != last; ++first) { + init = op(std::move(init), *first); + } + return init; +} - range3_type rangePolicy3D(point3_type{ {begins[0], begins[1], begins[2] } }, - point3_type{ { begins[0] + extent0, begins[1] + extent1, begins[2] + extent2 } }); - int offsetView3DSum = 0; +KOKKOS_INLINE_FUNCTION int element(std::initializer_list il) { + return std_accumulate(il.begin(), il.end(), 0, + [](int l, int r) { return l * 10 + r; }); +} - Kokkos::parallel_reduce(rangePolicy3D, KOKKOS_LAMBDA(const int i, const int j, int k, int & updateMe){ - updateMe += offsetView3D(i, j, k); - }, offsetView3DSum); +template +void test_offsetview_offsets_rank1() { + using data_type = int*; + using view_type = Kokkos::View; + using index_type = Kokkos::IndexType; + using execution_policy = Kokkos::RangePolicy; + using offset_view_type = Kokkos::Experimental::OffsetView; - ASSERT_EQ(view3DSum, offsetView3DSum) << "construction of OffsetView from View and begins array broken."; -#endif - } - view_type viewFromOV = ov.view(); + view_type v("View1", 10); + Kokkos::parallel_for( + "For1", execution_policy(0, v.extent_int(0)), + KOKKOS_LAMBDA(const int i) { v(i) = element({i}); }); - ASSERT_EQ(viewFromOV == ov, true) << - "OffsetView::view() or equivalence operator View == OffsetView broken"; + int errors; + Kokkos::parallel_reduce( + "Reduce1", execution_policy(-3, 4), + KOKKOS_LAMBDA(const int ii, int& lerrors) { + offset_view_type ov(v, {ii}); + lerrors += (ov(3) != element({3 - ii})); + }, + errors); - { - offset_view_type ovFromV(viewFromOV, {-1, -2}); + ASSERT_EQ(0, errors); +} - ASSERT_EQ(ovFromV == viewFromOV , true) << - "Construction of OffsetView from View or equivalence operator OffsetView == View broken"; - } - { - offset_view_type ovFromV = viewFromOV; - ASSERT_EQ(ovFromV == viewFromOV , true) << - "Construction of OffsetView from View by assignment (implicit conversion) or equivalence operator OffsetView == View broken"; - } +template +void test_offsetview_offsets_rank2() { + using data_type = int**; + using view_type = Kokkos::View; + using index_type = Kokkos::IndexType; + using execution_policy = Kokkos::RangePolicy; + using offset_view_type = Kokkos::Experimental::OffsetView; - {// test offsetview to view deep copy - view_type aView("aView", ov.extent(0), ov.extent(1)); - Kokkos::Experimental::deep_copy(aView, ov); + view_type v("View2", 10, 10); + Kokkos::parallel_for( + "For2", execution_policy(0, v.extent_int(0)), KOKKOS_LAMBDA(const int i) { + for (int j = 0; j != v.extent_int(1); ++j) { + v(i, j) = element({i, j}); + } + }); -#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) - int sum = 0; - Kokkos::parallel_reduce(rangePolicy2D, KOKKOS_LAMBDA(const int i, const int j, int & updateMe){ - updateMe += ov(i, j) - aView(i- ov.begin(0), j-ov.begin(1)); - }, sum); + int errors; + Kokkos::parallel_reduce( + "Reduce2", execution_policy(-3, 4), + KOKKOS_LAMBDA(const int ii, int& lerrors) { + for (int jj = -3; jj <= 3; ++jj) { + offset_view_type ov(v, {ii, jj}); + lerrors += (ov(3, 3) != element({3 - ii, 3 - jj})); + } + }, + errors); - ASSERT_EQ(sum, 0) << "deep_copy(view, offsetView) broken."; -#endif - } + ASSERT_EQ(0, errors); +} - {// test view to offsetview deep copy - view_type aView("aView", ov.extent(0), ov.extent(1)); +template +void test_offsetview_offsets_rank3() { + using data_type = int***; + using view_type = Kokkos::View; + using index_type = Kokkos::IndexType; + using execution_policy = Kokkos::RangePolicy; + using offset_view_type = Kokkos::Experimental::OffsetView; - Kokkos::deep_copy(aView, 99); - Kokkos::Experimental::deep_copy(ov, aView); - - -#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) - int sum = 0; - Kokkos::parallel_reduce(rangePolicy2D, KOKKOS_LAMBDA(const int i, const int j, int & updateMe){ - updateMe += ov(i, j) - aView(i- ov.begin(0), j-ov.begin(1)); - }, sum); - - ASSERT_EQ(sum, 0) << "deep_copy(offsetView, view) broken."; -#endif - } - } - template - void test_offsetview_subview(unsigned int size) - { - {//test subview 1 - Kokkos::Experimental::OffsetView sliceMe("offsetToSlice", {-10, 20}); - { - auto offsetSubviewa = Kokkos::Experimental::subview(sliceMe, 0); - ASSERT_EQ(offsetSubviewa.Rank, 0) << "subview of offset is broken."; + view_type v("View3", 10, 10, 10); + Kokkos::parallel_for( + "For3", execution_policy(0, v.extent_int(0)), KOKKOS_LAMBDA(const int i) { + for (int j = 0; j != v.extent_int(1); ++j) { + for (int k = 0; k != v.extent_int(2); ++k) { + v(i, j, k) = element({i, j, k}); } + } + }); - } - {//test subview 2 - Kokkos::Experimental::OffsetView sliceMe("offsetToSlice", {-10,20}, {-20,30}); - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(),-2); - ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; - } + int errors; + Kokkos::parallel_reduce( + "Reduce3", execution_policy(-3, 4), + KOKKOS_LAMBDA(const int ii, int& lerrors) { + for (int jj = -3; jj <= 3; ++jj) { + for (int kk = -3; kk <= 3; ++kk) { + offset_view_type ov(v, {ii, jj, kk}); + lerrors += (ov(3, 3, 3) != element({3 - ii, 3 - jj, 3 - kk})); + } + } + }, + errors); - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, 0, Kokkos::ALL()); - ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; - } - } + ASSERT_EQ(0, errors); +} +#endif +TEST(TEST_CATEGORY, offsetview_construction) { + test_offsetview_construction(10); +} - {//test subview rank 3 +TEST(TEST_CATEGORY, offsetview_unmanaged_construction) { + test_offsetview_unmanaged_construction(); +} - Kokkos::Experimental::OffsetView sliceMe("offsetToSlice", {-10,20}, {-20,30}, {-30,40}); - - //slice 1 - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe,Kokkos::ALL(),Kokkos::ALL(), 0); - ASSERT_EQ(offsetSubview.Rank, 2) << "subview of offset is broken."; - } - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe,Kokkos::ALL(), 0,Kokkos::ALL()); - ASSERT_EQ(offsetSubview.Rank, 2) << "subview of offset is broken."; - } - - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe,0, Kokkos::ALL(),Kokkos::ALL()); - ASSERT_EQ(offsetSubview.Rank, 2) << "subview of offset is broken."; - - } - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe,0, Kokkos::ALL(), Kokkos::make_pair(-30, -21)); - ASSERT_EQ(offsetSubview.Rank, 2) << "subview of offset is broken."; - - ASSERT_EQ(offsetSubview.begin(0) , -20); - ASSERT_EQ(offsetSubview.end(0) , 31); - ASSERT_EQ(offsetSubview.begin(1) , 0); - ASSERT_EQ(offsetSubview.end(1) , 9); +TEST(TEST_CATEGORY, offsetview_subview) { + test_offsetview_subview(10); +} #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) - typedef Kokkos::MDRangePolicy, Kokkos::IndexType > range_type; - typedef typename range_type::point_type point_type; +TEST(TEST_CATEGORY, offsetview_offsets_rank1) { + test_offsetview_offsets_rank1(); +} - const int b0 = offsetSubview.begin(0); - const int b1 = offsetSubview.begin(1); +TEST(TEST_CATEGORY, offsetview_offsets_rank2) { + test_offsetview_offsets_rank2(); +} - const int e0 = offsetSubview.end(0); - const int e1 = offsetSubview.end(1); - - range_type rangeP2D(point_type{ {b0, b1 } }, point_type{ { e0, e1} }); - - Kokkos::parallel_for(rangeP2D, KOKKOS_LAMBDA(const int i, const int j) { - offsetSubview(i,j) = 6; - } - ); - - int sum = 0; - Kokkos::parallel_reduce(rangeP2D, KOKKOS_LAMBDA(const int i, const int j, int & updateMe){ - updateMe += offsetSubview(i, j); - }, sum); - - ASSERT_EQ(sum, 6*(e0-b0)*(e1-b1)); +TEST(TEST_CATEGORY, offsetview_offsets_rank3) { + test_offsetview_offsets_rank3(); +} #endif - } - // slice 2 - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), 0, 0); - ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; - } - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, 0, 0, Kokkos::ALL()); - ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; - } - - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, 0, Kokkos::ALL(), 0); - ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; - } - } - - {//test subview rank 4 - - Kokkos::Experimental::OffsetView sliceMe("offsetToSlice", {-10,20}, {-20,30}, {-30,40}, {-40, 50}); - - //slice 1 - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(),Kokkos::ALL(), Kokkos::ALL(), 0); - ASSERT_EQ(offsetSubview.Rank, 3) << "subview of offset is broken."; - } - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), Kokkos::ALL(), 0, Kokkos::ALL()); - ASSERT_EQ(offsetSubview.Rank, 3) << "subview of offset is broken."; - } - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe ,Kokkos::ALL(), 0, Kokkos::ALL(),Kokkos::ALL()); - ASSERT_EQ(offsetSubview.Rank, 3) << "subview of offset is broken."; - } - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe , 0, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL() ); - ASSERT_EQ(offsetSubview.Rank, 3) << "subview of offset is broken."; - } - - // slice 2 - auto offsetSubview2a = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), Kokkos::ALL(), 0, 0); - ASSERT_EQ(offsetSubview2a.Rank, 2) << "subview of offset is broken."; - { - auto offsetSubview2b = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), 0, Kokkos::ALL(), 0); - ASSERT_EQ(offsetSubview2b.Rank, 2) << "subview of offset is broken."; - } - { - auto offsetSubview2b = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), 0, 0, Kokkos::ALL()); - ASSERT_EQ(offsetSubview2b.Rank, 2) << "subview of offset is broken."; - } - { - auto offsetSubview2b = Kokkos::Experimental::subview(sliceMe, 0, Kokkos::ALL(), 0, Kokkos::ALL()); - ASSERT_EQ(offsetSubview2b.Rank, 2) << "subview of offset is broken."; - } - { - auto offsetSubview2b = Kokkos::Experimental::subview(sliceMe, 0, 0, Kokkos::ALL(), Kokkos::ALL()); - ASSERT_EQ(offsetSubview2b.Rank, 2) << "subview of offset is broken."; - } - // slice 3 - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, Kokkos::ALL(), 0, 0, 0); - ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; - } - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, 0, Kokkos::ALL(), 0, 0); - ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; - } - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, 0, 0, Kokkos::ALL(), 0); - ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; - } - { - auto offsetSubview = Kokkos::Experimental::subview(sliceMe, 0, 0, 0, Kokkos::ALL()); - ASSERT_EQ(offsetSubview.Rank, 1) << "subview of offset is broken."; - } - - } - - } - - TEST_F( TEST_CATEGORY, offsetview_construction) { - test_offsetview_construction(10); - } - TEST_F( TEST_CATEGORY, offsetview_subview) { - test_offsetview_subview(10); - } - -} // namespace Test +} // namespace Test #endif /* CONTAINERS_UNIT_TESTS_TESTOFFSETVIEW_HPP_ */ diff --git a/lib/kokkos/containers/unit_tests/TestScatterView.hpp b/lib/kokkos/containers/unit_tests/TestScatterView.hpp index a9d97b32f3..93b69cc769 100644 --- a/lib/kokkos/containers/unit_tests/TestScatterView.hpp +++ b/lib/kokkos/containers/unit_tests/TestScatterView.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,381 +46,378 @@ #define KOKKOS_TEST_SCATTER_VIEW_HPP #include +#include namespace Test { -template +template struct test_scatter_view_impl_cls; -template -struct test_scatter_view_impl_cls -{ -public: - - typedef Kokkos::Experimental::ScatterView - < double*[3] - , Layout - , ExecSpace - , Kokkos::Experimental::ScatterSum - , duplication - , contribution - > scatter_view_type; - - typedef Kokkos::View orig_view_type; - - - scatter_view_type scatter_view; - int scatterSize; - - test_scatter_view_impl_cls(const scatter_view_type& view){ - scatter_view = view; - scatterSize = 0; - } - - void initialize(orig_view_type orig) { - auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); - Kokkos::fence(); - for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) { - host_view(i, 0) = 0.0; - host_view(i, 1) = 0.0; - host_view(i, 2) = 0.0; - } - Kokkos::fence(); - Kokkos::deep_copy(orig, host_view); - } - - void run_parallel(int n) { - scatterSize = n; - auto policy = Kokkos::RangePolicy(0, n); - Kokkos::parallel_for(policy, *this, "scatter_view_test: Sum"); - } - - KOKKOS_INLINE_FUNCTION - void operator()(int i) const { - auto scatter_access = scatter_view.access(); - auto scatter_access_atomic = scatter_view.template access(); - for (int j = 0; j < 10; ++j) { - auto k = (i + j) % scatterSize; - scatter_access(k, 0) += 4.2; - scatter_access_atomic(k, 1) += 2.0; - scatter_access(k, 2) += 1.0; - } - } - - void validateResults(orig_view_type orig) { - auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); - Kokkos::fence(); - for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) { - auto val0 = host_view(i, 0); - auto val1 = host_view(i, 1); - auto val2 = host_view(i, 2); - EXPECT_TRUE(std::fabs((val0 - 84.0) / 84.0) < 1e-14); - EXPECT_TRUE(std::fabs((val1 - 40.0) / 40.0) < 1e-14); - EXPECT_TRUE(std::fabs((val2 - 20.0) / 20.0) < 1e-14); - } - } -}; - - -template -struct test_scatter_view_impl_cls -{ -public: - - typedef Kokkos::Experimental::ScatterView - < double*[3] - , Layout - , ExecSpace - , Kokkos::Experimental::ScatterProd - , duplication - , contribution - > scatter_view_type; - - typedef Kokkos::View orig_view_type; - - - scatter_view_type scatter_view; - int scatterSize; - - test_scatter_view_impl_cls(const scatter_view_type& view){ - scatter_view = view; - scatterSize = 0; - } - - void initialize(orig_view_type orig) { - auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); - Kokkos::fence(); - for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) { - host_view(i, 0) = 1.0; - host_view(i, 1) = 1.0; - host_view(i, 2) = 1.0; - } - Kokkos::fence(); - Kokkos::deep_copy(orig, host_view); - } - - void run_parallel(int n) { - scatterSize = n; - auto policy = Kokkos::RangePolicy(0, n); - Kokkos::parallel_for(policy, *this, "scatter_view_test: Prod"); - } - - KOKKOS_INLINE_FUNCTION - void operator()(int i) const { - auto scatter_access = scatter_view.access(); - auto scatter_access_atomic = scatter_view.template access(); - for (int j = 0; j < 4; ++j) { - auto k = (i + j) % scatterSize; - scatter_access(k, 0) *= 4.0; - scatter_access_atomic(k, 1) *= 2.0; - scatter_access(k, 2) *= 1.0; - } - } - - void validateResults(orig_view_type orig) { - auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); - Kokkos::fence(); - for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) { - auto val0 = host_view(i, 0); - auto val1 = host_view(i, 1); - auto val2 = host_view(i, 2); - EXPECT_TRUE(std::fabs((val0 - 65536.0) / 65536.0) < 1e-14); - EXPECT_TRUE(std::fabs((val1 - 256.0) / 256.0) < 1e-14); - EXPECT_TRUE(std::fabs((val2 - 1.0) / 1.0) < 1e-14); - } - } -}; - - -template -struct test_scatter_view_impl_cls -{ -public: - - typedef Kokkos::Experimental::ScatterView - < double*[3] - , Layout - , ExecSpace - , Kokkos::Experimental::ScatterMin - , duplication - , contribution - > scatter_view_type; - - typedef Kokkos::View orig_view_type; - - - scatter_view_type scatter_view; - int scatterSize; - - test_scatter_view_impl_cls(const scatter_view_type& view){ - scatter_view = view; - scatterSize = 0; - } - - void initialize(orig_view_type orig) { - auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); - Kokkos::fence(); - for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) { - host_view(i, 0) = 999999.0; - host_view(i, 1) = 999999.0; - host_view(i, 2) = 999999.0; - } - Kokkos::fence(); - Kokkos::deep_copy(orig, host_view); - } - - void run_parallel(int n) { - scatterSize = n; - auto policy = Kokkos::RangePolicy(0, n); - Kokkos::parallel_for(policy, *this, "scatter_view_test: Prod"); - } - - KOKKOS_INLINE_FUNCTION - void operator()(int i) const { - auto scatter_access = scatter_view.access(); - auto scatter_access_atomic = scatter_view.template access(); - for (int j = 0; j < 4; ++j) { - auto k = (i + j) % scatterSize; - scatter_access(k, 0).update((double)(j+1)*4); - scatter_access_atomic(k, 1).update((double)(j+1)*2.0); - scatter_access(k, 2).update((double)(j+1)*1.0); - } - } - - void validateResults(orig_view_type orig) { - auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); - Kokkos::fence(); - for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) { - auto val0 = host_view(i, 0); - auto val1 = host_view(i, 1); - auto val2 = host_view(i, 2); - EXPECT_TRUE(std::fabs((val0 - 4.0) / 4.0) < 1e-14); - EXPECT_TRUE(std::fabs((val1 - 2.0) / 2.0) < 1e-14); - EXPECT_TRUE(std::fabs((val2 - 1.0) / 1.0) < 1e-14); - } - } -}; - - -template -struct test_scatter_view_impl_cls -{ -public: - - typedef Kokkos::Experimental::ScatterView - < double*[3] - , Layout - , ExecSpace - , Kokkos::Experimental::ScatterMax - , duplication - , contribution - > scatter_view_type; - - typedef Kokkos::View orig_view_type; - - - scatter_view_type scatter_view; - int scatterSize; - - test_scatter_view_impl_cls(const scatter_view_type& view){ - scatter_view = view; - scatterSize = 0; - } - - void initialize(orig_view_type orig) { - auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); - Kokkos::fence(); - for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) { - host_view(i, 0) = 0.0; - host_view(i, 1) = 0.0; - host_view(i, 2) = 0.0; - } - Kokkos::fence(); - Kokkos::deep_copy(orig, host_view); - } - - void run_parallel(int n) { - scatterSize = n; - auto policy = Kokkos::RangePolicy(0, n); - Kokkos::parallel_for(policy, *this, "scatter_view_test: Prod"); - } - - KOKKOS_INLINE_FUNCTION - void operator()(int i) const { - auto scatter_access = scatter_view.access(); - auto scatter_access_atomic = scatter_view.template access(); - for (int j = 0; j < 4; ++j) { - auto k = (i + j) % scatterSize; - scatter_access(k, 0).update((double)(j+1)*4); - scatter_access_atomic(k, 1).update((double)(j+1)*2.0); - scatter_access(k, 2).update((double)(j+1)*1.0); - } - } - - void validateResults(orig_view_type orig) { - auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); - Kokkos::fence(); - for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) { - auto val0 = host_view(i, 0); - auto val1 = host_view(i, 1); - auto val2 = host_view(i, 2); - EXPECT_TRUE(std::fabs((val0 - 16.0) / 16.0) < 1e-14); - EXPECT_TRUE(std::fabs((val1 - 8.0) / 8.0) < 1e-14); - EXPECT_TRUE(std::fabs((val2 - 4.0) / 4.0) < 1e-14); - } - } -}; - - - -template -struct test_scatter_view_config -{ +template +struct test_scatter_view_impl_cls { public: - typedef typename test_scatter_view_impl_cls::scatter_view_type scatter_view_def; - typedef typename test_scatter_view_impl_cls::orig_view_type orig_view_def; + typedef Kokkos::Experimental::ScatterView + scatter_view_type; - test_scatter_view_config() { - } + typedef Kokkos::View orig_view_type; - void run_test(int n) - { - //Test creation via create_scatter_view - { - orig_view_def original_view("original_view", n); - scatter_view_def scatter_view = Kokkos::Experimental::create_scatter_view - < op - , duplication - , contribution - > (original_view); + scatter_view_type scatter_view; + int scatterSize; - test_scatter_view_impl_cls scatter_view_test_impl(scatter_view); - scatter_view_test_impl.initialize(original_view); - scatter_view_test_impl.run_parallel(n); + test_scatter_view_impl_cls(const scatter_view_type& view) { + scatter_view = view; + scatterSize = 0; + } - Kokkos::Experimental::contribute(original_view, scatter_view); - scatter_view.reset_except(original_view); + void initialize(orig_view_type orig) { + auto host_view = + Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); + Kokkos::fence(); + for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); + ++i) { + host_view(i, 0) = 0.0; + host_view(i, 1) = 0.0; + host_view(i, 2) = 0.0; + } + Kokkos::fence(); + Kokkos::deep_copy(orig, host_view); + } - scatter_view_test_impl.run_parallel(n); + void run_parallel(int n) { + scatterSize = n; + auto policy = Kokkos::RangePolicy(0, n); + Kokkos::parallel_for(policy, *this, "scatter_view_test: Sum"); + } - Kokkos::Experimental::contribute(original_view, scatter_view); - Kokkos::fence(); - - scatter_view_test_impl.validateResults(original_view); - - { - scatter_view_def persistent_view("persistent", n); - auto result_view = persistent_view.subview(); - contribute(result_view, persistent_view); - Kokkos::fence(); - } - } - //Test creation via constructor - { - orig_view_def original_view("original_view", n); - scatter_view_def scatter_view(original_view); - - test_scatter_view_impl_cls scatter_view_test_impl(scatter_view); - scatter_view_test_impl.initialize(original_view); - scatter_view_test_impl.run_parallel(n); - - Kokkos::Experimental::contribute(original_view, scatter_view); - scatter_view.reset_except(original_view); - - scatter_view_test_impl.run_parallel(n); - - Kokkos::Experimental::contribute(original_view, scatter_view); - Kokkos::fence(); - - scatter_view_test_impl.validateResults(original_view); - - { - scatter_view_def persistent_view("persistent", n); - auto result_view = persistent_view.subview(); - contribute(result_view, persistent_view); - Kokkos::fence(); - } - } - } + KOKKOS_INLINE_FUNCTION + void operator()(int i) const { + auto scatter_access = scatter_view.access(); + auto scatter_access_atomic = + scatter_view.template access(); + for (int j = 0; j < 10; ++j) { + auto k = (i + j) % scatterSize; + scatter_access(k, 0) += 4.2; + scatter_access_atomic(k, 1) += 2.0; + scatter_access(k, 2) += 1.0; + } + } + void validateResults(orig_view_type orig) { + auto host_view = + Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); + Kokkos::fence(); + for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); + ++i) { + auto val0 = host_view(i, 0); + auto val1 = host_view(i, 1); + auto val2 = host_view(i, 2); + EXPECT_TRUE(std::fabs((val0 - 84.0) / 84.0) < 1e-14); + EXPECT_TRUE(std::fabs((val1 - 40.0) / 40.0) < 1e-14); + EXPECT_TRUE(std::fabs((val2 - 20.0) / 20.0) < 1e-14); + } + } }; +template +struct test_scatter_view_impl_cls { + public: + typedef Kokkos::Experimental::ScatterView + scatter_view_type; + + typedef Kokkos::View orig_view_type; + + scatter_view_type scatter_view; + int scatterSize; + + test_scatter_view_impl_cls(const scatter_view_type& view) { + scatter_view = view; + scatterSize = 0; + } + + void initialize(orig_view_type orig) { + auto host_view = + Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); + Kokkos::fence(); + for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); + ++i) { + host_view(i, 0) = 1.0; + host_view(i, 1) = 1.0; + host_view(i, 2) = 1.0; + } + Kokkos::fence(); + Kokkos::deep_copy(orig, host_view); + } + + void run_parallel(int n) { + scatterSize = n; + auto policy = Kokkos::RangePolicy(0, n); + Kokkos::parallel_for(policy, *this, "scatter_view_test: Prod"); + } + + KOKKOS_INLINE_FUNCTION + void operator()(int i) const { + auto scatter_access = scatter_view.access(); + auto scatter_access_atomic = + scatter_view.template access(); + for (int j = 0; j < 4; ++j) { + auto k = (i + j) % scatterSize; + scatter_access(k, 0) *= 4.0; + scatter_access_atomic(k, 1) *= 2.0; + scatter_access(k, 2) *= 1.0; + } + } + + void validateResults(orig_view_type orig) { + auto host_view = + Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); + Kokkos::fence(); + for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); + ++i) { + auto val0 = host_view(i, 0); + auto val1 = host_view(i, 1); + auto val2 = host_view(i, 2); + EXPECT_TRUE(std::fabs((val0 - 65536.0) / 65536.0) < 1e-14); + EXPECT_TRUE(std::fabs((val1 - 256.0) / 256.0) < 1e-14); + EXPECT_TRUE(std::fabs((val2 - 1.0) / 1.0) < 1e-14); + } + } +}; + +template +struct test_scatter_view_impl_cls { + public: + typedef Kokkos::Experimental::ScatterView + scatter_view_type; + + typedef Kokkos::View orig_view_type; + + scatter_view_type scatter_view; + int scatterSize; + + test_scatter_view_impl_cls(const scatter_view_type& view) { + scatter_view = view; + scatterSize = 0; + } + + void initialize(orig_view_type orig) { + auto host_view = + Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); + Kokkos::fence(); + for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); + ++i) { + host_view(i, 0) = 999999.0; + host_view(i, 1) = 999999.0; + host_view(i, 2) = 999999.0; + } + Kokkos::fence(); + Kokkos::deep_copy(orig, host_view); + } + + void run_parallel(int n) { + scatterSize = n; + auto policy = Kokkos::RangePolicy(0, n); + Kokkos::parallel_for(policy, *this, "scatter_view_test: Prod"); + } + + KOKKOS_INLINE_FUNCTION + void operator()(int i) const { + auto scatter_access = scatter_view.access(); + auto scatter_access_atomic = + scatter_view.template access(); + for (int j = 0; j < 4; ++j) { + auto k = (i + j) % scatterSize; + scatter_access(k, 0).update((double)(j + 1) * 4); + scatter_access_atomic(k, 1).update((double)(j + 1) * 2.0); + scatter_access(k, 2).update((double)(j + 1) * 1.0); + } + } + + void validateResults(orig_view_type orig) { + auto host_view = + Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); + Kokkos::fence(); + for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); + ++i) { + auto val0 = host_view(i, 0); + auto val1 = host_view(i, 1); + auto val2 = host_view(i, 2); + EXPECT_TRUE(std::fabs((val0 - 4.0) / 4.0) < 1e-14); + EXPECT_TRUE(std::fabs((val1 - 2.0) / 2.0) < 1e-14); + EXPECT_TRUE(std::fabs((val2 - 1.0) / 1.0) < 1e-14); + } + } +}; + +template +struct test_scatter_view_impl_cls { + public: + typedef Kokkos::Experimental::ScatterView + scatter_view_type; + + typedef Kokkos::View orig_view_type; + + scatter_view_type scatter_view; + int scatterSize; + + test_scatter_view_impl_cls(const scatter_view_type& view) { + scatter_view = view; + scatterSize = 0; + } + + void initialize(orig_view_type orig) { + auto host_view = + Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); + Kokkos::fence(); + for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); + ++i) { + host_view(i, 0) = 0.0; + host_view(i, 1) = 0.0; + host_view(i, 2) = 0.0; + } + Kokkos::fence(); + Kokkos::deep_copy(orig, host_view); + } + + void run_parallel(int n) { + scatterSize = n; + auto policy = Kokkos::RangePolicy(0, n); + Kokkos::parallel_for(policy, *this, "scatter_view_test: Prod"); + } + + KOKKOS_INLINE_FUNCTION + void operator()(int i) const { + auto scatter_access = scatter_view.access(); + auto scatter_access_atomic = + scatter_view.template access(); + for (int j = 0; j < 4; ++j) { + auto k = (i + j) % scatterSize; + scatter_access(k, 0).update((double)(j + 1) * 4); + scatter_access_atomic(k, 1).update((double)(j + 1) * 2.0); + scatter_access(k, 2).update((double)(j + 1) * 1.0); + } + } + + void validateResults(orig_view_type orig) { + auto host_view = + Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig); + Kokkos::fence(); + for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); + ++i) { + auto val0 = host_view(i, 0); + auto val1 = host_view(i, 1); + auto val2 = host_view(i, 2); + EXPECT_TRUE(std::fabs((val0 - 16.0) / 16.0) < 1e-14); + EXPECT_TRUE(std::fabs((val1 - 8.0) / 8.0) < 1e-14); + EXPECT_TRUE(std::fabs((val2 - 4.0) / 4.0) < 1e-14); + } + } +}; + +template +struct test_scatter_view_config { + public: + typedef + typename test_scatter_view_impl_cls::scatter_view_type + scatter_view_def; + typedef typename test_scatter_view_impl_cls::orig_view_type + orig_view_def; + + test_scatter_view_config() {} + + void run_test(int n) { + // Test creation via create_scatter_view + { + orig_view_def original_view("original_view", n); + scatter_view_def scatter_view = Kokkos::Experimental::create_scatter_view< + op, duplication, contribution>(original_view); + + test_scatter_view_impl_cls + scatter_view_test_impl(scatter_view); + scatter_view_test_impl.initialize(original_view); + scatter_view_test_impl.run_parallel(n); + + Kokkos::Experimental::contribute(original_view, scatter_view); + scatter_view.reset_except(original_view); + + scatter_view_test_impl.run_parallel(n); + + Kokkos::Experimental::contribute(original_view, scatter_view); + Kokkos::fence(); + + scatter_view_test_impl.validateResults(original_view); + + { + scatter_view_def persistent_view("persistent", n); + auto result_view = persistent_view.subview(); + contribute(result_view, persistent_view); + Kokkos::fence(); + } + } + // Test creation via constructor + { + orig_view_def original_view("original_view", n); + scatter_view_def scatter_view(original_view); + + test_scatter_view_impl_cls + scatter_view_test_impl(scatter_view); + scatter_view_test_impl.initialize(original_view); + scatter_view_test_impl.run_parallel(n); + + Kokkos::Experimental::contribute(original_view, scatter_view); + scatter_view.reset_except(original_view); + + scatter_view_test_impl.run_parallel(n); + + Kokkos::Experimental::contribute(original_view, scatter_view); + Kokkos::fence(); + + scatter_view_test_impl.validateResults(original_view); + + { + scatter_view_def persistent_view("persistent", n); + auto result_view = persistent_view.subview(); + contribute(result_view, persistent_view); + Kokkos::fence(); + } + } + } +}; template struct TestDuplicatedScatterView { TestDuplicatedScatterView(int n) { // ScatterSum test - test_scatter_view_config test_sv_right_config; + test_scatter_view_config< + ExecSpace, Kokkos::LayoutRight, Kokkos::Experimental::ScatterDuplicated, + Kokkos::Experimental::ScatterNonAtomic, ScatterType> + test_sv_right_config; test_sv_right_config.run_test(n); - test_scatter_view_config test_sv_left_config; + test_scatter_view_config< + ExecSpace, Kokkos::LayoutLeft, Kokkos::Experimental::ScatterDuplicated, + Kokkos::Experimental::ScatterNonAtomic, ScatterType> + test_sv_left_config; test_sv_left_config.run_test(n); } }; @@ -429,8 +427,7 @@ struct TestDuplicatedScatterView { // UniqueToken can support it template struct TestDuplicatedScatterView { - TestDuplicatedScatterView(int) { - } + TestDuplicatedScatterView(int) {} }; #endif @@ -439,14 +436,12 @@ struct TestDuplicatedScatterView { // UniqueToken can support it template struct TestDuplicatedScatterView { - TestDuplicatedScatterView(int) { - } + TestDuplicatedScatterView(int) {} }; #endif template -void test_scatter_view(int n) -{ +void test_scatter_view(int n) { // all of these configurations should compile okay, but only some of them are // correct and/or sensible in terms of memory use Kokkos::Experimental::UniqueToken unique_token{ExecSpace()}; @@ -456,33 +451,37 @@ void test_scatter_view(int n) // we also test OpenMP with one thread: LAMMPS cares about that) if (unique_token.size() == 1) { test_scatter_view_config test_sv_config; + Kokkos::Experimental::ScatterNonDuplicated, + Kokkos::Experimental::ScatterNonAtomic, + ScatterType> + test_sv_config; test_sv_config.run_test(n); } #ifdef KOKKOS_ENABLE_SERIAL if (!std::is_same::value) { #endif - test_scatter_view_config test_sv_config; - test_sv_config.run_test(n); + test_scatter_view_config + test_sv_config; + test_sv_config.run_test(n); #ifdef KOKKOS_ENABLE_SERIAL } #endif // with hundreds of threads we were running out of memory. // limit (n) so that duplication doesn't exceed 8GB - constexpr std::size_t maximum_allowed_total_bytes = 8ull * 1024ull * 1024ull * 1024ull; - std::size_t const maximum_allowed_copy_bytes = maximum_allowed_total_bytes / std::size_t(unique_token.size()); + constexpr std::size_t maximum_allowed_total_bytes = + 8ull * 1024ull * 1024ull * 1024ull; + std::size_t const maximum_allowed_copy_bytes = + maximum_allowed_total_bytes / std::size_t(unique_token.size()); constexpr std::size_t bytes_per_value = sizeof(double) * 3; - std::size_t const maximum_allowed_copy_values = maximum_allowed_copy_bytes / bytes_per_value; + std::size_t const maximum_allowed_copy_values = + maximum_allowed_copy_bytes / bytes_per_value; n = std::min(n, int(maximum_allowed_copy_values)); TestDuplicatedScatterView duptest(n); } -TEST_F( TEST_CATEGORY, scatterview) { +TEST(TEST_CATEGORY, scatterview) { #ifndef KOKKOS_ENABLE_ROCM test_scatter_view(10); test_scatter_view(10); @@ -492,17 +491,22 @@ TEST_F( TEST_CATEGORY, scatterview) { #ifdef KOKKOS_ENABLE_DEBUG int big_n = 100 * 1000; #else - int big_n = 10 * 1000 * 1000; + +#ifdef KOKKOS_ENABLE_SERIAL + bool is_serial = std::is_same::value; + int big_n = is_serial ? 100 * 1000 : 10000 * 1000; +#else + int big_n = 10000 * 1000; #endif - test_scatter_view(big_n); - test_scatter_view(big_n); - test_scatter_view(big_n); - test_scatter_view(big_n); + +#endif + test_scatter_view(big_n); + test_scatter_view(big_n); + test_scatter_view(big_n); + test_scatter_view(big_n); #endif } -} // namespace Test - -#endif //KOKKOS_TEST_UNORDERED_MAP_HPP - +} // namespace Test +#endif // KOKKOS_TEST_UNORDERED_MAP_HPP diff --git a/lib/kokkos/containers/unit_tests/TestStaticCrsGraph.hpp b/lib/kokkos/containers/unit_tests/TestStaticCrsGraph.hpp index 7ba307079f..15c190242c 100644 --- a/lib/kokkos/containers/unit_tests/TestStaticCrsGraph.hpp +++ b/lib/kokkos/containers/unit_tests/TestStaticCrsGraph.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -52,233 +53,244 @@ namespace Test { namespace TestStaticCrsGraph { -template< class Space > -void run_test_graph() -{ - typedef Kokkos::StaticCrsGraph< unsigned , Space > dView ; - typedef typename dView::HostMirror hView ; +template +void run_test_graph() { + typedef Kokkos::StaticCrsGraph dView; + typedef typename dView::HostMirror hView; - const unsigned LENGTH = 1000 ; - dView dx ; - hView hx ; + const unsigned LENGTH = 1000; + dView dx; + hView hx; - std::vector< std::vector< int > > graph( LENGTH ); + std::vector > graph(LENGTH); - for ( size_t i = 0 ; i < LENGTH ; ++i ) { + for (size_t i = 0; i < LENGTH; ++i) { graph[i].reserve(8); - for ( size_t j = 0 ; j < 8 ; ++j ) { - graph[i].push_back( i + j * 3 ); + for (size_t j = 0; j < 8; ++j) { + graph[i].push_back(i + j * 3); } } - dx = Kokkos::create_staticcrsgraph( "dx" , graph ); - hx = Kokkos::create_mirror( dx ); + dx = Kokkos::create_staticcrsgraph("dx", graph); + hx = Kokkos::create_mirror(dx); - ASSERT_EQ( hx.row_map.extent(0) - 1 , LENGTH ); + ASSERT_EQ(hx.row_map.extent(0) - 1, LENGTH); - for ( size_t i = 0 ; i < LENGTH ; ++i ) { + for (size_t i = 0; i < LENGTH; ++i) { const size_t begin = hx.row_map[i]; - const size_t n = hx.row_map[i+1] - begin ; - ASSERT_EQ( n , graph[i].size() ); - for ( size_t j = 0 ; j < n ; ++j ) { - ASSERT_EQ( (int) hx.entries( j + begin ) , graph[i][j] ); + const size_t n = hx.row_map[i + 1] - begin; + ASSERT_EQ(n, graph[i].size()); + for (size_t j = 0; j < n; ++j) { + ASSERT_EQ((int)hx.entries(j + begin), graph[i][j]); } } // Test row view access - for ( size_t i = 0 ; i < LENGTH ; ++i ) { + for (size_t i = 0; i < LENGTH; ++i) { auto rowView = hx.rowConst(i); - ASSERT_EQ( rowView.length, graph[i].size() ); - for ( size_t j = 0 ; j < rowView.length ; ++j ) { - ASSERT_EQ( rowView.colidx( j ) , graph[i][j] ); - ASSERT_EQ( rowView( j ) , graph[i][j] ); + ASSERT_EQ(rowView.length, graph[i].size()); + for (size_t j = 0; j < rowView.length; ++j) { + ASSERT_EQ(rowView.colidx(j), graph[i][j]); + ASSERT_EQ(rowView(j), graph[i][j]); } } } -template< class Space > -void run_test_graph2() -{ - typedef Kokkos::StaticCrsGraph< unsigned[3] , Space > dView ; - typedef typename dView::HostMirror hView ; +template +void run_test_graph2() { + typedef Kokkos::StaticCrsGraph dView; + typedef typename dView::HostMirror hView; - const unsigned LENGTH = 10 ; + const unsigned LENGTH = 10; - std::vector< size_t > sizes( LENGTH ); + std::vector sizes(LENGTH); - size_t total_length = 0 ; + size_t total_length = 0; - for ( size_t i = 0 ; i < LENGTH ; ++i ) { - total_length += ( sizes[i] = 6 + i % 4 ); + for (size_t i = 0; i < LENGTH; ++i) { + total_length += (sizes[i] = 6 + i % 4); } - dView dx = Kokkos::create_staticcrsgraph( "test" , sizes ); - hView hx = Kokkos::create_mirror( dx ); - hView mx = Kokkos::create_mirror( dx ); + dView dx = Kokkos::create_staticcrsgraph("test", sizes); + hView hx = Kokkos::create_mirror(dx); + hView mx = Kokkos::create_mirror(dx); - ASSERT_EQ( (size_t) dx.row_map.extent(0) , (size_t) LENGTH + 1 ); - ASSERT_EQ( (size_t) hx.row_map.extent(0) , (size_t) LENGTH + 1 ); - ASSERT_EQ( (size_t) mx.row_map.extent(0) , (size_t) LENGTH + 1 ); + ASSERT_EQ((size_t)dx.row_map.extent(0), (size_t)LENGTH + 1); + ASSERT_EQ((size_t)hx.row_map.extent(0), (size_t)LENGTH + 1); + ASSERT_EQ((size_t)mx.row_map.extent(0), (size_t)LENGTH + 1); - ASSERT_EQ( (size_t) dx.entries.extent(0) , (size_t) total_length ); - ASSERT_EQ( (size_t) hx.entries.extent(0) , (size_t) total_length ); - ASSERT_EQ( (size_t) mx.entries.extent(0) , (size_t) total_length ); + ASSERT_EQ((size_t)dx.entries.extent(0), (size_t)total_length); + ASSERT_EQ((size_t)hx.entries.extent(0), (size_t)total_length); + ASSERT_EQ((size_t)mx.entries.extent(0), (size_t)total_length); - ASSERT_EQ( (size_t) dx.entries.extent(1) , (size_t) 3 ); - ASSERT_EQ( (size_t) hx.entries.extent(1) , (size_t) 3 ); - ASSERT_EQ( (size_t) mx.entries.extent(1) , (size_t) 3 ); + ASSERT_EQ((size_t)dx.entries.extent(1), (size_t)3); + ASSERT_EQ((size_t)hx.entries.extent(1), (size_t)3); + ASSERT_EQ((size_t)mx.entries.extent(1), (size_t)3); - for ( size_t i = 0 ; i < LENGTH ; ++i ) { + for (size_t i = 0; i < LENGTH; ++i) { const size_t entry_begin = hx.row_map[i]; - const size_t entry_end = hx.row_map[i+1]; - for ( size_t j = entry_begin ; j < entry_end ; ++j ) { - hx.entries(j,0) = j + 1 ; - hx.entries(j,1) = j + 2 ; - hx.entries(j,2) = j + 3 ; + const size_t entry_end = hx.row_map[i + 1]; + for (size_t j = entry_begin; j < entry_end; ++j) { + hx.entries(j, 0) = j + 1; + hx.entries(j, 1) = j + 2; + hx.entries(j, 2) = j + 3; } } - Kokkos::deep_copy( dx.entries , hx.entries ); - Kokkos::deep_copy( mx.entries , dx.entries ); + Kokkos::deep_copy(dx.entries, hx.entries); + Kokkos::deep_copy(mx.entries, dx.entries); - ASSERT_EQ( mx.row_map.extent(0) , (size_t) LENGTH + 1 ); + ASSERT_EQ(mx.row_map.extent(0), (size_t)LENGTH + 1); - for ( size_t i = 0 ; i < LENGTH ; ++i ) { + for (size_t i = 0; i < LENGTH; ++i) { const size_t entry_begin = mx.row_map[i]; - const size_t entry_end = mx.row_map[i+1]; - ASSERT_EQ( ( entry_end - entry_begin ) , sizes[i] ); - for ( size_t j = entry_begin ; j < entry_end ; ++j ) { - ASSERT_EQ( (size_t) mx.entries( j , 0 ) , ( j + 1 ) ); - ASSERT_EQ( (size_t) mx.entries( j , 1 ) , ( j + 2 ) ); - ASSERT_EQ( (size_t) mx.entries( j , 2 ) , ( j + 3 ) ); + const size_t entry_end = mx.row_map[i + 1]; + ASSERT_EQ((entry_end - entry_begin), sizes[i]); + for (size_t j = entry_begin; j < entry_end; ++j) { + ASSERT_EQ((size_t)mx.entries(j, 0), (j + 1)); + ASSERT_EQ((size_t)mx.entries(j, 1), (j + 2)); + ASSERT_EQ((size_t)mx.entries(j, 2), (j + 3)); } } } -template< class Space > -void run_test_graph3(size_t B, size_t N) -{ +template +void run_test_graph3(size_t B, size_t N) { srand(10310); - typedef Kokkos::StaticCrsGraph< int , Space > dView ; - typedef typename dView::HostMirror hView ; + typedef Kokkos::StaticCrsGraph dView; + typedef typename dView::HostMirror hView; - const unsigned LENGTH = 2000 ; + const unsigned LENGTH = 2000; - std::vector< size_t > sizes( LENGTH ); + std::vector sizes(LENGTH); - size_t total_length = 0 ; + size_t total_length = 0; - for ( size_t i = 0 ; i < LENGTH ; ++i ) { - sizes[i] = rand()%1000; + for (size_t i = 0; i < LENGTH; ++i) { + sizes[i] = rand() % 1000; } - sizes[1] = N; + sizes[1] = N; sizes[1998] = N; - for ( size_t i = 0 ; i < LENGTH ; ++i ) { + for (size_t i = 0; i < LENGTH; ++i) { total_length += sizes[i]; } - int C = 0; - dView dx = Kokkos::create_staticcrsgraph( "test" , sizes ); - dx.create_block_partitioning(B,C); - hView hx = Kokkos::create_mirror( dx ); + int C = 0; + dView dx = Kokkos::create_staticcrsgraph("test", sizes); + dx.create_block_partitioning(B, C); + hView hx = Kokkos::create_mirror(dx); - for( size_t i = 0; i2*((hx.row_map(hx.numRows())+C*hx.numRows())/B))&&(hx.row_block_offsets(i+1)>hx.row_block_offsets(i)+1)); + ASSERT_FALSE( + (ne > 2 * ((hx.row_map(hx.numRows()) + C * hx.numRows()) / B)) && + (hx.row_block_offsets(i + 1) > hx.row_block_offsets(i) + 1)); } } -template< class Space > -void run_test_graph4() -{ +template +void run_test_graph4() { typedef unsigned ordinal_type; typedef Kokkos::LayoutRight layout_type; typedef Space space_type; typedef Kokkos::MemoryUnmanaged memory_traits_type; #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - typedef Kokkos::StaticCrsGraph< ordinal_type , layout_type , space_type , ordinal_type , memory_traits_type > dView ; + typedef Kokkos::StaticCrsGraph + dView; #else - typedef Kokkos::StaticCrsGraph< ordinal_type , layout_type , space_type , memory_traits_type > dView ; + typedef Kokkos::StaticCrsGraph + dView; #endif - typedef typename dView::HostMirror hView ; + typedef typename dView::HostMirror hView; - dView dx ; + dView dx; - // StaticCrsGraph with Unmanaged trait will contain row_map and entries members - // with the Unmanaged memory trait. - // Use of such a StaticCrsGraph requires an allocaton of memory for the unmanaged views - // to wrap. + // StaticCrsGraph with Unmanaged trait will contain row_map and entries + // members with the Unmanaged memory trait. Use of such a StaticCrsGraph + // requires an allocaton of memory for the unmanaged views to wrap. // // In this test, a graph (via raw arrays) resides on the host. - // The pointers are wrapped by unmanaged Views. - // To make use of this on the device, managed device Views are created (allocation required), - // and data from the unmanaged host views is deep copied to the device Views - // Unmanaged views of the appropriate type wrap the device data and are assigned to - // their corresponding unmanaged view members of the unmanaged StaticCrsGraph + // The pointers are wrapped by unmanaged Views. + // To make use of this on the device, managed device Views are created + // (allocation required), and data from the unmanaged host views is deep + // copied to the device Views Unmanaged views of the appropriate type wrap the + // device data and are assigned to their corresponding unmanaged view members + // of the unmanaged StaticCrsGraph // Data types for raw pointers storing StaticCrsGraph info typedef typename dView::size_type ptr_row_map_type; typedef typename dView::data_type ptr_entries_type; const ordinal_type numRows = 8; - const ordinal_type nnz = 24; - ptr_row_map_type ptrRaw[] = {0, 4, 8, 10, 12, 14, 16, 20, 24}; - ptr_entries_type indRaw[] = {0, 1, 4, 5, 0, 1, 4, 5, 2, 3, 2, 3, 4, 5, 4, 5, 2, 3, 6, 7, 2, 3, 6, 7}; + const ordinal_type nnz = 24; + ptr_row_map_type ptrRaw[] = {0, 4, 8, 10, 12, 14, 16, 20, 24}; + ptr_entries_type indRaw[] = {0, 1, 4, 5, 0, 1, 4, 5, 2, 3, 2, 3, + 4, 5, 4, 5, 2, 3, 6, 7, 2, 3, 6, 7}; // Wrap pointers in unmanaged host views - typedef typename hView::row_map_type local_row_map_type ; - typedef typename hView::entries_type local_entries_type ; - local_row_map_type unman_row_map( &(ptrRaw[0]) , numRows+1 ); - local_entries_type unman_entries( &(indRaw[0]) , nnz ); + typedef typename hView::row_map_type local_row_map_type; + typedef typename hView::entries_type local_entries_type; + local_row_map_type unman_row_map(&(ptrRaw[0]), numRows + 1); + local_entries_type unman_entries(&(indRaw[0]), nnz); - hView hx ; - hx = hView( unman_entries, unman_row_map ); + hView hx; + hx = hView(unman_entries, unman_row_map); // Create the device Views for copying the host arrays into - // An allocation is needed on the device for the unmanaged StaticCrsGraph to wrap the pointer - typedef typename Kokkos::View< ptr_row_map_type*, layout_type, space_type > d_row_map_view_type; - typedef typename Kokkos::View< ptr_entries_type*, layout_type, space_type > d_entries_view_type; + // An allocation is needed on the device for the unmanaged StaticCrsGraph to + // wrap the pointer + typedef typename Kokkos::View + d_row_map_view_type; + typedef typename Kokkos::View + d_entries_view_type; - d_row_map_view_type tmp_row_map( "tmp_row_map", numRows+1 ); - d_entries_view_type tmp_entries( "tmp_entries", nnz ); + d_row_map_view_type tmp_row_map("tmp_row_map", numRows + 1); + d_entries_view_type tmp_entries("tmp_entries", nnz); - Kokkos::deep_copy (tmp_row_map, unman_row_map); - Kokkos::deep_copy (tmp_entries, unman_entries); + Kokkos::deep_copy(tmp_row_map, unman_row_map); + Kokkos::deep_copy(tmp_entries, unman_entries); - // Wrap the pointer in unmanaged View and assign to the corresponding StaticCrsGraph member - dx.row_map = typename dView::row_map_type(tmp_row_map.data(), numRows+1); + // Wrap the pointer in unmanaged View and assign to the corresponding + // StaticCrsGraph member + dx.row_map = typename dView::row_map_type(tmp_row_map.data(), numRows + 1); dx.entries = typename dView::entries_type(tmp_entries.data(), nnz); - ASSERT_TRUE((std::is_same< typename dView::row_map_type::memory_traits , Kokkos::MemoryUnmanaged >::value)); - ASSERT_TRUE((std::is_same< typename dView::entries_type::memory_traits , Kokkos::MemoryUnmanaged >::value)); - ASSERT_TRUE((std::is_same< typename hView::row_map_type::memory_traits , Kokkos::MemoryUnmanaged >::value)); - ASSERT_TRUE((std::is_same< typename hView::entries_type::memory_traits , Kokkos::MemoryUnmanaged >::value)); + ASSERT_TRUE((std::is_same::value)); + ASSERT_TRUE((std::is_same::value)); + ASSERT_TRUE((std::is_same::value)); + ASSERT_TRUE((std::is_same::value)); } } /* namespace TestStaticCrsGraph */ -TEST_F( TEST_CATEGORY , staticcrsgraph ) -{ - TestStaticCrsGraph::run_test_graph< TEST_EXECSPACE >(); - TestStaticCrsGraph::run_test_graph2< TEST_EXECSPACE >(); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(1, 0); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(1, 1000); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(1, 10000); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(1, 100000); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(3, 0); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(3, 1000); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(3, 10000); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(3, 100000); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(75, 0); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(75, 1000); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(75, 10000); - TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(75, 100000); - TestStaticCrsGraph::run_test_graph4< TEST_EXECSPACE >(); -} +TEST(TEST_CATEGORY, staticcrsgraph) { + TestStaticCrsGraph::run_test_graph(); + TestStaticCrsGraph::run_test_graph2(); + TestStaticCrsGraph::run_test_graph3(1, 0); + TestStaticCrsGraph::run_test_graph3(1, 1000); + TestStaticCrsGraph::run_test_graph3(1, 10000); + TestStaticCrsGraph::run_test_graph3(1, 100000); + TestStaticCrsGraph::run_test_graph3(3, 0); + TestStaticCrsGraph::run_test_graph3(3, 1000); + TestStaticCrsGraph::run_test_graph3(3, 10000); + TestStaticCrsGraph::run_test_graph3(3, 100000); + TestStaticCrsGraph::run_test_graph3(75, 0); + TestStaticCrsGraph::run_test_graph3(75, 1000); + TestStaticCrsGraph::run_test_graph3(75, 10000); + TestStaticCrsGraph::run_test_graph3(75, 100000); + TestStaticCrsGraph::run_test_graph4(); } +} // namespace Test diff --git a/lib/kokkos/containers/unit_tests/TestUnorderedMap.hpp b/lib/kokkos/containers/unit_tests/TestUnorderedMap.hpp index 2d34267df3..82782d3bf4 100644 --- a/lib/kokkos/containers/unit_tests/TestUnorderedMap.hpp +++ b/lib/kokkos/containers/unit_tests/TestUnorderedMap.hpp @@ -1,10 +1,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -51,8 +52,7 @@ namespace Test { namespace Impl { template -struct TestInsert -{ +struct TestInsert { typedef MapType map_type; typedef typename map_type::execution_space execution_space; typedef uint32_t value_type; @@ -61,14 +61,10 @@ struct TestInsert uint32_t inserts; uint32_t collisions; - TestInsert( map_type arg_map, uint32_t arg_inserts, uint32_t arg_collisions) - : map(arg_map) - , inserts(arg_inserts) - , collisions(arg_collisions) - {} + TestInsert(map_type arg_map, uint32_t arg_inserts, uint32_t arg_collisions) + : map(arg_map), inserts(arg_inserts), collisions(arg_collisions) {} - void testit( bool rehash_on_fail = true ) - { + void testit(bool rehash_on_fail = true) { execution_space().fence(); uint32_t failed_count = 0; @@ -77,138 +73,127 @@ struct TestInsert Kokkos::parallel_reduce(inserts, *this, failed_count); if (rehash_on_fail && failed_count > 0u) { - const uint32_t new_capacity = map.capacity() + ((map.capacity()*3ull)/20u) + failed_count/collisions ; - map.rehash( new_capacity ); + const uint32_t new_capacity = map.capacity() + + ((map.capacity() * 3ull) / 20u) + + failed_count / collisions; + map.rehash(new_capacity); } } while (rehash_on_fail && failed_count > 0u); execution_space().fence(); } + KOKKOS_INLINE_FUNCTION + void init(value_type &failed_count) const { failed_count = 0; } KOKKOS_INLINE_FUNCTION - void init( value_type & failed_count ) const { failed_count = 0; } - - KOKKOS_INLINE_FUNCTION - void join( volatile value_type & failed_count, const volatile value_type & count ) const - { failed_count += count; } - - KOKKOS_INLINE_FUNCTION - void operator()(uint32_t i, value_type & failed_count) const - { - const uint32_t key = Near ? i/collisions : i%(inserts/collisions); - if (map.insert(key,i).failed()) ++failed_count; + void join(volatile value_type &failed_count, + const volatile value_type &count) const { + failed_count += count; } + KOKKOS_INLINE_FUNCTION + void operator()(uint32_t i, value_type &failed_count) const { + const uint32_t key = Near ? i / collisions : i % (inserts / collisions); + if (map.insert(key, i).failed()) ++failed_count; + } }; - template - struct TestErase - { - typedef TestErase self_type; +template +struct TestErase { + typedef TestErase self_type; - typedef MapType map_type; - typedef typename MapType::execution_space execution_space; + typedef MapType map_type; + typedef typename MapType::execution_space execution_space; - map_type m_map; - uint32_t m_num_erase; - uint32_t m_num_duplicates; + map_type m_map; + uint32_t m_num_erase; + uint32_t m_num_duplicates; - TestErase(map_type map, uint32_t num_erases, uint32_t num_duplicates) - : m_map(map) - , m_num_erase(num_erases) - , m_num_duplicates(num_duplicates) - {} + TestErase(map_type map, uint32_t num_erases, uint32_t num_duplicates) + : m_map(map), m_num_erase(num_erases), m_num_duplicates(num_duplicates) {} - void testit() - { - execution_space().fence(); - Kokkos::parallel_for(m_num_erase, *this); - execution_space().fence(); + void testit() { + execution_space().fence(); + Kokkos::parallel_for(m_num_erase, *this); + execution_space().fence(); + } + + KOKKOS_INLINE_FUNCTION + void operator()(typename execution_space::size_type i) const { + if (Near) { + m_map.erase(i / m_num_duplicates); + } else { + m_map.erase(i % (m_num_erase / m_num_duplicates)); } + } +}; - KOKKOS_INLINE_FUNCTION - void operator()(typename execution_space::size_type i) const - { - if (Near) { - m_map.erase(i/m_num_duplicates); - } - else { - m_map.erase(i%(m_num_erase/m_num_duplicates)); - } +template +struct TestFind { + typedef MapType map_type; + typedef typename MapType::execution_space::execution_space execution_space; + typedef uint32_t value_type; - } - }; + map_type m_map; + uint32_t m_num_insert; + uint32_t m_num_duplicates; + uint32_t m_max_key; - template - struct TestFind - { - typedef MapType map_type; - typedef typename MapType::execution_space::execution_space execution_space; - typedef uint32_t value_type; + TestFind(map_type map, uint32_t num_inserts, uint32_t num_duplicates) + : m_map(map), + m_num_insert(num_inserts), + m_num_duplicates(num_duplicates), + m_max_key(((num_inserts + num_duplicates) - 1) / num_duplicates) {} - map_type m_map; - uint32_t m_num_insert; - uint32_t m_num_duplicates; - uint32_t m_max_key; + void testit(value_type &errors) { + execution_space().fence(); + Kokkos::parallel_reduce(m_map.capacity(), *this, errors); + execution_space().fence(); + } - TestFind(map_type map, uint32_t num_inserts, uint32_t num_duplicates) - : m_map(map) - , m_num_insert(num_inserts) - , m_num_duplicates(num_duplicates) - , m_max_key( ((num_inserts + num_duplicates) - 1)/num_duplicates ) - {} + KOKKOS_INLINE_FUNCTION + static void init(value_type &dst) { dst = 0; } - void testit(value_type &errors) - { - execution_space().fence(); - Kokkos::parallel_reduce(m_map.capacity(), *this, errors); - execution_space().fence(); - } + KOKKOS_INLINE_FUNCTION + static void join(volatile value_type &dst, const volatile value_type &src) { + dst += src; + } - KOKKOS_INLINE_FUNCTION - static void init( value_type & dst) - { - dst = 0; - } + KOKKOS_INLINE_FUNCTION + void operator()(typename execution_space::size_type i, + value_type &errors) const { + const bool expect_to_find_i = (i < m_max_key); - KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & dst, const volatile value_type & src) - { dst += src; } - - KOKKOS_INLINE_FUNCTION - void operator()(typename execution_space::size_type i, value_type & errors) const - { - const bool expect_to_find_i = (i < m_max_key); - - const bool exists = m_map.exists(i); - - if (expect_to_find_i && !exists) ++errors; - if (!expect_to_find_i && exists) ++errors; - } - }; - -} // namespace Impl + const bool exists = m_map.exists(i); + if (expect_to_find_i && !exists) ++errors; + if (!expect_to_find_i && exists) ++errors; + } +}; +} // namespace Impl template -void test_insert( uint32_t num_nodes , uint32_t num_inserts , uint32_t num_duplicates , bool near ) -{ - typedef Kokkos::UnorderedMap map_type; - typedef Kokkos::UnorderedMap const_map_type; +void test_insert(uint32_t num_nodes, uint32_t num_inserts, + uint32_t num_duplicates, bool near) { + typedef Kokkos::UnorderedMap map_type; + typedef Kokkos::UnorderedMap + const_map_type; - const uint32_t expected_inserts = (num_inserts + num_duplicates -1u) / num_duplicates; + const uint32_t expected_inserts = + (num_inserts + num_duplicates - 1u) / num_duplicates; map_type map; - map.rehash(num_nodes,false); + map.rehash(num_nodes, false); if (near) { - Impl::TestInsert test_insert(map, num_inserts, num_duplicates); + Impl::TestInsert test_insert(map, num_inserts, + num_duplicates); test_insert.testit(); - } else - { - Impl::TestInsert test_insert(map, num_inserts, num_duplicates); + } else { + Impl::TestInsert test_insert(map, num_inserts, + num_duplicates); test_insert.testit(); } @@ -220,19 +205,21 @@ void test_insert( uint32_t num_nodes , uint32_t num_inserts , uint32_t num_dupli const uint32_t map_size = map.size(); - ASSERT_FALSE( map.failed_insert()); + ASSERT_FALSE(map.failed_insert()); { EXPECT_EQ(expected_inserts, map_size); { uint32_t find_errors = 0; - Impl::TestFind test_find(map, num_inserts, num_duplicates); + Impl::TestFind test_find(map, num_inserts, + num_duplicates); test_find.testit(find_errors); - EXPECT_EQ( 0u, find_errors); + EXPECT_EQ(0u, find_errors); } map.begin_erase(); - Impl::TestErase test_erase(map, num_inserts, num_duplicates); + Impl::TestErase test_erase(map, num_inserts, + num_duplicates); test_erase.testit(); map.end_erase(); EXPECT_EQ(0u, map.size()); @@ -240,56 +227,53 @@ void test_insert( uint32_t num_nodes , uint32_t num_inserts , uint32_t num_dupli } template -void test_failed_insert( uint32_t num_nodes) -{ - typedef Kokkos::UnorderedMap map_type; +void test_failed_insert(uint32_t num_nodes) { + typedef Kokkos::UnorderedMap map_type; map_type map(num_nodes); - Impl::TestInsert test_insert(map, 2u*num_nodes, 1u); + Impl::TestInsert test_insert(map, 2u * num_nodes, 1u); test_insert.testit(false /*don't rehash on fail*/); typename Device::execution_space().fence(); - EXPECT_TRUE( map.failed_insert() ); + EXPECT_TRUE(map.failed_insert()); } - - template -void test_deep_copy( uint32_t num_nodes ) -{ - typedef Kokkos::UnorderedMap map_type; - typedef Kokkos::UnorderedMap const_map_type; +void test_deep_copy(uint32_t num_nodes) { + typedef Kokkos::UnorderedMap map_type; + typedef Kokkos::UnorderedMap + const_map_type; - typedef typename map_type::HostMirror host_map_type ; - // typedef Kokkos::UnorderedMap host_map_type; + typedef typename map_type::HostMirror host_map_type; + // typedef Kokkos::UnorderedMap host_map_type; map_type map; - map.rehash(num_nodes,false); + map.rehash(num_nodes, false); { Impl::TestInsert test_insert(map, num_nodes, 1); test_insert.testit(); - ASSERT_EQ( map.size(), num_nodes); - ASSERT_FALSE( map.failed_insert() ); + ASSERT_EQ(map.size(), num_nodes); + ASSERT_FALSE(map.failed_insert()); { uint32_t find_errors = 0; Impl::TestFind test_find(map, num_nodes, 1); test_find.testit(find_errors); - EXPECT_EQ( find_errors, 0u); + EXPECT_EQ(find_errors, 0u); } - } host_map_type hmap; Kokkos::deep_copy(hmap, map); - ASSERT_EQ( map.size(), hmap.size()); - ASSERT_EQ( map.capacity(), hmap.capacity()); + ASSERT_EQ(map.size(), hmap.size()); + ASSERT_EQ(map.capacity(), hmap.capacity()); { uint32_t find_errors = 0; Impl::TestFind test_find(hmap, num_nodes, 1); test_find.testit(find_errors); - EXPECT_EQ( find_errors, 0u); + EXPECT_EQ(find_errors, 0u); } map_type mmap; @@ -297,35 +281,31 @@ void test_deep_copy( uint32_t num_nodes ) const_map_type cmap = mmap; - EXPECT_EQ( cmap.size(), num_nodes); + EXPECT_EQ(cmap.size(), num_nodes); { uint32_t find_errors = 0; Impl::TestFind test_find(cmap, num_nodes, 1); test_find.testit(find_errors); - EXPECT_EQ( find_errors, 0u); + EXPECT_EQ(find_errors, 0u); } - } -TEST_F( TEST_CATEGORY, UnorderedMap_insert) { - for (int i=0; i<500; ++i) { +TEST(TEST_CATEGORY, UnorderedMap_insert) { + for (int i = 0; i < 500; ++i) { test_insert(100000, 90000, 100, true); test_insert(100000, 90000, 100, false); } } -TEST_F( TEST_CATEGORY, UnorderedMap_failed_insert) { - for (int i=0; i<1000; ++i) - test_failed_insert(10000); +TEST(TEST_CATEGORY, UnorderedMap_failed_insert) { + for (int i = 0; i < 1000; ++i) test_failed_insert(10000); } -TEST_F( TEST_CATEGORY, UnorderedMap_deep_copy) { - for (int i=0; i<2; ++i) - test_deep_copy(10000); +TEST(TEST_CATEGORY, UnorderedMap_deep_copy) { + for (int i = 0; i < 2; ++i) test_deep_copy(10000); } -} // namespace Test - -#endif //KOKKOS_TEST_UNORDERED_MAP_HPP +} // namespace Test +#endif // KOKKOS_TEST_UNORDERED_MAP_HPP diff --git a/lib/kokkos/containers/unit_tests/TestVector.hpp b/lib/kokkos/containers/unit_tests/TestVector.hpp index b766ae8718..4174a477c4 100644 --- a/lib/kokkos/containers/unit_tests/TestVector.hpp +++ b/lib/kokkos/containers/unit_tests/TestVector.hpp @@ -1,10 +1,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -52,85 +53,193 @@ namespace Test { namespace Impl { - template - struct test_vector_combinations - { - typedef test_vector_combinations self_type; +template +struct test_vector_insert { + typedef Scalar scalar_type; + typedef Device execution_space; - typedef Scalar scalar_type; - typedef Device execution_space; + template + void run_test(Vector& a) { + int n = a.size(); - Scalar reference; - Scalar result; + auto it = a.begin(); + it += 15; + ASSERT_EQ(*it, scalar_type(1)); - template - Scalar run_me(unsigned int n){ - Vector a(n,1); + auto it_return = a.insert(it, scalar_type(3)); + ASSERT_EQ(a.size(), n + 1); + ASSERT_EQ(std::distance(it_return, a.begin() + 15), 0); + it = a.begin(); + it += 17; +// Looks like some std::vector implementations do not have the restriction +// right on the overload taking three iterators, and thus the following call +// will hit that overload and then fail to compile. +#if defined(KOKKOS_COMPILER_INTEL) && (1700 > KOKKOS_COMPILER_INTEL) +// And at least GCC 4.8.4 doesn't implement vector insert correct for C++11 +// Return type is void ... +#if (__GNUC__ < 5) + a.insert(it, typename Vector::size_type(n + 5), scalar_type(5)); + it_return = a.begin() + 17; +#else + it_return = a.insert(it, typename Vector::size_type(n + 5), scalar_type(5)); +#endif +#else +#if (__GNUC__ < 5) + a.insert(it, n + 5, scalar_type(5)); + it_return = a.begin() + 17; +#else + it_return = a.insert(it, n + 5, scalar_type(5)); +#endif +#endif - a.push_back(2); - a.resize(n+4); - a[n+1] = 3; - a[n+2] = 4; - a[n+3] = 5; + ASSERT_EQ(a.size(), n + 1 + n + 5); + ASSERT_EQ(std::distance(it_return, a.begin() + 17), 0); + Vector b; - Scalar temp1 = a[2]; - Scalar temp2 = a[n]; - Scalar temp3 = a[n+1]; +// Looks like some std::vector implementations do not have the restriction +// right on the overload taking three iterators, and thus the following call +// will hit that overload and then fail to compile. +#if defined(KOKKOS_COMPILER_INTEL) && (1700 > KOKKOS_COMPILER_INTEL) + b.insert(b.begin(), typename Vector::size_type(7), 9); +#else + b.insert(b.begin(), 7, 9); +#endif + ASSERT_EQ(b.size(), 7); + ASSERT_EQ(b[0], scalar_type(9)); - a.assign(n+2,-1); + it = a.begin(); + it += 27 + n; +#if (__GNUC__ < 5) + a.insert(it, b.begin(), b.end()); + it_return = a.begin() + (27 + n); +#else + it_return = a.insert(it, b.begin(), b.end()); +#endif + ASSERT_EQ(a.size(), n + 1 + n + 5 + 7); + ASSERT_EQ(std::distance(it_return, a.begin() + 27 + n), 0); - a[2] = temp1; - a[n] = temp2; - a[n+1] = temp3; + // Testing insert at end via all three function interfaces + a.insert(a.end(), 11); +#if defined(KOKKOS_COMPILER_INTEL) && (1700 > KOKKOS_COMPILER_INTEL) + a.insert(a.end(), typename Vector::size_type(2), 12); +#else + a.insert(a.end(), 2, 12); +#endif + a.insert(a.end(), b.begin(), b.end()); + } - Scalar test1 = 0; - for(unsigned int i=0; i + void check_test(Vector& a, int n) { + for (int i = 0; i < (int)a.size(); i++) { + if (i == 15) + ASSERT_EQ(a[i], scalar_type(3)); + else if (i > 16 && i < 16 + 6 + n) + ASSERT_EQ(a[i], scalar_type(5)); + else if (i > 26 + n && i < 34 + n) + ASSERT_EQ(a[i], scalar_type(9)); + else if (i == (int)a.size() - 10) + ASSERT_EQ(a[i], scalar_type(11)); + else if ((i == (int)a.size() - 9) || (i == (int)a.size() - 8)) + ASSERT_EQ(a[i], scalar_type(12)); + else if (i > (int)a.size() - 8) + ASSERT_EQ(a[i], scalar_type(9)); + else + ASSERT_EQ(a[i], scalar_type(1)); } + } - - test_vector_combinations(unsigned int size) + test_vector_insert(unsigned int size) { { - reference = run_me >(size); - result = run_me >(size); + std::vector a(size, scalar_type(1)); + run_test(a); + check_test(a, size); } + { + Kokkos::vector a(size, scalar_type(1)); + a.sync_device(); + run_test(a); + a.sync_host(); + check_test(a, size); + } + { + Kokkos::vector a(size, scalar_type(1)); + a.sync_host(); + run_test(a); + check_test(a, size); + } + } +}; - }; +template +struct test_vector_combinations { + typedef test_vector_combinations self_type; -} // namespace Impl + typedef Scalar scalar_type; + typedef Device execution_space; + Scalar reference; + Scalar result; + template + Scalar run_me(unsigned int n) { + Vector a(n, 1); + a.push_back(2); + a.resize(n + 4); + a[n + 1] = 3; + a[n + 2] = 4; + a[n + 3] = 5; + + Scalar temp1 = a[2]; + Scalar temp2 = a[n]; + Scalar temp3 = a[n + 1]; + + a.assign(n + 2, -1); + + a[2] = temp1; + a[n] = temp2; + a[n + 1] = temp3; + + Scalar test1 = 0; + for (unsigned int i = 0; i < a.size(); i++) test1 += a[i]; + + a.assign(n + 1, -2); + Scalar test2 = 0; + for (unsigned int i = 0; i < a.size(); i++) test2 += a[i]; + + a.reserve(n + 10); + + Scalar test3 = 0; + for (unsigned int i = 0; i < a.size(); i++) test3 += a[i]; + + return (test1 * test2 + test3) * test2 + test1 * test3; + } + + test_vector_combinations(unsigned int size) { + reference = run_me >(size); + result = run_me >(size); + } +}; + +} // namespace Impl template -void test_vector_combinations(unsigned int size) -{ - Impl::test_vector_combinations test(size); - ASSERT_EQ( test.reference, test.result); +void test_vector_combinations(unsigned int size) { + Impl::test_vector_combinations test(size); + ASSERT_EQ(test.reference, test.result); } -TEST_F( TEST_CATEGORY, vector_combination) { - test_vector_combinations(10); - test_vector_combinations(3057); +TEST(TEST_CATEGORY, vector_combination) { + test_vector_combinations(10); + test_vector_combinations(3057); } -} // namespace Test +TEST(TEST_CATEGORY, vector_insert) { + Impl::test_vector_insert(3057); +} -#endif //KOKKOS_TEST_UNORDERED_MAP_HPP +} // namespace Test +#endif // KOKKOS_TEST_UNORDERED_MAP_HPP diff --git a/lib/kokkos/containers/unit_tests/TestViewCtorPropEmbeddedDim.hpp b/lib/kokkos/containers/unit_tests/TestViewCtorPropEmbeddedDim.hpp index 2dd5c56cd9..6bac2ca9bd 100644 --- a/lib/kokkos/containers/unit_tests/TestViewCtorPropEmbeddedDim.hpp +++ b/lib/kokkos/containers/unit_tests/TestViewCtorPropEmbeddedDim.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -55,63 +56,58 @@ namespace Test { namespace { -template +template struct TestViewCtorProp_EmbeddedDim { + using ViewIntType = typename Kokkos::View; + using ViewDoubleType = typename Kokkos::View; - using ViewIntType = typename Kokkos::View< int**, ExecSpace >; - using ViewDoubleType = typename Kokkos::View< double*, ExecSpace >; + using DynRankViewIntType = typename Kokkos::DynRankView; + using DynRankViewDoubleType = typename Kokkos::DynRankView; - using DynRankViewIntType = typename Kokkos::DynRankView< int, ExecSpace >; - using DynRankViewDoubleType = typename Kokkos::DynRankView< double, ExecSpace >; - - // Cuda 7.0 has issues with using a lambda in parallel_for to initialize the view - replace with this functor - template < class ViewType > + // Cuda 7.0 has issues with using a lamda in parallel_for to initialize the + // view - replace with this functor + template struct Functor { - ViewType v; - Functor( const ViewType & v_ ) : v(v_) {} + Functor(const ViewType& v_) : v(v_) {} KOKKOS_INLINE_FUNCTION - void operator()( const int i ) const { - v(i) = i; - } - + void operator()(const int i) const { v(i) = i; } }; - - static void test_vcpt( const int N0, const int N1 ) - { - + static void test_vcpt(const int N0, const int N1) { // Create two views to test { - using VIT = typename TestViewCtorProp_EmbeddedDim::ViewIntType ; - using VDT = typename TestViewCtorProp_EmbeddedDim::ViewDoubleType ; + using VIT = typename TestViewCtorProp_EmbeddedDim::ViewIntType; + using VDT = typename TestViewCtorProp_EmbeddedDim::ViewDoubleType; VIT vi1("vi1", N0, N1); VDT vd1("vd1", N0); - // TEST: Test for common type between two views, one with type double, other with type int - // Deduce common value_type and construct a view with that type + // TEST: Test for common type between two views, one with type double, + // other with type int Deduce common value_type and construct a view with + // that type { // Two views auto view_alloc_arg = Kokkos::common_view_alloc_prop(vi1, vd1); - typedef typename decltype( view_alloc_arg )::value_type CommonViewValueType; - typedef typename Kokkos::View< CommonViewValueType*, ExecSpace > CVT; - typedef typename CVT::HostMirror HostCVT; + typedef + typename decltype(view_alloc_arg)::value_type CommonViewValueType; + typedef typename Kokkos::View CVT; + typedef typename CVT::HostMirror HostCVT; - // Construct View using the common type; for case of specialization, an 'embedded_dim' would be stored by view_alloc_arg - CVT cv1( Kokkos::view_alloc( "cv1", view_alloc_arg ), N0*N1 ); + // Construct View using the common type; for case of specialization, an + // 'embedded_dim' would be stored by view_alloc_arg + CVT cv1(Kokkos::view_alloc("cv1", view_alloc_arg), N0 * N1); - Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace >(0, N0*N1), - Functor(cv1) - ); + Kokkos::parallel_for(Kokkos::RangePolicy(0, N0 * N1), + Functor(cv1)); - HostCVT hcv1 = Kokkos::create_mirror_view( cv1 ); - Kokkos::deep_copy( hcv1, cv1 ); + HostCVT hcv1 = Kokkos::create_mirror_view(cv1); + Kokkos::deep_copy(hcv1, cv1); - ASSERT_EQ( (std::is_same< CommonViewValueType, double >::value) , true ) ; - #if 0 + ASSERT_EQ((std::is_same::value), true); +#if 0 // debug output for ( int i = 0; i < N0*N1; ++i ) { printf(" Output check: hcv1(%d) = %lf\n ", i, hcv1(i) ); @@ -126,91 +122,92 @@ struct TestViewCtorProp_EmbeddedDim { printf("WRONG common value_type\n"); } // end debug output - #endif +#endif } { // Single view auto view_alloc_arg = Kokkos::common_view_alloc_prop(vi1); - typedef typename decltype( view_alloc_arg )::value_type CommonViewValueType; - typedef typename Kokkos::View< CommonViewValueType*, ExecSpace > CVT; - typedef typename CVT::HostMirror HostCVT; + typedef + typename decltype(view_alloc_arg)::value_type CommonViewValueType; + typedef typename Kokkos::View CVT; + typedef typename CVT::HostMirror HostCVT; - // Construct View using the common type; for case of specialization, an 'embedded_dim' would be stored by view_alloc_arg - CVT cv1( Kokkos::view_alloc( "cv1", view_alloc_arg ), N0*N1 ); + // Construct View using the common type; for case of specialization, an + // 'embedded_dim' would be stored by view_alloc_arg + CVT cv1(Kokkos::view_alloc("cv1", view_alloc_arg), N0 * N1); - Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace >(0, N0*N1), - Functor(cv1) - ); + Kokkos::parallel_for(Kokkos::RangePolicy(0, N0 * N1), + Functor(cv1)); - HostCVT hcv1 = Kokkos::create_mirror_view( cv1 ); - Kokkos::deep_copy( hcv1, cv1 ); + HostCVT hcv1 = Kokkos::create_mirror_view(cv1); + Kokkos::deep_copy(hcv1, cv1); - ASSERT_EQ( (std::is_same< CommonViewValueType, int>::value) , true ) ; + ASSERT_EQ((std::is_same::value), true); } - } // Create two dynamic rank views to test { - using VIT = typename TestViewCtorProp_EmbeddedDim::DynRankViewIntType ; - using VDT = typename TestViewCtorProp_EmbeddedDim::DynRankViewDoubleType ; + using VIT = typename TestViewCtorProp_EmbeddedDim::DynRankViewIntType; + using VDT = typename TestViewCtorProp_EmbeddedDim::DynRankViewDoubleType; VIT vi1("vi1", N0, N1); VDT vd1("vd1", N0); - // TEST: Test for common type between two views, one with type double, other with type int - // Deduce common value_type and construct a view with that type + // TEST: Test for common type between two views, one with type double, + // other with type int Deduce common value_type and construct a view with + // that type { // Two views - auto view_alloc_arg = Kokkos::common_view_alloc_prop( vi1, vd1 ); - typedef typename decltype( view_alloc_arg )::value_type CommonViewValueType; - typedef typename Kokkos::View< CommonViewValueType*, ExecSpace > CVT; - typedef typename CVT::HostMirror HostCVT; + auto view_alloc_arg = Kokkos::common_view_alloc_prop(vi1, vd1); + typedef + typename decltype(view_alloc_arg)::value_type CommonViewValueType; + typedef typename Kokkos::View CVT; + typedef typename CVT::HostMirror HostCVT; - // Construct View using the common type; for case of specialization, an 'embedded_dim' would be stored by view_alloc_arg - CVT cv1( Kokkos::view_alloc( "cv1", view_alloc_arg ), N0*N1 ); + // Construct View using the common type; for case of specialization, an + // 'embedded_dim' would be stored by view_alloc_arg + CVT cv1(Kokkos::view_alloc("cv1", view_alloc_arg), N0 * N1); + Kokkos::parallel_for(Kokkos::RangePolicy(0, N0 * N1), + Functor(cv1)); - Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace >(0, N0*N1), - Functor(cv1) - ); + HostCVT hcv1 = Kokkos::create_mirror_view(cv1); + Kokkos::deep_copy(hcv1, cv1); - HostCVT hcv1 = Kokkos::create_mirror_view( cv1 ); - Kokkos::deep_copy( hcv1, cv1 ); - - ASSERT_EQ( (std::is_same< CommonViewValueType, double >::value) , true ) ; + ASSERT_EQ((std::is_same::value), true); } { // Single views - auto view_alloc_arg = Kokkos::common_view_alloc_prop( vi1 ); - typedef typename decltype( view_alloc_arg )::value_type CommonViewValueType; - typedef typename Kokkos::View< CommonViewValueType*, ExecSpace > CVT; - typedef typename CVT::HostMirror HostCVT; + auto view_alloc_arg = Kokkos::common_view_alloc_prop(vi1); + typedef + typename decltype(view_alloc_arg)::value_type CommonViewValueType; + typedef typename Kokkos::View CVT; + typedef typename CVT::HostMirror HostCVT; - // Construct View using the common type; for case of specialization, an 'embedded_dim' would be stored by view_alloc_arg - CVT cv1( Kokkos::view_alloc( "cv1", view_alloc_arg ), N0*N1 ); + // Construct View using the common type; for case of specialization, an + // 'embedded_dim' would be stored by view_alloc_arg + CVT cv1(Kokkos::view_alloc("cv1", view_alloc_arg), N0 * N1); - Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace >(0, N0*N1), - Functor(cv1) - ); + Kokkos::parallel_for(Kokkos::RangePolicy(0, N0 * N1), + Functor(cv1)); - HostCVT hcv1 = Kokkos::create_mirror_view( cv1 ); - Kokkos::deep_copy( hcv1, cv1 ); + HostCVT hcv1 = Kokkos::create_mirror_view(cv1); + Kokkos::deep_copy(hcv1, cv1); - ASSERT_EQ( (std::is_same< CommonViewValueType, int>::value) , true ) ; + ASSERT_EQ((std::is_same::value), true); } } + } // end test_vcpt - } // end test_vcpt +}; // end struct -}; // end struct +} // namespace -} // namespace - -TEST_F( TEST_CATEGORY, viewctorprop_embedded_dim ) { - TestViewCtorProp_EmbeddedDim< TEST_EXECSPACE >::test_vcpt( 2, 3 ); +TEST(TEST_CATEGORY, viewctorprop_embedded_dim) { + TestViewCtorProp_EmbeddedDim::test_vcpt(2, 3); } -} // namespace Test +} // namespace Test diff --git a/lib/kokkos/containers/unit_tests/UnitTestMain.cpp b/lib/kokkos/containers/unit_tests/UnitTestMain.cpp index 508b43efd8..e245aad35f 100644 --- a/lib/kokkos/containers/unit_tests/UnitTestMain.cpp +++ b/lib/kokkos/containers/unit_tests/UnitTestMain.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,14 +43,12 @@ */ #include -#include #include int main(int argc, char *argv[]) { - Kokkos::initialize(argc,argv); - ::testing::InitGoogleTest(&argc,argv); + Kokkos::initialize(argc, argv); + ::testing::InitGoogleTest(&argc, argv); int result = RUN_ALL_TESTS(); Kokkos::finalize(); return result; } - diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_BitSet.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_BitSet.cpp index 5f7bc684e6..5306ab3883 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_BitSet.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_BitSet.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_Category.hpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_Category.hpp index 3e0d142480..50935d7a34 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_Category.hpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_Category.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,21 +45,6 @@ #ifndef KOKKOS_TEST_CUDA_HPP #define KOKKOS_TEST_CUDA_HPP -#include - -namespace Test { - -class cuda : public ::testing::Test { -protected: - static void SetUpTestCase() { - } - - static void TearDownTestCase() { - } -}; - -} // namespace Test - #define TEST_CATEGORY cuda #define TEST_EXECSPACE Kokkos::Cuda diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_DualView.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_DualView.cpp index 1930293c3a..5641966db4 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_DualView.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_DualView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_generic.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_generic.cpp index 3d381b3fb6..609c8b41a5 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_generic.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_generic.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_rank12345.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_rank12345.cpp index 08d5b3957a..66d2d17e8b 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_rank12345.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_rank12345.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_rank67.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_rank67.cpp index a655491e81..19e248dd93 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_rank67.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynRankViewAPI_rank67.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynamicView.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynamicView.cpp index 1986fd7e92..9eccb05a25 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynamicView.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_DynamicView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_ErrorReporter.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_ErrorReporter.cpp index 22d8d15e03..806a3c6ecc 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_ErrorReporter.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_ErrorReporter.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_OffsetView.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_OffsetView.cpp index 546f6d603a..b2e851d099 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_OffsetView.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_OffsetView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_ScatterView.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_ScatterView.cpp index 9bd1bbab2c..10b63d037d 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_ScatterView.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_ScatterView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_StaticCrsGraph.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_StaticCrsGraph.cpp index b15abcf525..9c93da9c50 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_StaticCrsGraph.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_StaticCrsGraph.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_UnorderedMap.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_UnorderedMap.cpp index 881b20b575..b204e68977 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_UnorderedMap.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_UnorderedMap.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_Vector.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_Vector.cpp index cf0f2012dc..408d0c76fc 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_Vector.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_Vector.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/cuda/TestCuda_ViewCtorPropEmbeddedDim.cpp b/lib/kokkos/containers/unit_tests/cuda/TestCuda_ViewCtorPropEmbeddedDim.cpp index 7130195839..c865deb0b2 100644 --- a/lib/kokkos/containers/unit_tests/cuda/TestCuda_ViewCtorPropEmbeddedDim.cpp +++ b/lib/kokkos/containers/unit_tests/cuda/TestCuda_ViewCtorPropEmbeddedDim.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_BitSet.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_BitSet.cpp index cec24e00c7..179cfcc7b4 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_BitSet.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_BitSet.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_Category.hpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_Category.hpp index 358b42d1aa..64fc7c0757 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_Category.hpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_Category.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,21 +45,6 @@ #ifndef KOKKOS_TEST_HPX_HPP #define KOKKOS_TEST_HPX_HPP -#include - -namespace Test { - -class hpx : public ::testing::Test { -protected: - static void SetUpTestCase() { - } - - static void TearDownTestCase() { - } -}; - -} // namespace Test - #define TEST_CATEGORY hpx #define TEST_EXECSPACE Kokkos::Experimental::HPX diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_DualView.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_DualView.cpp index 80af9dc33a..368cdde95c 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_DualView.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_DualView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_generic.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_generic.cpp index 95d49c8acf..778bd891d6 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_generic.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_generic.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank12345.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank12345.cpp index 72e0bc6616..0bb77a266d 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank12345.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank12345.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank67.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank67.cpp index 5a104f0de2..6594cb3213 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank67.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank67.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynamicView.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynamicView.cpp index 718b322684..c1efc778a6 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynamicView.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_DynamicView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_ErrorReporter.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_ErrorReporter.cpp index ea819ae343..3f68c6d07f 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_ErrorReporter.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_ErrorReporter.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_OffsetView.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_OffsetView.cpp index 4d3684923f..1719300228 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_OffsetView.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_OffsetView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_ScatterView.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_ScatterView.cpp index 6a871cc121..8f9eb05918 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_ScatterView.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_ScatterView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_StaticCrsGraph.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_StaticCrsGraph.cpp index fbb70a762b..4f513efb0f 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_StaticCrsGraph.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_StaticCrsGraph.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_UnorderedMap.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_UnorderedMap.cpp index 7e7aad309f..517135290a 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_UnorderedMap.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_UnorderedMap.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_Vector.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_Vector.cpp index 5fb3664197..d42cef4b28 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_Vector.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_Vector.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/hpx/TestHPX_ViewCtorPropEmbeddedDim.cpp b/lib/kokkos/containers/unit_tests/hpx/TestHPX_ViewCtorPropEmbeddedDim.cpp index fb9c263c83..de2e96be73 100644 --- a/lib/kokkos/containers/unit_tests/hpx/TestHPX_ViewCtorPropEmbeddedDim.cpp +++ b/lib/kokkos/containers/unit_tests/hpx/TestHPX_ViewCtorPropEmbeddedDim.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_BitSet.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_BitSet.cpp index 2f3a52787d..db11017159 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_BitSet.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_BitSet.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_Category.hpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_Category.hpp index 150173e4bf..a0169d1702 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_Category.hpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_Category.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,21 +45,6 @@ #ifndef KOKKOS_TEST_OPENMP_HPP #define KOKKOS_TEST_OPENMP_HPP -#include - -namespace Test { - -class openmp : public ::testing::Test { -protected: - static void SetUpTestCase() { - } - - static void TearDownTestCase() { - } -}; - -} // namespace Test - #define TEST_CATEGORY openmp #define TEST_EXECSPACE Kokkos::OpenMP diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DualView.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DualView.cpp index fd6b9ae707..ed4eb23a8b 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DualView.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DualView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_generic.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_generic.cpp index 066d8f9194..637be64dfa 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_generic.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_generic.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_rank12345.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_rank12345.cpp index f44e320eba..01b57a1690 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_rank12345.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_rank12345.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_rank67.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_rank67.cpp index 154243aec9..7d742eaeed 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_rank67.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynRankViewAPI_rank67.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynamicView.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynamicView.cpp index 7d9ead910f..75b616f168 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynamicView.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_DynamicView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ErrorReporter.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ErrorReporter.cpp index d05bf163bf..1f00f18532 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ErrorReporter.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ErrorReporter.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_OffsetView.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_OffsetView.cpp index 169dae3212..98531ff212 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_OffsetView.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_OffsetView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ScatterView.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ScatterView.cpp index 3adfcd8409..c49577f75d 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ScatterView.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ScatterView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_StaticCrsGraph.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_StaticCrsGraph.cpp index 486a51a0b9..d8ab7b6b21 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_StaticCrsGraph.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_StaticCrsGraph.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_UnorderedMap.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_UnorderedMap.cpp index 32dc22ec93..c3db0c0d88 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_UnorderedMap.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_UnorderedMap.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_Vector.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_Vector.cpp index 006caba816..7ac49f24fb 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_Vector.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_Vector.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ViewCtorPropEmbeddedDim.cpp b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ViewCtorPropEmbeddedDim.cpp index dbbf14cb5b..b9ae5d80ed 100644 --- a/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ViewCtorPropEmbeddedDim.cpp +++ b/lib/kokkos/containers/unit_tests/openmp/TestOpenMP_ViewCtorPropEmbeddedDim.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_BitSet.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_BitSet.cpp index 2c8657e464..c72077eb4c 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_BitSet.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_BitSet.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_Category.hpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_Category.hpp index d520bbc5a7..d37cd05db6 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_Category.hpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_Category.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,21 +45,6 @@ #ifndef KOKKOS_TEST_ROCM_HPP #define KOKKOS_TEST_ROCM_HPP -#include - -namespace Test { - -class rocm : public ::testing::Test { -protected: - static void SetUpTestCase() { - } - - static void TearDownTestCase() { - } -}; - -} // namespace Test - #define TEST_CATEGORY rocm #define TEST_EXECSPACE Kokkos::Experimental::ROCm diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_DualView.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_DualView.cpp index f60c6ade44..e9820395ba 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_DualView.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_DualView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_generic.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_generic.cpp index 80bfe06153..7a3dd65f0e 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_generic.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_generic.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_rank12345.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_rank12345.cpp index b42ce07e8f..3963dd9c9c 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_rank12345.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_rank12345.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_rank67.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_rank67.cpp index 0f47b800c6..b9a4582622 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_rank67.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynRankViewAPI_rank67.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynamicView.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynamicView.cpp index 5540eb2d20..285ed916c4 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynamicView.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_DynamicView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_ErrorReporter.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_ErrorReporter.cpp index 2c7a26c7fe..2af2f79a16 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_ErrorReporter.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_ErrorReporter.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_ScatterView.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_ScatterView.cpp index cc4a07ddbd..f7000bc99e 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_ScatterView.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_ScatterView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_StaticCrsGraph.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_StaticCrsGraph.cpp index be83d4ef50..bb1e04c536 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_StaticCrsGraph.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_StaticCrsGraph.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_UnorderedMap.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_UnorderedMap.cpp index f6b2f9ef40..7b8172fabd 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_UnorderedMap.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_UnorderedMap.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_Vector.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_Vector.cpp index e9073b6bb5..1759797487 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_Vector.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_Vector.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/rocm/TestROCm_ViewCtorPropEmbeddedDim.cpp b/lib/kokkos/containers/unit_tests/rocm/TestROCm_ViewCtorPropEmbeddedDim.cpp index dd472270e7..e95680445b 100644 --- a/lib/kokkos/containers/unit_tests/rocm/TestROCm_ViewCtorPropEmbeddedDim.cpp +++ b/lib/kokkos/containers/unit_tests/rocm/TestROCm_ViewCtorPropEmbeddedDim.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_BitSet.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_BitSet.cpp index 03edd30c34..322e88a6af 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_BitSet.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_BitSet.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_Category.hpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_Category.hpp index 858b669286..2aa09a315a 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_Category.hpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_Category.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,21 +45,6 @@ #ifndef KOKKOS_TEST_SERIAL_HPP #define KOKKOS_TEST_SERIAL_HPP -#include - -namespace Test { - -class serial : public ::testing::Test { -protected: - static void SetUpTestCase() { - } - - static void TearDownTestCase() { - } -}; - -} // namespace Test - #define TEST_CATEGORY serial #define TEST_EXECSPACE Kokkos::Serial diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_DualView.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_DualView.cpp index 0dac8eba87..c1646ed13b 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_DualView.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_DualView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_generic.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_generic.cpp index 1a5874e7fa..e8f577c6ac 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_generic.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_generic.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_rank12345.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_rank12345.cpp index df802bfe68..7db8983c1b 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_rank12345.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_rank12345.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_rank67.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_rank67.cpp index 84e5b452c4..a3a745efb5 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_rank67.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_DynRankViewAPI_rank67.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_DynamicView.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_DynamicView.cpp index 34f4002db2..6624e3aa07 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_DynamicView.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_DynamicView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_ErrorReporter.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_ErrorReporter.cpp index 326853f33a..280302275f 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_ErrorReporter.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_ErrorReporter.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_OffsetView.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_OffsetView.cpp index fadd748efb..5f8caf7c3f 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_OffsetView.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_OffsetView.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,6 +42,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_ScatterView.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_ScatterView.cpp index ee04d35584..3f102e5cbc 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_ScatterView.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_ScatterView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_StaticCrsGraph.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_StaticCrsGraph.cpp index 2d10ee70d2..64f09e76e5 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_StaticCrsGraph.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_StaticCrsGraph.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_UnorderedMap.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_UnorderedMap.cpp index e78667e8aa..a72be8e2fc 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_UnorderedMap.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_UnorderedMap.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_Vector.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_Vector.cpp index bf98055622..3826dab1d7 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_Vector.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_Vector.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/serial/TestSerial_ViewCtorPropEmbeddedDim.cpp b/lib/kokkos/containers/unit_tests/serial/TestSerial_ViewCtorPropEmbeddedDim.cpp index 143b1f1c2d..1251808bed 100644 --- a/lib/kokkos/containers/unit_tests/serial/TestSerial_ViewCtorPropEmbeddedDim.cpp +++ b/lib/kokkos/containers/unit_tests/serial/TestSerial_ViewCtorPropEmbeddedDim.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_BitSet.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_BitSet.cpp index 0dfe69fee2..ec93bb121c 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_BitSet.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_BitSet.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_Category.hpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_Category.hpp index c4d0ed6da2..74a2b0da36 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_Category.hpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_Category.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,21 +45,6 @@ #ifndef KOKKOS_TEST_THREADS_HPP #define KOKKOS_TEST_THREADS_HPP -#include - -namespace Test { - -class threads : public ::testing::Test { -protected: - static void SetUpTestCase() { - } - - static void TearDownTestCase() { - } -}; - -} // namespace Test - #define TEST_CATEGORY threads #define TEST_EXECSPACE Kokkos::Threads diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_DualView.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_DualView.cpp index 0ddafcd6fd..f6967bf0d4 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_DualView.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_DualView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_generic.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_generic.cpp index 0030673785..b015683bb9 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_generic.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_generic.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_rank12345.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_rank12345.cpp index db39db38b3..dea56c408b 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_rank12345.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_rank12345.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_rank67.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_rank67.cpp index 1d1f94d6cf..17a289b506 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_rank67.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_DynRankViewAPI_rank67.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_DynamicView.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_DynamicView.cpp index 61616a5132..499321dbbe 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_DynamicView.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_DynamicView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_ErrorReporter.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_ErrorReporter.cpp index a64c3f4082..513fdc4af6 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_ErrorReporter.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_ErrorReporter.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_OffsetView.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_OffsetView.cpp index d1eaa265e3..717967b2ef 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_OffsetView.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_OffsetView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_ScatterView.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_ScatterView.cpp index 6c7138058d..fbb37606ea 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_ScatterView.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_ScatterView.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_StaticCrsGraph.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_StaticCrsGraph.cpp index f6a1204dd3..29117c4ef6 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_StaticCrsGraph.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_StaticCrsGraph.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_UnorderedMap.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_UnorderedMap.cpp index 2f3aeedae0..9a06288de4 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_UnorderedMap.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_UnorderedMap.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_Vector.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_Vector.cpp index a497d43772..33e8b26c8e 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_Vector.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_Vector.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/containers/unit_tests/threads/TestThreads_ViewCtorPropEmbeddedDim.cpp b/lib/kokkos/containers/unit_tests/threads/TestThreads_ViewCtorPropEmbeddedDim.cpp index 89f85dca56..567b224195 100644 --- a/lib/kokkos/containers/unit_tests/threads/TestThreads_ViewCtorPropEmbeddedDim.cpp +++ b/lib/kokkos/containers/unit_tests/threads/TestThreads_ViewCtorPropEmbeddedDim.cpp @@ -3,10 +3,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -24,10 +25,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,6 +43,5 @@ //@HEADER */ -#include -#include - +#include +#include diff --git a/lib/kokkos/core/CMakeLists.txt b/lib/kokkos/core/CMakeLists.txt index 93db0d2ecf..8df72dfc90 100644 --- a/lib/kokkos/core/CMakeLists.txt +++ b/lib/kokkos/core/CMakeLists.txt @@ -1,13 +1,12 @@ - - -TRIBITS_SUBPACKAGE(Core) - -IF(KOKKOS_HAS_TRILINOS) - ADD_SUBDIRECTORY(src) -ENDIF() - -TRIBITS_ADD_TEST_DIRECTORIES(unit_test) -TRIBITS_ADD_TEST_DIRECTORIES(perf_test) - -TRIBITS_SUBPACKAGE_POSTPROCESS() - + + +KOKKOS_SUBPACKAGE(Core) + +ADD_SUBDIRECTORY(src) + +KOKKOS_ADD_TEST_DIRECTORIES(unit_test) +KOKKOS_ADD_TEST_DIRECTORIES(perf_test) + +KOKKOS_SUBPACKAGE_POSTPROCESS() + + diff --git a/lib/kokkos/core/cmake/KokkosCore_config.h.in b/lib/kokkos/core/cmake/KokkosCore_config.h.in index b2c80207d4..f430c2b5f6 100644 --- a/lib/kokkos/core/cmake/KokkosCore_config.h.in +++ b/lib/kokkos/core/cmake/KokkosCore_config.h.in @@ -13,8 +13,7 @@ #cmakedefine KOKKOS_ENABLE_CUDA #cmakedefine KOKKOS_ENABLE_OPENMP -#cmakedefine KOKKOS_ENABLE_PTHREAD -#cmakedefine KOKKOS_ENABLE_QTHREADS +#cmakedefine KOKKOS_ENABLE_THREADS #cmakedefine KOKKOS_ENABLE_SERIAL #cmakedefine KOKKOS_ENABLE_Winthread diff --git a/lib/kokkos/core/perf_test/CMakeLists.txt b/lib/kokkos/core/perf_test/CMakeLists.txt index d92462a357..79567835ee 100644 --- a/lib/kokkos/core/perf_test/CMakeLists.txt +++ b/lib/kokkos/core/perf_test/CMakeLists.txt @@ -1,59 +1,71 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}) +#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +#INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}) -IF(NOT KOKKOS_HAS_TRILINOS) - IF(KOKKOS_SEPARATE_LIBS) - set(TEST_LINK_TARGETS kokkoscore) - ELSE() - set(TEST_LINK_TARGETS kokkos) - ENDIF() -ENDIF() # warning: PerfTest_CustomReduction.cpp uses # ../../algorithms/src/Kokkos_Random.hpp # we'll just allow it to be included, but note # that in TriBITS KokkosAlgorithms can be disabled... -INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../../algorithms/src") +#INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../../algorithms/src") SET(SOURCES PerfTestMain.cpp PerfTestGramSchmidt.cpp PerfTestHexGrad.cpp PerfTest_CustomReduction.cpp + PerfTest_ExecSpacePartitioning.cpp + PerfTest_ViewCopy_a123.cpp + PerfTest_ViewCopy_b123.cpp + PerfTest_ViewCopy_c123.cpp + PerfTest_ViewCopy_d123.cpp + PerfTest_ViewCopy_a45.cpp + PerfTest_ViewCopy_b45.cpp + PerfTest_ViewCopy_c45.cpp + PerfTest_ViewCopy_d45.cpp + PerfTest_ViewCopy_a6.cpp + PerfTest_ViewCopy_b6.cpp + PerfTest_ViewCopy_c6.cpp + PerfTest_ViewCopy_d6.cpp + PerfTest_ViewCopy_a7.cpp + PerfTest_ViewCopy_b7.cpp + PerfTest_ViewCopy_c7.cpp + PerfTest_ViewCopy_d7.cpp + PerfTest_ViewCopy_a8.cpp + PerfTest_ViewCopy_b8.cpp + PerfTest_ViewCopy_c8.cpp + PerfTest_ViewCopy_d8.cpp + PerfTest_ViewAllocate.cpp + PerfTest_ViewFill_123.cpp + PerfTest_ViewFill_45.cpp + PerfTest_ViewFill_6.cpp + PerfTest_ViewFill_7.cpp + PerfTest_ViewFill_8.cpp + PerfTest_ViewResize_123.cpp + PerfTest_ViewResize_45.cpp + PerfTest_ViewResize_6.cpp + PerfTest_ViewResize_7.cpp + PerfTest_ViewResize_8.cpp ) # Per #374, we always want to build this test, but we only want to run # it as a PERFORMANCE test. That's why we separate building the test # from running the test. -TRIBITS_ADD_EXECUTABLE( +#leave these as basic includes for now +#I don't need anything transitive +KOKKOS_INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../../algorithms/src") +KOKKOS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +KOKKOS_INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}) + +KOKKOS_ADD_EXECUTABLE_AND_TEST( PerfTestExec SOURCES ${SOURCES} - COMM serial mpi - TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS} - ) - -TRIBITS_ADD_TEST( - PerfTest - NAME PerfTestExec - COMM serial mpi - NUM_MPI_PROCS 1 CATEGORIES PERFORMANCE - FAIL_REGULAR_EXPRESSION " FAILED " - ) +) -TRIBITS_ADD_EXECUTABLE( - PerformanceTest_TaskDAG +KOKKOS_ADD_EXECUTABLE_AND_TEST( + PerformanceTest_TaskDag SOURCES test_taskdag.cpp - COMM serial mpi - TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS} - ) - -TRIBITS_ADD_TEST( - PerformanceTest_TaskDAG - NAME PerformanceTest_TaskDAG - COMM serial mpi - NUM_MPI_PROCS 1 CATEGORIES PERFORMANCE - ) +) diff --git a/lib/kokkos/core/perf_test/PerfTestBlasKernels.hpp b/lib/kokkos/core/perf_test/PerfTestBlasKernels.hpp index ff9bf5a91b..a5a376565d 100644 --- a/lib/kokkos/core/perf_test/PerfTestBlasKernels.hpp +++ b/lib/kokkos/core/perf_test/PerfTestBlasKernels.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -48,217 +49,186 @@ namespace Kokkos { -template< class ConstVectorType , - class Device = typename ConstVectorType::execution_space > -struct Dot ; +template +struct Dot; -template< class ConstVectorType , - class Device = typename ConstVectorType::execution_space > -struct DotSingle ; +template +struct DotSingle; -template< class ConstScalarType , - class VectorType , - class Device = typename VectorType::execution_space > -struct Scale ; +template +struct Scale; -template< class ConstScalarType , - class ConstVectorType , - class VectorType , - class Device = typename VectorType::execution_space > -struct AXPBY ; +template +struct AXPBY; /** \brief Y = alpha * X + beta * Y */ -template< class ConstScalarType , - class ConstVectorType , - class VectorType > -void axpby( const ConstScalarType & alpha , - const ConstVectorType & X , - const ConstScalarType & beta , - const VectorType & Y ) -{ - typedef AXPBY< ConstScalarType , ConstVectorType , VectorType > functor ; +template +void axpby(const ConstScalarType& alpha, const ConstVectorType& X, + const ConstScalarType& beta, const VectorType& Y) { + typedef AXPBY functor; - parallel_for( Y.extent(0) , functor( alpha , X , beta , Y ) ); + parallel_for(Y.extent(0), functor(alpha, X, beta, Y)); } /** \brief Y *= alpha */ -template< class ConstScalarType , - class VectorType > -void scale( const ConstScalarType & alpha , const VectorType & Y ) -{ - typedef Scale< ConstScalarType , VectorType > functor ; +template +void scale(const ConstScalarType& alpha, const VectorType& Y) { + typedef Scale functor; - parallel_for( Y.extent(0) , functor( alpha , Y ) ); + parallel_for(Y.extent(0), functor(alpha, Y)); } -template< class ConstVectorType , - class Finalize > -void dot( const ConstVectorType & X , - const ConstVectorType & Y , - const Finalize & finalize ) -{ - typedef Dot< ConstVectorType > functor ; +template +void dot(const ConstVectorType& X, const ConstVectorType& Y, + const Finalize& finalize) { + typedef Dot functor; - parallel_reduce( X.extent(0) , functor( X , Y ) , finalize ); + parallel_reduce(X.extent(0), functor(X, Y), finalize); } -template< class ConstVectorType , - class Finalize > -void dot( const ConstVectorType & X , - const Finalize & finalize ) -{ - typedef DotSingle< ConstVectorType > functor ; +template +void dot(const ConstVectorType& X, const Finalize& finalize) { + typedef DotSingle functor; - parallel_reduce( X.extent(0) , functor( X ) , finalize ); + parallel_reduce(X.extent(0), functor(X), finalize); } } /* namespace Kokkos */ - //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { -template< class Type , class Device > -struct Dot -{ - typedef typename Device::execution_space execution_space ; +template +struct Dot { + typedef typename Device::execution_space execution_space; - static_assert( static_cast(Type::Rank) == static_cast(1), - "Dot static_assert Fail: Rank != 1"); + static_assert(static_cast(Type::Rank) == static_cast(1), + "Dot static_assert Fail: Rank != 1"); - - typedef double value_type ; + typedef double value_type; #if 1 - typename Type::const_type X ; - typename Type::const_type Y ; + typename Type::const_type X; + typename Type::const_type Y; #else - Type X ; - Type Y ; + Type X; + Type Y; #endif - Dot( const Type & arg_x , const Type & arg_y ) - : X(arg_x) , Y(arg_y) { } + Dot(const Type& arg_x, const Type& arg_y) : X(arg_x), Y(arg_y) {} KOKKOS_INLINE_FUNCTION - void operator()( int i , value_type & update ) const - { update += X[i] * Y[i]; } + void operator()(int i, value_type& update) const { update += X[i] * Y[i]; } KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , - const volatile value_type & source ) - { update += source; } + static void join(volatile value_type& update, + const volatile value_type& source) { + update += source; + } KOKKOS_INLINE_FUNCTION - static void init( value_type & update ) - { update = 0 ; } + static void init(value_type& update) { update = 0; } }; -template< class Type , class Device > -struct DotSingle -{ - typedef typename Device::execution_space execution_space ; +template +struct DotSingle { + typedef typename Device::execution_space execution_space; - static_assert( static_cast(Type::Rank) == static_cast(1), - "DotSingle static_assert Fail: Rank != 1"); + static_assert(static_cast(Type::Rank) == static_cast(1), + "DotSingle static_assert Fail: Rank != 1"); - typedef double value_type ; + typedef double value_type; #if 1 - typename Type::const_type X ; + typename Type::const_type X; #else - Type X ; + Type X; #endif - DotSingle( const Type & arg_x ) : X(arg_x) {} + DotSingle(const Type& arg_x) : X(arg_x) {} KOKKOS_INLINE_FUNCTION - void operator()( int i , value_type & update ) const - { - const typename Type::value_type & x = X[i]; update += x * x ; - } + void operator()(int i, value_type& update) const { + const typename Type::value_type& x = X[i]; + update += x * x; + } KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , - const volatile value_type & source ) - { update += source; } + static void join(volatile value_type& update, + const volatile value_type& source) { + update += source; + } KOKKOS_INLINE_FUNCTION - static void init( value_type & update ) - { update = 0 ; } + static void init(value_type& update) { update = 0; } }; +template +struct Scale { + typedef typename Device::execution_space execution_space; -template< class ScalarType , class VectorType , class Device> -struct Scale -{ - typedef typename Device::execution_space execution_space ; + static_assert(static_cast(ScalarType::Rank) == + static_cast(0), + "Scale static_assert Fail: ScalarType::Rank != 0"); - static_assert( static_cast(ScalarType::Rank) == static_cast(0), - "Scale static_assert Fail: ScalarType::Rank != 0"); - - static_assert( static_cast(VectorType::Rank) == static_cast(1), - "Scale static_assert Fail: VectorType::Rank != 1"); + static_assert(static_cast(VectorType::Rank) == + static_cast(1), + "Scale static_assert Fail: VectorType::Rank != 1"); #if 1 - typename ScalarType::const_type alpha ; + typename ScalarType::const_type alpha; #else - ScalarType alpha ; + ScalarType alpha; #endif - VectorType Y ; + VectorType Y; - Scale( const ScalarType & arg_alpha , const VectorType & arg_Y ) - : alpha( arg_alpha ), Y( arg_Y ) {} + Scale(const ScalarType& arg_alpha, const VectorType& arg_Y) + : alpha(arg_alpha), Y(arg_Y) {} KOKKOS_INLINE_FUNCTION - void operator()( int i ) const - { - Y[i] *= alpha() ; - } + void operator()(int i) const { Y[i] *= alpha(); } }; - -template< class ScalarType , - class ConstVectorType , - class VectorType, +template -struct AXPBY -{ - typedef typename Device::execution_space execution_space ; +struct AXPBY { + typedef typename Device::execution_space execution_space; - static_assert( static_cast(ScalarType::Rank) == static_cast(0), - "AXPBY static_assert Fail: ScalarType::Rank != 0"); + static_assert(static_cast(ScalarType::Rank) == + static_cast(0), + "AXPBY static_assert Fail: ScalarType::Rank != 0"); - static_assert( static_cast(ConstVectorType::Rank) == static_cast(1), - "AXPBY static_assert Fail: ConstVectorType::Rank != 1"); + static_assert(static_cast(ConstVectorType::Rank) == + static_cast(1), + "AXPBY static_assert Fail: ConstVectorType::Rank != 1"); - static_assert( static_cast(VectorType::Rank) == static_cast(1), - "AXPBY static_assert Fail: VectorType::Rank != 1"); + static_assert(static_cast(VectorType::Rank) == + static_cast(1), + "AXPBY static_assert Fail: VectorType::Rank != 1"); #if 1 - typename ScalarType::const_type alpha , beta ; - typename ConstVectorType::const_type X ; + typename ScalarType::const_type alpha, beta; + typename ConstVectorType::const_type X; #else - ScalarType alpha , beta ; - ConstVectorType X ; + ScalarType alpha, beta; + ConstVectorType X; #endif - VectorType Y ; + VectorType Y; - AXPBY( const ScalarType & arg_alpha , - const ConstVectorType & arg_X , - const ScalarType & arg_beta , - const VectorType & arg_Y ) - : alpha( arg_alpha ), beta( arg_beta ), X( arg_X ), Y( arg_Y ) {} + AXPBY(const ScalarType& arg_alpha, const ConstVectorType& arg_X, + const ScalarType& arg_beta, const VectorType& arg_Y) + : alpha(arg_alpha), beta(arg_beta), X(arg_X), Y(arg_Y) {} KOKKOS_INLINE_FUNCTION - void operator()( int i ) const - { - Y[i] = alpha() * X[i] + beta() * Y[i] ; - } + void operator()(int i) const { Y[i] = alpha() * X[i] + beta() * Y[i]; } }; } /* namespace Kokkos */ diff --git a/lib/kokkos/core/perf_test/PerfTestDriver.hpp b/lib/kokkos/core/perf_test/PerfTestDriver.hpp index 5367f2542e..95d5128abf 100644 --- a/lib/kokkos/core/perf_test/PerfTestDriver.hpp +++ b/lib/kokkos/core/perf_test/PerfTestDriver.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -60,244 +61,262 @@ namespace Test { enum { NUMBER_OF_TRIALS = 5 }; -template< class DeviceType , class LayoutType > -void run_test_mdrange( int exp_beg , int exp_end, const char deviceTypeName[], int range_offset = 0, int tile_offset = 0 ) +template +void run_test_mdrange(int exp_beg, int exp_end, const char deviceTypeName[], + int range_offset = 0, int tile_offset = 0) // exp_beg = 6 => 2^6 = 64 is starting range length { #define MDRANGE_PERFORMANCE_OUTPUT_VERBOSE 0 - std::string label_mdrange ; - label_mdrange.append( "\"MDRange< double , " ); - label_mdrange.append( deviceTypeName ); - label_mdrange.append( " >\"" ); + std::string label_mdrange; + label_mdrange.append("\"MDRange< double , "); + label_mdrange.append(deviceTypeName); + label_mdrange.append(" >\""); - std::string label_range_col2 ; - label_range_col2.append( "\"RangeColTwo< double , " ); - label_range_col2.append( deviceTypeName ); - label_range_col2.append( " >\"" ); + std::string label_range_col2; + label_range_col2.append("\"RangeColTwo< double , "); + label_range_col2.append(deviceTypeName); + label_range_col2.append(" >\""); - std::string label_range_col_all ; - label_range_col_all.append( "\"RangeColAll< double , " ); - label_range_col_all.append( deviceTypeName ); - label_range_col_all.append( " >\"" ); + std::string label_range_col_all; + label_range_col_all.append("\"RangeColAll< double , "); + label_range_col_all.append(deviceTypeName); + label_range_col_all.append(" >\""); - if ( std::is_same::value) { - std::cout << "--------------------------------------------------------------\n" - << "Performance tests for MDRange Layout Right" - << "\n--------------------------------------------------------------" << std::endl; + if (std::is_same::value) { + std::cout + << "--------------------------------------------------------------\n" + << "Performance tests for MDRange Layout Right" + << "\n--------------------------------------------------------------" + << std::endl; } else { - std::cout << "--------------------------------------------------------------\n" - << "Performance tests for MDRange Layout Left" - << "\n--------------------------------------------------------------" << std::endl; + std::cout + << "--------------------------------------------------------------\n" + << "Performance tests for MDRange Layout Left" + << "\n--------------------------------------------------------------" + << std::endl; } + for (int i = exp_beg; i < exp_end; ++i) { + const int range_length = (1 << i) + range_offset; - for (int i = exp_beg ; i < exp_end ; ++i) { - const int range_length = (1<= min_bnd ) { - int tmid = min_bnd; - while ( tmid < tfast ) { - t0 = min_bnd; - t1 = tmid; - t2 = tfast; - int t2_rev = min_bnd; - int t1_rev = tmid; - int t0_rev = tfast; + while (tfast >= min_bnd) { + int tmid = min_bnd; + while (tmid < tfast) { + t0 = min_bnd; + t1 = tmid; + t2 = tfast; + int t2_rev = min_bnd; + int t1_rev = tmid; + int t0_rev = tfast; #if defined(KOKKOS_ENABLE_CUDA) - //Note: Product of tile sizes must be < 1024 for Cuda - if ( t0*t1*t2 >= 1024 ) { - printf(" Exceeded Cuda tile limits; onto next range set\n\n"); - break; - } -#endif - - // Run 1 with tiles LayoutRight style - double seconds_1 = 0; - { seconds_1 = MultiDimRangePerf3D< DeviceType , double , LayoutType >::test_multi_index(range_length,range_length,range_length, t0, t1, t2) ; } - -#if MDRANGE_PERFORMANCE_OUTPUT_VERBOSE - std::cout << label_mdrange - << " , " << t0 << " , " << t1 << " , " << t2 - << " , " << seconds_1 - << std::endl ; -#endif - - if ( counter == 1 ) { - seconds_min = seconds_1; - t0_min = t0; - t1_min = t1; - t2_min = t2; - } - else { - if ( seconds_1 < seconds_min ) - { - seconds_min = seconds_1; - t0_min = t0; - t1_min = t1; - t2_min = t2; + // Note: Product of tile sizes must be < 1024 for Cuda + if (t0 * t1 * t2 >= 1024) { + printf(" Exceeded Cuda tile limits; onto next range set\n\n"); + break; } - } - - // Run 2 with tiles LayoutLeft style - reverse order of tile dims - double seconds_1rev = 0; - { seconds_1rev = MultiDimRangePerf3D< DeviceType , double , LayoutType >::test_multi_index(range_length,range_length,range_length, t0_rev, t1_rev, t2_rev) ; } - -#if MDRANGE_PERFORMANCE_OUTPUT_VERBOSE - std::cout << label_mdrange - << " , " << t0_rev << " , " << t1_rev << " , " << t2_rev - << " , " << seconds_1rev - << std::endl ; #endif - if ( seconds_1rev < seconds_min ) - { - seconds_min = seconds_1rev; - t0_min = t0_rev; - t1_min = t1_rev; - t2_min = t2_rev; - } + // Run 1 with tiles LayoutRight style + double seconds_1 = 0; + { + seconds_1 = + MultiDimRangePerf3D::test_multi_index(range_length, + range_length, + range_length, + t0, t1, t2); + } - ++counter; - tmid <<= 1; - } //end inner while - tfast >>=1; - } //end outer while +#if MDRANGE_PERFORMANCE_OUTPUT_VERBOSE + std::cout << label_mdrange << " , " << t0 << " , " << t1 << " , " + << t2 << " , " << seconds_1 << std::endl; +#endif - std::cout << "\n" - << "--------------------------------------------------------------\n" - << label_mdrange - << "\n Min values " - << "\n Range length per dim (3D): " << range_length - << "\n TileDims: " << t0_min << " , " << t1_min << " , " << t2_min - << "\n Min time: " << seconds_min - << "\n---------------------------------------------------------------" - << std::endl ; - } //end scope + if (counter == 1) { + seconds_min = seconds_1; + t0_min = t0; + t1_min = t1; + t2_min = t2; + } else { + if (seconds_1 < seconds_min) { + seconds_min = seconds_1; + t0_min = t0; + t1_min = t1; + t2_min = t2; + } + } + + // Run 2 with tiles LayoutLeft style - reverse order of tile dims + double seconds_1rev = 0; + { + seconds_1rev = + MultiDimRangePerf3D::test_multi_index(range_length, + range_length, + range_length, + t0_rev, + t1_rev, + t2_rev); + } + +#if MDRANGE_PERFORMANCE_OUTPUT_VERBOSE + std::cout << label_mdrange << " , " << t0_rev << " , " << t1_rev + << " , " << t2_rev << " , " << seconds_1rev << std::endl; +#endif + + if (seconds_1rev < seconds_min) { + seconds_min = seconds_1rev; + t0_min = t0_rev; + t1_min = t1_rev; + t2_min = t2_rev; + } + + ++counter; + tmid <<= 1; + } // end inner while + tfast >>= 1; + } // end outer while + + std::cout + << "\n" + << "--------------------------------------------------------------\n" + << label_mdrange << "\n Min values " + << "\n Range length per dim (3D): " << range_length + << "\n TileDims: " << t0_min << " , " << t1_min << " , " << t2_min + << "\n Min time: " << seconds_min + << "\n---------------------------------------------------------------" + << std::endl; + } // end scope #if !defined(KOKKOS_ENABLE_CUDA) - double seconds_min_c = 0.0; - int t0c_min = 0, t1c_min = 0, t2c_min = 0; - int counter = 1; - { - int min_bnd = 8; - // Test 1_c: MDRange with 0 for 'inner' tile dim; this case will utilize the full span in that direction, should be similar to Collapse<2> - if ( std::is_same::value ) { - for ( unsigned int T0 = min_bnd; T0 < static_cast(range_length); T0<<=1 ) { - for ( unsigned int T1 = min_bnd; T1 < static_cast(range_length); T1<<=1 ) { - double seconds_c = 0; - { seconds_c = MultiDimRangePerf3D< DeviceType , double , LayoutType >::test_multi_index(range_length,range_length,range_length, T0, T1, 0) ; } + double seconds_min_c = 0.0; + int t0c_min = 0, t1c_min = 0, t2c_min = 0; + int counter = 1; + { + int min_bnd = 8; + // Test 1_c: MDRange with 0 for 'inner' tile dim; this case will utilize + // the full span in that direction, should be similar to Collapse<2> + if (std::is_same::value) { + for (unsigned int T0 = min_bnd; + T0 < static_cast(range_length); T0 <<= 1) { + for (unsigned int T1 = min_bnd; + T1 < static_cast(range_length); T1 <<= 1) { + double seconds_c = 0; + { + seconds_c = MultiDimRangePerf3D:: + test_multi_index(range_length, range_length, range_length, T0, + T1, 0); + } #if MDRANGE_PERFORMANCE_OUTPUT_VERBOSE - std::cout << " MDRange LR with '0' tile - collapse-like \n" - << label_mdrange - << " , " << T0 << " , " << T1 << " , " << range_length - << " , " << seconds_c - << std::endl ; + std::cout << " MDRange LR with '0' tile - collapse-like \n" + << label_mdrange << " , " << T0 << " , " << T1 << " , " + << range_length << " , " << seconds_c << std::endl; #endif - t2c_min = range_length; - if ( counter == 1 ) { - seconds_min_c = seconds_c; - t0c_min = T0; - t1c_min = T1; - } - else { - if ( seconds_c < seconds_min_c ) - { - seconds_min_c = seconds_c; - t0c_min = T0; - t1c_min = T1; + t2c_min = range_length; + if (counter == 1) { + seconds_min_c = seconds_c; + t0c_min = T0; + t1c_min = T1; + } else { + if (seconds_c < seconds_min_c) { + seconds_min_c = seconds_c; + t0c_min = T0; + t1c_min = T1; + } } + ++counter; } - ++counter; } - } - } - else { - for ( unsigned int T1 = min_bnd; T1 <= static_cast(range_length); T1<<=1 ) { - for ( unsigned int T2 = min_bnd; T2 <= static_cast(range_length); T2<<=1 ) { - double seconds_c = 0; - { seconds_c = MultiDimRangePerf3D< DeviceType , double , LayoutType >::test_multi_index(range_length,range_length,range_length, 0, T1, T2) ; } + } else { + for (unsigned int T1 = min_bnd; + T1 <= static_cast(range_length); T1 <<= 1) { + for (unsigned int T2 = min_bnd; + T2 <= static_cast(range_length); T2 <<= 1) { + double seconds_c = 0; + { + seconds_c = MultiDimRangePerf3D:: + test_multi_index(range_length, range_length, range_length, 0, + T1, T2); + } #if MDRANGE_PERFORMANCE_OUTPUT_VERBOSE - std::cout << " MDRange LL with '0' tile - collapse-like \n" - << label_mdrange - << " , " < style: " - << "\n Min values " - << "\n Range length per dim (3D): " << range_length - << "\n TileDims: " << t0c_min << " , " << t1c_min << " , " << t2c_min - << "\n Min time: " << seconds_min_c - << "\n---------------------------------------------------------------" - << std::endl ; - } //end scope test 2 + std::cout + // << + // "--------------------------------------------------------------\n" + << label_mdrange << " Collapse<2> style: " + << "\n Min values " + << "\n Range length per dim (3D): " << range_length + << "\n TileDims: " << t0c_min << " , " << t1c_min << " , " << t2c_min + << "\n Min time: " << seconds_min_c + << "\n---------------------------------------------------------------" + << std::endl; + } // end scope test 2 #endif - // Test 2: RangePolicy Collapse2 style double seconds_2 = 0; - { seconds_2 = RangePolicyCollapseTwo< DeviceType , double , LayoutType >::test_index_collapse_two(range_length,range_length,range_length) ; } - std::cout << label_range_col2 - << " , " << range_length - << " , " << seconds_2 - << std::endl ; - + { + seconds_2 = RangePolicyCollapseTwo:: + test_index_collapse_two(range_length, range_length, range_length); + } + std::cout << label_range_col2 << " , " << range_length << " , " << seconds_2 + << std::endl; // Test 3: RangePolicy Collapse all style - not necessary, always slow /* double seconds_3 = 0; - { seconds_3 = RangePolicyCollapseAll< DeviceType , double , LayoutType >::test_collapse_all(range_length,range_length,range_length) ; } - std::cout << label_range_col_all + { seconds_3 = RangePolicyCollapseAll< DeviceType , double , LayoutType + >::test_collapse_all(range_length,range_length,range_length) ; } std::cout + << label_range_col_all << " , " << range_length << " , " << seconds_3 << "\n---------------------------------------------------------------" @@ -306,97 +325,105 @@ void run_test_mdrange( int exp_beg , int exp_end, const char deviceTypeName[], i // Compare fastest times... will never be collapse all so ignore it // seconds_min = tiled MDRange - // seconds_min_c = collapse<2>-like MDRange (tiledim = span for fast dim) - only for non-Cuda, else tile too long - // seconds_2 = collapse<2>-style RangePolicy - // seconds_3 = collapse<3>-style RangePolicy + // seconds_min_c = collapse<2>-like MDRange (tiledim = span for fast dim) - + // only for non-Cuda, else tile too long seconds_2 = collapse<2>-style + // RangePolicy seconds_3 = collapse<3>-style RangePolicy #if !defined(KOKKOS_ENABLE_CUDA) - if ( seconds_min < seconds_min_c ) { - if ( seconds_min < seconds_2 ) { - std::cout << "--------------------------------------------------------------\n" - << " Fastest run: MDRange tiled\n" - << " Time: " << seconds_min - << " Difference: " << seconds_2 - seconds_min - << " Other times: \n" - << " MDrange collapse-like (tiledim = span on fast dim) type: " << seconds_min_c << "\n" - << " Collapse2 Range Policy: " << seconds_2 << "\n" - << "\n--------------------------------------------------------------" - << "\n--------------------------------------------------------------" - //<< "\n\n" - << std::endl; + if (seconds_min < seconds_min_c) { + if (seconds_min < seconds_2) { + std::cout + << "--------------------------------------------------------------" + "\n" + << " Fastest run: MDRange tiled\n" + << " Time: " << seconds_min + << " Difference: " << seconds_2 - seconds_min << " Other times: \n" + << " MDrange collapse-like (tiledim = span on fast dim) type: " + << seconds_min_c << "\n" + << " Collapse2 Range Policy: " << seconds_2 << "\n" + << "\n-------------------------------------------------------------" + "-" + << "\n-------------------------------------------------------------" + "-" + //<< "\n\n" + << std::endl; + } else if (seconds_min > seconds_2) { + std::cout + << " Fastest run: Collapse2 RangePolicy\n" + << " Time: " << seconds_2 + << " Difference: " << seconds_min - seconds_2 << " Other times: \n" + << " MDrange Tiled: " << seconds_min << "\n" + << " MDrange collapse-like (tiledim = span on fast dim) type: " + << seconds_min_c << "\n" + << "\n-------------------------------------------------------------" + "-" + << "\n-------------------------------------------------------------" + "-" + //<< "\n\n" + << std::endl; } - else if ( seconds_min > seconds_2 ) { - std::cout << " Fastest run: Collapse2 RangePolicy\n" - << " Time: " << seconds_2 - << " Difference: " << seconds_min - seconds_2 - << " Other times: \n" - << " MDrange Tiled: " << seconds_min << "\n" - << " MDrange collapse-like (tiledim = span on fast dim) type: " << seconds_min_c << "\n" - << "\n--------------------------------------------------------------" - << "\n--------------------------------------------------------------" - //<< "\n\n" - << std::endl; + } else if (seconds_min > seconds_min_c) { + if (seconds_min_c < seconds_2) { + std::cout << "---------------------------------------------------------" + "-----\n" + << " Fastest run: MDRange collapse-like (tiledim = span on " + "fast dim) type\n" + << " Time: " << seconds_min_c + << " Difference: " << seconds_2 - seconds_min_c + << " Other times: \n" + << " MDrange Tiled: " << seconds_min << "\n" + << " Collapse2 Range Policy: " << seconds_2 << "\n" + << "\n-------------------------------------------------------" + "-------" + << "\n-------------------------------------------------------" + "-------" + //<< "\n\n" + << std::endl; + } else if (seconds_min_c > seconds_2) { + std::cout + << " Fastest run: Collapse2 RangePolicy\n" + << " Time: " << seconds_2 + << " Difference: " << seconds_min_c - seconds_2 + << " Other times: \n" + << " MDrange Tiled: " << seconds_min << "\n" + << " MDrange collapse-like (tiledim = span on fast dim) type: " + << seconds_min_c << "\n" + << "\n-------------------------------------------------------------" + "-" + << "\n-------------------------------------------------------------" + "-" + //<< "\n\n" + << std::endl; } - } - else if ( seconds_min > seconds_min_c ) { - if ( seconds_min_c < seconds_2 ) { - std::cout << "--------------------------------------------------------------\n" - << " Fastest run: MDRange collapse-like (tiledim = span on fast dim) type\n" - << " Time: " << seconds_min_c - << " Difference: " << seconds_2 - seconds_min_c - << " Other times: \n" - << " MDrange Tiled: " << seconds_min << "\n" - << " Collapse2 Range Policy: " << seconds_2 << "\n" - << "\n--------------------------------------------------------------" - << "\n--------------------------------------------------------------" - //<< "\n\n" - << std::endl; - } - else if ( seconds_min_c > seconds_2 ) { - std::cout << " Fastest run: Collapse2 RangePolicy\n" - << " Time: " << seconds_2 - << " Difference: " << seconds_min_c - seconds_2 - << " Other times: \n" - << " MDrange Tiled: " << seconds_min << "\n" - << " MDrange collapse-like (tiledim = span on fast dim) type: " << seconds_min_c << "\n" - << "\n--------------------------------------------------------------" - << "\n--------------------------------------------------------------" - //<< "\n\n" - << std::endl; - } - } // end else if + } // end else if #else - if ( seconds_min < seconds_2 ) { - std::cout << "--------------------------------------------------------------\n" + if (seconds_min < seconds_2) { + std::cout + << "--------------------------------------------------------------\n" << " Fastest run: MDRange tiled\n" << " Time: " << seconds_min - << " Difference: " << seconds_2 - seconds_min - << " Other times: \n" + << " Difference: " << seconds_2 - seconds_min << " Other times: \n" << " Collapse2 Range Policy: " << seconds_2 << "\n" << "\n--------------------------------------------------------------" << "\n--------------------------------------------------------------" //<< "\n\n" << std::endl; - } - else if ( seconds_min > seconds_2 ) { - std::cout << " Fastest run: Collapse2 RangePolicy\n" + } else if (seconds_min > seconds_2) { + std::cout + << " Fastest run: Collapse2 RangePolicy\n" << " Time: " << seconds_2 - << " Difference: " << seconds_min - seconds_2 - << " Other times: \n" + << " Difference: " << seconds_min - seconds_2 << " Other times: \n" << " MDrange Tiled: " << seconds_min << "\n" << "\n--------------------------------------------------------------" << "\n--------------------------------------------------------------" //<< "\n\n" << std::endl; - } + } #endif - } //end for + } // end for #undef MDRANGE_PERFORMANCE_OUTPUT_VERBOSE - -} - - } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTestGramSchmidt.cpp b/lib/kokkos/core/perf_test/PerfTestGramSchmidt.cpp index d812b16d85..5e85163acf 100644 --- a/lib/kokkos/core/perf_test/PerfTestGramSchmidt.cpp +++ b/lib/kokkos/core/perf_test/PerfTestGramSchmidt.cpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -55,131 +56,105 @@ namespace Test { // Reduction : result = dot( Q(:,j) , Q(:,j) ); // PostProcess : R(j,j) = result ; inv = 1 / result ; -template< class VectorView , class ValueView > -struct InvNorm2 : public Kokkos::DotSingle< VectorView > { +template +struct InvNorm2 : public Kokkos::DotSingle { + typedef typename Kokkos::DotSingle::value_type value_type; - typedef typename Kokkos::DotSingle< VectorView >::value_type value_type ; + ValueView Rjj; + ValueView inv; - ValueView Rjj ; - ValueView inv ; - - InvNorm2( const VectorView & argX , - const ValueView & argR , - const ValueView & argInv ) - : Kokkos::DotSingle< VectorView >( argX ) - , Rjj( argR ) - , inv( argInv ) - {} + InvNorm2(const VectorView& argX, const ValueView& argR, + const ValueView& argInv) + : Kokkos::DotSingle(argX), Rjj(argR), inv(argInv) {} KOKKOS_INLINE_FUNCTION - void final( value_type & result ) const - { - result = std::sqrt( result ); - Rjj() = result ; - inv() = ( 0 < result ) ? 1.0 / result : 0 ; + void final(value_type& result) const { + result = std::sqrt(result); + Rjj() = result; + inv() = (0 < result) ? 1.0 / result : 0; } }; -template< class VectorView , class ValueView > -inline -void invnorm2( const VectorView & x , - const ValueView & r , - const ValueView & r_inv ) -{ - Kokkos::parallel_reduce( x.extent(0) , InvNorm2< VectorView , ValueView >( x , r , r_inv ) ); +template +inline void invnorm2(const VectorView& x, const ValueView& r, + const ValueView& r_inv) { + Kokkos::parallel_reduce(x.extent(0), + InvNorm2(x, r, r_inv)); } // PostProcess : tmp = - ( R(j,k) = result ); -template< class VectorView , class ValueView > -struct DotM : public Kokkos::Dot< VectorView > { +template +struct DotM : public Kokkos::Dot { + typedef typename Kokkos::Dot::value_type value_type; - typedef typename Kokkos::Dot< VectorView >::value_type value_type ; + ValueView Rjk; + ValueView tmp; - ValueView Rjk ; - ValueView tmp ; - - DotM( const VectorView & argX , - const VectorView & argY , - const ValueView & argR , - const ValueView & argTmp ) - : Kokkos::Dot< VectorView >( argX , argY ) - , Rjk( argR ) - , tmp( argTmp ) - {} + DotM(const VectorView& argX, const VectorView& argY, const ValueView& argR, + const ValueView& argTmp) + : Kokkos::Dot(argX, argY), Rjk(argR), tmp(argTmp) {} KOKKOS_INLINE_FUNCTION - void final( value_type & result ) const - { - Rjk() = result ; - tmp() = - result ; + void final(value_type& result) const { + Rjk() = result; + tmp() = -result; } }; -template< class VectorView , class ValueView > -inline -void dot_neg( const VectorView & x , - const VectorView & y , - const ValueView & r , - const ValueView & r_neg ) -{ - Kokkos::parallel_reduce( x.extent(0) , DotM< VectorView , ValueView >( x , y , r , r_neg ) ); +template +inline void dot_neg(const VectorView& x, const VectorView& y, + const ValueView& r, const ValueView& r_neg) { + Kokkos::parallel_reduce(x.extent(0), + DotM(x, y, r, r_neg)); } +template +struct ModifiedGramSchmidt { + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; -template< typename Scalar , class DeviceType > -struct ModifiedGramSchmidt -{ - typedef DeviceType execution_space ; - typedef typename execution_space::size_type size_type ; + typedef Kokkos::View + multivector_type; - typedef Kokkos::View< Scalar** , - Kokkos::LayoutLeft , - execution_space > multivector_type ; + typedef Kokkos::View + vector_type; - typedef Kokkos::View< Scalar* , - Kokkos::LayoutLeft , - execution_space > vector_type ; + typedef Kokkos::View value_view; - typedef Kokkos::View< Scalar , - Kokkos::LayoutLeft , - execution_space > value_view ; + multivector_type Q; + multivector_type R; - - multivector_type Q ; - multivector_type R ; - - static double factorization( const multivector_type Q_ , - const multivector_type R_ ) - { - const size_type count = Q_.extent(1); + static double factorization(const multivector_type Q_, + const multivector_type R_) { + const size_type count = Q_.extent(1); value_view tmp("tmp"); value_view one("one"); - Kokkos::deep_copy( one , (Scalar) 1 ); + Kokkos::deep_copy(one, (Scalar)1); - Kokkos::Timer timer ; + Kokkos::Timer timer; - for ( size_type j = 0 ; j < count ; ++j ) { + for (size_type j = 0; j < count; ++j) { // Reduction : tmp = dot( Q(:,j) , Q(:,j) ); // PostProcess : tmp = std::sqrt( tmp ); R(j,j) = tmp ; tmp = 1 / tmp ; - const vector_type Qj = Kokkos::subview( Q_ , Kokkos::ALL() , j ); - const value_view Rjj = Kokkos::subview( R_ , j , j ); + const vector_type Qj = Kokkos::subview(Q_, Kokkos::ALL(), j); + const value_view Rjj = Kokkos::subview(R_, j, j); - invnorm2( Qj , Rjj , tmp ); + invnorm2(Qj, Rjj, tmp); // Q(:,j) *= ( 1 / R(j,j) ); => Q(:,j) *= tmp ; - Kokkos::scale( tmp , Qj ); + Kokkos::scale(tmp, Qj); - for ( size_t k = j + 1 ; k < count ; ++k ) { - const vector_type Qk = Kokkos::subview( Q_ , Kokkos::ALL() , k ); - const value_view Rjk = Kokkos::subview( R_ , j , k ); + for (size_t k = j + 1; k < count; ++k) { + const vector_type Qk = Kokkos::subview(Q_, Kokkos::ALL(), k); + const value_view Rjk = Kokkos::subview(R_, j, k); // Reduction : R(j,k) = dot( Q(:,j) , Q(:,k) ); // PostProcess : tmp = - R(j,k); - dot_neg( Qj , Qk , Rjk , tmp ); + dot_neg(Qj, Qk, Rjk, tmp); // Q(:,k) -= R(j,k) * Q(:,j); => Q(:,k) += tmp * Q(:,j) - Kokkos::axpby( tmp , Qj , one , Qk ); + Kokkos::axpby(tmp, Qj, one, Qk); } } @@ -190,94 +165,87 @@ struct ModifiedGramSchmidt //-------------------------------------------------------------------------- - static double test( const size_t length , - const size_t count , - const size_t iter = 1 ) - { - multivector_type Q_( "Q" , length , count ); - multivector_type R_( "R" , count , count ); + static double test(const size_t length, const size_t count, + const size_t iter = 1) { + multivector_type Q_("Q", length, count); + multivector_type R_("R", count, count); - typename multivector_type::HostMirror A = - Kokkos::create_mirror( Q_ ); + typename multivector_type::HostMirror A = Kokkos::create_mirror(Q_); // Create and fill A on the host - for ( size_type j = 0 ; j < count ; ++j ) { - for ( size_type i = 0 ; i < length ; ++i ) { - A(i,j) = ( i + 1 ) * ( j + 1 ); + for (size_type j = 0; j < count; ++j) { + for (size_type i = 0; i < length; ++i) { + A(i, j) = (i + 1) * (j + 1); } } - double dt_min = 0 ; + double dt_min = 0; - for ( size_t i = 0 ; i < iter ; ++i ) { - - Kokkos::deep_copy( Q_ , A ); + for (size_t i = 0; i < iter; ++i) { + Kokkos::deep_copy(Q_, A); // A = Q * R - const double dt = factorization( Q_ , R_ ); + const double dt = factorization(Q_, R_); - if ( 0 == i ) dt_min = dt ; - else dt_min = dt < dt_min ? dt : dt_min ; + if (0 == i) + dt_min = dt; + else + dt_min = dt < dt_min ? dt : dt_min; } - return dt_min ; + return dt_min; } }; -template< class DeviceType > -void run_test_gramschmidt( int exp_beg , int exp_end, int num_trials, const char deviceTypeName[] ) -{ - std::string label_gramschmidt ; - label_gramschmidt.append( "\"GramSchmidt< double , " ); - label_gramschmidt.append( deviceTypeName ); - label_gramschmidt.append( " >\"" ); +template +void run_test_gramschmidt(int exp_beg, int exp_end, int num_trials, + const char deviceTypeName[]) { + std::string label_gramschmidt; + label_gramschmidt.append("\"GramSchmidt< double , "); + label_gramschmidt.append(deviceTypeName); + label_gramschmidt.append(" >\""); - for (int i = exp_beg ; i < exp_end ; ++i) { - double min_seconds = 0.0 ; - double max_seconds = 0.0 ; - double avg_seconds = 0.0 ; + for (int i = exp_beg; i < exp_end; ++i) { + double min_seconds = 0.0; + double max_seconds = 0.0; + double avg_seconds = 0.0; - const int parallel_work_length = 1<::test(parallel_work_length, 32 ) ; + for (int j = 0; j < num_trials; ++j) { + const double seconds = ModifiedGramSchmidt::test( + parallel_work_length, 32); - if ( 0 == j ) { - min_seconds = seconds ; - max_seconds = seconds ; + if (0 == j) { + min_seconds = seconds; + max_seconds = seconds; + } else { + if (seconds < min_seconds) min_seconds = seconds; + if (seconds > max_seconds) max_seconds = seconds; } - else { - if ( seconds < min_seconds ) min_seconds = seconds ; - if ( seconds > max_seconds ) max_seconds = seconds ; - } - avg_seconds += seconds ; + avg_seconds += seconds; } - avg_seconds /= num_trials ; + avg_seconds /= num_trials; - std::cout << label_gramschmidt - << " , " << parallel_work_length - << " , " << min_seconds - << " , " << ( min_seconds / parallel_work_length ) - << std::endl ; + std::cout << label_gramschmidt << " , " << parallel_work_length << " , " + << min_seconds << " , " << (min_seconds / parallel_work_length) + << std::endl; } } -TEST_F( default_exec, gramschmidt ) { - int exp_beg = 10; - int exp_end = 20; +TEST(default_exec, gramschmidt) { + int exp_beg = 10; + int exp_end = 20; int num_trials = 5; - if(command_line_num_args()>1) - exp_beg = atoi(command_line_arg(1)); - if(command_line_num_args()>2) - exp_end = atoi(command_line_arg(2)); - if(command_line_num_args()>3) - num_trials = atoi(command_line_arg(3)); - - EXPECT_NO_THROW(run_test_gramschmidt< Kokkos::DefaultExecutionSpace>( exp_beg, exp_end, num_trials, Kokkos::DefaultExecutionSpace::name() )); -} + if (command_line_num_args() > 1) exp_beg = atoi(command_line_arg(1)); + if (command_line_num_args() > 2) exp_end = atoi(command_line_arg(2)); + if (command_line_num_args() > 3) num_trials = atoi(command_line_arg(3)); + EXPECT_NO_THROW(run_test_gramschmidt( + exp_beg, exp_end, num_trials, Kokkos::DefaultExecutionSpace::name())); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTestHexGrad.cpp b/lib/kokkos/core/perf_test/PerfTestHexGrad.cpp index 03285a375c..d879282867 100644 --- a/lib/kokkos/core/perf_test/PerfTestHexGrad.cpp +++ b/lib/kokkos/core/perf_test/PerfTestHexGrad.cpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -47,279 +48,253 @@ namespace Test { -template< class DeviceType , - typename CoordScalarType = double , - typename GradScalarType = float > -struct HexGrad -{ - typedef DeviceType execution_space ; - typedef typename execution_space::size_type size_type ; +template +struct HexGrad { + typedef DeviceType execution_space; + typedef typename execution_space::size_type size_type; - typedef HexGrad self_type; + typedef HexGrad self_type; // 3D array : ( ParallelWork , Space , Node ) - enum { NSpace = 3 , NNode = 8 }; + enum { NSpace = 3, NNode = 8 }; - typedef Kokkos::View< CoordScalarType*[NSpace][NNode] , execution_space > - elem_coord_type ; + typedef Kokkos::View + elem_coord_type; - typedef Kokkos::View< GradScalarType*[NSpace][NNode] , execution_space > - elem_grad_type ; + typedef Kokkos::View + elem_grad_type; - elem_coord_type coords ; - elem_grad_type grad_op ; + elem_coord_type coords; + elem_grad_type grad_op; - enum { FLOPS = 318 }; // = 3 * ( 18 + 8 * 11 ) }; - enum { READS = 18 }; + enum { FLOPS = 318 }; // = 3 * ( 18 + 8 * 11 ) }; + enum { READS = 18 }; enum { WRITES = 18 }; - HexGrad( const elem_coord_type & arg_coords , - const elem_grad_type & arg_grad_op ) - : coords( arg_coords ) - , grad_op( arg_grad_op ) - {} + HexGrad(const elem_coord_type& arg_coords, const elem_grad_type& arg_grad_op) + : coords(arg_coords), grad_op(arg_grad_op) {} - KOKKOS_INLINE_FUNCTION static - void grad( const CoordScalarType x[] , - const CoordScalarType z[] , - GradScalarType grad_y[] ) - { - const GradScalarType R42=(x[3] - x[1]); - const GradScalarType R52=(x[4] - x[1]); - const GradScalarType R54=(x[4] - x[3]); + KOKKOS_INLINE_FUNCTION static void grad(const CoordScalarType x[], + const CoordScalarType z[], + GradScalarType grad_y[]) { + const GradScalarType R42 = (x[3] - x[1]); + const GradScalarType R52 = (x[4] - x[1]); + const GradScalarType R54 = (x[4] - x[3]); - const GradScalarType R63=(x[5] - x[2]); - const GradScalarType R83=(x[7] - x[2]); - const GradScalarType R86=(x[7] - x[5]); + const GradScalarType R63 = (x[5] - x[2]); + const GradScalarType R83 = (x[7] - x[2]); + const GradScalarType R86 = (x[7] - x[5]); - const GradScalarType R31=(x[2] - x[0]); - const GradScalarType R61=(x[5] - x[0]); - const GradScalarType R74=(x[6] - x[3]); + const GradScalarType R31 = (x[2] - x[0]); + const GradScalarType R61 = (x[5] - x[0]); + const GradScalarType R74 = (x[6] - x[3]); - const GradScalarType R72=(x[6] - x[1]); - const GradScalarType R75=(x[6] - x[4]); - const GradScalarType R81=(x[7] - x[0]); + const GradScalarType R72 = (x[6] - x[1]); + const GradScalarType R75 = (x[6] - x[4]); + const GradScalarType R81 = (x[7] - x[0]); - const GradScalarType t1=(R63 + R54); - const GradScalarType t2=(R61 + R74); - const GradScalarType t3=(R72 + R81); + const GradScalarType t1 = (R63 + R54); + const GradScalarType t2 = (R61 + R74); + const GradScalarType t3 = (R72 + R81); - const GradScalarType t4 =(R86 + R42); - const GradScalarType t5 =(R83 + R52); - const GradScalarType t6 =(R75 + R31); + const GradScalarType t4 = (R86 + R42); + const GradScalarType t5 = (R83 + R52); + const GradScalarType t6 = (R75 + R31); // Calculate Y gradient from X and Z data - grad_y[0] = (z[1] * t1) - (z[2] * R42) - (z[3] * t5) + (z[4] * t4) + (z[5] * R52) - (z[7] * R54); - grad_y[1] = (z[2] * t2) + (z[3] * R31) - (z[0] * t1) - (z[5] * t6) + (z[6] * R63) - (z[4] * R61); - grad_y[2] = (z[3] * t3) + (z[0] * R42) - (z[1] * t2) - (z[6] * t4) + (z[7] * R74) - (z[5] * R72); - grad_y[3] = (z[0] * t5) - (z[1] * R31) - (z[2] * t3) + (z[7] * t6) + (z[4] * R81) - (z[6] * R83); - grad_y[4] = (z[5] * t3) + (z[6] * R86) - (z[7] * t2) - (z[0] * t4) - (z[3] * R81) + (z[1] * R61); - grad_y[5] = (z[6] * t5) - (z[4] * t3) - (z[7] * R75) + (z[1] * t6) - (z[0] * R52) + (z[2] * R72); - grad_y[6] = (z[7] * t1) - (z[5] * t5) - (z[4] * R86) + (z[2] * t4) - (z[1] * R63) + (z[3] * R83); - grad_y[7] = (z[4] * t2) - (z[6] * t1) + (z[5] * R75) - (z[3] * t6) - (z[2] * R74) + (z[0] * R54); + grad_y[0] = (z[1] * t1) - (z[2] * R42) - (z[3] * t5) + (z[4] * t4) + + (z[5] * R52) - (z[7] * R54); + grad_y[1] = (z[2] * t2) + (z[3] * R31) - (z[0] * t1) - (z[5] * t6) + + (z[6] * R63) - (z[4] * R61); + grad_y[2] = (z[3] * t3) + (z[0] * R42) - (z[1] * t2) - (z[6] * t4) + + (z[7] * R74) - (z[5] * R72); + grad_y[3] = (z[0] * t5) - (z[1] * R31) - (z[2] * t3) + (z[7] * t6) + + (z[4] * R81) - (z[6] * R83); + grad_y[4] = (z[5] * t3) + (z[6] * R86) - (z[7] * t2) - (z[0] * t4) - + (z[3] * R81) + (z[1] * R61); + grad_y[5] = (z[6] * t5) - (z[4] * t3) - (z[7] * R75) + (z[1] * t6) - + (z[0] * R52) + (z[2] * R72); + grad_y[6] = (z[7] * t1) - (z[5] * t5) - (z[4] * R86) + (z[2] * t4) - + (z[1] * R63) + (z[3] * R83); + grad_y[7] = (z[4] * t2) - (z[6] * t1) + (z[5] * R75) - (z[3] * t6) - + (z[2] * R74) + (z[0] * R54); } KOKKOS_INLINE_FUNCTION - void operator()( size_type ielem ) const - { - GradScalarType g[NNode] ; + void operator()(size_type ielem) const { + GradScalarType g[NNode]; - const CoordScalarType x[NNode] = { - coords(ielem,0,0), - coords(ielem,0,1), - coords(ielem,0,2), - coords(ielem,0,3), - coords(ielem,0,4), - coords(ielem,0,5), - coords(ielem,0,6), - coords(ielem,0,7) - }; + const CoordScalarType x[NNode] = {coords(ielem, 0, 0), coords(ielem, 0, 1), + coords(ielem, 0, 2), coords(ielem, 0, 3), + coords(ielem, 0, 4), coords(ielem, 0, 5), + coords(ielem, 0, 6), coords(ielem, 0, 7)}; - const CoordScalarType y[NNode] = { - coords(ielem,1,0), - coords(ielem,1,1), - coords(ielem,1,2), - coords(ielem,1,3), - coords(ielem,1,4), - coords(ielem,1,5), - coords(ielem,1,6), - coords(ielem,1,7) - }; + const CoordScalarType y[NNode] = {coords(ielem, 1, 0), coords(ielem, 1, 1), + coords(ielem, 1, 2), coords(ielem, 1, 3), + coords(ielem, 1, 4), coords(ielem, 1, 5), + coords(ielem, 1, 6), coords(ielem, 1, 7)}; - const CoordScalarType z[NNode] = { - coords(ielem,2,0), - coords(ielem,2,1), - coords(ielem,2,2), - coords(ielem,2,3), - coords(ielem,2,4), - coords(ielem,2,5), - coords(ielem,2,6), - coords(ielem,2,7) - }; + const CoordScalarType z[NNode] = {coords(ielem, 2, 0), coords(ielem, 2, 1), + coords(ielem, 2, 2), coords(ielem, 2, 3), + coords(ielem, 2, 4), coords(ielem, 2, 5), + coords(ielem, 2, 6), coords(ielem, 2, 7)}; - grad( z , y , g ); + grad(z, y, g); - grad_op(ielem,0,0) = g[0]; - grad_op(ielem,0,1) = g[1]; - grad_op(ielem,0,2) = g[2]; - grad_op(ielem,0,3) = g[3]; - grad_op(ielem,0,4) = g[4]; - grad_op(ielem,0,5) = g[5]; - grad_op(ielem,0,6) = g[6]; - grad_op(ielem,0,7) = g[7]; + grad_op(ielem, 0, 0) = g[0]; + grad_op(ielem, 0, 1) = g[1]; + grad_op(ielem, 0, 2) = g[2]; + grad_op(ielem, 0, 3) = g[3]; + grad_op(ielem, 0, 4) = g[4]; + grad_op(ielem, 0, 5) = g[5]; + grad_op(ielem, 0, 6) = g[6]; + grad_op(ielem, 0, 7) = g[7]; - grad( x , z , g ); + grad(x, z, g); - grad_op(ielem,1,0) = g[0]; - grad_op(ielem,1,1) = g[1]; - grad_op(ielem,1,2) = g[2]; - grad_op(ielem,1,3) = g[3]; - grad_op(ielem,1,4) = g[4]; - grad_op(ielem,1,5) = g[5]; - grad_op(ielem,1,6) = g[6]; - grad_op(ielem,1,7) = g[7]; + grad_op(ielem, 1, 0) = g[0]; + grad_op(ielem, 1, 1) = g[1]; + grad_op(ielem, 1, 2) = g[2]; + grad_op(ielem, 1, 3) = g[3]; + grad_op(ielem, 1, 4) = g[4]; + grad_op(ielem, 1, 5) = g[5]; + grad_op(ielem, 1, 6) = g[6]; + grad_op(ielem, 1, 7) = g[7]; - grad( y , x , g ); + grad(y, x, g); - grad_op(ielem,2,0) = g[0]; - grad_op(ielem,2,1) = g[1]; - grad_op(ielem,2,2) = g[2]; - grad_op(ielem,2,3) = g[3]; - grad_op(ielem,2,4) = g[4]; - grad_op(ielem,2,5) = g[5]; - grad_op(ielem,2,6) = g[6]; - grad_op(ielem,2,7) = g[7]; + grad_op(ielem, 2, 0) = g[0]; + grad_op(ielem, 2, 1) = g[1]; + grad_op(ielem, 2, 2) = g[2]; + grad_op(ielem, 2, 3) = g[3]; + grad_op(ielem, 2, 4) = g[4]; + grad_op(ielem, 2, 5) = g[5]; + grad_op(ielem, 2, 6) = g[6]; + grad_op(ielem, 2, 7) = g[7]; } //-------------------------------------------------------------------------- struct Init { - typedef typename self_type::execution_space execution_space ; + typedef typename self_type::execution_space execution_space; - elem_coord_type coords ; + elem_coord_type coords; - Init( const elem_coord_type & arg_coords ) - : coords( arg_coords ) {} + Init(const elem_coord_type& arg_coords) : coords(arg_coords) {} KOKKOS_INLINE_FUNCTION - void operator()( size_type ielem ) const - { - coords(ielem,0,0) = 0.; - coords(ielem,1,0) = 0.; - coords(ielem,2,0) = 0.; + void operator()(size_type ielem) const { + coords(ielem, 0, 0) = 0.; + coords(ielem, 1, 0) = 0.; + coords(ielem, 2, 0) = 0.; - coords(ielem,0,1) = 1.; - coords(ielem,1,1) = 0.; - coords(ielem,2,1) = 0.; + coords(ielem, 0, 1) = 1.; + coords(ielem, 1, 1) = 0.; + coords(ielem, 2, 1) = 0.; - coords(ielem,0,2) = 1.; - coords(ielem,1,2) = 1.; - coords(ielem,2,2) = 0.; + coords(ielem, 0, 2) = 1.; + coords(ielem, 1, 2) = 1.; + coords(ielem, 2, 2) = 0.; - coords(ielem,0,3) = 0.; - coords(ielem,1,3) = 1.; - coords(ielem,2,3) = 0.; + coords(ielem, 0, 3) = 0.; + coords(ielem, 1, 3) = 1.; + coords(ielem, 2, 3) = 0.; + coords(ielem, 0, 4) = 0.; + coords(ielem, 1, 4) = 0.; + coords(ielem, 2, 4) = 1.; - coords(ielem,0,4) = 0.; - coords(ielem,1,4) = 0.; - coords(ielem,2,4) = 1.; + coords(ielem, 0, 5) = 1.; + coords(ielem, 1, 5) = 0.; + coords(ielem, 2, 5) = 1.; - coords(ielem,0,5) = 1.; - coords(ielem,1,5) = 0.; - coords(ielem,2,5) = 1.; + coords(ielem, 0, 6) = 1.; + coords(ielem, 1, 6) = 1.; + coords(ielem, 2, 6) = 1.; - coords(ielem,0,6) = 1.; - coords(ielem,1,6) = 1.; - coords(ielem,2,6) = 1.; - - coords(ielem,0,7) = 0.; - coords(ielem,1,7) = 1.; - coords(ielem,2,7) = 1.; + coords(ielem, 0, 7) = 0.; + coords(ielem, 1, 7) = 1.; + coords(ielem, 2, 7) = 1.; } }; //-------------------------------------------------------------------------- - static double test( const int count , const int iter = 1 ) - { - elem_coord_type coord( "coord" , count ); - elem_grad_type grad ( "grad" , count ); + static double test(const int count, const int iter = 1) { + elem_coord_type coord("coord", count); + elem_grad_type grad("grad", count); // Execute the parallel kernels on the arrays: - double dt_min = 0 ; + double dt_min = 0; - Kokkos::parallel_for( count , Init( coord ) ); + Kokkos::parallel_for(count, Init(coord)); execution_space().fence(); - for ( int i = 0 ; i < iter ; ++i ) { - Kokkos::Timer timer ; - Kokkos::parallel_for( count , HexGrad( coord , grad ) ); + for (int i = 0; i < iter; ++i) { + Kokkos::Timer timer; + Kokkos::parallel_for(count, HexGrad(coord, grad)); execution_space().fence(); const double dt = timer.seconds(); - if ( 0 == i ) dt_min = dt ; - else dt_min = dt < dt_min ? dt : dt_min ; + if (0 == i) + dt_min = dt; + else + dt_min = dt < dt_min ? dt : dt_min; } - return dt_min ; + return dt_min; } }; -template< class DeviceType > -void run_test_hexgrad( int exp_beg , int exp_end, int num_trials, const char deviceTypeName[] ) -{ - std::string label_hexgrad ; - label_hexgrad.append( "\"HexGrad< double , " ); - label_hexgrad.append( deviceTypeName ); - label_hexgrad.append( " >\"" ); +template +void run_test_hexgrad(int exp_beg, int exp_end, int num_trials, + const char deviceTypeName[]) { + std::string label_hexgrad; + label_hexgrad.append("\"HexGrad< double , "); + label_hexgrad.append(deviceTypeName); + label_hexgrad.append(" >\""); - for (int i = exp_beg ; i < exp_end ; ++i) { - double min_seconds = 0.0 ; - double max_seconds = 0.0 ; - double avg_seconds = 0.0 ; + for (int i = exp_beg; i < exp_end; ++i) { + double min_seconds = 0.0; + double max_seconds = 0.0; + double avg_seconds = 0.0; - const int parallel_work_length = 1<::test(parallel_work_length) ; + for (int j = 0; j < num_trials; ++j) { + const double seconds = HexGrad::test(parallel_work_length); - if ( 0 == j ) { - min_seconds = seconds ; - max_seconds = seconds ; + if (0 == j) { + min_seconds = seconds; + max_seconds = seconds; + } else { + if (seconds < min_seconds) min_seconds = seconds; + if (seconds > max_seconds) max_seconds = seconds; } - else { - if ( seconds < min_seconds ) min_seconds = seconds ; - if ( seconds > max_seconds ) max_seconds = seconds ; - } - avg_seconds += seconds ; + avg_seconds += seconds; } - avg_seconds /= num_trials ; + avg_seconds /= num_trials; - std::cout << label_hexgrad - << " , " << parallel_work_length - << " , " << min_seconds - << " , " << ( min_seconds / parallel_work_length ) - << std::endl ; + std::cout << label_hexgrad << " , " << parallel_work_length << " , " + << min_seconds << " , " << (min_seconds / parallel_work_length) + << std::endl; } } -TEST_F( default_exec, hexgrad ) { - int exp_beg = 10; - int exp_end = 20; +TEST(default_exec, hexgrad) { + int exp_beg = 10; + int exp_end = 20; int num_trials = 5; - if(command_line_num_args()>1) - exp_beg = atoi(command_line_arg(1)); - if(command_line_num_args()>2) - exp_end = atoi(command_line_arg(2)); - if(command_line_num_args()>3) - num_trials = atoi(command_line_arg(3)); - - EXPECT_NO_THROW(run_test_hexgrad< Kokkos::DefaultExecutionSpace >( exp_beg, exp_end, num_trials, Kokkos::DefaultExecutionSpace::name() )); -} + if (command_line_num_args() > 1) exp_beg = atoi(command_line_arg(1)); + if (command_line_num_args() > 2) exp_end = atoi(command_line_arg(2)); + if (command_line_num_args() > 3) num_trials = atoi(command_line_arg(3)); + EXPECT_NO_THROW(run_test_hexgrad( + exp_beg, exp_end, num_trials, Kokkos::DefaultExecutionSpace::name())); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTestMDRange.hpp b/lib/kokkos/core/perf_test/PerfTestMDRange.hpp index f433451f78..3afff96ff3 100644 --- a/lib/kokkos/core/perf_test/PerfTestMDRange.hpp +++ b/lib/kokkos/core/perf_test/PerfTestMDRange.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,24 +37,21 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ namespace Test { -template< class DeviceType - , typename ScalarType = double - , typename TestLayout = Kokkos::LayoutRight - > -struct MultiDimRangePerf3D -{ +template +struct MultiDimRangePerf3D { typedef DeviceType execution_space; - typedef typename execution_space::size_type size_type; + typedef typename execution_space::size_type size_type; using iterate_type = Kokkos::Iterate; - typedef Kokkos::View view_type; + typedef Kokkos::View view_type; typedef typename view_type::HostMirror host_view_type; view_type A; @@ -62,39 +60,36 @@ struct MultiDimRangePerf3D const long jrange; const long krange; - MultiDimRangePerf3D(const view_type & A_, const view_type & B_, const long &irange_, const long &jrange_, const long &krange_) - : A(A_), B(B_), irange(irange_), jrange(jrange_), krange(krange_) - {} + MultiDimRangePerf3D(const view_type &A_, const view_type &B_, + const long &irange_, const long &jrange_, + const long &krange_) + : A(A_), B(B_), irange(irange_), jrange(jrange_), krange(krange_) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i, const long j, const long k) const - { - A(i,j,k) = 0.25*(ScalarType)( B(i+2,j,k) + B(i+1,j,k) - + B(i,j+2,k) + B(i,j+1,k) - + B(i,j,k+2) + B(i,j,k+1) - + B(i,j,k) ); + void operator()(const long i, const long j, const long k) const { + A(i, j, k) = + 0.25 * (ScalarType)(B(i + 2, j, k) + B(i + 1, j, k) + B(i, j + 2, k) + + B(i, j + 1, k) + B(i, j, k + 2) + B(i, j, k + 1) + + B(i, j, k)); } - struct InitZeroTag {}; -// struct InitViewTag {}; + // struct InitViewTag {}; - struct Init - { - - Init(const view_type & input_, const long &irange_, const long &jrange_, const long &krange_) - : input(input_), irange(irange_), jrange(jrange_), krange(krange_) {} + struct Init { + Init(const view_type &input_, const long &irange_, const long &jrange_, + const long &krange_) + : input(input_), irange(irange_), jrange(jrange_), krange(krange_) {} KOKKOS_INLINE_FUNCTION - void operator()(const long i, const long j, const long k) const - { - input(i,j,k) = 1.0; + void operator()(const long i, const long j, const long k) const { + input(i, j, k) = 1.0; } KOKKOS_INLINE_FUNCTION - void operator()(const InitZeroTag&, const long i, const long j, const long k) const - { - input(i,j,k) = 0; + void operator()(const InitZeroTag &, const long i, const long j, + const long k) const { + input(i, j, k) = 0; } view_type input; @@ -103,166 +98,221 @@ struct MultiDimRangePerf3D const long krange; }; - - static double test_multi_index(const unsigned int icount, const unsigned int jcount, const unsigned int kcount, const unsigned int Ti = 1, const unsigned int Tj = 1, const unsigned int Tk = 1, const long iter = 1) - { - //This test performs multidim range over all dims + static double test_multi_index(const unsigned int icount, + const unsigned int jcount, + const unsigned int kcount, + const unsigned int Ti = 1, + const unsigned int Tj = 1, + const unsigned int Tk = 1, + const long iter = 1) { + // This test performs multidim range over all dims view_type Atest("Atest", icount, jcount, kcount); - view_type Btest("Btest", icount+2, jcount+2, kcount+2); - typedef MultiDimRangePerf3D FunctorType; + view_type Btest("Btest", icount + 2, jcount + 2, kcount + 2); + typedef MultiDimRangePerf3D + FunctorType; double dt_min = 0; // LayoutRight - if ( std::is_same::value ) { - Kokkos::MDRangePolicy, execution_space > policy_initA({{0,0,0}},{{icount,jcount,kcount}},{{Ti,Tj,Tk}}); - Kokkos::MDRangePolicy, execution_space > policy_initB({{0,0,0}},{{icount+2,jcount+2,kcount+2}},{{Ti,Tj,Tk}}); + if (std::is_same::value) { + Kokkos::MDRangePolicy< + Kokkos::Rank<3, iterate_type::Right, iterate_type::Right>, + execution_space> + policy_initA({{0, 0, 0}}, {{icount, jcount, kcount}}, {{Ti, Tj, Tk}}); + Kokkos::MDRangePolicy< + Kokkos::Rank<3, iterate_type::Right, iterate_type::Right>, + execution_space> + policy_initB({{0, 0, 0}}, {{icount + 2, jcount + 2, kcount + 2}}, + {{Ti, Tj, Tk}}); - typedef typename Kokkos::MDRangePolicy, execution_space > MDRangeType; - using tile_type = typename MDRangeType::tile_type; + typedef typename Kokkos::MDRangePolicy< + Kokkos::Rank<3, iterate_type::Right, iterate_type::Right>, + execution_space> + MDRangeType; + using tile_type = typename MDRangeType::tile_type; using point_type = typename MDRangeType::point_type; - Kokkos::MDRangePolicy, execution_space > policy(point_type{{0,0,0}},point_type{{icount,jcount,kcount}},tile_type{{Ti,Tj,Tk}} ); + Kokkos::MDRangePolicy< + Kokkos::Rank<3, iterate_type::Right, iterate_type::Right>, + execution_space> + policy(point_type{{0, 0, 0}}, point_type{{icount, jcount, kcount}}, + tile_type{{Ti, Tj, Tk}}); - Kokkos::parallel_for( policy_initA, Init(Atest, icount, jcount, kcount) ); + Kokkos::parallel_for(policy_initA, Init(Atest, icount, jcount, kcount)); execution_space().fence(); - Kokkos::parallel_for( policy_initB, Init(Btest, icount+2, jcount+2, kcount+2) ); + Kokkos::parallel_for(policy_initB, + Init(Btest, icount + 2, jcount + 2, kcount + 2)); execution_space().fence(); - for (int i = 0; i < iter; ++i) - { - Kokkos::Timer timer; - Kokkos::parallel_for( policy, FunctorType(Atest, Btest, icount, jcount, kcount) ); - execution_space().fence(); - const double dt = timer.seconds(); - if ( 0 == i ) dt_min = dt ; - else dt_min = dt < dt_min ? dt : dt_min ; + for (int i = 0; i < iter; ++i) { + Kokkos::Timer timer; + Kokkos::parallel_for(policy, + FunctorType(Atest, Btest, icount, jcount, kcount)); + execution_space().fence(); + const double dt = timer.seconds(); + if (0 == i) + dt_min = dt; + else + dt_min = dt < dt_min ? dt : dt_min; - //Correctness check - only the first run - if ( 0 == i ) - { - long numErrors = 0; - host_view_type Ahost("Ahost", icount, jcount, kcount); - Kokkos::deep_copy(Ahost, Atest); - host_view_type Bhost("Bhost", icount+2, jcount+2, kcount+2); - Kokkos::deep_copy(Bhost, Btest); + // Correctness check - only the first run + if (0 == i) { + long numErrors = 0; + host_view_type Ahost("Ahost", icount, jcount, kcount); + Kokkos::deep_copy(Ahost, Atest); + host_view_type Bhost("Bhost", icount + 2, jcount + 2, kcount + 2); + Kokkos::deep_copy(Bhost, Btest); - // On KNL, this may vectorize - add print statement to prevent - // Also, compare against epsilon, as vectorization can change bitwise answer - for ( long l = 0; l < static_cast(icount); ++l ) { - for ( long j = 0; j < static_cast(jcount); ++j ) { - for ( long k = 0; k < static_cast(kcount); ++k ) { - ScalarType check = 0.25*(ScalarType)( Bhost(l+2,j,k) + Bhost(l+1,j,k) - + Bhost(l,j+2,k) + Bhost(l,j+1,k) - + Bhost(l,j,k+2) + Bhost(l,j,k+1) - + Bhost(l,j,k) ); - if ( Ahost(l,j,k) - check != 0 ) { - ++numErrors; - std::cout << " Correctness error at index: " << l << ","<, execution_space > policy_initA({{0,0,0}},{{icount,jcount,kcount}},{{Ti,Tj,Tk}}); - Kokkos::MDRangePolicy, execution_space > policy_initB({{0,0,0}},{{icount+2,jcount+2,kcount+2}},{{Ti,Tj,Tk}}); + Kokkos::MDRangePolicy< + Kokkos::Rank<3, iterate_type::Left, iterate_type::Left>, + execution_space> + policy_initA({{0, 0, 0}}, {{icount, jcount, kcount}}, {{Ti, Tj, Tk}}); + Kokkos::MDRangePolicy< + Kokkos::Rank<3, iterate_type::Left, iterate_type::Left>, + execution_space> + policy_initB({{0, 0, 0}}, {{icount + 2, jcount + 2, kcount + 2}}, + {{Ti, Tj, Tk}}); - //typedef typename Kokkos::MDRangePolicy, execution_space > MDRangeType; - //using tile_type = typename MDRangeType::tile_type; - //using point_type = typename MDRangeType::point_type; - //Kokkos::MDRangePolicy, execution_space > policy(point_type{{0,0,0}},point_type{{icount,jcount,kcount}},tile_type{{Ti,Tj,Tk}} ); - Kokkos::MDRangePolicy, execution_space > policy({{0,0,0}},{{icount,jcount,kcount}},{{Ti,Tj,Tk}} ); + // typedef typename Kokkos::MDRangePolicy, execution_space > MDRangeType; + // using tile_type = typename MDRangeType::tile_type; + // using point_type = typename MDRangeType::point_type; + // Kokkos::MDRangePolicy, execution_space > + // policy(point_type{{0,0,0}},point_type{{icount,jcount,kcount}},tile_type{{Ti,Tj,Tk}} + // ); + Kokkos::MDRangePolicy< + Kokkos::Rank<3, iterate_type::Left, iterate_type::Left>, + execution_space> + policy({{0, 0, 0}}, {{icount, jcount, kcount}}, {{Ti, Tj, Tk}}); - Kokkos::parallel_for( policy_initA, Init(Atest, icount, jcount, kcount) ); + Kokkos::parallel_for(policy_initA, Init(Atest, icount, jcount, kcount)); execution_space().fence(); - Kokkos::parallel_for( policy_initB, Init(Btest, icount+2, jcount+2, kcount+2) ); + Kokkos::parallel_for(policy_initB, + Init(Btest, icount + 2, jcount + 2, kcount + 2)); execution_space().fence(); - for (int i = 0; i < iter; ++i) - { - Kokkos::Timer timer; - Kokkos::parallel_for( policy, FunctorType(Atest, Btest, icount, jcount, kcount) ); - execution_space().fence(); - const double dt = timer.seconds(); - if ( 0 == i ) dt_min = dt ; - else dt_min = dt < dt_min ? dt : dt_min ; + for (int i = 0; i < iter; ++i) { + Kokkos::Timer timer; + Kokkos::parallel_for(policy, + FunctorType(Atest, Btest, icount, jcount, kcount)); + execution_space().fence(); + const double dt = timer.seconds(); + if (0 == i) + dt_min = dt; + else + dt_min = dt < dt_min ? dt : dt_min; - //Correctness check - only the first run - if ( 0 == i ) - { - long numErrors = 0; - host_view_type Ahost("Ahost", icount, jcount, kcount); - Kokkos::deep_copy(Ahost, Atest); - host_view_type Bhost("Bhost", icount+2, jcount+2, kcount+2); - Kokkos::deep_copy(Bhost, Btest); + // Correctness check - only the first run + if (0 == i) { + long numErrors = 0; + host_view_type Ahost("Ahost", icount, jcount, kcount); + Kokkos::deep_copy(Ahost, Atest); + host_view_type Bhost("Bhost", icount + 2, jcount + 2, kcount + 2); + Kokkos::deep_copy(Bhost, Btest); - // On KNL, this may vectorize - add print statement to prevent - // Also, compare against epsilon, as vectorization can change bitwise answer - for ( long l = 0; l < static_cast(icount); ++l ) { - for ( long j = 0; j < static_cast(jcount); ++j ) { - for ( long k = 0; k < static_cast(kcount); ++k ) { - ScalarType check = 0.25*(ScalarType)( Bhost(l+2,j,k) + Bhost(l+1,j,k) - + Bhost(l,j+2,k) + Bhost(l,j+1,k) - + Bhost(l,j,k+2) + Bhost(l,j,k+1) - + Bhost(l,j,k) ); - if ( Ahost(l,j,k) - check != 0 ) { - ++numErrors; - std::cout << " Correctness error at index: " << l << ","< -struct RangePolicyCollapseTwo -{ - // RangePolicy for 3D range, but will collapse only 2 dims => like Rank<2> for multi-dim; unroll 2 dims in one-dim +template +struct RangePolicyCollapseTwo { + // RangePolicy for 3D range, but will collapse only 2 dims => like Rank<2> for + // multi-dim; unroll 2 dims in one-dim typedef DeviceType execution_space; - typedef typename execution_space::size_type size_type; + typedef typename execution_space::size_type size_type; typedef TestLayout layout; using iterate_type = Kokkos::Iterate; - typedef Kokkos::View view_type; + typedef Kokkos::View view_type; typedef typename view_type::HostMirror host_view_type; view_type A; @@ -271,165 +321,170 @@ struct RangePolicyCollapseTwo const long jrange; const long krange; - RangePolicyCollapseTwo(view_type & A_, const view_type & B_, const long &irange_, const long &jrange_, const long &krange_) - : A(A_), B(B_) , irange(irange_), jrange(jrange_), krange(krange_) - {} + RangePolicyCollapseTwo(view_type &A_, const view_type &B_, + const long &irange_, const long &jrange_, + const long &krange_) + : A(A_), B(B_), irange(irange_), jrange(jrange_), krange(krange_) {} KOKKOS_INLINE_FUNCTION - void operator()(const long r) const - { - if ( std::is_same::value ) - { -//id(i,j,k) = k + j*Nk + i*Nk*Nj = k + Nk*(j + i*Nj) = k + Nk*r -//r = j + i*Nj - long i = int(r / jrange); - long j = int( r - i*jrange); + void operator()(const long r) const { + if (std::is_same::value) { + // id(i,j,k) = k + j*Nk + i*Nk*Nj = k + Nk*(j + i*Nj) = k + Nk*r + // r = j + i*Nj + long i = int(r / jrange); + long j = int(r - i * jrange); for (int k = 0; k < krange; ++k) { - A(i,j,k) = 0.25*(ScalarType)( B(i+2,j,k) + B(i+1,j,k) - + B(i,j+2,k) + B(i,j+1,k) - + B(i,j,k+2) + B(i,j,k+1) - + B(i,j,k) ); + A(i, j, k) = + 0.25 * (ScalarType)(B(i + 2, j, k) + B(i + 1, j, k) + + B(i, j + 2, k) + B(i, j + 1, k) + + B(i, j, k + 2) + B(i, j, k + 1) + B(i, j, k)); } - } - else if ( std::is_same::value ) - { -//id(i,j,k) = i + j*Ni + k*Ni*Nj = i + Ni*(j + k*Nj) = i + Ni*r -//r = j + k*Nj - long k = int(r / jrange); - long j = int( r - k*jrange); + } else if (std::is_same::value) { + // id(i,j,k) = i + j*Ni + k*Ni*Nj = i + Ni*(j + k*Nj) = i + Ni*r + // r = j + k*Nj + long k = int(r / jrange); + long j = int(r - k * jrange); for (int i = 0; i < irange; ++i) { - A(i,j,k) = 0.25*(ScalarType)( B(i+2,j,k) + B(i+1,j,k) - + B(i,j+2,k) + B(i,j+1,k) - + B(i,j,k+2) + B(i,j,k+1) - + B(i,j,k) ); + A(i, j, k) = + 0.25 * (ScalarType)(B(i + 2, j, k) + B(i + 1, j, k) + + B(i, j + 2, k) + B(i, j + 1, k) + + B(i, j, k + 2) + B(i, j, k + 1) + B(i, j, k)); } } } - - struct Init - { + struct Init { view_type input; const long irange; const long jrange; const long krange; - Init(const view_type & input_, const long &irange_, const long &jrange_, const long &krange_) - : input(input_), irange(irange_), jrange(jrange_), krange(krange_) {} + Init(const view_type &input_, const long &irange_, const long &jrange_, + const long &krange_) + : input(input_), irange(irange_), jrange(jrange_), krange(krange_) {} KOKKOS_INLINE_FUNCTION - void operator()(const long r) const - { - if ( std::is_same::value ) - { - long i = int(r / jrange); - long j = int( r - i*jrange); + void operator()(const long r) const { + if (std::is_same::value) { + long i = int(r / jrange); + long j = int(r - i * jrange); for (int k = 0; k < krange; ++k) { - input(i,j,k) = 1; + input(i, j, k) = 1; } - } - else if ( std::is_same::value ) - { - long k = int(r / jrange); - long j = int( r - k*jrange); + } else if (std::is_same::value) { + long k = int(r / jrange); + long j = int(r - k * jrange); for (int i = 0; i < irange; ++i) { - input(i,j,k) = 1; + input(i, j, k) = 1; } } } }; - - static double test_index_collapse_two(const unsigned int icount, const unsigned int jcount, const unsigned int kcount, const long iter = 1) - { + static double test_index_collapse_two(const unsigned int icount, + const unsigned int jcount, + const unsigned int kcount, + const long iter = 1) { // This test refers to collapsing two dims while using the RangePolicy view_type Atest("Atest", icount, jcount, kcount); - view_type Btest("Btest", icount+2, jcount+2, kcount+2); - typedef RangePolicyCollapseTwo FunctorType; + view_type Btest("Btest", icount + 2, jcount + 2, kcount + 2); + typedef RangePolicyCollapseTwo + FunctorType; long collapse_index_rangeA = 0; long collapse_index_rangeB = 0; - if ( std::is_same::value ) { - collapse_index_rangeA = icount*jcount; - collapse_index_rangeB = (icount+2)*(jcount+2); -// std::cout << " LayoutRight " << std::endl; - } else if ( std::is_same::value ) { - collapse_index_rangeA = kcount*jcount; - collapse_index_rangeB = (kcount+2)*(jcount+2); -// std::cout << " LayoutLeft " << std::endl; + if (std::is_same::value) { + collapse_index_rangeA = icount * jcount; + collapse_index_rangeB = (icount + 2) * (jcount + 2); + // std::cout << " LayoutRight " << std::endl; + } else if (std::is_same::value) { + collapse_index_rangeA = kcount * jcount; + collapse_index_rangeB = (kcount + 2) * (jcount + 2); + // std::cout << " LayoutLeft " << std::endl; } else { - std::cout << " LayoutRight or LayoutLeft required - will pass 0 as range instead " << std::endl; + std::cout << " LayoutRight or LayoutLeft required - will pass 0 as " + "range instead " + << std::endl; exit(-1); } - Kokkos::RangePolicy policy(0, (collapse_index_rangeA) ); - Kokkos::RangePolicy policy_initB(0, (collapse_index_rangeB) ); + Kokkos::RangePolicy policy(0, (collapse_index_rangeA)); + Kokkos::RangePolicy policy_initB(0, + (collapse_index_rangeB)); double dt_min = 0; - Kokkos::parallel_for( policy, Init(Atest,icount,jcount,kcount) ); + Kokkos::parallel_for(policy, Init(Atest, icount, jcount, kcount)); execution_space().fence(); - Kokkos::parallel_for( policy_initB, Init(Btest,icount+2,jcount+2,kcount+2) ); + Kokkos::parallel_for(policy_initB, + Init(Btest, icount + 2, jcount + 2, kcount + 2)); execution_space().fence(); - for (int i = 0; i < iter; ++i) - { + for (int i = 0; i < iter; ++i) { Kokkos::Timer timer; - Kokkos::parallel_for(policy, FunctorType(Atest, Btest, icount, jcount, kcount)); + Kokkos::parallel_for(policy, + FunctorType(Atest, Btest, icount, jcount, kcount)); execution_space().fence(); const double dt = timer.seconds(); - if ( 0 == i ) dt_min = dt ; - else dt_min = dt < dt_min ? dt : dt_min ; + if (0 == i) + dt_min = dt; + else + dt_min = dt < dt_min ? dt : dt_min; - //Correctness check - first iteration only - if ( 0 == i ) - { + // Correctness check - first iteration only + if (0 == i) { long numErrors = 0; host_view_type Ahost("Ahost", icount, jcount, kcount); Kokkos::deep_copy(Ahost, Atest); - host_view_type Bhost("Bhost", icount+2, jcount+2, kcount+2); + host_view_type Bhost("Bhost", icount + 2, jcount + 2, kcount + 2); Kokkos::deep_copy(Bhost, Btest); // On KNL, this may vectorize - add print statement to prevent - // Also, compare against epsilon, as vectorization can change bitwise answer - for ( long l = 0; l < static_cast(icount); ++l ) { - for ( long j = 0; j < static_cast(jcount); ++j ) { - for ( long k = 0; k < static_cast(kcount); ++k ) { - ScalarType check = 0.25*(ScalarType)( Bhost(l+2,j,k) + Bhost(l+1,j,k) - + Bhost(l,j+2,k) + Bhost(l,j+1,k) - + Bhost(l,j,k+2) + Bhost(l,j,k+1) - + Bhost(l,j,k) ); - if ( Ahost(l,j,k) - check != 0 ) { - ++numErrors; - std::cout << " Correctness error at index: " << l << ","< -struct RangePolicyCollapseAll -{ +template +struct RangePolicyCollapseAll { // RangePolicy for 3D range, but will collapse all dims typedef DeviceType execution_space; - typedef typename execution_space::size_type size_type; + typedef typename execution_space::size_type size_type; typedef TestLayout layout; - typedef Kokkos::View view_type; + typedef Kokkos::View view_type; typedef typename view_type::HostMirror host_view_type; view_type A; @@ -438,127 +493,134 @@ struct RangePolicyCollapseAll const long jrange; const long krange; - RangePolicyCollapseAll(view_type & A_, const view_type & B_, const long &irange_, const long &jrange_, const long &krange_) - : A(A_), B(B_), irange(irange_), jrange(jrange_), krange(krange_) - {} + RangePolicyCollapseAll(view_type &A_, const view_type &B_, + const long &irange_, const long &jrange_, + const long &krange_) + : A(A_), B(B_), irange(irange_), jrange(jrange_), krange(krange_) {} KOKKOS_INLINE_FUNCTION - void operator()(const long r) const - { - if ( std::is_same::value ) - { - long i = int(r / (jrange*krange)); - long j = int(( r - i*jrange*krange)/krange); - long k = int(r - i*jrange*krange - j*krange); - A(i,j,k) = 0.25*(ScalarType)( B(i+2,j,k) + B(i+1,j,k) - + B(i,j+2,k) + B(i,j+1,k) - + B(i,j,k+2) + B(i,j,k+1) - + B(i,j,k) ); - } - else if ( std::is_same::value ) - { - long k = int(r / (irange*jrange)); - long j = int(( r - k*irange*jrange)/irange); - long i = int(r - k*irange*jrange - j*irange); - A(i,j,k) = 0.25*(ScalarType)( B(i+2,j,k) + B(i+1,j,k) - + B(i,j+2,k) + B(i,j+1,k) - + B(i,j,k+2) + B(i,j,k+1) - + B(i,j,k) ); + void operator()(const long r) const { + if (std::is_same::value) { + long i = int(r / (jrange * krange)); + long j = int((r - i * jrange * krange) / krange); + long k = int(r - i * jrange * krange - j * krange); + A(i, j, k) = + 0.25 * (ScalarType)(B(i + 2, j, k) + B(i + 1, j, k) + B(i, j + 2, k) + + B(i, j + 1, k) + B(i, j, k + 2) + B(i, j, k + 1) + + B(i, j, k)); + } else if (std::is_same::value) { + long k = int(r / (irange * jrange)); + long j = int((r - k * irange * jrange) / irange); + long i = int(r - k * irange * jrange - j * irange); + A(i, j, k) = + 0.25 * (ScalarType)(B(i + 2, j, k) + B(i + 1, j, k) + B(i, j + 2, k) + + B(i, j + 1, k) + B(i, j, k + 2) + B(i, j, k + 1) + + B(i, j, k)); } } - - struct Init - { + struct Init { view_type input; const long irange; const long jrange; const long krange; - Init(const view_type & input_, const long &irange_, const long &jrange_, const long &krange_) - : input(input_), irange(irange_), jrange(jrange_), krange(krange_) {} + Init(const view_type &input_, const long &irange_, const long &jrange_, + const long &krange_) + : input(input_), irange(irange_), jrange(jrange_), krange(krange_) {} KOKKOS_INLINE_FUNCTION - void operator()(const long r) const - { - if ( std::is_same::value ) - { - long i = int(r / (jrange*krange)); - long j = int(( r - i*jrange*krange)/krange); - long k = int(r - i*jrange*krange - j*krange); - input(i,j,k) = 1; - } - else if ( std::is_same::value ) - { - long k = int(r / (irange*jrange)); - long j = int(( r - k*irange*jrange)/irange); - long i = int(r - k*irange*jrange - j*irange); - input(i,j,k) = 1; + void operator()(const long r) const { + if (std::is_same::value) { + long i = int(r / (jrange * krange)); + long j = int((r - i * jrange * krange) / krange); + long k = int(r - i * jrange * krange - j * krange); + input(i, j, k) = 1; + } else if (std::is_same::value) { + long k = int(r / (irange * jrange)); + long j = int((r - k * irange * jrange) / irange); + long i = int(r - k * irange * jrange - j * irange); + input(i, j, k) = 1; } } }; - - static double test_collapse_all(const unsigned int icount, const unsigned int jcount, const unsigned int kcount, const long iter = 1) - { - //This test refers to collapsing all dims using the RangePolicy + static double test_collapse_all(const unsigned int icount, + const unsigned int jcount, + const unsigned int kcount, + const long iter = 1) { + // This test refers to collapsing all dims using the RangePolicy view_type Atest("Atest", icount, jcount, kcount); - view_type Btest("Btest", icount+2, jcount+2, kcount+2); - typedef RangePolicyCollapseAll FunctorType; + view_type Btest("Btest", icount + 2, jcount + 2, kcount + 2); + typedef RangePolicyCollapseAll + FunctorType; - const long flat_index_range = icount*jcount*kcount; - Kokkos::RangePolicy policy(0, flat_index_range ); - Kokkos::RangePolicy policy_initB(0, (icount+2)*(jcount+2)*(kcount+2) ); + const long flat_index_range = icount * jcount * kcount; + Kokkos::RangePolicy policy(0, flat_index_range); + Kokkos::RangePolicy policy_initB( + 0, (icount + 2) * (jcount + 2) * (kcount + 2)); double dt_min = 0; - Kokkos::parallel_for( policy, Init(Atest,icount,jcount,kcount) ); + Kokkos::parallel_for(policy, Init(Atest, icount, jcount, kcount)); execution_space().fence(); - Kokkos::parallel_for( policy_initB, Init(Btest,icount+2,jcount+2,kcount+2) ); + Kokkos::parallel_for(policy_initB, + Init(Btest, icount + 2, jcount + 2, kcount + 2)); execution_space().fence(); - for (int i = 0; i < iter; ++i) - { + for (int i = 0; i < iter; ++i) { Kokkos::Timer timer; - Kokkos::parallel_for(policy, FunctorType(Atest, Btest, icount, jcount, kcount)); + Kokkos::parallel_for(policy, + FunctorType(Atest, Btest, icount, jcount, kcount)); execution_space().fence(); const double dt = timer.seconds(); - if ( 0 == i ) dt_min = dt ; - else dt_min = dt < dt_min ? dt : dt_min ; + if (0 == i) + dt_min = dt; + else + dt_min = dt < dt_min ? dt : dt_min; - //Correctness check - first iteration only - if ( 0 == i ) - { + // Correctness check - first iteration only + if (0 == i) { long numErrors = 0; host_view_type Ahost("Ahost", icount, jcount, kcount); Kokkos::deep_copy(Ahost, Atest); - host_view_type Bhost("Bhost", icount+2, jcount+2, kcount+2); + host_view_type Bhost("Bhost", icount + 2, jcount + 2, kcount + 2); Kokkos::deep_copy(Bhost, Btest); // On KNL, this may vectorize - add print statement to prevent - // Also, compare against epsilon, as vectorization can change bitwise answer - for ( long l = 0; l < static_cast(icount); ++l ) { - for ( long j = 0; j < static_cast(jcount); ++j ) { - for ( long k = 0; k < static_cast(kcount); ++k ) { - ScalarType check = 0.25*(ScalarType)( Bhost(l+2,j,k) + Bhost(l+1,j,k) - + Bhost(l,j+2,k) + Bhost(l,j+1,k) - + Bhost(l,j,k+2) + Bhost(l,j,k+1) - + Bhost(l,j,k) ); - if ( Ahost(l,j,k) - check != 0 ) { - ++numErrors; - std::cout << " Callapse ALL Correctness error at index: " << l << ","<0) - n_args = n; + if (n > 0) n_args = n; return n_args; } const char* command_line_arg(int k, char** input_args = NULL) { static char** args; - if(input_args != NULL) - args = input_args; - if(command_line_num_args() > k) + if (input_args != NULL) args = input_args; + if (command_line_num_args() > k) return args[k]; else return NULL; } -} +} // namespace Test -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc,argv); - Kokkos::initialize(argc,argv); +int main(int argc, char* argv[]) { + ::testing::InitGoogleTest(&argc, argv); + Kokkos::initialize(argc, argv); - (void) Test::command_line_num_args(argc); - (void) Test::command_line_arg(0,argv); + (void)Test::command_line_num_args(argc); + (void)Test::command_line_arg(0, argv); int result = RUN_ALL_TESTS(); diff --git a/lib/kokkos/core/perf_test/PerfTest_Category.hpp b/lib/kokkos/core/perf_test/PerfTest_Category.hpp index 18e309ab12..c2cff22502 100644 --- a/lib/kokkos/core/perf_test/PerfTest_Category.hpp +++ b/lib/kokkos/core/perf_test/PerfTest_Category.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -51,16 +52,7 @@ namespace Test { extern int command_line_num_args(int n = 0); extern const char* command_line_arg(int k, char** input_args = NULL); -class default_exec : public ::testing::Test { -protected: - static void SetUpTestCase() { - } - - static void TearDownTestCase() { - } -}; - -} // namespace Test +} // namespace Test #define TEST_CATEGORY default_exec #define TEST_EXECSPACE Kokkos::DefaultExecutionSpace diff --git a/lib/kokkos/core/perf_test/PerfTest_CustomReduction.cpp b/lib/kokkos/core/perf_test/PerfTest_CustomReduction.cpp index 5c67084c6e..d06851ec9b 100644 --- a/lib/kokkos/core/perf_test/PerfTest_CustomReduction.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_CustomReduction.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,71 +49,90 @@ #ifdef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA namespace Test { -template +template void custom_reduction_test(int N, int R, int num_trials) { Kokkos::Random_XorShift64_Pool<> rand_pool(183291); - Kokkos::View a("A",N); - Kokkos::fill_random(a,rand_pool,1.0); + Kokkos::View a("A", N); + Kokkos::fill_random(a, rand_pool, 1.0); Scalar max; int team_size = 32; - if ( team_size > Kokkos::DefaultExecutionSpace::concurrency() ) + if (team_size > Kokkos::DefaultExecutionSpace::concurrency()) team_size = Kokkos::DefaultExecutionSpace::concurrency(); // Warm up - Kokkos::parallel_reduce(Kokkos::TeamPolicy<>(N/1024,team_size), KOKKOS_LAMBDA( const Kokkos::TeamPolicy<>::member_type& team, Scalar& lmax) { - Scalar team_max = Scalar(0); - for(int rr = 0; rrlmax) lmax = val; - if((k == 11) && (j==17) && (i==2)) lmax = 11.5; - },Kokkos::Max(t_max)); - if(t_max>thread_max) thread_max = t_max; - },Kokkos::Max(team_max)); - } - if(team_max>lmax) lmax = team_max; - },Kokkos::Max(max)); + Kokkos::parallel_reduce( + Kokkos::TeamPolicy<>(N / 1024, team_size), + KOKKOS_LAMBDA(const Kokkos::TeamPolicy<>::member_type& team, + Scalar& lmax) { + Scalar team_max = Scalar(0); + for (int rr = 0; rr < R; rr++) { + int i = team.league_rank(); + Kokkos::parallel_reduce( + Kokkos::TeamThreadRange(team, 32), + [&](const int& j, Scalar& thread_max) { + Scalar t_max = Scalar(0); + Kokkos::parallel_reduce( + Kokkos::ThreadVectorRange(team, 32), + [&](const int& k, Scalar& max_) { + const Scalar val = a((i * 32 + j) * 32 + k); + if (val > lmax) lmax = val; + if ((k == 11) && (j == 17) && (i == 2)) lmax = 11.5; + }, + Kokkos::Max(t_max)); + if (t_max > thread_max) thread_max = t_max; + }, + Kokkos::Max(team_max)); + } + if (team_max > lmax) lmax = team_max; + }, + Kokkos::Max(max)); // Timing Kokkos::Timer timer; - for(int r = 0; r(N/1024,team_size), KOKKOS_LAMBDA( const Kokkos::TeamPolicy<>::member_type& team, Scalar& lmax) { - Scalar team_max = Scalar(0); - for(int rr = 0; rrlmax) lmax = val; - if((k == 11) && (j==17) && (i==2)) lmax = 11.5; - },Kokkos::Max(t_max)); - if(t_max>thread_max) thread_max = t_max; - },Kokkos::Max(team_max)); - } - if(team_max>lmax) lmax = team_max; - },Kokkos::Max(max)); + for (int r = 0; r < num_trials; r++) { + Kokkos::parallel_reduce( + Kokkos::TeamPolicy<>(N / 1024, team_size), + KOKKOS_LAMBDA(const Kokkos::TeamPolicy<>::member_type& team, + Scalar& lmax) { + Scalar team_max = Scalar(0); + for (int rr = 0; rr < R; rr++) { + int i = team.league_rank(); + Kokkos::parallel_reduce( + Kokkos::TeamThreadRange(team, 32), + [&](const int& j, Scalar& thread_max) { + Scalar t_max = Scalar(0); + Kokkos::parallel_reduce( + Kokkos::ThreadVectorRange(team, 32), + [&](const int& k, Scalar& max_) { + const Scalar val = a((i * 32 + j) * 32 + k); + if (val > lmax) lmax = val; + if ((k == 11) && (j == 17) && (i == 2)) lmax = 11.5; + }, + Kokkos::Max(t_max)); + if (t_max > thread_max) thread_max = t_max; + }, + Kokkos::Max(team_max)); + } + if (team_max > lmax) lmax = team_max; + }, + Kokkos::Max(max)); } double time = timer.seconds(); - printf("%e %e %e\n",time,1.0*N*R*num_trials*sizeof(Scalar)/time/1024/1024/1024,max); + printf("%e %e %e\n", time, + 1.0 * N * R * num_trials * sizeof(Scalar) / time / 1024 / 1024 / 1024, + max); } -TEST_F( default_exec, custom_reduction ) { - int N = 100000; - int R = 1000; +TEST(default_exec, custom_reduction) { + int N = 100000; + int R = 1000; int num_trials = 1; - if(command_line_num_args()>1) - N = atoi(command_line_arg(1)); - if(command_line_num_args()>2) - R = atoi(command_line_arg(2)); - if(command_line_num_args()>3) - num_trials = atoi(command_line_arg(3)); - custom_reduction_test(N,R,num_trials); -} + if (command_line_num_args() > 1) N = atoi(command_line_arg(1)); + if (command_line_num_args() > 2) R = atoi(command_line_arg(2)); + if (command_line_num_args() > 3) num_trials = atoi(command_line_arg(3)); + custom_reduction_test(N, R, num_trials); } +} // namespace Test #endif diff --git a/lib/kokkos/core/perf_test/PerfTest_ExecSpacePartitioning.cpp b/lib/kokkos/core/perf_test/PerfTest_ExecSpacePartitioning.cpp index 2fc889beed..c6d5b2b8d6 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ExecSpacePartitioning.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ExecSpacePartitioning.cpp @@ -2,563 +2,631 @@ #include #include - namespace Test { namespace { - template - struct SpaceInstance { - static ExecSpace create() { - return ExecSpace(); - } - static void destroy(ExecSpace&) { - } - static bool overlap() { - return false; - } - }; +template +struct SpaceInstance { + static ExecSpace create() { return ExecSpace(); } + static void destroy(ExecSpace&) {} + static bool overlap() { return false; } +}; - #ifndef KOKKOS_ENABLE_DEBUG - #ifdef KOKKOS_ENABLE_CUDA - template<> - struct SpaceInstance { - static Kokkos::Cuda create() { - cudaStream_t stream; - cudaStreamCreate(&stream); - return Kokkos::Cuda(stream); +#ifndef KOKKOS_ENABLE_DEBUG +#ifdef KOKKOS_ENABLE_CUDA +template <> +struct SpaceInstance { + static Kokkos::Cuda create() { + cudaStream_t stream; + cudaStreamCreate(&stream); + return Kokkos::Cuda(stream); + } + static void destroy(Kokkos::Cuda& space) { + cudaStream_t stream = space.cuda_stream(); + cudaStreamDestroy(stream); + } + static bool overlap() { + bool value = true; + auto local_rank_str = std::getenv("CUDA_LAUNCH_BLOCKING"); + if (local_rank_str) { + value = (std::atoi(local_rank_str) == 0); } - static void destroy(Kokkos::Cuda& space) { - cudaStream_t stream = space.cuda_stream(); - cudaStreamDestroy(stream); - } - static bool overlap() { - bool value = true; - auto local_rank_str = std::getenv("CUDA_LAUNCH_BLOCKING"); - if(local_rank_str) { - value = (std::atoi(local_rank_str)==0); - } - return value; - } - }; - #endif - #endif -} + return value; + } +}; +#endif +#endif +} // namespace struct FunctorRange { - int M,R; - Kokkos::View a; - FunctorRange(int M_, int R_, Kokkos::View a_):M(M_),R(R_),a(a_){} + int M, R; + Kokkos::View a; + FunctorRange(int M_, int R_, Kokkos::View a_) + : M(M_), R(R_), a(a_) {} KOKKOS_INLINE_FUNCTION - void operator() (const int i) const { - for(int r=0;r a; - FunctorMDRange(int M_, int R_, Kokkos::View a_):M(M_),R(R_),a(a_){} + int M, R; + Kokkos::View a; + FunctorMDRange(int M_, int R_, Kokkos::View a_) + : M(M_), R(R_), a(a_) {} KOKKOS_INLINE_FUNCTION - void operator() (const int i, const int) const { - for(int j=0;j a; - FunctorTeam(int M_, int R_, Kokkos::View a_):M(M_),R(R_),a(a_){} + int M, R; + Kokkos::View a; + FunctorTeam(int M_, int R_, + Kokkos::View a_) + : M(M_), R(R_), a(a_) {} KOKKOS_INLINE_FUNCTION - void operator() (const Kokkos::TeamPolicy::member_type& team) const { + void operator()( + const Kokkos::TeamPolicy::member_type& team) const { int i = team.league_rank(); - for(int r=0;r a; - FunctorRangeReduce(int M_, int R_, Kokkos::View a_):M(M_),R(R_),a(a_){} + int M, R; + Kokkos::View a; + FunctorRangeReduce(int M_, int R_, Kokkos::View a_) + : M(M_), R(R_), a(a_) {} KOKKOS_INLINE_FUNCTION - void operator() (const int i, double& tmp) const { - for(int r=0;r a; - FunctorMDRangeReduce(int M_, int R_, Kokkos::View a_):M(M_),R(R_),a(a_){} + int M, R; + Kokkos::View a; + FunctorMDRangeReduce(int M_, int R_, + Kokkos::View a_) + : M(M_), R(R_), a(a_) {} KOKKOS_INLINE_FUNCTION - void operator() (const int i, const int, double& tmp) const { - for(int j=0;j a; - FunctorTeamReduce(int M_, int R_, Kokkos::View a_):M(M_),R(R_),a(a_){} + int M, R; + Kokkos::View a; + FunctorTeamReduce( + int M_, int R_, + Kokkos::View a_) + : M(M_), R(R_), a(a_) {} KOKKOS_INLINE_FUNCTION - void operator() (const Kokkos::TeamPolicy::member_type& team, double& tmp) const { + void operator()(const Kokkos::TeamPolicy::member_type& team, + double& tmp) const { int i = team.league_rank(); - for(int r=0;r::create(); - TEST_EXECSPACE space2 = SpaceInstance::create(); + TEST_EXECSPACE space; + TEST_EXECSPACE space1 = SpaceInstance::create(); + TEST_EXECSPACE space2 = SpaceInstance::create(); - Kokkos::View a("A",N,M); - FunctorRange f(M,R,a); - FunctorRangeReduce fr(M,R,a); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel0", - Kokkos::RangePolicy(0,N), FunctorRange(M,R,a)); + Kokkos::View a("A", N, M); + FunctorRange f(M, R, a); + FunctorRangeReduce fr(M, R, a); + Kokkos::parallel_for("default_exec::overlap_range_policy::kernel0", + Kokkos::RangePolicy(0, N), + FunctorRange(M, R, a)); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel1", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space1,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel2", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space2,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::fence(); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel1", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space1, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel2", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space2, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::fence(); - Kokkos::Timer timer; - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel3", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel4", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::fence(); + Kokkos::Timer timer; + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel3", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel4", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::fence(); - timer.reset(); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel5", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space1,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , FunctorRange(M,R,a)); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel6", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space2,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , FunctorRange(M,R,a)); - Kokkos::fence(); - double time_overlap = timer.seconds(); + timer.reset(); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel5", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space1, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + FunctorRange(M, R, a)); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel6", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space2, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + FunctorRange(M, R, a)); + Kokkos::fence(); + double time_overlap = timer.seconds(); - timer.reset(); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel7", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel8", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::fence(); - double time_end = timer.seconds(); + timer.reset(); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel7", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel8", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::fence(); + double time_end = timer.seconds(); - if(SpaceInstance::overlap()) { - ASSERT_TRUE( (time_end > 1.5*time_overlap) ); - } - printf("Time RangePolicy: NonOverlap: %lf Time Overlap: %lf\n",time_end,time_overlap); + if (SpaceInstance::overlap()) { + ASSERT_TRUE((time_end > 1.5 * time_overlap)); + } + printf("Time RangePolicy: NonOverlap: %lf Time Overlap: %lf\n", time_end, + time_overlap); - Kokkos::View result("result"); - Kokkos::View result1("result1"); - Kokkos::View result2("result2"); - Kokkos::View h_result("h_result"); - Kokkos::View h_result1("h_result1"); - Kokkos::View h_result2("h_result2"); + Kokkos::View result("result"); + Kokkos::View result1("result1"); + Kokkos::View result2("result2"); + Kokkos::View h_result("h_result"); + Kokkos::View h_result1("h_result1"); + Kokkos::View h_result2("h_result2"); - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); - Kokkos::fence(); - double time_fenced = timer.seconds(); - Kokkos::deep_copy(h_result,result); - - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); - double time_not_fenced = timer.seconds(); - Kokkos::fence(); - if(SpaceInstance::overlap()) { - ASSERT_TRUE(time_fenced>2.0*time_not_fenced); - } + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_range_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); + Kokkos::fence(); + double time_fenced = timer.seconds(); + Kokkos::deep_copy(h_result, result); - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); - Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_range_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); + double time_not_fenced = timer.seconds(); + Kokkos::fence(); + if (SpaceInstance::overlap()) { + ASSERT_TRUE(time_fenced > 2.0 * time_not_fenced); + } + + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_range_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); + Kokkos::parallel_reduce( + "default_exec::overlap_range_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); Kokkos::fence(); double time_no_overlapped_reduce = timer.seconds(); - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space1,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result1); - Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::RangePolicy(space2,0,N), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result2); + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_range_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space1, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result1); + Kokkos::parallel_reduce( + "default_exec::overlap_range_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::RangePolicy(space2, 0, N), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result2); Kokkos::fence(); double time_overlapped_reduce = timer.seconds(); - Kokkos::deep_copy(h_result2,result2); - Kokkos::deep_copy(h_result1,result1); + Kokkos::deep_copy(h_result2, result2); + Kokkos::deep_copy(h_result1, result1); - ASSERT_EQ(h_result1(),h_result()); - ASSERT_EQ(h_result2(),h_result()); + ASSERT_EQ(h_result1(), h_result()); + ASSERT_EQ(h_result2(), h_result()); - if(SpaceInstance::overlap()) { - ASSERT_TRUE(time_overlapped_reduce < 1.5*time_no_overlapped_reduce); - } - printf("Time RangePolicy Reduce: NonOverlap: %lf Time Overlap: %lf\n",time_no_overlapped_reduce,time_overlapped_reduce); - SpaceInstance::destroy(space1); - SpaceInstance::destroy(space2); + if (SpaceInstance::overlap()) { + ASSERT_TRUE(time_overlapped_reduce < 1.5 * time_no_overlapped_reduce); + } + printf("Time RangePolicy Reduce: NonOverlap: %lf Time Overlap: %lf\n", + time_no_overlapped_reduce, time_overlapped_reduce); + SpaceInstance::destroy(space1); + SpaceInstance::destroy(space2); } -TEST_F( default_exec, overlap_mdrange_policy ) { - int N = 200; - int M = 10000; - int R = 10; +TEST(default_exec, overlap_mdrange_policy) { + int N = 200; + int M = 10000; + int R = 10; - TEST_EXECSPACE space; - TEST_EXECSPACE space1 = SpaceInstance::create(); - TEST_EXECSPACE space2 = SpaceInstance::create(); + TEST_EXECSPACE space; + TEST_EXECSPACE space1 = SpaceInstance::create(); + TEST_EXECSPACE space2 = SpaceInstance::create(); - Kokkos::View a("A",N,M); - FunctorMDRange f(M,R,a); - FunctorMDRangeReduce fr(M,R,a); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel0", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>({0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , FunctorMDRange(M,R,a)); + Kokkos::View a("A", N, M); + FunctorMDRange f(M, R, a); + FunctorMDRangeReduce fr(M, R, a); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel0", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>({0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + FunctorMDRange(M, R, a)); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel1", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space1,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel2", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space2,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::fence(); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel1", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space1, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel2", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space2, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::fence(); - Kokkos::Timer timer; - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel3", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel4", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::fence(); + Kokkos::Timer timer; + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel3", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel4", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::fence(); - timer.reset(); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel5", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space1,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , FunctorMDRange(M,R,a)); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel6", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space2,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , FunctorMDRange(M,R,a)); - Kokkos::fence(); - double time_overlap = timer.seconds(); + timer.reset(); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel5", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space1, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + FunctorMDRange(M, R, a)); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel6", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space2, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + FunctorMDRange(M, R, a)); + Kokkos::fence(); + double time_overlap = timer.seconds(); - timer.reset(); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel7", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel8", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::fence(); - double time_end = timer.seconds(); + timer.reset(); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel7", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel8", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::fence(); + double time_end = timer.seconds(); - if(SpaceInstance::overlap()) { - ASSERT_TRUE( (time_end > 1.5*time_overlap) ); - } - printf("Time MDRangePolicy: NonOverlap: %lf Time Overlap: %lf\n",time_end,time_overlap); + if (SpaceInstance::overlap()) { + ASSERT_TRUE((time_end > 1.5 * time_overlap)); + } + printf("Time MDRangePolicy: NonOverlap: %lf Time Overlap: %lf\n", time_end, + time_overlap); - Kokkos::View result("result"); - Kokkos::View result1("result1"); - Kokkos::View result2("result2"); - Kokkos::View h_result("h_result"); - Kokkos::View h_result1("h_result1"); - Kokkos::View h_result2("h_result2"); + Kokkos::View result("result"); + Kokkos::View result1("result1"); + Kokkos::View result2("result2"); + Kokkos::View h_result("h_result"); + Kokkos::View h_result1("h_result1"); + Kokkos::View h_result2("h_result2"); - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); - Kokkos::fence(); - double time_fenced = timer.seconds(); - Kokkos::deep_copy(h_result,result); - - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); - double time_not_fenced = timer.seconds(); - Kokkos::fence(); - if(SpaceInstance::overlap()) { - ASSERT_TRUE(time_fenced>2.0*time_not_fenced); - } + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_mdrange_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); + Kokkos::fence(); + double time_fenced = timer.seconds(); + Kokkos::deep_copy(h_result, result); - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); - Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_mdrange_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); + double time_not_fenced = timer.seconds(); + Kokkos::fence(); + if (SpaceInstance::overlap()) { + ASSERT_TRUE(time_fenced > 2.0 * time_not_fenced); + } + + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_mdrange_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); + Kokkos::parallel_reduce( + "default_exec::overlap_mdrange_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); Kokkos::fence(); double time_no_overlapped_reduce = timer.seconds(); - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space1,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result1); - Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::MDRangePolicy>(space2,{0,0},{N,R}), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result2); + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_mdrange_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space1, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result1); + Kokkos::parallel_reduce( + "default_exec::overlap_mdrange_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::MDRangePolicy>(space2, {0, 0}, + {N, R}), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result2); Kokkos::fence(); double time_overlapped_reduce = timer.seconds(); - Kokkos::deep_copy(h_result2,result2); - Kokkos::deep_copy(h_result1,result1); + Kokkos::deep_copy(h_result2, result2); + Kokkos::deep_copy(h_result1, result1); - ASSERT_EQ(h_result1(),h_result()); - ASSERT_EQ(h_result2(),h_result()); - - if(SpaceInstance::overlap()) { - ASSERT_TRUE(time_overlapped_reduce < 1.5*time_no_overlapped_reduce); - } - printf("Time MDRangePolicy Reduce: NonOverlap: %lf Time Overlap: %lf\n",time_no_overlapped_reduce,time_overlapped_reduce); - SpaceInstance::destroy(space2); - SpaceInstance::destroy(space1); + ASSERT_EQ(h_result1(), h_result()); + ASSERT_EQ(h_result2(), h_result()); + if (SpaceInstance::overlap()) { + ASSERT_TRUE(time_overlapped_reduce < 1.5 * time_no_overlapped_reduce); + } + printf("Time MDRangePolicy Reduce: NonOverlap: %lf Time Overlap: %lf\n", + time_no_overlapped_reduce, time_overlapped_reduce); + SpaceInstance::destroy(space2); + SpaceInstance::destroy(space1); } -TEST_F( default_exec, overlap_team_policy ) { +TEST(default_exec, overlap_team_policy) { int N = 20; - int M = 1000000; - int R = 10; + int M = 1000000; + int R = 10; - TEST_EXECSPACE space; - TEST_EXECSPACE space1 = SpaceInstance::create(); - TEST_EXECSPACE space2 = SpaceInstance::create(); + TEST_EXECSPACE space; + TEST_EXECSPACE space1 = SpaceInstance::create(); + TEST_EXECSPACE space2 = SpaceInstance::create(); - Kokkos::View a("A",N,M); - FunctorTeam f(M,R,a); - FunctorTeamReduce fr(M,R,a); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel0", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , FunctorTeam(M,R,a)); + Kokkos::View a("A", N, M); + FunctorTeam f(M, R, a); + FunctorTeamReduce fr(M, R, a); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel0", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + FunctorTeam(M, R, a)); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel1", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space1,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel2", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space2,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::fence(); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel1", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space1, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel2", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space2, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::fence(); - Kokkos::Timer timer; - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel3", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel4", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::fence(); + Kokkos::Timer timer; + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel3", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel4", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::fence(); - timer.reset(); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel5", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space1,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , FunctorTeam(M,R,a)); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel6", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space2,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , FunctorTeam(M,R,a)); - Kokkos::fence(); - double time_overlap = timer.seconds(); + timer.reset(); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel5", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space1, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + FunctorTeam(M, R, a)); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel6", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space2, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + FunctorTeam(M, R, a)); + Kokkos::fence(); + double time_overlap = timer.seconds(); - timer.reset(); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel7", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::parallel_for("default_exec::overlap_range_policy::kernel8", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , f); - Kokkos::fence(); - double time_end = timer.seconds(); + timer.reset(); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel7", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::parallel_for( + "default_exec::overlap_range_policy::kernel8", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + f); + Kokkos::fence(); + double time_end = timer.seconds(); - if(SpaceInstance::overlap()) { - ASSERT_TRUE( (time_end > 1.5*time_overlap) ); - } - printf("Time TeamPolicy: NonOverlap: %lf Time Overlap: %lf\n",time_end,time_overlap); + if (SpaceInstance::overlap()) { + ASSERT_TRUE((time_end > 1.5 * time_overlap)); + } + printf("Time TeamPolicy: NonOverlap: %lf Time Overlap: %lf\n", time_end, + time_overlap); - Kokkos::View result("result"); - Kokkos::View result1("result1"); - Kokkos::View result2("result2"); - Kokkos::View h_result("h_result"); - Kokkos::View h_result1("h_result1"); - Kokkos::View h_result2("h_result2"); + Kokkos::View result("result"); + Kokkos::View result1("result1"); + Kokkos::View result2("result2"); + Kokkos::View h_result("h_result"); + Kokkos::View h_result1("h_result1"); + Kokkos::View h_result2("h_result2"); - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); - Kokkos::fence(); - double time_fenced = timer.seconds(); - Kokkos::deep_copy(h_result,result); - - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); - double time_not_fenced = timer.seconds(); - Kokkos::fence(); - if(SpaceInstance::overlap()) { - ASSERT_TRUE(time_fenced>2.0*time_not_fenced); - } - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); - Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result); + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_team_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); + Kokkos::fence(); + double time_fenced = timer.seconds(); + Kokkos::deep_copy(h_result, result); + + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_team_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); + double time_not_fenced = timer.seconds(); + Kokkos::fence(); + if (SpaceInstance::overlap()) { + ASSERT_TRUE(time_fenced > 2.0 * time_not_fenced); + } + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_team_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); + Kokkos::parallel_reduce( + "default_exec::overlap_team_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result); Kokkos::fence(); double time_no_overlapped_reduce = timer.seconds(); - timer.reset(); - Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space1,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result1); - Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce", - Kokkos::Experimental::require( - Kokkos::TeamPolicy(space2,N,Kokkos::AUTO), - Kokkos::Experimental::WorkItemProperty::HintLightWeight) - , fr, result2); + timer.reset(); + Kokkos::parallel_reduce( + "default_exec::overlap_team_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space1, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result1); + Kokkos::parallel_reduce( + "default_exec::overlap_team_policy::kernel_reduce", + Kokkos::Experimental::require( + Kokkos::TeamPolicy(space2, N, Kokkos::AUTO), + Kokkos::Experimental::WorkItemProperty::HintLightWeight), + fr, result2); Kokkos::fence(); double time_overlapped_reduce = timer.seconds(); - Kokkos::deep_copy(h_result2,result2); - Kokkos::deep_copy(h_result1,result1); + Kokkos::deep_copy(h_result2, result2); + Kokkos::deep_copy(h_result1, result1); - ASSERT_EQ(h_result1(),h_result()); - ASSERT_EQ(h_result2(),h_result()); + ASSERT_EQ(h_result1(), h_result()); + ASSERT_EQ(h_result2(), h_result()); - if(SpaceInstance::overlap()) { - ASSERT_TRUE(time_overlapped_reduce < 1.5*time_no_overlapped_reduce); - } - printf("Time TeamPolicy Reduce: NonOverlap: %lf Time Overlap: %lf\n",time_no_overlapped_reduce,time_overlapped_reduce); - SpaceInstance::destroy(space1); - SpaceInstance::destroy(space2); -} + if (SpaceInstance::overlap()) { + ASSERT_TRUE(time_overlapped_reduce < 1.5 * time_no_overlapped_reduce); + } + printf("Time TeamPolicy Reduce: NonOverlap: %lf Time Overlap: %lf\n", + time_no_overlapped_reduce, time_overlapped_reduce); + SpaceInstance::destroy(space1); + SpaceInstance::destroy(space2); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewAllocate.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewAllocate.cpp index 685194c150..550316bec9 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewAllocate.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewAllocate.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,102 +49,112 @@ namespace Test { -template +template void run_allocateview_tests(int N, int R) { const int N1 = N; - const int N2 = N*N; - const int N3 = N2*N; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N * N; + const int N3 = N2 * N; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time1,time2,time3,time4,time5,time6,time7,time8,time_raw = 100000.0; + double time1, time2, time3, time4, time5, time6, time7, time8, + time_raw = 100000.0; { Kokkos::Timer timer; - for(int r=0; r a("A1",N8); + for (int r = 0; r < R; r++) { + Kokkos::View a("A1", N8); } - time1 = timer.seconds()/R; + time1 = timer.seconds() / R; } { Kokkos::Timer timer; - for(int r=0; r a("A2",N4,N4); + for (int r = 0; r < R; r++) { + Kokkos::View a("A2", N4, N4); } - time2 = timer.seconds()/R; + time2 = timer.seconds() / R; } { Kokkos::Timer timer; - for(int r=0; r a("A3",N3,N3,N2); + for (int r = 0; r < R; r++) { + Kokkos::View a("A3", N3, N3, N2); } - time3 = timer.seconds()/R; + time3 = timer.seconds() / R; } { Kokkos::Timer timer; - for(int r=0; r a("A4",N2,N2,N2,N2); + for (int r = 0; r < R; r++) { + Kokkos::View a("A4", N2, N2, N2, N2); } - time4 = timer.seconds()/R; + time4 = timer.seconds() / R; } { Kokkos::Timer timer; - for(int r=0; r a("A5",N2,N2,N1,N1,N2); + for (int r = 0; r < R; r++) { + Kokkos::View a("A5", N2, N2, N1, N1, N2); } - time5 = timer.seconds()/R; + time5 = timer.seconds() / R; } { Kokkos::Timer timer; - for(int r=0; r a("A6",N2,N1,N1,N1,N1,N2); + for (int r = 0; r < R; r++) { + Kokkos::View a("A6", N2, N1, N1, N1, N1, N2); } - time6 = timer.seconds()/R; + time6 = timer.seconds() / R; } { Kokkos::Timer timer; - for(int r=0; r a("A7",N2,N1,N1,N1,N1,N1,N1); + for (int r = 0; r < R; r++) { + Kokkos::View a("A7", N2, N1, N1, N1, N1, N1, N1); } - time7 = timer.seconds()/R; + time7 = timer.seconds() / R; } { Kokkos::Timer timer; - for(int r=0; r a("A8",N1,N1,N1,N1,N1,N1,N1,N1); + for (int r = 0; r < R; r++) { + Kokkos::View a("A8", N1, N1, N1, N1, N1, N1, N1, + N1); } - time8 = timer.seconds()/R; + time8 = timer.seconds() / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { Kokkos::Timer timer; - for(int r=0;r(10,1); + run_allocateview_tests(10, 1); printf("Create View Performance for LayoutRight:\n"); - run_allocateview_tests(10,1); + run_allocateview_tests(10, 1); } -} +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy.hpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy.hpp index eff31c69bb..8e7bf25e80 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy.hpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,204 +49,213 @@ namespace Test { -template -double deepcopy_view (ViewTypeA& a, ViewTypeB& b, int repeat){ +template +double deepcopy_view(ViewTypeA& a, ViewTypeB& b, int repeat) { Kokkos::Timer timer; - for(int i=0; i +template void run_deepcopyview_tests123(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N3 = N2*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N3 = N2 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time1,time2,time3,time_raw = 100000.0; + double time1, time2, time3, time_raw = 100000.0; { - Kokkos::View a("A1",N8); - Kokkos::View b("B1",N8); - time1 = deepcopy_view(a,b,R)/R; + Kokkos::View a("A1", N8); + Kokkos::View b("B1", N8); + time1 = deepcopy_view(a, b, R) / R; } { - Kokkos::View a("A2",N4,N4); - Kokkos::View b("B2",N4,N4); - time2 = deepcopy_view(a,b,R)/R; + Kokkos::View a("A2", N4, N4); + Kokkos::View b("B2", N4, N4); + time2 = deepcopy_view(a, b, R) / R; } { - Kokkos::View a("A3",N3,N3,N2); - Kokkos::View b("B3",N3,N3,N2); - time3 = deepcopy_view(a,b,R)/R; + Kokkos::View a("A3", N3, N3, N2); + Kokkos::View b("B3", N3, N3, N2); + time3 = deepcopy_view(a, b, R) / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); - Kokkos::View b("B1",N8); - double* const a_ptr = a.data(); + Kokkos::View a("A1", N8); + Kokkos::View b("B1", N8); + double* const a_ptr = a.data(); const double* const b_ptr = b.data(); Kokkos::Timer timer; - for(int r=0;r +template void run_deepcopyview_tests45(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time4,time5,time_raw = 100000.0; + double time4, time5, time_raw = 100000.0; { - Kokkos::View a("A4",N2,N2,N2,N2); - Kokkos::View b("B4",N2,N2,N2,N2); - time4 = deepcopy_view(a,b,R)/R; + Kokkos::View a("A4", N2, N2, N2, N2); + Kokkos::View b("B4", N2, N2, N2, N2); + time4 = deepcopy_view(a, b, R) / R; } { - Kokkos::View a("A5",N2,N2,N1,N1,N2); - Kokkos::View b("B5",N2,N2,N1,N1,N2); - time5 = deepcopy_view(a,b,R)/R; + Kokkos::View a("A5", N2, N2, N1, N1, N2); + Kokkos::View b("B5", N2, N2, N1, N1, N2); + time5 = deepcopy_view(a, b, R) / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); - Kokkos::View b("B1",N8); - double* const a_ptr = a.data(); + Kokkos::View a("A1", N8); + Kokkos::View b("B1", N8); + double* const a_ptr = a.data(); const double* const b_ptr = b.data(); Kokkos::Timer timer; - for(int r=0;r +template void run_deepcopyview_tests6(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time6,time_raw = 100000.0; + double time6, time_raw = 100000.0; { - Kokkos::View a("A6",N2,N1,N1,N1,N1,N2); - Kokkos::View b("B6",N2,N1,N1,N1,N1,N2); - time6 = deepcopy_view(a,b,R)/R; + Kokkos::View a("A6", N2, N1, N1, N1, N1, N2); + Kokkos::View b("B6", N2, N1, N1, N1, N1, N2); + time6 = deepcopy_view(a, b, R) / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); - Kokkos::View b("B1",N8); - double* const a_ptr = a.data(); + Kokkos::View a("A1", N8); + Kokkos::View b("B1", N8); + double* const a_ptr = a.data(); const double* const b_ptr = b.data(); Kokkos::Timer timer; - for(int r=0;r +template void run_deepcopyview_tests7(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time7,time_raw = 100000.0; + double time7, time_raw = 100000.0; { - Kokkos::View a("A7",N2,N1,N1,N1,N1,N1,N1); - Kokkos::View b("B7",N2,N1,N1,N1,N1,N1,N1); - time7 = deepcopy_view(a,b,R)/R; + Kokkos::View a("A7", N2, N1, N1, N1, N1, N1, N1); + Kokkos::View b("B7", N2, N1, N1, N1, N1, N1, N1); + time7 = deepcopy_view(a, b, R) / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); - Kokkos::View b("B1",N8); - double* const a_ptr = a.data(); + Kokkos::View a("A1", N8); + Kokkos::View b("B1", N8); + double* const a_ptr = a.data(); const double* const b_ptr = b.data(); Kokkos::Timer timer; - for(int r=0;r +template void run_deepcopyview_tests8(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time8,time_raw = 100000.0; + double time8, time_raw = 100000.0; { - Kokkos::View a("A8",N1,N1,N1,N1,N1,N1,N1,N1); - Kokkos::View b("B8",N1,N1,N1,N1,N1,N1,N1,N1); - time8 = deepcopy_view(a,b,R)/R; + Kokkos::View a("A8", N1, N1, N1, N1, N1, N1, N1, + N1); + Kokkos::View b("B8", N1, N1, N1, N1, N1, N1, N1, + N1); + time8 = deepcopy_view(a, b, R) / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); - Kokkos::View b("B1",N8); - double* const a_ptr = a.data(); + Kokkos::View a("A1", N8); + Kokkos::View b("B1", N8); + double* const a_ptr = a.data(); const double* const b_ptr = b.data(); Kokkos::Timer timer; - for(int r=0;r +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_LeftLeft_Rank123 ) { +TEST(default_exec, ViewDeepCopy_LeftLeft_Rank123) { printf("DeepCopy Performance for LayoutLeft to LayoutLeft:\n"); - run_deepcopyview_tests123(10,1); -} + run_deepcopyview_tests123(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a45.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a45.cpp index b7fa71b06f..3f9b694461 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a45.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a45.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_LeftLeft_Rank45 ) { +TEST(default_exec, ViewDeepCopy_LeftLeft_Rank45) { printf("DeepCopy Performance for LayoutLeft to LayoutLeft:\n"); - run_deepcopyview_tests45(10,1); -} + run_deepcopyview_tests45(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a6.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a6.cpp index ee86af41b0..ac364c31cb 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a6.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a6.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_LeftLeft_Rank6 ) { +TEST(default_exec, ViewDeepCopy_LeftLeft_Rank6) { printf("DeepCopy Performance for LayoutLeft to LayoutLeft:\n"); - run_deepcopyview_tests6(10,1); -} + run_deepcopyview_tests6(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a7.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a7.cpp index 5a7a78a196..94f30bac9f 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a7.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a7.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_LeftLeft_Rank7 ) { +TEST(default_exec, ViewDeepCopy_LeftLeft_Rank7) { printf("DeepCopy Performance for LayoutLeft to LayoutLeft:\n"); - run_deepcopyview_tests7(10,1); -} + run_deepcopyview_tests7(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a8.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a8.cpp index cc0d7a6c2a..b916169f1b 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a8.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_a8.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_LeftLeft_Rank8 ) { +TEST(default_exec, ViewDeepCopy_LeftLeft_Rank8) { printf("DeepCopy Performance for LayoutLeft to LayoutLeft:\n"); - run_deepcopyview_tests8(10,1); -} + run_deepcopyview_tests8(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b123.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b123.cpp index eb9921d090..f314cb0ff4 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b123.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b123.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_RightRight_Rank123 ) { +TEST(default_exec, ViewDeepCopy_RightRight_Rank123) { printf("DeepCopy Performance for LayoutRight to LayoutRight:\n"); - run_deepcopyview_tests123(10,1); -} + run_deepcopyview_tests123(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b45.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b45.cpp index b805c4c7fc..5d06f060af 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b45.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b45.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_RightRight_Rank45 ) { +TEST(default_exec, ViewDeepCopy_RightRight_Rank45) { printf("DeepCopy Performance for LayoutRight to LayoutRight:\n"); - run_deepcopyview_tests45(10,1); -} + run_deepcopyview_tests45(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b6.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b6.cpp index 8f350f4895..0e28fee631 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b6.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b6.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_RightRight_Rank6 ) { +TEST(default_exec, ViewDeepCopy_RightRight_Rank6) { printf("DeepCopy Performance for LayoutRight to LayoutRight:\n"); - run_deepcopyview_tests6(10,1); -} + run_deepcopyview_tests6(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b7.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b7.cpp index 6f82e178f9..37e1325fc4 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b7.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b7.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_RightRight_Rank7 ) { +TEST(default_exec, ViewDeepCopy_RightRight_Rank7) { printf("DeepCopy Performance for LayoutRight to LayoutRight:\n"); - run_deepcopyview_tests7(10,1); -} + run_deepcopyview_tests7(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b8.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b8.cpp index ef165c9a35..986c39aaf4 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b8.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_b8.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_RightRight_Rank8 ) { +TEST(default_exec, ViewDeepCopy_RightRight_Rank8) { printf("DeepCopy Performance for LayoutRight to LayoutRight:\n"); - run_deepcopyview_tests8(10,1); -} + run_deepcopyview_tests8(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c123.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c123.cpp index ebc924d9f0..b98563ee42 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c123.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c123.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_LeftRight_Rank123 ) { +TEST(default_exec, ViewDeepCopy_LeftRight_Rank123) { printf("DeepCopy Performance for LayoutLeft to LayoutRight:\n"); - run_deepcopyview_tests123(10,1); -} + run_deepcopyview_tests123(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c45.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c45.cpp index a8a7935640..a0ef11e09b 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c45.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c45.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_LeftRight_Rank45 ) { +TEST(default_exec, ViewDeepCopy_LeftRight_Rank45) { printf("DeepCopy Performance for LayoutLeft to LayoutRight:\n"); - run_deepcopyview_tests45(10,1); -} + run_deepcopyview_tests45(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c6.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c6.cpp index c65c17c55b..fea5dde73a 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c6.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c6.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_LeftRight_Rank6 ) { +TEST(default_exec, ViewDeepCopy_LeftRight_Rank6) { printf("DeepCopy Performance for LayoutLeft to LayoutRight:\n"); - run_deepcopyview_tests6(10,1); -} + run_deepcopyview_tests6(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c7.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c7.cpp index 48fcf053e6..a8c8d866f9 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c7.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c7.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_LeftRight_Rank7 ) { +TEST(default_exec, ViewDeepCopy_LeftRight_Rank7) { printf("DeepCopy Performance for LayoutLeft to LayoutRight:\n"); - run_deepcopyview_tests7(10,1); -} + run_deepcopyview_tests7(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c8.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c8.cpp index 46e5798c8f..e5abdaa5d8 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c8.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_c8.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_LeftRight_Rank8 ) { +TEST(default_exec, ViewDeepCopy_LeftRight_Rank8) { printf("DeepCopy Performance for LayoutLeft to LayoutRight:\n"); - run_deepcopyview_tests8(10,1); -} + run_deepcopyview_tests8(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d123.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d123.cpp index ad0f455cfc..2b58f8dd1f 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d123.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d123.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_RightLeft_Rank123 ) { +TEST(default_exec, ViewDeepCopy_RightLeft_Rank123) { printf("DeepCopy Performance for LayoutRight to LayoutLeft:\n"); - run_deepcopyview_tests123(10,1); -} + run_deepcopyview_tests123(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d45.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d45.cpp index 4853e343dd..fe34e4fd1a 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d45.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d45.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_RightLeft_Rank45 ) { +TEST(default_exec, ViewDeepCopy_RightLeft_Rank45) { printf("DeepCopy Performance for LayoutRight to LayoutLeft:\n"); - run_deepcopyview_tests45(10,1); -} + run_deepcopyview_tests45(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d6.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d6.cpp index 1ce1041458..115b223e68 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d6.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d6.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_RightLeft_Rank6 ) { +TEST(default_exec, ViewDeepCopy_RightLeft_Rank6) { printf("DeepCopy Performance for LayoutRight to LayoutLeft:\n"); - run_deepcopyview_tests6(10,1); -} + run_deepcopyview_tests6(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d7.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d7.cpp index af73733e64..51e88795e7 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d7.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d7.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_RightLeft_Rank7 ) { +TEST(default_exec, ViewDeepCopy_RightLeft_Rank7) { printf("DeepCopy Performance for LayoutRight to LayoutLeft:\n"); - run_deepcopyview_tests7(10,1); -} + run_deepcopyview_tests7(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d8.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d8.cpp index 3c9b9934cb..2a53cdef21 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d8.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewCopy_d8.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,10 +42,10 @@ //@HEADER */ -#include +#include namespace Test { -TEST_F( default_exec, ViewDeepCopy_RightLeft_Rank8 ) { +TEST(default_exec, ViewDeepCopy_RightLeft_Rank8) { printf("DeepCopy Performance for LayoutRight to LayoutLeft:\n"); - run_deepcopyview_tests8(10,1); -} + run_deepcopyview_tests8(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewFill.hpp b/lib/kokkos/core/perf_test/PerfTest_ViewFill.hpp index b17356f0c8..38be4bb212 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewFill.hpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewFill.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,186 +49,195 @@ namespace Test { -template -double fill_view (ViewType& a, typename ViewType::const_value_type& val, int repeat){ +template +double fill_view(ViewType& a, typename ViewType::const_value_type& val, + int repeat) { Kokkos::Timer timer; - for(int i=0; i +template void run_fillview_tests123(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N3 = N2*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N3 = N2 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time1,time2,time3,time_raw = 100000.0; + double time1, time2, time3, time_raw = 100000.0; { - Kokkos::View a("A1",N8); - time1 = fill_view(a,1.1,R)/R; + Kokkos::View a("A1", N8); + time1 = fill_view(a, 1.1, R) / R; } { - Kokkos::View a("A2",N4,N4); - time2 = fill_view(a,1.1,R)/R; + Kokkos::View a("A2", N4, N4); + time2 = fill_view(a, 1.1, R) / R; } { - Kokkos::View a("A3",N3,N3,N2); - time3 = fill_view(a,1.1,R)/R; + Kokkos::View a("A3", N3, N3, N2); + time3 = fill_view(a, 1.1, R) / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); + Kokkos::View a("A1", N8); double* a_ptr = a.data(); Kokkos::Timer timer; - for(int r=0;r +template void run_fillview_tests45(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time4,time5,time_raw = 100000.0; + double time4, time5, time_raw = 100000.0; { - Kokkos::View a("A4",N2,N2,N2,N2); - time4 = fill_view(a,1.1,R)/R; + Kokkos::View a("A4", N2, N2, N2, N2); + time4 = fill_view(a, 1.1, R) / R; } { - Kokkos::View a("A5",N2,N2,N1,N1,N2); - time5 = fill_view(a,1.1,R)/R; + Kokkos::View a("A5", N2, N2, N1, N1, N2); + time5 = fill_view(a, 1.1, R) / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); + Kokkos::View a("A1", N8); double* a_ptr = a.data(); Kokkos::Timer timer; - for(int r=0;r +template void run_fillview_tests6(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time6,time_raw = 100000.0; + double time6, time_raw = 100000.0; { - Kokkos::View a("A6",N2,N1,N1,N1,N1,N2); - time6 = fill_view(a,1.1,R)/R; + Kokkos::View a("A6", N2, N1, N1, N1, N1, N2); + time6 = fill_view(a, 1.1, R) / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); + Kokkos::View a("A1", N8); double* a_ptr = a.data(); Kokkos::Timer timer; - for(int r=0;r +template void run_fillview_tests7(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time7,time_raw = 100000.0; + double time7, time_raw = 100000.0; { - Kokkos::View a("A7",N2,N1,N1,N1,N1,N1,N1); - time7 = fill_view(a,1.1,R)/R; + Kokkos::View a("A7", N2, N1, N1, N1, N1, N1, N1); + time7 = fill_view(a, 1.1, R) / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); + Kokkos::View a("A1", N8); double* a_ptr = a.data(); Kokkos::Timer timer; - for(int r=0;r +template void run_fillview_tests8(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time8,time_raw = 100000.0; + double time8, time_raw = 100000.0; { - Kokkos::View a("A8",N1,N1,N1,N1,N1,N1,N1,N1); - time8 = fill_view(a,1.1,R)/R; + Kokkos::View a("A8", N1, N1, N1, N1, N1, N1, N1, + N1); + time8 = fill_view(a, 1.1, R) / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); + Kokkos::View a("A1", N8); double* a_ptr = a.data(); Kokkos::Timer timer; - for(int r=0;r namespace Test { -TEST_F( default_exec, ViewFill_Rank123 ) { +TEST(default_exec, ViewFill_Rank123) { printf("ViewFill Performance for LayoutLeft:\n"); - run_fillview_tests123(10,1); + run_fillview_tests123(10, 1); printf("ViewFill Performance for LayoutRight:\n"); - run_fillview_tests123(10,1); -} + run_fillview_tests123(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewFill_45.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewFill_45.cpp index e1d1b6900d..53ac509da8 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewFill_45.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewFill_45.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,10 +45,10 @@ #include namespace Test { -TEST_F( default_exec, ViewFill_Rank45 ) { +TEST(default_exec, ViewFill_Rank45) { printf("ViewFill Performance for LayoutLeft:\n"); - run_fillview_tests45(10,1); + run_fillview_tests45(10, 1); printf("ViewFill Performance for LayoutRight:\n"); - run_fillview_tests45(10,1); -} + run_fillview_tests45(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewFill_6.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewFill_6.cpp index 571867937e..f0a2e248f2 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewFill_6.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewFill_6.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,10 +45,10 @@ #include namespace Test { -TEST_F( default_exec, ViewFill_Rank6 ) { +TEST(default_exec, ViewFill_Rank6) { printf("ViewFill Performance for LayoutLeft:\n"); - run_fillview_tests6(10,1); + run_fillview_tests6(10, 1); printf("ViewFill Performance for LayoutRight:\n"); - run_fillview_tests6(10,1); -} + run_fillview_tests6(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewFill_7.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewFill_7.cpp index 9b89c8fc7b..675d9e636f 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewFill_7.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewFill_7.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,10 +45,10 @@ #include namespace Test { -TEST_F( default_exec, ViewFill_Rank7 ) { +TEST(default_exec, ViewFill_Rank7) { printf("ViewFill Performance for LayoutLeft:\n"); - run_fillview_tests7(10,1); + run_fillview_tests7(10, 1); printf("ViewFill Performance for LayoutRight:\n"); - run_fillview_tests7(10,1); -} + run_fillview_tests7(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewFill_8.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewFill_8.cpp index 4d3df50354..35e1e81c43 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewFill_8.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewFill_8.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,10 +45,10 @@ #include namespace Test { -TEST_F( default_exec, ViewFill_Rank8 ) { +TEST(default_exec, ViewFill_Rank8) { printf("ViewFill Performance for LayoutLeft:\n"); - run_fillview_tests8(10,1); + run_fillview_tests8(10, 1); printf("ViewFill Performance for LayoutRight:\n"); - run_fillview_tests8(10,1); -} + run_fillview_tests8(10, 1); } +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewResize.hpp b/lib/kokkos/core/perf_test/PerfTest_ViewResize.hpp index b5019b467a..2ea81b5046 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewResize.hpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewResize.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,230 +49,340 @@ namespace Test { -template +template void run_resizeview_tests123(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N3 = N2*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N3 = N2 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time1,time2,time3,time_raw = 100000.0; + double time1, time2, time3, time_raw = 100000.0; + double time1_noinit, time2_noinit, time3_noinit; { - Kokkos::View a("A1",N8); + Kokkos::View a("A1", N8); Kokkos::Timer timer; - for(int r=0; r a_(a); - Kokkos::resize(a_,int(N8*1.1)); + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(a_, int(N8 * 1.1)); } - time1 = timer.seconds()/R; + time1 = timer.seconds() / R; } { - Kokkos::View a("A2",N4,N4); + Kokkos::View a("A2", N4, N4); Kokkos::Timer timer; - for(int r=0; r a_(a); - Kokkos::resize(a_,int(N4*1.1),N4); + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(a_, int(N4 * 1.1), N4); } - time2 = timer.seconds()/R; + time2 = timer.seconds() / R; } { - Kokkos::View a("A3",N3,N3,N2); + Kokkos::View a("A3", N3, N3, N2); Kokkos::Timer timer; - for(int r=0; r a_(a); - Kokkos::resize(a_,int(N3*1.1),N3,N2); + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(a_, int(N3 * 1.1), N3, N2); } - time3 = timer.seconds()/R; + time3 = timer.seconds() / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); + Kokkos::View a("A1", N8); + Kokkos::Timer timer; + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(Kokkos::WithoutInitializing, a_, int(N8 * 1.1)); + } + time1_noinit = timer.seconds() / R; + } + { + Kokkos::View a("A2", N4, N4); + Kokkos::Timer timer; + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(Kokkos::WithoutInitializing, a_, int(N4 * 1.1), N4); + } + time2_noinit = timer.seconds() / R; + } + { + Kokkos::View a("A3", N3, N3, N2); + Kokkos::Timer timer; + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(Kokkos::WithoutInitializing, a_, int(N3 * 1.1), N3, N2); + } + time3_noinit = timer.seconds() / R; + } +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) + { + Kokkos::View a("A1", N8); double* a_ptr = a.data(); Kokkos::Timer timer; - for(int r=0;r a1(Kokkos::ViewAllocateWithoutInitializing("A1"),int(N8*1.1)); + for (int r = 0; r < R; r++) { + Kokkos::View a1( + Kokkos::ViewAllocateWithoutInitializing("A1"), int(N8 * 1.1)); double* a1_ptr = a1.data(); - Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) { - a1_ptr[i] = a_ptr[i]; - }); + Kokkos::parallel_for( + N8, KOKKOS_LAMBDA(const int& i) { a1_ptr[i] = a_ptr[i]; }); Kokkos::fence(); } Kokkos::fence(); - time_raw = timer.seconds()/R; + time_raw = timer.seconds() / R; } - #endif - double size = 1.0*N8*8/1024/1024; - printf(" Raw: %lf s %lf MB %lf GB/s\n",time_raw,size,2.0*size/1024/time_raw); - printf(" Rank1: %lf s %lf MB %lf GB/s\n",time1,size,2.0*size/1024/time1); - printf(" Rank2: %lf s %lf MB %lf GB/s\n",time2,size,2.0*size/1024/time2); - printf(" Rank3: %lf s %lf MB %lf GB/s\n",time3,size,2.0*size/1024/time3); +#endif + double size = 1.0 * N8 * 8 / 1024 / 1024; + printf(" Raw: %lf s %lf MB %lf GB/s\n", time_raw, size, + 2.0 * size / 1024 / time_raw); + printf(" Rank1: %lf s %lf MB %lf GB/s\n", time1, size, + 2.0 * size / 1024 / time1); + printf(" Rank2: %lf s %lf MB %lf GB/s\n", time2, size, + 2.0 * size / 1024 / time2); + printf(" Rank3: %lf s %lf MB %lf GB/s\n", time3, size, + 2.0 * size / 1024 / time3); + printf(" Rank1 (WithoutInitializing): %lf s %lf MB %lf GB/s\n", + time1_noinit, size, 2.0 * size / 1024 / time1_noinit); + printf(" Rank2 (WithoutInitializing): %lf s %lf MB %lf GB/s\n", + time2_noinit, size, 2.0 * size / 1024 / time2_noinit); + printf(" Rank3 (WithoutInitializing): %lf s %lf MB %lf GB/s\n", + time3_noinit, size, 2.0 * size / 1024 / time3_noinit); } -template +template void run_resizeview_tests45(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time4,time5,time_raw = 100000.0; + double time4, time5, time_raw = 100000.0; + double time4_noinit, time5_noinit; { - Kokkos::View a("A4",N2,N2,N2,N2); + Kokkos::View a("A4", N2, N2, N2, N2); Kokkos::Timer timer; - for(int r=0; r a_(a); - Kokkos::resize(a_,int(N2*1.1),N2,N2,N2); + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(a_, int(N2 * 1.1), N2, N2, N2); } - time4 = timer.seconds()/R; + time4 = timer.seconds() / R; } { - Kokkos::View a("A5",N2,N2,N1,N1,N2); + Kokkos::View a("A5", N2, N2, N1, N1, N2); Kokkos::Timer timer; - for(int r=0; r a_(a); - Kokkos::resize(a_,int(N2*1.1),N2,N1,N1,N2); + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(a_, int(N2 * 1.1), N2, N1, N1, N2); } - time5 = timer.seconds()/R; + time5 = timer.seconds() / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); + Kokkos::View a("A4", N2, N2, N2, N2); + Kokkos::Timer timer; + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(Kokkos::WithoutInitializing, a_, int(N2 * 1.1), N2, N2, + N2); + } + time4_noinit = timer.seconds() / R; + } + { + Kokkos::View a("A5", N2, N2, N1, N1, N2); + Kokkos::Timer timer; + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(Kokkos::WithoutInitializing, a_, int(N2 * 1.1), N2, N1, N1, + N2); + } + time5_noinit = timer.seconds() / R; + } +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) + { + Kokkos::View a("A1", N8); double* a_ptr = a.data(); Kokkos::Timer timer; - for(int r=0;r a1(Kokkos::ViewAllocateWithoutInitializing("A1"),int(N8*1.1)); + for (int r = 0; r < R; r++) { + Kokkos::View a1( + Kokkos::ViewAllocateWithoutInitializing("A1"), int(N8 * 1.1)); double* a1_ptr = a1.data(); - Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) { - a1_ptr[i] = a_ptr[i]; - }); + Kokkos::parallel_for( + N8, KOKKOS_LAMBDA(const int& i) { a1_ptr[i] = a_ptr[i]; }); Kokkos::fence(); } Kokkos::fence(); - time_raw = timer.seconds()/R; + time_raw = timer.seconds() / R; } - #endif - double size = 1.0*N8*8/1024/1024; - printf(" Raw: %lf s %lf MB %lf GB/s\n",time_raw,size,2.0*size/1024/time_raw); - printf(" Rank4: %lf s %lf MB %lf GB/s\n",time4,size,2.0*size/1024/time4); - printf(" Rank5: %lf s %lf MB %lf GB/s\n",time5,size,2.0*size/1024/time5); +#endif + double size = 1.0 * N8 * 8 / 1024 / 1024; + printf(" Raw: %lf s %lf MB %lf GB/s\n", time_raw, size, + 2.0 * size / 1024 / time_raw); + printf(" Rank4: %lf s %lf MB %lf GB/s\n", time4, size, + 2.0 * size / 1024 / time4); + printf(" Rank5: %lf s %lf MB %lf GB/s\n", time5, size, + 2.0 * size / 1024 / time5); + printf(" Rank4 (WithoutInitializing): %lf s %lf MB %lf GB/s\n", + time4_noinit, size, 2.0 * size / 1024 / time4_noinit); + printf(" Rank5 (WithoutInitializing): %lf s %lf MB %lf GB/s\n", + time5_noinit, size, 2.0 * size / 1024 / time5_noinit); } -template +template void run_resizeview_tests6(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time6,time_raw = 100000.0; + double time6, time6_noinit, time_raw = 100000.0; { - Kokkos::View a("A6",N2,N1,N1,N1,N1,N2); + Kokkos::View a("A6", N2, N1, N1, N1, N1, N2); Kokkos::Timer timer; - for(int r=0; r a_(a); - Kokkos::resize(a_,int(N2*1.1),N1,N1,N1,N1,N2); + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(a_, int(N2 * 1.1), N1, N1, N1, N1, N2); } - time6 = timer.seconds()/R; + time6 = timer.seconds() / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); + Kokkos::View a("A6", N2, N1, N1, N1, N1, N2); + Kokkos::Timer timer; + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(Kokkos::WithoutInitializing, a_, int(N2 * 1.1), N1, N1, N1, + N1, N2); + } + time6_noinit = timer.seconds() / R; + } +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) + { + Kokkos::View a("A1", N8); double* a_ptr = a.data(); Kokkos::Timer timer; - for(int r=0;r a1(Kokkos::ViewAllocateWithoutInitializing("A1"),int(N8*1.1)); + for (int r = 0; r < R; r++) { + Kokkos::View a1( + Kokkos::ViewAllocateWithoutInitializing("A1"), int(N8 * 1.1)); double* a1_ptr = a1.data(); - Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) { - a1_ptr[i] = a_ptr[i]; - }); + Kokkos::parallel_for( + N8, KOKKOS_LAMBDA(const int& i) { a1_ptr[i] = a_ptr[i]; }); Kokkos::fence(); } Kokkos::fence(); - time_raw = timer.seconds()/R; + time_raw = timer.seconds() / R; } - #endif - double size = 1.0*N8*8/1024/1024; - printf(" Raw: %lf s %lf MB %lf GB/s\n",time_raw,size,2.0*size/1024/time_raw); - printf(" Rank6: %lf s %lf MB %lf GB/s\n",time6,size,2.0*size/1024/time6); +#endif + double size = 1.0 * N8 * 8 / 1024 / 1024; + printf(" Raw: %lf s %lf MB %lf GB/s\n", time_raw, size, + 2.0 * size / 1024 / time_raw); + printf(" Rank6: %lf s %lf MB %lf GB/s\n", time6, size, + 2.0 * size / 1024 / time6); + printf(" Rank6 (WithoutInitializing): %lf s %lf MB %lf GB/s\n", + time6_noinit, size, 2.0 * size / 1024 / time6_noinit); } -template +template void run_resizeview_tests7(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time7,time_raw = 100000.0; + double time7, time7_noinit, time_raw = 100000.0; { - Kokkos::View a("A7",N2,N1,N1,N1,N1,N1,N1); + Kokkos::View a("A7", N2, N1, N1, N1, N1, N1, N1); Kokkos::Timer timer; - for(int r=0; r a_(a); - Kokkos::resize(a_,int(N2*1.1),N1,N1,N1,N1,N1,N1); + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(a_, int(N2 * 1.1), N1, N1, N1, N1, N1, N1); } - time7 = timer.seconds()/R; + time7 = timer.seconds() / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); + Kokkos::View a("A7", N2, N1, N1, N1, N1, N1, N1); + Kokkos::Timer timer; + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(Kokkos::WithoutInitializing, a_, int(N2 * 1.1), N1, N1, N1, + N1, N1, N1); + } + time7_noinit = timer.seconds() / R; + } +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) + { + Kokkos::View a("A1", N8); double* a_ptr = a.data(); Kokkos::Timer timer; - for(int r=0;r a1(Kokkos::ViewAllocateWithoutInitializing("A1"),int(N8*1.1)); + for (int r = 0; r < R; r++) { + Kokkos::View a1( + Kokkos::ViewAllocateWithoutInitializing("A1"), int(N8 * 1.1)); double* a1_ptr = a1.data(); - Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) { - a1_ptr[i] = a_ptr[i]; - }); + Kokkos::parallel_for( + N8, KOKKOS_LAMBDA(const int& i) { a1_ptr[i] = a_ptr[i]; }); Kokkos::fence(); } Kokkos::fence(); - time_raw = timer.seconds()/R; + time_raw = timer.seconds() / R; } - #endif - double size = 1.0*N8*8/1024/1024; - printf(" Raw: %lf s %lf MB %lf GB/s\n",time_raw,size,2.0*size/1024/time_raw); - printf(" Rank7: %lf s %lf MB %lf GB/s\n",time7,size,2.0*size/1024/time7); +#endif + double size = 1.0 * N8 * 8 / 1024 / 1024; + printf(" Raw: %lf s %lf MB %lf GB/s\n", time_raw, size, + 2.0 * size / 1024 / time_raw); + printf(" Rank7: %lf s %lf MB %lf GB/s\n", time7, size, + 2.0 * size / 1024 / time7); + printf(" Rank7 (WithoutInitializing): %lf s %lf MB %lf GB/s\n", + time7_noinit, size, 2.0 * size / 1024 / time7_noinit); } -template +template void run_resizeview_tests8(int N, int R) { const int N1 = N; - const int N2 = N1*N1; - const int N4 = N2*N2; - const int N8 = N4*N4; + const int N2 = N1 * N1; + const int N4 = N2 * N2; + const int N8 = N4 * N4; - double time8,time_raw = 100000.0; + double time8, time8_noinit, time_raw = 100000.0; { - Kokkos::View a("A8",N1,N1,N1,N1,N1,N1,N1,N1); + Kokkos::View a("A8", N1, N1, N1, N1, N1, N1, N1, + N1); Kokkos::Timer timer; - for(int r=0; r a_(a); - Kokkos::resize(a_,int(N1*1.1),N1,N1,N1,N1,N1,N1,N1); + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(a_, int(N1 * 1.1), N1, N1, N1, N1, N1, N1, N1); } - time8 = timer.seconds()/R; + time8 = timer.seconds() / R; } - #if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) { - Kokkos::View a("A1",N8); + Kokkos::View a("A8", N1, N1, N1, N1, N1, N1, N1, + N1); + Kokkos::Timer timer; + for (int r = 0; r < R; r++) { + Kokkos::View a_(a); + Kokkos::resize(Kokkos::WithoutInitializing, a_, int(N1 * 1.1), N1, N1, N1, + N1, N1, N1, N1); + } + time8_noinit = timer.seconds() / R; + } +#if defined(KOKKOS_ENABLE_CUDA_LAMBDA) || !defined(KOKKOS_ENABLE_CUDA) + { + Kokkos::View a("A1", N8); double* a_ptr = a.data(); Kokkos::Timer timer; - for(int r=0;r a1(Kokkos::ViewAllocateWithoutInitializing("A1"),int(N8*1.1)); + for (int r = 0; r < R; r++) { + Kokkos::View a1( + Kokkos::ViewAllocateWithoutInitializing("A1"), int(N8 * 1.1)); double* a1_ptr = a1.data(); - Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) { - a1_ptr[i] = a_ptr[i]; - }); + Kokkos::parallel_for( + N8, KOKKOS_LAMBDA(const int& i) { a1_ptr[i] = a_ptr[i]; }); Kokkos::fence(); } Kokkos::fence(); - time_raw = timer.seconds()/R; + time_raw = timer.seconds() / R; } - #endif - double size = 1.0*N8*8/1024/1024; - printf(" Raw: %lf s %lf MB %lf GB/s\n",time_raw,size,2.0*size/1024/time_raw); - printf(" Rank8: %lf s %lf MB %lf GB/s\n",time8,size,2.0*size/1024/time8); +#endif + double size = 1.0 * N8 * 8 / 1024 / 1024; + printf(" Raw: %lf s %lf MB %lf GB/s\n", time_raw, size, + 2.0 * size / 1024 / time_raw); + printf(" Rank8: %lf s %lf MB %lf GB/s\n", time8, size, + 2.0 * size / 1024 / time8); + printf(" Rank8 (WithoutInitializing): %lf s %lf MB %lf GB/s\n", + time8_noinit, size, 2.0 * size / 1024 / time8_noinit); } -} +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewResize_123.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewResize_123.cpp index 61b7edf373..1dc4f285f5 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewResize_123.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewResize_123.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,11 +46,11 @@ namespace Test { -TEST_F( default_exec, ViewResize_Rank123 ) { +TEST(default_exec, ViewResize_Rank123) { printf("Resize View Performance for LayoutLeft:\n"); - run_resizeview_tests123(10,1); + run_resizeview_tests123(10, 1); printf("Resize View Performance for LayoutRight:\n"); - run_resizeview_tests123(10,1); + run_resizeview_tests123(10, 1); } -} +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewResize_45.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewResize_45.cpp index 172f9474d9..3754a5bb14 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewResize_45.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewResize_45.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,11 +46,11 @@ namespace Test { -TEST_F( default_exec, ViewResize_Rank_45 ) { +TEST(default_exec, ViewResize_Rank_45) { printf("Resize View Performance for LayoutLeft:\n"); - run_resizeview_tests45(10,1); + run_resizeview_tests45(10, 1); printf("Resize View Performance for LayoutRight:\n"); - run_resizeview_tests45(10,1); + run_resizeview_tests45(10, 1); } -} +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewResize_6.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewResize_6.cpp index d4f8fb2af0..1b8d6fbc8a 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewResize_6.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewResize_6.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,11 +46,11 @@ namespace Test { -TEST_F( default_exec, ViewResize_Rank6 ) { +TEST(default_exec, ViewResize_Rank6) { printf("Resize View Performance for LayoutLeft:\n"); - run_resizeview_tests6(10,1); + run_resizeview_tests6(10, 1); printf("Resize View Performance for LayoutRight:\n"); - run_resizeview_tests6(10,1); + run_resizeview_tests6(10, 1); } -} +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewResize_7.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewResize_7.cpp index f7b9b5b545..f8efa195fc 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewResize_7.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewResize_7.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,11 +46,11 @@ namespace Test { -TEST_F( default_exec, ViewResize_Rank7 ) { +TEST(default_exec, ViewResize_Rank7) { printf("Resize View Performance for LayoutLeft:\n"); - run_resizeview_tests7(10,1); + run_resizeview_tests7(10, 1); printf("Resize View Performance for LayoutRight:\n"); - run_resizeview_tests7(10,1); + run_resizeview_tests7(10, 1); } -} +} // namespace Test diff --git a/lib/kokkos/core/perf_test/PerfTest_ViewResize_8.cpp b/lib/kokkos/core/perf_test/PerfTest_ViewResize_8.cpp index 877fcef933..afeeb64356 100644 --- a/lib/kokkos/core/perf_test/PerfTest_ViewResize_8.cpp +++ b/lib/kokkos/core/perf_test/PerfTest_ViewResize_8.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,11 +46,11 @@ namespace Test { -TEST_F( default_exec, ViewResize_Rank8 ) { +TEST(default_exec, ViewResize_Rank8) { printf("Resize View Performance for LayoutLeft:\n"); - run_resizeview_tests8(10,1); + run_resizeview_tests8(10, 1); printf("Resize View Performance for LayoutRight:\n"); - run_resizeview_tests8(10,1); + run_resizeview_tests8(10, 1); } -} +} // namespace Test diff --git a/lib/kokkos/core/perf_test/test_atomic.cpp b/lib/kokkos/core/perf_test/test_atomic.cpp index 24e4f015d3..7699d7b91c 100644 --- a/lib/kokkos/core/perf_test/test_atomic.cpp +++ b/lib/kokkos/core/perf_test/test_atomic.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -50,335 +51,323 @@ typedef Kokkos::DefaultExecutionSpace exec_space; -#define RESET 0 -#define BRIGHT 1 -#define DIM 2 -#define UNDERLINE 3 -#define BLINK 4 -#define REVERSE 7 -#define HIDDEN 8 +#define RESET 0 +#define BRIGHT 1 +#define DIM 2 +#define UNDERLINE 3 +#define BLINK 4 +#define REVERSE 7 +#define HIDDEN 8 -#define BLACK 0 -#define RED 1 -#define GREEN 2 -#define YELLOW 3 -#define BLUE 4 -#define MAGENTA 5 -#define CYAN 6 -#define GREY 7 -#define WHITE 8 +#define BLACK 0 +#define RED 1 +#define GREEN 2 +#define YELLOW 3 +#define BLUE 4 +#define MAGENTA 5 +#define CYAN 6 +#define GREY 7 +#define WHITE 8 -void textcolor(int attr, int fg, int bg) -{ char command[40]; +void textcolor(int attr, int fg, int bg) { + char command[40]; - /* Command is the control command to the terminal */ - sprintf(command, "%c[%d;%d;%dm", 0x1B, attr, fg + 30, bg + 40); - printf("%s", command); + /* Command is the control command to the terminal */ + sprintf(command, "%c[%d;%d;%dm", 0x1B, attr, fg + 30, bg + 40); + printf("%s", command); } -void textcolor_standard() {textcolor(RESET, BLACK, WHITE);} +void textcolor_standard() { textcolor(RESET, BLACK, WHITE); } - -template -struct ZeroFunctor{ +template +struct ZeroFunctor { typedef DEVICE_TYPE execution_space; - typedef typename Kokkos::View type; - typedef typename Kokkos::View::HostMirror h_type; + typedef typename Kokkos::View type; + typedef typename Kokkos::View::HostMirror h_type; type data; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - data() = 0; - } + void operator()(int) const { data() = 0; } }; //--------------------------------------------------- //--------------atomic_fetch_add--------------------- //--------------------------------------------------- -template -struct AddFunctor{ +template +struct AddFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View type; type data; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - Kokkos::atomic_fetch_add(&data(),(T)1); - } + void operator()(int) const { Kokkos::atomic_fetch_add(&data(), (T)1); } }; -template +template T AddLoop(int loop) { - struct ZeroFunctor f_zero; - typename ZeroFunctor::type data("Data"); - typename ZeroFunctor::h_type h_data("HData"); + struct ZeroFunctor f_zero; + typename ZeroFunctor::type data("Data"); + typename ZeroFunctor::h_type h_data("HData"); f_zero.data = data; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for(1, f_zero); exec_space().fence(); - struct AddFunctor f_add; + struct AddFunctor f_add; f_add.data = data; - Kokkos::parallel_for(loop,f_add); + Kokkos::parallel_for(loop, f_add); exec_space().fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy(h_data, data); T val = h_data(); return val; } -template -struct AddNonAtomicFunctor{ +template +struct AddNonAtomicFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View type; type data; KOKKOS_INLINE_FUNCTION - void operator()(int) const { - data()+=(T)1; - } + void operator()(int) const { data() += (T)1; } }; -template +template T AddLoopNonAtomic(int loop) { - struct ZeroFunctor f_zero; - typename ZeroFunctor::type data("Data"); - typename ZeroFunctor::h_type h_data("HData"); + struct ZeroFunctor f_zero; + typename ZeroFunctor::type data("Data"); + typename ZeroFunctor::h_type h_data("HData"); f_zero.data = data; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for(1, f_zero); exec_space().fence(); - struct AddNonAtomicFunctor f_add; + struct AddNonAtomicFunctor f_add; f_add.data = data; - Kokkos::parallel_for(loop,f_add); + Kokkos::parallel_for(loop, f_add); exec_space().fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy(h_data, data); T val = h_data(); return val; } -template +template T AddLoopSerial(int loop) { T* data = new T[1]; data[0] = 0; - for(int i=0;i -struct CASFunctor{ +template +struct CASFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View type; type data; KOKKOS_INLINE_FUNCTION void operator()(int) const { - T old = data(); - T newval, assumed; - do { - assumed = old; - newval = assumed + (T)1; - old = Kokkos::atomic_compare_exchange(&data(), assumed, newval); - } - while( old != assumed ); + T old = data(); + T newval, assumed; + do { + assumed = old; + newval = assumed + (T)1; + old = Kokkos::atomic_compare_exchange(&data(), assumed, newval); + } while (old != assumed); } }; -template +template T CASLoop(int loop) { - struct ZeroFunctor f_zero; - typename ZeroFunctor::type data("Data"); - typename ZeroFunctor::h_type h_data("HData"); + struct ZeroFunctor f_zero; + typename ZeroFunctor::type data("Data"); + typename ZeroFunctor::h_type h_data("HData"); f_zero.data = data; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for(1, f_zero); exec_space().fence(); - struct CASFunctor f_cas; + struct CASFunctor f_cas; f_cas.data = data; - Kokkos::parallel_for(loop,f_cas); + Kokkos::parallel_for(loop, f_cas); exec_space().fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy(h_data, data); T val = h_data(); return val; } -template -struct CASNonAtomicFunctor{ +template +struct CASNonAtomicFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View type; type data; KOKKOS_INLINE_FUNCTION void operator()(int) const { - volatile T assumed; - volatile T newval; - bool fail=1; - do { - assumed = data(); - newval = assumed + (T)1; - if(data()==assumed) { - data() = newval; - fail = 0; - } - } - while(fail); + volatile T assumed; + volatile T newval; + bool fail = 1; + do { + assumed = data(); + newval = assumed + (T)1; + if (data() == assumed) { + data() = newval; + fail = 0; + } + } while (fail); } }; -template +template T CASLoopNonAtomic(int loop) { - struct ZeroFunctor f_zero; - typename ZeroFunctor::type data("Data"); - typename ZeroFunctor::h_type h_data("HData"); + struct ZeroFunctor f_zero; + typename ZeroFunctor::type data("Data"); + typename ZeroFunctor::h_type h_data("HData"); f_zero.data = data; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for(1, f_zero); exec_space().fence(); - struct CASNonAtomicFunctor f_cas; + struct CASNonAtomicFunctor f_cas; f_cas.data = data; - Kokkos::parallel_for(loop,f_cas); + Kokkos::parallel_for(loop, f_cas); exec_space().fence(); - Kokkos::deep_copy(h_data,data); + Kokkos::deep_copy(h_data, data); T val = h_data(); return val; } -template +template T CASLoopSerial(int loop) { T* data = new T[1]; data[0] = 0; - for(int i=0;i -struct ExchFunctor{ +template +struct ExchFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View type; type data, data2; KOKKOS_INLINE_FUNCTION void operator()(int i) const { - T old = Kokkos::atomic_exchange(&data(),(T)i); - Kokkos::atomic_fetch_add(&data2(),old); + T old = Kokkos::atomic_exchange(&data(), (T)i); + Kokkos::atomic_fetch_add(&data2(), old); } }; -template +template T ExchLoop(int loop) { - struct ZeroFunctor f_zero; - typename ZeroFunctor::type data("Data"); - typename ZeroFunctor::h_type h_data("HData"); + struct ZeroFunctor f_zero; + typename ZeroFunctor::type data("Data"); + typename ZeroFunctor::h_type h_data("HData"); f_zero.data = data; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for(1, f_zero); exec_space().fence(); - typename ZeroFunctor::type data2("Data"); - typename ZeroFunctor::h_type h_data2("HData"); + typename ZeroFunctor::type data2("Data"); + typename ZeroFunctor::h_type h_data2("HData"); f_zero.data = data2; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for(1, f_zero); exec_space().fence(); - struct ExchFunctor f_exch; - f_exch.data = data; + struct ExchFunctor f_exch; + f_exch.data = data; f_exch.data2 = data2; - Kokkos::parallel_for(loop,f_exch); + Kokkos::parallel_for(loop, f_exch); exec_space().fence(); - Kokkos::deep_copy(h_data,data); - Kokkos::deep_copy(h_data2,data2); + Kokkos::deep_copy(h_data, data); + Kokkos::deep_copy(h_data2, data2); T val = h_data() + h_data2(); return val; } -template -struct ExchNonAtomicFunctor{ +template +struct ExchNonAtomicFunctor { typedef DEVICE_TYPE execution_space; - typedef Kokkos::View type; + typedef Kokkos::View type; type data, data2; KOKKOS_INLINE_FUNCTION void operator()(int i) const { - T old = data(); - data()=(T) i; - data2()+=old; + T old = data(); + data() = (T)i; + data2() += old; } }; - -template +template T ExchLoopNonAtomic(int loop) { - struct ZeroFunctor f_zero; - typename ZeroFunctor::type data("Data"); - typename ZeroFunctor::h_type h_data("HData"); + struct ZeroFunctor f_zero; + typename ZeroFunctor::type data("Data"); + typename ZeroFunctor::h_type h_data("HData"); f_zero.data = data; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for(1, f_zero); exec_space().fence(); - typename ZeroFunctor::type data2("Data"); - typename ZeroFunctor::h_type h_data2("HData"); + typename ZeroFunctor::type data2("Data"); + typename ZeroFunctor::h_type h_data2("HData"); f_zero.data = data2; - Kokkos::parallel_for(1,f_zero); + Kokkos::parallel_for(1, f_zero); exec_space().fence(); - struct ExchNonAtomicFunctor f_exch; - f_exch.data = data; + struct ExchNonAtomicFunctor f_exch; + f_exch.data = data; f_exch.data2 = data2; - Kokkos::parallel_for(loop,f_exch); + Kokkos::parallel_for(loop, f_exch); exec_space().fence(); - Kokkos::deep_copy(h_data,data); - Kokkos::deep_copy(h_data2,data2); + Kokkos::deep_copy(h_data, data); + Kokkos::deep_copy(h_data2, data2); T val = h_data() + h_data2(); return val; } -template +template T ExchLoopSerial(int loop) { - T* data = new T[1]; + T* data = new T[1]; T* data2 = new T[1]; - data[0] = 0; + data[0] = 0; data2[0] = 0; - for(int i=0;i +template T LoopVariant(int loop, int test) { switch (test) { case 1: return AddLoop(loop); @@ -388,7 +377,7 @@ T LoopVariant(int loop, int test) { return 0; } -template +template T LoopVariantSerial(int loop, int test) { switch (test) { case 1: return AddLoopSerial(loop); @@ -398,7 +387,7 @@ T LoopVariantSerial(int loop, int test) { return 0; } -template +template T LoopVariantNonAtomic(int loop, int test) { switch (test) { case 1: return AddLoopNonAtomic(loop); @@ -408,100 +397,105 @@ T LoopVariantNonAtomic(int loop, int test) { return 0; } -template +template void Loop(int loop, int test, const char* type_name) { - LoopVariant(loop,test); + LoopVariant(loop, test); Kokkos::Impl::Timer timer; - T res = LoopVariant(loop,test); + T res = LoopVariant(loop, test); double time = timer.seconds(); timer.reset(); - T resNonAtomic = LoopVariantNonAtomic(loop,test); + T resNonAtomic = LoopVariantNonAtomic(loop, test); double timeNonAtomic = timer.seconds(); timer.reset(); - T resSerial = LoopVariantSerial(loop,test); + T resSerial = LoopVariantSerial(loop, test); double timeSerial = timer.seconds(); - time *=1e6/loop; - timeNonAtomic*=1e6/loop; - timeSerial *=1e6/loop; - //textcolor_standard(); + time *= 1e6 / loop; + timeNonAtomic *= 1e6 / loop; + timeSerial *= 1e6 / loop; + // textcolor_standard(); bool passed = true; - if(resSerial!=res) passed = false; - //if(!passed) textcolor(RESET,BLACK,YELLOW); - printf("%s Test %i %s --- Loop: %i Value (S,A,NA): %e %e %e Time: %7.4e %7.4e %7.4e Size of Type %i)", - type_name,test,passed?"PASSED":"FAILED",loop, - 1.0*resSerial,1.0*res,1.0*resNonAtomic, - timeSerial,time,timeNonAtomic,(int)sizeof(T)); - //if(!passed) textcolor_standard(); + if (resSerial != res) passed = false; + // if(!passed) textcolor(RESET,BLACK,YELLOW); + printf( + "%s Test %i %s --- Loop: %i Value (S,A,NA): %e %e %e Time: %7.4e %7.4e " + "%7.4e Size of Type %i)", + type_name, test, passed ? "PASSED" : "FAILED", loop, 1.0 * resSerial, + 1.0 * res, 1.0 * resNonAtomic, timeSerial, time, timeNonAtomic, + (int)sizeof(T)); + // if(!passed) textcolor_standard(); printf("\n"); } - -template +template void Test(int loop, int test, const char* type_name) { - if(test==-1) { - Loop(loop,1,type_name); - Loop(loop,2,type_name); - Loop(loop,3,type_name); + if (test == -1) { + Loop(loop, 1, type_name); + Loop(loop, 2, type_name); + Loop(loop, 3, type_name); - } - else - Loop(loop,test,type_name); + } else + Loop(loop, test, type_name); } -int main(int argc, char* argv[]) -{ +int main(int argc, char* argv[]) { int type = -1; int loop = 100000; int test = -1; - for(int i=0;i(loop,test,"int "); + if (type == -1) all_tests = true; + while (type < 100) { + if (type == 1) { + Test(loop, test, "int "); } - if(type==2) { - Test(loop,test,"long int "); + if (type == 2) { + Test(loop, test, "long int "); } - if(type==3) { - Test(loop,test,"long long int "); + if (type == 3) { + Test(loop, test, "long long int "); } - if(type==4) { - Test(loop,test,"unsigned int "); + if (type == 4) { + Test(loop, test, "unsigned int "); } - if(type==5) { - Test(loop,test,"unsigned long int "); + if (type == 5) { + Test(loop, test, "unsigned long int "); } - if(type==6) { - Test(loop,test,"unsigned long long int "); + if (type == 6) { + Test(loop, test, "unsigned long long int "); } - if(type==10) { - //Test(loop,test,"float "); + if (type == 10) { + // Test(loop,test,"float "); } - if(type==11) { - Test(loop,test,"double "); + if (type == 11) { + Test(loop, test, "double "); } - if(!all_tests) type=100; - else type++; + if (!all_tests) + type = 100; + else + type++; } Kokkos::finalize(); - } - diff --git a/lib/kokkos/core/perf_test/test_mempool.cpp b/lib/kokkos/core/perf_test/test_mempool.cpp index c47730ec69..ad8622e7a6 100644 --- a/lib/kokkos/core/perf_test/test_mempool.cpp +++ b/lib/kokkos/core/perf_test/test_mempool.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -49,310 +50,271 @@ #include #include -using ExecSpace = Kokkos::DefaultExecutionSpace ; -using MemorySpace = Kokkos::DefaultExecutionSpace::memory_space ; +using ExecSpace = Kokkos::DefaultExecutionSpace; +using MemorySpace = Kokkos::DefaultExecutionSpace::memory_space; -using MemoryPool = Kokkos::MemoryPool< ExecSpace > ; +using MemoryPool = Kokkos::MemoryPool; struct TestFunctor { - - typedef Kokkos::View< uintptr_t * , ExecSpace > ptrs_type ; + typedef Kokkos::View ptrs_type; enum : unsigned { chunk = 32 }; - MemoryPool pool ; - ptrs_type ptrs ; - unsigned chunk_span ; - unsigned fill_stride ; - unsigned range_iter ; - unsigned repeat_inner ; + MemoryPool pool; + ptrs_type ptrs; + unsigned chunk_span; + unsigned fill_stride; + unsigned range_iter; + unsigned repeat_inner; - TestFunctor( size_t total_alloc_size - , unsigned min_superblock_size - , unsigned number_alloc - , unsigned arg_stride_alloc - , unsigned arg_chunk_span - , unsigned arg_repeat ) - : pool() - , ptrs() - , chunk_span(0) - , fill_stride(0) - , repeat_inner(0) - { - MemorySpace m ; + TestFunctor(size_t total_alloc_size, unsigned min_superblock_size, + unsigned number_alloc, unsigned arg_stride_alloc, + unsigned arg_chunk_span, unsigned arg_repeat) + : pool(), ptrs(), chunk_span(0), fill_stride(0), repeat_inner(0) { + MemorySpace m; - const unsigned min_block_size = chunk ; - const unsigned max_block_size = chunk * arg_chunk_span ; - pool = MemoryPool( m , total_alloc_size - , min_block_size - , max_block_size - , min_superblock_size ); + const unsigned min_block_size = chunk; + const unsigned max_block_size = chunk * arg_chunk_span; + pool = MemoryPool(m, total_alloc_size, min_block_size, max_block_size, + min_superblock_size); - ptrs = ptrs_type( Kokkos::view_alloc( m , "ptrs") , number_alloc ); - fill_stride = arg_stride_alloc ; - chunk_span = arg_chunk_span ; - range_iter = fill_stride * number_alloc ; - repeat_inner = arg_repeat ; - } + ptrs = ptrs_type(Kokkos::view_alloc(m, "ptrs"), number_alloc); + fill_stride = arg_stride_alloc; + chunk_span = arg_chunk_span; + range_iter = fill_stride * number_alloc; + repeat_inner = arg_repeat; + } //---------------------------------------- - typedef long value_type ; + typedef long value_type; //---------------------------------------- struct TagFill {}; KOKKOS_INLINE_FUNCTION - void operator()( TagFill , int i , value_type & update ) const noexcept - { - if ( 0 == i % fill_stride ) { + void operator()(TagFill, int i, value_type& update) const noexcept { + if (0 == i % fill_stride) { + const int j = i / fill_stride; - const int j = i / fill_stride ; + const unsigned size_alloc = chunk * (1 + (j % chunk_span)); - const unsigned size_alloc = chunk * ( 1 + ( j % chunk_span ) ); + ptrs(j) = (uintptr_t)pool.allocate(size_alloc); - ptrs(j) = (uintptr_t) pool.allocate(size_alloc); - - if ( ptrs(j) ) ++update ; - } + if (ptrs(j)) ++update; } + } - bool test_fill() - { - typedef Kokkos::RangePolicy< ExecSpace , TagFill > policy ; + bool test_fill() { + typedef Kokkos::RangePolicy policy; - long result = 0 ; + long result = 0; - Kokkos::parallel_reduce( policy(0,range_iter), *this , result ); + Kokkos::parallel_reduce(policy(0, range_iter), *this, result); - if ( result == long(ptrs.extent(0)) ) return true; - pool.print_state( std::cerr ); - return false; - } + if (result == long(ptrs.extent(0))) return true; + pool.print_state(std::cerr); + return false; + } //---------------------------------------- struct TagDel {}; KOKKOS_INLINE_FUNCTION - void operator()( TagDel , int i ) const noexcept - { - if ( 0 == i % fill_stride ) { + void operator()(TagDel, int i) const noexcept { + if (0 == i % fill_stride) { + const int j = i / fill_stride; - const int j = i / fill_stride ; + const unsigned size_alloc = chunk * (1 + (j % chunk_span)); - const unsigned size_alloc = chunk * ( 1 + ( j % chunk_span ) ); - - pool.deallocate( (void*) ptrs(j) , size_alloc ); - } + pool.deallocate((void*)ptrs(j), size_alloc); } + } - void test_del() - { - typedef Kokkos::RangePolicy< ExecSpace , TagDel > policy ; + void test_del() { + typedef Kokkos::RangePolicy policy; - Kokkos::parallel_for( policy(0,range_iter), *this ); - Kokkos::fence(); - } + Kokkos::parallel_for(policy(0, range_iter), *this); + Kokkos::fence(); + } //---------------------------------------- struct TagAllocDealloc {}; KOKKOS_INLINE_FUNCTION - void operator()( TagAllocDealloc , int i , long & update ) const noexcept - { - if ( 0 == i % fill_stride ) { + void operator()(TagAllocDealloc, int i, long& update) const noexcept { + if (0 == i % fill_stride) { + const int j = i / fill_stride; - const int j = i / fill_stride ; + if (0 == j % 3) { + for (unsigned k = 0; k < repeat_inner; ++k) { + const unsigned size_alloc = chunk * (1 + (j % chunk_span)); - if ( 0 == j % 3 ) { + pool.deallocate((void*)ptrs(j), size_alloc); - for ( unsigned k = 0 ; k < repeat_inner ; ++k ) { + ptrs(j) = (uintptr_t)pool.allocate(size_alloc); - const unsigned size_alloc = chunk * ( 1 + ( j % chunk_span ) ); - - pool.deallocate( (void*) ptrs(j) , size_alloc ); - - ptrs(j) = (uintptr_t) pool.allocate(size_alloc); - - if ( 0 == ptrs(j) ) update++ ; - } + if (0 == ptrs(j)) update++; } } } + } - bool test_alloc_dealloc() - { - typedef Kokkos::RangePolicy< ExecSpace , TagAllocDealloc > policy ; + bool test_alloc_dealloc() { + typedef Kokkos::RangePolicy policy; - long error_count = 0 ; + long error_count = 0; - Kokkos::parallel_reduce( policy(0,range_iter), *this , error_count ); + Kokkos::parallel_reduce(policy(0, range_iter), *this, error_count); - return 0 == error_count ; - } + return 0 == error_count; + } }; +int main(int argc, char* argv[]) { + static const char help_flag[] = "--help"; + static const char alloc_size_flag[] = "--alloc_size="; + static const char super_size_flag[] = "--super_size="; + static const char chunk_span_flag[] = "--chunk_span="; + static const char fill_stride_flag[] = "--fill_stride="; + static const char fill_level_flag[] = "--fill_level="; + static const char repeat_outer_flag[] = "--repeat_outer="; + static const char repeat_inner_flag[] = "--repeat_inner="; + long total_alloc_size = 1000000; + int min_superblock_size = 10000; + int chunk_span = 5; + int fill_stride = 1; + int fill_level = 70; + int repeat_outer = 1; + int repeat_inner = 1; -int main( int argc , char* argv[] ) -{ - static const char help_flag[] = "--help" ; - static const char alloc_size_flag[] = "--alloc_size=" ; - static const char super_size_flag[] = "--super_size=" ; - static const char chunk_span_flag[] = "--chunk_span=" ; - static const char fill_stride_flag[] = "--fill_stride=" ; - static const char fill_level_flag[] = "--fill_level=" ; - static const char repeat_outer_flag[] = "--repeat_outer=" ; - static const char repeat_inner_flag[] = "--repeat_inner=" ; + int ask_help = 0; - long total_alloc_size = 1000000 ; - int min_superblock_size = 10000 ; - int chunk_span = 5 ; - int fill_stride = 1 ; - int fill_level = 70 ; - int repeat_outer = 1 ; - int repeat_inner = 1 ; + for (int i = 1; i < argc; i++) { + const char* const a = argv[i]; - int ask_help = 0 ; + if (!strncmp(a, help_flag, strlen(help_flag))) ask_help = 1; - for(int i=1;i> actual_superblock_bytes_lg2; + auto superblock_mask = actual_superblock_bytes - 1; + auto nsuperblocks = + (total_alloc_size + superblock_mask) >> actual_superblock_bytes_lg2; auto actual_total_bytes = nsuperblocks * actual_superblock_bytes; - auto bytes_wanted = (actual_total_bytes * fill_level) / 100; - auto chunk_spans = bytes_wanted / chunk_span_bytes; - auto number_alloc = int( chunk_spans * chunk_span ); + auto bytes_wanted = (actual_total_bytes * fill_level) / 100; + auto chunk_spans = bytes_wanted / chunk_span_bytes; + auto number_alloc = int(chunk_spans * chunk_span); - if ( ask_help ) { + if (ask_help) { std::cout << "command line options:" - << " " << help_flag - << " " << alloc_size_flag << "##" + << " " << help_flag << " " << alloc_size_flag << "##" << " " << super_size_flag << "##" << " " << fill_stride_flag << "##" << " " << fill_level_flag << "##" << " " << chunk_span_flag << "##" << " " << repeat_outer_flag << "##" - << " " << repeat_inner_flag << "##" - << std::endl ; + << " " << repeat_inner_flag << "##" << std::endl; return 0; } - Kokkos::initialize(argc,argv); + Kokkos::initialize(argc, argv); - double sum_fill_time = 0; + double sum_fill_time = 0; double sum_cycle_time = 0; - double sum_both_time = 0; - double min_fill_time = std::numeric_limits::max(); + double sum_both_time = 0; + double min_fill_time = std::numeric_limits::max(); double min_cycle_time = std::numeric_limits::max(); - double min_both_time = std::numeric_limits::max(); - //one alloc in fill, alloc/dealloc pair in repeat_inner - for ( int i = 0 ; i < repeat_outer ; ++i ) { + double min_both_time = std::numeric_limits::max(); + // one alloc in fill, alloc/dealloc pair in repeat_inner + for (int i = 0; i < repeat_outer; ++i) { + TestFunctor functor(total_alloc_size, min_superblock_size, number_alloc, + fill_stride, chunk_span, repeat_inner); - TestFunctor functor( total_alloc_size - , min_superblock_size - , number_alloc - , fill_stride - , chunk_span - , repeat_inner ); + Kokkos::Impl::Timer timer; - Kokkos::Impl::Timer timer ; - - if ( ! functor.test_fill() ) { + if (!functor.test_fill()) { Kokkos::abort("fill "); } auto t0 = timer.seconds(); - if ( ! functor.test_alloc_dealloc() ) { + if (!functor.test_alloc_dealloc()) { Kokkos::abort("alloc/dealloc "); } - auto t1 = timer.seconds(); - auto this_fill_time = t0; + auto t1 = timer.seconds(); + auto this_fill_time = t0; auto this_cycle_time = t1 - t0; - auto this_both_time = t1; + auto this_both_time = t1; sum_fill_time += this_fill_time; sum_cycle_time += this_cycle_time; sum_both_time += this_both_time; - min_fill_time = std::min(min_fill_time, this_fill_time); + min_fill_time = std::min(min_fill_time, this_fill_time); min_cycle_time = std::min(min_cycle_time, this_cycle_time); - min_both_time = std::min(min_both_time, this_both_time); + min_both_time = std::min(min_both_time, this_both_time); } Kokkos::finalize(); - printf( "\"mempool: alloc super stride level span inner outer number\" %ld %d %d %d %d %d %d %d\n" - , total_alloc_size - , min_superblock_size - , fill_stride - , fill_level - , chunk_span - , repeat_inner - , repeat_outer - , number_alloc ); + printf( + "\"mempool: alloc super stride level span inner outer number\" %ld %d %d " + "%d %d %d %d %d\n", + total_alloc_size, min_superblock_size, fill_stride, fill_level, + chunk_span, repeat_inner, repeat_outer, number_alloc); - auto avg_fill_time = sum_fill_time / repeat_outer; + auto avg_fill_time = sum_fill_time / repeat_outer; auto avg_cycle_time = sum_cycle_time / repeat_outer; - auto avg_both_time = sum_both_time / repeat_outer; + auto avg_both_time = sum_both_time / repeat_outer; - printf( "\"mempool: fill time (min, avg)\" %.8f %.8f\n" - , min_fill_time - , avg_fill_time ); + printf("\"mempool: fill time (min, avg)\" %.8f %.8f\n", min_fill_time, + avg_fill_time); - printf( "\"mempool: cycle time (min, avg)\" %.8f %.8f\n" - , min_cycle_time - , avg_cycle_time ); + printf("\"mempool: cycle time (min, avg)\" %.8f %.8f\n", min_cycle_time, + avg_cycle_time); - printf( "\"mempool: test time (min, avg)\" %.8f %.8f\n" - , min_both_time - , avg_both_time ); + printf("\"mempool: test time (min, avg)\" %.8f %.8f\n", min_both_time, + avg_both_time); - printf( "\"mempool: fill ops per second (max, avg)\" %g %g\n" - , number_alloc / min_fill_time - , number_alloc / avg_fill_time ); + printf("\"mempool: fill ops per second (max, avg)\" %g %g\n", + number_alloc / min_fill_time, number_alloc / avg_fill_time); - printf( "\"mempool: cycle ops per second (max, avg)\" %g %g\n" - , (2 * number_alloc * repeat_inner) / min_cycle_time - , (2 * number_alloc * repeat_inner) / avg_cycle_time ); + printf("\"mempool: cycle ops per second (max, avg)\" %g %g\n", + (2 * number_alloc * repeat_inner) / min_cycle_time, + (2 * number_alloc * repeat_inner) / avg_cycle_time); } - diff --git a/lib/kokkos/core/perf_test/test_taskdag.cpp b/lib/kokkos/core/perf_test/test_taskdag.cpp index 41198edfe1..a97edc59e8 100644 --- a/lib/kokkos/core/perf_test/test_taskdag.cpp +++ b/lib/kokkos/core/perf_test/test_taskdag.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -43,13 +44,10 @@ #include -#if ! defined( KOKKOS_ENABLE_TASKDAG ) || \ - defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) +#if !defined(KOKKOS_ENABLE_TASKDAG) || \ + defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS) -int main() -{ - return 0 ; -} +int main() { return 0; } #else @@ -60,187 +58,160 @@ int main() #include -using ExecSpace = Kokkos::DefaultExecutionSpace ; +using ExecSpace = Kokkos::DefaultExecutionSpace; -inline -long eval_fib( long n ) -{ +inline long eval_fib(long n) { constexpr long mask = 0x03; - long fib[4] = { 0, 1, 0, 0 }; + long fib[4] = {0, 1, 0, 0}; - for ( long i = 2; i <= n; ++i ) { - fib[ i & mask ] = fib[ ( i - 1 ) & mask ] + fib[ ( i - 2 ) & mask ]; + for (long i = 2; i <= n; ++i) { + fib[i & mask] = fib[(i - 1) & mask] + fib[(i - 2) & mask]; } - return fib[ n & mask ]; + return fib[n & mask]; } -inline -long fib_alloc_count( long n ) -{ +inline long fib_alloc_count(long n) { constexpr long mask = 0x03; - long count[4] = { 1, 1, 0, 0 }; + long count[4] = {1, 1, 0, 0}; - for ( long i = 2; i <= n; ++i ) { - count[ i & mask ] = 2 // this task plus the 'when_all' task - + count[ ( i - 1 ) & mask ] - + count[ ( i - 2 ) & mask ]; + for (long i = 2; i <= n; ++i) { + count[i & mask] = 2 // this task plus the 'when_all' task + + count[(i - 1) & mask] + count[(i - 2) & mask]; } - return count[ n & mask ]; + return count[n & mask]; } -template< class Scheduler > +template struct TestFib { + using MemorySpace = typename Scheduler::memory_space; + using MemberType = typename Scheduler::member_type; + using FutureType = Kokkos::BasicFuture; - using MemorySpace = typename Scheduler::memory_space ; - using MemberType = typename Scheduler::member_type ; - using FutureType = Kokkos::BasicFuture< long , Scheduler > ; + typedef long value_type; - typedef long value_type ; - - FutureType dep[2] ; - const value_type n ; + FutureType dep[2]; + const value_type n; KOKKOS_INLINE_FUNCTION - TestFib( const value_type arg_n ) - : dep{} , n( arg_n ) {} + TestFib(const value_type arg_n) : dep{}, n(arg_n) {} KOKKOS_INLINE_FUNCTION - void operator()( MemberType & member, value_type & result ) noexcept - { - auto& sched = member.scheduler(); - if ( n < 2 ) { - result = n ; - } - else if ( ! dep[0].is_null() && ! dep[1].is_null() ) { - result = dep[0].get() + dep[1].get(); - } - else { - // Spawn new children and respawn myself to sum their results. - // Spawn lower value at higher priority as it has a shorter - // path to completion. + void operator()(MemberType& member, value_type& result) noexcept { + auto& sched = member.scheduler(); + if (n < 2) { + result = n; + } else if (!dep[0].is_null() && !dep[1].is_null()) { + result = dep[0].get() + dep[1].get(); + } else { + // Spawn new children and respawn myself to sum their results. + // Spawn lower value at higher priority as it has a shorter + // path to completion. - dep[1] = Kokkos::task_spawn - ( Kokkos::TaskSingle( sched, Kokkos::TaskPriority::High ) - , TestFib( n - 2 ) ); + dep[1] = Kokkos::task_spawn( + Kokkos::TaskSingle(sched, Kokkos::TaskPriority::High), + TestFib(n - 2)); - dep[0] = Kokkos::task_spawn - ( Kokkos::TaskSingle( sched ) - , TestFib( n - 1 ) ); + dep[0] = Kokkos::task_spawn(Kokkos::TaskSingle(sched), TestFib(n - 1)); - auto fib_all = sched.when_all( dep, 2 ); + auto fib_all = sched.when_all(dep, 2); - if ( ! dep[0].is_null() && ! dep[1].is_null() && ! fib_all.is_null() ) { - // High priority to retire this branch. - Kokkos::respawn( this, fib_all, Kokkos::TaskPriority::High ); - } - else { - Kokkos::abort("Failed nested task spawn (allocation)"); - } + if (!dep[0].is_null() && !dep[1].is_null() && !fib_all.is_null()) { + // High priority to retire this branch. + Kokkos::respawn(this, fib_all, Kokkos::TaskPriority::High); + } else { + Kokkos::abort("Failed nested task spawn (allocation)"); } } + } }; +int main(int argc, char* argv[]) { + static const char help[] = "--help"; + static const char alloc_size[] = "--alloc_size="; + static const char super_size[] = "--super_size="; + static const char repeat_outer[] = "--repeat_outer="; + static const char input_value[] = "--input="; + long total_alloc_size = 1000000; + int min_superblock_size = 10000; + int test_repeat_outer = 1; + int fib_input = 4; -int main( int argc , char* argv[] ) -{ - static const char help[] = "--help" ; - static const char alloc_size[] = "--alloc_size=" ; - static const char super_size[] = "--super_size=" ; - static const char repeat_outer[] = "--repeat_outer=" ; - static const char input_value[] = "--input=" ; + int ask_help = 0; - long total_alloc_size = 1000000 ; - int min_superblock_size = 10000 ; - int test_repeat_outer = 1 ; - int fib_input = 4 ; + for (int i = 1; i < argc; i++) { + const char* const a = argv[i]; - int ask_help = 0 ; + if (!strncmp(a, help, strlen(help))) ask_help = 1; - for(int i=1;i; - typedef TestFib< Scheduler > Functor ; + typedef TestFib Functor; - Kokkos::initialize(argc,argv); + Kokkos::initialize(argc, argv); { - - Scheduler sched( Functor::MemorySpace() - , total_alloc_size - , min_block_size - , max_block_size - , min_superblock_size - ); + Scheduler sched(Functor::MemorySpace(), total_alloc_size, min_block_size, + max_block_size, min_superblock_size); Functor::FutureType f = - Kokkos::host_spawn( Kokkos::TaskSingle( sched ) - , Functor( fib_input ) - ); + Kokkos::host_spawn(Kokkos::TaskSingle(sched), Functor(fib_input)); - Kokkos::wait( sched ); + Kokkos::wait(sched); test_result = f.get(); - //task_count_max = sched.allocated_task_count_max(); - //task_count_accum = sched.allocated_task_count_accum(); + // task_count_max = sched.allocated_task_count_max(); + // task_count_accum = sched.allocated_task_count_accum(); - //if ( number_alloc != task_count_accum ) { + // if ( number_alloc != task_count_accum ) { // std::cout << " number_alloc( " << number_alloc << " )" // << " != task_count_accum( " << task_count_accum << " )" // << std::endl ; //} - if ( fib_output != test_result ) { + if (fib_output != test_result) { std::cout << " answer( " << fib_output << " )" - << " != result( " << test_result << " )" - << std::endl ; + << " != result( " << test_result << " )" << std::endl; } - if ( fib_output != test_result) { // || number_alloc != task_count_accum ) { + if (fib_output != test_result) { // || number_alloc != task_count_accum ) { printf(" TEST FAILED\n"); return -1; } @@ -248,41 +219,34 @@ int main( int argc , char* argv[] ) double min_time = std::numeric_limits::max(); double time_sum = 0; - for ( int i = 0 ; i < test_repeat_outer ; ++i ) { - Kokkos::Impl::Timer timer ; + for (int i = 0; i < test_repeat_outer; ++i) { + Kokkos::Impl::Timer timer; Functor::FutureType ftmp = - Kokkos::host_spawn( Kokkos::TaskSingle( sched ) - , Functor( fib_input ) - ); + Kokkos::host_spawn(Kokkos::TaskSingle(sched), Functor(fib_input)); - Kokkos::wait( sched ); + Kokkos::wait(sched); auto this_time = timer.seconds(); - min_time = std::min(min_time, this_time); + min_time = std::min(min_time, this_time); time_sum += this_time; } auto avg_time = time_sum / test_repeat_outer; - printf( "\"taskdag: alloc super repeat input output task-accum task-max\" %ld %d %d %d %ld %ld %ld\n" - , total_alloc_size - , min_superblock_size - , test_repeat_outer - , fib_input - , fib_output - , task_count_accum - , task_count_max ); + printf( + "\"taskdag: alloc super repeat input output task-accum task-max\" %ld " + "%d %d %d %ld %ld %ld\n", + total_alloc_size, min_superblock_size, test_repeat_outer, fib_input, + fib_output, task_count_accum, task_count_max); - printf( "\"taskdag: time (min, avg)\" %g %g\n", min_time, avg_time); - printf( "\"taskdag: tasks per second (max, avg)\" %g %g\n" - , number_alloc / min_time - , number_alloc / avg_time ); - } // end scope to destroy scheduler prior to finalize + printf("\"taskdag: time (min, avg)\" %g %g\n", min_time, avg_time); + printf("\"taskdag: tasks per second (max, avg)\" %g %g\n", + number_alloc / min_time, number_alloc / avg_time); + } // end scope to destroy scheduler prior to finalize Kokkos::finalize(); - return 0 ; + return 0; } #endif - diff --git a/lib/kokkos/core/src/CMakeLists.txt b/lib/kokkos/core/src/CMakeLists.txt index a941c5da0c..eb058a982e 100644 --- a/lib/kokkos/core/src/CMakeLists.txt +++ b/lib/kokkos/core/src/CMakeLists.txt @@ -1,124 +1,81 @@ - - -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -#----------------------------------------------------------------------------- - -SET(TRILINOS_INCDIR ${CMAKE_INSTALL_PREFIX}/${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}) - -#----------------------------------------------------------------------------- - -IF(KOKKOS_LEGACY_TRIBITS) - - MESSAGE("LEGACY STUFF GETTING CALLED") - - IF(KOKKOS_ENABLE_EXPLICIT_INSTANTIATION) - MESSAGE("GOING INTO ETI DIR") - ADD_SUBDIRECTORY(eti) - INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/eti") - ENDIF() - - ASSERT_DEFINED(${PROJECT_NAME}_ENABLE_CXX11) - ASSERT_DEFINED(${PACKAGE_NAME}_ENABLE_CUDA) - - SET(HEADERS_PUBLIC "") - SET(HEADERS_PRIVATE "") - SET(SOURCES "") - - FILE(GLOB HEADERS_PUBLIC Kokkos*.hpp) - LIST( APPEND HEADERS_PUBLIC ${CMAKE_BINARY_DIR}/${PACKAGE_NAME}_config.h ) - - #----------------------------------------------------------------------------- - - FILE(GLOB HEADERS_IMPL impl/*.hpp) - FILE(GLOB SOURCES_IMPL impl/*.cpp) - - LIST(APPEND HEADERS_PRIVATE ${HEADERS_IMPL} ) - LIST(APPEND SOURCES ${SOURCES_IMPL} ) - - INSTALL(FILES ${HEADERS_IMPL} DESTINATION ${TRILINOS_INCDIR}/impl/) - - #----------------------------------------------------------------------------- - - FILE(GLOB HEADERS_THREADS Threads/*.hpp) - FILE(GLOB SOURCES_THREADS Threads/*.cpp) - - LIST(APPEND HEADERS_PRIVATE ${HEADERS_THREADS} ) - LIST(APPEND SOURCES ${SOURCES_THREADS} ) - - INSTALL(FILES ${HEADERS_THREADS} DESTINATION ${TRILINOS_INCDIR}/Threads/) - - #----------------------------------------------------------------------------- - - FILE(GLOB HEADERS_OPENMP OpenMP/*.hpp) - FILE(GLOB SOURCES_OPENMP OpenMP/*.cpp) - - LIST(APPEND HEADERS_PRIVATE ${HEADERS_OPENMP} ) - LIST(APPEND SOURCES ${SOURCES_OPENMP} ) - - INSTALL(FILES ${HEADERS_OPENMP} DESTINATION ${TRILINOS_INCDIR}/OpenMP/) - - #----------------------------------------------------------------------------- - - FILE(GLOB HEADERS_HPX HPX/*.hpp) - FILE(GLOB SOURCES_HPX HPX/*.cpp) - - LIST(APPEND HEADERS_PRIVATE ${HEADERS_HPX} ) - LIST(APPEND SOURCES ${SOURCES_HPX} ) - - INSTALL(FILES ${HEADERS_HPX} DESTINATION ${TRILINOS_INCDIR}/HPX/) - - #----------------------------------------------------------------------------- - - FILE(GLOB HEADERS_CUDA Cuda/*.hpp) - FILE(GLOB SOURCES_CUDA Cuda/*.cpp) - - LIST(APPEND HEADERS_PRIVATE ${HEADERS_CUDA} ) - LIST(APPEND SOURCES ${SOURCES_CUDA} ) - - INSTALL(FILES ${HEADERS_CUDA} DESTINATION ${TRILINOS_INCDIR}/Cuda/) - - #----------------------------------------------------------------------------- - FILE(GLOB HEADERS_QTHREADS Qthreads/*.hpp) - FILE(GLOB SOURCES_QTHREADS Qthreads/*.cpp) - - LIST(APPEND HEADERS_PRIVATE ${HEADERS_QTHREADS} ) - LIST(APPEND SOURCES ${SOURCES_QTHREADS} ) - - IF(KOKKOS_ENABLE_EXPLICIT_INSTANTIATION) - LIST(APPEND SOURCES ${ETI_SOURCES} ) - ENDIF() - - INSTALL(FILES ${HEADERS_QTHREADS} DESTINATION ${TRILINOS_INCDIR}/Qthreads/) - - TRIBITS_ADD_LIBRARY( - kokkoscore - HEADERS ${HEADERS_PUBLIC} - NOINSTALLHEADERS ${HEADERS_PRIVATE} - SOURCES ${SOURCES} - DEPLIBS - ) - -#----------------------------------------------------------------------------- -# In the new build system, sources are calculated by Makefile.kokkos -else() - - INSTALL (DIRECTORY - "${CMAKE_CURRENT_SOURCE_DIR}/" - DESTINATION ${TRILINOS_INCDIR} - FILES_MATCHING PATTERN "*.hpp" - ) - - TRIBITS_ADD_LIBRARY( - kokkoscore - SOURCES ${KOKKOS_CORE_SRCS} - DEPLIBS - ) - -endif() -#----------------------------------------------------------------------------- - -# build and install pkgconfig file -CONFIGURE_FILE(kokkos.pc.in kokkos.pc @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/kokkos.pc DESTINATION lib/pkgconfig) +#I have to leave these here for tribits +KOKKOS_INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${KOKKOS_TOP_BUILD_DIR} +) + +INSTALL (DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}/" + DESTINATION ${KOKKOS_HEADER_DIR} + FILES_MATCHING PATTERN "*.hpp" +) + +SET(KOKKOS_CORE_SRCS) +APPEND_GLOB(KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/impl/*.cpp) + +IF (KOKKOS_ENABLE_ROCM) + APPEND_GLOB(KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/ROCm/*.cpp) + IF (KOKKOS_ENABLE_ETI) + APPEND_GLOB(KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/eti/ROCm/*.cpp) + ENDIF() +ENDIF() + +IF (KOKKOS_ENABLE_CUDA) + APPEND_GLOB(KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Cuda/*.cpp) + IF (KOKKOS_ENABLE_ETI) + APPEND_GLOB(KOKKOS_CORE_SRC ${CMAKE_CURRENT_SOURCE_DIR/eti/Cuda/*.cpp) + ENDIF() +ENDIF() + +IF (KOKKOS_ENABLE_OPENMP) + APPEND_GLOB(KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/OpenMP/*.cpp) + IF (KOKKOS_ENABLE_ETI) + APPEND_GLOB(KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/eti/OpenMP/*.cpp) + ENDIF() +ENDIF() + +IF (KOKKOS_ENABLE_PTHREAD) + APPEND_GLOB(KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Threads/*.cpp) + IF (KOKKOS_ENABLE_ETI) + APPEND_GLOB(KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/eti/Threads/*.cpp) + ENDIF() +ENDIF() + +IF (KOKKOS_ENABLE_HPX) + APPEND_GLOB(KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/HPX/*.cpp) +ENDIF() + +IF (NOT KOKKOS_ENABLE_MEMKIND) + LIST(REMOVE_ITEM KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/impl/Kokkos_HBWSpace.cpp) +ENDIF() + +IF (KOKKOS_ENABLE_SERIAL) + IF (KOKKOS_ENABLE_ETI) + APPEND_GLOB(KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/eti/Serial/*.cpp) + ENDIF() +ELSE() + LIST(REMOVE_ITEM KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/impl/Kokkos_Serial.cpp) + LIST(REMOVE_ITEM KOKKOS_CORE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/impl/Kokkos_Serial_task.cpp) +ENDIF() + +KOKKOS_ADD_LIBRARY( + kokkoscore + SOURCES ${KOKKOS_CORE_SRCS} +) + +SET_TARGET_PROPERTIES(kokkoscore PROPERTIES VERSION ${Kokkos_VERSION}) + +KOKKOS_LIB_INCLUDE_DIRECTORIES(kokkoscore + ${KOKKOS_TOP_BUILD_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + +KOKKOS_LINK_TPL(kokkoscore PUBLIC HWLOC) +KOKKOS_LINK_TPL(kokkoscore PUBLIC MEMKIND) +KOKKOS_LINK_TPL(kokkoscore PUBLIC CUDA) +KOKKOS_LINK_TPL(kokkoscore PUBLIC HPX) +KOKKOS_LINK_TPL(kokkoscore PUBLIC LIBDL) +KOKKOS_LINK_TPL(kokkoscore PUBLIC LIBRT) +KOKKOS_LINK_TPL(kokkoscore PUBLIC PTHREAD) diff --git a/lib/kokkos/core/src/Cuda/KokkosExp_Cuda_IterateTile.hpp b/lib/kokkos/core/src/Cuda/KokkosExp_Cuda_IterateTile.hpp index 8a83dfff4a..3706263921 100644 --- a/lib/kokkos/core/src/Cuda/KokkosExp_Cuda_IterateTile.hpp +++ b/lib/kokkos/core/src/Cuda/KokkosExp_Cuda_IterateTile.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_CUDA_EXP_ITERATE_TILE_HPP #include -#if defined( __CUDACC__ ) && defined( KOKKOS_ENABLE_CUDA ) +#if defined(__CUDACC__) && defined(KOKKOS_ENABLE_CUDA) #include #include @@ -55,245 +56,182 @@ //#include // Including the file above, leads to following type of errors: -// /home/ndellin/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp(84): error: incomplete type is not allowed -// As a result, recreate cuda_parallel_launch and associated code +// /home/ndellin/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp(84): error: incomplete +// type is not allowed As a result, recreate cuda_parallel_launch and associated +// code #if defined(KOKKOS_ENABLE_PROFILING) #include #include #endif -namespace Kokkos { namespace Impl { +namespace Kokkos { +namespace Impl { // ------------------------------------------------------------------ // -template< class DriverType > -__global__ -static void cuda_parallel_launch( const DriverType driver ) -{ +template +__global__ static void cuda_parallel_launch(const DriverType driver) { driver(); } -template< class DriverType > -struct CudaLaunch -{ - inline - CudaLaunch( const DriverType & driver - , const dim3 & grid - , const dim3 & block - ) - { - cuda_parallel_launch< DriverType ><<< grid , block >>>(driver); +template +struct CudaLaunch { + inline CudaLaunch(const DriverType& driver, const dim3& grid, + const dim3& block) { + cuda_parallel_launch<<>>(driver); } - }; // ------------------------------------------------------------------ // -template< int N , typename RP , typename Functor , typename Tag > +template struct apply_impl; -//Rank 2 +// Rank 2 // Specializations for void tag type -template< typename RP , typename Functor > -struct apply_impl<2,RP,Functor,void > -{ +template +struct apply_impl<2, RP, Functor, void> { using index_type = typename RP::index_type; - __device__ - apply_impl( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ apply_impl(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} - inline __device__ - void exec_range() const - { -// LL - if (RP::inner_direction == RP::Left) { - for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { - m_func(offset_0 , offset_1); + inline __device__ void exec_range() const { + // LL + if (RP::inner_direction == RP::Left) { + for (index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; + tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; + tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0]) { + m_func(offset_0, offset_1); + } } } } } - } -// LR - else { - for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { - - for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { - m_func(offset_0 , offset_1); + // LR + else { + for (index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; + tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0]) { + for (index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; + tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1]) { + m_func(offset_0, offset_1); + } } } } } - } - } //end exec_range - -private: - const RP & m_rp; - const Functor & m_func; + } // end exec_range + private: + const RP& m_rp; + const Functor& m_func; }; // Specializations for tag type -template< typename RP , typename Functor , typename Tag > -struct apply_impl<2,RP,Functor,Tag> -{ +template +struct apply_impl<2, RP, Functor, Tag> { using index_type = typename RP::index_type; - inline __device__ - apply_impl( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + inline __device__ apply_impl(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} - inline __device__ - void exec_range() const - { - if (RP::inner_direction == RP::Left) { - // Loop over size maxnumblocks until full range covered - for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { - m_func(Tag(), offset_0 , offset_1); + inline __device__ void exec_range() const { + if (RP::inner_direction == RP::Left) { + // Loop over size maxnumblocks until full range covered + for (index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; + tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; + tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0]) { + m_func(Tag(), offset_0, offset_1); + } + } + } + } + } else { + for (index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; + tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0]) { + for (index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; + tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1]) { + m_func(Tag(), offset_0, offset_1); + } } } } } - } - else { - for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { - for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { - m_func(Tag(), offset_0 , offset_1); - } - } - } - } - } + } // end exec_range - } //end exec_range - -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; - -//Rank 3 +// Rank 3 // Specializations for void tag type -template< typename RP , typename Functor > -struct apply_impl<3,RP,Functor,void > -{ +template +struct apply_impl<3, RP, Functor, void> { using index_type = typename RP::index_type; - __device__ - apply_impl( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ apply_impl(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} - inline __device__ - void exec_range() const - { -// LL + inline __device__ void exec_range() const { + // LL if (RP::inner_direction == RP::Left) { - for ( index_type tile_id2 = blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && threadIdx.z < m_rp.m_tile[2] ) { - - for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { - m_func(offset_0 , offset_1 , offset_2); - } - } - } - } - } - } - } -// LR - else { - for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { - - for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id2 = blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && threadIdx.z < m_rp.m_tile[2] ) { - m_func(offset_0 , offset_1 , offset_2); - } - } - } - } - } - } - } - - } //end exec_range - -private: - const RP & m_rp; - const Functor & m_func; -}; - -// Specializations for void tag type -template< typename RP , typename Functor , typename Tag > -struct apply_impl<3,RP,Functor,Tag> -{ - using index_type = typename RP::index_type; - - inline __device__ - apply_impl( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} - - inline __device__ - void exec_range() const - { - if (RP::inner_direction == RP::Left) { - for ( index_type tile_id2 = blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && threadIdx.z < m_rp.m_tile[2] ) { - - for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { - m_func(Tag(), offset_0 , offset_1 , offset_2); + for (index_type tile_id2 = blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; + tile_id2 += gridDim.z) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && threadIdx.z < m_rp.m_tile[2]) { + for (index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; + tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id0 = blockIdx.x; + tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + threadIdx.x < m_rp.m_tile[0]) { + m_func(offset_0, offset_1, offset_2); } } } @@ -301,19 +239,28 @@ struct apply_impl<3,RP,Functor,Tag> } } } + // LR else { - for ( index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0] ) { - - for ( index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id2 = blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && threadIdx.z < m_rp.m_tile[2] ) { - m_func(Tag(), offset_0 , offset_1 , offset_2); + for (index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; + tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0]) { + for (index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; + tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id2 = blockIdx.z; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + threadIdx.z < m_rp.m_tile[2]) { + m_func(offset_0, offset_1, offset_2); } } } @@ -322,61 +269,136 @@ struct apply_impl<3,RP,Functor,Tag> } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; - -//Rank 4 // Specializations for void tag type -template< typename RP , typename Functor > -struct apply_impl<4,RP,Functor,void > -{ +template +struct apply_impl<3, RP, Functor, Tag> { using index_type = typename RP::index_type; - __device__ - apply_impl( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + inline __device__ apply_impl(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} + + inline __device__ void exec_range() const { + if (RP::inner_direction == RP::Left) { + for (index_type tile_id2 = blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; + tile_id2 += gridDim.z) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && threadIdx.z < m_rp.m_tile[2]) { + for (index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; + tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id0 = blockIdx.x; + tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + threadIdx.x < m_rp.m_tile[0]) { + m_func(Tag(), offset_0, offset_1, offset_2); + } + } + } + } + } + } + } else { + for (index_type tile_id0 = blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; + tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && threadIdx.x < m_rp.m_tile[0]) { + for (index_type tile_id1 = blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; + tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id2 = blockIdx.z; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + threadIdx.z < m_rp.m_tile[2]) { + m_func(Tag(), offset_0, offset_1, offset_2); + } + } + } + } + } + } + } + + } // end exec_range + + private: + const RP& m_rp; + const Functor& m_func; +}; + +// Rank 4 +// Specializations for void tag type +template +struct apply_impl<4, RP, Functor, void> { + using index_type = typename RP::index_type; + + __device__ apply_impl(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - inline __device__ - void exec_range() const - { -// LL + inline __device__ void exec_range() const { + // LL if (RP::inner_direction == RP::Left) { - const index_type temp0 = m_rp.m_tile_end[0]; - const index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = blockIdx.x % numbl0; const index_type tile_id1 = blockIdx.x / numbl0; - const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; - for ( index_type tile_id3 = blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { - const index_type offset_3 = tile_id3*m_rp.m_tile[3] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && threadIdx.z < m_rp.m_tile[3] ) { - - for ( index_type tile_id2 = blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && threadIdx.y < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3); + for (index_type tile_id3 = blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; + tile_id3 += gridDim.z) { + const index_type offset_3 = tile_id3 * m_rp.m_tile[3] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && threadIdx.z < m_rp.m_tile[3]) { + for (index_type tile_id2 = blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; + tile_id2 += gridDim.y) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && threadIdx.y < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = i * m_rp.m_tile[0] + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(offset_0, offset_1, offset_2, offset_3); } } } @@ -386,35 +408,44 @@ struct apply_impl<4,RP,Functor,void > } } } -// LR + // LR else { - const index_type temp0 = m_rp.m_tile_end[0]; - const index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = blockIdx.x / numbl1; const index_type tile_id1 = blockIdx.x % numbl1; - const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type tile_id2 = blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && threadIdx.y < m_rp.m_tile[2] ) { - - for ( index_type tile_id3 = blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { - const index_type offset_3 = tile_id3*m_rp.m_tile[3] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && threadIdx.z < m_rp.m_tile[3] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type tile_id2 = blockIdx.y; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + threadIdx.y < m_rp.m_tile[2]) { + for (index_type tile_id3 = blockIdx.z; + tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z) { + const index_type offset_3 = tile_id3 * m_rp.m_tile[3] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + threadIdx.z < m_rp.m_tile[3]) { + m_func(offset_0, offset_1, offset_2, offset_3); } } } @@ -425,58 +456,62 @@ struct apply_impl<4,RP,Functor,void > } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; // Specializations for void tag type -template< typename RP , typename Functor , typename Tag > -struct apply_impl<4,RP,Functor,Tag> -{ +template +struct apply_impl<4, RP, Functor, Tag> { using index_type = typename RP::index_type; - inline __device__ - apply_impl( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + inline __device__ apply_impl(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - inline __device__ - void exec_range() const - { + inline __device__ void exec_range() const { if (RP::inner_direction == RP::Left) { - const index_type temp0 = m_rp.m_tile_end[0]; - const index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = blockIdx.x % numbl0; const index_type tile_id1 = blockIdx.x / numbl0; - const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; - for ( index_type tile_id3 = blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { - const index_type offset_3 = tile_id3*m_rp.m_tile[3] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && threadIdx.z < m_rp.m_tile[3] ) { - - for ( index_type tile_id2 = blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && threadIdx.y < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(Tag(), offset_0 , offset_1 , offset_2 , offset_3); + for (index_type tile_id3 = blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; + tile_id3 += gridDim.z) { + const index_type offset_3 = tile_id3 * m_rp.m_tile[3] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && threadIdx.z < m_rp.m_tile[3]) { + for (index_type tile_id2 = blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; + tile_id2 += gridDim.y) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && threadIdx.y < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = i * m_rp.m_tile[0] + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(Tag(), offset_0, offset_1, offset_2, offset_3); } } } @@ -485,35 +520,43 @@ struct apply_impl<4,RP,Functor,Tag> } } } - } - else { - const index_type temp0 = m_rp.m_tile_end[0]; - const index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + } else { + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = blockIdx.x / numbl1; const index_type tile_id1 = blockIdx.x % numbl1; - const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type tile_id2 = blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && threadIdx.y < m_rp.m_tile[2] ) { - - for ( index_type tile_id3 = blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { - const index_type offset_3 = tile_id3*m_rp.m_tile[3] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && threadIdx.z < m_rp.m_tile[3] ) { - m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + thr_id1 + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type tile_id2 = blockIdx.y; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + threadIdx.y < m_rp.m_tile[2]) { + for (index_type tile_id3 = blockIdx.z; + tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z) { + const index_type offset_3 = tile_id3 * m_rp.m_tile[3] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + threadIdx.z < m_rp.m_tile[3]) { + m_func(Tag(), offset_0, offset_1, offset_2, offset_3); } } } @@ -524,77 +567,83 @@ struct apply_impl<4,RP,Functor,Tag> } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; - -//Rank 5 +// Rank 5 // Specializations for void tag type -template< typename RP , typename Functor > -struct apply_impl<5,RP,Functor,void > -{ +template +struct apply_impl<5, RP, Functor, void> { using index_type = typename RP::index_type; - __device__ - apply_impl( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ apply_impl(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - inline __device__ - void exec_range() const - { -// LL + inline __device__ void exec_range() const { + // LL if (RP::inner_direction == RP::Left) { - - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = blockIdx.x % numbl0; const index_type tile_id1 = blockIdx.x / numbl0; - const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl3 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl2) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id2 = blockIdx.y % numbl2; const index_type tile_id3 = blockIdx.y / numbl2; - const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; - const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; + const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; - for ( index_type tile_id4 = blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { - const index_type offset_4 = tile_id4*m_rp.m_tile[4] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && threadIdx.z < m_rp.m_tile[4] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3, offset_4); + for (index_type tile_id4 = blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; + tile_id4 += gridDim.z) { + const index_type offset_4 = tile_id4 * m_rp.m_tile[4] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && threadIdx.z < m_rp.m_tile[4]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3) { + const index_type offset_3 = + l * m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = j * m_rp.m_tile[1] + thr_id1 + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = i * m_rp.m_tile[0] + + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(offset_0, offset_1, offset_2, offset_3, + offset_4); } } } @@ -606,50 +655,63 @@ struct apply_impl<5,RP,Functor,void > } } } -// LR + // LR else { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = blockIdx.x / numbl1; const index_type tile_id1 = blockIdx.x % numbl1; - const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl2 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl3) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id2 = blockIdx.y / numbl3; const index_type tile_id3 = blockIdx.y % numbl3; - const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; - const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; + const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type tile_id4 = blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { - const index_type offset_4 = tile_id4*m_rp.m_tile[4] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && threadIdx.z < m_rp.m_tile[4] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3 , offset_4); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = l * m_rp.m_tile[3] + thr_id3 + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + thr_id3 < m_rp.m_tile[3]) { + for (index_type tile_id4 = blockIdx.z; + tile_id4 < m_rp.m_tile_end[4]; + tile_id4 += gridDim.z) { + const index_type offset_4 = tile_id4 * m_rp.m_tile[4] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && + threadIdx.z < m_rp.m_tile[4]) { + m_func(offset_0, offset_1, offset_2, offset_3, + offset_4); } } } @@ -662,74 +724,82 @@ struct apply_impl<5,RP,Functor,void > } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; // Specializations for tag type -template< typename RP , typename Functor , typename Tag > -struct apply_impl<5,RP,Functor,Tag> -{ +template +struct apply_impl<5, RP, Functor, Tag> { using index_type = typename RP::index_type; - __device__ - apply_impl( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ apply_impl(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - inline __device__ - void exec_range() const - { -// LL + inline __device__ void exec_range() const { + // LL if (RP::inner_direction == RP::Left) { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = blockIdx.x % numbl0; const index_type tile_id1 = blockIdx.x / numbl0; - const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl3 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl2) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id2 = blockIdx.y % numbl2; const index_type tile_id3 = blockIdx.y / numbl2; - const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; - const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; + const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; - for ( index_type tile_id4 = blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { - const index_type offset_4 = tile_id4*m_rp.m_tile[4] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && threadIdx.z < m_rp.m_tile[4] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3, offset_4); + for (index_type tile_id4 = blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; + tile_id4 += gridDim.z) { + const index_type offset_4 = tile_id4 * m_rp.m_tile[4] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && threadIdx.z < m_rp.m_tile[4]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3) { + const index_type offset_3 = + l * m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = j * m_rp.m_tile[1] + thr_id1 + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = i * m_rp.m_tile[0] + + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(Tag(), offset_0, offset_1, offset_2, offset_3, + offset_4); } } } @@ -741,50 +811,63 @@ struct apply_impl<5,RP,Functor,Tag> } } } -// LR + // LR else { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = blockIdx.x / numbl1; const index_type tile_id1 = blockIdx.x % numbl1; - const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl2 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl3) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id2 = blockIdx.y / numbl3; const index_type tile_id3 = blockIdx.y % numbl3; - const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; - const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; + const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type tile_id4 = blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { - const index_type offset_4 = tile_id4*m_rp.m_tile[4] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && threadIdx.z < m_rp.m_tile[4] ) { - m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3 , offset_4); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = l * m_rp.m_tile[3] + thr_id3 + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + thr_id3 < m_rp.m_tile[3]) { + for (index_type tile_id4 = blockIdx.z; + tile_id4 < m_rp.m_tile_end[4]; + tile_id4 += gridDim.z) { + const index_type offset_4 = tile_id4 * m_rp.m_tile[4] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && + threadIdx.z < m_rp.m_tile[4]) { + m_func(Tag(), offset_0, offset_1, offset_2, offset_3, + offset_4); } } } @@ -797,91 +880,101 @@ struct apply_impl<5,RP,Functor,Tag> } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; - -//Rank 6 +// Rank 6 // Specializations for void tag type -template< typename RP , typename Functor > -struct apply_impl<6,RP,Functor,void > -{ +template +struct apply_impl<6, RP, Functor, void> { using index_type = typename RP::index_type; - __device__ - apply_impl( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ apply_impl(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - inline __device__ - void exec_range() const - { -// LL + inline __device__ void exec_range() const { + // LL if (RP::inner_direction == RP::Left) { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = blockIdx.x % numbl0; const index_type tile_id1 = blockIdx.x / numbl0; - const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl3 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl2) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id2 = blockIdx.y % numbl2; const index_type tile_id3 = blockIdx.y / numbl2; - const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; - const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; + const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; - temp0 = m_rp.m_tile_end[4]; - temp1 = m_rp.m_tile_end[5]; - const index_type numbl4 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl5 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl4 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl4 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl5 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl4) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id4 = blockIdx.z % numbl4; const index_type tile_id5 = blockIdx.z / numbl4; - const index_type thr_id4 = threadIdx.z % m_rp.m_tile[4]; - const index_type thr_id5 = threadIdx.z / m_rp.m_tile[4]; + const index_type thr_id4 = threadIdx.z % m_rp.m_tile[4]; + const index_type thr_id5 = threadIdx.z / m_rp.m_tile[4]; - for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { - const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; - if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { - - for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { - const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3, offset_4, offset_5); + for (index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5) { + const index_type offset_5 = + n * m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; + if (offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5]) { + for (index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4) { + const index_type offset_4 = + m * m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = + l * m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = k * m_rp.m_tile[2] + thr_id2 + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + thr_id2 < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = j * m_rp.m_tile[1] + + thr_id1 + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(offset_0, offset_1, offset_2, offset_3, + offset_4, offset_5); } } } @@ -895,65 +988,82 @@ struct apply_impl<6,RP,Functor,void > } } } -// LR + // LR else { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = blockIdx.x / numbl1; const index_type tile_id1 = blockIdx.x % numbl1; - const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl2 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl3) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id2 = blockIdx.y / numbl3; const index_type tile_id3 = blockIdx.y % numbl3; - const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; - const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; + const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; - temp0 = m_rp.m_tile_end[4]; - temp1 = m_rp.m_tile_end[5]; - const index_type numbl5 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl4 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl5 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl5 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl4 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl5) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id4 = blockIdx.z / numbl5; const index_type tile_id5 = blockIdx.z % numbl5; - const index_type thr_id4 = threadIdx.z / m_rp.m_tile[5]; - const index_type thr_id5 = threadIdx.z % m_rp.m_tile[5]; + const index_type thr_id4 = threadIdx.z / m_rp.m_tile[5]; + const index_type thr_id5 = threadIdx.z % m_rp.m_tile[5]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { - const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { - - for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { - const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; - if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3 , offset_4 , offset_5); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = l * m_rp.m_tile[3] + thr_id3 + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + thr_id3 < m_rp.m_tile[3]) { + for (index_type m = tile_id4; m < m_rp.m_tile_end[4]; + m += numbl4) { + const index_type offset_4 = m * m_rp.m_tile[4] + + thr_id4 + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && + thr_id4 < m_rp.m_tile[4]) { + for (index_type n = tile_id5; n < m_rp.m_tile_end[5]; + n += numbl5) { + const index_type offset_5 = + n * m_rp.m_tile[5] + thr_id5 + + (index_type)m_rp.m_lower[5]; + if (offset_5 < m_rp.m_upper[5] && + thr_id5 < m_rp.m_tile[5]) { + m_func(offset_0, offset_1, offset_2, offset_3, + offset_4, offset_5); } } } @@ -968,89 +1078,100 @@ struct apply_impl<6,RP,Functor,void > } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; // Specializations for tag type -template< typename RP , typename Functor , typename Tag > -struct apply_impl<6,RP,Functor,Tag> -{ +template +struct apply_impl<6, RP, Functor, Tag> { using index_type = typename RP::index_type; - __device__ - apply_impl( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ apply_impl(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - inline __device__ - void exec_range() const - { -// LL + inline __device__ void exec_range() const { + // LL if (RP::inner_direction == RP::Left) { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = blockIdx.x % numbl0; const index_type tile_id1 = blockIdx.x / numbl0; - const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = threadIdx.x / m_rp.m_tile[0]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl3 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl2) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id2 = blockIdx.y % numbl2; const index_type tile_id3 = blockIdx.y / numbl2; - const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; - const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; + const index_type thr_id2 = threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = threadIdx.y / m_rp.m_tile[2]; - temp0 = m_rp.m_tile_end[4]; - temp1 = m_rp.m_tile_end[5]; - const index_type numbl4 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl5 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl4 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl4 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl5 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl4) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id4 = blockIdx.z % numbl4; const index_type tile_id5 = blockIdx.z / numbl4; - const index_type thr_id4 = threadIdx.z % m_rp.m_tile[4]; - const index_type thr_id5 = threadIdx.z / m_rp.m_tile[4]; + const index_type thr_id4 = threadIdx.z % m_rp.m_tile[4]; + const index_type thr_id5 = threadIdx.z / m_rp.m_tile[4]; - for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { - const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; - if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { - - for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { - const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3, offset_4, offset_5); + for (index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5) { + const index_type offset_5 = + n * m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; + if (offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5]) { + for (index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4) { + const index_type offset_4 = + m * m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = + l * m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = k * m_rp.m_tile[2] + thr_id2 + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + thr_id2 < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = j * m_rp.m_tile[1] + + thr_id1 + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(Tag(), offset_0, offset_1, offset_2, + offset_3, offset_4, offset_5); } } } @@ -1064,65 +1185,82 @@ struct apply_impl<6,RP,Functor,Tag> } } } -// LR + // LR else { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = blockIdx.x / numbl1; const index_type tile_id1 = blockIdx.x % numbl1; - const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = threadIdx.x % m_rp.m_tile[1]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl2 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl3) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id2 = blockIdx.y / numbl3; const index_type tile_id3 = blockIdx.y % numbl3; - const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; - const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; + const index_type thr_id2 = threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = threadIdx.y % m_rp.m_tile[3]; - temp0 = m_rp.m_tile_end[4]; - temp1 = m_rp.m_tile_end[5]; - const index_type numbl5 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl4 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl5 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl5 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl4 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl5) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id4 = blockIdx.z / numbl5; const index_type tile_id5 = blockIdx.z % numbl5; - const index_type thr_id4 = threadIdx.z / m_rp.m_tile[5]; - const index_type thr_id5 = threadIdx.z % m_rp.m_tile[5]; + const index_type thr_id4 = threadIdx.z / m_rp.m_tile[5]; + const index_type thr_id5 = threadIdx.z % m_rp.m_tile[5]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { - const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { - - for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { - const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; - if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { - m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3 , offset_4 , offset_5); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = l * m_rp.m_tile[3] + thr_id3 + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + thr_id3 < m_rp.m_tile[3]) { + for (index_type m = tile_id4; m < m_rp.m_tile_end[4]; + m += numbl4) { + const index_type offset_4 = m * m_rp.m_tile[4] + + thr_id4 + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && + thr_id4 < m_rp.m_tile[4]) { + for (index_type n = tile_id5; n < m_rp.m_tile_end[5]; + n += numbl5) { + const index_type offset_5 = + n * m_rp.m_tile[5] + thr_id5 + + (index_type)m_rp.m_lower[5]; + if (offset_5 < m_rp.m_upper[5] && + thr_id5 < m_rp.m_tile[5]) { + m_func(Tag(), offset_0, offset_1, offset_2, + offset_3, offset_4, offset_5); } } } @@ -1137,127 +1275,118 @@ struct apply_impl<6,RP,Functor,Tag> } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; // ---------------------------------------------------------------------------------- -template < typename RP - , typename Functor - , typename Tag - > -struct DeviceIterateTile -{ - using index_type = typename RP::index_type; +template +struct DeviceIterateTile { + using index_type = typename RP::index_type; using array_index_type = typename RP::array_index_type; - using point_type = typename RP::point_type; + using point_type = typename RP::point_type; struct VoidDummy {}; - typedef typename std::conditional< std::is_same::value, VoidDummy, Tag>::type usable_tag; + typedef typename std::conditional::value, VoidDummy, + Tag>::type usable_tag; - DeviceIterateTile( const RP & rp, const Functor & func ) - : m_rp{rp} - , m_func{func} - {} + DeviceIterateTile(const RP& rp, const Functor& func) + : m_rp{rp}, m_func{func} {} -private: - inline __device__ - void apply() const - { - apply_impl(m_rp,m_func).exec_range(); - } //end apply + private: + inline __device__ void apply() const { + apply_impl(m_rp, m_func).exec_range(); + } // end apply -public: + public: + inline __device__ void operator()(void) const { this->apply(); } - inline - __device__ - void operator()(void) const - { - this-> apply(); - } - - inline - void execute() const - { - const array_index_type maxblocks = 65535; //not true for blockIdx.x for newer archs - if ( RP::rank == 2 ) - { - const dim3 block( m_rp.m_tile[0] , m_rp.m_tile[1] , 1); + inline void execute() const { + const array_index_type maxblocks = + 65535; // not true for blockIdx.x for newer archs + if (RP::rank == 2) { + const dim3 block(m_rp.m_tile[0], m_rp.m_tile[1], 1); const dim3 grid( - std::min( ( m_rp.m_upper[0] - m_rp.m_lower[0] + block.x - 1 ) / block.x , maxblocks ) - , std::min( ( m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1 ) / block.y , maxblocks ) - , 1 - ); - CudaLaunch< DeviceIterateTile >( *this , grid , block ); - } - else if ( RP::rank == 3 ) - { - const dim3 block( m_rp.m_tile[0] , m_rp.m_tile[1] , m_rp.m_tile[2] ); + std::min((m_rp.m_upper[0] - m_rp.m_lower[0] + block.x - 1) / block.x, + maxblocks), + std::min((m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1) / block.y, + maxblocks), + 1); + CudaLaunch(*this, grid, block); + } else if (RP::rank == 3) { + const dim3 block(m_rp.m_tile[0], m_rp.m_tile[1], m_rp.m_tile[2]); const dim3 grid( - std::min( ( m_rp.m_upper[0] - m_rp.m_lower[0] + block.x - 1 ) / block.x , maxblocks ) - , std::min( ( m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1 ) / block.y , maxblocks ) - , std::min( ( m_rp.m_upper[2] - m_rp.m_lower[2] + block.z - 1 ) / block.z , maxblocks ) - ); - CudaLaunch< DeviceIterateTile >( *this , grid , block ); - } - else if ( RP::rank == 4 ) - { - // id0,id1 encoded within threadIdx.x; id2 to threadIdx.y; id3 to threadIdx.z - const dim3 block( m_rp.m_tile[0]*m_rp.m_tile[1] , m_rp.m_tile[2] , m_rp.m_tile[3] ); + std::min((m_rp.m_upper[0] - m_rp.m_lower[0] + block.x - 1) / block.x, + maxblocks), + std::min((m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1) / block.y, + maxblocks), + std::min((m_rp.m_upper[2] - m_rp.m_lower[2] + block.z - 1) / block.z, + maxblocks)); + CudaLaunch(*this, grid, block); + } else if (RP::rank == 4) { + // id0,id1 encoded within threadIdx.x; id2 to threadIdx.y; id3 to + // threadIdx.z + const dim3 block(m_rp.m_tile[0] * m_rp.m_tile[1], m_rp.m_tile[2], + m_rp.m_tile[3]); const dim3 grid( - std::min( static_cast( m_rp.m_tile_end[0] * m_rp.m_tile_end[1] ) - , static_cast(maxblocks) ) - , std::min( ( m_rp.m_upper[2] - m_rp.m_lower[2] + block.y - 1 ) / block.y , maxblocks ) - , std::min( ( m_rp.m_upper[3] - m_rp.m_lower[3] + block.z - 1 ) / block.z , maxblocks ) - ); - CudaLaunch< DeviceIterateTile >( *this , grid , block ); - } - else if ( RP::rank == 5 ) - { - // id0,id1 encoded within threadIdx.x; id2,id3 to threadIdx.y; id4 to threadIdx.z - const dim3 block( m_rp.m_tile[0]*m_rp.m_tile[1] , m_rp.m_tile[2]*m_rp.m_tile[3] , m_rp.m_tile[4] ); + std::min( + static_cast(m_rp.m_tile_end[0] * m_rp.m_tile_end[1]), + static_cast(maxblocks)), + std::min((m_rp.m_upper[2] - m_rp.m_lower[2] + block.y - 1) / block.y, + maxblocks), + std::min((m_rp.m_upper[3] - m_rp.m_lower[3] + block.z - 1) / block.z, + maxblocks)); + CudaLaunch(*this, grid, block); + } else if (RP::rank == 5) { + // id0,id1 encoded within threadIdx.x; id2,id3 to threadIdx.y; id4 to + // threadIdx.z + const dim3 block(m_rp.m_tile[0] * m_rp.m_tile[1], + m_rp.m_tile[2] * m_rp.m_tile[3], m_rp.m_tile[4]); const dim3 grid( - std::min( static_cast( m_rp.m_tile_end[0] * m_rp.m_tile_end[1] ) - , static_cast(maxblocks) ) - , std::min( static_cast( m_rp.m_tile_end[2] * m_rp.m_tile_end[3] ) - , static_cast(maxblocks) ) - , std::min( ( m_rp.m_upper[4] - m_rp.m_lower[4] + block.z - 1 ) / block.z , maxblocks ) - ); - CudaLaunch< DeviceIterateTile >( *this , grid , block ); - } - else if ( RP::rank == 6 ) - { - // id0,id1 encoded within threadIdx.x; id2,id3 to threadIdx.y; id4,id5 to threadIdx.z - const dim3 block( m_rp.m_tile[0]*m_rp.m_tile[1] , m_rp.m_tile[2]*m_rp.m_tile[3] , m_rp.m_tile[4]*m_rp.m_tile[5] ); + std::min( + static_cast(m_rp.m_tile_end[0] * m_rp.m_tile_end[1]), + static_cast(maxblocks)), + std::min( + static_cast(m_rp.m_tile_end[2] * m_rp.m_tile_end[3]), + static_cast(maxblocks)), + std::min((m_rp.m_upper[4] - m_rp.m_lower[4] + block.z - 1) / block.z, + maxblocks)); + CudaLaunch(*this, grid, block); + } else if (RP::rank == 6) { + // id0,id1 encoded within threadIdx.x; id2,id3 to threadIdx.y; id4,id5 to + // threadIdx.z + const dim3 block(m_rp.m_tile[0] * m_rp.m_tile[1], + m_rp.m_tile[2] * m_rp.m_tile[3], + m_rp.m_tile[4] * m_rp.m_tile[5]); const dim3 grid( - std::min( static_cast( m_rp.m_tile_end[0] * m_rp.m_tile_end[1] ) - , static_cast(maxblocks) ) - , std::min( static_cast( m_rp.m_tile_end[2] * m_rp.m_tile_end[3] ) - , static_cast(maxblocks) ) - , std::min( static_cast( m_rp.m_tile_end[4] * m_rp.m_tile_end[5] ) - , static_cast(maxblocks) ) - ); - CudaLaunch< DeviceIterateTile >( *this , grid , block ); - } - else - { + std::min( + static_cast(m_rp.m_tile_end[0] * m_rp.m_tile_end[1]), + static_cast(maxblocks)), + std::min( + static_cast(m_rp.m_tile_end[2] * m_rp.m_tile_end[3]), + static_cast(maxblocks)), + std::min( + static_cast(m_rp.m_tile_end[4] * m_rp.m_tile_end[5]), + static_cast(maxblocks))); + CudaLaunch(*this, grid, block); + } else { printf("Kokkos::MDRange Error: Exceeded rank bounds with Cuda\n"); Kokkos::abort("Aborting"); } - } //end execute + } // end execute -protected: - const RP m_rp; - const Functor m_func; + protected: + const RP m_rp; + const Functor m_func; }; -} } //end namespace Kokkos::Impl +} // namespace Impl +} // namespace Kokkos #endif #endif - diff --git a/lib/kokkos/core/src/Cuda/KokkosExp_Cuda_IterateTile_Refactor.hpp b/lib/kokkos/core/src/Cuda/KokkosExp_Cuda_IterateTile_Refactor.hpp index 636e05c8ac..cb7f5971ae 100644 --- a/lib/kokkos/core/src/Cuda/KokkosExp_Cuda_IterateTile_Refactor.hpp +++ b/lib/kokkos/core/src/Cuda/KokkosExp_Cuda_IterateTile_Refactor.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_CUDA_EXP_ITERATE_TILE_REFACTOR_HPP #include -#if defined( __CUDACC__ ) && defined( KOKKOS_ENABLE_CUDA ) +#if defined(__CUDACC__) && defined(KOKKOS_ENABLE_CUDA) #include #include @@ -55,49 +56,52 @@ // #include // Including the file above leads to following type of errors: -// /home/ndellin/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp(84): error: incomplete type is not allowed -// use existing Kokkos functionality, e.g. max blocks, once resolved +// /home/ndellin/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp(84): error: incomplete +// type is not allowed use existing Kokkos functionality, e.g. max blocks, once +// resolved #if defined(KOKKOS_ENABLE_PROFILING) #include #include #endif -namespace Kokkos { namespace Impl { +namespace Kokkos { +namespace Impl { namespace Refactor { // ------------------------------------------------------------------ // // ParallelFor iteration pattern -template< int N , typename RP , typename Functor , typename Tag > +template struct DeviceIterateTile; -//Rank 2 +// Rank 2 // Specializations for void tag type -template< typename RP , typename Functor > -struct DeviceIterateTile<2,RP,Functor,void > -{ +template +struct DeviceIterateTile<2, RP, Functor, void> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} - inline __device__ - void exec_range() const - { + inline __device__ void exec_range() const { // LL if (RP::inner_direction == RP::Left) { - for ( index_type tile_id1 = (index_type)blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && (index_type)threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id0 = (index_type)blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && (index_type)threadIdx.x < m_rp.m_tile[0] ) { - m_func(offset_0 , offset_1); + for (index_type tile_id1 = (index_type)blockIdx.y; + tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + (index_type)threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id0 = (index_type)blockIdx.x; + tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + (index_type)threadIdx.x < m_rp.m_tile[0]) { + m_func(offset_0, offset_1); } } } @@ -105,108 +109,125 @@ struct DeviceIterateTile<2,RP,Functor,void > } // LR else { - for ( index_type tile_id0 = (index_type)blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && (index_type)threadIdx.x < m_rp.m_tile[0] ) { - - for ( index_type tile_id1 = (index_type)blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && (index_type)threadIdx.y < m_rp.m_tile[1] ) { - m_func(offset_0 , offset_1); + for (index_type tile_id0 = (index_type)blockIdx.x; + tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + (index_type)threadIdx.x < m_rp.m_tile[0]) { + for (index_type tile_id1 = (index_type)blockIdx.y; + tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + (index_type)threadIdx.y < m_rp.m_tile[1]) { + m_func(offset_0, offset_1); } } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; // Specializations for tag type -template< typename RP , typename Functor , typename Tag > -struct DeviceIterateTile<2,RP,Functor,Tag> -{ +template +struct DeviceIterateTile<2, RP, Functor, Tag> { using index_type = typename RP::index_type; - inline __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + inline __device__ DeviceIterateTile(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} - inline __device__ - void exec_range() const - { + inline __device__ void exec_range() const { if (RP::inner_direction == RP::Left) { // Loop over size maxnumblocks until full range covered - for ( index_type tile_id1 = (index_type)blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && (index_type)threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id0 = (index_type)blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && (index_type)threadIdx.x < m_rp.m_tile[0] ) { - m_func(Tag(), offset_0 , offset_1); + for (index_type tile_id1 = (index_type)blockIdx.y; + tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + (index_type)threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id0 = (index_type)blockIdx.x; + tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + (index_type)threadIdx.x < m_rp.m_tile[0]) { + m_func(Tag(), offset_0, offset_1); + } + } + } + } + } else { + for (index_type tile_id0 = (index_type)blockIdx.x; + tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + (index_type)threadIdx.x < m_rp.m_tile[0]) { + for (index_type tile_id1 = (index_type)blockIdx.y; + tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + (index_type)threadIdx.y < m_rp.m_tile[1]) { + m_func(Tag(), offset_0, offset_1); } } } } } - else { - for ( index_type tile_id0 = (index_type)blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && (index_type)threadIdx.x < m_rp.m_tile[0] ) { + } // end exec_range - for ( index_type tile_id1 = (index_type)blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && (index_type)threadIdx.y < m_rp.m_tile[1] ) { - m_func(Tag(), offset_0 , offset_1); - } - } - } - } - } - } //end exec_range - -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; - -//Rank 3 +// Rank 3 // Specializations for void tag type -template< typename RP , typename Functor > -struct DeviceIterateTile<3,RP,Functor,void > -{ +template +struct DeviceIterateTile<3, RP, Functor, void> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} - inline __device__ - void exec_range() const - { + inline __device__ void exec_range() const { // LL if (RP::inner_direction == RP::Left) { - for ( index_type tile_id2 = (index_type)blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && (index_type)threadIdx.z < m_rp.m_tile[2] ) { - - for ( index_type tile_id1 = (index_type)blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && (index_type)threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id0 = (index_type)blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && (index_type)threadIdx.x < m_rp.m_tile[0] ) { - m_func(offset_0 , offset_1 , offset_2); + for (index_type tile_id2 = (index_type)blockIdx.z; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + (index_type)threadIdx.z < m_rp.m_tile[2]) { + for (index_type tile_id1 = (index_type)blockIdx.y; + tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + (index_type)threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id0 = (index_type)blockIdx.x; + tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + (index_type)threadIdx.x < m_rp.m_tile[0]) { + m_func(offset_0, offset_1, offset_2); } } } @@ -216,18 +237,28 @@ struct DeviceIterateTile<3,RP,Functor,void > } // LR else { - for ( index_type tile_id0 = (index_type)blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && (index_type)threadIdx.x < m_rp.m_tile[0] ) { - - for ( index_type tile_id1 = (index_type)blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && (index_type)threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id2 = (index_type)blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && (index_type)threadIdx.z < m_rp.m_tile[2] ) { - m_func(offset_0 , offset_1 , offset_2); + for (index_type tile_id0 = (index_type)blockIdx.x; + tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + (index_type)threadIdx.x < m_rp.m_tile[0]) { + for (index_type tile_id1 = (index_type)blockIdx.y; + tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + (index_type)threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id2 = (index_type)blockIdx.z; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + (index_type)threadIdx.z < m_rp.m_tile[2]) { + m_func(offset_0, offset_1, offset_2); } } } @@ -235,41 +266,74 @@ struct DeviceIterateTile<3,RP,Functor,void > } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; // Specializations for void tag type -template< typename RP , typename Functor , typename Tag > -struct DeviceIterateTile<3,RP,Functor,Tag> -{ +template +struct DeviceIterateTile<3, RP, Functor, Tag> { using index_type = typename RP::index_type; - inline __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + inline __device__ DeviceIterateTile(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} - inline __device__ - void exec_range() const - { + inline __device__ void exec_range() const { if (RP::inner_direction == RP::Left) { - for ( index_type tile_id2 = (index_type)blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && (index_type)threadIdx.z < m_rp.m_tile[2] ) { - - for ( index_type tile_id1 = (index_type)blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && (index_type)threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id0 = (index_type)blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && (index_type)threadIdx.x < m_rp.m_tile[0] ) { - m_func(Tag(), offset_0 , offset_1 , offset_2); + for (index_type tile_id2 = (index_type)blockIdx.z; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + (index_type)threadIdx.z < m_rp.m_tile[2]) { + for (index_type tile_id1 = (index_type)blockIdx.y; + tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + (index_type)threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id0 = (index_type)blockIdx.x; + tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + (index_type)threadIdx.x < m_rp.m_tile[0]) { + m_func(Tag(), offset_0, offset_1, offset_2); + } + } + } + } + } + } + } else { + for (index_type tile_id0 = (index_type)blockIdx.x; + tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x) { + const index_type offset_0 = tile_id0 * m_rp.m_tile[0] + + (index_type)threadIdx.x + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + (index_type)threadIdx.x < m_rp.m_tile[0]) { + for (index_type tile_id1 = (index_type)blockIdx.y; + tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + (index_type)threadIdx.y < m_rp.m_tile[1]) { + for (index_type tile_id2 = (index_type)blockIdx.z; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + (index_type)threadIdx.z < m_rp.m_tile[2]) { + m_func(Tag(), offset_0, offset_1, offset_2); } } } @@ -277,84 +341,72 @@ struct DeviceIterateTile<3,RP,Functor,Tag> } } } - else { - for ( index_type tile_id0 = (index_type)blockIdx.x; tile_id0 < m_rp.m_tile_end[0]; tile_id0 += gridDim.x ) { - const index_type offset_0 = tile_id0*m_rp.m_tile[0] + (index_type)threadIdx.x + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && (index_type)threadIdx.x < m_rp.m_tile[0] ) { + } // end exec_range - for ( index_type tile_id1 = (index_type)blockIdx.y; tile_id1 < m_rp.m_tile_end[1]; tile_id1 += gridDim.y ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && (index_type)threadIdx.y < m_rp.m_tile[1] ) { - - for ( index_type tile_id2 = (index_type)blockIdx.z; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.z ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && (index_type)threadIdx.z < m_rp.m_tile[2] ) { - m_func(Tag(), offset_0 , offset_1 , offset_2); - } - } - } - } - } - } - } - } //end exec_range - -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; - -//Rank 4 +// Rank 4 // Specializations for void tag type -template< typename RP , typename Functor > -struct DeviceIterateTile<4,RP,Functor,void > -{ +template +struct DeviceIterateTile<4, RP, Functor, void> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); // LL if (RP::inner_direction == RP::Left) { - const index_type temp0 = m_rp.m_tile_end[0]; - const index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x % numbl0; const index_type tile_id1 = (index_type)blockIdx.x / numbl0; - const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; - for ( index_type tile_id3 = (index_type)blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { - const index_type offset_3 = tile_id3*m_rp.m_tile[3] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && (index_type)threadIdx.z < m_rp.m_tile[3] ) { - - for ( index_type tile_id2 = (index_type)blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && (index_type)threadIdx.y < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3); + for (index_type tile_id3 = (index_type)blockIdx.z; + tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z) { + const index_type offset_3 = tile_id3 * m_rp.m_tile[3] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + (index_type)threadIdx.z < m_rp.m_tile[3]) { + for (index_type tile_id2 = (index_type)blockIdx.y; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + (index_type)threadIdx.y < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = i * m_rp.m_tile[0] + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(offset_0, offset_1, offset_2, offset_3); } } } @@ -366,33 +418,42 @@ struct DeviceIterateTile<4,RP,Functor,void > } // LR else { - const index_type temp0 = m_rp.m_tile_end[0]; - const index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x / numbl1; const index_type tile_id1 = (index_type)blockIdx.x % numbl1; - const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type tile_id2 = (index_type)blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && (index_type)threadIdx.y < m_rp.m_tile[2] ) { - - for ( index_type tile_id3 = (index_type)blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { - const index_type offset_3 = tile_id3*m_rp.m_tile[3] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && (index_type)threadIdx.z < m_rp.m_tile[3] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type tile_id2 = (index_type)blockIdx.y; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + (index_type)threadIdx.y < m_rp.m_tile[2]) { + for (index_type tile_id3 = (index_type)blockIdx.z; + tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z) { + const index_type offset_3 = tile_id3 * m_rp.m_tile[3] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + (index_type)threadIdx.z < m_rp.m_tile[3]) { + m_func(offset_0, offset_1, offset_2, offset_3); } } } @@ -402,61 +463,70 @@ struct DeviceIterateTile<4,RP,Functor,void > } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; // Specializations for void tag type -template< typename RP , typename Functor , typename Tag > -struct DeviceIterateTile<4,RP,Functor,Tag> -{ +template +struct DeviceIterateTile<4, RP, Functor, Tag> { using index_type = typename RP::index_type; - inline __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + inline __device__ DeviceIterateTile(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); if (RP::inner_direction == RP::Left) { - const index_type temp0 = m_rp.m_tile_end[0]; - const index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x % numbl0; const index_type tile_id1 = (index_type)blockIdx.x / numbl0; - const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; - for ( index_type tile_id3 = (index_type)blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { - const index_type offset_3 = tile_id3*m_rp.m_tile[3] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && (index_type)threadIdx.z < m_rp.m_tile[3] ) { - - for ( index_type tile_id2 = (index_type)blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && (index_type)threadIdx.y < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(Tag(), offset_0 , offset_1 , offset_2 , offset_3); + for (index_type tile_id3 = (index_type)blockIdx.z; + tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z) { + const index_type offset_3 = tile_id3 * m_rp.m_tile[3] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + (index_type)threadIdx.z < m_rp.m_tile[3]) { + for (index_type tile_id2 = (index_type)blockIdx.y; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + (index_type)threadIdx.y < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = i * m_rp.m_tile[0] + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(Tag(), offset_0, offset_1, offset_2, offset_3); } } } @@ -465,35 +535,43 @@ struct DeviceIterateTile<4,RP,Functor,Tag> } } } - } - else { - const index_type temp0 = m_rp.m_tile_end[0]; - const index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + } else { + const index_type temp0 = m_rp.m_tile_end[0]; + const index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x / numbl1; const index_type tile_id1 = (index_type)blockIdx.x % numbl1; - const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = tile_id1*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type tile_id2 = (index_type)blockIdx.y; tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y ) { - const index_type offset_2 = tile_id2*m_rp.m_tile[2] + (index_type)threadIdx.y + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && (index_type)threadIdx.y < m_rp.m_tile[2] ) { - - for ( index_type tile_id3 = (index_type)blockIdx.z; tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z ) { - const index_type offset_3 = tile_id3*m_rp.m_tile[3] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && (index_type)threadIdx.z < m_rp.m_tile[3] ) { - m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = tile_id1 * m_rp.m_tile[1] + thr_id1 + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type tile_id2 = (index_type)blockIdx.y; + tile_id2 < m_rp.m_tile_end[2]; tile_id2 += gridDim.y) { + const index_type offset_2 = tile_id2 * m_rp.m_tile[2] + + (index_type)threadIdx.y + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + (index_type)threadIdx.y < m_rp.m_tile[2]) { + for (index_type tile_id3 = (index_type)blockIdx.z; + tile_id3 < m_rp.m_tile_end[3]; tile_id3 += gridDim.z) { + const index_type offset_3 = tile_id3 * m_rp.m_tile[3] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + (index_type)threadIdx.z < m_rp.m_tile[3]) { + m_func(Tag(), offset_0, offset_1, offset_2, offset_3); } } } @@ -503,80 +581,90 @@ struct DeviceIterateTile<4,RP,Functor,Tag> } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; - -//Rank 5 +// Rank 5 // Specializations for void tag type -template< typename RP , typename Functor > -struct DeviceIterateTile<5,RP,Functor,void > -{ +template +struct DeviceIterateTile<5, RP, Functor, void> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); // LL if (RP::inner_direction == RP::Left) { - - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x % numbl0; const index_type tile_id1 = (index_type)blockIdx.x / numbl0; - const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl3 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl2) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id2 = (index_type)blockIdx.y % numbl2; const index_type tile_id3 = (index_type)blockIdx.y / numbl2; - const index_type thr_id2 = (index_type)threadIdx.y % m_rp.m_tile[2]; - const index_type thr_id3 = (index_type)threadIdx.y / m_rp.m_tile[2]; + const index_type thr_id2 = (index_type)threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = (index_type)threadIdx.y / m_rp.m_tile[2]; - for ( index_type tile_id4 = (index_type)blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { - const index_type offset_4 = tile_id4*m_rp.m_tile[4] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && (index_type)threadIdx.z < m_rp.m_tile[4] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3, offset_4); + for (index_type tile_id4 = (index_type)blockIdx.z; + tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z) { + const index_type offset_4 = tile_id4 * m_rp.m_tile[4] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && + (index_type)threadIdx.z < m_rp.m_tile[4]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3) { + const index_type offset_3 = + l * m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = j * m_rp.m_tile[1] + thr_id1 + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = i * m_rp.m_tile[0] + + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(offset_0, offset_1, offset_2, offset_3, + offset_4); } } } @@ -590,48 +678,61 @@ struct DeviceIterateTile<5,RP,Functor,void > } // LR else { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x / numbl1; const index_type tile_id1 = (index_type)blockIdx.x % numbl1; - const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl2 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl3) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id2 = (index_type)blockIdx.y / numbl3; const index_type tile_id3 = (index_type)blockIdx.y % numbl3; - const index_type thr_id2 = (index_type)threadIdx.y / m_rp.m_tile[3]; - const index_type thr_id3 = (index_type)threadIdx.y % m_rp.m_tile[3]; + const index_type thr_id2 = (index_type)threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = (index_type)threadIdx.y % m_rp.m_tile[3]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type tile_id4 = (index_type)blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { - const index_type offset_4 = tile_id4*m_rp.m_tile[4] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && (index_type)threadIdx.z < m_rp.m_tile[4] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3 , offset_4); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = l * m_rp.m_tile[3] + thr_id3 + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + thr_id3 < m_rp.m_tile[3]) { + for (index_type tile_id4 = (index_type)blockIdx.z; + tile_id4 < m_rp.m_tile_end[4]; + tile_id4 += gridDim.z) { + const index_type offset_4 = tile_id4 * m_rp.m_tile[4] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && + (index_type)threadIdx.z < m_rp.m_tile[4]) { + m_func(offset_0, offset_1, offset_2, offset_3, + offset_4); } } } @@ -643,77 +744,89 @@ struct DeviceIterateTile<5,RP,Functor,void > } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; // Specializations for tag type -template< typename RP , typename Functor , typename Tag > -struct DeviceIterateTile<5,RP,Functor,Tag> -{ +template +struct DeviceIterateTile<5, RP, Functor, Tag> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); // LL if (RP::inner_direction == RP::Left) { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x % numbl0; const index_type tile_id1 = (index_type)blockIdx.x / numbl0; - const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl3 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl2) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id2 = (index_type)blockIdx.y % numbl2; const index_type tile_id3 = (index_type)blockIdx.y / numbl2; - const index_type thr_id2 = (index_type)threadIdx.y % m_rp.m_tile[2]; - const index_type thr_id3 = (index_type)threadIdx.y / m_rp.m_tile[2]; + const index_type thr_id2 = (index_type)threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = (index_type)threadIdx.y / m_rp.m_tile[2]; - for ( index_type tile_id4 = (index_type)blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { - const index_type offset_4 = tile_id4*m_rp.m_tile[4] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && (index_type)threadIdx.z < m_rp.m_tile[4] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3, offset_4); + for (index_type tile_id4 = (index_type)blockIdx.z; + tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z) { + const index_type offset_4 = tile_id4 * m_rp.m_tile[4] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && + (index_type)threadIdx.z < m_rp.m_tile[4]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3) { + const index_type offset_3 = + l * m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = j * m_rp.m_tile[1] + thr_id1 + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = i * m_rp.m_tile[0] + + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(Tag(), offset_0, offset_1, offset_2, offset_3, + offset_4); } } } @@ -727,48 +840,61 @@ struct DeviceIterateTile<5,RP,Functor,Tag> } // LR else { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x / numbl1; const index_type tile_id1 = (index_type)blockIdx.x % numbl1; - const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl2 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl3) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id2 = (index_type)blockIdx.y / numbl3; const index_type tile_id3 = (index_type)blockIdx.y % numbl3; - const index_type thr_id2 = (index_type)threadIdx.y / m_rp.m_tile[3]; - const index_type thr_id3 = (index_type)threadIdx.y % m_rp.m_tile[3]; + const index_type thr_id2 = (index_type)threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = (index_type)threadIdx.y % m_rp.m_tile[3]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type tile_id4 = (index_type)blockIdx.z; tile_id4 < m_rp.m_tile_end[4]; tile_id4 += gridDim.z ) { - const index_type offset_4 = tile_id4*m_rp.m_tile[4] + (index_type)threadIdx.z + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && (index_type)threadIdx.z < m_rp.m_tile[4] ) { - m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3 , offset_4); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = l * m_rp.m_tile[3] + thr_id3 + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + thr_id3 < m_rp.m_tile[3]) { + for (index_type tile_id4 = (index_type)blockIdx.z; + tile_id4 < m_rp.m_tile_end[4]; + tile_id4 += gridDim.z) { + const index_type offset_4 = tile_id4 * m_rp.m_tile[4] + + (index_type)threadIdx.z + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && + (index_type)threadIdx.z < m_rp.m_tile[4]) { + m_func(Tag(), offset_0, offset_1, offset_2, offset_3, + offset_4); } } } @@ -780,94 +906,107 @@ struct DeviceIterateTile<5,RP,Functor,Tag> } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; - -//Rank 6 +// Rank 6 // Specializations for void tag type -template< typename RP , typename Functor > -struct DeviceIterateTile<6,RP,Functor,void > -{ +template +struct DeviceIterateTile<6, RP, Functor, void> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); // LL if (RP::inner_direction == RP::Left) { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x % numbl0; const index_type tile_id1 = (index_type)blockIdx.x / numbl0; - const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl3 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl2) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id2 = (index_type)blockIdx.y % numbl2; const index_type tile_id3 = (index_type)blockIdx.y / numbl2; - const index_type thr_id2 = (index_type)threadIdx.y % m_rp.m_tile[2]; - const index_type thr_id3 = (index_type)threadIdx.y / m_rp.m_tile[2]; + const index_type thr_id2 = (index_type)threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = (index_type)threadIdx.y / m_rp.m_tile[2]; - temp0 = m_rp.m_tile_end[4]; - temp1 = m_rp.m_tile_end[5]; - const index_type numbl4 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl5 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl4 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl4 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl5 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl4) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id4 = (index_type)blockIdx.z % numbl4; const index_type tile_id5 = (index_type)blockIdx.z / numbl4; - const index_type thr_id4 = (index_type)threadIdx.z % m_rp.m_tile[4]; - const index_type thr_id5 = (index_type)threadIdx.z / m_rp.m_tile[4]; + const index_type thr_id4 = (index_type)threadIdx.z % m_rp.m_tile[4]; + const index_type thr_id5 = (index_type)threadIdx.z / m_rp.m_tile[4]; - for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { - const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; - if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { - - for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { - const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3, offset_4, offset_5); + for (index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5) { + const index_type offset_5 = + n * m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; + if (offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5]) { + for (index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4) { + const index_type offset_4 = + m * m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = + l * m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = k * m_rp.m_tile[2] + thr_id2 + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + thr_id2 < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = j * m_rp.m_tile[1] + + thr_id1 + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(offset_0, offset_1, offset_2, offset_3, + offset_4, offset_5); } } } @@ -883,63 +1022,80 @@ struct DeviceIterateTile<6,RP,Functor,void > } // LR else { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x / numbl1; const index_type tile_id1 = (index_type)blockIdx.x % numbl1; - const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl2 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl3) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id2 = (index_type)blockIdx.y / numbl3; const index_type tile_id3 = (index_type)blockIdx.y % numbl3; - const index_type thr_id2 = (index_type)threadIdx.y / m_rp.m_tile[3]; - const index_type thr_id3 = (index_type)threadIdx.y % m_rp.m_tile[3]; + const index_type thr_id2 = (index_type)threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = (index_type)threadIdx.y % m_rp.m_tile[3]; - temp0 = m_rp.m_tile_end[4]; - temp1 = m_rp.m_tile_end[5]; - const index_type numbl5 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl4 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl5 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl5 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl4 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl5) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id4 = (index_type)blockIdx.z / numbl5; const index_type tile_id5 = (index_type)blockIdx.z % numbl5; - const index_type thr_id4 = (index_type)threadIdx.z / m_rp.m_tile[5]; - const index_type thr_id5 = (index_type)threadIdx.z % m_rp.m_tile[5]; + const index_type thr_id4 = (index_type)threadIdx.z / m_rp.m_tile[5]; + const index_type thr_id5 = (index_type)threadIdx.z % m_rp.m_tile[5]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { - const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { - - for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { - const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; - if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { - m_func(offset_0 , offset_1 , offset_2 , offset_3 , offset_4 , offset_5); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = l * m_rp.m_tile[3] + thr_id3 + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + thr_id3 < m_rp.m_tile[3]) { + for (index_type m = tile_id4; m < m_rp.m_tile_end[4]; + m += numbl4) { + const index_type offset_4 = m * m_rp.m_tile[4] + + thr_id4 + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && + thr_id4 < m_rp.m_tile[4]) { + for (index_type n = tile_id5; n < m_rp.m_tile_end[5]; + n += numbl5) { + const index_type offset_5 = + n * m_rp.m_tile[5] + thr_id5 + + (index_type)m_rp.m_lower[5]; + if (offset_5 < m_rp.m_upper[5] && + thr_id5 < m_rp.m_tile[5]) { + m_func(offset_0, offset_1, offset_2, offset_3, + offset_4, offset_5); } } } @@ -953,92 +1109,106 @@ struct DeviceIterateTile<6,RP,Functor,void > } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; // Specializations for tag type -template< typename RP , typename Functor , typename Tag > -struct DeviceIterateTile<6,RP,Functor,Tag> -{ +template +struct DeviceIterateTile<6, RP, Functor, Tag> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ ) - : m_rp(rp_) - , m_func(f_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_) + : m_rp(rp_), m_func(f_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); // LL if (RP::inner_direction == RP::Left) { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl0 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl1 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl0 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl0 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl1 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl0) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x % numbl0; const index_type tile_id1 = (index_type)blockIdx.x / numbl0; - const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; - const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; + const index_type thr_id0 = (index_type)threadIdx.x % m_rp.m_tile[0]; + const index_type thr_id1 = (index_type)threadIdx.x / m_rp.m_tile[0]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl2 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl3 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl2 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl2 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl3 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl2) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id2 = (index_type)blockIdx.y % numbl2; const index_type tile_id3 = (index_type)blockIdx.y / numbl2; - const index_type thr_id2 = (index_type)threadIdx.y % m_rp.m_tile[2]; - const index_type thr_id3 = (index_type)threadIdx.y / m_rp.m_tile[2]; + const index_type thr_id2 = (index_type)threadIdx.y % m_rp.m_tile[2]; + const index_type thr_id3 = (index_type)threadIdx.y / m_rp.m_tile[2]; - temp0 = m_rp.m_tile_end[4]; - temp1 = m_rp.m_tile_end[5]; - const index_type numbl4 = ( temp0 <= max_blocks ? temp0 : max_blocks ) ; - const index_type numbl5 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl4 ) : - ( temp1 <= max_blocks ? temp1 : max_blocks ) ); + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl4 = (temp0 <= max_blocks ? temp0 : max_blocks); + const index_type numbl5 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl4) + : (temp1 <= max_blocks ? temp1 : max_blocks)); const index_type tile_id4 = (index_type)blockIdx.z % numbl4; const index_type tile_id5 = (index_type)blockIdx.z / numbl4; - const index_type thr_id4 = (index_type)threadIdx.z % m_rp.m_tile[4]; - const index_type thr_id5 = (index_type)threadIdx.z / m_rp.m_tile[4]; + const index_type thr_id4 = (index_type)threadIdx.z % m_rp.m_tile[4]; + const index_type thr_id5 = (index_type)threadIdx.z / m_rp.m_tile[4]; - for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { - const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; - if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { - - for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { - const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type j = tile_id1 ; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type i = tile_id0 ; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3, offset_4, offset_5); + for (index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5) { + const index_type offset_5 = + n * m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; + if (offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5]) { + for (index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4) { + const index_type offset_4 = + m * m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = + l * m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = k * m_rp.m_tile[2] + thr_id2 + + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && + thr_id2 < m_rp.m_tile[2]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; + j += numbl1) { + const index_type offset_1 = j * m_rp.m_tile[1] + + thr_id1 + + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && + thr_id1 < m_rp.m_tile[1]) { + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; + i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && + thr_id0 < m_rp.m_tile[0]) { + m_func(Tag(), offset_0, offset_1, offset_2, + offset_3, offset_4, offset_5); } } } @@ -1054,63 +1224,80 @@ struct DeviceIterateTile<6,RP,Functor,Tag> } // LR else { - index_type temp0 = m_rp.m_tile_end[0]; - index_type temp1 = m_rp.m_tile_end[1]; - const index_type numbl1 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl0 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl1 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + index_type temp0 = m_rp.m_tile_end[0]; + index_type temp1 = m_rp.m_tile_end[1]; + const index_type numbl1 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl0 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl1) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id0 = (index_type)blockIdx.x / numbl1; const index_type tile_id1 = (index_type)blockIdx.x % numbl1; - const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; - const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; + const index_type thr_id0 = (index_type)threadIdx.x / m_rp.m_tile[1]; + const index_type thr_id1 = (index_type)threadIdx.x % m_rp.m_tile[1]; - temp0 = m_rp.m_tile_end[2]; - temp1 = m_rp.m_tile_end[3]; - const index_type numbl3 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl2 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl3 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[2]; + temp1 = m_rp.m_tile_end[3]; + const index_type numbl3 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl2 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl3) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id2 = (index_type)blockIdx.y / numbl3; const index_type tile_id3 = (index_type)blockIdx.y % numbl3; - const index_type thr_id2 = (index_type)threadIdx.y / m_rp.m_tile[3]; - const index_type thr_id3 = (index_type)threadIdx.y % m_rp.m_tile[3]; + const index_type thr_id2 = (index_type)threadIdx.y / m_rp.m_tile[3]; + const index_type thr_id3 = (index_type)threadIdx.y % m_rp.m_tile[3]; - temp0 = m_rp.m_tile_end[4]; - temp1 = m_rp.m_tile_end[5]; - const index_type numbl5 = ( temp1 <= max_blocks ? temp1 : max_blocks ) ; - const index_type numbl4 = ( temp0*temp1 > max_blocks ? index_type( max_blocks / numbl5 ) : - ( temp0 <= max_blocks ? temp0 : max_blocks ) ); + temp0 = m_rp.m_tile_end[4]; + temp1 = m_rp.m_tile_end[5]; + const index_type numbl5 = (temp1 <= max_blocks ? temp1 : max_blocks); + const index_type numbl4 = + (temp0 * temp1 > max_blocks + ? index_type(max_blocks / numbl5) + : (temp0 <= max_blocks ? temp0 : max_blocks)); const index_type tile_id4 = (index_type)blockIdx.z / numbl5; const index_type tile_id5 = (index_type)blockIdx.z % numbl5; - const index_type thr_id4 = (index_type)threadIdx.z / m_rp.m_tile[5]; - const index_type thr_id5 = (index_type)threadIdx.z % m_rp.m_tile[5]; + const index_type thr_id4 = (index_type)threadIdx.z / m_rp.m_tile[5]; + const index_type thr_id5 = (index_type)threadIdx.z % m_rp.m_tile[5]; - for ( index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0 ) { - const index_type offset_0 = i*m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; - if ( offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0] ) { - - for ( index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1 ) { - const index_type offset_1 = j*m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; - if ( offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1] ) { - - for ( index_type k = tile_id2; k < m_rp.m_tile_end[2]; k += numbl2 ) { - const index_type offset_2 = k*m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; - if ( offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2] ) { - - for ( index_type l = tile_id3; l < m_rp.m_tile_end[3]; l += numbl3 ) { - const index_type offset_3 = l*m_rp.m_tile[3] + thr_id3 + (index_type)m_rp.m_lower[3]; - if ( offset_3 < m_rp.m_upper[3] && thr_id3 < m_rp.m_tile[3] ) { - - for ( index_type m = tile_id4; m < m_rp.m_tile_end[4]; m += numbl4 ) { - const index_type offset_4 = m*m_rp.m_tile[4] + thr_id4 + (index_type)m_rp.m_lower[4]; - if ( offset_4 < m_rp.m_upper[4] && thr_id4 < m_rp.m_tile[4] ) { - - for ( index_type n = tile_id5; n < m_rp.m_tile_end[5]; n += numbl5 ) { - const index_type offset_5 = n*m_rp.m_tile[5] + thr_id5 + (index_type)m_rp.m_lower[5]; - if ( offset_5 < m_rp.m_upper[5] && thr_id5 < m_rp.m_tile[5] ) { - m_func(Tag() , offset_0 , offset_1 , offset_2 , offset_3 , offset_4 , offset_5); + for (index_type i = tile_id0; i < m_rp.m_tile_end[0]; i += numbl0) { + const index_type offset_0 = + i * m_rp.m_tile[0] + thr_id0 + (index_type)m_rp.m_lower[0]; + if (offset_0 < m_rp.m_upper[0] && thr_id0 < m_rp.m_tile[0]) { + for (index_type j = tile_id1; j < m_rp.m_tile_end[1]; j += numbl1) { + const index_type offset_1 = + j * m_rp.m_tile[1] + thr_id1 + (index_type)m_rp.m_lower[1]; + if (offset_1 < m_rp.m_upper[1] && thr_id1 < m_rp.m_tile[1]) { + for (index_type k = tile_id2; k < m_rp.m_tile_end[2]; + k += numbl2) { + const index_type offset_2 = + k * m_rp.m_tile[2] + thr_id2 + (index_type)m_rp.m_lower[2]; + if (offset_2 < m_rp.m_upper[2] && thr_id2 < m_rp.m_tile[2]) { + for (index_type l = tile_id3; l < m_rp.m_tile_end[3]; + l += numbl3) { + const index_type offset_3 = l * m_rp.m_tile[3] + thr_id3 + + (index_type)m_rp.m_lower[3]; + if (offset_3 < m_rp.m_upper[3] && + thr_id3 < m_rp.m_tile[3]) { + for (index_type m = tile_id4; m < m_rp.m_tile_end[4]; + m += numbl4) { + const index_type offset_4 = m * m_rp.m_tile[4] + + thr_id4 + + (index_type)m_rp.m_lower[4]; + if (offset_4 < m_rp.m_upper[4] && + thr_id4 < m_rp.m_tile[4]) { + for (index_type n = tile_id5; n < m_rp.m_tile_end[5]; + n += numbl5) { + const index_type offset_5 = + n * m_rp.m_tile[5] + thr_id5 + + (index_type)m_rp.m_lower[5]; + if (offset_5 < m_rp.m_upper[5] && + thr_id5 < m_rp.m_tile[5]) { + m_func(Tag(), offset_0, offset_1, offset_2, + offset_3, offset_4, offset_5); } } } @@ -1124,168 +1311,175 @@ struct DeviceIterateTile<6,RP,Functor,Tag> } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; }; -} // Refactor +} // namespace Refactor // ---------------------------------------------------------------------------------- namespace Reduce { -template < typename T > -using is_void = std::is_same< T, void >; +template +using is_void = std::is_same; -template < typename T > -struct is_array_type : std::false_type -{ +template +struct is_array_type : std::false_type { using value_type = T; }; -template < typename T > -struct is_array_type< T* > : std::true_type -{ +template +struct is_array_type : std::true_type { using value_type = T; }; -template < typename T > -struct is_array_type< T[] > : std::true_type -{ +template +struct is_array_type : std::true_type { using value_type = T; }; // ------------------------------------------------------------------ // -template< int N , typename RP , typename Functor , typename Tag , typename ValueType , typename Enable = void > +template struct DeviceIterateTile; // ParallelReduce iteration pattern // Scalar reductions -// num_blocks = min( num_tiles, max_num_blocks ); //i.e. determined by number of tiles and reduction algorithm constraints -// extract n-dim tile offsets (i.e. tile's global starting mulit-index) from the tileid = blockid using tile dimensions -// local indices within a tile extracted from (index_type)threadIdx.x using tile dims, constrained by blocksize -// combine tile and local id info for multi-dim global ids +// num_blocks = min( num_tiles, max_num_blocks ); //i.e. determined by number of +// tiles and reduction algorithm constraints extract n-dim tile offsets (i.e. +// tile's global starting mulit-index) from the tileid = blockid using tile +// dimensions local indices within a tile extracted from (index_type)threadIdx.x +// using tile dims, constrained by blocksize combine tile and local id info for +// multi-dim global ids // Pattern: -// Each block+thread is responsible for a tile+local_id combo (additional when striding by num_blocks) +// Each block+thread is responsible for a tile+local_id combo (additional when +// striding by num_blocks) // 1. create offset arrays -// 2. loop over number of tiles, striding by griddim (equal to num tiles, or max num blocks) +// 2. loop over number of tiles, striding by griddim (equal to num tiles, or max +// num blocks) // 3. temps set for tile_idx and thrd_idx, which will be modified // 4. if LL vs LR: // determine tile starting point offsets (multidim) // determine local index offsets (multidim) // concatentate tile offset + local offset for global multi-dim index -// if offset withinin range bounds AND local offset within tile bounds, call functor +// if offset withinin range bounds AND local offset within tile bounds, call +// functor // ValueType = T -//Rank 2 +// Rank 2 // Specializations for void tag type -template< typename RP , typename Functor , typename ValueType > -struct DeviceIterateTile<2,RP,Functor,void,ValueType, typename std::enable_if< !is_array_type::value >::type > -{ +template +struct DeviceIterateTile< + 2, RP, Functor, void, ValueType, + typename std::enable_if::value>::type> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , ValueType & v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, ValueType& v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} - inline __device__ - void exec_range() const - { - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; m_local_offset[i] = (thrd_idx % m_rp.m_tile[i]); thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( m_offset[0], m_offset[1], m_v ); } + if (in_bounds) { + m_func(m_offset[0], m_offset[1], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; - ValueType & m_v; + private: + const RP& m_rp; + const Functor& m_func; + ValueType& m_v; }; - // Specializations for tag type -template< typename RP , typename Functor , typename Tag, typename ValueType > -struct DeviceIterateTile<2,RP,Functor,Tag, ValueType, typename std::enable_if< !is_array_type::value && !is_void< Tag >::value >::type > -{ +template +struct DeviceIterateTile< + 2, RP, Functor, Tag, ValueType, + typename std::enable_if::value && + !is_void::value>::type> { using index_type = typename RP::index_type; - inline __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , ValueType & v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + inline __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, + ValueType& v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} - inline __device__ - void exec_range() const - { - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y - m_local_offset[i] = (thrd_idx % m_rp.m_tile[i]); // Move this to first computation, add to m_offset right away + m_local_offset[i] = + (thrd_idx % m_rp.m_tile[i]); // Move this to first computation, + // add to m_offset right away thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( Tag(), m_offset[0], m_offset[1], m_v ); } + if (in_bounds) { + m_func(Tag(), m_offset[0], m_offset[1], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; - ValueType & m_v; + private: + const RP& m_rp; + const Functor& m_func; + ValueType& m_v; }; - -//Rank 3 +// Rank 3 // Specializations for void tag type -template< typename RP , typename Functor , typename ValueType > -struct DeviceIterateTile<3,RP,Functor,void,ValueType , typename std::enable_if< !is_array_type::value >::type > -{ +template +struct DeviceIterateTile< + 3, RP, Functor, void, ValueType, + typename std::enable_if::value>::type> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , ValueType & v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, ValueType& v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} - inline __device__ - void exec_range() const - { - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y - m_local_offset[i] = (thrd_idx % m_rp.m_tile[i]); // Move this to first computation, add to m_offset right away + m_local_offset[i] = + (thrd_idx % m_rp.m_tile[i]); // Move this to first computation, + // add to m_offset right away thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( m_offset[0], m_offset[1], m_offset[2], m_v ); } + if (in_bounds) { + m_func(m_offset[0], m_offset[1], m_offset[2], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; - ValueType & m_v; + private: + const RP& m_rp; + const Functor& m_func; + ValueType& m_v; }; - // Specializations for void tag type -template< typename RP , typename Functor , typename Tag, typename ValueType > -struct DeviceIterateTile<3,RP,Functor,Tag, ValueType, typename std::enable_if< !is_array_type::value && !is_void< Tag >::value >::type > -{ +template +struct DeviceIterateTile< + 3, RP, Functor, Tag, ValueType, + typename std::enable_if::value && + !is_void::value>::type> { using index_type = typename RP::index_type; - inline __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , ValueType & v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + inline __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, + ValueType& v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} - inline __device__ - void exec_range() const - { - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y - m_local_offset[i] = (thrd_idx % m_rp.m_tile[i]); // Move this to first computation, add to m_offset right away + m_local_offset[i] = + (thrd_idx % m_rp.m_tile[i]); // Move this to first computation, + // add to m_offset right away thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( Tag(), m_offset[0], m_offset[1], m_offset[2], m_v ); } + if (in_bounds) { + m_func(Tag(), m_offset[0], m_offset[1], m_offset[2], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; - ValueType & m_v; + private: + const RP& m_rp; + const Functor& m_func; + ValueType& m_v; }; - -//Rank 4 +// Rank 4 // Specializations for void tag type -template< typename RP , typename Functor , typename ValueType > -struct DeviceIterateTile<4,RP,Functor,void,ValueType , typename std::enable_if< !is_array_type::value >::type > -{ +template +struct DeviceIterateTile< + 4, RP, Functor, void, ValueType, + typename std::enable_if::value>::type> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , ValueType & v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, ValueType& v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -1534,58 +1754,64 @@ struct DeviceIterateTile<4,RP,Functor,void,ValueType , typename std::enable_if< thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_v ); } + if (in_bounds) { + m_func(m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; - ValueType & m_v; + private: + const RP& m_rp; + const Functor& m_func; + ValueType& m_v; }; - // Specializations for void tag type -template< typename RP , typename Functor , typename Tag, typename ValueType > -struct DeviceIterateTile<4,RP,Functor,Tag,ValueType, typename std::enable_if< !is_array_type::value && !is_void< Tag >::value >::type > -{ +template +struct DeviceIterateTile< + 4, RP, Functor, Tag, ValueType, + typename std::enable_if::value && + !is_void::value>::type> { using index_type = typename RP::index_type; - inline __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , ValueType & v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + inline __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, + ValueType& v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -1611,59 +1841,64 @@ struct DeviceIterateTile<4,RP,Functor,Tag,ValueType, typename std::enable_if< !i thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_v ); } + if (in_bounds) { + m_func(Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], + m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; - ValueType & m_v; + private: + const RP& m_rp; + const Functor& m_func; + ValueType& m_v; }; - -//Rank 5 +// Rank 5 // Specializations for void tag type -template< typename RP , typename Functor , typename ValueType > -struct DeviceIterateTile<5,RP,Functor,void,ValueType , typename std::enable_if< !is_array_type::value >::type > -{ +template +struct DeviceIterateTile< + 5, RP, Functor, void, ValueType, + typename std::enable_if::value>::type> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , ValueType & v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, ValueType& v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -1689,58 +1928,64 @@ struct DeviceIterateTile<5,RP,Functor,void,ValueType , typename std::enable_if< thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_offset[4], m_v ); } + if (in_bounds) { + m_func(m_offset[0], m_offset[1], m_offset[2], m_offset[3], + m_offset[4], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; - ValueType & m_v; + private: + const RP& m_rp; + const Functor& m_func; + ValueType& m_v; }; - // Specializations for tag type -template< typename RP , typename Functor , typename Tag, typename ValueType > -struct DeviceIterateTile<5,RP,Functor,Tag,ValueType, typename std::enable_if< !is_array_type::value && !is_void< Tag >::value >::type > -{ +template +struct DeviceIterateTile< + 5, RP, Functor, Tag, ValueType, + typename std::enable_if::value && + !is_void::value>::type> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , ValueType & v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, ValueType& v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -1766,59 +2015,64 @@ struct DeviceIterateTile<5,RP,Functor,Tag,ValueType, typename std::enable_if< !i thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_offset[4], m_v ); } + if (in_bounds) { + m_func(Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], + m_offset[4], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; - ValueType & m_v; + private: + const RP& m_rp; + const Functor& m_func; + ValueType& m_v; }; - -//Rank 6 +// Rank 6 // Specializations for void tag type -template< typename RP , typename Functor , typename ValueType > -struct DeviceIterateTile<6,RP,Functor,void,ValueType , typename std::enable_if< !is_array_type::value >::type > -{ +template +struct DeviceIterateTile< + 6, RP, Functor, void, ValueType, + typename std::enable_if::value>::type> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , ValueType & v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, ValueType& v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -1844,58 +2102,64 @@ struct DeviceIterateTile<6,RP,Functor,void,ValueType , typename std::enable_if< thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_offset[4], m_offset[5], m_v ); } + if (in_bounds) { + m_func(m_offset[0], m_offset[1], m_offset[2], m_offset[3], + m_offset[4], m_offset[5], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; - ValueType & m_v; + private: + const RP& m_rp; + const Functor& m_func; + ValueType& m_v; }; - // Specializations for tag type -template< typename RP , typename Functor , typename Tag, typename ValueType > -struct DeviceIterateTile<6,RP,Functor,Tag,ValueType, typename std::enable_if< !is_array_type::value && !is_void< Tag >::value >::type > -{ +template +struct DeviceIterateTile< + 6, RP, Functor, Tag, ValueType, + typename std::enable_if::value && + !is_void::value>::type> { using index_type = typename RP::index_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , ValueType & v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, ValueType& v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -1921,130 +2189,138 @@ struct DeviceIterateTile<6,RP,Functor,Tag,ValueType, typename std::enable_if< !i thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_offset[4], m_offset[5], m_v ); } + if (in_bounds) { + m_func(Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], + m_offset[4], m_offset[5], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; - ValueType & m_v; + private: + const RP& m_rp; + const Functor& m_func; + ValueType& m_v; }; - // ValueType = T[], T* -//Rank 2 +// Rank 2 // Specializations for void tag type -template< typename RP , typename Functor , typename ValueType > -struct DeviceIterateTile<2,RP,Functor,void,ValueType, typename std::enable_if< is_array_type::value >::type > -{ +template +struct DeviceIterateTile< + 2, RP, Functor, void, ValueType, + typename std::enable_if::value>::type> { using index_type = typename RP::index_type; - using value_type = typename is_array_type< ValueType >::value_type; + using value_type = typename is_array_type::value_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , value_type* v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, value_type* v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} - inline __device__ - void exec_range() const - { - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y - m_local_offset[i] = (thrd_idx % m_rp.m_tile[i]); // Move this to first computation, add to m_offset right away + m_local_offset[i] = + (thrd_idx % m_rp.m_tile[i]); // Move this to first computation, + // add to m_offset right away thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( m_offset[0], m_offset[1], m_v ); } + if (in_bounds) { + m_func(m_offset[0], m_offset[1], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; value_type* m_v; }; - // Specializations for tag type -template< typename RP , typename Functor , typename Tag, typename ValueType > -struct DeviceIterateTile<2,RP,Functor,Tag, ValueType, typename std::enable_if< is_array_type::value && !is_void< Tag >::value >::type > -{ +template +struct DeviceIterateTile< + 2, RP, Functor, Tag, ValueType, + typename std::enable_if::value && + !is_void::value>::type> { using index_type = typename RP::index_type; - using value_type = typename is_array_type< ValueType >::value_type; + using value_type = typename is_array_type::value_type; - inline __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , value_type* v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + inline __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, + value_type* v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} - inline __device__ - void exec_range() const - { - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -2070,128 +2349,139 @@ struct DeviceIterateTile<2,RP,Functor,Tag, ValueType, typename std::enable_if< i thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( Tag(), m_offset[0], m_offset[1], m_v ); } + if (in_bounds) { + m_func(Tag(), m_offset[0], m_offset[1], m_v); + } } - } //end for loop over num_tiles - product of tiles in each direction + } // end for loop over num_tiles - product of tiles in each direction } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; value_type* m_v; }; - -//Rank 3 +// Rank 3 // Specializations for void tag type -template< typename RP , typename Functor , typename ValueType > -struct DeviceIterateTile<3,RP,Functor,void,ValueType , typename std::enable_if< is_array_type::value >::type > -{ +template +struct DeviceIterateTile< + 3, RP, Functor, void, ValueType, + typename std::enable_if::value>::type> { using index_type = typename RP::index_type; - using value_type = typename is_array_type< ValueType >::value_type; + using value_type = typename is_array_type::value_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , value_type* v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, value_type* v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} - inline __device__ - void exec_range() const - { - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y - m_local_offset[i] = (thrd_idx % m_rp.m_tile[i]); // Move this to first computation, add to m_offset right away + m_local_offset[i] = + (thrd_idx % m_rp.m_tile[i]); // Move this to first computation, + // add to m_offset right away thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( m_offset[0], m_offset[1], m_offset[2], m_v ); } + if (in_bounds) { + m_func(m_offset[0], m_offset[1], m_offset[2], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; value_type* m_v; }; - // Specializations for void tag type -template< typename RP , typename Functor , typename Tag, typename ValueType > -struct DeviceIterateTile<3,RP,Functor,Tag, ValueType, typename std::enable_if< is_array_type::value && !is_void< Tag >::value >::type > -{ +template +struct DeviceIterateTile< + 3, RP, Functor, Tag, ValueType, + typename std::enable_if::value && + !is_void::value>::type> { using index_type = typename RP::index_type; - using value_type = typename is_array_type< ValueType >::value_type; + using value_type = typename is_array_type::value_type; - inline __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , value_type* v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + inline __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, + value_type* v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} - inline __device__ - void exec_range() const - { - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -2217,60 +2510,64 @@ struct DeviceIterateTile<3,RP,Functor,Tag, ValueType, typename std::enable_if< i thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( Tag(), m_offset[0], m_offset[1], m_offset[2], m_v ); } + if (in_bounds) { + m_func(Tag(), m_offset[0], m_offset[1], m_offset[2], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; value_type* m_v; }; - -//Rank 4 +// Rank 4 // Specializations for void tag type -template< typename RP , typename Functor , typename ValueType > -struct DeviceIterateTile<4,RP,Functor,void,ValueType , typename std::enable_if< is_array_type::value >::type > -{ +template +struct DeviceIterateTile< + 4, RP, Functor, void, ValueType, + typename std::enable_if::value>::type> { using index_type = typename RP::index_type; - using value_type = typename is_array_type< ValueType >::value_type; + using value_type = typename is_array_type::value_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , value_type* v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, value_type* v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -2296,59 +2596,65 @@ struct DeviceIterateTile<4,RP,Functor,void,ValueType , typename std::enable_if< thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_v ); } + if (in_bounds) { + m_func(m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; value_type* m_v; }; - // Specializations for void tag type -template< typename RP , typename Functor , typename Tag, typename ValueType > -struct DeviceIterateTile<4,RP,Functor,Tag,ValueType, typename std::enable_if< is_array_type::value && !is_void< Tag >::value >::type > -{ +template +struct DeviceIterateTile< + 4, RP, Functor, Tag, ValueType, + typename std::enable_if::value && + !is_void::value>::type> { using index_type = typename RP::index_type; - using value_type = typename is_array_type< ValueType >::value_type; + using value_type = typename is_array_type::value_type; - inline __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , value_type* v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + inline __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, + value_type* v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -2374,60 +2684,65 @@ struct DeviceIterateTile<4,RP,Functor,Tag,ValueType, typename std::enable_if< is thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_v ); } + if (in_bounds) { + m_func(Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], + m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; value_type* m_v; }; - -//Rank 5 +// Rank 5 // Specializations for void tag type -template< typename RP , typename Functor , typename ValueType > -struct DeviceIterateTile<5,RP,Functor,void,ValueType , typename std::enable_if< is_array_type::value >::type > -{ +template +struct DeviceIterateTile< + 5, RP, Functor, void, ValueType, + typename std::enable_if::value>::type> { using index_type = typename RP::index_type; - using value_type = typename is_array_type< ValueType >::value_type; + using value_type = typename is_array_type::value_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , value_type* v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, value_type* v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -2453,59 +2772,65 @@ struct DeviceIterateTile<5,RP,Functor,void,ValueType , typename std::enable_if< thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_offset[4], m_v ); } + if (in_bounds) { + m_func(m_offset[0], m_offset[1], m_offset[2], m_offset[3], + m_offset[4], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; value_type* m_v; }; - // Specializations for tag type -template< typename RP , typename Functor , typename Tag, typename ValueType > -struct DeviceIterateTile<5,RP,Functor,Tag,ValueType, typename std::enable_if< is_array_type::value && !is_void< Tag >::value >::type > -{ +template +struct DeviceIterateTile< + 5, RP, Functor, Tag, ValueType, + typename std::enable_if::value && + !is_void::value>::type> { using index_type = typename RP::index_type; - using value_type = typename is_array_type< ValueType >::value_type; + using value_type = typename is_array_type::value_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , value_type* v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, value_type* v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -2531,60 +2860,65 @@ struct DeviceIterateTile<5,RP,Functor,Tag,ValueType, typename std::enable_if< is thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_offset[4], m_v ); } + if (in_bounds) { + m_func(Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], + m_offset[4], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; value_type* m_v; }; - -//Rank 6 +// Rank 6 // Specializations for void tag type -template< typename RP , typename Functor , typename ValueType > -struct DeviceIterateTile<6,RP,Functor,void,ValueType , typename std::enable_if< is_array_type::value >::type > -{ +template +struct DeviceIterateTile< + 6, RP, Functor, void, ValueType, + typename std::enable_if::value>::type> { using index_type = typename RP::index_type; - using value_type = typename is_array_type< ValueType >::value_type; + using value_type = typename is_array_type::value_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , value_type* v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, value_type* v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -2610,59 +2948,65 @@ struct DeviceIterateTile<6,RP,Functor,void,ValueType , typename std::enable_if< thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_offset[4], m_offset[5], m_v ); } + if (in_bounds) { + m_func(m_offset[0], m_offset[1], m_offset[2], m_offset[3], + m_offset[4], m_offset[5], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; value_type* m_v; }; - // Specializations for tag type -template< typename RP , typename Functor , typename Tag, typename ValueType > -struct DeviceIterateTile<6,RP,Functor,Tag,ValueType, typename std::enable_if< is_array_type::value && !is_void< Tag >::value >::type > -{ +template +struct DeviceIterateTile< + 6, RP, Functor, Tag, ValueType, + typename std::enable_if::value && + !is_void::value>::type> { using index_type = typename RP::index_type; - using value_type = typename is_array_type< ValueType >::value_type; + using value_type = typename is_array_type::value_type; - __device__ - DeviceIterateTile( const RP & rp_ , const Functor & f_ , value_type* v_) - : m_rp(rp_) - , m_func(f_) - , m_v(v_) - {} + __device__ DeviceIterateTile(const RP& rp_, const Functor& f_, value_type* v_) + : m_rp(rp_), m_func(f_), m_v(v_) {} static constexpr index_type max_blocks = 65535; - //static constexpr index_type max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); + // static constexpr index_type max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount); - inline __device__ - void exec_range() const - { - //enum { max_blocks = static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; - //const index_type max_blocks = static_cast( Kokkos::Impl::cuda_internal_maximum_grid_count() ); - if ( (index_type)blockIdx.x < m_rp.m_num_tiles && (index_type)threadIdx.y < m_rp.m_prod_tile_dims ) { - index_type m_offset[RP::rank]; // tile starting global id offset - index_type m_local_offset[RP::rank]; // tile starting global id offset + inline __device__ void exec_range() const { + // enum { max_blocks = + // static_cast(Kokkos::Impl::CudaTraits::UpperBoundGridCount) }; + // const index_type max_blocks = static_cast( + // Kokkos::Impl::cuda_internal_maximum_grid_count() ); + if ((index_type)blockIdx.x < m_rp.m_num_tiles && + (index_type)threadIdx.y < m_rp.m_prod_tile_dims) { + index_type m_offset[RP::rank]; // tile starting global id offset + index_type m_local_offset[RP::rank]; // tile starting global id offset - for ( index_type tileidx = (index_type)blockIdx.x; tileidx < m_rp.m_num_tiles; tileidx += gridDim.x ) { - index_type tile_idx = tileidx; // temp because tile_idx will be modified while determining tile starting point offsets + for (index_type tileidx = (index_type)blockIdx.x; + tileidx < m_rp.m_num_tiles; tileidx += gridDim.x) { + index_type tile_idx = + tileidx; // temp because tile_idx will be modified while + // determining tile starting point offsets index_type thrd_idx = (index_type)threadIdx.y; - bool in_bounds = true; + bool in_bounds = true; // LL if (RP::inner_direction == RP::Left) { - for (int i=0; i=0; --i) { - m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + m_rp.m_lower[i] ; + for (int i = RP::rank - 1; i >= 0; --i) { + m_offset[i] = (tile_idx % m_rp.m_tile_end[i]) * m_rp.m_tile[i] + + m_rp.m_lower[i]; tile_idx /= m_rp.m_tile_end[i]; // tile-local indices identified with (index_type)threadIdx.y @@ -2688,28 +3036,32 @@ struct DeviceIterateTile<6,RP,Functor,Tag,ValueType, typename std::enable_if< is thrd_idx /= m_rp.m_tile[i]; m_offset[i] += m_local_offset[i]; - if ( !(m_offset[i] < m_rp.m_upper[i] && m_local_offset[i] < m_rp.m_tile[i]) ) { + if (!(m_offset[i] < m_rp.m_upper[i] && + m_local_offset[i] < m_rp.m_tile[i])) { in_bounds &= false; } } - if ( in_bounds ) - { m_func( Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], m_offset[4], m_offset[5], m_v ); } + if (in_bounds) { + m_func(Tag(), m_offset[0], m_offset[1], m_offset[2], m_offset[3], + m_offset[4], m_offset[5], m_v); + } } } } - } //end exec_range + } // end exec_range -private: - const RP & m_rp; - const Functor & m_func; + private: + const RP& m_rp; + const Functor& m_func; value_type* m_v; }; -} // Reduce +} // namespace Reduce // ---------------------------------------------------------------------------------- -} } //end namespace Kokkos::Impl +} // namespace Impl +} // namespace Kokkos #endif #endif diff --git a/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp b/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp index 4c9ed47085..24be022d24 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -57,12 +58,12 @@ //#include #include +#include #if defined(KOKKOS_ENABLE_PROFILING) #include #endif - /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -71,68 +72,82 @@ namespace Impl { namespace { - static std::atomic num_uvm_allocations(0) ; +static std::atomic num_uvm_allocations(0); - cudaStream_t get_deep_copy_stream() { - static cudaStream_t s = 0; - if( s == 0) { - cudaStreamCreate ( &s ); - } - return s; - } +cudaStream_t get_deep_copy_stream() { + static cudaStream_t s = 0; + if (s == 0) { + cudaStreamCreate(&s); + } + return s; +} +} // namespace + +DeepCopy::DeepCopy(void *dst, const void *src, + size_t n) { + CUDA_SAFE_CALL(cudaMemcpy(dst, src, n, cudaMemcpyDefault)); } -DeepCopy::DeepCopy( void * dst , const void * src , size_t n ) -{ CUDA_SAFE_CALL( cudaMemcpy( dst , src , n , cudaMemcpyDefault ) ); } +DeepCopy::DeepCopy(void *dst, const void *src, + size_t n) { + CUDA_SAFE_CALL(cudaMemcpy(dst, src, n, cudaMemcpyDefault)); +} -DeepCopy::DeepCopy( void * dst , const void * src , size_t n ) -{ CUDA_SAFE_CALL( cudaMemcpy( dst , src , n , cudaMemcpyDefault ) ); } +DeepCopy::DeepCopy(void *dst, const void *src, + size_t n) { + CUDA_SAFE_CALL(cudaMemcpy(dst, src, n, cudaMemcpyDefault)); +} -DeepCopy::DeepCopy( void * dst , const void * src , size_t n ) -{ CUDA_SAFE_CALL( cudaMemcpy( dst , src , n , cudaMemcpyDefault ) ); } +DeepCopy::DeepCopy(const Cuda &instance, void *dst, + const void *src, size_t n) { + CUDA_SAFE_CALL( + cudaMemcpyAsync(dst, src, n, cudaMemcpyDefault, instance.cuda_stream())); +} -DeepCopy::DeepCopy( const Cuda & instance , void * dst , const void * src , size_t n ) -{ CUDA_SAFE_CALL( cudaMemcpyAsync( dst , src , n , cudaMemcpyDefault , instance.cuda_stream() ) ); } +DeepCopy::DeepCopy(const Cuda &instance, void *dst, + const void *src, size_t n) { + CUDA_SAFE_CALL( + cudaMemcpyAsync(dst, src, n, cudaMemcpyDefault, instance.cuda_stream())); +} -DeepCopy::DeepCopy( const Cuda & instance , void * dst , const void * src , size_t n ) -{ CUDA_SAFE_CALL( cudaMemcpyAsync( dst , src , n , cudaMemcpyDefault , instance.cuda_stream() ) ); } +DeepCopy::DeepCopy(const Cuda &instance, void *dst, + const void *src, size_t n) { + CUDA_SAFE_CALL( + cudaMemcpyAsync(dst, src, n, cudaMemcpyDefault, instance.cuda_stream())); +} -DeepCopy::DeepCopy( const Cuda & instance , void * dst , const void * src , size_t n ) -{ CUDA_SAFE_CALL( cudaMemcpyAsync( dst , src , n , cudaMemcpyDefault , instance.cuda_stream() ) ); } - -void DeepCopyAsyncCuda( void * dst , const void * src , size_t n) { +void DeepCopyAsyncCuda(void *dst, const void *src, size_t n) { cudaStream_t s = get_deep_copy_stream(); - CUDA_SAFE_CALL( cudaMemcpyAsync( dst , src , n , cudaMemcpyDefault , s ) ); + CUDA_SAFE_CALL(cudaMemcpyAsync(dst, src, n, cudaMemcpyDefault, s)); cudaStreamSynchronize(s); } -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ - namespace Kokkos { -void CudaSpace::access_error() -{ - const std::string msg("Kokkos::CudaSpace::access_error attempt to execute Cuda function from non-Cuda space" ); - Kokkos::Impl::throw_runtime_exception( msg ); +void CudaSpace::access_error() { + const std::string msg( + "Kokkos::CudaSpace::access_error attempt to execute Cuda function from " + "non-Cuda space"); + Kokkos::Impl::throw_runtime_exception(msg); } -void CudaSpace::access_error( const void * const ) -{ - const std::string msg("Kokkos::CudaSpace::access_error attempt to execute Cuda function from non-Cuda space" ); - Kokkos::Impl::throw_runtime_exception( msg ); +void CudaSpace::access_error(const void *const) { + const std::string msg( + "Kokkos::CudaSpace::access_error attempt to execute Cuda function from " + "non-Cuda space"); + Kokkos::Impl::throw_runtime_exception(msg); } - /*--------------------------------------------------------------------------*/ -bool CudaUVMSpace::available() -{ -#if defined( CUDA_VERSION ) && ( 6000 <= CUDA_VERSION ) && !defined(__APPLE__) +bool CudaUVMSpace::available() { +#if defined(CUDA_VERSION) && (6000 <= CUDA_VERSION) && !defined(__APPLE__) enum { UVM_available = true }; #else enum { UVM_available = false }; @@ -142,99 +157,155 @@ bool CudaUVMSpace::available() /*--------------------------------------------------------------------------*/ -int CudaUVMSpace::number_of_allocations() -{ +int CudaUVMSpace::number_of_allocations() { return Kokkos::Impl::num_uvm_allocations.load(); } +#ifdef KOKKOS_IMPL_DEBUG_CUDA_PIN_UVM_TO_HOST +// The purpose of the following variable is to allow a state-based choice +// for pinning UVM allocations to the CPU. For now this is considered +// an experimental debugging capability - with the potential to work around +// some CUDA issues. +bool CudaUVMSpace::kokkos_impl_cuda_pin_uvm_to_host_v = false; -} // namespace Kokkos +bool CudaUVMSpace::cuda_pin_uvm_to_host() { + return CudaUVMSpace::kokkos_impl_cuda_pin_uvm_to_host_v; +} +void CudaUVMSpace::cuda_set_pin_uvm_to_host(bool val) { + CudaUVMSpace::kokkos_impl_cuda_pin_uvm_to_host_v = val; +} +#endif +} // namespace Kokkos + +#ifdef KOKKOS_IMPL_DEBUG_CUDA_PIN_UVM_TO_HOST +bool kokkos_impl_cuda_pin_uvm_to_host() { + return Kokkos::CudaUVMSpace::cuda_pin_uvm_to_host(); +} + +void kokkos_impl_cuda_set_pin_uvm_to_host(bool val) { + Kokkos::CudaUVMSpace::cuda_set_pin_uvm_to_host(val); +} +#endif /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ namespace Kokkos { -CudaSpace::CudaSpace() - : m_device( Kokkos::Cuda().cuda_device() ) -{ +CudaSpace::CudaSpace() : m_device(Kokkos::Cuda().cuda_device()) {} + +CudaUVMSpace::CudaUVMSpace() : m_device(Kokkos::Cuda().cuda_device()) {} + +CudaHostPinnedSpace::CudaHostPinnedSpace() {} + +//============================================================================== +// {{{1 + +void *CudaSpace::allocate(const size_t arg_alloc_size) const { + void *ptr = nullptr; + + auto error_code = cudaMalloc(&ptr, arg_alloc_size); + if (error_code != cudaSuccess) { // TODO tag as unlikely branch + cudaGetLastError(); // This is the only way to clear the last error, which + // we should do here since we're turning it into an + // exception here + throw Experimental::CudaRawMemoryAllocationFailure( + arg_alloc_size, error_code, + Experimental::RawMemoryAllocationFailure::AllocationMechanism:: + CudaMalloc); + } + return ptr; } -CudaUVMSpace::CudaUVMSpace() - : m_device( Kokkos::Cuda().cuda_device() ) -{ -} - -CudaHostPinnedSpace::CudaHostPinnedSpace() -{ -} - -void * CudaSpace::allocate( const size_t arg_alloc_size ) const -{ - void * ptr = NULL; - - CUDA_SAFE_CALL( cudaMalloc( &ptr, arg_alloc_size ) ); - - return ptr ; -} - -void * CudaUVMSpace::allocate( const size_t arg_alloc_size ) const -{ - void * ptr = NULL; +void *CudaUVMSpace::allocate(const size_t arg_alloc_size) const { + void *ptr = nullptr; enum { max_uvm_allocations = 65536 }; Cuda::impl_static_fence(); - if ( arg_alloc_size > 0 ) - { + if (arg_alloc_size > 0) { Kokkos::Impl::num_uvm_allocations++; - if ( Kokkos::Impl::num_uvm_allocations.load() > max_uvm_allocations ) { - Kokkos::Impl::throw_runtime_exception( "CudaUVM error: The maximum limit of UVM allocations exceeded (currently 65536)." ) ; + if (Kokkos::Impl::num_uvm_allocations.load() > max_uvm_allocations) { + throw Experimental::CudaRawMemoryAllocationFailure( + arg_alloc_size, 1, + Experimental::RawMemoryAllocationFailure::FailureMode:: + MaximumCudaUVMAllocationsExceeded); } - CUDA_SAFE_CALL( cudaMallocManaged( &ptr, arg_alloc_size , cudaMemAttachGlobal ) ); + auto error_code = + cudaMallocManaged(&ptr, arg_alloc_size, cudaMemAttachGlobal); + +#ifdef KOKKOS_IMPL_DEBUG_CUDA_PIN_UVM_TO_HOST + if (Kokkos::CudaUVMSpace::cuda_pin_uvm_to_host()) + cudaMemAdvise(ptr, arg_alloc_size, cudaMemAdviseSetPreferredLocation, + cudaCpuDeviceId); +#endif + + if (error_code != cudaSuccess) { // TODO tag as unlikely branch + cudaGetLastError(); // This is the only way to clear the last error, + // which we should do here since we're turning it + // into an exception here + throw Experimental::CudaRawMemoryAllocationFailure( + arg_alloc_size, error_code, + Experimental::RawMemoryAllocationFailure::AllocationMechanism:: + CudaMallocManaged); + } } Cuda::impl_static_fence(); - return ptr ; + return ptr; } -void * CudaHostPinnedSpace::allocate( const size_t arg_alloc_size ) const -{ - void * ptr = NULL; +void *CudaHostPinnedSpace::allocate(const size_t arg_alloc_size) const { + void *ptr = nullptr; - CUDA_SAFE_CALL( cudaHostAlloc( &ptr, arg_alloc_size , cudaHostAllocDefault ) ); + auto error_code = cudaHostAlloc(&ptr, arg_alloc_size, cudaHostAllocDefault); + if (error_code != cudaSuccess) { // TODO tag as unlikely branch + cudaGetLastError(); // This is the only way to clear the last error, which + // we should do here since we're turning it into an + // exception here + throw Experimental::CudaRawMemoryAllocationFailure( + arg_alloc_size, error_code, + Experimental::RawMemoryAllocationFailure::AllocationMechanism:: + CudaHostAlloc); + } - return ptr ; + return ptr; } -void CudaSpace::deallocate( void * const arg_alloc_ptr , const size_t /* arg_alloc_size */ ) const -{ +// end allocate() }}}1 +//============================================================================== + +void CudaSpace::deallocate(void *const arg_alloc_ptr, + const size_t /* arg_alloc_size */) const { try { - CUDA_SAFE_CALL( cudaFree( arg_alloc_ptr ) ); - } catch(...) {} + CUDA_SAFE_CALL(cudaFree(arg_alloc_ptr)); + } catch (...) { + } } -void CudaUVMSpace::deallocate( void * const arg_alloc_ptr , const size_t /* arg_alloc_size */ ) const -{ +void CudaUVMSpace::deallocate(void *const arg_alloc_ptr, + const size_t /* arg_alloc_size */) const { Cuda::impl_static_fence(); try { - if ( arg_alloc_ptr != nullptr ) { + if (arg_alloc_ptr != nullptr) { Kokkos::Impl::num_uvm_allocations--; - CUDA_SAFE_CALL( cudaFree( arg_alloc_ptr ) ); + CUDA_SAFE_CALL(cudaFree(arg_alloc_ptr)); } - } catch(...) {} + } catch (...) { + } Cuda::impl_static_fence(); } -void CudaHostPinnedSpace::deallocate( void * const arg_alloc_ptr , const size_t /* arg_alloc_size */ ) const -{ +void CudaHostPinnedSpace::deallocate(void *const arg_alloc_ptr, + const size_t /* arg_alloc_size */) const { try { - CUDA_SAFE_CALL( cudaFreeHost( arg_alloc_ptr ) ); - } catch(...) {} + CUDA_SAFE_CALL(cudaFreeHost(arg_alloc_ptr)); + } catch (...) { + } } -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -243,606 +314,611 @@ namespace Kokkos { namespace Impl { #ifdef KOKKOS_DEBUG -SharedAllocationRecord< void , void > -SharedAllocationRecord< Kokkos::CudaSpace , void >::s_root_record ; +SharedAllocationRecord + SharedAllocationRecord::s_root_record; -SharedAllocationRecord< void , void > -SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::s_root_record ; +SharedAllocationRecord + SharedAllocationRecord::s_root_record; -SharedAllocationRecord< void , void > -SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::s_root_record ; +SharedAllocationRecord + SharedAllocationRecord::s_root_record; #endif ::cudaTextureObject_t -SharedAllocationRecord< Kokkos::CudaSpace , void >:: -attach_texture_object( const unsigned sizeof_alias - , void * const alloc_ptr - , size_t const alloc_size ) -{ +SharedAllocationRecord::attach_texture_object( + const unsigned sizeof_alias, void *const alloc_ptr, + size_t const alloc_size) { enum { TEXTURE_BOUND_1D = 1u << 27 }; - if ( ( alloc_ptr == 0 ) || ( sizeof_alias * TEXTURE_BOUND_1D <= alloc_size ) ) { - std::ostringstream msg ; + if ((alloc_ptr == 0) || (sizeof_alias * TEXTURE_BOUND_1D <= alloc_size)) { + std::ostringstream msg; msg << "Kokkos::CudaSpace ERROR: Cannot attach texture object to" << " alloc_ptr(" << alloc_ptr << ")" << " alloc_size(" << alloc_size << ")" - << " max_size(" << ( sizeof_alias * TEXTURE_BOUND_1D ) << ")" ; - std::cerr << msg.str() << std::endl ; + << " max_size(" << (sizeof_alias * TEXTURE_BOUND_1D) << ")"; + std::cerr << msg.str() << std::endl; std::cerr.flush(); - Kokkos::Impl::throw_runtime_exception( msg.str() ); + Kokkos::Impl::throw_runtime_exception(msg.str()); } - ::cudaTextureObject_t tex_obj ; + ::cudaTextureObject_t tex_obj; - struct cudaResourceDesc resDesc ; - struct cudaTextureDesc texDesc ; + struct cudaResourceDesc resDesc; + struct cudaTextureDesc texDesc; - memset( & resDesc , 0 , sizeof(resDesc) ); - memset( & texDesc , 0 , sizeof(texDesc) ); + memset(&resDesc, 0, sizeof(resDesc)); + memset(&texDesc, 0, sizeof(texDesc)); - resDesc.resType = cudaResourceTypeLinear ; - resDesc.res.linear.desc = ( sizeof_alias == 4 ? cudaCreateChannelDesc< int >() : - ( sizeof_alias == 8 ? cudaCreateChannelDesc< ::int2 >() : - /* sizeof_alias == 16 */ cudaCreateChannelDesc< ::int4 >() ) ); - resDesc.res.linear.sizeInBytes = alloc_size ; - resDesc.res.linear.devPtr = alloc_ptr ; + resDesc.resType = cudaResourceTypeLinear; + resDesc.res.linear.desc = + (sizeof_alias == 4 + ? cudaCreateChannelDesc() + : (sizeof_alias == 8 + ? cudaCreateChannelDesc< ::int2>() + : + /* sizeof_alias == 16 */ cudaCreateChannelDesc< ::int4>())); + resDesc.res.linear.sizeInBytes = alloc_size; + resDesc.res.linear.devPtr = alloc_ptr; - CUDA_SAFE_CALL( cudaCreateTextureObject( & tex_obj , & resDesc, & texDesc, NULL ) ); + CUDA_SAFE_CALL(cudaCreateTextureObject(&tex_obj, &resDesc, &texDesc, NULL)); - return tex_obj ; + return tex_obj; +} + +//============================================================================== +// {{{1 + +std::string SharedAllocationRecord::get_label() const { + SharedAllocationHeader header; + + Kokkos::Impl::DeepCopy( + &header, RecordBase::head(), sizeof(SharedAllocationHeader)); + + return std::string(header.m_label); +} + +std::string SharedAllocationRecord::get_label() + const { + return std::string(RecordBase::head()->m_label); } std::string -SharedAllocationRecord< Kokkos::CudaSpace , void >::get_label() const -{ - SharedAllocationHeader header ; - - Kokkos::Impl::DeepCopy< Kokkos::HostSpace , Kokkos::CudaSpace >( & header , RecordBase::head() , sizeof(SharedAllocationHeader) ); - - return std::string( header.m_label ); +SharedAllocationRecord::get_label() const { + return std::string(RecordBase::head()->m_label); } -std::string -SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::get_label() const -{ - return std::string( RecordBase::head()->m_label ); +// end SharedAllocationRecord::get_label() }}}1 +//============================================================================== + +//============================================================================== +// {{{1 + +SharedAllocationRecord + *SharedAllocationRecord::allocate( + const Kokkos::CudaSpace &arg_space, const std::string &arg_label, + const size_t arg_alloc_size) { + return new SharedAllocationRecord(arg_space, arg_label, arg_alloc_size); } -std::string -SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::get_label() const -{ - return std::string( RecordBase::head()->m_label ); +SharedAllocationRecord + *SharedAllocationRecord::allocate( + const Kokkos::CudaUVMSpace &arg_space, const std::string &arg_label, + const size_t arg_alloc_size) { + return new SharedAllocationRecord(arg_space, arg_label, arg_alloc_size); } -SharedAllocationRecord< Kokkos::CudaSpace , void > * -SharedAllocationRecord< Kokkos::CudaSpace , void >:: -allocate( const Kokkos::CudaSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - ) -{ - return new SharedAllocationRecord( arg_space , arg_label , arg_alloc_size ); +SharedAllocationRecord + *SharedAllocationRecord::allocate( + const Kokkos::CudaHostPinnedSpace &arg_space, + const std::string &arg_label, const size_t arg_alloc_size) { + return new SharedAllocationRecord(arg_space, arg_label, arg_alloc_size); } -SharedAllocationRecord< Kokkos::CudaUVMSpace , void > * -SharedAllocationRecord< Kokkos::CudaUVMSpace , void >:: -allocate( const Kokkos::CudaUVMSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - ) -{ - return new SharedAllocationRecord( arg_space , arg_label , arg_alloc_size ); +// end SharedAllocationRecord allocate() }}}1 +//============================================================================== + +//============================================================================== +// {{{1 + +void SharedAllocationRecord::deallocate( + SharedAllocationRecord *arg_rec) { + delete static_cast(arg_rec); } -SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void > * -SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >:: -allocate( const Kokkos::CudaHostPinnedSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - ) -{ - return new SharedAllocationRecord( arg_space , arg_label , arg_alloc_size ); +void SharedAllocationRecord::deallocate( + SharedAllocationRecord *arg_rec) { + delete static_cast(arg_rec); } -void -SharedAllocationRecord< Kokkos::CudaSpace , void >:: -deallocate( SharedAllocationRecord< void , void > * arg_rec ) -{ - delete static_cast(arg_rec); +void SharedAllocationRecord::deallocate( + SharedAllocationRecord *arg_rec) { + delete static_cast(arg_rec); } -void -SharedAllocationRecord< Kokkos::CudaUVMSpace , void >:: -deallocate( SharedAllocationRecord< void , void > * arg_rec ) -{ - delete static_cast(arg_rec); -} +// end SharedAllocationRecord deallocate }}}1 +//============================================================================== -void -SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >:: -deallocate( SharedAllocationRecord< void , void > * arg_rec ) -{ - delete static_cast(arg_rec); -} +//============================================================================== +// {{{1 -SharedAllocationRecord< Kokkos::CudaSpace , void >:: -~SharedAllocationRecord() -{ - #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { - - SharedAllocationHeader header ; - Kokkos::Impl::DeepCopy( & header , RecordBase::m_alloc_ptr , sizeof(SharedAllocationHeader) ); +SharedAllocationRecord::~SharedAllocationRecord() { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + SharedAllocationHeader header; + Kokkos::Impl::DeepCopy( + &header, RecordBase::m_alloc_ptr, sizeof(SharedAllocationHeader)); Kokkos::Profiling::deallocateData( - Kokkos::Profiling::SpaceHandle(Kokkos::CudaSpace::name()),header.m_label, - data(),size()); + Kokkos::Profiling::SpaceHandle(Kokkos::CudaSpace::name()), + header.m_label, data(), size()); } - #endif - - m_space.deallocate( SharedAllocationRecord< void , void >::m_alloc_ptr - , SharedAllocationRecord< void , void >::m_alloc_size - ); -} - -SharedAllocationRecord< Kokkos::CudaUVMSpace , void >:: -~SharedAllocationRecord() -{ - #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Cuda::impl_static_fence(); //Make sure I can access the label ... - Kokkos::Profiling::deallocateData( - Kokkos::Profiling::SpaceHandle(Kokkos::CudaUVMSpace::name()),RecordBase::m_alloc_ptr->m_label, - data(),size()); - } - #endif - - m_space.deallocate( SharedAllocationRecord< void , void >::m_alloc_ptr - , SharedAllocationRecord< void , void >::m_alloc_size - ); -} - -SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >:: -~SharedAllocationRecord() -{ - #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Profiling::deallocateData( - Kokkos::Profiling::SpaceHandle(Kokkos::CudaHostPinnedSpace::name()),RecordBase::m_alloc_ptr->m_label, - data(),size()); - } - #endif - - m_space.deallocate( SharedAllocationRecord< void , void >::m_alloc_ptr - , SharedAllocationRecord< void , void >::m_alloc_size - ); -} - -SharedAllocationRecord< Kokkos::CudaSpace , void >:: -SharedAllocationRecord( const Kokkos::CudaSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const SharedAllocationRecord< void , void >::function_type arg_dealloc - ) - // Pass through allocated [ SharedAllocationHeader , user_memory ] - // Pass through deallocation function - : SharedAllocationRecord< void , void > - ( -#ifdef KOKKOS_DEBUG - & SharedAllocationRecord< Kokkos::CudaSpace , void >::s_root_record, #endif - reinterpret_cast( arg_space.allocate( sizeof(SharedAllocationHeader) + arg_alloc_size ) ) - , sizeof(SharedAllocationHeader) + arg_alloc_size - , arg_dealloc - ) - , m_tex_obj( 0 ) - , m_space( arg_space ) -{ - #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Profiling::allocateData(Kokkos::Profiling::SpaceHandle(arg_space.name()),arg_label,data(),arg_alloc_size); - } - #endif - SharedAllocationHeader header ; + m_space.deallocate(SharedAllocationRecord::m_alloc_ptr, + SharedAllocationRecord::m_alloc_size); +} + +SharedAllocationRecord::~SharedAllocationRecord() { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Cuda::impl_static_fence(); // Make sure I can access the label ... + Kokkos::Profiling::deallocateData( + Kokkos::Profiling::SpaceHandle(Kokkos::CudaUVMSpace::name()), + RecordBase::m_alloc_ptr->m_label, data(), size()); + } +#endif + + m_space.deallocate(SharedAllocationRecord::m_alloc_ptr, + SharedAllocationRecord::m_alloc_size); +} + +SharedAllocationRecord::~SharedAllocationRecord() { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::deallocateData( + Kokkos::Profiling::SpaceHandle(Kokkos::CudaHostPinnedSpace::name()), + RecordBase::m_alloc_ptr->m_label, data(), size()); + } +#endif + + m_space.deallocate(SharedAllocationRecord::m_alloc_ptr, + SharedAllocationRecord::m_alloc_size); +} + +// end SharedAllocationRecord destructors }}}1 +//============================================================================== + +//============================================================================== +// {{{1 + +SharedAllocationRecord::SharedAllocationRecord( + const Kokkos::CudaSpace &arg_space, const std::string &arg_label, + const size_t arg_alloc_size, + const SharedAllocationRecord::function_type arg_dealloc) + // Pass through allocated [ SharedAllocationHeader , user_memory ] + // Pass through deallocation function + : SharedAllocationRecord( +#ifdef KOKKOS_DEBUG + &SharedAllocationRecord::s_root_record, +#endif + Impl::checked_allocation_with_header(arg_space, arg_label, + arg_alloc_size), + sizeof(SharedAllocationHeader) + arg_alloc_size, arg_dealloc), + m_tex_obj(0), + m_space(arg_space) { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::allocateData( + Kokkos::Profiling::SpaceHandle(arg_space.name()), arg_label, data(), + arg_alloc_size); + } +#endif + + SharedAllocationHeader header; // Fill in the Header information - header.m_record = static_cast< SharedAllocationRecord< void , void > * >( this ); + header.m_record = static_cast *>(this); - strncpy( header.m_label - , arg_label.c_str() - , SharedAllocationHeader::maximum_label_length - ); + strncpy(header.m_label, arg_label.c_str(), + SharedAllocationHeader::maximum_label_length); // Set last element zero, in case c_str is too long - header.m_label[SharedAllocationHeader::maximum_label_length - 1] = (char) 0; + header.m_label[SharedAllocationHeader::maximum_label_length - 1] = (char)0; // Copy to device memory - Kokkos::Impl::DeepCopy( RecordBase::m_alloc_ptr , & header , sizeof(SharedAllocationHeader) ); + Kokkos::Impl::DeepCopy(RecordBase::m_alloc_ptr, &header, + sizeof(SharedAllocationHeader)); } -SharedAllocationRecord< Kokkos::CudaUVMSpace , void >:: -SharedAllocationRecord( const Kokkos::CudaUVMSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const SharedAllocationRecord< void , void >::function_type arg_dealloc - ) - // Pass through allocated [ SharedAllocationHeader , user_memory ] - // Pass through deallocation function - : SharedAllocationRecord< void , void > - ( +SharedAllocationRecord::SharedAllocationRecord( + const Kokkos::CudaUVMSpace &arg_space, const std::string &arg_label, + const size_t arg_alloc_size, + const SharedAllocationRecord::function_type arg_dealloc) + // Pass through allocated [ SharedAllocationHeader , user_memory ] + // Pass through deallocation function + : SharedAllocationRecord( #ifdef KOKKOS_DEBUG - & SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::s_root_record, + &SharedAllocationRecord::s_root_record, #endif - reinterpret_cast( arg_space.allocate( sizeof(SharedAllocationHeader) + arg_alloc_size ) ) - , sizeof(SharedAllocationHeader) + arg_alloc_size - , arg_dealloc - ) - , m_tex_obj( 0 ) - , m_space( arg_space ) -{ - #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Profiling::allocateData(Kokkos::Profiling::SpaceHandle(arg_space.name()),arg_label,data(),arg_alloc_size); + Impl::checked_allocation_with_header(arg_space, arg_label, + arg_alloc_size), + sizeof(SharedAllocationHeader) + arg_alloc_size, arg_dealloc), + m_tex_obj(0), + m_space(arg_space) { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::allocateData( + Kokkos::Profiling::SpaceHandle(arg_space.name()), arg_label, data(), + arg_alloc_size); } - #endif - // Fill in the Header information, directly accessible via UVM - - RecordBase::m_alloc_ptr->m_record = this ; - - strncpy( RecordBase::m_alloc_ptr->m_label - , arg_label.c_str() - , SharedAllocationHeader::maximum_label_length - ); - - // Set last element zero, in case c_str is too long - RecordBase::m_alloc_ptr->m_label[SharedAllocationHeader::maximum_label_length - 1] = (char) 0; -} - -SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >:: -SharedAllocationRecord( const Kokkos::CudaHostPinnedSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const SharedAllocationRecord< void , void >::function_type arg_dealloc - ) - // Pass through allocated [ SharedAllocationHeader , user_memory ] - // Pass through deallocation function - : SharedAllocationRecord< void , void > - ( -#ifdef KOKKOS_DEBUG - & SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::s_root_record, #endif - reinterpret_cast( arg_space.allocate( sizeof(SharedAllocationHeader) + arg_alloc_size ) ) - , sizeof(SharedAllocationHeader) + arg_alloc_size - , arg_dealloc - ) - , m_space( arg_space ) -{ - #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Profiling::allocateData(Kokkos::Profiling::SpaceHandle(arg_space.name()),arg_label,data(),arg_alloc_size); - } - #endif // Fill in the Header information, directly accessible via UVM - RecordBase::m_alloc_ptr->m_record = this ; + RecordBase::m_alloc_ptr->m_record = this; + + strncpy(RecordBase::m_alloc_ptr->m_label, arg_label.c_str(), + SharedAllocationHeader::maximum_label_length); - strncpy( RecordBase::m_alloc_ptr->m_label - , arg_label.c_str() - , SharedAllocationHeader::maximum_label_length - ); // Set last element zero, in case c_str is too long - RecordBase::m_alloc_ptr->m_label[SharedAllocationHeader::maximum_label_length - 1] = (char) 0; + RecordBase::m_alloc_ptr + ->m_label[SharedAllocationHeader::maximum_label_length - 1] = (char)0; } -//---------------------------------------------------------------------------- +SharedAllocationRecord:: + SharedAllocationRecord( + const Kokkos::CudaHostPinnedSpace &arg_space, + const std::string &arg_label, const size_t arg_alloc_size, + const SharedAllocationRecord::function_type arg_dealloc) + // Pass through allocated [ SharedAllocationHeader , user_memory ] + // Pass through deallocation function + : SharedAllocationRecord( +#ifdef KOKKOS_DEBUG + &SharedAllocationRecord::s_root_record, +#endif + Impl::checked_allocation_with_header(arg_space, arg_label, + arg_alloc_size), + sizeof(SharedAllocationHeader) + arg_alloc_size, arg_dealloc), + m_space(arg_space) { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::allocateData( + Kokkos::Profiling::SpaceHandle(arg_space.name()), arg_label, data(), + arg_alloc_size); + } +#endif + // Fill in the Header information, directly accessible on the host -void * SharedAllocationRecord< Kokkos::CudaSpace , void >:: -allocate_tracked( const Kokkos::CudaSpace & arg_space - , const std::string & arg_alloc_label - , const size_t arg_alloc_size ) -{ - if ( ! arg_alloc_size ) return (void *) 0 ; + RecordBase::m_alloc_ptr->m_record = this; - SharedAllocationRecord * const r = - allocate( arg_space , arg_alloc_label , arg_alloc_size ); + strncpy(RecordBase::m_alloc_ptr->m_label, arg_label.c_str(), + SharedAllocationHeader::maximum_label_length); + // Set last element zero, in case c_str is too long + RecordBase::m_alloc_ptr + ->m_label[SharedAllocationHeader::maximum_label_length - 1] = (char)0; +} - RecordBase::increment( r ); +// end SharedAllocationRecord constructors }}}1 +//============================================================================== + +//============================================================================== +// {{{1 + +void *SharedAllocationRecord::allocate_tracked( + const Kokkos::CudaSpace &arg_space, const std::string &arg_alloc_label, + const size_t arg_alloc_size) { + if (!arg_alloc_size) return (void *)0; + + SharedAllocationRecord *const r = + allocate(arg_space, arg_alloc_label, arg_alloc_size); + + RecordBase::increment(r); return r->data(); } -void SharedAllocationRecord< Kokkos::CudaSpace , void >:: -deallocate_tracked( void * const arg_alloc_ptr ) -{ - if ( arg_alloc_ptr != 0 ) { - SharedAllocationRecord * const r = get_record( arg_alloc_ptr ); +void SharedAllocationRecord::deallocate_tracked( + void *const arg_alloc_ptr) { + if (arg_alloc_ptr != 0) { + SharedAllocationRecord *const r = get_record(arg_alloc_ptr); - RecordBase::decrement( r ); + RecordBase::decrement(r); } } -void * SharedAllocationRecord< Kokkos::CudaSpace , void >:: -reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) -{ - SharedAllocationRecord * const r_old = get_record( arg_alloc_ptr ); - SharedAllocationRecord * const r_new = allocate( r_old->m_space , r_old->get_label() , arg_alloc_size ); +void *SharedAllocationRecord::reallocate_tracked( + void *const arg_alloc_ptr, const size_t arg_alloc_size) { + SharedAllocationRecord *const r_old = get_record(arg_alloc_ptr); + SharedAllocationRecord *const r_new = + allocate(r_old->m_space, r_old->get_label(), arg_alloc_size); - Kokkos::Impl::DeepCopy( r_new->data() , r_old->data() - , std::min( r_old->size() , r_new->size() ) ); + Kokkos::Impl::DeepCopy( + r_new->data(), r_old->data(), std::min(r_old->size(), r_new->size())); - RecordBase::increment( r_new ); - RecordBase::decrement( r_old ); + RecordBase::increment(r_new); + RecordBase::decrement(r_old); return r_new->data(); } -void * SharedAllocationRecord< Kokkos::CudaUVMSpace , void >:: -allocate_tracked( const Kokkos::CudaUVMSpace & arg_space - , const std::string & arg_alloc_label - , const size_t arg_alloc_size ) -{ - if ( ! arg_alloc_size ) return (void *) 0 ; +void *SharedAllocationRecord::allocate_tracked( + const Kokkos::CudaUVMSpace &arg_space, const std::string &arg_alloc_label, + const size_t arg_alloc_size) { + if (!arg_alloc_size) return (void *)0; - SharedAllocationRecord * const r = - allocate( arg_space , arg_alloc_label , arg_alloc_size ); + SharedAllocationRecord *const r = + allocate(arg_space, arg_alloc_label, arg_alloc_size); - RecordBase::increment( r ); + RecordBase::increment(r); return r->data(); } -void SharedAllocationRecord< Kokkos::CudaUVMSpace , void >:: -deallocate_tracked( void * const arg_alloc_ptr ) -{ - if ( arg_alloc_ptr != 0 ) { +void SharedAllocationRecord::deallocate_tracked( + void *const arg_alloc_ptr) { + if (arg_alloc_ptr != 0) { + SharedAllocationRecord *const r = get_record(arg_alloc_ptr); - SharedAllocationRecord * const r = get_record( arg_alloc_ptr ); - - RecordBase::decrement( r ); + RecordBase::decrement(r); } } -void * SharedAllocationRecord< Kokkos::CudaUVMSpace , void >:: -reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) -{ - SharedAllocationRecord * const r_old = get_record( arg_alloc_ptr ); - SharedAllocationRecord * const r_new = allocate( r_old->m_space , r_old->get_label() , arg_alloc_size ); +void *SharedAllocationRecord::reallocate_tracked( + void *const arg_alloc_ptr, const size_t arg_alloc_size) { + SharedAllocationRecord *const r_old = get_record(arg_alloc_ptr); + SharedAllocationRecord *const r_new = + allocate(r_old->m_space, r_old->get_label(), arg_alloc_size); - Kokkos::Impl::DeepCopy( r_new->data() , r_old->data() - , std::min( r_old->size() , r_new->size() ) ); + Kokkos::Impl::DeepCopy( + r_new->data(), r_old->data(), std::min(r_old->size(), r_new->size())); - RecordBase::increment( r_new ); - RecordBase::decrement( r_old ); + RecordBase::increment(r_new); + RecordBase::decrement(r_old); return r_new->data(); } -void * SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >:: -allocate_tracked( const Kokkos::CudaHostPinnedSpace & arg_space - , const std::string & arg_alloc_label - , const size_t arg_alloc_size ) -{ - if ( ! arg_alloc_size ) return (void *) 0 ; +void * +SharedAllocationRecord::allocate_tracked( + const Kokkos::CudaHostPinnedSpace &arg_space, + const std::string &arg_alloc_label, const size_t arg_alloc_size) { + if (!arg_alloc_size) return (void *)0; - SharedAllocationRecord * const r = - allocate( arg_space , arg_alloc_label , arg_alloc_size ); + SharedAllocationRecord *const r = + allocate(arg_space, arg_alloc_label, arg_alloc_size); - RecordBase::increment( r ); + RecordBase::increment(r); return r->data(); } -void SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >:: -deallocate_tracked( void * const arg_alloc_ptr ) -{ - if ( arg_alloc_ptr != 0 ) { - SharedAllocationRecord * const r = get_record( arg_alloc_ptr ); +void SharedAllocationRecord::deallocate_tracked(void *const + arg_alloc_ptr) { + if (arg_alloc_ptr != 0) { + SharedAllocationRecord *const r = get_record(arg_alloc_ptr); - RecordBase::decrement( r ); + RecordBase::decrement(r); } } -void * SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >:: -reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) -{ - SharedAllocationRecord * const r_old = get_record( arg_alloc_ptr ); - SharedAllocationRecord * const r_new = allocate( r_old->m_space , r_old->get_label() , arg_alloc_size ); +void * +SharedAllocationRecord::reallocate_tracked( + void *const arg_alloc_ptr, const size_t arg_alloc_size) { + SharedAllocationRecord *const r_old = get_record(arg_alloc_ptr); + SharedAllocationRecord *const r_new = + allocate(r_old->m_space, r_old->get_label(), arg_alloc_size); - Kokkos::Impl::DeepCopy( r_new->data() , r_old->data() - , std::min( r_old->size() , r_new->size() ) ); + Kokkos::Impl::DeepCopy( + r_new->data(), r_old->data(), std::min(r_old->size(), r_new->size())); - RecordBase::increment( r_new ); - RecordBase::decrement( r_old ); + RecordBase::increment(r_new); + RecordBase::decrement(r_old); return r_new->data(); } -//---------------------------------------------------------------------------- +// end SharedAllocationRecored::(re|de|)allocate_tracked }}}1 +//============================================================================== -SharedAllocationRecord< Kokkos::CudaSpace , void > * -SharedAllocationRecord< Kokkos::CudaSpace , void >::get_record( void * alloc_ptr ) -{ - using RecordCuda = SharedAllocationRecord< Kokkos::CudaSpace , void > ; +//============================================================================== +// {{{1 - using Header = SharedAllocationHeader ; +SharedAllocationRecord * +SharedAllocationRecord::get_record(void *alloc_ptr) { + using RecordCuda = SharedAllocationRecord; + + using Header = SharedAllocationHeader; // Copy the header from the allocation - Header head ; + Header head; - Header const * const head_cuda = alloc_ptr ? Header::get_header( alloc_ptr ) : (Header*) 0 ; + Header const *const head_cuda = + alloc_ptr ? Header::get_header(alloc_ptr) : (Header *)0; - if ( alloc_ptr ) { - Kokkos::Impl::DeepCopy( & head , head_cuda , sizeof(SharedAllocationHeader) ); + if (alloc_ptr) { + Kokkos::Impl::DeepCopy( + &head, head_cuda, sizeof(SharedAllocationHeader)); } - RecordCuda * const record = alloc_ptr ? static_cast< RecordCuda * >( head.m_record ) : (RecordCuda *) 0 ; + RecordCuda *const record = + alloc_ptr ? static_cast(head.m_record) : (RecordCuda *)0; - if ( ! alloc_ptr || record->m_alloc_ptr != head_cuda ) { - Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void >::get_record ERROR" ) ); + if (!alloc_ptr || record->m_alloc_ptr != head_cuda) { + Kokkos::Impl::throw_runtime_exception( + std::string("Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaSpace , " + "void >::get_record ERROR")); } - return record ; + return record; } -SharedAllocationRecord< Kokkos::CudaUVMSpace , void > * -SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::get_record( void * alloc_ptr ) -{ - using Header = SharedAllocationHeader ; - using RecordCuda = SharedAllocationRecord< Kokkos::CudaUVMSpace , void > ; +SharedAllocationRecord *SharedAllocationRecord< + Kokkos::CudaUVMSpace, void>::get_record(void *alloc_ptr) { + using Header = SharedAllocationHeader; + using RecordCuda = SharedAllocationRecord; - Header * const h = alloc_ptr ? reinterpret_cast< Header * >( alloc_ptr ) - 1 : (Header *) 0 ; + Header *const h = + alloc_ptr ? reinterpret_cast
    (alloc_ptr) - 1 : (Header *)0; - if ( ! alloc_ptr || h->m_record->m_alloc_ptr != h ) { - Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::get_record ERROR" ) ); + if (!alloc_ptr || h->m_record->m_alloc_ptr != h) { + Kokkos::Impl::throw_runtime_exception( + std::string("Kokkos::Impl::SharedAllocationRecord< " + "Kokkos::CudaUVMSpace , void >::get_record ERROR")); } - return static_cast< RecordCuda * >( h->m_record ); + return static_cast(h->m_record); } -SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void > * -SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::get_record( void * alloc_ptr ) -{ - using Header = SharedAllocationHeader ; - using RecordCuda = SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void > ; +SharedAllocationRecord + *SharedAllocationRecord::get_record( + void *alloc_ptr) { + using Header = SharedAllocationHeader; + using RecordCuda = SharedAllocationRecord; - Header * const h = alloc_ptr ? reinterpret_cast< Header * >( alloc_ptr ) - 1 : (Header *) 0 ; + Header *const h = + alloc_ptr ? reinterpret_cast
    (alloc_ptr) - 1 : (Header *)0; - if ( ! alloc_ptr || h->m_record->m_alloc_ptr != h ) { - Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::get_record ERROR" ) ); + if (!alloc_ptr || h->m_record->m_alloc_ptr != h) { + Kokkos::Impl::throw_runtime_exception( + std::string("Kokkos::Impl::SharedAllocationRecord< " + "Kokkos::CudaHostPinnedSpace , void >::get_record ERROR")); } - return static_cast< RecordCuda * >( h->m_record ); + return static_cast(h->m_record); } +// end SharedAllocationRecord::get_record() }}}1 +//============================================================================== + +//============================================================================== +// {{{1 + // Iterate records to print orphaned memory ... -void -SharedAllocationRecord< Kokkos::CudaSpace , void >:: -print_records( std::ostream & s , const Kokkos::CudaSpace & , bool detail ) -{ +void SharedAllocationRecord::print_records( + std::ostream &s, const Kokkos::CudaSpace &, bool detail) { #ifdef KOKKOS_DEBUG - SharedAllocationRecord< void , void > * r = & s_root_record ; + SharedAllocationRecord *r = &s_root_record; - char buffer[256] ; + char buffer[256]; - SharedAllocationHeader head ; + SharedAllocationHeader head; - if ( detail ) { + if (detail) { do { - if ( r->m_alloc_ptr ) { - Kokkos::Impl::DeepCopy( & head , r->m_alloc_ptr , sizeof(SharedAllocationHeader) ); - } - else { - head.m_label[0] = 0 ; + if (r->m_alloc_ptr) { + Kokkos::Impl::DeepCopy( + &head, r->m_alloc_ptr, sizeof(SharedAllocationHeader)); + } else { + head.m_label[0] = 0; } - //Formatting dependent on sizeof(uintptr_t) - const char * format_string; + // Formatting dependent on sizeof(uintptr_t) + const char *format_string; if (sizeof(uintptr_t) == sizeof(unsigned long)) { - format_string = "Cuda addr( 0x%.12lx ) list( 0x%.12lx 0x%.12lx ) extent[ 0x%.12lx + %.8ld ] count(%d) dealloc(0x%.12lx) %s\n"; - } - else if (sizeof(uintptr_t) == sizeof(unsigned long long)) { - format_string = "Cuda addr( 0x%.12llx ) list( 0x%.12llx 0x%.12llx ) extent[ 0x%.12llx + %.8ld ] count(%d) dealloc(0x%.12llx) %s\n"; + format_string = + "Cuda addr( 0x%.12lx ) list( 0x%.12lx 0x%.12lx ) extent[ 0x%.12lx " + "+ %.8ld ] count(%d) dealloc(0x%.12lx) %s\n"; + } else if (sizeof(uintptr_t) == sizeof(unsigned long long)) { + format_string = + "Cuda addr( 0x%.12llx ) list( 0x%.12llx 0x%.12llx ) extent[ " + "0x%.12llx + %.8ld ] count(%d) dealloc(0x%.12llx) %s\n"; } - snprintf( buffer , 256 - , format_string - , reinterpret_cast( r ) - , reinterpret_cast( r->m_prev ) - , reinterpret_cast( r->m_next ) - , reinterpret_cast( r->m_alloc_ptr ) - , r->m_alloc_size - , r->m_count - , reinterpret_cast( r->m_dealloc ) - , head.m_label - ); - s << buffer ; - r = r->m_next ; - } while ( r != & s_root_record ); - } - else { + snprintf(buffer, 256, format_string, reinterpret_cast(r), + reinterpret_cast(r->m_prev), + reinterpret_cast(r->m_next), + reinterpret_cast(r->m_alloc_ptr), r->m_alloc_size, + r->m_count, reinterpret_cast(r->m_dealloc), + head.m_label); + s << buffer; + r = r->m_next; + } while (r != &s_root_record); + } else { do { - if ( r->m_alloc_ptr ) { + if (r->m_alloc_ptr) { + Kokkos::Impl::DeepCopy( + &head, r->m_alloc_ptr, sizeof(SharedAllocationHeader)); - Kokkos::Impl::DeepCopy( & head , r->m_alloc_ptr , sizeof(SharedAllocationHeader) ); - - //Formatting dependent on sizeof(uintptr_t) - const char * format_string; + // Formatting dependent on sizeof(uintptr_t) + const char *format_string; if (sizeof(uintptr_t) == sizeof(unsigned long)) { format_string = "Cuda [ 0x%.12lx + %ld ] %s\n"; - } - else if (sizeof(uintptr_t) == sizeof(unsigned long long)) { + } else if (sizeof(uintptr_t) == sizeof(unsigned long long)) { format_string = "Cuda [ 0x%.12llx + %ld ] %s\n"; } - snprintf( buffer , 256 - , format_string - , reinterpret_cast< uintptr_t >( r->data() ) - , r->size() - , head.m_label - ); + snprintf(buffer, 256, format_string, + reinterpret_cast(r->data()), r->size(), + head.m_label); + } else { + snprintf(buffer, 256, "Cuda [ 0 + 0 ]\n"); } - else { - snprintf( buffer , 256 , "Cuda [ 0 + 0 ]\n" ); - } - s << buffer ; - r = r->m_next ; - } while ( r != & s_root_record ); + s << buffer; + r = r->m_next; + } while (r != &s_root_record); } #else - Kokkos::Impl::throw_runtime_exception("SharedAllocationHeader::print_records only works with KOKKOS_DEBUG enabled"); + Kokkos::Impl::throw_runtime_exception( + "SharedAllocationHeader::print_records only works with " + "KOKKOS_DEBUG enabled"); #endif } -void -SharedAllocationRecord< Kokkos::CudaUVMSpace , void >:: -print_records( std::ostream & s , const Kokkos::CudaUVMSpace & , bool detail ) -{ +void SharedAllocationRecord::print_records( + std::ostream &s, const Kokkos::CudaUVMSpace &, bool detail) { #ifdef KOKKOS_DEBUG - SharedAllocationRecord< void , void >::print_host_accessible_records( s , "CudaUVM" , & s_root_record , detail ); + SharedAllocationRecord::print_host_accessible_records( + s, "CudaUVM", &s_root_record, detail); #else - Kokkos::Impl::throw_runtime_exception("SharedAllocationHeader::print_records only works with KOKKOS_DEBUG enabled"); + Kokkos::Impl::throw_runtime_exception( + "SharedAllocationHeader::print_records only works with " + "KOKKOS_DEBUG enabled"); #endif } -void -SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >:: -print_records( std::ostream & s , const Kokkos::CudaHostPinnedSpace & , bool detail ) -{ +void SharedAllocationRecord::print_records( + std::ostream &s, const Kokkos::CudaHostPinnedSpace &, bool detail) { #ifdef KOKKOS_DEBUG - SharedAllocationRecord< void , void >::print_host_accessible_records( s , "CudaHostPinned" , & s_root_record , detail ); + SharedAllocationRecord::print_host_accessible_records( + s, "CudaHostPinned", &s_root_record, detail); #else - Kokkos::Impl::throw_runtime_exception("SharedAllocationHeader::print_records only works with KOKKOS_DEBUG enabled"); + Kokkos::Impl::throw_runtime_exception( + "SharedAllocationHeader::print_records only works with " + "KOKKOS_DEBUG enabled"); #endif } -void* cuda_resize_scratch_space(std::int64_t bytes, bool force_shrink) { - static void* ptr = NULL; +// end SharedAllocationRecord::print_records() }}}1 +//============================================================================== + +void *cuda_resize_scratch_space(std::int64_t bytes, bool force_shrink) { + static void *ptr = NULL; static std::int64_t current_size = 0; - if(current_size == 0) { + if (current_size == 0) { current_size = bytes; - ptr = Kokkos::kokkos_malloc("CudaSpace::ScratchMemory",current_size); + ptr = Kokkos::kokkos_malloc("CudaSpace::ScratchMemory", + current_size); } - if(bytes > current_size) { + if (bytes > current_size) { current_size = bytes; Kokkos::kokkos_free(ptr); - ptr = Kokkos::kokkos_malloc("CudaSpace::ScratchMemory",current_size); + ptr = Kokkos::kokkos_malloc("CudaSpace::ScratchMemory", + current_size); } - if((bytes < current_size) && (force_shrink)) { + if ((bytes < current_size) && (force_shrink)) { current_size = bytes; Kokkos::kokkos_free(ptr); - ptr = Kokkos::kokkos_malloc("CudaSpace::ScratchMemory",current_size); + ptr = Kokkos::kokkos_malloc("CudaSpace::ScratchMemory", + current_size); } return ptr; } -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos #else void KOKKOS_CORE_SRC_CUDA_CUDASPACE_PREVENT_LINK_ERROR() {} -#endif // KOKKOS_ENABLE_CUDA - +#endif // KOKKOS_ENABLE_CUDA diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Alloc.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Alloc.hpp index 5726e02180..e76133fae8 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Alloc.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Alloc.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -52,13 +53,12 @@ namespace Kokkos { namespace Impl { -template< class DestructFunctor > -SharedAllocationRecord * -shared_allocation_record( Kokkos::CudaSpace const & arg_space - , void * const arg_alloc_ptr - , DestructFunctor const & arg_destruct ) -{ - SharedAllocationRecord * const record = SharedAllocationRecord::get_record( arg_alloc_ptr ); +template +SharedAllocationRecord* shared_allocation_record( + Kokkos::CudaSpace const& arg_space, void* const arg_alloc_ptr, + DestructFunctor const& arg_destruct) { + SharedAllocationRecord* const record = + SharedAllocationRecord::get_record(arg_alloc_ptr); // assert: record != 0 @@ -66,115 +66,88 @@ shared_allocation_record( Kokkos::CudaSpace const & arg_space // assert: record->m_destruct_function == 0 - DestructFunctor * const functor = - reinterpret_cast< DestructFunctor * >( - reinterpret_cast< uintptr_t >( record ) + sizeof(SharedAllocationRecord) ); + DestructFunctor* const functor = reinterpret_cast( + reinterpret_cast(record) + sizeof(SharedAllocationRecord)); - new( functor ) DestructFunctor( arg_destruct ); + new (functor) DestructFunctor(arg_destruct); - record->m_destruct_functor = & shared_allocation_destroy< DestructFunctor > ; + record->m_destruct_functor = &shared_allocation_destroy; - return record ; + return record; } - /// class CudaUnmanagedAllocator /// does nothing when deallocate(ptr,size) is called -struct CudaUnmanagedAllocator -{ - static const char * name() - { - return "Cuda Unmanaged Allocator"; - } +struct CudaUnmanagedAllocator { + static const char* name() { return "Cuda Unmanaged Allocator"; } - static void deallocate(void * /*ptr*/, size_t /*size*/) {} + static void deallocate(void* /*ptr*/, size_t /*size*/) {} static bool support_texture_binding() { return true; } }; /// class CudaUnmanagedAllocator /// does nothing when deallocate(ptr,size) is called -struct CudaUnmanagedUVMAllocator -{ - static const char * name() - { - return "Cuda Unmanaged UVM Allocator"; - } +struct CudaUnmanagedUVMAllocator { + static const char* name() { return "Cuda Unmanaged UVM Allocator"; } - static void deallocate(void * /*ptr*/, size_t /*size*/) {} + static void deallocate(void* /*ptr*/, size_t /*size*/) {} static bool support_texture_binding() { return true; } }; /// class CudaUnmanagedHostAllocator /// does nothing when deallocate(ptr,size) is called -class CudaUnmanagedHostAllocator -{ -public: - static const char * name() - { - return "Cuda Unmanaged Host Allocator"; - } +class CudaUnmanagedHostAllocator { + public: + static const char* name() { return "Cuda Unmanaged Host Allocator"; } // Unmanaged deallocate does nothing - static void deallocate(void * /*ptr*/, size_t /*size*/) {} + static void deallocate(void* /*ptr*/, size_t /*size*/) {} }; /// class CudaMallocAllocator -class CudaMallocAllocator -{ -public: - static const char * name() - { - return "Cuda Malloc Allocator"; - } +class CudaMallocAllocator { + public: + static const char* name() { return "Cuda Malloc Allocator"; } static void* allocate(size_t size); - static void deallocate(void * ptr, size_t); + static void deallocate(void* ptr, size_t); - static void * reallocate(void * old_ptr, size_t old_size, size_t new_size); + static void* reallocate(void* old_ptr, size_t old_size, size_t new_size); static bool support_texture_binding() { return true; } }; /// class CudaUVMAllocator -class CudaUVMAllocator -{ -public: - static const char * name() - { - return "Cuda UVM Allocator"; - } +class CudaUVMAllocator { + public: + static const char* name() { return "Cuda UVM Allocator"; } static void* allocate(size_t size); - static void deallocate(void * ptr, size_t); + static void deallocate(void* ptr, size_t); - static void * reallocate(void * old_ptr, size_t old_size, size_t new_size); + static void* reallocate(void* old_ptr, size_t old_size, size_t new_size); static bool support_texture_binding() { return true; } }; /// class CudaHostAllocator -class CudaHostAllocator -{ -public: - static const char * name() - { - return "Cuda Host Allocator"; - } +class CudaHostAllocator { + public: + static const char* name() { return "Cuda Host Allocator"; } static void* allocate(size_t size); - static void deallocate(void * ptr, size_t); + static void deallocate(void* ptr, size_t); - static void * reallocate(void * old_ptr, size_t old_size, size_t new_size); + static void* reallocate(void* old_ptr, size_t old_size, size_t new_size); }; +} // namespace Impl +} // namespace Kokkos -}} // namespace Kokkos::Impl - -#endif //KOKKOS_ENABLE_CUDA - -#endif // #ifndef KOKKOS_CUDA_ALLOCATION_TRACKING_HPP +#endif // KOKKOS_ENABLE_CUDA +#endif // #ifndef KOKKOS_CUDA_ALLOCATION_TRACKING_HPP diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp index 9d4bcbc8cf..8a6c0433c8 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp @@ -32,10 +32,10 @@ LICENSE ASSOCIATED WITH SUBSEQUENT MODIFICATIONS // ************************************************************************ // -// Kokkos v. 2.0 +// Kokkos v. 3.0 // Copyright (2019) Sandia Corporation // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -53,10 +53,10 @@ LICENSE ASSOCIATED WITH SUBSEQUENT MODIFICATIONS // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -82,85 +82,334 @@ LICENSE ASSOCIATED WITH SUBSEQUENT MODIFICATIONS namespace Kokkos { namespace Impl { - #ifndef __simt_scope // Modification: Kokkos GPU atomics should default to `gpu` scope #define __simt_scope "gpu" #endif -#define __simt_fence_signal_() asm volatile("":::"memory") -#define __simt_fence_sc_() asm volatile("fence.sc." __simt_scope ";":::"memory") -#define __simt_fence_() asm volatile("fence." __simt_scope ";":::"memory") +#define __simt_fence_signal_() asm volatile("" ::: "memory") +#define __simt_fence_sc_() \ + asm volatile("fence.sc." __simt_scope ";" ::: "memory") +#define __simt_fence_() asm volatile("fence." __simt_scope ";" ::: "memory") -#define __simt_load_acquire_8_as_32(ptr,ret) asm volatile("ld.acquire." __simt_scope ".b8 %0, [%1];" : "=r"(ret) : "l"(ptr) : "memory") -#define __simt_load_relaxed_8_as_32(ptr,ret) asm volatile("ld.relaxed." __simt_scope ".b8 %0, [%1];" : "=r"(ret) : "l"(ptr) : "memory") -#define __simt_store_release_8_as_32(ptr,desired) asm volatile("st.release." __simt_scope ".b8 [%0], %1;" :: "l"(ptr), "r"(desired) : "memory") -#define __simt_store_relaxed_8_as_32(ptr,desired) asm volatile("st.relaxed." __simt_scope ".b8 [%0], %1;" :: "l"(ptr), "r"(desired) : "memory") +#define __simt_load_acquire_8_as_32(ptr, ret) \ + asm volatile("ld.acquire." __simt_scope ".b8 %0, [%1];" \ + : "=r"(ret) \ + : "l"(ptr) \ + : "memory") +#define __simt_load_relaxed_8_as_32(ptr, ret) \ + asm volatile("ld.relaxed." __simt_scope ".b8 %0, [%1];" \ + : "=r"(ret) \ + : "l"(ptr) \ + : "memory") +#define __simt_store_release_8_as_32(ptr, desired) \ + asm volatile("st.release." __simt_scope ".b8 [%0], %1;" ::"l"(ptr), \ + "r"(desired) \ + : "memory") +#define __simt_store_relaxed_8_as_32(ptr, desired) \ + asm volatile("st.relaxed." __simt_scope ".b8 [%0], %1;" ::"l"(ptr), \ + "r"(desired) \ + : "memory") -#define __simt_load_acquire_16(ptr,ret) asm volatile("ld.acquire." __simt_scope ".b16 %0, [%1];" : "=h"(ret) : "l"(ptr) : "memory") -#define __simt_load_relaxed_16(ptr,ret) asm volatile("ld.relaxed." __simt_scope ".b16 %0, [%1];" : "=h"(ret) : "l"(ptr) : "memory") -#define __simt_store_release_16(ptr,desired) asm volatile("st.release." __simt_scope ".b16 [%0], %1;" :: "l"(ptr), "h"(desired) : "memory") -#define __simt_store_relaxed_16(ptr,desired) asm volatile("st.relaxed." __simt_scope ".b16 [%0], %1;" :: "l"(ptr), "h"(desired) : "memory") +#define __simt_load_acquire_16(ptr, ret) \ + asm volatile("ld.acquire." __simt_scope ".b16 %0, [%1];" \ + : "=h"(ret) \ + : "l"(ptr) \ + : "memory") +#define __simt_load_relaxed_16(ptr, ret) \ + asm volatile("ld.relaxed." __simt_scope ".b16 %0, [%1];" \ + : "=h"(ret) \ + : "l"(ptr) \ + : "memory") +#define __simt_store_release_16(ptr, desired) \ + asm volatile("st.release." __simt_scope ".b16 [%0], %1;" ::"l"(ptr), \ + "h"(desired) \ + : "memory") +#define __simt_store_relaxed_16(ptr, desired) \ + asm volatile("st.relaxed." __simt_scope ".b16 [%0], %1;" ::"l"(ptr), \ + "h"(desired) \ + : "memory") -#define __simt_load_acquire_32(ptr,ret) asm volatile("ld.acquire." __simt_scope ".b32 %0, [%1];" : "=r"(ret) : "l"(ptr) : "memory") -#define __simt_load_relaxed_32(ptr,ret) asm volatile("ld.relaxed." __simt_scope ".b32 %0, [%1];" : "=r"(ret) : "l"(ptr) : "memory") -#define __simt_store_release_32(ptr,desired) asm volatile("st.release." __simt_scope ".b32 [%0], %1;" :: "l"(ptr), "r"(desired) : "memory") -#define __simt_store_relaxed_32(ptr,desired) asm volatile("st.relaxed." __simt_scope ".b32 [%0], %1;" :: "l"(ptr), "r"(desired) : "memory") -#define __simt_exch_release_32(ptr,old,desired) asm volatile("atom.exch.release." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(desired) : "memory") -#define __simt_exch_acquire_32(ptr,old,desired) asm volatile("atom.exch.acquire." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(desired) : "memory") -#define __simt_exch_acq_rel_32(ptr,old,desired) asm volatile("atom.exch.acq_rel." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(desired) : "memory") -#define __simt_exch_relaxed_32(ptr,old,desired) asm volatile("atom.exch.relaxed." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(desired) : "memory") -#define __simt_cas_release_32(ptr,old,expected,desired) asm volatile("atom.cas.release." __simt_scope ".b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory") -#define __simt_cas_acquire_32(ptr,old,expected,desired) asm volatile("atom.cas.acquire." __simt_scope ".b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory") -#define __simt_cas_acq_rel_32(ptr,old,expected,desired) asm volatile("atom.cas.acq_rel." __simt_scope ".b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory") -#define __simt_cas_relaxed_32(ptr,old,expected,desired) asm volatile("atom.cas.relaxed." __simt_scope ".b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory") -#define __simt_add_release_32(ptr,old,addend) asm volatile("atom.add.release." __simt_scope ".u32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(addend) : "memory") -#define __simt_add_acquire_32(ptr,old,addend) asm volatile("atom.add.acquire." __simt_scope ".u32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(addend) : "memory") -#define __simt_add_acq_rel_32(ptr,old,addend) asm volatile("atom.add.acq_rel." __simt_scope ".u32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(addend) : "memory") -#define __simt_add_relaxed_32(ptr,old,addend) asm volatile("atom.add.relaxed." __simt_scope ".u32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(addend) : "memory") -#define __simt_and_release_32(ptr,old,andend) asm volatile("atom.and.release." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(andend) : "memory") -#define __simt_and_acquire_32(ptr,old,andend) asm volatile("atom.and.acquire." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(andend) : "memory") -#define __simt_and_acq_rel_32(ptr,old,andend) asm volatile("atom.and.acq_rel." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(andend) : "memory") -#define __simt_and_relaxed_32(ptr,old,andend) asm volatile("atom.and.relaxed." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(andend) : "memory") -#define __simt_or_release_32(ptr,old,orend) asm volatile("atom.or.release." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(orend) : "memory") -#define __simt_or_acquire_32(ptr,old,orend) asm volatile("atom.or.acquire." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(orend) : "memory") -#define __simt_or_acq_rel_32(ptr,old,orend) asm volatile("atom.or.acq_rel." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(orend) : "memory") -#define __simt_or_relaxed_32(ptr,old,orend) asm volatile("atom.or.relaxed." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(orend) : "memory") -#define __simt_xor_release_32(ptr,old,xorend) asm volatile("atom.xor.release." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(xorend) : "memory") -#define __simt_xor_acquire_32(ptr,old,xorend) asm volatile("atom.xor.acquire." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(xorend) : "memory") -#define __simt_xor_acq_rel_32(ptr,old,xorend) asm volatile("atom.xor.acq_rel." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(xorend) : "memory") -#define __simt_xor_relaxed_32(ptr,old,xorend) asm volatile("atom.xor.relaxed." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(xorend) : "memory") +#define __simt_load_acquire_32(ptr, ret) \ + asm volatile("ld.acquire." __simt_scope ".b32 %0, [%1];" \ + : "=r"(ret) \ + : "l"(ptr) \ + : "memory") +#define __simt_load_relaxed_32(ptr, ret) \ + asm volatile("ld.relaxed." __simt_scope ".b32 %0, [%1];" \ + : "=r"(ret) \ + : "l"(ptr) \ + : "memory") +#define __simt_store_release_32(ptr, desired) \ + asm volatile("st.release." __simt_scope ".b32 [%0], %1;" ::"l"(ptr), \ + "r"(desired) \ + : "memory") +#define __simt_store_relaxed_32(ptr, desired) \ + asm volatile("st.relaxed." __simt_scope ".b32 [%0], %1;" ::"l"(ptr), \ + "r"(desired) \ + : "memory") +#define __simt_exch_release_32(ptr, old, desired) \ + asm volatile("atom.exch.release." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(desired) \ + : "memory") +#define __simt_exch_acquire_32(ptr, old, desired) \ + asm volatile("atom.exch.acquire." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(desired) \ + : "memory") +#define __simt_exch_acq_rel_32(ptr, old, desired) \ + asm volatile("atom.exch.acq_rel." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(desired) \ + : "memory") +#define __simt_exch_relaxed_32(ptr, old, desired) \ + asm volatile("atom.exch.relaxed." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(desired) \ + : "memory") +#define __simt_cas_release_32(ptr, old, expected, desired) \ + asm volatile("atom.cas.release." __simt_scope ".b32 %0, [%1], %2, %3;" \ + : "=r"(old) \ + : "l"(ptr), "r"(expected), "r"(desired) \ + : "memory") +#define __simt_cas_acquire_32(ptr, old, expected, desired) \ + asm volatile("atom.cas.acquire." __simt_scope ".b32 %0, [%1], %2, %3;" \ + : "=r"(old) \ + : "l"(ptr), "r"(expected), "r"(desired) \ + : "memory") +#define __simt_cas_acq_rel_32(ptr, old, expected, desired) \ + asm volatile("atom.cas.acq_rel." __simt_scope ".b32 %0, [%1], %2, %3;" \ + : "=r"(old) \ + : "l"(ptr), "r"(expected), "r"(desired) \ + : "memory") +#define __simt_cas_relaxed_32(ptr, old, expected, desired) \ + asm volatile("atom.cas.relaxed." __simt_scope ".b32 %0, [%1], %2, %3;" \ + : "=r"(old) \ + : "l"(ptr), "r"(expected), "r"(desired) \ + : "memory") +#define __simt_add_release_32(ptr, old, addend) \ + asm volatile("atom.add.release." __simt_scope ".u32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(addend) \ + : "memory") +#define __simt_add_acquire_32(ptr, old, addend) \ + asm volatile("atom.add.acquire." __simt_scope ".u32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(addend) \ + : "memory") +#define __simt_add_acq_rel_32(ptr, old, addend) \ + asm volatile("atom.add.acq_rel." __simt_scope ".u32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(addend) \ + : "memory") +#define __simt_add_relaxed_32(ptr, old, addend) \ + asm volatile("atom.add.relaxed." __simt_scope ".u32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(addend) \ + : "memory") +#define __simt_and_release_32(ptr, old, andend) \ + asm volatile("atom.and.release." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(andend) \ + : "memory") +#define __simt_and_acquire_32(ptr, old, andend) \ + asm volatile("atom.and.acquire." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(andend) \ + : "memory") +#define __simt_and_acq_rel_32(ptr, old, andend) \ + asm volatile("atom.and.acq_rel." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(andend) \ + : "memory") +#define __simt_and_relaxed_32(ptr, old, andend) \ + asm volatile("atom.and.relaxed." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(andend) \ + : "memory") +#define __simt_or_release_32(ptr, old, orend) \ + asm volatile("atom.or.release." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(orend) \ + : "memory") +#define __simt_or_acquire_32(ptr, old, orend) \ + asm volatile("atom.or.acquire." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(orend) \ + : "memory") +#define __simt_or_acq_rel_32(ptr, old, orend) \ + asm volatile("atom.or.acq_rel." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(orend) \ + : "memory") +#define __simt_or_relaxed_32(ptr, old, orend) \ + asm volatile("atom.or.relaxed." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(orend) \ + : "memory") +#define __simt_xor_release_32(ptr, old, xorend) \ + asm volatile("atom.xor.release." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(xorend) \ + : "memory") +#define __simt_xor_acquire_32(ptr, old, xorend) \ + asm volatile("atom.xor.acquire." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(xorend) \ + : "memory") +#define __simt_xor_acq_rel_32(ptr, old, xorend) \ + asm volatile("atom.xor.acq_rel." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(xorend) \ + : "memory") +#define __simt_xor_relaxed_32(ptr, old, xorend) \ + asm volatile("atom.xor.relaxed." __simt_scope ".b32 %0, [%1], %2;" \ + : "=r"(old) \ + : "l"(ptr), "r"(xorend) \ + : "memory") -#define __simt_load_acquire_64(ptr,ret) asm volatile("ld.acquire." __simt_scope ".b64 %0, [%1];" : "=l"(ret) : "l"(ptr) : "memory") -#define __simt_load_relaxed_64(ptr,ret) asm volatile("ld.relaxed." __simt_scope ".b64 %0, [%1];" : "=l"(ret) : "l"(ptr) : "memory") -#define __simt_store_release_64(ptr,desired) asm volatile("st.release." __simt_scope ".b64 [%0], %1;" :: "l"(ptr), "l"(desired) : "memory") -#define __simt_store_relaxed_64(ptr,desired) asm volatile("st.relaxed." __simt_scope ".b64 [%0], %1;" :: "l"(ptr), "l"(desired) : "memory") -#define __simt_exch_release_64(ptr,old,desired) asm volatile("atom.exch.release." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(desired) : "memory") -#define __simt_exch_acquire_64(ptr,old,desired) asm volatile("atom.exch.acquire." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(desired) : "memory") -#define __simt_exch_acq_rel_64(ptr,old,desired) asm volatile("atom.exch.acq_rel." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(desired) : "memory") -#define __simt_exch_relaxed_64(ptr,old,desired) asm volatile("atom.exch.relaxed." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(desired) : "memory") -#define __simt_cas_release_64(ptr,old,expected,desired) asm volatile("atom.cas.release." __simt_scope ".b64 %0, [%1], %2, %3;" : "=l"(old) : "l"(ptr), "l"(expected), "l"(desired) : "memory") -#define __simt_cas_acquire_64(ptr,old,expected,desired) asm volatile("atom.cas.acquire." __simt_scope ".b64 %0, [%1], %2, %3;" : "=l"(old) : "l"(ptr), "l"(expected), "l"(desired) : "memory") -#define __simt_cas_acq_rel_64(ptr,old,expected,desired) asm volatile("atom.cas.acq_rel." __simt_scope ".b64 %0, [%1], %2, %3;" : "=l"(old) : "l"(ptr), "l"(expected), "l"(desired) : "memory") -#define __simt_cas_relaxed_64(ptr,old,expected,desired) asm volatile("atom.cas.relaxed." __simt_scope ".b64 %0, [%1], %2, %3;" : "=l"(old) : "l"(ptr), "l"(expected), "l"(desired) : "memory") -#define __simt_add_release_64(ptr,old,addend) asm volatile("atom.add.release." __simt_scope ".u64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(addend) : "memory") -#define __simt_add_acquire_64(ptr,old,addend) asm volatile("atom.add.acquire." __simt_scope ".u64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(addend) : "memory") -#define __simt_add_acq_rel_64(ptr,old,addend) asm volatile("atom.add.acq_rel." __simt_scope ".u64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(addend) : "memory") -#define __simt_add_relaxed_64(ptr,old,addend) asm volatile("atom.add.relaxed." __simt_scope ".u64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(addend) : "memory") -#define __simt_and_release_64(ptr,old,andend) asm volatile("atom.and.release." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(andend) : "memory") -#define __simt_and_acquire_64(ptr,old,andend) asm volatile("atom.and.acquire." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(andend) : "memory") -#define __simt_and_acq_rel_64(ptr,old,andend) asm volatile("atom.and.acq_rel." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(andend) : "memory") -#define __simt_and_relaxed_64(ptr,old,andend) asm volatile("atom.and.relaxed." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(andend) : "memory") -#define __simt_or_release_64(ptr,old,orend) asm volatile("atom.or.release." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(orend) : "memory") -#define __simt_or_acquire_64(ptr,old,orend) asm volatile("atom.or.acquire." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(orend) : "memory") -#define __simt_or_acq_rel_64(ptr,old,orend) asm volatile("atom.or.acq_rel." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(orend) : "memory") -#define __simt_or_relaxed_64(ptr,old,orend) asm volatile("atom.or.relaxed." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(orend) : "memory") -#define __simt_xor_release_64(ptr,old,xorend) asm volatile("atom.xor.release." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(xorend) : "memory") -#define __simt_xor_acquire_64(ptr,old,xorend) asm volatile("atom.xor.acquire." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(xorend) : "memory") -#define __simt_xor_acq_rel_64(ptr,old,xorend) asm volatile("atom.xor.acq_rel." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(xorend) : "memory") -#define __simt_xor_relaxed_64(ptr,old,xorend) asm volatile("atom.xor.relaxed." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(xorend) : "memory") +#define __simt_load_acquire_64(ptr, ret) \ + asm volatile("ld.acquire." __simt_scope ".b64 %0, [%1];" \ + : "=l"(ret) \ + : "l"(ptr) \ + : "memory") +#define __simt_load_relaxed_64(ptr, ret) \ + asm volatile("ld.relaxed." __simt_scope ".b64 %0, [%1];" \ + : "=l"(ret) \ + : "l"(ptr) \ + : "memory") +#define __simt_store_release_64(ptr, desired) \ + asm volatile("st.release." __simt_scope ".b64 [%0], %1;" ::"l"(ptr), \ + "l"(desired) \ + : "memory") +#define __simt_store_relaxed_64(ptr, desired) \ + asm volatile("st.relaxed." __simt_scope ".b64 [%0], %1;" ::"l"(ptr), \ + "l"(desired) \ + : "memory") +#define __simt_exch_release_64(ptr, old, desired) \ + asm volatile("atom.exch.release." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(desired) \ + : "memory") +#define __simt_exch_acquire_64(ptr, old, desired) \ + asm volatile("atom.exch.acquire." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(desired) \ + : "memory") +#define __simt_exch_acq_rel_64(ptr, old, desired) \ + asm volatile("atom.exch.acq_rel." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(desired) \ + : "memory") +#define __simt_exch_relaxed_64(ptr, old, desired) \ + asm volatile("atom.exch.relaxed." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(desired) \ + : "memory") +#define __simt_cas_release_64(ptr, old, expected, desired) \ + asm volatile("atom.cas.release." __simt_scope ".b64 %0, [%1], %2, %3;" \ + : "=l"(old) \ + : "l"(ptr), "l"(expected), "l"(desired) \ + : "memory") +#define __simt_cas_acquire_64(ptr, old, expected, desired) \ + asm volatile("atom.cas.acquire." __simt_scope ".b64 %0, [%1], %2, %3;" \ + : "=l"(old) \ + : "l"(ptr), "l"(expected), "l"(desired) \ + : "memory") +#define __simt_cas_acq_rel_64(ptr, old, expected, desired) \ + asm volatile("atom.cas.acq_rel." __simt_scope ".b64 %0, [%1], %2, %3;" \ + : "=l"(old) \ + : "l"(ptr), "l"(expected), "l"(desired) \ + : "memory") +#define __simt_cas_relaxed_64(ptr, old, expected, desired) \ + asm volatile("atom.cas.relaxed." __simt_scope ".b64 %0, [%1], %2, %3;" \ + : "=l"(old) \ + : "l"(ptr), "l"(expected), "l"(desired) \ + : "memory") +#define __simt_add_release_64(ptr, old, addend) \ + asm volatile("atom.add.release." __simt_scope ".u64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(addend) \ + : "memory") +#define __simt_add_acquire_64(ptr, old, addend) \ + asm volatile("atom.add.acquire." __simt_scope ".u64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(addend) \ + : "memory") +#define __simt_add_acq_rel_64(ptr, old, addend) \ + asm volatile("atom.add.acq_rel." __simt_scope ".u64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(addend) \ + : "memory") +#define __simt_add_relaxed_64(ptr, old, addend) \ + asm volatile("atom.add.relaxed." __simt_scope ".u64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(addend) \ + : "memory") +#define __simt_and_release_64(ptr, old, andend) \ + asm volatile("atom.and.release." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(andend) \ + : "memory") +#define __simt_and_acquire_64(ptr, old, andend) \ + asm volatile("atom.and.acquire." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(andend) \ + : "memory") +#define __simt_and_acq_rel_64(ptr, old, andend) \ + asm volatile("atom.and.acq_rel." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(andend) \ + : "memory") +#define __simt_and_relaxed_64(ptr, old, andend) \ + asm volatile("atom.and.relaxed." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(andend) \ + : "memory") +#define __simt_or_release_64(ptr, old, orend) \ + asm volatile("atom.or.release." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(orend) \ + : "memory") +#define __simt_or_acquire_64(ptr, old, orend) \ + asm volatile("atom.or.acquire." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(orend) \ + : "memory") +#define __simt_or_acq_rel_64(ptr, old, orend) \ + asm volatile("atom.or.acq_rel." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(orend) \ + : "memory") +#define __simt_or_relaxed_64(ptr, old, orend) \ + asm volatile("atom.or.relaxed." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(orend) \ + : "memory") +#define __simt_xor_release_64(ptr, old, xorend) \ + asm volatile("atom.xor.release." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(xorend) \ + : "memory") +#define __simt_xor_acquire_64(ptr, old, xorend) \ + asm volatile("atom.xor.acquire." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(xorend) \ + : "memory") +#define __simt_xor_acq_rel_64(ptr, old, xorend) \ + asm volatile("atom.xor.acq_rel." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(xorend) \ + : "memory") +#define __simt_xor_relaxed_64(ptr, old, xorend) \ + asm volatile("atom.xor.relaxed." __simt_scope ".b64 %0, [%1], %2;" \ + : "=l"(old) \ + : "l"(ptr), "l"(xorend) \ + : "memory") -#define __simt_nanosleep(timeout) asm volatile("nanosleep.u32 %0;" :: "r"(unsigned(timeout)) : ) +#define __simt_nanosleep(timeout) \ + asm volatile("nanosleep.u32 %0;" ::"r"(unsigned(timeout)) :) /* definitions @@ -189,309 +438,355 @@ namespace Impl { #endif inline __device__ int __stronger_order_simt_(int a, int b) { - if (b == __ATOMIC_SEQ_CST) return __ATOMIC_SEQ_CST; - if (b == __ATOMIC_RELAXED) return a; - switch (a) { + if (b == __ATOMIC_SEQ_CST) return __ATOMIC_SEQ_CST; + if (b == __ATOMIC_RELAXED) return a; + switch (a) { case __ATOMIC_SEQ_CST: case __ATOMIC_ACQ_REL: return a; case __ATOMIC_CONSUME: - case __ATOMIC_ACQUIRE: if (b != __ATOMIC_ACQUIRE) return __ATOMIC_ACQ_REL; else return __ATOMIC_ACQUIRE; - case __ATOMIC_RELEASE: if (b != __ATOMIC_RELEASE) return __ATOMIC_ACQ_REL; else return __ATOMIC_RELEASE; + case __ATOMIC_ACQUIRE: + if (b != __ATOMIC_ACQUIRE) + return __ATOMIC_ACQ_REL; + else + return __ATOMIC_ACQUIRE; + case __ATOMIC_RELEASE: + if (b != __ATOMIC_RELEASE) + return __ATOMIC_ACQ_REL; + else + return __ATOMIC_RELEASE; case __ATOMIC_RELAXED: return b; default: assert(0); - } - return __ATOMIC_SEQ_CST; + } + return __ATOMIC_SEQ_CST; } /* base */ -#define DO__atomic_load_simt_(bytes, bits) \ -template::type = 0> \ -void __device__ __atomic_load_simt_ (const type *ptr, type *ret, int memorder) { \ - int##bits##_t tmp = 0; \ - switch (memorder) { \ - case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ - case __ATOMIC_CONSUME: \ - case __ATOMIC_ACQUIRE: __simt_load_acquire_##bits(ptr, tmp); break; \ - case __ATOMIC_RELAXED: __simt_load_relaxed_##bits(ptr, tmp); break; \ - default: assert(0); \ - } \ - memcpy(ret, &tmp, bytes); \ -} -DO__atomic_load_simt_(1,32) -DO__atomic_load_simt_(2,16) -DO__atomic_load_simt_(4,32) -DO__atomic_load_simt_(8,64) +#define DO__atomic_load_simt_(bytes, bits) \ + template ::type = 0> \ + void __device__ __atomic_load_simt_(const type *ptr, type *ret, \ + int memorder) { \ + int##bits##_t tmp = 0; \ + switch (memorder) { \ + case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ + case __ATOMIC_CONSUME: \ + case __ATOMIC_ACQUIRE: __simt_load_acquire_##bits(ptr, tmp); break; \ + case __ATOMIC_RELAXED: __simt_load_relaxed_##bits(ptr, tmp); break; \ + default: assert(0); \ + } \ + memcpy(ret, &tmp, bytes); \ + } +DO__atomic_load_simt_(1, 32) DO__atomic_load_simt_(2, 16) + DO__atomic_load_simt_(4, 32) DO__atomic_load_simt_(8, 64) -template -type __device__ __atomic_load_n_simt_(const type *ptr, int memorder) { - type ret; - __atomic_load_simt_(ptr, &ret, memorder); - return ret; + template + type __device__ __atomic_load_n_simt_(const type *ptr, int memorder) { + type ret; + __atomic_load_simt_(ptr, &ret, memorder); + return ret; } -#define DO__atomic_store_simt_(bytes, bits) \ -template::type = 0> \ -void __device__ __atomic_store_simt_ (type *ptr, type *val, int memorder) { \ - int##bits##_t tmp = 0; \ - memcpy(&tmp, val, bytes); \ - switch (memorder) { \ - case __ATOMIC_RELEASE: __simt_store_release_##bits(ptr, tmp); break; \ - case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ - case __ATOMIC_RELAXED: __simt_store_relaxed_##bits(ptr, tmp); break; \ - default: assert(0); \ - } \ -} -DO__atomic_store_simt_(1,32) -DO__atomic_store_simt_(2,16) -DO__atomic_store_simt_(4,32) -DO__atomic_store_simt_(8,64) +#define DO__atomic_store_simt_(bytes, bits) \ + template ::type = 0> \ + void __device__ __atomic_store_simt_(type *ptr, type *val, int memorder) { \ + int##bits##_t tmp = 0; \ + memcpy(&tmp, val, bytes); \ + switch (memorder) { \ + case __ATOMIC_RELEASE: __simt_store_release_##bits(ptr, tmp); break; \ + case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ + case __ATOMIC_RELAXED: __simt_store_relaxed_##bits(ptr, tmp); break; \ + default: assert(0); \ + } \ + } +DO__atomic_store_simt_(1, 32) DO__atomic_store_simt_(2, 16) + DO__atomic_store_simt_(4, 32) DO__atomic_store_simt_(8, 64) -template -void __device__ __atomic_store_n_simt_(type *ptr, type val, int memorder) { - __atomic_store_simt_(ptr, &val, memorder); + template + void __device__ + __atomic_store_n_simt_(type *ptr, type val, int memorder) { + __atomic_store_simt_(ptr, &val, memorder); } -#define DO__atomic_compare_exchange_simt_(bytes, bits) \ -template::type = 0> \ -bool __device__ __atomic_compare_exchange_simt_ (type *ptr, type *expected, const type *desired, bool, int success_memorder, int failure_memorder) { \ - int##bits##_t tmp = 0, old = 0, old_tmp; \ - memcpy(&tmp, desired, bytes); \ - memcpy(&old, expected, bytes); \ - old_tmp = old; \ - switch (__stronger_order_simt_(success_memorder, failure_memorder)) { \ - case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ - case __ATOMIC_CONSUME: \ - case __ATOMIC_ACQUIRE: __simt_cas_acquire_##bits(ptr, old, old_tmp, tmp); break; \ - case __ATOMIC_ACQ_REL: __simt_cas_acq_rel_##bits(ptr, old, old_tmp, tmp); break; \ - case __ATOMIC_RELEASE: __simt_cas_release_##bits(ptr, old, old_tmp, tmp); break; \ - case __ATOMIC_RELAXED: __simt_cas_relaxed_##bits(ptr, old, old_tmp, tmp); break; \ - default: assert(0); \ - } \ - bool const ret = old == old_tmp; \ - memcpy(expected, &old, bytes); \ - return ret; \ -} +#define DO__atomic_compare_exchange_simt_(bytes, bits) \ + template ::type = 0> \ + bool __device__ __atomic_compare_exchange_simt_( \ + type *ptr, type *expected, const type *desired, bool, \ + int success_memorder, int failure_memorder) { \ + int##bits##_t tmp = 0, old = 0, old_tmp; \ + memcpy(&tmp, desired, bytes); \ + memcpy(&old, expected, bytes); \ + old_tmp = old; \ + switch (__stronger_order_simt_(success_memorder, failure_memorder)) { \ + case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ + case __ATOMIC_CONSUME: \ + case __ATOMIC_ACQUIRE: \ + __simt_cas_acquire_##bits(ptr, old, old_tmp, tmp); \ + break; \ + case __ATOMIC_ACQ_REL: \ + __simt_cas_acq_rel_##bits(ptr, old, old_tmp, tmp); \ + break; \ + case __ATOMIC_RELEASE: \ + __simt_cas_release_##bits(ptr, old, old_tmp, tmp); \ + break; \ + case __ATOMIC_RELAXED: \ + __simt_cas_relaxed_##bits(ptr, old, old_tmp, tmp); \ + break; \ + default: assert(0); \ + } \ + bool const ret = old == old_tmp; \ + memcpy(expected, &old, bytes); \ + return ret; \ + } DO__atomic_compare_exchange_simt_(4, 32) -DO__atomic_compare_exchange_simt_(8, 64) + DO__atomic_compare_exchange_simt_(8, 64) -template::type = 0> \ -bool __device__ __atomic_compare_exchange_simt_(type *ptr, type *expected, const type *desired, bool, int success_memorder, int failure_memorder) { + template ::type = 0> + bool __device__ + __atomic_compare_exchange_simt_(type *ptr, type *expected, + const type *desired, bool, + int success_memorder, + int failure_memorder) { + using R = typename std::conditional::value, + volatile uint32_t, uint32_t>::type; + auto const aligned = (R *)((intptr_t)ptr & ~(sizeof(uint32_t) - 1)); + auto const offset = uint32_t((intptr_t)ptr & (sizeof(uint32_t) - 1)) * 8; + auto const mask = ((1 << sizeof(type) * 8) - 1) << offset; - using R = typename std::conditional::value, volatile uint32_t, uint32_t>::type; - auto const aligned = (R*)((intptr_t)ptr & ~(sizeof(uint32_t) - 1)); - auto const offset = uint32_t((intptr_t)ptr & (sizeof(uint32_t) - 1)) * 8; - auto const mask = ((1 << sizeof(type)*8) - 1) << offset; - - uint32_t old = *expected << offset, old_value; - while (1) { - old_value = (old & mask) >> offset; - if (old_value != *expected) - break; - uint32_t const attempt = (old & ~mask) | (*desired << offset); - if (__atomic_compare_exchange_simt_ (aligned, &old, &attempt, true, success_memorder, failure_memorder)) - return true; - } - *expected = old_value; - return false; + uint32_t old = *expected << offset, old_value; + while (1) { + old_value = (old & mask) >> offset; + if (old_value != *expected) break; + uint32_t const attempt = (old & ~mask) | (*desired << offset); + if (__atomic_compare_exchange_simt_(aligned, &old, &attempt, true, + success_memorder, failure_memorder)) + return true; + } + *expected = old_value; + return false; } -template -bool __device__ __atomic_compare_exchange_n_simt_(type *ptr, type *expected, type desired, bool weak, int success_memorder, int failure_memorder) { - return __atomic_compare_exchange_simt_(ptr, expected, &desired, weak, success_memorder, failure_memorder); +template +bool __device__ __atomic_compare_exchange_n_simt_(type *ptr, type *expected, + type desired, bool weak, + int success_memorder, + int failure_memorder) { + return __atomic_compare_exchange_simt_(ptr, expected, &desired, weak, + success_memorder, failure_memorder); } -#define DO__atomic_exchange_simt_(bytes, bits) \ -template::type = 0> \ -void __device__ __atomic_exchange_simt_ (type *ptr, type *val, type *ret, int memorder) { \ - int##bits##_t tmp = 0; \ - memcpy(&tmp, val, bytes); \ - switch (memorder) { \ - case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ - case __ATOMIC_CONSUME: \ - case __ATOMIC_ACQUIRE: __simt_exch_acquire_##bits(ptr, tmp, tmp); break; \ - case __ATOMIC_ACQ_REL: __simt_exch_acq_rel_##bits(ptr, tmp, tmp); break; \ - case __ATOMIC_RELEASE: __simt_exch_release_##bits(ptr, tmp, tmp); break; \ - case __ATOMIC_RELAXED: __simt_exch_relaxed_##bits(ptr, tmp, tmp); break; \ - default: assert(0); \ - } \ - memcpy(ret, &tmp, bytes); \ -} -DO__atomic_exchange_simt_(4,32) -DO__atomic_exchange_simt_(8,64) +#define DO__atomic_exchange_simt_(bytes, bits) \ + template ::type = 0> \ + void __device__ __atomic_exchange_simt_(type *ptr, type *val, type *ret, \ + int memorder) { \ + int##bits##_t tmp = 0; \ + memcpy(&tmp, val, bytes); \ + switch (memorder) { \ + case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ + case __ATOMIC_CONSUME: \ + case __ATOMIC_ACQUIRE: __simt_exch_acquire_##bits(ptr, tmp, tmp); break; \ + case __ATOMIC_ACQ_REL: __simt_exch_acq_rel_##bits(ptr, tmp, tmp); break; \ + case __ATOMIC_RELEASE: __simt_exch_release_##bits(ptr, tmp, tmp); break; \ + case __ATOMIC_RELAXED: __simt_exch_relaxed_##bits(ptr, tmp, tmp); break; \ + default: assert(0); \ + } \ + memcpy(ret, &tmp, bytes); \ + } +DO__atomic_exchange_simt_(4, 32) DO__atomic_exchange_simt_(8, 64) -template::type = 0> -void __device__ __atomic_exchange_simt_ (type *ptr, type *val, type *ret, int memorder) { - - type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); - while(!__atomic_compare_exchange_simt_(ptr, &expected, val, true, memorder, memorder)) - ; - *ret = expected; + template ::type = 0> + void __device__ + __atomic_exchange_simt_(type *ptr, type *val, type *ret, int memorder) { + type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); + while (!__atomic_compare_exchange_simt_(ptr, &expected, val, true, memorder, + memorder)) + ; + *ret = expected; } -template +template type __device__ __atomic_exchange_n_simt_(type *ptr, type val, int memorder) { - type ret; - __atomic_exchange_simt_(ptr, &val, &ret, memorder); - return ret; + type ret; + __atomic_exchange_simt_(ptr, &val, &ret, memorder); + return ret; } -#define DO__atomic_fetch_add_simt_(bytes, bits) \ -template::type = 0> \ -type __device__ __atomic_fetch_add_simt_ (type *ptr, delta val, int memorder) { \ - type ret; \ - switch (memorder) { \ - case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ - case __ATOMIC_CONSUME: \ - case __ATOMIC_ACQUIRE: __simt_add_acquire_##bits(ptr, ret, val); break; \ - case __ATOMIC_ACQ_REL: __simt_add_acq_rel_##bits(ptr, ret, val); break; \ - case __ATOMIC_RELEASE: __simt_add_release_##bits(ptr, ret, val); break; \ - case __ATOMIC_RELAXED: __simt_add_relaxed_##bits(ptr, ret, val); break; \ - default: assert(0); \ - } \ - return ret; \ -} -DO__atomic_fetch_add_simt_(4, 32) -DO__atomic_fetch_add_simt_(8, 64) +#define DO__atomic_fetch_add_simt_(bytes, bits) \ + template ::type = 0> \ + type __device__ __atomic_fetch_add_simt_(type *ptr, delta val, \ + int memorder) { \ + type ret; \ + switch (memorder) { \ + case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ + case __ATOMIC_CONSUME: \ + case __ATOMIC_ACQUIRE: __simt_add_acquire_##bits(ptr, ret, val); break; \ + case __ATOMIC_ACQ_REL: __simt_add_acq_rel_##bits(ptr, ret, val); break; \ + case __ATOMIC_RELEASE: __simt_add_release_##bits(ptr, ret, val); break; \ + case __ATOMIC_RELAXED: __simt_add_relaxed_##bits(ptr, ret, val); break; \ + default: assert(0); \ + } \ + return ret; \ + } +DO__atomic_fetch_add_simt_(4, 32) DO__atomic_fetch_add_simt_(8, 64) -template::type = 0> -type __device__ __atomic_fetch_add_simt_ (type *ptr, delta val, int memorder) { - - type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); - type const desired = expected + val; - while(!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, memorder, memorder)) - ; - return expected; + template ::type = 0> + type __device__ + __atomic_fetch_add_simt_(type *ptr, delta val, int memorder) { + type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); + type const desired = expected + val; + while (!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, + memorder, memorder)) + ; + return expected; } -#define DO__atomic_fetch_sub_simt_(bytes, bits) \ -template::type = 0> \ -type __device__ __atomic_fetch_sub_simt_ (type *ptr, delta val, int memorder) { \ - type ret; \ - switch (memorder) { \ - case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ - case __ATOMIC_CONSUME: \ - case __ATOMIC_ACQUIRE: __simt_add_acquire_##bits(ptr, ret, -val); break; \ - case __ATOMIC_ACQ_REL: __simt_add_acq_rel_##bits(ptr, ret, -val); break; \ - case __ATOMIC_RELEASE: __simt_add_release_##bits(ptr, ret, -val); break; \ - case __ATOMIC_RELAXED: __simt_add_relaxed_##bits(ptr, ret, -val); break; \ - default: assert(0); \ - } \ - return ret; \ -} -DO__atomic_fetch_sub_simt_(4,32) -DO__atomic_fetch_sub_simt_(8,64) +#define DO__atomic_fetch_sub_simt_(bytes, bits) \ + template ::type = 0> \ + type __device__ __atomic_fetch_sub_simt_(type *ptr, delta val, \ + int memorder) { \ + type ret; \ + switch (memorder) { \ + case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ + case __ATOMIC_CONSUME: \ + case __ATOMIC_ACQUIRE: __simt_add_acquire_##bits(ptr, ret, -val); break; \ + case __ATOMIC_ACQ_REL: __simt_add_acq_rel_##bits(ptr, ret, -val); break; \ + case __ATOMIC_RELEASE: __simt_add_release_##bits(ptr, ret, -val); break; \ + case __ATOMIC_RELAXED: __simt_add_relaxed_##bits(ptr, ret, -val); break; \ + default: assert(0); \ + } \ + return ret; \ + } +DO__atomic_fetch_sub_simt_(4, 32) DO__atomic_fetch_sub_simt_(8, 64) -template::type = 0> -type __device__ __atomic_fetch_sub_simt_ (type *ptr, delta val, int memorder) { - - type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); - type const desired = expected - val; - while(!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, memorder, memorder)) - ; - return expected; + template ::type = 0> + type __device__ + __atomic_fetch_sub_simt_(type *ptr, delta val, int memorder) { + type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); + type const desired = expected - val; + while (!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, + memorder, memorder)) + ; + return expected; } -#define DO__atomic_fetch_and_simt_(bytes, bits) \ -template::type = 0> \ -type __device__ __atomic_fetch_and_simt_ (type *ptr, type val, int memorder) { \ - type ret; \ - switch (memorder) { \ - case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ - case __ATOMIC_CONSUME: \ - case __ATOMIC_ACQUIRE: __simt_and_acquire_##bits(ptr, ret, val); break; \ - case __ATOMIC_ACQ_REL: __simt_and_acq_rel_##bits(ptr, ret, val); break; \ - case __ATOMIC_RELEASE: __simt_and_release_##bits(ptr, ret, val); break; \ - case __ATOMIC_RELAXED: __simt_and_relaxed_##bits(ptr, ret, val); break; \ - default: assert(0); \ - } \ - return ret; \ -} -DO__atomic_fetch_and_simt_(4,32) -DO__atomic_fetch_and_simt_(8,64) +#define DO__atomic_fetch_and_simt_(bytes, bits) \ + template ::type = 0> \ + type __device__ __atomic_fetch_and_simt_(type *ptr, type val, \ + int memorder) { \ + type ret; \ + switch (memorder) { \ + case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ + case __ATOMIC_CONSUME: \ + case __ATOMIC_ACQUIRE: __simt_and_acquire_##bits(ptr, ret, val); break; \ + case __ATOMIC_ACQ_REL: __simt_and_acq_rel_##bits(ptr, ret, val); break; \ + case __ATOMIC_RELEASE: __simt_and_release_##bits(ptr, ret, val); break; \ + case __ATOMIC_RELAXED: __simt_and_relaxed_##bits(ptr, ret, val); break; \ + default: assert(0); \ + } \ + return ret; \ + } +DO__atomic_fetch_and_simt_(4, 32) DO__atomic_fetch_and_simt_(8, 64) -template::type = 0> -type __device__ __atomic_fetch_and_simt_ (type *ptr, delta val, int memorder) { - - type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); - type const desired = expected & val; - while(!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, memorder, memorder)) - ; - return expected; + template ::type = 0> + type __device__ + __atomic_fetch_and_simt_(type *ptr, delta val, int memorder) { + type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); + type const desired = expected & val; + while (!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, + memorder, memorder)) + ; + return expected; } -#define DO__atomic_fetch_xor_simt_(bytes, bits) \ -template::type = 0> \ -type __device__ __atomic_fetch_xor_simt_ (type *ptr, type val, int memorder) { \ - type ret; \ - switch (memorder) { \ - case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ - case __ATOMIC_CONSUME: \ - case __ATOMIC_ACQUIRE: __simt_xor_acquire_##bits(ptr, ret, val); break; \ - case __ATOMIC_ACQ_REL: __simt_xor_acq_rel_##bits(ptr, ret, val); break; \ - case __ATOMIC_RELEASE: __simt_xor_release_##bits(ptr, ret, val); break; \ - case __ATOMIC_RELAXED: __simt_xor_relaxed_##bits(ptr, ret, val); break; \ - default: assert(0); \ - } \ - return ret; \ -} -DO__atomic_fetch_xor_simt_(4,32) -DO__atomic_fetch_xor_simt_(8,64) +#define DO__atomic_fetch_xor_simt_(bytes, bits) \ + template ::type = 0> \ + type __device__ __atomic_fetch_xor_simt_(type *ptr, type val, \ + int memorder) { \ + type ret; \ + switch (memorder) { \ + case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ + case __ATOMIC_CONSUME: \ + case __ATOMIC_ACQUIRE: __simt_xor_acquire_##bits(ptr, ret, val); break; \ + case __ATOMIC_ACQ_REL: __simt_xor_acq_rel_##bits(ptr, ret, val); break; \ + case __ATOMIC_RELEASE: __simt_xor_release_##bits(ptr, ret, val); break; \ + case __ATOMIC_RELAXED: __simt_xor_relaxed_##bits(ptr, ret, val); break; \ + default: assert(0); \ + } \ + return ret; \ + } +DO__atomic_fetch_xor_simt_(4, 32) DO__atomic_fetch_xor_simt_(8, 64) -template::type = 0> -type __device__ __atomic_fetch_xor_simt_ (type *ptr, delta val, int memorder) { - - type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); - type const desired = expected ^ val; - while(!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, memorder, memorder)) - ; - return expected; + template ::type = 0> + type __device__ + __atomic_fetch_xor_simt_(type *ptr, delta val, int memorder) { + type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); + type const desired = expected ^ val; + while (!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, + memorder, memorder)) + ; + return expected; } -#define DO__atomic_fetch_or_simt_(bytes, bits) \ -template::type = 0> \ -type __device__ __atomic_fetch_or_simt_ (type *ptr, type val, int memorder) { \ - type ret; \ - switch (memorder) { \ - case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ - case __ATOMIC_CONSUME: \ - case __ATOMIC_ACQUIRE: __simt_or_acquire_##bits(ptr, ret, val); break; \ - case __ATOMIC_ACQ_REL: __simt_or_acq_rel_##bits(ptr, ret, val); break; \ - case __ATOMIC_RELEASE: __simt_or_release_##bits(ptr, ret, val); break; \ - case __ATOMIC_RELAXED: __simt_or_relaxed_##bits(ptr, ret, val); break; \ - default: assert(0); \ - } \ - return ret; \ -} -DO__atomic_fetch_or_simt_(4,32) -DO__atomic_fetch_or_simt_(8,64) +#define DO__atomic_fetch_or_simt_(bytes, bits) \ + template ::type = 0> \ + type __device__ __atomic_fetch_or_simt_(type *ptr, type val, int memorder) { \ + type ret; \ + switch (memorder) { \ + case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \ + case __ATOMIC_CONSUME: \ + case __ATOMIC_ACQUIRE: __simt_or_acquire_##bits(ptr, ret, val); break; \ + case __ATOMIC_ACQ_REL: __simt_or_acq_rel_##bits(ptr, ret, val); break; \ + case __ATOMIC_RELEASE: __simt_or_release_##bits(ptr, ret, val); break; \ + case __ATOMIC_RELAXED: __simt_or_relaxed_##bits(ptr, ret, val); break; \ + default: assert(0); \ + } \ + return ret; \ + } +DO__atomic_fetch_or_simt_(4, 32) DO__atomic_fetch_or_simt_(8, 64) -template::type = 0> -type __device__ __atomic_fetch_or_simt_ (type *ptr, delta val, int memorder) { - - type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); - type const desired = expected | val; - while(!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, memorder, memorder)) - ; - return expected; + template ::type = 0> + type __device__ + __atomic_fetch_or_simt_(type *ptr, delta val, int memorder) { + type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED); + type const desired = expected | val; + while (!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, + memorder, memorder)) + ; + return expected; } -template +template inline bool __device__ __atomic_test_and_set_simt_(type *ptr, int memorder) { - return __atomic_exchange_n_simt_((char*)ptr, (char)1, memorder) == 1; + return __atomic_exchange_n_simt_((char *)ptr, (char)1, memorder) == 1; } -template +template inline void __device__ __atomic_clear_simt_(type *ptr, int memorder) { - return __atomic_store_n_simt_((char*)ptr, (char)0, memorder); + return __atomic_store_n_simt_((char *)ptr, (char)0, memorder); } -inline constexpr __device__ bool __atomic_always_lock_free_simt_ (size_t size, void *) { - return size <= 8; +inline constexpr __device__ bool __atomic_always_lock_free_simt_(size_t size, + void *) { + return size <= 8; } -inline __device__ bool __atomic_is_lock_free_simt_(size_t size, void * ptr) { - return __atomic_always_lock_free_simt_(size, ptr); +inline __device__ bool __atomic_is_lock_free_simt_(size_t size, void *ptr) { + return __atomic_always_lock_free_simt_(size, ptr); } /* @@ -499,7 +794,7 @@ inline __device__ bool __atomic_is_lock_free_simt_(size_t size, void * ptr) { */ inline void __device__ __atomic_thread_fence_simt(int memorder) { - switch (memorder) { + switch (memorder) { case __ATOMIC_SEQ_CST: __simt_fence_sc_(); break; case __ATOMIC_CONSUME: case __ATOMIC_ACQUIRE: @@ -507,124 +802,184 @@ inline void __device__ __atomic_thread_fence_simt(int memorder) { case __ATOMIC_RELEASE: __simt_fence_(); break; case __ATOMIC_RELAXED: break; default: assert(0); - } + } } -inline void __device__ __atomic_signal_fence_simt(int memorder) { - __atomic_thread_fence_simt(memorder); +inline void __device__ __atomic_signal_fence_simt(int memorder) { + __atomic_thread_fence_simt(memorder); } /* non-volatile */ -template type __device__ __atomic_load_n_simt(const type *ptr, int memorder) { - return __atomic_load_n_simt_(const_cast(ptr), memorder); +template +type __device__ __atomic_load_n_simt(const type *ptr, int memorder) { + return __atomic_load_n_simt_(const_cast(ptr), memorder); } -template void __device__ __atomic_load_simt(const type *ptr, type *ret, int memorder) { - __atomic_load_simt_(const_cast(ptr), ret, memorder); +template +void __device__ __atomic_load_simt(const type *ptr, type *ret, int memorder) { + __atomic_load_simt_(const_cast(ptr), ret, memorder); } -template void __device__ __atomic_store_n_simt(type *ptr, type val, int memorder) { - __atomic_store_n_simt_(const_cast(ptr), val, memorder); +template +void __device__ __atomic_store_n_simt(type *ptr, type val, int memorder) { + __atomic_store_n_simt_(const_cast(ptr), val, memorder); } -template void __device__ __atomic_store_simt(type *ptr, type *val, int memorder) { - __atomic_store_simt_(const_cast(ptr), val, memorder); +template +void __device__ __atomic_store_simt(type *ptr, type *val, int memorder) { + __atomic_store_simt_(const_cast(ptr), val, memorder); } -template type __device__ __atomic_exchange_n_simt(type *ptr, type val, int memorder) { - return __atomic_exchange_n_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_exchange_n_simt(type *ptr, type val, int memorder) { + return __atomic_exchange_n_simt_(const_cast(ptr), val, memorder); } -template void __device__ __atomic_exchange_simt(type *ptr, type *val, type *ret, int memorder) { - __atomic_exchange_simt_(const_cast(ptr), val, ret, memorder); +template +void __device__ __atomic_exchange_simt(type *ptr, type *val, type *ret, + int memorder) { + __atomic_exchange_simt_(const_cast(ptr), val, ret, memorder); } -template bool __device__ __atomic_compare_exchange_n_simt(type *ptr, type *expected, type desired, bool weak, int success_memorder, int failure_memorder) { - return __atomic_compare_exchange_n_simt_(const_cast(ptr), expected, desired, weak, success_memorder, failure_memorder); +template +bool __device__ __atomic_compare_exchange_n_simt(type *ptr, type *expected, + type desired, bool weak, + int success_memorder, + int failure_memorder) { + return __atomic_compare_exchange_n_simt_(const_cast(ptr), expected, + desired, weak, success_memorder, + failure_memorder); } -template bool __device__ __atomic_compare_exchange_simt(type *ptr, type *expected, type *desired, bool weak, int success_memorder, int failure_memorder) { - return __atomic_compare_exchange_simt_(const_cast(ptr), expected, desired, weak, success_memorder, failure_memorder); +template +bool __device__ __atomic_compare_exchange_simt(type *ptr, type *expected, + type *desired, bool weak, + int success_memorder, + int failure_memorder) { + return __atomic_compare_exchange_simt_(const_cast(ptr), expected, + desired, weak, success_memorder, + failure_memorder); } -template type __device__ __atomic_fetch_add_simt(type *ptr, delta val, int memorder) { - return __atomic_fetch_add_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_fetch_add_simt(type *ptr, delta val, int memorder) { + return __atomic_fetch_add_simt_(const_cast(ptr), val, memorder); } -template type __device__ __atomic_fetch_sub_simt(type *ptr, delta val, int memorder) { - return __atomic_fetch_sub_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_fetch_sub_simt(type *ptr, delta val, int memorder) { + return __atomic_fetch_sub_simt_(const_cast(ptr), val, memorder); } -template type __device__ __atomic_fetch_and_simt(type *ptr, type val, int memorder) { - return __atomic_fetch_and_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_fetch_and_simt(type *ptr, type val, int memorder) { + return __atomic_fetch_and_simt_(const_cast(ptr), val, memorder); } -template type __device__ __atomic_fetch_xor_simt(type *ptr, type val, int memorder) { - return __atomic_fetch_xor_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_fetch_xor_simt(type *ptr, type val, int memorder) { + return __atomic_fetch_xor_simt_(const_cast(ptr), val, memorder); } -template type __device__ __atomic_fetch_or_simt(type *ptr, type val, int memorder) { - return __atomic_fetch_or_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_fetch_or_simt(type *ptr, type val, int memorder) { + return __atomic_fetch_or_simt_(const_cast(ptr), val, memorder); } -template bool __device__ __atomic_test_and_set_simt(void *ptr, int memorder) { - return __atomic_test_and_set_simt_(const_cast(ptr), memorder); +template +bool __device__ __atomic_test_and_set_simt(void *ptr, int memorder) { + return __atomic_test_and_set_simt_(const_cast(ptr), memorder); } -template void __device__ __atomic_clear_simt(void *ptr, int memorder) { - return __atomic_clear_simt_(const_cast(ptr), memorder); +template +void __device__ __atomic_clear_simt(void *ptr, int memorder) { + return __atomic_clear_simt_(const_cast(ptr), memorder); } inline bool __device__ __atomic_always_lock_free_simt(size_t size, void *ptr) { - return __atomic_always_lock_free_simt_(size, const_cast(ptr)); + return __atomic_always_lock_free_simt_(size, const_cast(ptr)); } inline bool __device__ __atomic_is_lock_free_simt(size_t size, void *ptr) { - return __atomic_is_lock_free_simt_(size, const_cast(ptr)); + return __atomic_is_lock_free_simt_(size, const_cast(ptr)); } /* - volatile + volatile */ -template type __device__ __atomic_load_n_simt(const volatile type *ptr, int memorder) { - return __atomic_load_n_simt_(const_cast(ptr), memorder); +template +type __device__ __atomic_load_n_simt(const volatile type *ptr, int memorder) { + return __atomic_load_n_simt_(const_cast(ptr), memorder); } -template void __device__ __atomic_load_simt(const volatile type *ptr, type *ret, int memorder) { - __atomic_load_simt_(const_cast(ptr), ret, memorder); +template +void __device__ __atomic_load_simt(const volatile type *ptr, type *ret, + int memorder) { + __atomic_load_simt_(const_cast(ptr), ret, memorder); } -template void __device__ __atomic_store_n_simt(volatile type *ptr, type val, int memorder) { - __atomic_store_n_simt_(const_cast(ptr), val, memorder); +template +void __device__ __atomic_store_n_simt(volatile type *ptr, type val, + int memorder) { + __atomic_store_n_simt_(const_cast(ptr), val, memorder); } -template void __device__ __atomic_store_simt(volatile type *ptr, type *val, int memorder) { - __atomic_store_simt_(const_cast(ptr), val, memorder); +template +void __device__ __atomic_store_simt(volatile type *ptr, type *val, + int memorder) { + __atomic_store_simt_(const_cast(ptr), val, memorder); } -template type __device__ __atomic_exchange_n_simt(volatile type *ptr, type val, int memorder) { - return __atomic_exchange_n_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_exchange_n_simt(volatile type *ptr, type val, + int memorder) { + return __atomic_exchange_n_simt_(const_cast(ptr), val, memorder); } -template void __device__ __atomic_exchange_simt(volatile type *ptr, type *val, type *ret, int memorder) { - __atomic_exchange_simt_(const_cast(ptr), val, ret, memorder); +template +void __device__ __atomic_exchange_simt(volatile type *ptr, type *val, type *ret, + int memorder) { + __atomic_exchange_simt_(const_cast(ptr), val, ret, memorder); } -template bool __device__ __atomic_compare_exchange_n_simt(volatile type *ptr, type *expected, type desired, bool weak, int success_memorder, int failure_memorder) { - return __atomic_compare_exchange_n_simt_(const_cast(ptr), expected, desired, weak, success_memorder, failure_memorder); +template +bool __device__ __atomic_compare_exchange_n_simt(volatile type *ptr, + type *expected, type desired, + bool weak, + int success_memorder, + int failure_memorder) { + return __atomic_compare_exchange_n_simt_(const_cast(ptr), expected, + desired, weak, success_memorder, + failure_memorder); } -template bool __device__ __atomic_compare_exchange_simt(volatile type *ptr, type *expected, type *desired, bool weak, int success_memorder, int failure_memorder) { - return __atomic_compare_exchange_simt_(const_cast(ptr), expected, desired, weak, success_memorder, failure_memorder); +template +bool __device__ __atomic_compare_exchange_simt(volatile type *ptr, + type *expected, type *desired, + bool weak, int success_memorder, + int failure_memorder) { + return __atomic_compare_exchange_simt_(const_cast(ptr), expected, + desired, weak, success_memorder, + failure_memorder); } -template type __device__ __atomic_fetch_add_simt(volatile type *ptr, delta val, int memorder) { - return __atomic_fetch_add_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_fetch_add_simt(volatile type *ptr, delta val, + int memorder) { + return __atomic_fetch_add_simt_(const_cast(ptr), val, memorder); } -template type __device__ __atomic_fetch_sub_simt(volatile type *ptr, delta val, int memorder) { - return __atomic_fetch_sub_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_fetch_sub_simt(volatile type *ptr, delta val, + int memorder) { + return __atomic_fetch_sub_simt_(const_cast(ptr), val, memorder); } -template type __device__ __atomic_fetch_and_simt(volatile type *ptr, type val, int memorder) { - return __atomic_fetch_and_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_fetch_and_simt(volatile type *ptr, type val, + int memorder) { + return __atomic_fetch_and_simt_(const_cast(ptr), val, memorder); } -template type __device__ __atomic_fetch_xor_simt(volatile type *ptr, type val, int memorder) { - return __atomic_fetch_xor_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_fetch_xor_simt(volatile type *ptr, type val, + int memorder) { + return __atomic_fetch_xor_simt_(const_cast(ptr), val, memorder); } -template type __device__ __atomic_fetch_or_simt(volatile type *ptr, type val, int memorder) { - return __atomic_fetch_or_simt_(const_cast(ptr), val, memorder); +template +type __device__ __atomic_fetch_or_simt(volatile type *ptr, type val, + int memorder) { + return __atomic_fetch_or_simt_(const_cast(ptr), val, memorder); } -template bool __device__ __atomic_test_and_set_simt(volatile void *ptr, int memorder) { - return __atomic_test_and_set_simt_(const_cast(ptr), memorder); +template +bool __device__ __atomic_test_and_set_simt(volatile void *ptr, int memorder) { + return __atomic_test_and_set_simt_(const_cast(ptr), memorder); } -template void __device__ __atomic_clear_simt(volatile void *ptr, int memorder) { - return __atomic_clear_simt_(const_cast(ptr), memorder); +template +void __device__ __atomic_clear_simt(volatile void *ptr, int memorder) { + return __atomic_clear_simt_(const_cast(ptr), memorder); } +} // end namespace Impl +} // end namespace Kokkos - -} // end namespace Impl -} // end namespace Kokkos - -#endif //_SIMT_DETAILS_CONFIG +#endif //_SIMT_DETAILS_CONFIG #ifndef KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED /* @@ -653,5 +1008,5 @@ template void __device__ __atomic_clear_simt(volatile void *ptr, int #define KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED -#endif //__CUDA_ARCH__ && KOKKOS_ENABLE_CUDA_ASM_ATOMICS -#endif // KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED +#endif //__CUDA_ARCH__ && KOKKOS_ENABLE_CUDA_ASM_ATOMICS +#endif // KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics_Restore_Builtins.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics_Restore_Builtins.hpp index bedb147227..d7cd1bab13 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics_Restore_Builtins.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics_Restore_Builtins.hpp @@ -2,10 +2,10 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 +// Kokkos v. 3.0 // Copyright (2019) Sandia Corporation // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -65,4 +65,4 @@ #undef KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED -#endif // KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED +#endif // KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp index 932bde2b37..34b681be15 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -47,377 +48,415 @@ #include #ifdef KOKKOS_ENABLE_CUDA -#include +#include #include -namespace Kokkos { namespace Impl { +namespace Kokkos { +namespace Impl { -template +template struct CudaGetMaxBlockSize; -template -int cuda_get_max_block_size(const typename DriverType::functor_type & f, const size_t vector_length, - const size_t shmem_extra_block, const size_t shmem_extra_thread) { - return CudaGetMaxBlockSize::get_block_size(f,vector_length, shmem_extra_block,shmem_extra_thread); +template +int cuda_get_max_block_size(const typename DriverType::functor_type& f, + const size_t vector_length, + const size_t shmem_extra_block, + const size_t shmem_extra_thread) { + return CudaGetMaxBlockSize::get_block_size( + f, vector_length, shmem_extra_block, shmem_extra_thread); } -template -int cuda_get_max_block_size(const CudaInternal* cuda_instance, const cudaFuncAttributes& attr, const FunctorType& f, const size_t vector_length, - const size_t shmem_block, const size_t shmem_thread) { +template +int cuda_get_max_block_size(const CudaInternal* cuda_instance, + const cudaFuncAttributes& attr, + const FunctorType& f, const size_t vector_length, + const size_t shmem_block, + const size_t shmem_thread) { + const int min_blocks_per_sm = + LaunchBounds::minBperSM == 0 ? 1 : LaunchBounds::minBperSM; + const int max_threads_per_block = LaunchBounds::maxTperB == 0 + ? cuda_instance->m_maxThreadsPerBlock + : LaunchBounds::maxTperB; - const int min_blocks_per_sm = LaunchBounds::minBperSM == 0 ? - 1 : LaunchBounds::minBperSM ; - const int max_threads_per_block = LaunchBounds::maxTperB == 0 ? - cuda_instance->m_maxThreadsPerBlock : LaunchBounds::maxTperB ; - - const int regs_per_thread = attr.numRegs; - const int regs_per_sm = cuda_instance->m_regsPerSM; - const int shmem_per_sm = cuda_instance->m_shmemPerSM; + const int regs_per_thread = attr.numRegs; + const int regs_per_sm = cuda_instance->m_regsPerSM; + const int shmem_per_sm = cuda_instance->m_shmemPerSM; const int max_shmem_per_block = cuda_instance->m_maxShmemPerBlock; - const int max_blocks_per_sm = cuda_instance->m_maxBlocksPerSM; - const int max_threads_per_sm = cuda_instance->m_maxThreadsPerSM; + const int max_blocks_per_sm = cuda_instance->m_maxBlocksPerSM; + const int max_threads_per_sm = cuda_instance->m_maxThreadsPerSM; - int block_size = std::min(attr.maxThreadsPerBlock,max_threads_per_block); + int block_size = std::min(attr.maxThreadsPerBlock, max_threads_per_block); - int functor_shmem = FunctorTeamShmemSize< FunctorType >::value( f , block_size/vector_length ); - int total_shmem = shmem_block + shmem_thread*(block_size/vector_length) + functor_shmem + attr.sharedSizeBytes; - int max_blocks_regs = regs_per_sm/(regs_per_thread*block_size); - int max_blocks_shmem = (total_shmem0?shmem_per_sm/total_shmem:max_blocks_regs):0; - int blocks_per_sm = std::min(max_blocks_regs,max_blocks_shmem); + int functor_shmem = + FunctorTeamShmemSize::value(f, block_size / vector_length); + int total_shmem = shmem_block + shmem_thread * (block_size / vector_length) + + functor_shmem + attr.sharedSizeBytes; + int max_blocks_regs = regs_per_sm / (regs_per_thread * block_size); + int max_blocks_shmem = + (total_shmem < max_shmem_per_block) + ? (total_shmem > 0 ? shmem_per_sm / total_shmem : max_blocks_regs) + : 0; + int blocks_per_sm = std::min(max_blocks_regs, max_blocks_shmem); int threads_per_sm = blocks_per_sm * block_size; - if(threads_per_sm > max_threads_per_sm) { - blocks_per_sm = max_threads_per_sm/block_size; + if (threads_per_sm > max_threads_per_sm) { + blocks_per_sm = max_threads_per_sm / block_size; threads_per_sm = blocks_per_sm * block_size; } - int opt_block_size = (blocks_per_sm>=min_blocks_per_sm) ? block_size : 0; + int opt_block_size = (blocks_per_sm >= min_blocks_per_sm) ? block_size : 0; int opt_threads_per_sm = threads_per_sm; - //printf("BlockSizeMax: %i Shmem: %i %i %i %i Regs: %i %i Blocks: %i %i Achieved: %i %i Opt: %i %i\n",block_size, + // printf("BlockSizeMax: %i Shmem: %i %i %i %i Regs: %i %i Blocks: %i %i + // Achieved: %i %i Opt: %i %i\n",block_size, // shmem_per_sm,max_shmem_per_block,functor_shmem,total_shmem, // regs_per_sm,regs_per_thread,max_blocks_shmem,max_blocks_regs,blocks_per_sm,threads_per_sm,opt_block_size,opt_threads_per_sm); - block_size-=32; - while ((blocks_per_sm==0) && (block_size>=32)) { - functor_shmem = FunctorTeamShmemSize< FunctorType >::value( f , block_size/vector_length ); - total_shmem = shmem_block + shmem_thread*(block_size/vector_length) + functor_shmem + attr.sharedSizeBytes; - max_blocks_regs = regs_per_sm/(regs_per_thread*block_size); - max_blocks_shmem = (total_shmem0?shmem_per_sm/total_shmem:max_blocks_regs):0; - blocks_per_sm = std::min(max_blocks_regs,max_blocks_shmem); + block_size -= 32; + while ((blocks_per_sm == 0) && (block_size >= 32)) { + functor_shmem = + FunctorTeamShmemSize::value(f, block_size / vector_length); + total_shmem = shmem_block + shmem_thread * (block_size / vector_length) + + functor_shmem + attr.sharedSizeBytes; + max_blocks_regs = regs_per_sm / (regs_per_thread * block_size); + max_blocks_shmem = + (total_shmem < max_shmem_per_block) + ? (total_shmem > 0 ? shmem_per_sm / total_shmem : max_blocks_regs) + : 0; + blocks_per_sm = std::min(max_blocks_regs, max_blocks_shmem); threads_per_sm = blocks_per_sm * block_size; - if(threads_per_sm > max_threads_per_sm) { - blocks_per_sm = max_threads_per_sm/block_size; + if (threads_per_sm > max_threads_per_sm) { + blocks_per_sm = max_threads_per_sm / block_size; threads_per_sm = blocks_per_sm * block_size; } - if((blocks_per_sm >= min_blocks_per_sm) && (blocks_per_sm <= max_blocks_per_sm)) { - if(threads_per_sm>=opt_threads_per_sm) { - opt_block_size = block_size; + if ((blocks_per_sm >= min_blocks_per_sm) && + (blocks_per_sm <= max_blocks_per_sm)) { + if (threads_per_sm >= opt_threads_per_sm) { + opt_block_size = block_size; opt_threads_per_sm = threads_per_sm; } } - //printf("BlockSizeMax: %i Shmem: %i %i %i %i Regs: %i %i Blocks: %i %i Achieved: %i %i Opt: %i %i\n",block_size, - // shmem_per_sm,max_shmem_per_block,functor_shmem,total_shmem, - // regs_per_sm,regs_per_thread,max_blocks_shmem,max_blocks_regs,blocks_per_sm,threads_per_sm,opt_block_size,opt_threads_per_sm); - block_size-=32; + // printf("BlockSizeMax: %i Shmem: %i %i %i %i Regs: %i %i Blocks: %i %i + // Achieved: %i %i Opt: %i %i\n",block_size, + // shmem_per_sm,max_shmem_per_block,functor_shmem,total_shmem, + // regs_per_sm,regs_per_thread,max_blocks_shmem,max_blocks_regs,blocks_per_sm,threads_per_sm,opt_block_size,opt_threads_per_sm); + block_size -= 32; } return opt_block_size; } - -template -struct CudaGetMaxBlockSize,true> { - static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length, - const size_t shmem_extra_block, const size_t shmem_extra_thread) { +template +struct CudaGetMaxBlockSize, true> { + static int get_block_size(const typename DriverType::functor_type& f, + const size_t vector_length, + const size_t shmem_extra_block, + const size_t shmem_extra_thread) { int numBlocks; - int blockSize=1024; - int sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + int blockSize = 1024; + int sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_constant_memory, - blockSize, + &numBlocks, cuda_parallel_launch_constant_memory, blockSize, sharedmem); - if(numBlocks>0) return blockSize; - while (blockSize>32 && numBlocks==0) { - blockSize/=2; - sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + if (numBlocks > 0) return blockSize; + while (blockSize > 32 && numBlocks == 0) { + blockSize /= 2; + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_constant_memory, - blockSize, - sharedmem); + &numBlocks, cuda_parallel_launch_constant_memory, + blockSize, sharedmem); } - int blockSizeUpperBound = blockSize*2; - while (blockSize0) { - blockSize+=32; - sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + int blockSizeUpperBound = blockSize * 2; + while (blockSize < blockSizeUpperBound && numBlocks > 0) { + blockSize += 32; + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_constant_memory, - blockSize, - sharedmem); + &numBlocks, cuda_parallel_launch_constant_memory, + blockSize, sharedmem); } return blockSize - 32; } }; -template -struct CudaGetMaxBlockSize,false> { - static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length, - const size_t shmem_extra_block, const size_t shmem_extra_thread) { +template +struct CudaGetMaxBlockSize, false> { + static int get_block_size(const typename DriverType::functor_type& f, + const size_t vector_length, + const size_t shmem_extra_block, + const size_t shmem_extra_thread) { int numBlocks; - unsigned int blockSize=1024; - unsigned int sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + unsigned int blockSize = 1024; + unsigned int sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_local_memory, - blockSize, + &numBlocks, cuda_parallel_launch_local_memory, blockSize, sharedmem); - if(numBlocks>0) return blockSize; - while (blockSize>32 && numBlocks==0) { - blockSize/=2; - sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + if (numBlocks > 0) return blockSize; + while (blockSize > 32 && numBlocks == 0) { + blockSize /= 2; + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_local_memory, - blockSize, + &numBlocks, cuda_parallel_launch_local_memory, blockSize, sharedmem); } - unsigned int blockSizeUpperBound = blockSize*2; - while (blockSize0) { - blockSize+=32; - sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + unsigned int blockSizeUpperBound = blockSize * 2; + while (blockSize < blockSizeUpperBound && numBlocks > 0) { + blockSize += 32; + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_local_memory, - blockSize, - sharedmem); + &numBlocks, cuda_parallel_launch_local_memory, blockSize, + sharedmem); } return blockSize - 32; } }; -template -struct CudaGetMaxBlockSize,true> { - static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length, - const size_t shmem_extra_block, const size_t shmem_extra_thread) { +template +struct CudaGetMaxBlockSize< + DriverType, Kokkos::LaunchBounds, + true> { + static int get_block_size(const typename DriverType::functor_type& f, + const size_t vector_length, + const size_t shmem_extra_block, + const size_t shmem_extra_thread) { int numBlocks = 0, oldNumBlocks = 0; - unsigned int blockSize=MaxThreadsPerBlock; - unsigned int sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + unsigned int blockSize = MaxThreadsPerBlock; + unsigned int sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( &numBlocks, - cuda_parallel_launch_constant_memory, - blockSize, - sharedmem); + cuda_parallel_launch_constant_memory, + blockSize, sharedmem); - if(static_cast(numBlocks)>=MinBlocksPerSM) return blockSize; + if (static_cast(numBlocks) >= MinBlocksPerSM) + return blockSize; - while (blockSize>32 && static_cast(numBlocks)::value( f , blockSize/vector_length ); + while (blockSize > 32 && + static_cast(numBlocks) < MinBlocksPerSM) { + blockSize /= 2; + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_constant_memory, - blockSize, - sharedmem); + &numBlocks, cuda_parallel_launch_constant_memory, + blockSize, sharedmem); } - unsigned int blockSizeUpperBound = (blockSize*2(numBlocks)>MinBlocksPerSM) { - blockSize+=32; - sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + unsigned int blockSizeUpperBound = + (blockSize * 2 < MaxThreadsPerBlock ? blockSize * 2 + : MaxThreadsPerBlock); + while (blockSize(numBlocks)> + MinBlocksPerSM) { + blockSize += 32; + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); oldNumBlocks = numBlocks; cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_constant_memory, - blockSize, - sharedmem); + &numBlocks, cuda_parallel_launch_constant_memory, + blockSize, sharedmem); } - if(static_cast(oldNumBlocks)>=MinBlocksPerSM) return blockSize - 32; + if (static_cast(oldNumBlocks) >= MinBlocksPerSM) + return blockSize - 32; return -1; } }; -template -struct CudaGetMaxBlockSize,false> { - static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length, - const size_t shmem_extra_block, const size_t shmem_extra_thread) { +template +struct CudaGetMaxBlockSize< + DriverType, Kokkos::LaunchBounds, + false> { + static int get_block_size(const typename DriverType::functor_type& f, + const size_t vector_length, + const size_t shmem_extra_block, + const size_t shmem_extra_thread) { int numBlocks = 0, oldNumBlocks = 0; - unsigned int blockSize=MaxThreadsPerBlock; - int sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + unsigned int blockSize = MaxThreadsPerBlock; + int sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( &numBlocks, - cuda_parallel_launch_local_memory, - blockSize, - sharedmem); - if(static_cast(numBlocks)>=MinBlocksPerSM) return blockSize; + cuda_parallel_launch_local_memory, + blockSize, sharedmem); + if (static_cast(numBlocks) >= MinBlocksPerSM) + return blockSize; - while (blockSize>32 && static_cast(numBlocks)::value( f , blockSize/vector_length ); + while (blockSize > 32 && + static_cast(numBlocks) < MinBlocksPerSM) { + blockSize /= 2; + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_local_memory, - blockSize, + &numBlocks, cuda_parallel_launch_local_memory, blockSize, sharedmem); } - unsigned int blockSizeUpperBound = (blockSize*2(numBlocks)>=MinBlocksPerSM) { - blockSize+=32; - sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + unsigned int blockSizeUpperBound = + (blockSize * 2 < MaxThreadsPerBlock ? blockSize * 2 + : MaxThreadsPerBlock); + while (blockSize < blockSizeUpperBound && + static_cast(numBlocks) >= MinBlocksPerSM) { + blockSize += 32; + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); oldNumBlocks = numBlocks; cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_local_memory, - blockSize, - sharedmem); + &numBlocks, cuda_parallel_launch_local_memory, blockSize, + sharedmem); } - if(static_cast(oldNumBlocks)>=MinBlocksPerSM) return blockSize - 32; + if (static_cast(oldNumBlocks) >= MinBlocksPerSM) + return blockSize - 32; return -1; } }; - -template +template struct CudaGetOptBlockSize; -template -int cuda_get_opt_block_size(const typename DriverType::functor_type & f, const size_t vector_length, - const size_t shmem_extra_block, const size_t shmem_extra_thread) { - return CudaGetOptBlockSize +int cuda_get_opt_block_size(const typename DriverType::functor_type& f, + const size_t vector_length, + const size_t shmem_extra_block, + const size_t shmem_extra_thread) { + return CudaGetOptBlockSize< + DriverType, LaunchBounds, + // LaunchBounds::launch_mechanism == Kokkos::Experimental::LaunchDefault ? + // (( CudaTraits::ConstantMemoryUseThreshold < + // sizeof(DriverType) )? // Kokkos::Experimental::CudaLaunchConstantMemory:Kokkos::Experimental::CudaLaunchLocalMemory): // LaunchBounds::launch_mechanism - (CudaTraits::ConstantMemoryUseThreshold < sizeof(DriverType)) - >::get_block_size(f,vector_length,shmem_extra_block,shmem_extra_thread); + (CudaTraits::ConstantMemoryUseThreshold < + sizeof(DriverType))>::get_block_size(f, vector_length, shmem_extra_block, + shmem_extra_thread); } -template -int cuda_get_opt_block_size(const CudaInternal* cuda_instance, const cudaFuncAttributes& attr, const FunctorType& f, const size_t vector_length, - const size_t shmem_block, const size_t shmem_thread) { +template +int cuda_get_opt_block_size(const CudaInternal* cuda_instance, + const cudaFuncAttributes& attr, + const FunctorType& f, const size_t vector_length, + const size_t shmem_block, + const size_t shmem_thread) { + const int min_blocks_per_sm = + LaunchBounds::minBperSM == 0 ? 1 : LaunchBounds::minBperSM; + const int max_threads_per_block = LaunchBounds::maxTperB == 0 + ? cuda_instance->m_maxThreadsPerBlock + : LaunchBounds::maxTperB; - const int min_blocks_per_sm = LaunchBounds::minBperSM == 0 ? - 1 : LaunchBounds::minBperSM ; - const int max_threads_per_block = LaunchBounds::maxTperB == 0 ? - cuda_instance->m_maxThreadsPerBlock : LaunchBounds::maxTperB ; - - const int regs_per_thread = attr.numRegs; - const int regs_per_sm = cuda_instance->m_regsPerSM; - const int shmem_per_sm = cuda_instance->m_shmemPerSM; + const int regs_per_thread = attr.numRegs; + const int regs_per_sm = cuda_instance->m_regsPerSM; + const int shmem_per_sm = cuda_instance->m_shmemPerSM; const int max_shmem_per_block = cuda_instance->m_maxShmemPerBlock; - const int max_blocks_per_sm = cuda_instance->m_maxBlocksPerSM; - const int max_threads_per_sm = cuda_instance->m_maxThreadsPerSM; + const int max_blocks_per_sm = cuda_instance->m_maxBlocksPerSM; + const int max_threads_per_sm = cuda_instance->m_maxThreadsPerSM; - int block_size = std::min(attr.maxThreadsPerBlock,max_threads_per_block); + int block_size = std::min(attr.maxThreadsPerBlock, max_threads_per_block); - int functor_shmem = FunctorTeamShmemSize< FunctorType >::value( f , block_size/vector_length ); - int total_shmem = shmem_block + shmem_thread*(block_size/vector_length) + functor_shmem + attr.sharedSizeBytes; - int max_blocks_regs = regs_per_sm/(regs_per_thread*block_size); - int max_blocks_shmem = (total_shmem0?shmem_per_sm/total_shmem:max_blocks_regs):0; - int blocks_per_sm = std::min(max_blocks_regs,max_blocks_shmem); + int functor_shmem = + FunctorTeamShmemSize::value(f, block_size / vector_length); + int total_shmem = shmem_block + shmem_thread * (block_size / vector_length) + + functor_shmem + attr.sharedSizeBytes; + int max_blocks_regs = regs_per_sm / (regs_per_thread * block_size); + int max_blocks_shmem = + (total_shmem < max_shmem_per_block) + ? (total_shmem > 0 ? shmem_per_sm / total_shmem : max_blocks_regs) + : 0; + int blocks_per_sm = std::min(max_blocks_regs, max_blocks_shmem); int threads_per_sm = blocks_per_sm * block_size; - if(threads_per_sm > max_threads_per_sm) { - blocks_per_sm = max_threads_per_sm/block_size; + if (threads_per_sm > max_threads_per_sm) { + blocks_per_sm = max_threads_per_sm / block_size; threads_per_sm = blocks_per_sm * block_size; } - int opt_block_size = (blocks_per_sm>=min_blocks_per_sm) ? block_size : 0; + int opt_block_size = (blocks_per_sm >= min_blocks_per_sm) ? block_size : 0; int opt_threads_per_sm = threads_per_sm; - block_size-=32; - while ((block_size>=32)) { - functor_shmem = FunctorTeamShmemSize< FunctorType >::value( f , block_size/vector_length ); - total_shmem = shmem_block + shmem_thread*(block_size/vector_length) + functor_shmem + attr.sharedSizeBytes; - max_blocks_regs = regs_per_sm/(regs_per_thread*block_size); - max_blocks_shmem = (total_shmem0?shmem_per_sm/total_shmem:max_blocks_regs):0; - blocks_per_sm = std::min(max_blocks_regs,max_blocks_shmem); + block_size -= 32; + while ((block_size >= 32)) { + functor_shmem = + FunctorTeamShmemSize::value(f, block_size / vector_length); + total_shmem = shmem_block + shmem_thread * (block_size / vector_length) + + functor_shmem + attr.sharedSizeBytes; + max_blocks_regs = regs_per_sm / (regs_per_thread * block_size); + max_blocks_shmem = + (total_shmem < max_shmem_per_block) + ? (total_shmem > 0 ? shmem_per_sm / total_shmem : max_blocks_regs) + : 0; + blocks_per_sm = std::min(max_blocks_regs, max_blocks_shmem); threads_per_sm = blocks_per_sm * block_size; - if(threads_per_sm > max_threads_per_sm) { - blocks_per_sm = max_threads_per_sm/block_size; + if (threads_per_sm > max_threads_per_sm) { + blocks_per_sm = max_threads_per_sm / block_size; threads_per_sm = blocks_per_sm * block_size; } - if((blocks_per_sm >= min_blocks_per_sm) && (blocks_per_sm <= max_blocks_per_sm)) { - if(threads_per_sm>=opt_threads_per_sm) { - opt_block_size = block_size; + if ((blocks_per_sm >= min_blocks_per_sm) && + (blocks_per_sm <= max_blocks_per_sm)) { + if (threads_per_sm >= opt_threads_per_sm) { + opt_block_size = block_size; opt_threads_per_sm = threads_per_sm; } } - block_size-=32; + block_size -= 32; } return opt_block_size; } -template -struct CudaGetOptBlockSize,true> { - static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length, - const size_t shmem_extra_block, const size_t shmem_extra_thread) { - int blockSize=16; +template +struct CudaGetOptBlockSize, true> { + static int get_block_size(const typename DriverType::functor_type& f, + const size_t vector_length, + const size_t shmem_extra_block, + const size_t shmem_extra_thread) { + int blockSize = 16; int numBlocks; int sharedmem; - int maxOccupancy=0; - int bestBlockSize=0; + int maxOccupancy = 0; + int bestBlockSize = 0; - while(blockSize<1024) { - blockSize*=2; + while (blockSize < 1024) { + blockSize *= 2; - //calculate the occupancy with that optBlockSize and check whether its larger than the largest one found so far - sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + // calculate the occupancy with that optBlockSize and check whether its + // larger than the largest one found so far + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_constant_memory, - blockSize, - sharedmem); - if(maxOccupancy < numBlocks*blockSize) { - maxOccupancy = numBlocks*blockSize; - bestBlockSize = blockSize; - } - } - return bestBlockSize; - } -}; - -template -struct CudaGetOptBlockSize,false> { - static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length, - const size_t shmem_extra_block, const size_t shmem_extra_thread) { - int blockSize=16; - int numBlocks; - int sharedmem; - int maxOccupancy=0; - int bestBlockSize=0; - - while(blockSize<1024) { - blockSize*=2; - sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); - - cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_local_memory, - blockSize, - sharedmem); - - if(maxOccupancy < numBlocks*blockSize) { - maxOccupancy = numBlocks*blockSize; + &numBlocks, cuda_parallel_launch_constant_memory, + blockSize, sharedmem); + if (maxOccupancy < numBlocks * blockSize) { + maxOccupancy = numBlocks * blockSize; bestBlockSize = blockSize; } } @@ -425,77 +464,128 @@ struct CudaGetOptBlockSize,false> { } }; -template -struct CudaGetOptBlockSize,true> { - static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length, - const size_t shmem_extra_block, const size_t shmem_extra_thread) { - int blockSize=16; +template +struct CudaGetOptBlockSize, false> { + static int get_block_size(const typename DriverType::functor_type& f, + const size_t vector_length, + const size_t shmem_extra_block, + const size_t shmem_extra_thread) { + int blockSize = 16; int numBlocks; int sharedmem; - int maxOccupancy=0; - int bestBlockSize=0; - int max_threads_per_block = std::min(MaxThreadsPerBlock,cuda_internal_maximum_warp_count()*CudaTraits::WarpSize); + int maxOccupancy = 0; + int bestBlockSize = 0; - while(blockSize < max_threads_per_block ) { - blockSize*=2; + while (blockSize < 1024) { + blockSize *= 2; + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); - //calculate the occupancy with that optBlockSize and check whether its larger than the largest one found so far - sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_constant_memory, - blockSize, - sharedmem); - if(numBlocks >= int(MinBlocksPerSM) && blockSize<=int(MaxThreadsPerBlock)) { - if(maxOccupancy < numBlocks*blockSize) { - maxOccupancy = numBlocks*blockSize; - bestBlockSize = blockSize; - } + &numBlocks, cuda_parallel_launch_local_memory, blockSize, + sharedmem); + + if (maxOccupancy < numBlocks * blockSize) { + maxOccupancy = numBlocks * blockSize; + bestBlockSize = blockSize; } } - if(maxOccupancy > 0) - return bestBlockSize; - return -1; + return bestBlockSize; } }; -template -struct CudaGetOptBlockSize,false> { - static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length, - const size_t shmem_extra_block, const size_t shmem_extra_thread) { - int blockSize=16; +template +struct CudaGetOptBlockSize< + DriverType, Kokkos::LaunchBounds, + true> { + static int get_block_size(const typename DriverType::functor_type& f, + const size_t vector_length, + const size_t shmem_extra_block, + const size_t shmem_extra_thread) { + int blockSize = 16; int numBlocks; int sharedmem; - int maxOccupancy=0; - int bestBlockSize=0; - int max_threads_per_block = std::min(MaxThreadsPerBlock,cuda_internal_maximum_warp_count()*CudaTraits::WarpSize); + int maxOccupancy = 0; + int bestBlockSize = 0; + int max_threads_per_block = + std::min(MaxThreadsPerBlock, + cuda_internal_maximum_warp_count() * CudaTraits::WarpSize); - while(blockSize < max_threads_per_block ) { - blockSize*=2; - sharedmem = shmem_extra_block + shmem_extra_thread*(blockSize/vector_length) + - FunctorTeamShmemSize< typename DriverType::functor_type >::value( f , blockSize/vector_length ); + while (blockSize < max_threads_per_block) { + blockSize *= 2; + // calculate the occupancy with that optBlockSize and check whether its + // larger than the largest one found so far + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); cudaOccupancyMaxActiveBlocksPerMultiprocessor( - &numBlocks, - cuda_parallel_launch_local_memory, - blockSize, - sharedmem); - if(numBlocks >= int(MinBlocksPerSM) && blockSize<=int(MaxThreadsPerBlock)) { - if(maxOccupancy < numBlocks*blockSize) { - maxOccupancy = numBlocks*blockSize; + &numBlocks, + cuda_parallel_launch_constant_memory, + blockSize, sharedmem); + if (numBlocks >= int(MinBlocksPerSM) && + blockSize <= int(MaxThreadsPerBlock)) { + if (maxOccupancy < numBlocks * blockSize) { + maxOccupancy = numBlocks * blockSize; bestBlockSize = blockSize; } } } - if(maxOccupancy > 0) - return bestBlockSize; + if (maxOccupancy > 0) return bestBlockSize; return -1; } }; -}} // namespace Kokkos::Impl +template +struct CudaGetOptBlockSize< + DriverType, Kokkos::LaunchBounds, + false> { + static int get_block_size(const typename DriverType::functor_type& f, + const size_t vector_length, + const size_t shmem_extra_block, + const size_t shmem_extra_thread) { + int blockSize = 16; + int numBlocks; + int sharedmem; + int maxOccupancy = 0; + int bestBlockSize = 0; + int max_threads_per_block = + std::min(MaxThreadsPerBlock, + cuda_internal_maximum_warp_count() * CudaTraits::WarpSize); -#endif // KOKKOS_ENABLE_CUDA -#endif /* #ifndef KOKKOS_CUDA_INTERNAL_HPP */ + while (blockSize < max_threads_per_block) { + blockSize *= 2; + sharedmem = + shmem_extra_block + shmem_extra_thread * (blockSize / vector_length) + + FunctorTeamShmemSize::value( + f, blockSize / vector_length); + cudaOccupancyMaxActiveBlocksPerMultiprocessor( + &numBlocks, + cuda_parallel_launch_local_memory, + blockSize, sharedmem); + if (numBlocks >= int(MinBlocksPerSM) && + blockSize <= int(MaxThreadsPerBlock)) { + if (maxOccupancy < numBlocks * blockSize) { + maxOccupancy = numBlocks * blockSize; + bestBlockSize = blockSize; + } + } + } + if (maxOccupancy > 0) return bestBlockSize; + return -1; + } +}; + +} // namespace Impl +} // namespace Kokkos + +#endif // KOKKOS_ENABLE_CUDA +#endif /* #ifndef KOKKOS_CUDA_INTERNAL_HPP */ diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Error.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Error.hpp index 55c7c782fe..3b674bbb30 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Error.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Error.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -47,22 +48,82 @@ #include #ifdef KOKKOS_ENABLE_CUDA -namespace Kokkos { namespace Impl { +#include + +#include + +namespace Kokkos { +namespace Impl { void cuda_device_synchronize(); -void cuda_internal_error_throw( cudaError e , const char * name, const char * file = NULL, const int line = 0 ); +void cuda_internal_error_throw(cudaError e, const char* name, + const char* file = NULL, const int line = 0); -inline void cuda_internal_safe_call( cudaError e , const char * name, const char * file = NULL, const int line = 0) -{ - if ( cudaSuccess != e ) { cuda_internal_error_throw( e , name, file, line ); } +inline void cuda_internal_safe_call(cudaError e, const char* name, + const char* file = NULL, + const int line = 0) { + if (cudaSuccess != e) { + cuda_internal_error_throw(e, name, file, line); + } } -#define CUDA_SAFE_CALL( call ) \ - Kokkos::Impl::cuda_internal_safe_call( call , #call, __FILE__, __LINE__ ) +#define CUDA_SAFE_CALL(call) \ + Kokkos::Impl::cuda_internal_safe_call(call, #call, __FILE__, __LINE__) -}} // namespace Kokkos::Impl +} // namespace Impl -#endif //KOKKOS_ENABLE_CUDA -#endif //KOKKOS_CUDA_ERROR_HPP +namespace Experimental { +class CudaRawMemoryAllocationFailure : public RawMemoryAllocationFailure { + private: + using base_t = RawMemoryAllocationFailure; + + cudaError_t m_error_code = cudaSuccess; + + static FailureMode get_failure_mode(cudaError_t error_code) { + switch (error_code) { + case cudaErrorMemoryAllocation: return FailureMode::OutOfMemoryError; + case cudaErrorInvalidValue: return FailureMode::InvalidAllocationSize; + // TODO handle cudaErrorNotSupported for cudaMallocManaged + default: return FailureMode::Unknown; + } + } + + public: + // using base_t::base_t; + // would trigger + // + // error: cannot determine the exception specification of the default + // constructor due to a circular dependency + // + // using NVCC 9.1 and gcc 7.4 + CudaRawMemoryAllocationFailure( + size_t arg_attempted_size, size_t arg_attempted_alignment, + FailureMode arg_failure_mode = FailureMode::OutOfMemoryError, + AllocationMechanism arg_mechanism = + AllocationMechanism::StdMalloc) noexcept + : base_t(arg_attempted_size, arg_attempted_alignment, arg_failure_mode, + arg_mechanism) {} + + CudaRawMemoryAllocationFailure(size_t arg_attempted_size, + cudaError_t arg_error_code, + AllocationMechanism arg_mechanism) noexcept + : base_t(arg_attempted_size, /* CudaSpace doesn't handle alignment? */ 1, + get_failure_mode(arg_error_code), arg_mechanism), + m_error_code(arg_error_code) {} + + void append_additional_error_information(std::ostream& o) const override { + if (m_error_code != cudaSuccess) { + o << " The Cuda allocation returned the error code \"\"" + << cudaGetErrorName(m_error_code) << "\"."; + } + } +}; + +} // end namespace Experimental + +} // namespace Kokkos + +#endif // KOKKOS_ENABLE_CUDA +#endif // KOKKOS_CUDA_ERROR_HPP diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp index 0ca9e3c160..b3c7edf67c 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -66,10 +67,34 @@ #include #include +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION +namespace Kokkos { +namespace Impl { + +bool CudaInternal::kokkos_impl_cuda_use_serial_execution_v = false; + +void CudaInternal::cuda_set_serial_execution(bool val) { + CudaInternal::kokkos_impl_cuda_use_serial_execution_v = val; +} +bool CudaInternal::cuda_use_serial_execution() { + return CudaInternal::kokkos_impl_cuda_use_serial_execution_v; +} + +} // namespace Impl +} // namespace Kokkos + +void kokkos_impl_cuda_set_serial_execution(bool val) { + Kokkos::Impl::CudaInternal::cuda_set_serial_execution(val); +} +bool kokkos_impl_cuda_use_serial_execution() { + return Kokkos::Impl::CudaInternal::cuda_use_serial_execution(); +} +#endif + #ifdef KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE -__device__ __constant__ -unsigned long kokkos_impl_cuda_constant_memory_buffer[ Kokkos::Impl::CudaTraits::ConstantMemoryUsage / sizeof(unsigned long) ] ; +__device__ __constant__ unsigned long kokkos_impl_cuda_constant_memory_buffer + [Kokkos::Impl::CudaTraits::ConstantMemoryUsage / sizeof(unsigned long)]; #endif @@ -80,32 +105,28 @@ namespace Impl { namespace { -__global__ -void query_cuda_kernel_arch( int * d_arch ) -{ -#if defined( __CUDA_ARCH__ ) - *d_arch = __CUDA_ARCH__ ; +__global__ void query_cuda_kernel_arch(int *d_arch) { +#if defined(__CUDA_ARCH__) + *d_arch = __CUDA_ARCH__; #else - *d_arch = 0 ; + *d_arch = 0; #endif } /** Query what compute capability is actually launched to the device: */ -int cuda_kernel_arch() -{ - int * d_arch = 0 ; - cudaMalloc( (void **) & d_arch , sizeof(int) ); - query_cuda_kernel_arch<<<1,1>>>( d_arch ); - int arch = 0 ; - cudaMemcpy( & arch , d_arch , sizeof(int) , cudaMemcpyDefault ); - cudaFree( d_arch ); - return arch ; +int cuda_kernel_arch() { + int *d_arch = 0; + cudaMalloc((void **)&d_arch, sizeof(int)); + query_cuda_kernel_arch<<<1, 1>>>(d_arch); + int arch = 0; + cudaMemcpy(&arch, d_arch, sizeof(int), cudaMemcpyDefault); + cudaFree(d_arch); + return arch; } #ifdef KOKKOS_ENABLE_CUDA_UVM -bool cuda_launch_blocking() -{ - const char * env = getenv("CUDA_LAUNCH_BLOCKING"); +bool cuda_launch_blocking() { + const char *env = getenv("CUDA_LAUNCH_BLOCKING"); if (env == 0) return false; @@ -113,21 +134,19 @@ bool cuda_launch_blocking() } #endif -} +} // namespace -void cuda_device_synchronize() -{ - CUDA_SAFE_CALL( cudaDeviceSynchronize() ); -} +void cuda_device_synchronize() { CUDA_SAFE_CALL(cudaDeviceSynchronize()); } -void cuda_internal_error_throw( cudaError e , const char * name, const char * file, const int line ) -{ - std::ostringstream out ; - out << name << " error( " << cudaGetErrorName(e) << "): " << cudaGetErrorString(e); +void cuda_internal_error_throw(cudaError e, const char *name, const char *file, + const int line) { + std::ostringstream out; + out << name << " error( " << cudaGetErrorName(e) + << "): " << cudaGetErrorString(e); if (file) { out << " " << file << ":" << line; } - throw_runtime_exception( out.str() ); + throw_runtime_exception(out.str()); } //---------------------------------------------------------------------------- @@ -180,231 +199,220 @@ void cuda_internal_error_throw( cudaError e , const char * name, const char * fi // int maxThreadsPerMultiProcessor; // }; - namespace { - - class CudaInternalDevices { -public: + public: enum { MAXIMUM_DEVICE_COUNT = 64 }; - struct cudaDeviceProp m_cudaProp[ MAXIMUM_DEVICE_COUNT ] ; - int m_cudaDevCount ; + struct cudaDeviceProp m_cudaProp[MAXIMUM_DEVICE_COUNT]; + int m_cudaDevCount; CudaInternalDevices(); - static const CudaInternalDevices & singleton(); + static const CudaInternalDevices &singleton(); }; -CudaInternalDevices::CudaInternalDevices() -{ +CudaInternalDevices::CudaInternalDevices() { // See 'cudaSetDeviceFlags' for host-device thread interaction // Section 4.4.2.6 of the CUDA Toolkit Reference Manual - CUDA_SAFE_CALL (cudaGetDeviceCount( & m_cudaDevCount ) ); + CUDA_SAFE_CALL(cudaGetDeviceCount(&m_cudaDevCount)); - if(m_cudaDevCount > MAXIMUM_DEVICE_COUNT) { - Kokkos::abort("Sorry, you have more GPUs per node than we thought anybody would ever have. Please report this to github.com/kokkos/kokkos."); + if (m_cudaDevCount > MAXIMUM_DEVICE_COUNT) { + Kokkos::abort( + "Sorry, you have more GPUs per node than we thought anybody would ever " + "have. Please report this to github.com/kokkos/kokkos."); } - for ( int i = 0 ; i < m_cudaDevCount ; ++i ) { - CUDA_SAFE_CALL( cudaGetDeviceProperties( m_cudaProp + i , i ) ); + for (int i = 0; i < m_cudaDevCount; ++i) { + CUDA_SAFE_CALL(cudaGetDeviceProperties(m_cudaProp + i, i)); } } -const CudaInternalDevices & CudaInternalDevices::singleton() -{ - static CudaInternalDevices self ; return self ; -} - +const CudaInternalDevices &CudaInternalDevices::singleton() { + static CudaInternalDevices self; + return self; } +} // namespace int CudaInternal::was_initialized = 0; -int CudaInternal::was_finalized = 0; +int CudaInternal::was_finalized = 0; //---------------------------------------------------------------------------- +void CudaInternal::print_configuration(std::ostream &s) const { + const CudaInternalDevices &dev_info = CudaInternalDevices::singleton(); -void CudaInternal::print_configuration( std::ostream & s ) const -{ - const CudaInternalDevices & dev_info = CudaInternalDevices::singleton(); - -#if defined( KOKKOS_ENABLE_CUDA ) - s << "macro KOKKOS_ENABLE_CUDA : defined" << std::endl ; +#if defined(KOKKOS_ENABLE_CUDA) + s << "macro KOKKOS_ENABLE_CUDA : defined" << std::endl; #endif -#if defined( CUDA_VERSION ) - s << "macro CUDA_VERSION = " << CUDA_VERSION - << " = version " << CUDA_VERSION / 1000 - << "." << ( CUDA_VERSION % 1000 ) / 10 - << std::endl ; +#if defined(CUDA_VERSION) + s << "macro CUDA_VERSION = " << CUDA_VERSION << " = version " + << CUDA_VERSION / 1000 << "." << (CUDA_VERSION % 1000) / 10 << std::endl; #endif - for ( int i = 0 ; i < dev_info.m_cudaDevCount ; ++i ) { - s << "Kokkos::Cuda[ " << i << " ] " - << dev_info.m_cudaProp[i].name - << " capability " << dev_info.m_cudaProp[i].major << "." << dev_info.m_cudaProp[i].minor - << ", Total Global Memory: " << human_memory_size(dev_info.m_cudaProp[i].totalGlobalMem) - << ", Shared Memory per Block: " << human_memory_size(dev_info.m_cudaProp[i].sharedMemPerBlock); - if ( m_cudaDev == i ) s << " : Selected" ; - s << std::endl ; + for (int i = 0; i < dev_info.m_cudaDevCount; ++i) { + s << "Kokkos::Cuda[ " << i << " ] " << dev_info.m_cudaProp[i].name + << " capability " << dev_info.m_cudaProp[i].major << "." + << dev_info.m_cudaProp[i].minor << ", Total Global Memory: " + << human_memory_size(dev_info.m_cudaProp[i].totalGlobalMem) + << ", Shared Memory per Block: " + << human_memory_size(dev_info.m_cudaProp[i].sharedMemPerBlock); + if (m_cudaDev == i) s << " : Selected"; + s << std::endl; } } //---------------------------------------------------------------------------- -CudaInternal::~CudaInternal() -{ - if ( m_stream || - m_scratchSpace || - m_scratchFlags || - m_scratchUnified || - m_scratchConcurrentBitset ) { +CudaInternal::~CudaInternal() { + if (m_stream || m_scratchSpace || m_scratchFlags || m_scratchUnified || + m_scratchConcurrentBitset) { std::cerr << "Kokkos::Cuda ERROR: Failed to call Kokkos::Cuda::finalize()" - << std::endl ; + << std::endl; std::cerr.flush(); } - m_cudaDev = -1 ; - m_cudaArch = -1 ; - m_multiProcCount = 0 ; - m_maxWarpCount = 0 ; - m_maxBlock = 0 ; - m_maxSharedWords = 0 ; - m_maxConcurrency = 0 ; - m_scratchSpaceCount = 0 ; - m_scratchFlagsCount = 0 ; - m_scratchUnifiedCount = 0 ; - m_scratchUnifiedSupported = 0 ; - m_streamCount = 0 ; - m_scratchSpace = 0 ; - m_scratchFlags = 0 ; - m_scratchUnified = 0 ; - m_scratchConcurrentBitset = 0 ; - m_stream = 0 ; + m_cudaDev = -1; + m_cudaArch = -1; + m_multiProcCount = 0; + m_maxWarpCount = 0; + m_maxBlock = 0; + m_maxSharedWords = 0; + m_maxConcurrency = 0; + m_scratchSpaceCount = 0; + m_scratchFlagsCount = 0; + m_scratchUnifiedCount = 0; + m_scratchUnifiedSupported = 0; + m_streamCount = 0; + m_scratchSpace = 0; + m_scratchFlags = 0; + m_scratchUnified = 0; + m_scratchConcurrentBitset = 0; + m_stream = 0; } -int CudaInternal::verify_is_initialized( const char * const label ) const -{ - if ( m_cudaDev < 0 ) { - std::cerr << "Kokkos::Cuda::" << label << " : ERROR device not initialized" << std::endl ; +int CudaInternal::verify_is_initialized(const char *const label) const { + if (m_cudaDev < 0) { + std::cerr << "Kokkos::Cuda::" << label << " : ERROR device not initialized" + << std::endl; } - return 0 <= m_cudaDev ; + return 0 <= m_cudaDev; } -CudaInternal & CudaInternal::singleton() -{ - static CudaInternal self ; - return self ; -} -void CudaInternal::fence() const { - cudaStreamSynchronize(m_stream); +CudaInternal &CudaInternal::singleton() { + static CudaInternal self; + return self; } +void CudaInternal::fence() const { cudaStreamSynchronize(m_stream); } -void CudaInternal::initialize( int cuda_device_id , cudaStream_t stream ) -{ - if ( was_finalized ) Kokkos::abort("Calling Cuda::initialize after Cuda::finalize is illegal\n"); +void CudaInternal::initialize(int cuda_device_id, cudaStream_t stream) { + if (was_finalized) + Kokkos::abort("Calling Cuda::initialize after Cuda::finalize is illegal\n"); was_initialized = 1; - if ( is_initialized() ) return; + if (is_initialized()) return; enum { WordSize = sizeof(size_type) }; #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - if ( ! HostSpace::execution_space::is_initialized() ) { + if (!HostSpace::execution_space::is_initialized()) { #else - if ( ! HostSpace::execution_space::impl_is_initialized() ) { + if (!HostSpace::execution_space::impl_is_initialized()) { #endif - const std::string msg("Cuda::initialize ERROR : HostSpace::execution_space is not initialized"); - throw_runtime_exception( msg ); + const std::string msg( + "Cuda::initialize ERROR : HostSpace::execution_space is not " + "initialized"); + throw_runtime_exception(msg); } - const CudaInternalDevices & dev_info = CudaInternalDevices::singleton(); + const CudaInternalDevices &dev_info = CudaInternalDevices::singleton(); - const bool ok_init = 0 == m_scratchSpace || 0 == m_scratchFlags ; + const bool ok_init = 0 == m_scratchSpace || 0 == m_scratchFlags; - const bool ok_id = 0 <= cuda_device_id && - cuda_device_id < dev_info.m_cudaDevCount ; + const bool ok_id = + 0 <= cuda_device_id && cuda_device_id < dev_info.m_cudaDevCount; // Need device capability 3.0 or better - const bool ok_dev = ok_id && - ( 3 <= dev_info.m_cudaProp[ cuda_device_id ].major && - 0 <= dev_info.m_cudaProp[ cuda_device_id ].minor ); + const bool ok_dev = + ok_id && (3 <= dev_info.m_cudaProp[cuda_device_id].major && + 0 <= dev_info.m_cudaProp[cuda_device_id].minor); - if ( ok_init && ok_dev ) { + if (ok_init && ok_dev) { + const struct cudaDeviceProp &cudaProp = dev_info.m_cudaProp[cuda_device_id]; - const struct cudaDeviceProp & cudaProp = - dev_info.m_cudaProp[ cuda_device_id ]; + m_cudaDev = cuda_device_id; - m_cudaDev = cuda_device_id ; - - CUDA_SAFE_CALL( cudaSetDevice( m_cudaDev ) ); + CUDA_SAFE_CALL(cudaSetDevice(m_cudaDev)); Kokkos::Impl::cuda_device_synchronize(); // Query what compute capability architecture a kernel executes: m_cudaArch = cuda_kernel_arch(); int compiled_major = m_cudaArch / 100; - int compiled_minor = ( m_cudaArch % 100 ) / 10; + int compiled_minor = (m_cudaArch % 100) / 10; - if ( compiled_major < 5 && cudaProp.major >= 5 ) { + if (compiled_major < 5 && cudaProp.major >= 5) { std::stringstream ss; - ss << "Kokkos::Cuda::initialize ERROR: running kernels compiled for compute capability " + ss << "Kokkos::Cuda::initialize ERROR: running kernels compiled for " + "compute capability " << compiled_major << "." << compiled_minor - << " (< 5.0) on device with compute capability " - << cudaProp.major << "." << cudaProp.minor - << " (>=5.0), this would give incorrect results!" - << std::endl ; + << " (< 5.0) on device with compute capability " << cudaProp.major + << "." << cudaProp.minor + << " (>=5.0), this would give incorrect results!" << std::endl; std::string msg = ss.str(); - Kokkos::abort( msg.c_str() ); + Kokkos::abort(msg.c_str()); } - if ( Kokkos::show_warnings() && (compiled_major != cudaProp.major || compiled_minor != cudaProp.minor) ) { - std::cerr << "Kokkos::Cuda::initialize WARNING: running kernels compiled for compute capability " + if (Kokkos::show_warnings() && (compiled_major != cudaProp.major || + compiled_minor != cudaProp.minor)) { + std::cerr << "Kokkos::Cuda::initialize WARNING: running kernels compiled " + "for compute capability " << compiled_major << "." << compiled_minor - << " on device with compute capability " - << cudaProp.major << "." << cudaProp.minor + << " on device with compute capability " << cudaProp.major + << "." << cudaProp.minor << " , this will likely reduce potential performance." - << std::endl ; + << std::endl; } // number of multiprocessors - m_multiProcCount = cudaProp.multiProcessorCount ; + m_multiProcCount = cudaProp.multiProcessorCount; //---------------------------------- // Maximum number of warps, // at most one warp per thread in a warp for reduction. - m_maxWarpCount = cudaProp.maxThreadsPerBlock / Impl::CudaTraits::WarpSize ; + m_maxWarpCount = cudaProp.maxThreadsPerBlock / Impl::CudaTraits::WarpSize; - if ( Impl::CudaTraits::WarpSize < m_maxWarpCount ) { - m_maxWarpCount = Impl::CudaTraits::WarpSize ; + if (Impl::CudaTraits::WarpSize < m_maxWarpCount) { + m_maxWarpCount = Impl::CudaTraits::WarpSize; } - m_maxSharedWords = cudaProp.sharedMemPerBlock / WordSize ; + m_maxSharedWords = cudaProp.sharedMemPerBlock / WordSize; //---------------------------------- // Maximum number of blocks: - m_maxBlock = cudaProp.maxGridSize[0] ; + m_maxBlock = cudaProp.maxGridSize[0]; - m_shmemPerSM = cudaProp.sharedMemPerMultiprocessor ; - m_maxShmemPerBlock = cudaProp.sharedMemPerBlock ; - m_regsPerSM = cudaProp.regsPerMultiprocessor ; - m_maxBlocksPerSM = m_cudaArch < 500 ? 16 : ( - m_cudaArch < 750 ? 32 : ( - m_cudaArch == 750 ? 16 : 32)); - m_maxThreadsPerSM = cudaProp.maxThreadsPerMultiProcessor ; - m_maxThreadsPerBlock = cudaProp.maxThreadsPerBlock ; + m_shmemPerSM = cudaProp.sharedMemPerMultiprocessor; + m_maxShmemPerBlock = cudaProp.sharedMemPerBlock; + m_regsPerSM = cudaProp.regsPerMultiprocessor; + m_maxBlocksPerSM = + m_cudaArch < 500 + ? 16 + : (m_cudaArch < 750 ? 32 : (m_cudaArch == 750 ? 16 : 32)); + m_maxThreadsPerSM = cudaProp.maxThreadsPerMultiProcessor; + m_maxThreadsPerBlock = cudaProp.maxThreadsPerBlock; //---------------------------------- - m_scratchUnifiedSupported = cudaProp.unifiedAddressing ; + m_scratchUnifiedSupported = cudaProp.unifiedAddressing; - if ( Kokkos::show_warnings() && ! m_scratchUnifiedSupported ) { - std::cerr << "Kokkos::Cuda device " - << cudaProp.name << " capability " + if (Kokkos::show_warnings() && !m_scratchUnifiedSupported) { + std::cerr << "Kokkos::Cuda device " << cudaProp.name << " capability " << cudaProp.major << "." << cudaProp.minor << " does not support unified virtual address space" - << std::endl ; + << std::endl; } //---------------------------------- @@ -413,345 +421,362 @@ void CudaInternal::initialize( int cuda_device_id , cudaStream_t stream ) // Allocate some initial space. This will grow as needed. { - const unsigned reduce_block_count = m_maxWarpCount * Impl::CudaTraits::WarpSize ; + const unsigned reduce_block_count = + m_maxWarpCount * Impl::CudaTraits::WarpSize; - (void) scratch_unified( 16 * sizeof(size_type) ); - (void) scratch_flags( reduce_block_count * 2 * sizeof(size_type) ); - (void) scratch_space( reduce_block_count * 16 * sizeof(size_type) ); + (void)scratch_unified(16 * sizeof(size_type)); + (void)scratch_flags(reduce_block_count * 2 * sizeof(size_type)); + (void)scratch_space(reduce_block_count * 16 * sizeof(size_type)); } //---------------------------------- // Concurrent bitset for obtaining unique tokens from within // an executing kernel. { - - m_maxConcurrency = - m_maxThreadsPerSM * cudaProp.multiProcessorCount ; + m_maxConcurrency = m_maxThreadsPerSM * cudaProp.multiProcessorCount; const int32_t buffer_bound = - Kokkos::Impl::concurrent_bitset::buffer_bound( m_maxConcurrency ); + Kokkos::Impl::concurrent_bitset::buffer_bound(m_maxConcurrency); // Allocate and initialize uint32_t[ buffer_bound ] - typedef Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void > Record ; + typedef Kokkos::Impl::SharedAllocationRecord + Record; - Record * const r = Record::allocate( Kokkos::CudaSpace() - , "InternalScratchBitset" - , sizeof(uint32_t) * buffer_bound ); + Record *const r = + Record::allocate(Kokkos::CudaSpace(), "InternalScratchBitset", + sizeof(uint32_t) * buffer_bound); - Record::increment( r ); + Record::increment(r); - m_scratchConcurrentBitset = reinterpret_cast( r->data() ); - - CUDA_SAFE_CALL( cudaMemset( m_scratchConcurrentBitset , 0 , sizeof(uint32_t) * buffer_bound ) ); + m_scratchConcurrentBitset = reinterpret_cast(r->data()); + CUDA_SAFE_CALL(cudaMemset(m_scratchConcurrentBitset, 0, + sizeof(uint32_t) * buffer_bound)); } //---------------------------------- - } - else { + } else { + std::ostringstream msg; + msg << "Kokkos::Cuda::initialize(" << cuda_device_id << ") FAILED"; - std::ostringstream msg ; - msg << "Kokkos::Cuda::initialize(" << cuda_device_id << ") FAILED" ; - - if ( ! ok_init ) { - msg << " : Already initialized" ; + if (!ok_init) { + msg << " : Already initialized"; } - if ( ! ok_id ) { + if (!ok_id) { msg << " : Device identifier out of range " - << "[0.." << dev_info.m_cudaDevCount << "]" ; + << "[0.." << dev_info.m_cudaDevCount << "]"; + } else if (!ok_dev) { + msg << " : Device "; + msg << dev_info.m_cudaProp[cuda_device_id].major; + msg << "."; + msg << dev_info.m_cudaProp[cuda_device_id].minor; + msg << " has insufficient capability, required 3.0 or better"; } - else if ( ! ok_dev ) { - msg << " : Device " ; - msg << dev_info.m_cudaProp[ cuda_device_id ].major ; - msg << "." ; - msg << dev_info.m_cudaProp[ cuda_device_id ].minor ; - msg << " has insufficient capability, required 3.0 or better" ; - } - Kokkos::Impl::throw_runtime_exception( msg.str() ); + Kokkos::Impl::throw_runtime_exception(msg.str()); } - #ifdef KOKKOS_ENABLE_CUDA_UVM - if( Kokkos::show_warnings() && !cuda_launch_blocking() ) { - std::cerr << "Kokkos::Cuda::initialize WARNING: Cuda is allocating into UVMSpace by default" << std::endl; - std::cerr << " without setting CUDA_LAUNCH_BLOCKING=1." << std::endl; - std::cerr << " The code must call Cuda().fence() after each kernel" << std::endl; - std::cerr << " or will likely crash when accessing data on the host." << std::endl; - } +#ifdef KOKKOS_ENABLE_CUDA_UVM + if (Kokkos::show_warnings() && !cuda_launch_blocking()) { + std::cerr << "Kokkos::Cuda::initialize WARNING: Cuda is allocating into " + "UVMSpace by default" + << std::endl; + std::cerr << " without setting " + "CUDA_LAUNCH_BLOCKING=1." + << std::endl; + std::cerr << " The code must call " + "Cuda().fence() after each kernel" + << std::endl; + std::cerr << " or will likely crash when " + "accessing data on the host." + << std::endl; + } - const char * env_force_device_alloc = getenv("CUDA_MANAGED_FORCE_DEVICE_ALLOC"); - bool force_device_alloc; - if (env_force_device_alloc == 0) force_device_alloc=false; - else force_device_alloc=atoi(env_force_device_alloc)!=0; + const char *env_force_device_alloc = + getenv("CUDA_MANAGED_FORCE_DEVICE_ALLOC"); + bool force_device_alloc; + if (env_force_device_alloc == 0) + force_device_alloc = false; + else + force_device_alloc = atoi(env_force_device_alloc) != 0; - const char * env_visible_devices = getenv("CUDA_VISIBLE_DEVICES"); - bool visible_devices_one=true; - if (env_visible_devices == 0) visible_devices_one=false; + const char *env_visible_devices = getenv("CUDA_VISIBLE_DEVICES"); + bool visible_devices_one = true; + if (env_visible_devices == 0) visible_devices_one = false; - if( Kokkos::show_warnings() && (!visible_devices_one && !force_device_alloc) ) { - std::cerr << "Kokkos::Cuda::initialize WARNING: Cuda is allocating into UVMSpace by default" << std::endl; - std::cerr << " without setting CUDA_MANAGED_FORCE_DEVICE_ALLOC=1 or " << std::endl; - std::cerr << " setting CUDA_VISIBLE_DEVICES." << std::endl; - std::cerr << " This could on multi GPU systems lead to severe performance" << std::endl; - std::cerr << " penalties." << std::endl; - } - #endif + if (Kokkos::show_warnings() && + (!visible_devices_one && !force_device_alloc)) { + std::cerr << "Kokkos::Cuda::initialize WARNING: Cuda is allocating into " + "UVMSpace by default" + << std::endl; + std::cerr << " without setting " + "CUDA_MANAGED_FORCE_DEVICE_ALLOC=1 or " + << std::endl; + std::cerr + << " setting CUDA_VISIBLE_DEVICES." + << std::endl; + std::cerr << " This could on multi GPU " + "systems lead to severe performance" + << std::endl; + std::cerr << " penalties." << std::endl; + } +#endif - #ifdef KOKKOS_ENABLE_PRE_CUDA_10_DEPRECATION_API +#ifdef KOKKOS_ENABLE_PRE_CUDA_10_DEPRECATION_API cudaThreadSetCacheConfig(cudaFuncCachePreferShared); - #else +#else cudaDeviceSetCacheConfig(cudaFuncCachePreferShared); - #endif +#endif // Init the array for used for arbitrarily sized atomics - if(stream == 0) - Impl::initialize_host_cuda_lock_arrays(); + if (stream == 0) Impl::initialize_host_cuda_lock_arrays(); m_stream = stream; } //---------------------------------------------------------------------------- -typedef Cuda::size_type ScratchGrain[ Impl::CudaTraits::WarpSize ] ; +typedef Cuda::size_type ScratchGrain[Impl::CudaTraits::WarpSize]; enum { sizeScratchGrain = sizeof(ScratchGrain) }; +Cuda::size_type *CudaInternal::scratch_flags(const Cuda::size_type size) const { + if (verify_is_initialized("scratch_flags") && + m_scratchFlagsCount * sizeScratchGrain < size) { + m_scratchFlagsCount = (size + sizeScratchGrain - 1) / sizeScratchGrain; -Cuda::size_type * -CudaInternal::scratch_flags( const Cuda::size_type size ) const -{ - if ( verify_is_initialized("scratch_flags") && m_scratchFlagsCount * sizeScratchGrain < size ) { + typedef Kokkos::Impl::SharedAllocationRecord + Record; + if (m_scratchFlags) Record::decrement(Record::get_record(m_scratchFlags)); - m_scratchFlagsCount = ( size + sizeScratchGrain - 1 ) / sizeScratchGrain ; + Record *const r = + Record::allocate(Kokkos::CudaSpace(), "InternalScratchFlags", + (sizeof(ScratchGrain) * m_scratchFlagsCount)); - typedef Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void > Record ; + Record::increment(r); - if( m_scratchFlags ) - Record::decrement( Record::get_record( m_scratchFlags ) ); + m_scratchFlags = reinterpret_cast(r->data()); - Record * const r = Record::allocate( Kokkos::CudaSpace() - , "InternalScratchFlags" - , ( sizeof( ScratchGrain ) * m_scratchFlagsCount ) ); - - Record::increment( r ); - - m_scratchFlags = reinterpret_cast( r->data() ); - - CUDA_SAFE_CALL( cudaMemset( m_scratchFlags , 0 , m_scratchFlagsCount * sizeScratchGrain ) ); + CUDA_SAFE_CALL( + cudaMemset(m_scratchFlags, 0, m_scratchFlagsCount * sizeScratchGrain)); } - return m_scratchFlags ; + return m_scratchFlags; } -Cuda::size_type * -CudaInternal::scratch_space( const Cuda::size_type size ) const -{ - if ( verify_is_initialized("scratch_space") && m_scratchSpaceCount * sizeScratchGrain < size ) { +Cuda::size_type *CudaInternal::scratch_space(const Cuda::size_type size) const { + if (verify_is_initialized("scratch_space") && + m_scratchSpaceCount * sizeScratchGrain < size) { + m_scratchSpaceCount = (size + sizeScratchGrain - 1) / sizeScratchGrain; - m_scratchSpaceCount = ( size + sizeScratchGrain - 1 ) / sizeScratchGrain ; + typedef Kokkos::Impl::SharedAllocationRecord + Record; - typedef Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void > Record ; + if (m_scratchSpace) Record::decrement(Record::get_record(m_scratchSpace)); - if( m_scratchSpace ) - Record::decrement( Record::get_record( m_scratchSpace ) ); + Record *const r = + Record::allocate(Kokkos::CudaSpace(), "InternalScratchSpace", + (sizeof(ScratchGrain) * m_scratchSpaceCount)); - Record * const r = Record::allocate( Kokkos::CudaSpace() - , "InternalScratchSpace" - , ( sizeof( ScratchGrain ) * m_scratchSpaceCount ) ); + Record::increment(r); - Record::increment( r ); - - m_scratchSpace = reinterpret_cast( r->data() ); + m_scratchSpace = reinterpret_cast(r->data()); } - return m_scratchSpace ; + return m_scratchSpace; } -Cuda::size_type * -CudaInternal::scratch_unified( const Cuda::size_type size ) const -{ - if ( verify_is_initialized("scratch_unified") && - m_scratchUnifiedSupported && m_scratchUnifiedCount * sizeScratchGrain < size ) { +Cuda::size_type *CudaInternal::scratch_unified( + const Cuda::size_type size) const { + if (verify_is_initialized("scratch_unified") && m_scratchUnifiedSupported && + m_scratchUnifiedCount * sizeScratchGrain < size) { + m_scratchUnifiedCount = (size + sizeScratchGrain - 1) / sizeScratchGrain; - m_scratchUnifiedCount = ( size + sizeScratchGrain - 1 ) / sizeScratchGrain ; + typedef Kokkos::Impl::SharedAllocationRecord + Record; - typedef Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void > Record ; + if (m_scratchUnified) + Record::decrement(Record::get_record(m_scratchUnified)); - if( m_scratchUnified ) - Record::decrement( Record::get_record( m_scratchUnified ) ); + Record *const r = Record::allocate( + Kokkos::CudaHostPinnedSpace(), "InternalScratchUnified", + (sizeof(ScratchGrain) * m_scratchUnifiedCount)); - Record * const r = Record::allocate( Kokkos::CudaHostPinnedSpace() - , "InternalScratchUnified" - , ( sizeof( ScratchGrain ) * m_scratchUnifiedCount ) ); + Record::increment(r); - Record::increment( r ); - - m_scratchUnified = reinterpret_cast( r->data() ); + m_scratchUnified = reinterpret_cast(r->data()); } - return m_scratchUnified ; + return m_scratchUnified; } -Cuda::size_type * -CudaInternal::scratch_functor( const Cuda::size_type size ) const -{ - if ( verify_is_initialized("scratch_functor") && - m_scratchFunctorSize < size ) { +Cuda::size_type *CudaInternal::scratch_functor( + const Cuda::size_type size) const { + if (verify_is_initialized("scratch_functor") && m_scratchFunctorSize < size) { + m_scratchFunctorSize = size; - m_scratchFunctorSize = size ; + typedef Kokkos::Impl::SharedAllocationRecord + Record; - typedef Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void > Record ; + if (m_scratchFunctor) + Record::decrement(Record::get_record(m_scratchFunctor)); - if( m_scratchFunctor ) - Record::decrement( Record::get_record( m_scratchFunctor ) ); + Record *const r = Record::allocate( + Kokkos::CudaSpace(), "InternalScratchFunctor", m_scratchFunctorSize); - Record * const r = Record::allocate( Kokkos::CudaSpace() - , "InternalScratchFunctor" - , m_scratchFunctorSize ); + Record::increment(r); - Record::increment( r ); - - m_scratchFunctor = reinterpret_cast( r->data() ); + m_scratchFunctor = reinterpret_cast(r->data()); } - return m_scratchFunctor ; + return m_scratchFunctor; } //---------------------------------------------------------------------------- -void CudaInternal::finalize() -{ +void CudaInternal::finalize() { was_finalized = 1; - if ( 0 != m_scratchSpace || 0 != m_scratchFlags ) { - + if (0 != m_scratchSpace || 0 != m_scratchFlags) { Impl::finalize_host_cuda_lock_arrays(); - if(m_stream!=0) cudaStreamDestroy(m_stream); + if (m_stream != 0) cudaStreamDestroy(m_stream); - typedef Kokkos::Impl::SharedAllocationRecord< CudaSpace > RecordCuda ; - typedef Kokkos::Impl::SharedAllocationRecord< CudaHostPinnedSpace > RecordHost ; + typedef Kokkos::Impl::SharedAllocationRecord RecordCuda; + typedef Kokkos::Impl::SharedAllocationRecord + RecordHost; - RecordCuda::decrement( RecordCuda::get_record( m_scratchFlags ) ); - RecordCuda::decrement( RecordCuda::get_record( m_scratchSpace ) ); - RecordHost::decrement( RecordHost::get_record( m_scratchUnified ) ); - RecordCuda::decrement( RecordCuda::get_record( m_scratchConcurrentBitset ) ); - if(m_scratchFunctorSize>0) - RecordCuda::decrement( RecordCuda::get_record( m_scratchFunctor ) ); + RecordCuda::decrement(RecordCuda::get_record(m_scratchFlags)); + RecordCuda::decrement(RecordCuda::get_record(m_scratchSpace)); + RecordHost::decrement(RecordHost::get_record(m_scratchUnified)); + RecordCuda::decrement(RecordCuda::get_record(m_scratchConcurrentBitset)); + if (m_scratchFunctorSize > 0) + RecordCuda::decrement(RecordCuda::get_record(m_scratchFunctor)); - m_cudaDev = -1 ; - m_multiProcCount = 0 ; - m_maxWarpCount = 0 ; - m_maxBlock = 0 ; - m_maxSharedWords = 0 ; - m_scratchSpaceCount = 0 ; - m_scratchFlagsCount = 0 ; - m_scratchUnifiedCount = 0 ; - m_streamCount = 0 ; - m_scratchSpace = 0 ; - m_scratchFlags = 0 ; - m_scratchUnified = 0 ; - m_scratchConcurrentBitset = 0 ; - m_stream = 0 ; + m_cudaDev = -1; + m_multiProcCount = 0; + m_maxWarpCount = 0; + m_maxBlock = 0; + m_maxSharedWords = 0; + m_scratchSpaceCount = 0; + m_scratchFlagsCount = 0; + m_scratchUnifiedCount = 0; + m_streamCount = 0; + m_scratchSpace = 0; + m_scratchFlags = 0; + m_scratchUnified = 0; + m_scratchConcurrentBitset = 0; + m_stream = 0; } } //---------------------------------------------------------------------------- -Cuda::size_type cuda_internal_multiprocessor_count() -{ return CudaInternal::singleton().m_multiProcCount ; } +Cuda::size_type cuda_internal_multiprocessor_count() { + return CudaInternal::singleton().m_multiProcCount; +} -CudaSpace::size_type cuda_internal_maximum_concurrent_block_count() -{ - #if defined(KOKKOS_ARCH_KEPLER) +CudaSpace::size_type cuda_internal_maximum_concurrent_block_count() { +#if defined(KOKKOS_ARCH_KEPLER) // Compute capability 3.0 through 3.7 enum : int { max_resident_blocks_per_multiprocessor = 16 }; - #else +#else // Compute capability 5.0 through 6.2 enum : int { max_resident_blocks_per_multiprocessor = 32 }; - #endif - return CudaInternal::singleton().m_multiProcCount - * max_resident_blocks_per_multiprocessor ; +#endif + return CudaInternal::singleton().m_multiProcCount * + max_resident_blocks_per_multiprocessor; }; -Cuda::size_type cuda_internal_maximum_warp_count() -{ return CudaInternal::singleton().m_maxWarpCount ; } +Cuda::size_type cuda_internal_maximum_warp_count() { + return CudaInternal::singleton().m_maxWarpCount; +} -Cuda::size_type cuda_internal_maximum_grid_count() -{ return CudaInternal::singleton().m_maxBlock ; } +Cuda::size_type cuda_internal_maximum_grid_count() { + return CudaInternal::singleton().m_maxBlock; +} -Cuda::size_type cuda_internal_maximum_shared_words() -{ return CudaInternal::singleton().m_maxSharedWords ; } +Cuda::size_type cuda_internal_maximum_shared_words() { + return CudaInternal::singleton().m_maxSharedWords; +} -Cuda::size_type * cuda_internal_scratch_space( const Cuda& instance, const Cuda::size_type size ) -{ return instance.impl_internal_space_instance()->scratch_space( size ); } +Cuda::size_type *cuda_internal_scratch_space(const Cuda &instance, + const Cuda::size_type size) { + return instance.impl_internal_space_instance()->scratch_space(size); +} -Cuda::size_type * cuda_internal_scratch_flags( const Cuda& instance, const Cuda::size_type size ) -{ return instance.impl_internal_space_instance()->scratch_flags( size ); } +Cuda::size_type *cuda_internal_scratch_flags(const Cuda &instance, + const Cuda::size_type size) { + return instance.impl_internal_space_instance()->scratch_flags(size); +} -Cuda::size_type * cuda_internal_scratch_unified( const Cuda& instance, const Cuda::size_type size ) -{ return instance.impl_internal_space_instance()->scratch_unified( size ); } +Cuda::size_type *cuda_internal_scratch_unified(const Cuda &instance, + const Cuda::size_type size) { + return instance.impl_internal_space_instance()->scratch_unified(size); +} - -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- namespace Kokkos { -Cuda::size_type Cuda::detect_device_count() -{ return Impl::CudaInternalDevices::singleton().m_cudaDevCount ; } +Cuda::size_type Cuda::detect_device_count() { + return Impl::CudaInternalDevices::singleton().m_cudaDevCount; +} -int Cuda::concurrency() -{ return Impl::CudaInternal::singleton().m_maxConcurrency ; } +int Cuda::concurrency() { + return Impl::CudaInternal::singleton().m_maxConcurrency; +} #ifdef KOKKOS_ENABLE_DEPRECATED_CODE int Cuda::is_initialized() #else int Cuda::impl_is_initialized() #endif -{ return Impl::CudaInternal::singleton().is_initialized(); } +{ + return Impl::CudaInternal::singleton().is_initialized(); +} #ifdef KOKKOS_ENABLE_DEPRECATED_CODE -void Cuda::initialize( const Cuda::SelectDevice config , size_t num_instances ) +void Cuda::initialize(const Cuda::SelectDevice config, size_t num_instances) #else -void Cuda::impl_initialize( const Cuda::SelectDevice config , size_t num_instances ) +void Cuda::impl_initialize(const Cuda::SelectDevice config, + size_t num_instances) #endif { - Impl::CudaInternal::singleton().initialize( config.cuda_device_id , 0 ); + Impl::CudaInternal::singleton().initialize(config.cuda_device_id, 0); - #if defined(KOKKOS_ENABLE_PROFILING) - Kokkos::Profiling::initialize(); - #endif +#if defined(KOKKOS_ENABLE_PROFILING) + Kokkos::Profiling::initialize(); +#endif } -std::vector -Cuda::detect_device_arch() -{ - const Impl::CudaInternalDevices & s = Impl::CudaInternalDevices::singleton(); +std::vector Cuda::detect_device_arch() { + const Impl::CudaInternalDevices &s = Impl::CudaInternalDevices::singleton(); - std::vector output( s.m_cudaDevCount ); + std::vector output(s.m_cudaDevCount); - for ( int i = 0 ; i < s.m_cudaDevCount ; ++i ) { - output[i] = s.m_cudaProp[i].major * 100 + s.m_cudaProp[i].minor ; + for (int i = 0; i < s.m_cudaDevCount; ++i) { + output[i] = s.m_cudaProp[i].major * 100 + s.m_cudaProp[i].minor; } - return output ; + return output; } -Cuda::size_type Cuda::device_arch() -{ - const int dev_id = Impl::CudaInternal::singleton().m_cudaDev ; +Cuda::size_type Cuda::device_arch() { + const int dev_id = Impl::CudaInternal::singleton().m_cudaDev; - int dev_arch = 0 ; + int dev_arch = 0; - if ( 0 <= dev_id ) { - const struct cudaDeviceProp & cudaProp = - Impl::CudaInternalDevices::singleton().m_cudaProp[ dev_id ] ; + if (0 <= dev_id) { + const struct cudaDeviceProp &cudaProp = + Impl::CudaInternalDevices::singleton().m_cudaProp[dev_id]; - dev_arch = cudaProp.major * 100 + cudaProp.minor ; + dev_arch = cudaProp.major * 100 + cudaProp.minor; } - return dev_arch ; + return dev_arch; } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE @@ -762,71 +787,62 @@ void Cuda::impl_finalize() { Impl::CudaInternal::singleton().finalize(); - #if defined(KOKKOS_ENABLE_PROFILING) - Kokkos::Profiling::finalize(); - #endif +#if defined(KOKKOS_ENABLE_PROFILING) + Kokkos::Profiling::finalize(); +#endif } -Cuda::Cuda() - : m_space_instance( &Impl::CudaInternal::singleton() ) -{ - Impl::CudaInternal::singleton().verify_is_initialized( "Cuda instance constructor" ); +Cuda::Cuda() : m_space_instance(&Impl::CudaInternal::singleton()) { + Impl::CudaInternal::singleton().verify_is_initialized( + "Cuda instance constructor"); } -Cuda::Cuda(cudaStream_t stream) - : m_space_instance(new Impl::CudaInternal) -{ - Impl::CudaInternal::singleton().verify_is_initialized( "Cuda instance constructor" ); - m_space_instance->initialize(Impl::CudaInternal::singleton().m_cudaDev,stream); +Cuda::Cuda(cudaStream_t stream) : m_space_instance(new Impl::CudaInternal) { + Impl::CudaInternal::singleton().verify_is_initialized( + "Cuda instance constructor"); + m_space_instance->initialize(Impl::CudaInternal::singleton().m_cudaDev, + stream); } -void Cuda::print_configuration( std::ostream & s , const bool ) -{ Impl::CudaInternal::singleton().print_configuration( s ); } +void Cuda::print_configuration(std::ostream &s, const bool) { + Impl::CudaInternal::singleton().print_configuration(s); +} #ifdef KOKKOS_ENABLE_DEPRECATED_CODE -bool Cuda::sleep() { return false ; } +bool Cuda::sleep() { return false; } -bool Cuda::wake() { return true ; } +bool Cuda::wake() { return true; } #endif -void Cuda::impl_static_fence() -{ - Kokkos::Impl::cuda_device_synchronize(); -} +void Cuda::impl_static_fence() { Kokkos::Impl::cuda_device_synchronize(); } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE -void Cuda::fence() { - impl_static_fence(); -} +void Cuda::fence() { impl_static_fence(); } #else -void Cuda::fence() const { - m_space_instance->fence(); -} +void Cuda::fence() const { m_space_instance->fence(); } #endif -const char* Cuda::name() { return "Cuda"; } +const char *Cuda::name() { return "Cuda"; } -cudaStream_t Cuda::cuda_stream() const { return m_space_instance->m_stream ; } -int Cuda::cuda_device() const { return m_space_instance->m_cudaDev ; } +cudaStream_t Cuda::cuda_stream() const { return m_space_instance->m_stream; } +int Cuda::cuda_device() const { return m_space_instance->m_cudaDev; } - -} // namespace Kokkos +} // namespace Kokkos namespace Kokkos { namespace Experimental { -UniqueToken< Kokkos::Cuda , Kokkos::Experimental::UniqueTokenScope::Global >:: -UniqueToken( Kokkos::Cuda const & ) - : m_buffer( Kokkos::Impl::CudaInternal::singleton().m_scratchConcurrentBitset ) - , m_count( Kokkos::Impl::CudaInternal::singleton().m_maxConcurrency ) - {} +UniqueToken:: + UniqueToken(Kokkos::Cuda const &) + : m_buffer( + Kokkos::Impl::CudaInternal::singleton().m_scratchConcurrentBitset), + m_count(Kokkos::Impl::CudaInternal::singleton().m_maxConcurrency) {} -} // namespace Experimental -} // namespace Kokkos +} // namespace Experimental +} // namespace Kokkos #else void KOKKOS_CORE_SRC_CUDA_IMPL_PREVENT_LINK_ERROR() {} -#endif // KOKKOS_ENABLE_CUDA - +#endif // KOKKOS_ENABLE_CUDA diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.hpp index f9e333fcf0..9d2c939af8 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.hpp @@ -3,39 +3,48 @@ //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- +// These functions fulfill the purpose of allowing to work around +// a suspected system software issue, or to check for race conditions. +// They are not currently a fully officially supported capability. +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION +extern "C" void kokkos_impl_cuda_set_serial_execution(bool); +extern "C" bool kokkos_impl_cuda_use_serial_execution(); +#endif namespace Kokkos { namespace Impl { struct CudaTraits { - enum { WarpSize = 32 /* 0x0020 */ }; - enum { WarpIndexMask = 0x001f /* Mask for warpindex */ }; - enum { WarpIndexShift = 5 /* WarpSize == 1 << WarpShift */ }; + enum { WarpSize = 32 /* 0x0020 */ }; + enum { WarpIndexMask = 0x001f /* Mask for warpindex */ }; + enum { WarpIndexShift = 5 /* WarpSize == 1 << WarpShift */ }; - enum { ConstantMemoryUsage = 0x008000 /* 32k bytes */ }; - enum { ConstantMemoryCache = 0x002000 /* 8k bytes */ }; - enum { KernelArgumentLimit = 0x001000 /* 4k bytes */ }; + enum { ConstantMemoryUsage = 0x008000 /* 32k bytes */ }; + enum { ConstantMemoryCache = 0x002000 /* 8k bytes */ }; + enum { KernelArgumentLimit = 0x001000 /* 4k bytes */ }; typedef unsigned long - ConstantGlobalBufferType[ ConstantMemoryUsage / sizeof(unsigned long) ]; + ConstantGlobalBufferType[ConstantMemoryUsage / sizeof(unsigned long)]; -#if defined(KOKKOS_ARCH_VOLTA) || \ - defined(KOKKOS_ARCH_PASCAL) - enum { ConstantMemoryUseThreshold = 0x000200 /* 0 bytes -> always use constant (or global)*/ }; +#if defined(KOKKOS_ARCH_VOLTA) || defined(KOKKOS_ARCH_PASCAL) + enum { + ConstantMemoryUseThreshold = + 0x000200 /* 0 bytes -> always use constant (or global)*/ + }; #else enum { ConstantMemoryUseThreshold = 0x000200 /* 512 bytes */ }; #endif - KOKKOS_INLINE_FUNCTION static - CudaSpace::size_type warp_count( CudaSpace::size_type i ) - { return ( i + WarpIndexMask ) >> WarpIndexShift ; } + KOKKOS_INLINE_FUNCTION static CudaSpace::size_type warp_count( + CudaSpace::size_type i) { + return (i + WarpIndexMask) >> WarpIndexShift; + } - KOKKOS_INLINE_FUNCTION static - CudaSpace::size_type warp_align( CudaSpace::size_type i ) - { - enum { Mask = ~CudaSpace::size_type( WarpIndexMask ) }; - return ( i + WarpIndexMask ) & Mask ; - } + KOKKOS_INLINE_FUNCTION static CudaSpace::size_type warp_align( + CudaSpace::size_type i) { + enum { Mask = ~CudaSpace::size_type(WarpIndexMask) }; + return (i + WarpIndexMask) & Mask; + } }; //---------------------------------------------------------------------------- @@ -47,110 +56,118 @@ CudaSpace::size_type cuda_internal_maximum_shared_words(); CudaSpace::size_type cuda_internal_maximum_concurrent_block_count(); -CudaSpace::size_type * cuda_internal_scratch_flags( const Cuda&, const CudaSpace::size_type size ); -CudaSpace::size_type * cuda_internal_scratch_space( const Cuda&, const CudaSpace::size_type size ); -CudaSpace::size_type * cuda_internal_scratch_unified( const Cuda&, const CudaSpace::size_type size ); +CudaSpace::size_type* cuda_internal_scratch_flags( + const Cuda&, const CudaSpace::size_type size); +CudaSpace::size_type* cuda_internal_scratch_space( + const Cuda&, const CudaSpace::size_type size); +CudaSpace::size_type* cuda_internal_scratch_unified( + const Cuda&, const CudaSpace::size_type size); -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- namespace Kokkos { namespace Impl { class CudaInternal { -private: + private: + CudaInternal(const CudaInternal&); + CudaInternal& operator=(const CudaInternal&); +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + static bool kokkos_impl_cuda_use_serial_execution_v; +#endif - CudaInternal( const CudaInternal & ); - CudaInternal & operator = ( const CudaInternal & ); + public: + typedef Cuda::size_type size_type; - -public: - - typedef Cuda::size_type size_type ; - - int m_cudaDev ; + int m_cudaDev; // Device Properties - int m_cudaArch ; - unsigned m_multiProcCount ; - unsigned m_maxWarpCount ; - unsigned m_maxBlock ; - unsigned m_maxSharedWords ; - uint32_t m_maxConcurrency ; - int m_shmemPerSM ; - int m_maxShmemPerBlock ; - int m_regsPerSM ; - int m_maxBlocksPerSM ; - int m_maxThreadsPerSM ; - int m_maxThreadsPerBlock ; + int m_cudaArch; + unsigned m_multiProcCount; + unsigned m_maxWarpCount; + unsigned m_maxBlock; + unsigned m_maxSharedWords; + uint32_t m_maxConcurrency; + int m_shmemPerSM; + int m_maxShmemPerBlock; + int m_regsPerSM; + int m_maxBlocksPerSM; + int m_maxThreadsPerSM; + int m_maxThreadsPerBlock; - mutable size_type m_scratchSpaceCount ; - mutable size_type m_scratchFlagsCount ; - mutable size_type m_scratchUnifiedCount ; - mutable size_type m_scratchFunctorSize ; - size_type m_scratchUnifiedSupported ; - size_type m_streamCount ; - mutable size_type * m_scratchSpace ; - mutable size_type * m_scratchFlags ; - mutable size_type * m_scratchUnified ; - mutable size_type * m_scratchFunctor ; - uint32_t * m_scratchConcurrentBitset ; - cudaStream_t m_stream ; + mutable size_type m_scratchSpaceCount; + mutable size_type m_scratchFlagsCount; + mutable size_type m_scratchUnifiedCount; + mutable size_type m_scratchFunctorSize; + size_type m_scratchUnifiedSupported; + size_type m_streamCount; + mutable size_type* m_scratchSpace; + mutable size_type* m_scratchFlags; + mutable size_type* m_scratchUnified; + mutable size_type* m_scratchFunctor; + uint32_t* m_scratchConcurrentBitset; + cudaStream_t m_stream; static int was_initialized; static int was_finalized; - static CudaInternal & singleton(); + static CudaInternal& singleton(); - int verify_is_initialized( const char * const label ) const ; + int verify_is_initialized(const char* const label) const; - int is_initialized() const - { return 0 != m_scratchSpace && 0 != m_scratchFlags ; } + int is_initialized() const { + return 0 != m_scratchSpace && 0 != m_scratchFlags; + } - void initialize( int cuda_device_id , cudaStream_t stream = 0 ); + void initialize(int cuda_device_id, cudaStream_t stream = 0); void finalize(); - void print_configuration( std::ostream & ) const ; + void print_configuration(std::ostream&) const; - void fence() const ; +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + static bool cuda_use_serial_execution(); + static void cuda_set_serial_execution(bool); +#endif + + void fence() const; ~CudaInternal(); CudaInternal() - : m_cudaDev( -1 ) - , m_cudaArch( -1 ) - , m_multiProcCount( 0 ) - , m_maxWarpCount( 0 ) - , m_maxBlock( 0 ) - , m_maxSharedWords( 0 ) - , m_maxConcurrency( 0 ) - , m_shmemPerSM( 0 ) - , m_maxShmemPerBlock( 0 ) - , m_regsPerSM( 0 ) - , m_maxBlocksPerSM( 0 ) - , m_maxThreadsPerSM( 0 ) - , m_maxThreadsPerBlock( 0 ) - , m_scratchSpaceCount( 0 ) - , m_scratchFlagsCount( 0 ) - , m_scratchUnifiedCount( 0 ) - , m_scratchFunctorSize( 0 ) - , m_scratchUnifiedSupported( 0 ) - , m_streamCount( 0 ) - , m_scratchSpace( 0 ) - , m_scratchFlags( 0 ) - , m_scratchUnified( 0 ) - , m_scratchFunctor( 0 ) - , m_scratchConcurrentBitset( 0 ) - , m_stream( 0 ) - {} + : m_cudaDev(-1), + m_cudaArch(-1), + m_multiProcCount(0), + m_maxWarpCount(0), + m_maxBlock(0), + m_maxSharedWords(0), + m_maxConcurrency(0), + m_shmemPerSM(0), + m_maxShmemPerBlock(0), + m_regsPerSM(0), + m_maxBlocksPerSM(0), + m_maxThreadsPerSM(0), + m_maxThreadsPerBlock(0), + m_scratchSpaceCount(0), + m_scratchFlagsCount(0), + m_scratchUnifiedCount(0), + m_scratchFunctorSize(0), + m_scratchUnifiedSupported(0), + m_streamCount(0), + m_scratchSpace(0), + m_scratchFlags(0), + m_scratchUnified(0), + m_scratchFunctor(0), + m_scratchConcurrentBitset(0), + m_stream(0) {} - size_type * scratch_space( const size_type size ) const ; - size_type * scratch_flags( const size_type size ) const ; - size_type * scratch_unified( const size_type size ) const ; - size_type * scratch_functor( const size_type size ) const ; + size_type* scratch_space(const size_type size) const; + size_type* scratch_flags(const size_type size) const; + size_type* scratch_unified(const size_type size) const; + size_type* scratch_functor(const size_type size) const; }; -} // Namespace Impl -} // Namespace Kokkos +} // Namespace Impl +} // Namespace Kokkos #endif diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_KernelLaunch.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_KernelLaunch.hpp index 2ec868c1f1..590fa7a784 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_KernelLaunch.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_KernelLaunch.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -59,32 +60,32 @@ //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- -#if defined( __CUDACC__ ) +#if defined(__CUDACC__) /** \brief Access to constant memory on the device */ #ifdef KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE -__device__ __constant__ -extern unsigned long kokkos_impl_cuda_constant_memory_buffer[] ; +__device__ __constant__ extern unsigned long + kokkos_impl_cuda_constant_memory_buffer[]; #else -__device__ __constant__ -unsigned long kokkos_impl_cuda_constant_memory_buffer[ Kokkos::Impl::CudaTraits::ConstantMemoryUsage / sizeof(unsigned long) ] ; +__device__ __constant__ unsigned long kokkos_impl_cuda_constant_memory_buffer + [Kokkos::Impl::CudaTraits::ConstantMemoryUsage / sizeof(unsigned long)]; #endif namespace Kokkos { namespace Impl { - void* cuda_resize_scratch_space(std::int64_t bytes, bool force_shrink = false); -} +void* cuda_resize_scratch_space(std::int64_t bytes, bool force_shrink = false); } +} // namespace Kokkos -template< typename T > -inline -__device__ -T * kokkos_impl_cuda_shared_memory() -{ extern __shared__ Kokkos::CudaSpace::size_type sh[]; return (T*) sh ; } +template +inline __device__ T* kokkos_impl_cuda_shared_memory() { + extern __shared__ Kokkos::CudaSpace::size_type sh[]; + return (T*)sh; +} namespace Kokkos { namespace Impl { @@ -100,105 +101,111 @@ namespace Impl { // For 2.0 capability: 48 KB L1 and 16 KB shared //---------------------------------------------------------------------------- -template< class DriverType> -__global__ -static void cuda_parallel_launch_constant_memory() -{ - const DriverType & driver = - *((const DriverType *) kokkos_impl_cuda_constant_memory_buffer ); +template +__global__ static void cuda_parallel_launch_constant_memory() { + const DriverType& driver = + *((const DriverType*)kokkos_impl_cuda_constant_memory_buffer); driver(); } -template< class DriverType, unsigned int maxTperB, unsigned int minBperSM > -__global__ -__launch_bounds__(maxTperB, minBperSM) -static void cuda_parallel_launch_constant_memory() -{ - const DriverType & driver = - *((const DriverType *) kokkos_impl_cuda_constant_memory_buffer ); +template +__global__ __launch_bounds__( + maxTperB, minBperSM) static void cuda_parallel_launch_constant_memory() { + const DriverType& driver = + *((const DriverType*)kokkos_impl_cuda_constant_memory_buffer); driver(); } -template< class DriverType> -__global__ -static void cuda_parallel_launch_local_memory( const DriverType driver ) -{ +template +__global__ static void cuda_parallel_launch_local_memory( + const DriverType driver) { driver(); } -template< class DriverType, unsigned int maxTperB, unsigned int minBperSM > -__global__ -__launch_bounds__(maxTperB, minBperSM) -static void cuda_parallel_launch_local_memory( const DriverType driver ) -{ +template +__global__ __launch_bounds__( + maxTperB, + minBperSM) static void cuda_parallel_launch_local_memory(const DriverType + driver) { driver(); } -template< class DriverType> -__global__ -static void cuda_parallel_launch_global_memory( const DriverType* driver ) -{ +template +__global__ static void cuda_parallel_launch_global_memory( + const DriverType* driver) { driver->operator()(); } -template< class DriverType, unsigned int maxTperB, unsigned int minBperSM > -__global__ -__launch_bounds__(maxTperB, minBperSM) -static void cuda_parallel_launch_global_memory( const DriverType* driver ) -{ +template +__global__ __launch_bounds__( + maxTperB, + minBperSM) static void cuda_parallel_launch_global_memory(const DriverType* + driver) { driver->operator()(); } -template< class DriverType> -__global__ -static void cuda_parallel_launch_constant_or_global_memory( const DriverType* driver_ptr ) -{ - const DriverType & driver = driver_ptr!=NULL ? *driver_ptr : - *((const DriverType *) kokkos_impl_cuda_constant_memory_buffer ); +template +__global__ static void cuda_parallel_launch_constant_or_global_memory( + const DriverType* driver_ptr) { + const DriverType& driver = + driver_ptr != NULL + ? *driver_ptr + : *((const DriverType*)kokkos_impl_cuda_constant_memory_buffer); driver(); } -template< class DriverType, unsigned int maxTperB, unsigned int minBperSM > +template __global__ -__launch_bounds__(maxTperB, minBperSM) -static void cuda_parallel_launch_constant_or_global_memory( const DriverType* driver_ptr ) -{ - const DriverType & driver = driver_ptr!=NULL ? *driver_ptr : - *((const DriverType *) kokkos_impl_cuda_constant_memory_buffer ); +__launch_bounds__(maxTperB, minBperSM) static void cuda_parallel_launch_constant_or_global_memory( + const DriverType* driver_ptr) { + const DriverType& driver = + driver_ptr != NULL + ? *driver_ptr + : *((const DriverType*)kokkos_impl_cuda_constant_memory_buffer); driver(); } -template< class DriverType > +template struct DeduceCudaLaunchMechanism { - constexpr static const Kokkos::Experimental::WorkItemProperty::HintLightWeight_t light_weight = Kokkos::Experimental::WorkItemProperty::HintLightWeight; - constexpr static const Kokkos::Experimental::WorkItemProperty::HintHeavyWeight_t heavy_weight = Kokkos::Experimental::WorkItemProperty::HintHeavyWeight ; - constexpr static const typename DriverType::Policy::work_item_property property = typename DriverType::Policy::work_item_property(); + constexpr static const Kokkos::Experimental::WorkItemProperty:: + HintLightWeight_t light_weight = + Kokkos::Experimental::WorkItemProperty::HintLightWeight; + constexpr static const Kokkos::Experimental::WorkItemProperty:: + HintHeavyWeight_t heavy_weight = + Kokkos::Experimental::WorkItemProperty::HintHeavyWeight; + constexpr static const typename DriverType::Policy::work_item_property + property = typename DriverType::Policy::work_item_property(); - static constexpr const Experimental::CudaLaunchMechanism valid_launch_mechanism = - // BuildValidMask - (sizeof(DriverType) - , Experimental::CudaLaunchMechanism LaunchMechanism = - DeduceCudaLaunchMechanism::launch_mechanism > -struct CudaParallelLaunch ; - -template < class DriverType - , unsigned int MaxThreadsPerBlock - , unsigned int MinBlocksPerSM> -struct CudaParallelLaunch< DriverType - , Kokkos::LaunchBounds< MaxThreadsPerBlock - , MinBlocksPerSM > - , Experimental::CudaLaunchMechanism::ConstantMemory> -{ - static_assert(sizeof(DriverType), + Experimental::CudaLaunchMechanism LaunchMechanism = + DeduceCudaLaunchMechanism::launch_mechanism> +struct CudaParallelLaunch; +template +struct CudaParallelLaunch< + DriverType, Kokkos::LaunchBounds, + Experimental::CudaLaunchMechanism::ConstantMemory> { + static_assert(sizeof(DriverType) < CudaTraits::ConstantMemoryUsage, + "Kokkos Error: Requested CudaLaunchConstantMemory with a " + "Functor larger than 32kB."); + inline CudaParallelLaunch(const DriverType& driver, const dim3& grid, + const dim3& block, const int shmem, + const CudaInternal* cuda_instance, + const bool prefer_shmem) { + if ((grid.x != 0) && ((block.x * block.y * block.z) != 0)) { // Fence before changing settings and copying closure Kokkos::Cuda().fence(); - if ( cuda_instance->m_maxShmemPerBlock < shmem ) { - Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") ); + if (cuda_instance->m_maxShmemPerBlock < shmem) { + Kokkos::Impl::throw_runtime_exception(std::string( + "CudaParallelLaunch FAILED: shared memory request is too large")); } - #ifndef KOKKOS_ARCH_KEPLER +#ifndef KOKKOS_ARCH_KEPLER // On Kepler the L1 has no benefit since it doesn't cache reads else { - CUDA_SAFE_CALL( - cudaFuncSetCacheConfig - ( cuda_parallel_launch_constant_memory - < DriverType, MaxThreadsPerBlock, MinBlocksPerSM > - , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 ) - ) ); + CUDA_SAFE_CALL(cudaFuncSetCacheConfig( + cuda_parallel_launch_constant_memory, + (prefer_shmem ? cudaFuncCachePreferShared + : cudaFuncCachePreferL1))); } - #endif +#endif // Copy functor to constant memory on the device - cudaMemcpyToSymbolAsync( - kokkos_impl_cuda_constant_memory_buffer, &driver, sizeof(DriverType), 0, cudaMemcpyHostToDevice, cudaStream_t(cuda_instance->m_stream)); + cudaMemcpyToSymbolAsync(kokkos_impl_cuda_constant_memory_buffer, &driver, + sizeof(DriverType), 0, cudaMemcpyHostToDevice, + cudaStream_t(cuda_instance->m_stream)); KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE(); // Invoke the driver function on the device - cuda_parallel_launch_constant_memory - < DriverType, MaxThreadsPerBlock, MinBlocksPerSM > - <<< grid , block , shmem , cuda_instance->m_stream >>>(); + cuda_parallel_launch_constant_memory + <<m_stream>>>(); -#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ) - CUDA_SAFE_CALL( cudaGetLastError() ); +#if defined(KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK) + CUDA_SAFE_CALL(cudaGetLastError()); Kokkos::Cuda().fence(); #endif } @@ -283,57 +283,55 @@ struct CudaParallelLaunch< DriverType static cudaFuncAttributes get_cuda_func_attributes() { cudaFuncAttributes attr; - cudaFuncGetAttributes(&attr,cuda_parallel_launch_constant_memory - < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >); + CUDA_SAFE_CALL(cudaFuncGetAttributes( + &attr, + cuda_parallel_launch_constant_memory)); return attr; } }; -template < class DriverType> -struct CudaParallelLaunch< DriverType - , Kokkos::LaunchBounds<0,0> - , Experimental::CudaLaunchMechanism::ConstantMemory > -{ - static_assert(sizeof(DriverType) +struct CudaParallelLaunch, + Experimental::CudaLaunchMechanism::ConstantMemory> { + static_assert(sizeof(DriverType) < CudaTraits::ConstantMemoryUsage, + "Kokkos Error: Requested CudaLaunchConstantMemory with a " + "Functor larger than 32kB."); + inline CudaParallelLaunch(const DriverType& driver, const dim3& grid, + const dim3& block, const int shmem, + const CudaInternal* cuda_instance, + const bool prefer_shmem) { + if ((grid.x != 0) && ((block.x * block.y * block.z) != 0)) { // Fence before changing settings and copying closure Kokkos::Cuda().fence(); - if ( cuda_instance->m_maxShmemPerBlock < shmem ) { - Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") ); + if (cuda_instance->m_maxShmemPerBlock < shmem) { + Kokkos::Impl::throw_runtime_exception(std::string( + "CudaParallelLaunch FAILED: shared memory request is too large")); } - #ifndef KOKKOS_ARCH_KEPLER +#ifndef KOKKOS_ARCH_KEPLER // On Kepler the L1 has no benefit since it doesn't cache reads else { - CUDA_SAFE_CALL( - cudaFuncSetCacheConfig - ( cuda_parallel_launch_constant_memory< DriverType > - , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 ) - ) ); + CUDA_SAFE_CALL(cudaFuncSetCacheConfig( + cuda_parallel_launch_constant_memory, + (prefer_shmem ? cudaFuncCachePreferShared + : cudaFuncCachePreferL1))); } - #endif +#endif // Copy functor to constant memory on the device - cudaMemcpyToSymbolAsync( - kokkos_impl_cuda_constant_memory_buffer, &driver, sizeof(DriverType), 0, cudaMemcpyHostToDevice, cudaStream_t(cuda_instance->m_stream)); + cudaMemcpyToSymbolAsync(kokkos_impl_cuda_constant_memory_buffer, &driver, + sizeof(DriverType), 0, cudaMemcpyHostToDevice, + cudaStream_t(cuda_instance->m_stream)); KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE(); // Invoke the driver function on the device - cuda_parallel_launch_constant_memory< DriverType > - <<< grid , block , shmem , cuda_instance->m_stream >>>(); + cuda_parallel_launch_constant_memory + <<m_stream>>>(); -#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ) - CUDA_SAFE_CALL( cudaGetLastError() ); +#if defined(KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK) + CUDA_SAFE_CALL(cudaGetLastError()); Kokkos::Cuda().fence(); #endif } @@ -341,55 +339,49 @@ struct CudaParallelLaunch< DriverType static cudaFuncAttributes get_cuda_func_attributes() { cudaFuncAttributes attr; - cudaFuncGetAttributes(&attr,cuda_parallel_launch_constant_memory - < DriverType >); + CUDA_SAFE_CALL(cudaFuncGetAttributes( + &attr, cuda_parallel_launch_constant_memory)); return attr; } }; -template < class DriverType - , unsigned int MaxThreadsPerBlock - , unsigned int MinBlocksPerSM > -struct CudaParallelLaunch< DriverType - , Kokkos::LaunchBounds< MaxThreadsPerBlock - , MinBlocksPerSM > - , Experimental::CudaLaunchMechanism::LocalMemory > -{ - static_assert(sizeof(DriverType)m_maxShmemPerBlock < shmem ) { - Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") ); +template +struct CudaParallelLaunch< + DriverType, Kokkos::LaunchBounds, + Experimental::CudaLaunchMechanism::LocalMemory> { + static_assert(sizeof(DriverType) < CudaTraits::KernelArgumentLimit, + "Kokkos Error: Requested CudaLaunchLocalMemory with a Functor " + "larger than 4096 bytes."); + inline CudaParallelLaunch(const DriverType& driver, const dim3& grid, + const dim3& block, const int shmem, + const CudaInternal* cuda_instance, + const bool prefer_shmem) { + if ((grid.x != 0) && ((block.x * block.y * block.z) != 0)) { + if (cuda_instance->m_maxShmemPerBlock < shmem) { + Kokkos::Impl::throw_runtime_exception(std::string( + "CudaParallelLaunch FAILED: shared memory request is too large")); } - #ifndef KOKKOS_ARCH_KEPLER +#ifndef KOKKOS_ARCH_KEPLER // On Kepler the L1 has no benefit since it doesn't cache reads else { - CUDA_SAFE_CALL( - cudaFuncSetCacheConfig - ( cuda_parallel_launch_local_memory - < DriverType, MaxThreadsPerBlock, MinBlocksPerSM > - , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 ) - ) ); + CUDA_SAFE_CALL(cudaFuncSetCacheConfig( + cuda_parallel_launch_local_memory, + (prefer_shmem ? cudaFuncCachePreferShared + : cudaFuncCachePreferL1))); } - #endif +#endif KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE(); // Invoke the driver function on the device - cuda_parallel_launch_local_memory - < DriverType, MaxThreadsPerBlock, MinBlocksPerSM > - <<< grid , block , shmem , cuda_instance->m_stream >>>( driver ); + cuda_parallel_launch_local_memory + <<m_stream>>>(driver); -#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ) - CUDA_SAFE_CALL( cudaGetLastError() ); +#if defined(KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK) + CUDA_SAFE_CALL(cudaGetLastError()); Kokkos::Cuda().fence(); #endif } @@ -397,50 +389,46 @@ struct CudaParallelLaunch< DriverType static cudaFuncAttributes get_cuda_func_attributes() { cudaFuncAttributes attr; - cudaFuncGetAttributes(&attr,cuda_parallel_launch_local_memory - < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >); + CUDA_SAFE_CALL(cudaFuncGetAttributes( + &attr, cuda_parallel_launch_local_memory)); return attr; } }; -template < class DriverType> -struct CudaParallelLaunch< DriverType - , Kokkos::LaunchBounds<0,0> - , Experimental::CudaLaunchMechanism::LocalMemory > -{ - static_assert(sizeof(DriverType)m_maxShmemPerBlock < shmem ) { - Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") ); +template +struct CudaParallelLaunch, + Experimental::CudaLaunchMechanism::LocalMemory> { + static_assert(sizeof(DriverType) < CudaTraits::KernelArgumentLimit, + "Kokkos Error: Requested CudaLaunchLocalMemory with a Functor " + "larger than 4096 bytes."); + inline CudaParallelLaunch(const DriverType& driver, const dim3& grid, + const dim3& block, const int shmem, + const CudaInternal* cuda_instance, + const bool prefer_shmem) { + if ((grid.x != 0) && ((block.x * block.y * block.z) != 0)) { + if (cuda_instance->m_maxShmemPerBlock < shmem) { + Kokkos::Impl::throw_runtime_exception(std::string( + "CudaParallelLaunch FAILED: shared memory request is too large")); } - #ifndef KOKKOS_ARCH_KEPLER +#ifndef KOKKOS_ARCH_KEPLER // On Kepler the L1 has no benefit since it doesn't cache reads else { - CUDA_SAFE_CALL( - cudaFuncSetCacheConfig - ( cuda_parallel_launch_local_memory< DriverType > - , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 ) - ) ); + CUDA_SAFE_CALL(cudaFuncSetCacheConfig( + cuda_parallel_launch_local_memory, + (prefer_shmem ? cudaFuncCachePreferShared + : cudaFuncCachePreferL1))); } - #endif +#endif KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE(); // Invoke the driver function on the device - cuda_parallel_launch_local_memory< DriverType > - <<< grid , block , shmem , cuda_instance->m_stream >>>( driver ); + cuda_parallel_launch_local_memory + <<m_stream>>>(driver); -#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ) - CUDA_SAFE_CALL( cudaGetLastError() ); +#if defined(KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK) + CUDA_SAFE_CALL(cudaGetLastError()); Kokkos::Cuda().fence(); #endif } @@ -448,111 +436,101 @@ struct CudaParallelLaunch< DriverType static cudaFuncAttributes get_cuda_func_attributes() { cudaFuncAttributes attr; - cudaFuncGetAttributes(&attr,cuda_parallel_launch_local_memory - < DriverType >); + CUDA_SAFE_CALL(cudaFuncGetAttributes( + &attr, cuda_parallel_launch_local_memory)); return attr; } }; -template < class DriverType - , unsigned int MaxThreadsPerBlock - , unsigned int MinBlocksPerSM> -struct CudaParallelLaunch< DriverType - , Kokkos::LaunchBounds< MaxThreadsPerBlock - , MinBlocksPerSM> - , Experimental::CudaLaunchMechanism::GlobalMemory > -{ - inline - CudaParallelLaunch( const DriverType & driver - , const dim3 & grid - , const dim3 & block - , const int shmem - , CudaInternal* cuda_instance - , const bool prefer_shmem ) - { - if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) { - - if ( cuda_instance->m_maxShmemPerBlock < shmem ) { - Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") ); +template +struct CudaParallelLaunch< + DriverType, Kokkos::LaunchBounds, + Experimental::CudaLaunchMechanism::GlobalMemory> { + inline CudaParallelLaunch(const DriverType& driver, const dim3& grid, + const dim3& block, const int shmem, + CudaInternal* cuda_instance, + const bool prefer_shmem) { + if ((grid.x != 0) && ((block.x * block.y * block.z) != 0)) { + if (cuda_instance->m_maxShmemPerBlock < shmem) { + Kokkos::Impl::throw_runtime_exception(std::string( + "CudaParallelLaunch FAILED: shared memory request is too large")); } - #ifndef KOKKOS_ARCH_KEPLER +#ifndef KOKKOS_ARCH_KEPLER // On Kepler the L1 has no benefit since it doesn't cache reads else { - CUDA_SAFE_CALL( - cudaFuncSetCacheConfig - ( cuda_parallel_launch_global_memory - < DriverType, MaxThreadsPerBlock, MinBlocksPerSM > - , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 ) - ) ); + CUDA_SAFE_CALL(cudaFuncSetCacheConfig( + cuda_parallel_launch_global_memory, + (prefer_shmem ? cudaFuncCachePreferShared + : cudaFuncCachePreferL1))); } - #endif +#endif KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE(); DriverType* driver_ptr = NULL; - driver_ptr = reinterpret_cast(cuda_instance->scratch_functor(sizeof(DriverType))); - cudaMemcpyAsync(driver_ptr,&driver, sizeof(DriverType), cudaMemcpyDefault, cuda_instance->m_stream); + driver_ptr = reinterpret_cast( + cuda_instance->scratch_functor(sizeof(DriverType))); + cudaMemcpyAsync(driver_ptr, &driver, sizeof(DriverType), + cudaMemcpyDefault, cuda_instance->m_stream); // Invoke the driver function on the device - cuda_parallel_launch_global_memory - < DriverType, MaxThreadsPerBlock, MinBlocksPerSM > - <<< grid , block , shmem , cuda_instance->m_stream >>>( driver_ptr ); + cuda_parallel_launch_global_memory + <<m_stream>>>(driver_ptr); -#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ) - CUDA_SAFE_CALL( cudaGetLastError() ); +#if defined(KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK) + CUDA_SAFE_CALL(cudaGetLastError()); Kokkos::Cuda().fence(); #endif } } static cudaFuncAttributes get_cuda_func_attributes() { cudaFuncAttributes attr; - cudaFuncGetAttributes(&attr,cuda_parallel_launch_global_memory - < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >); + CUDA_SAFE_CALL(cudaFuncGetAttributes( + &attr, + cuda_parallel_launch_global_memory)); return attr; } - }; -template < class DriverType> -struct CudaParallelLaunch< DriverType - , Kokkos::LaunchBounds<0,0> - , Experimental::CudaLaunchMechanism::GlobalMemory > -{ - inline - CudaParallelLaunch( const DriverType & driver - , const dim3 & grid - , const dim3 & block - , const int shmem - , CudaInternal* cuda_instance - , const bool prefer_shmem) - { - if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) { - - if ( cuda_instance->m_maxShmemPerBlock < shmem ) { - Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") ); +template +struct CudaParallelLaunch, + Experimental::CudaLaunchMechanism::GlobalMemory> { + inline CudaParallelLaunch(const DriverType& driver, const dim3& grid, + const dim3& block, const int shmem, + CudaInternal* cuda_instance, + const bool prefer_shmem) { + if ((grid.x != 0) && ((block.x * block.y * block.z) != 0)) { + if (cuda_instance->m_maxShmemPerBlock < shmem) { + Kokkos::Impl::throw_runtime_exception(std::string( + "CudaParallelLaunch FAILED: shared memory request is too large")); } - #ifndef KOKKOS_ARCH_KEPLER +#ifndef KOKKOS_ARCH_KEPLER // On Kepler the L1 has no benefit since it doesn't cache reads else { - CUDA_SAFE_CALL( - cudaFuncSetCacheConfig - ( cuda_parallel_launch_global_memory< DriverType > - , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 ) - ) ); + CUDA_SAFE_CALL(cudaFuncSetCacheConfig( + cuda_parallel_launch_global_memory, + (prefer_shmem ? cudaFuncCachePreferShared + : cudaFuncCachePreferL1))); } - #endif +#endif KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE(); DriverType* driver_ptr = NULL; - driver_ptr = reinterpret_cast(cuda_instance->scratch_functor(sizeof(DriverType))); - cudaMemcpyAsync(driver_ptr,&driver, sizeof(DriverType), cudaMemcpyDefault, cuda_instance->m_stream); + driver_ptr = reinterpret_cast( + cuda_instance->scratch_functor(sizeof(DriverType))); + cudaMemcpyAsync(driver_ptr, &driver, sizeof(DriverType), + cudaMemcpyDefault, cuda_instance->m_stream); - cuda_parallel_launch_global_memory< DriverType > - <<< grid , block , shmem , cuda_instance->m_stream >>>( driver_ptr ); + cuda_parallel_launch_global_memory + <<m_stream>>>(driver_ptr); -#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ) - CUDA_SAFE_CALL( cudaGetLastError() ); +#if defined(KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK) + CUDA_SAFE_CALL(cudaGetLastError()); Kokkos::Cuda().fence(); #endif } @@ -560,15 +538,15 @@ struct CudaParallelLaunch< DriverType static cudaFuncAttributes get_cuda_func_attributes() { cudaFuncAttributes attr; - cudaFuncGetAttributes(&attr,cuda_parallel_launch_global_memory - < DriverType >); + CUDA_SAFE_CALL(cudaFuncGetAttributes( + &attr, cuda_parallel_launch_global_memory)); return attr; } }; //---------------------------------------------------------------------------- -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -576,4 +554,3 @@ struct CudaParallelLaunch< DriverType #endif /* defined( __CUDACC__ ) */ #endif /* defined( KOKKOS_ENABLE_CUDA ) */ #endif /* #ifndef KOKKOS_CUDAEXEC_HPP */ - diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Locks.cpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Locks.cpp index f1828ea2de..07dadb3c16 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Locks.cpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Locks.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -52,10 +53,10 @@ #ifdef KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE namespace Kokkos { namespace Impl { -__device__ __constant__ -CudaLockArrays g_device_cuda_lock_arrays = { nullptr, nullptr, 0 }; -} +__device__ __constant__ CudaLockArrays g_device_cuda_lock_arrays = {nullptr, + nullptr, 0}; } +} // namespace Kokkos #endif namespace Kokkos { @@ -63,36 +64,38 @@ namespace Kokkos { namespace { __global__ void init_lock_array_kernel_atomic() { - unsigned i = blockIdx.x*blockDim.x + threadIdx.x; - if(i>>(); - init_lock_array_kernel_threadid<<<(Kokkos::Cuda::concurrency()+255)/256,256>>>(Kokkos::Cuda::concurrency()); + init_lock_array_kernel_atomic<<<(CUDA_SPACE_ATOMIC_MASK + 1 + 255) / 256, + 256>>>(); + init_lock_array_kernel_threadid<<<(Kokkos::Cuda::concurrency() + 255) / 256, + 256>>>(Kokkos::Cuda::concurrency()); CUDA_SAFE_CALL(cudaDeviceSynchronize()); } @@ -102,15 +105,15 @@ void finalize_host_cuda_lock_arrays() { g_host_cuda_lock_arrays.atomic = nullptr; cudaFree(g_host_cuda_lock_arrays.scratch); g_host_cuda_lock_arrays.scratch = nullptr; - g_host_cuda_lock_arrays.n = 0; + g_host_cuda_lock_arrays.n = 0; #ifdef KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE KOKKOS_COPY_CUDA_LOCK_ARRAYS_TO_DEVICE(); #endif } -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos #else diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Locks.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Locks.hpp index cfc46f0461..84a9c3821e 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Locks.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Locks.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -63,7 +64,7 @@ struct CudaLockArrays { /// \brief This global variable in Host space is the central definition /// of these arrays. -extern Kokkos::Impl::CudaLockArrays g_host_cuda_lock_arrays ; +extern Kokkos::Impl::CudaLockArrays g_host_cuda_lock_arrays; /// \brief After this call, the g_host_cuda_lock_arrays variable has /// valid, initialized arrays. @@ -77,10 +78,10 @@ void initialize_host_cuda_lock_arrays(); /// This call is idempotent. void finalize_host_cuda_lock_arrays(); -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos -#if defined( __CUDACC__ ) +#if defined(__CUDACC__) namespace Kokkos { namespace Impl { @@ -106,73 +107,70 @@ namespace Impl { /// That is the purpose of the KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE macro. __device__ #ifdef KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE -__constant__ -extern + __constant__ extern #endif -Kokkos::Impl::CudaLockArrays g_device_cuda_lock_arrays ; + Kokkos::Impl::CudaLockArrays g_device_cuda_lock_arrays; #define CUDA_SPACE_ATOMIC_MASK 0x1FFFF -/// \brief Acquire a lock for the address +/// \brief Aquire a lock for the address /// -/// This function tries to acquire the lock for the hash value derived -/// from the provided ptr. If the lock is successfully acquired the +/// This function tries to aquire the lock for the hash value derived +/// from the provided ptr. If the lock is successfully aquired the /// function returns true. Otherwise it returns false. -__device__ inline -bool lock_address_cuda_space(void* ptr) { +__device__ inline bool lock_address_cuda_space(void* ptr) { size_t offset = size_t(ptr); - offset = offset >> 2; - offset = offset & CUDA_SPACE_ATOMIC_MASK; - return (0 == atomicCAS(&Kokkos::Impl::g_device_cuda_lock_arrays.atomic[offset],0,1)); + offset = offset >> 2; + offset = offset & CUDA_SPACE_ATOMIC_MASK; + return ( + 0 == + atomicCAS(&Kokkos::Impl::g_device_cuda_lock_arrays.atomic[offset], 0, 1)); } /// \brief Release lock for the address /// /// This function releases the lock for the hash value derived /// from the provided ptr. This function should only be called -/// after previously successfully acquiring a lock with +/// after previously successfully aquiring a lock with /// lock_address. -__device__ inline -void unlock_address_cuda_space(void* ptr) { +__device__ inline void unlock_address_cuda_space(void* ptr) { size_t offset = size_t(ptr); - offset = offset >> 2; - offset = offset & CUDA_SPACE_ATOMIC_MASK; - atomicExch( &Kokkos::Impl::g_device_cuda_lock_arrays.atomic[ offset ], 0); + offset = offset >> 2; + offset = offset & CUDA_SPACE_ATOMIC_MASK; + atomicExch(&Kokkos::Impl::g_device_cuda_lock_arrays.atomic[offset], 0); } -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos // Make lock_array_copied an explicit translation unit scope thingy namespace Kokkos { namespace Impl { namespace { - static int lock_array_copied = 0; - inline int eliminate_warning_for_lock_array() { - return lock_array_copied; - } -} -} -} +static int lock_array_copied = 0; +inline int eliminate_warning_for_lock_array() { return lock_array_copied; } +} // namespace +} // namespace Impl +} // namespace Kokkos /* Dan Ibanez: it is critical that this code be a macro, so that it will capture the right address for Kokkos::Impl::g_device_cuda_lock_arrays! putting this in an inline function will NOT do the right thing! */ -#define KOKKOS_COPY_CUDA_LOCK_ARRAYS_TO_DEVICE() \ -{ \ - if(::Kokkos::Impl::lock_array_copied == 0) { \ - CUDA_SAFE_CALL(cudaMemcpyToSymbol( \ - Kokkos::Impl::g_device_cuda_lock_arrays , \ - & Kokkos::Impl::g_host_cuda_lock_arrays , \ - sizeof(Kokkos::Impl::CudaLockArrays) ) ); \ - } \ - lock_array_copied = 1; \ - \ -} +#define KOKKOS_COPY_CUDA_LOCK_ARRAYS_TO_DEVICE() \ + { \ + if (::Kokkos::Impl::lock_array_copied == 0) { \ + CUDA_SAFE_CALL( \ + cudaMemcpyToSymbol(Kokkos::Impl::g_device_cuda_lock_arrays, \ + &Kokkos::Impl::g_host_cuda_lock_arrays, \ + sizeof(Kokkos::Impl::CudaLockArrays))); \ + } \ + lock_array_copied = 1; \ + } #ifdef KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE #define KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE() #else -#define KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE() KOKKOS_COPY_CUDA_LOCK_ARRAYS_TO_DEVICE() +#define KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE() \ + KOKKOS_COPY_CUDA_LOCK_ARRAYS_TO_DEVICE() #endif #endif /* defined( __CUDACC__ ) */ diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp index 860d94d6c7..4c5fe4b7f1 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_CUDA_PARALLEL_HPP #include -#if defined( __CUDACC__ ) && defined( KOKKOS_ENABLE_CUDA ) +#if defined(__CUDACC__) && defined(KOKKOS_ENABLE_CUDA) #include #include @@ -78,202 +79,223 @@ extern bool show_warnings() noexcept; namespace Impl { -template< class ... Properties > -class TeamPolicyInternal< Kokkos::Cuda , Properties ... >: public PolicyTraits -{ -public: - +template +class TeamPolicyInternal + : public PolicyTraits { + public: //! Tag this class as a kokkos execution policy - typedef TeamPolicyInternal execution_policy ; + typedef TeamPolicyInternal execution_policy; - typedef PolicyTraits traits; + typedef PolicyTraits traits; - template< class ExecSpace, class ... OtherProperties > + template friend class TeamPolicyInternal; -private: - + private: enum { MAX_WARP = 8 }; typename traits::execution_space m_space; - int m_league_size ; - int m_team_size ; - int m_vector_length ; - int m_team_scratch_size[2] ; - int m_thread_scratch_size[2] ; + int m_league_size; + int m_team_size; + int m_vector_length; + int m_team_scratch_size[2]; + int m_thread_scratch_size[2]; int m_chunk_size; -public: - + public: //! Execution space of this execution policy - typedef Kokkos::Cuda execution_space ; + typedef Kokkos::Cuda execution_space; - template - TeamPolicyInternal( const TeamPolicyInternal& p ) { - m_league_size = p.m_league_size; - m_team_size = p.m_team_size; - m_vector_length = p.m_vector_length; - m_team_scratch_size[0] = p.m_team_scratch_size[0]; - m_team_scratch_size[1] = p.m_team_scratch_size[1]; + template + TeamPolicyInternal(const TeamPolicyInternal& p) { + m_league_size = p.m_league_size; + m_team_size = p.m_team_size; + m_vector_length = p.m_vector_length; + m_team_scratch_size[0] = p.m_team_scratch_size[0]; + m_team_scratch_size[1] = p.m_team_scratch_size[1]; m_thread_scratch_size[0] = p.m_thread_scratch_size[0]; m_thread_scratch_size[1] = p.m_thread_scratch_size[1]; - m_chunk_size = p.m_chunk_size; - m_space = p.m_space; + m_chunk_size = p.m_chunk_size; + m_space = p.m_space; } - TeamPolicyInternal& operator = (const TeamPolicyInternal& p) { - m_league_size = p.m_league_size; - m_team_size = p.m_team_size; - m_vector_length = p.m_vector_length; - m_team_scratch_size[0] = p.m_team_scratch_size[0]; - m_team_scratch_size[1] = p.m_team_scratch_size[1]; + TeamPolicyInternal& operator=(const TeamPolicyInternal& p) { + m_league_size = p.m_league_size; + m_team_size = p.m_team_size; + m_vector_length = p.m_vector_length; + m_team_scratch_size[0] = p.m_team_scratch_size[0]; + m_team_scratch_size[1] = p.m_team_scratch_size[1]; m_thread_scratch_size[0] = p.m_thread_scratch_size[0]; m_thread_scratch_size[1] = p.m_thread_scratch_size[1]; - m_chunk_size = p.m_chunk_size; - m_space = p.m_space; + m_chunk_size = p.m_chunk_size; + m_space = p.m_space; return *this; } //---------------------------------------- #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - template< class FunctorType > - static inline - int team_size_max( const FunctorType & functor ) - { - int n = MAX_WARP * Impl::CudaTraits::WarpSize ; + template + static inline int team_size_max(const FunctorType& functor) { + int n = MAX_WARP * Impl::CudaTraits::WarpSize; - for ( ; n ; n >>= 1 ) { - const int shmem_size = - /* for global reduce */ Impl::cuda_single_inter_block_reduce_scan_shmem( functor , n ) - /* for team reduce */ + ( n + 2 ) * sizeof(double) - /* for team shared */ + Impl::FunctorTeamShmemSize< FunctorType >::value( functor , n ); + for (; n; n >>= 1) { + const int shmem_size = + /* for global reduce */ Impl:: + cuda_single_inter_block_reduce_scan_shmem< + false, FunctorType, typename traits::work_tag>(functor, n) + /* for team reduce */ + + (n + 2) * sizeof(double) + /* for team shared */ + + Impl::FunctorTeamShmemSize::value(functor, n); - if ( shmem_size < typename traits::execution_space().impl_internal_space_instance()->m_maxShmemPerBlock ) break ; - } - - return n ; + if (shmem_size < typename traits::execution_space() + .impl_internal_space_instance() + ->m_maxShmemPerBlock) + break; } + + return n; + } #endif - template - int team_size_max( const FunctorType& f, const ParallelForTag& ) const { - typedef Impl::ParallelFor< FunctorType , TeamPolicy > closure_type; - cudaFuncAttributes attr = CudaParallelLaunch< closure_type, typename traits::launch_bounds >:: - get_cuda_func_attributes(); - int block_size = Kokkos::Impl::cuda_get_max_block_size< FunctorType, typename traits::launch_bounds >( - space().impl_internal_space_instance(),attr,f ,(size_t) vector_length(), - (size_t) team_scratch_size(0) + 2*sizeof(double), (size_t) thread_scratch_size(0) + sizeof(double) ); - return block_size/vector_length(); + template + int team_size_max(const FunctorType& f, const ParallelForTag&) const { + typedef Impl::ParallelFor> + closure_type; + cudaFuncAttributes attr = + CudaParallelLaunch:: + get_cuda_func_attributes(); + int block_size = + Kokkos::Impl::cuda_get_max_block_size( + space().impl_internal_space_instance(), attr, f, + (size_t)vector_length(), + (size_t)team_scratch_size(0) + 2 * sizeof(double), + (size_t)thread_scratch_size(0) + sizeof(double)); + return block_size / vector_length(); } - template - int team_size_max( const FunctorType& f, const ParallelReduceTag& ) const { - typedef Impl::FunctorAnalysis functor_analysis_type; - typedef typename Impl::ParallelReduceReturnValue::reducer_type reducer_type; - typedef Impl::ParallelReduce< FunctorType , TeamPolicy, reducer_type > closure_type; - typedef Impl::FunctorValueTraits< FunctorType , typename traits::work_tag > functor_value_traits; + template + inline int team_size_max(const FunctorType& f, + const ParallelReduceTag&) const { + typedef Impl::FunctorAnalysis + functor_analysis_type; + typedef typename Impl::ParallelReduceReturnValue< + void, typename functor_analysis_type::value_type, + FunctorType>::reducer_type reducer_type; + typedef Impl::ParallelReduce, + reducer_type> + closure_type; + return internal_team_size_max(f); + } - cudaFuncAttributes attr = CudaParallelLaunch< closure_type, typename traits::launch_bounds >:: - get_cuda_func_attributes(); - int block_size = Kokkos::Impl::cuda_get_max_block_size< FunctorType, typename traits::launch_bounds >( - space().impl_internal_space_instance(),attr,f ,(size_t) vector_length(), - (size_t) team_scratch_size(0) + 2*sizeof(double), (size_t) thread_scratch_size(0) + sizeof(double) + - ((functor_value_traits::StaticValueSize!=0)?0:functor_value_traits::value_size( f ))); - - // Currently we require Power-of-2 team size for reductions. - int p2 = 1; - while(p2<=block_size) p2*=2; - p2/=2; - return p2/vector_length(); + template + inline int team_size_max(const FunctorType& f, const ReducerType& r, + const ParallelReduceTag&) const { + using closure_type = + Impl::ParallelReduce, + ReducerType>; + return internal_team_size_max(f); } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - template< class FunctorType > - static int team_size_recommended( const FunctorType & functor ) - { return team_size_max( functor ); } + template + static int team_size_recommended(const FunctorType& functor) { + return team_size_max(functor); + } - template< class FunctorType > - static int team_size_recommended( const FunctorType & functor , const int vector_length) - { - int max = team_size_max( functor )/vector_length; - if(max<1) max = 1; - return max; - } + template + static int team_size_recommended(const FunctorType& functor, + const int vector_length) { + int max = team_size_max(functor) / vector_length; + if (max < 1) max = 1; + return max; + } #endif - template - int team_size_recommended( const FunctorType& f, const ParallelForTag& ) const { - typedef Impl::ParallelFor< FunctorType , TeamPolicy > closure_type; - cudaFuncAttributes attr = CudaParallelLaunch< closure_type, typename traits::launch_bounds >:: - get_cuda_func_attributes(); - const int block_size = Kokkos::Impl::cuda_get_opt_block_size< FunctorType, typename traits::launch_bounds>( - space().impl_internal_space_instance(), - attr, f , (size_t) vector_length(), - (size_t) team_scratch_size(0) + 2*sizeof(double), (size_t) thread_scratch_size(0) + sizeof(double)); - return block_size/vector_length(); + template + int team_size_recommended(const FunctorType& f, const ParallelForTag&) const { + typedef Impl::ParallelFor> + closure_type; + cudaFuncAttributes attr = + CudaParallelLaunch:: + get_cuda_func_attributes(); + const int block_size = + Kokkos::Impl::cuda_get_opt_block_size( + space().impl_internal_space_instance(), attr, f, + (size_t)vector_length(), + (size_t)team_scratch_size(0) + 2 * sizeof(double), + (size_t)thread_scratch_size(0) + sizeof(double)); + return block_size / vector_length(); } - template - int team_size_recommended( const FunctorType& f, const ParallelReduceTag& ) const { - typedef Impl::FunctorAnalysis functor_analysis_type; - typedef typename Impl::ParallelReduceReturnValue::reducer_type reducer_type; - typedef Impl::ParallelReduce< FunctorType , TeamPolicy, reducer_type > closure_type; - typedef Impl::FunctorValueTraits< FunctorType , typename traits::work_tag > functor_value_traits; - - cudaFuncAttributes attr = CudaParallelLaunch< closure_type, typename traits::launch_bounds >:: - get_cuda_func_attributes(); - const int block_size = Kokkos::Impl::cuda_get_opt_block_size< FunctorType, typename traits::launch_bounds>( - space().impl_internal_space_instance(), - attr, f , (size_t) vector_length(), - (size_t) team_scratch_size(0) + 2*sizeof(double), (size_t) thread_scratch_size(0) + sizeof(double) + - ((functor_value_traits::StaticValueSize!=0)?0:functor_value_traits::value_size( f ))); - // Currently we require Power-of-2 team size for reductions. - int p2 = 1; - while(p2<=block_size) p2*=2; - p2/=2; - return p2/vector_length(); + template + inline int team_size_recommended(const FunctorType& f, + const ParallelReduceTag&) const { + typedef Impl::FunctorAnalysis + functor_analysis_type; + typedef typename Impl::ParallelReduceReturnValue< + void, typename functor_analysis_type::value_type, + FunctorType>::reducer_type reducer_type; + typedef Impl::ParallelReduce, + reducer_type> + closure_type; + return internal_team_size_recommended(f); } + template + int team_size_recommended(const FunctorType& f, const ReducerType&, + const ParallelReduceTag&) const { + typedef Impl::ParallelReduce, + ReducerType> + closure_type; + return internal_team_size_recommended(f); + } - inline static - int vector_length_max() - { return Impl::CudaTraits::WarpSize; } + inline static int vector_length_max() { return Impl::CudaTraits::WarpSize; } - inline static - int verify_requested_vector_length( int requested_vector_length ) { - int test_vector_length = std::min( requested_vector_length, vector_length_max() ); + inline static int verify_requested_vector_length( + int requested_vector_length) { + int test_vector_length = + std::min(requested_vector_length, vector_length_max()); - // Allow only power-of-two vector_length - if ( !(is_integral_power_of_two( test_vector_length ) ) ) { - int test_pow2 = 1; - for (int i = 0; i < 5; i++) { - test_pow2 = test_pow2 << 1; - if (test_pow2 > test_vector_length) { - break; - } - } - test_vector_length = test_pow2 >> 1; + // Allow only power-of-two vector_length + if (!(is_integral_power_of_two(test_vector_length))) { + int test_pow2 = 1; + for (int i = 0; i < 5; i++) { + test_pow2 = test_pow2 << 1; + if (test_pow2 > test_vector_length) { + break; + } } + test_vector_length = test_pow2 >> 1; + } - return test_vector_length; + return test_vector_length; } - inline static - int scratch_size_max(int level) - { return (level==0? - 1024*40: // 48kB is the max for CUDA, but we need some for team_member.reduce etc. - 20*1024*1024); // arbitrarily setting this to 20MB, for a Volta V100 that would give us about 3.2GB for 2 teams per SM - } + inline static int scratch_size_max(int level) { + return ( + level == 0 ? 1024 * 40 : // 48kB is the max for CUDA, but we need some + // for team_member.reduce etc. + 20 * 1024 * + 1024); // arbitrarily setting this to 20MB, for a Volta V100 + // that would give us about 3.2GB for 2 teams per SM + } //---------------------------------------- - inline int vector_length() const { return m_vector_length ; } - inline int team_size() const { return m_team_size ; } - inline int league_size() const { return m_league_size ; } + inline int vector_length() const { return m_vector_length; } + inline int team_size() const { return m_team_size; } + inline int league_size() const { return m_league_size; } inline int scratch_size(int level, int team_size_ = -1) const { - if(team_size_<0) team_size_ = m_team_size; - return m_team_scratch_size[level] + team_size_*m_thread_scratch_size[level]; + if (team_size_ < 0) team_size_ = m_team_size; + return m_team_scratch_size[level] + + team_size_ * m_thread_scratch_size[level]; } inline int team_scratch_size(int level) const { return m_team_scratch_size[level]; @@ -282,189 +304,259 @@ public: return m_thread_scratch_size[level]; } - inline typename traits::execution_space space() const { - return m_space; - } + inline typename traits::execution_space space() const { return m_space; } TeamPolicyInternal() - : m_space(typename traits::execution_space()) - , m_league_size( 0 ) - , m_team_size( -1 ) - , m_vector_length( 0 ) - , m_team_scratch_size {0,0} - , m_thread_scratch_size {0,0} - , m_chunk_size ( 32 ) - {} + : m_space(typename traits::execution_space()), + m_league_size(0), + m_team_size(-1), + m_vector_length(0), + m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, + m_chunk_size(32) {} /** \brief Specify league size, request team size */ - TeamPolicyInternal( const execution_space space_ - , int league_size_ - , int team_size_request - , int vector_length_request = 1 ) - : m_space( space_ ) - , m_league_size( league_size_ ) - , m_team_size( team_size_request ) - , m_vector_length( verify_requested_vector_length(vector_length_request) ) - , m_team_scratch_size {0,0} - , m_thread_scratch_size {0,0} - , m_chunk_size ( 32 ) - { - // Make sure league size is permissible - if(league_size_ >= int(Impl::cuda_internal_maximum_grid_count())) - Impl::throw_runtime_exception( "Requested too large league_size for TeamPolicy on Cuda execution space."); + TeamPolicyInternal(const execution_space space_, int league_size_, + int team_size_request, int vector_length_request = 1) + : m_space(space_), + m_league_size(league_size_), + m_team_size(team_size_request), + m_vector_length(verify_requested_vector_length(vector_length_request)), + m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, + m_chunk_size(32) { + // Make sure league size is permissable + if (league_size_ >= int(Impl::cuda_internal_maximum_grid_count())) + Impl::throw_runtime_exception( + "Requested too large league_size for TeamPolicy on Cuda execution " + "space."); - // Make sure total block size is permissible - if ( m_team_size * m_vector_length > 1024 ) { - Impl::throw_runtime_exception(std::string("Kokkos::TeamPolicy< Cuda > the team size is too large. Team size x vector length must be smaller than 1024.")); - } + // Make sure total block size is permissable + if (m_team_size * m_vector_length > 1024) { + Impl::throw_runtime_exception( + std::string("Kokkos::TeamPolicy< Cuda > the team size is too large. " + "Team size x vector length must be smaller than 1024.")); } + } /** \brief Specify league size, request team size */ - TeamPolicyInternal( const execution_space space_ - , int league_size_ - , const Kokkos::AUTO_t & /* team_size_request */ - , int vector_length_request = 1 ) - : m_space( space_ ) - , m_league_size( league_size_ ) - , m_team_size( -1 ) - , m_vector_length( verify_requested_vector_length(vector_length_request) ) - , m_team_scratch_size {0,0} - , m_thread_scratch_size {0,0} - , m_chunk_size ( 32 ) - { - // Make sure league size is permissible - if(league_size_ >= int(Impl::cuda_internal_maximum_grid_count())) - Impl::throw_runtime_exception( "Requested too large league_size for TeamPolicy on Cuda execution space."); + TeamPolicyInternal(const execution_space space_, int league_size_, + const Kokkos::AUTO_t& /* team_size_request */ + , + int vector_length_request = 1) + : m_space(space_), + m_league_size(league_size_), + m_team_size(-1), + m_vector_length(verify_requested_vector_length(vector_length_request)), + m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, + m_chunk_size(32) { + // Make sure league size is permissable + if (league_size_ >= int(Impl::cuda_internal_maximum_grid_count())) + Impl::throw_runtime_exception( + "Requested too large league_size for TeamPolicy on Cuda execution " + "space."); + } + + TeamPolicyInternal(int league_size_, int team_size_request, + int vector_length_request = 1) + : m_space(typename traits::execution_space()), + m_league_size(league_size_), + m_team_size(team_size_request), + m_vector_length(verify_requested_vector_length(vector_length_request)), + m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, + m_chunk_size(32) { + // Make sure league size is permissable + if (league_size_ >= int(Impl::cuda_internal_maximum_grid_count())) + Impl::throw_runtime_exception( + "Requested too large league_size for TeamPolicy on Cuda execution " + "space."); + + // Make sure total block size is permissable + if (m_team_size * m_vector_length > 1024) { + Impl::throw_runtime_exception( + std::string("Kokkos::TeamPolicy< Cuda > the team size is too large. " + "Team size x vector length must be smaller than 1024.")); } + } - TeamPolicyInternal( int league_size_ - , int team_size_request - , int vector_length_request = 1 ) - : m_space( typename traits::execution_space() ) - , m_league_size( league_size_ ) - , m_team_size( team_size_request ) - , m_vector_length ( verify_requested_vector_length(vector_length_request) ) - , m_team_scratch_size {0,0} - , m_thread_scratch_size {0,0} - , m_chunk_size ( 32 ) - { - // Make sure league size is permissible - if(league_size_ >= int(Impl::cuda_internal_maximum_grid_count())) - Impl::throw_runtime_exception( "Requested too large league_size for TeamPolicy on Cuda execution space."); + TeamPolicyInternal(int league_size_, + const Kokkos::AUTO_t& /* team_size_request */ + , + int vector_length_request = 1) + : m_space(typename traits::execution_space()), + m_league_size(league_size_), + m_team_size(-1), + m_vector_length(verify_requested_vector_length(vector_length_request)), + m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, + m_chunk_size(32) { + // Make sure league size is permissable + if (league_size_ >= int(Impl::cuda_internal_maximum_grid_count())) + Impl::throw_runtime_exception( + "Requested too large league_size for TeamPolicy on Cuda execution " + "space."); + } - // Make sure total block size is permissible - if ( m_team_size * m_vector_length > 1024 ) { - Impl::throw_runtime_exception(std::string("Kokkos::TeamPolicy< Cuda > the team size is too large. Team size x vector length must be smaller than 1024.")); - } - } - - TeamPolicyInternal( int league_size_ - , const Kokkos::AUTO_t & /* team_size_request */ - , int vector_length_request = 1 ) - : m_space( typename traits::execution_space() ) - , m_league_size( league_size_ ) - , m_team_size( -1 ) - , m_vector_length ( verify_requested_vector_length(vector_length_request) ) - , m_team_scratch_size {0,0} - , m_thread_scratch_size {0,0} - , m_chunk_size ( 32 ) - { - // Make sure league size is permissible - if(league_size_ >= int(Impl::cuda_internal_maximum_grid_count())) - Impl::throw_runtime_exception( "Requested too large league_size for TeamPolicy on Cuda execution space."); - } - - inline int chunk_size() const { return m_chunk_size ; } + inline int chunk_size() const { return m_chunk_size; } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE /** \brief set chunk_size to a discrete value*/ - inline TeamPolicyInternal set_chunk_size(typename traits::index_type chunk_size_) const { + inline TeamPolicyInternal set_chunk_size( + typename traits::index_type chunk_size_) const { TeamPolicyInternal p = *this; - p.m_chunk_size = chunk_size_; + p.m_chunk_size = chunk_size_; return p; } - /** \brief set per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal set_scratch_size(const int& level, const PerTeamValue& per_team) const { - TeamPolicyInternal p = *this; + /** \brief set per team scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal set_scratch_size( + const int& level, const PerTeamValue& per_team) const { + TeamPolicyInternal p = *this; p.m_team_scratch_size[level] = per_team.value; return p; }; - /** \brief set per thread scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal set_scratch_size(const int& level, const PerThreadValue& per_thread) const { - TeamPolicyInternal p = *this; + /** \brief set per thread scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal set_scratch_size( + const int& level, const PerThreadValue& per_thread) const { + TeamPolicyInternal p = *this; p.m_thread_scratch_size[level] = per_thread.value; return p; }; - /** \brief set per thread and per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal set_scratch_size(const int& level, const PerTeamValue& per_team, const PerThreadValue& per_thread) const { - TeamPolicyInternal p = *this; - p.m_team_scratch_size[level] = per_team.value; + /** \brief set per thread and per team scratch size for a specific level of + * the scratch hierarchy */ + inline TeamPolicyInternal set_scratch_size( + const int& level, const PerTeamValue& per_team, + const PerThreadValue& per_thread) const { + TeamPolicyInternal p = *this; + p.m_team_scratch_size[level] = per_team.value; p.m_thread_scratch_size[level] = per_thread.value; return p; }; #else /** \brief set chunk_size to a discrete value*/ - inline TeamPolicyInternal& set_chunk_size(typename traits::index_type chunk_size_) { + inline TeamPolicyInternal& set_chunk_size( + typename traits::index_type chunk_size_) { m_chunk_size = chunk_size_; return *this; } - /** \brief set per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal& set_scratch_size(const int& level, const PerTeamValue& per_team) { + /** \brief set per team scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal& set_scratch_size(const int& level, + const PerTeamValue& per_team) { m_team_scratch_size[level] = per_team.value; return *this; } - /** \brief set per thread scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal& set_scratch_size(const int& level, const PerThreadValue& per_thread) { + /** \brief set per thread scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal& set_scratch_size( + const int& level, const PerThreadValue& per_thread) { m_thread_scratch_size[level] = per_thread.value; return *this; } - /** \brief set per thread and per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal& set_scratch_size(const int& level, const PerTeamValue& per_team, const PerThreadValue& per_thread) { - m_team_scratch_size[level] = per_team.value; + /** \brief set per thread and per team scratch size for a specific level of + * the scratch hierarchy */ + inline TeamPolicyInternal& set_scratch_size( + const int& level, const PerTeamValue& per_team, + const PerThreadValue& per_thread) { + m_team_scratch_size[level] = per_team.value; m_thread_scratch_size[level] = per_thread.value; return *this; } #endif - typedef Kokkos::Impl::CudaTeamMember member_type ; + typedef Kokkos::Impl::CudaTeamMember member_type; -protected: + protected: #ifdef KOKKOS_ENABLE_DEPRECATED_CODE /** \brief set chunk_size to a discrete value*/ - inline TeamPolicyInternal internal_set_chunk_size(typename traits::index_type chunk_size_) { + inline TeamPolicyInternal internal_set_chunk_size( + typename traits::index_type chunk_size_) { m_chunk_size = chunk_size_; return *this; } - /** \brief set per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal internal_set_scratch_size(const int& level, const PerTeamValue& per_team) { + /** \brief set per team scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal internal_set_scratch_size( + const int& level, const PerTeamValue& per_team) { m_team_scratch_size[level] = per_team.value; return *this; } - /** \brief set per thread scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal internal_set_scratch_size(const int& level, const PerThreadValue& per_thread) { + /** \brief set per thread scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal internal_set_scratch_size( + const int& level, const PerThreadValue& per_thread) { m_thread_scratch_size[level] = per_thread.value; return *this; } - /** \brief set per thread and per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal internal_set_scratch_size(const int& level, const PerTeamValue& per_team, const PerThreadValue& per_thread) { - m_team_scratch_size[level] = per_team.value; + /** \brief set per thread and per team scratch size for a specific level of + * the scratch hierarchy */ + inline TeamPolicyInternal internal_set_scratch_size( + const int& level, const PerTeamValue& per_team, + const PerThreadValue& per_thread) { + m_team_scratch_size[level] = per_team.value; m_thread_scratch_size[level] = per_thread.value; return *this; } #endif + + template + int internal_team_size_common(const FunctorType& f, + BlockSizeCallable&& block_size_callable) const { + using closure_type = ClosureType; + using functor_value_traits = + Impl::FunctorValueTraits; + + cudaFuncAttributes attr = + CudaParallelLaunch:: + get_cuda_func_attributes(); + const int block_size = std::forward(block_size_callable)( + space().impl_internal_space_instance(), attr, f, + (size_t)vector_length(), + (size_t)team_scratch_size(0) + 2 * sizeof(double), + (size_t)thread_scratch_size(0) + sizeof(double) + + ((functor_value_traits::StaticValueSize != 0) + ? 0 + : functor_value_traits::value_size(f))); + KOKKOS_ASSERT(block_size > 0); + + // Currently we require Power-of-2 team size for reductions. + int p2 = 1; + while (p2 <= block_size) p2 *= 2; + p2 /= 2; + return p2 / vector_length(); + } + + template + int internal_team_size_max(const FunctorType& f) const { + return internal_team_size_common( + f, + Kokkos::Impl::cuda_get_max_block_size); + } + + template + int internal_team_size_recommended(const FunctorType& f) const { + return internal_team_size_common( + f, + Kokkos::Impl::cuda_get_opt_block_size); + } }; -} // namspace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -472,262 +564,268 @@ protected: namespace Kokkos { namespace Impl { -template< class FunctorType , class ... Traits > -class ParallelFor< FunctorType - , Kokkos::RangePolicy< Traits ... > - , Kokkos::Cuda - > -{ -public: - typedef Kokkos::RangePolicy< Traits ... > Policy; -private: +template +class ParallelFor, Kokkos::Cuda> { + public: + typedef Kokkos::RangePolicy Policy; - typedef typename Policy::member_type Member ; - typedef typename Policy::work_tag WorkTag ; - typedef typename Policy::launch_bounds LaunchBounds ; + private: + typedef typename Policy::member_type Member; + typedef typename Policy::work_tag WorkTag; + typedef typename Policy::launch_bounds LaunchBounds; - const FunctorType m_functor ; - const Policy m_policy ; + const FunctorType m_functor; + const Policy m_policy; - ParallelFor() = delete ; - ParallelFor & operator = ( const ParallelFor & ) = delete ; + ParallelFor() = delete; + ParallelFor& operator=(const ParallelFor&) = delete; - template< class TagType > + template inline __device__ - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec_range( const Member i ) const - { m_functor( i ); } + typename std::enable_if::value>::type + exec_range(const Member i) const { + m_functor(i); + } - template< class TagType > + template inline __device__ - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec_range( const Member i ) const - { m_functor( TagType() , i ); } + typename std::enable_if::value>::type + exec_range(const Member i) const { + m_functor(TagType(), i); + } -public: + public: + typedef FunctorType functor_type; - typedef FunctorType functor_type ; + inline __device__ void operator()(void) const { + const Member work_stride = blockDim.y * gridDim.x; + const Member work_end = m_policy.end(); - inline - __device__ - void operator()(void) const - { - const Member work_stride = blockDim.y * gridDim.x ; - const Member work_end = m_policy.end(); - - for ( Member - iwork = m_policy.begin() + threadIdx.y + blockDim.y * blockIdx.x ; - iwork < work_end ; - iwork = iwork < work_end - work_stride ? iwork + work_stride : work_end) { - this-> template exec_range< WorkTag >( iwork ); - } + for (Member iwork = + m_policy.begin() + threadIdx.y + blockDim.y * blockIdx.x; + iwork < work_end; + iwork = iwork < work_end - work_stride ? iwork + work_stride + : work_end) { + this->template exec_range(iwork); } + } - inline - void execute() const - { - const typename Policy::index_type nwork = m_policy.end() - m_policy.begin(); + inline void execute() const { + const typename Policy::index_type nwork = m_policy.end() - m_policy.begin(); - cudaFuncAttributes attr = CudaParallelLaunch< ParallelFor, LaunchBounds >:: - get_cuda_func_attributes(); - const int block_size = Kokkos::Impl::cuda_get_opt_block_size< FunctorType, LaunchBounds>( - m_policy.space().impl_internal_space_instance(), - attr, m_functor , 1, 0 , 0 ); - const dim3 block( 1 , block_size , 1); - const dim3 grid( std::min( typename Policy::index_type(( nwork + block.y - 1 ) / block.y) , - typename Policy::index_type(cuda_internal_maximum_grid_count()) ) , 1 , 1); - - CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_policy.space().impl_internal_space_instance() , false ); + cudaFuncAttributes attr = + CudaParallelLaunch::get_cuda_func_attributes(); + const int block_size = + Kokkos::Impl::cuda_get_opt_block_size( + m_policy.space().impl_internal_space_instance(), attr, m_functor, 1, + 0, 0); + dim3 block(1, block_size, 1); + dim3 grid( + std::min( + typename Policy::index_type((nwork + block.y - 1) / block.y), + typename Policy::index_type(cuda_internal_maximum_grid_count())), + 1, 1); +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + if (Kokkos::Impl::CudaInternal::cuda_use_serial_execution()) { + block = dim3(1, 1, 1); + grid = dim3(1, 1, 1); } +#endif - ParallelFor( const FunctorType & arg_functor , - const Policy & arg_policy ) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - { } + CudaParallelLaunch( + *this, grid, block, 0, m_policy.space().impl_internal_space_instance(), + false); + } + ParallelFor(const FunctorType& arg_functor, const Policy& arg_policy) + : m_functor(arg_functor), m_policy(arg_policy) {} }; - // MDRangePolicy impl -template< class FunctorType , class ... Traits > -class ParallelFor< FunctorType - , Kokkos::MDRangePolicy< Traits ... > - , Kokkos::Cuda - > -{ -public: - typedef Kokkos::MDRangePolicy< Traits ... > Policy ; -private: +template +class ParallelFor, Kokkos::Cuda> { + public: + typedef Kokkos::MDRangePolicy Policy; + + private: using RP = Policy; typedef typename Policy::array_index_type array_index_type; typedef typename Policy::index_type index_type; typedef typename Policy::launch_bounds LaunchBounds; + const FunctorType m_functor; + const Policy m_rp; - const FunctorType m_functor ; - const Policy m_rp ; + public: + inline __device__ void operator()(void) const { + Kokkos::Impl::Refactor::DeviceIterateTile( + m_rp, m_functor) + .exec_range(); + } -public: - - inline - __device__ - void operator()(void) const - { - Kokkos::Impl::Refactor::DeviceIterateTile(m_rp,m_functor).exec_range(); - } - - - inline - void execute() const - { - if(m_rp.m_num_tiles==0) return; - const array_index_type maxblocks = static_cast(m_rp.space().impl_internal_space_instance()->m_maxBlock); - if ( RP::rank == 2 ) - { - const dim3 block( m_rp.m_tile[0] , m_rp.m_tile[1] , 1); + inline void execute() const { + if (m_rp.m_num_tiles == 0) return; + const array_index_type maxblocks = static_cast( + m_rp.space().impl_internal_space_instance()->m_maxBlock); + if (RP::rank == 2) { + const dim3 block(m_rp.m_tile[0], m_rp.m_tile[1], 1); const dim3 grid( - std::min( ( m_rp.m_upper[0] - m_rp.m_lower[0] + block.x - 1 ) / block.x , maxblocks ) - , std::min( ( m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1 ) / block.y , maxblocks ) - , 1 - ); - CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_rp.space().impl_internal_space_instance() , false ); - } - else if ( RP::rank == 3 ) - { - const dim3 block( m_rp.m_tile[0] , m_rp.m_tile[1] , m_rp.m_tile[2] ); + std::min((m_rp.m_upper[0] - m_rp.m_lower[0] + block.x - 1) / block.x, + maxblocks), + std::min((m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1) / block.y, + maxblocks), + 1); + CudaParallelLaunch( + *this, grid, block, 0, m_rp.space().impl_internal_space_instance(), + false); + } else if (RP::rank == 3) { + const dim3 block(m_rp.m_tile[0], m_rp.m_tile[1], m_rp.m_tile[2]); const dim3 grid( - std::min( ( m_rp.m_upper[0] - m_rp.m_lower[0] + block.x - 1 ) / block.x , maxblocks ) - , std::min( ( m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1 ) / block.y , maxblocks ) - , std::min( ( m_rp.m_upper[2] - m_rp.m_lower[2] + block.z - 1 ) / block.z , maxblocks ) - ); - CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_rp.space().impl_internal_space_instance() , false ); - } - else if ( RP::rank == 4 ) - { - // id0,id1 encoded within threadIdx.x; id2 to threadIdx.y; id3 to threadIdx.z - const dim3 block( m_rp.m_tile[0]*m_rp.m_tile[1] , m_rp.m_tile[2] , m_rp.m_tile[3] ); + std::min((m_rp.m_upper[0] - m_rp.m_lower[0] + block.x - 1) / block.x, + maxblocks), + std::min((m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1) / block.y, + maxblocks), + std::min((m_rp.m_upper[2] - m_rp.m_lower[2] + block.z - 1) / block.z, + maxblocks)); + CudaParallelLaunch( + *this, grid, block, 0, m_rp.space().impl_internal_space_instance(), + false); + } else if (RP::rank == 4) { + // id0,id1 encoded within threadIdx.x; id2 to threadIdx.y; id3 to + // threadIdx.z + const dim3 block(m_rp.m_tile[0] * m_rp.m_tile[1], m_rp.m_tile[2], + m_rp.m_tile[3]); const dim3 grid( - std::min( static_cast( m_rp.m_tile_end[0] * m_rp.m_tile_end[1] ) - , static_cast(maxblocks) ) - , std::min( ( m_rp.m_upper[2] - m_rp.m_lower[2] + block.y - 1 ) / block.y , maxblocks ) - , std::min( ( m_rp.m_upper[3] - m_rp.m_lower[3] + block.z - 1 ) / block.z , maxblocks ) - ); - CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_rp.space().impl_internal_space_instance() , false ); - } - else if ( RP::rank == 5 ) - { - // id0,id1 encoded within threadIdx.x; id2,id3 to threadIdx.y; id4 to threadIdx.z - const dim3 block( m_rp.m_tile[0]*m_rp.m_tile[1] , m_rp.m_tile[2]*m_rp.m_tile[3] , m_rp.m_tile[4] ); + std::min( + static_cast(m_rp.m_tile_end[0] * m_rp.m_tile_end[1]), + static_cast(maxblocks)), + std::min((m_rp.m_upper[2] - m_rp.m_lower[2] + block.y - 1) / block.y, + maxblocks), + std::min((m_rp.m_upper[3] - m_rp.m_lower[3] + block.z - 1) / block.z, + maxblocks)); + CudaParallelLaunch( + *this, grid, block, 0, m_rp.space().impl_internal_space_instance(), + false); + } else if (RP::rank == 5) { + // id0,id1 encoded within threadIdx.x; id2,id3 to threadIdx.y; id4 to + // threadIdx.z + const dim3 block(m_rp.m_tile[0] * m_rp.m_tile[1], + m_rp.m_tile[2] * m_rp.m_tile[3], m_rp.m_tile[4]); const dim3 grid( - std::min( static_cast( m_rp.m_tile_end[0] * m_rp.m_tile_end[1] ) - , static_cast(maxblocks) ) - , std::min( static_cast( m_rp.m_tile_end[2] * m_rp.m_tile_end[3] ) - , static_cast(maxblocks) ) - , std::min( ( m_rp.m_upper[4] - m_rp.m_lower[4] + block.z - 1 ) / block.z , maxblocks ) - ); - CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_rp.space().impl_internal_space_instance() , false ); - } - else if ( RP::rank == 6 ) - { - // id0,id1 encoded within threadIdx.x; id2,id3 to threadIdx.y; id4,id5 to threadIdx.z - const dim3 block( m_rp.m_tile[0]*m_rp.m_tile[1] , m_rp.m_tile[2]*m_rp.m_tile[3] , m_rp.m_tile[4]*m_rp.m_tile[5] ); + std::min( + static_cast(m_rp.m_tile_end[0] * m_rp.m_tile_end[1]), + static_cast(maxblocks)), + std::min( + static_cast(m_rp.m_tile_end[2] * m_rp.m_tile_end[3]), + static_cast(maxblocks)), + std::min((m_rp.m_upper[4] - m_rp.m_lower[4] + block.z - 1) / block.z, + maxblocks)); + CudaParallelLaunch( + *this, grid, block, 0, m_rp.space().impl_internal_space_instance(), + false); + } else if (RP::rank == 6) { + // id0,id1 encoded within threadIdx.x; id2,id3 to threadIdx.y; id4,id5 to + // threadIdx.z + const dim3 block(m_rp.m_tile[0] * m_rp.m_tile[1], + m_rp.m_tile[2] * m_rp.m_tile[3], + m_rp.m_tile[4] * m_rp.m_tile[5]); const dim3 grid( - std::min( static_cast( m_rp.m_tile_end[0] * m_rp.m_tile_end[1] ) - , static_cast(maxblocks) ) - , std::min( static_cast( m_rp.m_tile_end[2] * m_rp.m_tile_end[3] ) - , static_cast(maxblocks) ) - , std::min( static_cast( m_rp.m_tile_end[4] * m_rp.m_tile_end[5] ) - , static_cast(maxblocks) ) - ); - CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_rp.space().impl_internal_space_instance() , false ); - } - else - { + std::min( + static_cast(m_rp.m_tile_end[0] * m_rp.m_tile_end[1]), + static_cast(maxblocks)), + std::min( + static_cast(m_rp.m_tile_end[2] * m_rp.m_tile_end[3]), + static_cast(maxblocks)), + std::min( + static_cast(m_rp.m_tile_end[4] * m_rp.m_tile_end[5]), + static_cast(maxblocks))); + CudaParallelLaunch( + *this, grid, block, 0, m_rp.space().impl_internal_space_instance(), + false); + } else { printf("Kokkos::MDRange Error: Exceeded rank bounds with Cuda\n"); Kokkos::abort("Aborting"); } - } //end execute + } // end execute -// inline - ParallelFor( const FunctorType & arg_functor - , Policy arg_policy ) - : m_functor( arg_functor ) - , m_rp( arg_policy ) - {} + // inline + ParallelFor(const FunctorType& arg_functor, Policy arg_policy) + : m_functor(arg_functor), m_rp(arg_policy) {} }; +template +class ParallelFor, + Kokkos::Cuda> { + public: + typedef TeamPolicyInternal Policy; -template< class FunctorType , class ... Properties > -class ParallelFor< FunctorType - , Kokkos::TeamPolicy< Properties ... > - , Kokkos::Cuda - > -{ -public: - typedef TeamPolicyInternal< Kokkos::Cuda , Properties ... > Policy ; -private: + private: + typedef typename Policy::member_type Member; + typedef typename Policy::work_tag WorkTag; + typedef typename Policy::launch_bounds LaunchBounds; - typedef typename Policy::member_type Member ; - typedef typename Policy::work_tag WorkTag ; - typedef typename Policy::launch_bounds LaunchBounds ; + public: + typedef FunctorType functor_type; + typedef Cuda::size_type size_type; -public: - - typedef FunctorType functor_type ; - typedef Cuda::size_type size_type ; - -private: - - // Algorithmic constraints: blockDim.y is a power of two AND blockDim.y == blockDim.z == 1 - // shared memory utilization: + private: + // Algorithmic constraints: blockDim.y is a power of two AND blockDim.y == + // blockDim.z == 1 shared memory utilization: // // [ team reduce space ] // [ team shared space ] // - const FunctorType m_functor ; - const Policy m_policy ; - const size_type m_league_size ; - int m_team_size ; - const size_type m_vector_size ; - int m_shmem_begin ; - int m_shmem_size ; - void* m_scratch_ptr[2] ; - int m_scratch_size[2] ; + const FunctorType m_functor; + const Policy m_policy; + const size_type m_league_size; + int m_team_size; + const size_type m_vector_size; + int m_shmem_begin; + int m_shmem_size; + void* m_scratch_ptr[2]; + int m_scratch_size[2]; - template< class TagType > + template __device__ inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec_team( const Member & member ) const - { m_functor( member ); } + typename std::enable_if::value>::type + exec_team(const Member& member) const { + m_functor(member); + } - template< class TagType > + template __device__ inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec_team( const Member & member ) const - { m_functor( TagType() , member ); } + typename std::enable_if::value>::type + exec_team(const Member& member) const { + m_functor(TagType(), member); + } -public: - - __device__ inline - void operator()(void) const - { + public: + __device__ inline void operator()(void) const { // Iterate this block through the league int64_t threadid = 0; - if ( m_scratch_size[1]>0 ) { + if (m_scratch_size[1] > 0) { __shared__ int64_t base_thread_id; - if (threadIdx.x==0 && threadIdx.y==0 ) { - threadid = (blockIdx.x*blockDim.z + threadIdx.z) % - (Kokkos::Impl::g_device_cuda_lock_arrays.n / (blockDim.x * blockDim.y)); + if (threadIdx.x == 0 && threadIdx.y == 0) { + threadid = (blockIdx.x * blockDim.z + threadIdx.z) % + (Kokkos::Impl::g_device_cuda_lock_arrays.n / + (blockDim.x * blockDim.y)); threadid *= blockDim.x * blockDim.y; int done = 0; while (!done) { - done = (0 == atomicCAS(&Kokkos::Impl::g_device_cuda_lock_arrays.scratch[threadid],0,1)); - if(!done) { + done = + (0 == + atomicCAS( + &Kokkos::Impl::g_device_cuda_lock_arrays.scratch[threadid], + 0, 1)); + if (!done) { threadid += blockDim.x * blockDim.y; - if(int64_t(threadid+blockDim.x * blockDim.y) >= int64_t(Kokkos::Impl::g_device_cuda_lock_arrays.n)) threadid = 0; + if (int64_t(threadid + blockDim.x * blockDim.y) >= + int64_t(Kokkos::Impl::g_device_cuda_lock_arrays.n)) + threadid = 0; } } base_thread_id = threadid; @@ -736,79 +834,102 @@ public: threadid = base_thread_id; } - const int int_league_size = (int)m_league_size; - for ( int league_rank = blockIdx.x ; league_rank < int_league_size ; league_rank += gridDim.x ) { - - this-> template exec_team< WorkTag >( - typename Policy::member_type( kokkos_impl_cuda_shared_memory() - , m_shmem_begin - , m_shmem_size - , (void*) ( ((char*)m_scratch_ptr[1]) + ptrdiff_t(threadid/(blockDim.x*blockDim.y)) * m_scratch_size[1]) - , m_scratch_size[1] - , league_rank - , m_league_size ) ); + for (int league_rank = blockIdx.x; league_rank < int_league_size; + league_rank += gridDim.x) { + this->template exec_team(typename Policy::member_type( + kokkos_impl_cuda_shared_memory(), m_shmem_begin, m_shmem_size, + (void*)(((char*)m_scratch_ptr[1]) + + ptrdiff_t(threadid / (blockDim.x * blockDim.y)) * + m_scratch_size[1]), + m_scratch_size[1], league_rank, m_league_size)); } - if ( m_scratch_size[1]>0 ) { + if (m_scratch_size[1] > 0) { __syncthreads(); - if (threadIdx.x==0 && threadIdx.y==0 ) - Kokkos::Impl::g_device_cuda_lock_arrays.scratch[threadid]=0; + if (threadIdx.x == 0 && threadIdx.y == 0) + Kokkos::Impl::g_device_cuda_lock_arrays.scratch[threadid] = 0; } } - inline - void execute() const - { - const int64_t shmem_size_total = m_shmem_begin + m_shmem_size ; - const dim3 grid( int(m_league_size) , 1 , 1 ); - const dim3 block( int(m_vector_size) , int(m_team_size) , 1 ); - - CudaParallelLaunch< ParallelFor, LaunchBounds >( *this, grid, block, shmem_size_total, m_policy.space().impl_internal_space_instance() , true ); // copy to device and execute + inline void execute() const { + const int64_t shmem_size_total = m_shmem_begin + m_shmem_size; + dim3 grid(int(m_league_size), 1, 1); + const dim3 block(int(m_vector_size), int(m_team_size), 1); +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + if (Kokkos::Impl::CudaInternal::cuda_use_serial_execution()) { + grid = dim3(1, 1, 1); } +#endif - ParallelFor( const FunctorType & arg_functor - , const Policy & arg_policy - ) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_league_size( arg_policy.league_size() ) - , m_team_size( arg_policy.team_size() ) - , m_vector_size( arg_policy.vector_length() ) - { - cudaFuncAttributes attr = CudaParallelLaunch< ParallelFor, LaunchBounds >:: - get_cuda_func_attributes(); - m_team_size = m_team_size>=0?m_team_size:Kokkos::Impl::cuda_get_opt_block_size< FunctorType, LaunchBounds>( + CudaParallelLaunch( + *this, grid, block, shmem_size_total, m_policy.space().impl_internal_space_instance(), - attr, m_functor , m_vector_size, - m_policy.team_scratch_size(0), m_policy.thread_scratch_size(0) )/m_vector_size; + true); // copy to device and execute + } - m_shmem_begin = ( sizeof(double) * ( m_team_size + 2 ) ); - m_shmem_size = ( m_policy.scratch_size(0,m_team_size) + FunctorTeamShmemSize< FunctorType >::value( m_functor , m_team_size ) ); - m_scratch_size[0] = m_policy.scratch_size(0,m_team_size); - m_scratch_size[1] = m_policy.scratch_size(1,m_team_size); + ParallelFor(const FunctorType& arg_functor, const Policy& arg_policy) + : m_functor(arg_functor), + m_policy(arg_policy), + m_league_size(arg_policy.league_size()), + m_team_size(arg_policy.team_size()), + m_vector_size(arg_policy.vector_length()) { + cudaFuncAttributes attr = + CudaParallelLaunch::get_cuda_func_attributes(); + m_team_size = + m_team_size >= 0 + ? m_team_size + : Kokkos::Impl::cuda_get_opt_block_size( + m_policy.space().impl_internal_space_instance(), attr, + m_functor, m_vector_size, m_policy.team_scratch_size(0), + m_policy.thread_scratch_size(0)) / + m_vector_size; - // Functor's reduce memory, team scan memory, and team shared memory depend upon team size. - m_scratch_ptr[0] = NULL; - m_scratch_ptr[1] = m_team_size<=0?NULL:cuda_resize_scratch_space(static_cast(m_scratch_size[1])*static_cast(Cuda::concurrency()/(m_team_size*m_vector_size))); + m_shmem_begin = (sizeof(double) * (m_team_size + 2)); + m_shmem_size = + (m_policy.scratch_size(0, m_team_size) + + FunctorTeamShmemSize::value(m_functor, m_team_size)); + m_scratch_size[0] = m_policy.scratch_size(0, m_team_size); + m_scratch_size[1] = m_policy.scratch_size(1, m_team_size); - const int shmem_size_total = m_shmem_begin + m_shmem_size ; - if ( m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < shmem_size_total ) { - printf("%i %i\n",m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock,shmem_size_total); - Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelFor< Cuda > insufficient shared memory")); - } + // Functor's reduce memory, team scan memory, and team shared memory depend + // upon team size. + m_scratch_ptr[0] = NULL; + m_scratch_ptr[1] = + m_team_size <= 0 + ? NULL + : cuda_resize_scratch_space( + static_cast(m_scratch_size[1]) * + static_cast(Cuda::concurrency() / + (m_team_size * m_vector_size))); - if ( int(m_team_size) > - int(Kokkos::Impl::cuda_get_max_block_size< FunctorType, LaunchBounds > - ( m_policy.space().impl_internal_space_instance(), - attr, arg_functor , arg_policy.vector_length(), arg_policy.team_scratch_size(0),arg_policy.thread_scratch_size(0) ) / arg_policy.vector_length())) { - Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelFor< Cuda > requested too large team size.")); - } + const int shmem_size_total = m_shmem_begin + m_shmem_size; + if (m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < + shmem_size_total) { + printf( + "%i %i\n", + m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock, + shmem_size_total); + Kokkos::Impl::throw_runtime_exception(std::string( + "Kokkos::Impl::ParallelFor< Cuda > insufficient shared memory")); } + + if (int(m_team_size) > + int(Kokkos::Impl::cuda_get_max_block_size( + m_policy.space().impl_internal_space_instance(), attr, + arg_functor, arg_policy.vector_length(), + arg_policy.team_scratch_size(0), + arg_policy.thread_scratch_size(0)) / + arg_policy.vector_length())) { + Kokkos::Impl::throw_runtime_exception(std::string( + "Kokkos::Impl::ParallelFor< Cuda > requested too large team size.")); + } + } }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -816,576 +937,696 @@ public: namespace Kokkos { namespace Impl { -template< class FunctorType , class ReducerType, class ... Traits > -class ParallelReduce< FunctorType - , Kokkos::RangePolicy< Traits ... > - , ReducerType - , Kokkos::Cuda - > -{ -public: - typedef Kokkos::RangePolicy< Traits ... > Policy ; -private: +template +class ParallelReduce, ReducerType, + Kokkos::Cuda> { + public: + typedef Kokkos::RangePolicy Policy; + private: + typedef typename Policy::WorkRange WorkRange; + typedef typename Policy::work_tag WorkTag; + typedef typename Policy::member_type Member; + typedef typename Policy::launch_bounds LaunchBounds; - typedef typename Policy::WorkRange WorkRange ; - typedef typename Policy::work_tag WorkTag ; - typedef typename Policy::member_type Member ; - typedef typename Policy::launch_bounds LaunchBounds ; - - typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType> ReducerConditional; + typedef Kokkos::Impl::if_c::value, + FunctorType, ReducerType> + ReducerConditional; typedef typename ReducerConditional::type ReducerTypeFwd; - typedef typename Kokkos::Impl::if_c< std::is_same::value, WorkTag, void>::type WorkTagFwd; + typedef + typename Kokkos::Impl::if_c::value, + WorkTag, void>::type WorkTagFwd; - typedef Kokkos::Impl::FunctorValueTraits< ReducerTypeFwd, WorkTagFwd > ValueTraits ; - typedef Kokkos::Impl::FunctorValueInit< ReducerTypeFwd, WorkTagFwd > ValueInit ; - typedef Kokkos::Impl::FunctorValueJoin< ReducerTypeFwd, WorkTagFwd > ValueJoin ; + typedef Kokkos::Impl::FunctorValueTraits + ValueTraits; + typedef Kokkos::Impl::FunctorValueInit ValueInit; + typedef Kokkos::Impl::FunctorValueJoin ValueJoin; -public: + public: + typedef typename ValueTraits::pointer_type pointer_type; + typedef typename ValueTraits::value_type value_type; + typedef typename ValueTraits::reference_type reference_type; + typedef FunctorType functor_type; + typedef Kokkos::Cuda::size_type size_type; + typedef typename Policy::index_type index_type; - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::value_type value_type ; - typedef typename ValueTraits::reference_type reference_type ; - typedef FunctorType functor_type ; - typedef Kokkos::Cuda::size_type size_type ; - typedef typename Policy::index_type index_type ; + // Algorithmic constraints: blockSize is a power of two AND blockDim.y == + // blockDim.z == 1 - // Algorithmic constraints: blockSize is a power of two AND blockDim.y == blockDim.z == 1 + const FunctorType m_functor; + const Policy m_policy; + const ReducerType m_reducer; + const pointer_type m_result_ptr; + const bool m_result_ptr_device_accessible; + size_type* m_scratch_space; + size_type* m_scratch_flags; + size_type* m_unified_space; - const FunctorType m_functor ; - const Policy m_policy ; - const ReducerType m_reducer ; - const pointer_type m_result_ptr ; - const bool m_result_ptr_device_accessible ; - size_type * m_scratch_space ; - size_type * m_scratch_flags ; - size_type * m_unified_space ; - - // Shall we use the shfl based reduction or not (only use it for static sized types of more than 128bit) - enum { UseShflReduction = false };//((sizeof(value_type)>2*sizeof(double)) && ValueTraits::StaticValueSize) }; - // Some crutch to do function overloading -private: + // Shall we use the shfl based reduction or not (only use it for static sized + // types of more than 128bit) + enum { + UseShflReduction = false + }; //((sizeof(value_type)>2*sizeof(double)) && ValueTraits::StaticValueSize) + //}; + // Some crutch to do function overloading + private: typedef double DummyShflReductionType; typedef int DummySHMEMReductionType; -public: + public: // Make the exec_range calls call to Reduce::DeviceIterateTile - template< class TagType > + template __device__ inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec_range( const Member & i , reference_type update ) const - { m_functor( i , update ); } - - template< class TagType > - __device__ inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec_range( const Member & i , reference_type update ) const - { m_functor( TagType() , i , update ); } - - __device__ inline - void operator() () const { -/* run(Kokkos::Impl::if_c::select(1,1.0) ); + typename std::enable_if::value>::type + exec_range(const Member& i, reference_type update) const { + m_functor(i, update); } + template __device__ inline - void run(const DummySHMEMReductionType& ) const - {*/ - const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) > - word_count( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) / sizeof(size_type) ); + typename std::enable_if::value>::type + exec_range(const Member& i, reference_type update) const { + m_functor(TagType(), i, update); + } + + __device__ inline void operator()() const { + /* run(Kokkos::Impl::if_c::select(1,1.0) ); + } + + __device__ inline + void run(const DummySHMEMReductionType& ) const + {*/ + const integral_nonzero_constant + word_count(ValueTraits::value_size( + ReducerConditional::select(m_functor, m_reducer)) / + sizeof(size_type)); { reference_type value = - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , kokkos_impl_cuda_shared_memory() + threadIdx.y * word_count.value ); + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + kokkos_impl_cuda_shared_memory() + + threadIdx.y * word_count.value); - // Number of blocks is bounded so that the reduction can be limited to two passes. - // Each thread block is given an approximately equal amount of work to perform. - // Accumulate the values for this block. - // The accumulation ordering does not match the final pass, but is arithmatically equivalent. + // Number of blocks is bounded so that the reduction can be limited to two + // passes. Each thread block is given an approximately equal amount of + // work to perform. Accumulate the values for this block. The accumulation + // ordering does not match the final pass, but is arithmatically + // equivalent. - const WorkRange range( m_policy , blockIdx.x , gridDim.x ); + const WorkRange range(m_policy, blockIdx.x, gridDim.x); - for ( Member iwork = range.begin() + threadIdx.y , iwork_end = range.end() ; - iwork < iwork_end ; iwork += blockDim.y ) { - this-> template exec_range< WorkTag >( iwork , value ); + for (Member iwork = range.begin() + threadIdx.y, iwork_end = range.end(); + iwork < iwork_end; iwork += blockDim.y) { + this->template exec_range(iwork, value); } } // Reduce with final value at blockDim.y - 1 location. - if ( cuda_single_inter_block_reduce_scan( - ReducerConditional::select(m_functor , m_reducer) , blockIdx.x , gridDim.x , - kokkos_impl_cuda_shared_memory() , m_scratch_space , m_scratch_flags ) ) { + if (cuda_single_inter_block_reduce_scan( + ReducerConditional::select(m_functor, m_reducer), blockIdx.x, + gridDim.x, kokkos_impl_cuda_shared_memory(), + m_scratch_space, m_scratch_flags)) { + // This is the final block with the final result at the final threads' + // location - // This is the final block with the final result at the final threads' location + size_type* const shared = kokkos_impl_cuda_shared_memory() + + (blockDim.y - 1) * word_count.value; + size_type* const global = + m_result_ptr_device_accessible + ? reinterpret_cast(m_result_ptr) + : (m_unified_space ? m_unified_space : m_scratch_space); - size_type * const shared = kokkos_impl_cuda_shared_memory() + ( blockDim.y - 1 ) * word_count.value ; - size_type * const global = m_result_ptr_device_accessible? reinterpret_cast(m_result_ptr) : - ( m_unified_space ? m_unified_space : m_scratch_space ); - - if ( threadIdx.y == 0 ) { - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >::final( ReducerConditional::select(m_functor , m_reducer) , shared ); + if (threadIdx.y == 0) { + Kokkos::Impl::FunctorFinal::final( + ReducerConditional::select(m_functor, m_reducer), shared); } - if ( CudaTraits::WarpSize < word_count.value ) { __syncthreads(); } + if (CudaTraits::WarpSize < word_count.value) { + __syncthreads(); + } - for ( unsigned i = threadIdx.y ; i < word_count.value ; i += blockDim.y ) { global[i] = shared[i]; } + for (unsigned i = threadIdx.y; i < word_count.value; i += blockDim.y) { + global[i] = shared[i]; + } } } -/* __device__ inline - void run(const DummyShflReductionType&) const - { - value_type value; - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , &value); - // Number of blocks is bounded so that the reduction can be limited to two passes. - // Each thread block is given an approximately equal amount of work to perform. - // Accumulate the values for this block. - // The accumulation ordering does not match the final pass, but is arithmatically equivalent. + /* __device__ inline + void run(const DummyShflReductionType&) const + { + value_type value; + ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , + &value); + // Number of blocks is bounded so that the reduction can be limited to + two passes. + // Each thread block is given an approximately equal amount of work to + perform. + // Accumulate the values for this block. + // The accumulation ordering does not match the final pass, but is + arithmatically equivalent. - const WorkRange range( m_policy , blockIdx.x , gridDim.x ); + const WorkRange range( m_policy , blockIdx.x , gridDim.x ); - for ( Member iwork = range.begin() + threadIdx.y , iwork_end = range.end() ; - iwork < iwork_end ; iwork += blockDim.y ) { - this-> template exec_range< WorkTag >( iwork , value ); - } - - pointer_type const result = (pointer_type) (m_unified_space ? m_unified_space : m_scratch_space) ; - - int max_active_thread = range.end()-range.begin() < blockDim.y ? range.end() - range.begin():blockDim.y; - - max_active_thread = (max_active_thread == 0)?blockDim.y:max_active_thread; - - value_type init; - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , &init); - if(Impl::cuda_inter_block_reduction - (value,init,ValueJoin(ReducerConditional::select(m_functor , m_reducer)),m_scratch_space,result,m_scratch_flags,max_active_thread)) { - const unsigned id = threadIdx.y*blockDim.x + threadIdx.x; - if(id==0) { - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >::final( ReducerConditional::select(m_functor , m_reducer) , (void*) &value ); - *result = value; + for ( Member iwork = range.begin() + threadIdx.y , iwork_end = + range.end() ; iwork < iwork_end ; iwork += blockDim.y ) { this-> template + exec_range< WorkTag >( iwork , value ); } - } - }*/ + + pointer_type const result = (pointer_type) (m_unified_space ? + m_unified_space : m_scratch_space) ; + + int max_active_thread = range.end()-range.begin() < blockDim.y ? + range.end() - range.begin():blockDim.y; + + max_active_thread = (max_active_thread == + 0)?blockDim.y:max_active_thread; + + value_type init; + ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , + &init); + if(Impl::cuda_inter_block_reduction + (value,init,ValueJoin(ReducerConditional::select(m_functor , + m_reducer)),m_scratch_space,result,m_scratch_flags,max_active_thread)) { + const unsigned id = threadIdx.y*blockDim.x + threadIdx.x; + if(id==0) { + Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >::final( + ReducerConditional::select(m_functor , m_reducer) , (void*) &value ); + *result = value; + } + } + }*/ // Determine block size constrained by shared memory: - inline - unsigned local_block_size( const FunctorType & f ) - { - unsigned n = CudaTraits::WarpSize * 8 ; - int shmem_size = cuda_single_inter_block_reduce_scan_shmem( f , n ); - while ( (n && (m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < shmem_size)) || - (n > static_cast(Kokkos::Impl::cuda_get_max_block_size< ParallelReduce, LaunchBounds>( f , 1, shmem_size , 0 )))) { - n >>= 1 ; - shmem_size = cuda_single_inter_block_reduce_scan_shmem( f , n ); - } - return n ; + inline unsigned local_block_size(const FunctorType& f) { + unsigned n = CudaTraits::WarpSize * 8; + int shmem_size = + cuda_single_inter_block_reduce_scan_shmem( + f, n); + while ( + (n && + (m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < + shmem_size)) || + (n > static_cast( + Kokkos::Impl::cuda_get_max_block_size< + ParallelReduce, LaunchBounds>(f, 1, shmem_size, 0)))) { + n >>= 1; + shmem_size = cuda_single_inter_block_reduce_scan_shmem(f, n); } + return n; + } - inline - void execute() - { - const index_type nwork = m_policy.end() - m_policy.begin(); - if ( nwork ) { - const int block_size = local_block_size( m_functor ); + inline void execute() { + const index_type nwork = m_policy.end() - m_policy.begin(); + if (nwork) { + const int block_size = local_block_size(m_functor); - m_scratch_space = cuda_internal_scratch_space( m_policy.space(), ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) * block_size /* block_size == max block_count */ ); - m_scratch_flags = cuda_internal_scratch_flags( m_policy.space(), sizeof(size_type) ); - m_unified_space = cuda_internal_scratch_unified( m_policy.space(), ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) ); + m_scratch_space = cuda_internal_scratch_space( + m_policy.space(), ValueTraits::value_size(ReducerConditional::select( + m_functor, m_reducer)) * + block_size /* block_size == max block_count */); + m_scratch_flags = + cuda_internal_scratch_flags(m_policy.space(), sizeof(size_type)); + m_unified_space = cuda_internal_scratch_unified( + m_policy.space(), ValueTraits::value_size(ReducerConditional::select( + m_functor, m_reducer))); - // REQUIRED ( 1 , N , 1 ) - const dim3 block( 1 , block_size , 1 ); - // Required grid.x <= block.y - const dim3 grid( std::min( int(block.y) , int( ( nwork + block.y - 1 ) / block.y ) ) , 1 , 1 ); + // REQUIRED ( 1 , N , 1 ) + dim3 block(1, block_size, 1); + // Required grid.x <= block.y + dim3 grid(std::min(int(block.y), int((nwork + block.y - 1) / block.y)), 1, + 1); - const int shmem = UseShflReduction?0:cuda_single_inter_block_reduce_scan_shmem( m_functor , block.y ); + const int shmem = + UseShflReduction + ? 0 + : cuda_single_inter_block_reduce_scan_shmem(m_functor, + block.y); - CudaParallelLaunch< ParallelReduce, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + if (Kokkos::Impl::CudaInternal::cuda_use_serial_execution()) { + block = dim3(1, 1, 1); + grid = dim3(1, 1, 1); + } +#endif - if(!m_result_ptr_device_accessible) { + CudaParallelLaunch( + *this, grid, block, shmem, + m_policy.space().impl_internal_space_instance(), + false); // copy to device and execute + + if (!m_result_ptr_device_accessible) { Cuda().fence(); - if ( m_result_ptr ) { - if ( m_unified_space ) { - const int count = ValueTraits::value_count( ReducerConditional::select(m_functor , m_reducer) ); - for ( int i = 0 ; i < count ; ++i ) { m_result_ptr[i] = pointer_type(m_unified_space)[i] ; } - } - else { - const int size = ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ); - DeepCopy( m_result_ptr , m_scratch_space , size ); + if (m_result_ptr) { + if (m_unified_space) { + const int count = ValueTraits::value_count( + ReducerConditional::select(m_functor, m_reducer)); + for (int i = 0; i < count; ++i) { + m_result_ptr[i] = pointer_type(m_unified_space)[i]; + } + } else { + const int size = ValueTraits::value_size( + ReducerConditional::select(m_functor, m_reducer)); + DeepCopy(m_result_ptr, m_scratch_space, size); } } } - } - else { + } else { if (m_result_ptr) { - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , m_result_ptr ); + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + m_result_ptr); } } } - template< class ViewType > - ParallelReduce( const FunctorType & arg_functor - , const Policy & arg_policy - , const ViewType & arg_result - , typename std::enable_if< - Kokkos::is_view< ViewType >::value - ,void*>::type = NULL) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_reducer( InvalidType() ) - , m_result_ptr( arg_result.data() ) - , m_result_ptr_device_accessible(MemorySpaceAccess< Kokkos::CudaSpace , typename ViewType::memory_space>::accessible ) - , m_scratch_space( 0 ) - , m_scratch_flags( 0 ) - , m_unified_space( 0 ) - { } + template + ParallelReduce(const FunctorType& arg_functor, const Policy& arg_policy, + const ViewType& arg_result, + typename std::enable_if::value, + void*>::type = NULL) + : m_functor(arg_functor), + m_policy(arg_policy), + m_reducer(InvalidType()), + m_result_ptr(arg_result.data()), + m_result_ptr_device_accessible( + MemorySpaceAccess::accessible), + m_scratch_space(0), + m_scratch_flags(0), + m_unified_space(0) {} - ParallelReduce( const FunctorType & arg_functor - , const Policy & arg_policy - , const ReducerType & reducer) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_reducer( reducer ) - , m_result_ptr( reducer.view().data() ) - , m_result_ptr_device_accessible(MemorySpaceAccess< Kokkos::CudaSpace , typename ReducerType::result_view_type::memory_space>::accessible ) - , m_scratch_space( 0 ) - , m_scratch_flags( 0 ) - , m_unified_space( 0 ) - { } + ParallelReduce(const FunctorType& arg_functor, const Policy& arg_policy, + const ReducerType& reducer) + : m_functor(arg_functor), + m_policy(arg_policy), + m_reducer(reducer), + m_result_ptr(reducer.view().data()), + m_result_ptr_device_accessible( + MemorySpaceAccess::accessible), + m_scratch_space(0), + m_scratch_flags(0), + m_unified_space(0) {} }; - // MDRangePolicy impl -template< class FunctorType , class ReducerType, class ... Traits > -class ParallelReduce< FunctorType - , Kokkos::MDRangePolicy< Traits ... > - , ReducerType - , Kokkos::Cuda - > -{ -public: - typedef Kokkos::MDRangePolicy< Traits ... > Policy ; -private: +template +class ParallelReduce, ReducerType, + Kokkos::Cuda> { + public: + typedef Kokkos::MDRangePolicy Policy; - typedef typename Policy::array_index_type array_index_type; - typedef typename Policy::index_type index_type; + private: + typedef typename Policy::array_index_type array_index_type; + typedef typename Policy::index_type index_type; - typedef typename Policy::work_tag WorkTag ; - typedef typename Policy::member_type Member ; + typedef typename Policy::work_tag WorkTag; + typedef typename Policy::member_type Member; typedef typename Policy::launch_bounds LaunchBounds; - typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType> ReducerConditional; + typedef Kokkos::Impl::if_c::value, + FunctorType, ReducerType> + ReducerConditional; typedef typename ReducerConditional::type ReducerTypeFwd; - typedef typename Kokkos::Impl::if_c< std::is_same::value, WorkTag, void>::type WorkTagFwd; + typedef + typename Kokkos::Impl::if_c::value, + WorkTag, void>::type WorkTagFwd; - typedef Kokkos::Impl::FunctorValueTraits< ReducerTypeFwd, WorkTagFwd > ValueTraits ; - typedef Kokkos::Impl::FunctorValueInit< ReducerTypeFwd, WorkTagFwd > ValueInit ; - typedef Kokkos::Impl::FunctorValueJoin< ReducerTypeFwd, WorkTagFwd > ValueJoin ; + typedef Kokkos::Impl::FunctorValueTraits + ValueTraits; + typedef Kokkos::Impl::FunctorValueInit ValueInit; + typedef Kokkos::Impl::FunctorValueJoin ValueJoin; -public: + public: + typedef typename ValueTraits::pointer_type pointer_type; + typedef typename ValueTraits::value_type value_type; + typedef typename ValueTraits::reference_type reference_type; + typedef FunctorType functor_type; + typedef Cuda::size_type size_type; - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::value_type value_type ; - typedef typename ValueTraits::reference_type reference_type ; - typedef FunctorType functor_type ; - typedef Cuda::size_type size_type ; + // Algorithmic constraints: blockSize is a power of two AND blockDim.y == + // blockDim.z == 1 - // Algorithmic constraints: blockSize is a power of two AND blockDim.y == blockDim.z == 1 + const FunctorType m_functor; + const Policy m_policy; // used for workrange and nwork + const ReducerType m_reducer; + const pointer_type m_result_ptr; + const bool m_result_ptr_device_accessible; + size_type* m_scratch_space; + size_type* m_scratch_flags; + size_type* m_unified_space; - const FunctorType m_functor ; - const Policy m_policy ; // used for workrange and nwork - const ReducerType m_reducer ; - const pointer_type m_result_ptr ; - const bool m_result_ptr_device_accessible ; - size_type * m_scratch_space ; - size_type * m_scratch_flags ; - size_type * m_unified_space ; + typedef typename Kokkos::Impl::Reduce::DeviceIterateTile< + Policy::rank, Policy, FunctorType, typename Policy::work_tag, + reference_type> + DeviceIteratePattern; - typedef typename Kokkos::Impl::Reduce::DeviceIterateTile DeviceIteratePattern; - - // Shall we use the shfl based reduction or not (only use it for static sized types of more than 128bit - enum { UseShflReduction = ((sizeof(value_type)>2*sizeof(double)) && (ValueTraits::StaticValueSize!=0)) }; + // Shall we use the shfl based reduction or not (only use it for static sized + // types of more than 128bit + enum { + UseShflReduction = ((sizeof(value_type) > 2 * sizeof(double)) && + (ValueTraits::StaticValueSize != 0)) + }; // Some crutch to do function overloading -private: + private: typedef double DummyShflReductionType; typedef int DummySHMEMReductionType; -public: - inline - __device__ - void - exec_range( reference_type update ) const - { - Kokkos::Impl::Reduce::DeviceIterateTile(m_policy, m_functor, update).exec_range(); + public: + inline __device__ void exec_range(reference_type update) const { + Kokkos::Impl::Reduce::DeviceIterateTile(m_policy, m_functor, + update) + .exec_range(); } - inline - __device__ - void operator() (void) const { -/* run(Kokkos::Impl::if_c::select(1,1.0) ); - } + inline __device__ void operator()(void) const { + /* run(Kokkos::Impl::if_c::select(1,1.0) ); + } - __device__ inline - void run(const DummySHMEMReductionType& ) const - {*/ - const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) > - word_count( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) / sizeof(size_type) ); + __device__ inline + void run(const DummySHMEMReductionType& ) const + {*/ + const integral_nonzero_constant + word_count(ValueTraits::value_size( + ReducerConditional::select(m_functor, m_reducer)) / + sizeof(size_type)); { reference_type value = - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , kokkos_impl_cuda_shared_memory() + threadIdx.y * word_count.value ); + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + kokkos_impl_cuda_shared_memory() + + threadIdx.y * word_count.value); - // Number of blocks is bounded so that the reduction can be limited to two passes. - // Each thread block is given an approximately equal amount of work to perform. - // Accumulate the values for this block. - // The accumulation ordering does not match the final pass, but is arithmatically equivalent. + // Number of blocks is bounded so that the reduction can be limited to two + // passes. Each thread block is given an approximately equal amount of + // work to perform. Accumulate the values for this block. The accumulation + // ordering does not match the final pass, but is arithmatically + // equivalent. - this-> exec_range( value ); + this->exec_range(value); } // Reduce with final value at blockDim.y - 1 location. // Problem: non power-of-two blockDim - if ( cuda_single_inter_block_reduce_scan( - ReducerConditional::select(m_functor , m_reducer) , blockIdx.x , gridDim.x , - kokkos_impl_cuda_shared_memory() , m_scratch_space , m_scratch_flags ) ) { + if (cuda_single_inter_block_reduce_scan( + ReducerConditional::select(m_functor, m_reducer), blockIdx.x, + gridDim.x, kokkos_impl_cuda_shared_memory(), + m_scratch_space, m_scratch_flags)) { + // This is the final block with the final result at the final threads' + // location + size_type* const shared = kokkos_impl_cuda_shared_memory() + + (blockDim.y - 1) * word_count.value; + size_type* const global = + m_result_ptr_device_accessible + ? reinterpret_cast(m_result_ptr) + : (m_unified_space ? m_unified_space : m_scratch_space); - // This is the final block with the final result at the final threads' location - size_type * const shared = kokkos_impl_cuda_shared_memory() + ( blockDim.y - 1 ) * word_count.value ; - size_type * const global = m_result_ptr_device_accessible? reinterpret_cast(m_result_ptr) : - ( m_unified_space ? m_unified_space : m_scratch_space ); - - if ( threadIdx.y == 0 ) { - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >::final( ReducerConditional::select(m_functor , m_reducer) , shared ); + if (threadIdx.y == 0) { + Kokkos::Impl::FunctorFinal::final( + ReducerConditional::select(m_functor, m_reducer), shared); } - if ( CudaTraits::WarpSize < word_count.value ) { __syncthreads(); } + if (CudaTraits::WarpSize < word_count.value) { + __syncthreads(); + } - for ( unsigned i = threadIdx.y ; i < word_count.value ; i += blockDim.y ) { global[i] = shared[i]; } + for (unsigned i = threadIdx.y; i < word_count.value; i += blockDim.y) { + global[i] = shared[i]; + } } } -/* __device__ inline - void run(const DummyShflReductionType&) const - { + /* __device__ inline + void run(const DummyShflReductionType&) const + { - value_type value; - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , &value); - // Number of blocks is bounded so that the reduction can be limited to two passes. - // Each thread block is given an approximately equal amount of work to perform. - // Accumulate the values for this block. - // The accumulation ordering does not match the final pass, but is arithmatically equivalent. + value_type value; + ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , + &value); + // Number of blocks is bounded so that the reduction can be limited to + two passes. + // Each thread block is given an approximately equal amount of work to + perform. + // Accumulate the values for this block. + // The accumulation ordering does not match the final pass, but is + arithmatically equivalent. - const Member work_part = - ( ( m_policy.m_num_tiles + ( gridDim.x - 1 ) ) / gridDim.x ); //portion of tiles handled by each block + const Member work_part = + ( ( m_policy.m_num_tiles + ( gridDim.x - 1 ) ) / gridDim.x ); //portion + of tiles handled by each block - this-> exec_range( value ); + this-> exec_range( value ); - pointer_type const result = (pointer_type) (m_unified_space ? m_unified_space : m_scratch_space) ; + pointer_type const result = (pointer_type) (m_unified_space ? + m_unified_space : m_scratch_space) ; - int max_active_thread = work_part < blockDim.y ? work_part:blockDim.y; - max_active_thread = (max_active_thread == 0)?blockDim.y:max_active_thread; + int max_active_thread = work_part < blockDim.y ? work_part:blockDim.y; + max_active_thread = (max_active_thread == + 0)?blockDim.y:max_active_thread; - value_type init; - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , &init); - if(Impl::cuda_inter_block_reduction - (value,init,ValueJoin(ReducerConditional::select(m_functor , m_reducer)),m_scratch_space,result,m_scratch_flags,max_active_thread)) { - const unsigned id = threadIdx.y*blockDim.x + threadIdx.x; - if(id==0) { - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >::final( ReducerConditional::select(m_functor , m_reducer) , (void*) &value ); - *result = value; + value_type init; + ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , + &init); + if(Impl::cuda_inter_block_reduction + (value,init,ValueJoin(ReducerConditional::select(m_functor , + m_reducer)),m_scratch_space,result,m_scratch_flags,max_active_thread)) { + const unsigned id = threadIdx.y*blockDim.x + threadIdx.x; + if(id==0) { + Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >::final( + ReducerConditional::select(m_functor , m_reducer) , (void*) &value ); + *result = value; + } } } - } -*/ + */ // Determine block size constrained by shared memory: - inline - unsigned local_block_size( const FunctorType & f ) - { - unsigned n = CudaTraits::WarpSize * 8 ; - int shmem_size = cuda_single_inter_block_reduce_scan_shmem( f , n ); - while ( (n && (m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < shmem_size)) || - (n > static_cast(Kokkos::Impl::cuda_get_max_block_size< ParallelReduce, LaunchBounds>( f , 1, shmem_size , 0 )))) { - n >>= 1 ; - shmem_size = cuda_single_inter_block_reduce_scan_shmem( f , n ); - } - return n ; + inline unsigned local_block_size(const FunctorType& f) { + unsigned n = CudaTraits::WarpSize * 8; + int shmem_size = + cuda_single_inter_block_reduce_scan_shmem( + f, n); + while ( + (n && + (m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < + shmem_size)) || + (n > static_cast( + Kokkos::Impl::cuda_get_max_block_size< + ParallelReduce, LaunchBounds>(f, 1, shmem_size, 0)))) { + n >>= 1; + shmem_size = cuda_single_inter_block_reduce_scan_shmem(f, n); } + return n; + } - inline - void execute() - { - const int nwork = m_policy.m_num_tiles; - if ( nwork ) { - int block_size = m_policy.m_prod_tile_dims; - // CONSTRAINT: Algorithm requires block_size >= product of tile dimensions - // Nearest power of two - int exponent_pow_two = std::ceil( std::log2(block_size) ); - block_size = std::pow(2, exponent_pow_two); - int suggested_blocksize = local_block_size( m_functor ); + inline void execute() { + const int nwork = m_policy.m_num_tiles; + if (nwork) { + int block_size = m_policy.m_prod_tile_dims; + // CONSTRAINT: Algorithm requires block_size >= product of tile dimensions + // Nearest power of two + int exponent_pow_two = std::ceil(std::log2(block_size)); + block_size = std::pow(2, exponent_pow_two); + int suggested_blocksize = local_block_size(m_functor); - block_size = (block_size > suggested_blocksize) ? block_size : suggested_blocksize ; //Note: block_size must be less than or equal to 512 + block_size = (block_size > suggested_blocksize) + ? block_size + : suggested_blocksize; // Note: block_size must be less + // than or equal to 512 + m_scratch_space = cuda_internal_scratch_space( + m_policy.space(), ValueTraits::value_size(ReducerConditional::select( + m_functor, m_reducer)) * + block_size /* block_size == max block_count */); + m_scratch_flags = + cuda_internal_scratch_flags(m_policy.space(), sizeof(size_type)); + m_unified_space = cuda_internal_scratch_unified( + m_policy.space(), ValueTraits::value_size(ReducerConditional::select( + m_functor, m_reducer))); - m_scratch_space = cuda_internal_scratch_space( m_policy.space(), ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) * block_size /* block_size == max block_count */ ); - m_scratch_flags = cuda_internal_scratch_flags( m_policy.space(), sizeof(size_type) ); - m_unified_space = cuda_internal_scratch_unified( m_policy.space(), ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) ); + // REQUIRED ( 1 , N , 1 ) + const dim3 block(1, block_size, 1); + // Required grid.x <= block.y + const dim3 grid(std::min(int(block.y), int(nwork)), 1, 1); - // REQUIRED ( 1 , N , 1 ) - const dim3 block( 1 , block_size , 1 ); - // Required grid.x <= block.y - const dim3 grid( std::min( int(block.y) , int( nwork ) ) , 1 , 1 ); + const int shmem = + UseShflReduction + ? 0 + : cuda_single_inter_block_reduce_scan_shmem(m_functor, + block.y); - const int shmem = UseShflReduction?0:cuda_single_inter_block_reduce_scan_shmem( m_functor , block.y ); + CudaParallelLaunch( + *this, grid, block, shmem, + m_policy.space().impl_internal_space_instance(), + false); // copy to device and execute - CudaParallelLaunch< ParallelReduce, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute - - if(!m_result_ptr_device_accessible) { + if (!m_result_ptr_device_accessible) { Cuda().fence(); - if ( m_result_ptr ) { - if ( m_unified_space ) { - const int count = ValueTraits::value_count( ReducerConditional::select(m_functor , m_reducer) ); - for ( int i = 0 ; i < count ; ++i ) { m_result_ptr[i] = pointer_type(m_unified_space)[i] ; } - } - else { - const int size = ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ); - DeepCopy( m_result_ptr , m_scratch_space , size ); + if (m_result_ptr) { + if (m_unified_space) { + const int count = ValueTraits::value_count( + ReducerConditional::select(m_functor, m_reducer)); + for (int i = 0; i < count; ++i) { + m_result_ptr[i] = pointer_type(m_unified_space)[i]; + } + } else { + const int size = ValueTraits::value_size( + ReducerConditional::select(m_functor, m_reducer)); + DeepCopy(m_result_ptr, m_scratch_space, size); } } } - } - else { + } else { if (m_result_ptr) { - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , m_result_ptr ); + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + m_result_ptr); } } } - template< class ViewType > - ParallelReduce( const FunctorType & arg_functor - , const Policy & arg_policy - , const ViewType & arg_result - , typename std::enable_if< - Kokkos::is_view< ViewType >::value - ,void*>::type = NULL) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_reducer( InvalidType() ) - , m_result_ptr( arg_result.data() ) - , m_result_ptr_device_accessible(MemorySpaceAccess< Kokkos::CudaSpace , typename ViewType::memory_space>::accessible ) - , m_scratch_space( 0 ) - , m_scratch_flags( 0 ) - , m_unified_space( 0 ) - {} + template + ParallelReduce(const FunctorType& arg_functor, const Policy& arg_policy, + const ViewType& arg_result, + typename std::enable_if::value, + void*>::type = NULL) + : m_functor(arg_functor), + m_policy(arg_policy), + m_reducer(InvalidType()), + m_result_ptr(arg_result.data()), + m_result_ptr_device_accessible( + MemorySpaceAccess::accessible), + m_scratch_space(0), + m_scratch_flags(0), + m_unified_space(0) {} - ParallelReduce( const FunctorType & arg_functor - , const Policy & arg_policy - , const ReducerType & reducer) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_reducer( reducer ) - , m_result_ptr( reducer.view().data() ) - , m_result_ptr_device_accessible(MemorySpaceAccess< Kokkos::CudaSpace , typename ReducerType::result_view_type::memory_space>::accessible ) - , m_scratch_space( 0 ) - , m_scratch_flags( 0 ) - , m_unified_space( 0 ) - {} + ParallelReduce(const FunctorType& arg_functor, const Policy& arg_policy, + const ReducerType& reducer) + : m_functor(arg_functor), + m_policy(arg_policy), + m_reducer(reducer), + m_result_ptr(reducer.view().data()), + m_result_ptr_device_accessible( + MemorySpaceAccess::accessible), + m_scratch_space(0), + m_scratch_flags(0), + m_unified_space(0) {} }; - //---------------------------------------------------------------------------- -template< class FunctorType , class ReducerType, class ... Properties > -class ParallelReduce< FunctorType - , Kokkos::TeamPolicy< Properties ... > - , ReducerType - , Kokkos::Cuda - > -{ -public: - typedef TeamPolicyInternal< Kokkos::Cuda, Properties ... > Policy ; -private: +template +class ParallelReduce, + ReducerType, Kokkos::Cuda> { + public: + typedef TeamPolicyInternal Policy; - typedef typename Policy::member_type Member ; - typedef typename Policy::work_tag WorkTag ; - typedef typename Policy::launch_bounds LaunchBounds ; + private: + typedef typename Policy::member_type Member; + typedef typename Policy::work_tag WorkTag; + typedef typename Policy::launch_bounds LaunchBounds; - typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType> ReducerConditional; + typedef Kokkos::Impl::if_c::value, + FunctorType, ReducerType> + ReducerConditional; typedef typename ReducerConditional::type ReducerTypeFwd; - typedef typename Kokkos::Impl::if_c< std::is_same::value, WorkTag, void>::type WorkTagFwd; + typedef + typename Kokkos::Impl::if_c::value, + WorkTag, void>::type WorkTagFwd; - typedef Kokkos::Impl::FunctorValueTraits< ReducerTypeFwd, WorkTagFwd > ValueTraits ; - typedef Kokkos::Impl::FunctorValueInit< ReducerTypeFwd, WorkTagFwd > ValueInit ; - typedef Kokkos::Impl::FunctorValueJoin< ReducerTypeFwd, WorkTagFwd > ValueJoin ; + typedef Kokkos::Impl::FunctorValueTraits + ValueTraits; + typedef Kokkos::Impl::FunctorValueInit ValueInit; + typedef Kokkos::Impl::FunctorValueJoin ValueJoin; - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::reference_type reference_type ; - typedef typename ValueTraits::value_type value_type ; + typedef typename ValueTraits::pointer_type pointer_type; + typedef typename ValueTraits::reference_type reference_type; + typedef typename ValueTraits::value_type value_type; -public: + public: + typedef FunctorType functor_type; + typedef Cuda::size_type size_type; - typedef FunctorType functor_type ; - typedef Cuda::size_type size_type ; + enum { UseShflReduction = (true && (ValueTraits::StaticValueSize != 0)) }; - enum { UseShflReduction = (true && (ValueTraits::StaticValueSize!=0)) }; - -private: + private: typedef double DummyShflReductionType; typedef int DummySHMEMReductionType; - // Algorithmic constraints: blockDim.y is a power of two AND blockDim.y == blockDim.z == 1 - // shared memory utilization: + // Algorithmic constraints: blockDim.y is a power of two AND blockDim.y == + // blockDim.z == 1 shared memory utilization: // // [ global reduce space ] // [ team reduce space ] // [ team shared space ] // - const FunctorType m_functor ; - const Policy m_policy ; - const ReducerType m_reducer ; - const pointer_type m_result_ptr ; - const bool m_result_ptr_device_accessible ; - size_type * m_scratch_space ; - size_type * m_scratch_flags ; - size_type * m_unified_space ; - size_type m_team_begin ; - size_type m_shmem_begin ; - size_type m_shmem_size ; - void* m_scratch_ptr[2] ; - int m_scratch_size[2] ; - const size_type m_league_size ; - int m_team_size ; - const size_type m_vector_size ; + const FunctorType m_functor; + const Policy m_policy; + const ReducerType m_reducer; + const pointer_type m_result_ptr; + const bool m_result_ptr_device_accessible; + size_type* m_scratch_space; + size_type* m_scratch_flags; + size_type* m_unified_space; + size_type m_team_begin; + size_type m_shmem_begin; + size_type m_shmem_size; + void* m_scratch_ptr[2]; + int m_scratch_size[2]; + const size_type m_league_size; + int m_team_size; + const size_type m_vector_size; - template< class TagType > + template __device__ inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec_team( const Member & member , reference_type update ) const - { m_functor( member , update ); } + typename std::enable_if::value>::type + exec_team(const Member& member, reference_type update) const { + m_functor(member, update); + } - template< class TagType > + template __device__ inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec_team( const Member & member , reference_type update ) const - { m_functor( TagType() , member , update ); } + typename std::enable_if::value>::type + exec_team(const Member& member, reference_type update) const { + m_functor(TagType(), member, update); + } -public: - - __device__ inline - void operator() () const { + public: + __device__ inline void operator()() const { int64_t threadid = 0; - if ( m_scratch_size[1]>0 ) { + if (m_scratch_size[1] > 0) { __shared__ int64_t base_thread_id; - if (threadIdx.x==0 && threadIdx.y==0 ) { - threadid = (blockIdx.x*blockDim.z + threadIdx.z) % - (Kokkos::Impl::g_device_cuda_lock_arrays.n / (blockDim.x * blockDim.y)); + if (threadIdx.x == 0 && threadIdx.y == 0) { + threadid = (blockIdx.x * blockDim.z + threadIdx.z) % + (Kokkos::Impl::g_device_cuda_lock_arrays.n / + (blockDim.x * blockDim.y)); threadid *= blockDim.x * blockDim.y; int done = 0; while (!done) { - done = (0 == atomicCAS(&Kokkos::Impl::g_device_cuda_lock_arrays.scratch[threadid],0,1)); - if(!done) { + done = + (0 == + atomicCAS( + &Kokkos::Impl::g_device_cuda_lock_arrays.scratch[threadid], + 0, 1)); + if (!done) { threadid += blockDim.x * blockDim.y; - if(int64_t(threadid + blockDim.x * blockDim.y) >= int64_t(Kokkos::Impl::g_device_cuda_lock_arrays.n)) threadid = 0; + if (int64_t(threadid + blockDim.x * blockDim.y) >= + int64_t(Kokkos::Impl::g_device_cuda_lock_arrays.n)) + threadid = 0; } } base_thread_id = threadid; @@ -1394,736 +1635,970 @@ public: threadid = base_thread_id; } - run(Kokkos::Impl::if_c::select(1,1.0), threadid ); - if ( m_scratch_size[1]>0 ) { + run(Kokkos::Impl::if_c::select(1, 1.0), + threadid); + if (m_scratch_size[1] > 0) { __syncthreads(); - if (threadIdx.x==0 && threadIdx.y==0 ) - Kokkos::Impl::g_device_cuda_lock_arrays.scratch[threadid]=0; + if (threadIdx.x == 0 && threadIdx.y == 0) + Kokkos::Impl::g_device_cuda_lock_arrays.scratch[threadid] = 0; } } - __device__ inline - void run(const DummySHMEMReductionType&, const int& threadid) const - { - const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) > - word_count( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) / sizeof(size_type) ); + __device__ inline void run(const DummySHMEMReductionType&, + const int& threadid) const { + const integral_nonzero_constant + word_count(ValueTraits::value_size( + ReducerConditional::select(m_functor, m_reducer)) / + sizeof(size_type)); reference_type value = - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , kokkos_impl_cuda_shared_memory() + threadIdx.y * word_count.value ); + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + kokkos_impl_cuda_shared_memory() + + threadIdx.y * word_count.value); // Iterate this block through the league const int int_league_size = (int)m_league_size; - for ( int league_rank = blockIdx.x ; league_rank < int_league_size ; league_rank += gridDim.x ) { - this-> template exec_team< WorkTag > - ( Member( kokkos_impl_cuda_shared_memory() + m_team_begin - , m_shmem_begin - , m_shmem_size - , (void*) ( ((char*)m_scratch_ptr[1]) + ptrdiff_t(threadid/(blockDim.x*blockDim.y)) * m_scratch_size[1]) - , m_scratch_size[1] - , league_rank - , m_league_size ) - , value ); + for (int league_rank = blockIdx.x; league_rank < int_league_size; + league_rank += gridDim.x) { + this->template exec_team( + Member(kokkos_impl_cuda_shared_memory() + m_team_begin, + m_shmem_begin, m_shmem_size, + (void*)(((char*)m_scratch_ptr[1]) + + ptrdiff_t(threadid / (blockDim.x * blockDim.y)) * + m_scratch_size[1]), + m_scratch_size[1], league_rank, m_league_size), + value); } // Reduce with final value at blockDim.y - 1 location. - if ( cuda_single_inter_block_reduce_scan( - ReducerConditional::select(m_functor , m_reducer) , blockIdx.x , gridDim.x , - kokkos_impl_cuda_shared_memory() , m_scratch_space , m_scratch_flags ) ) { + if (cuda_single_inter_block_reduce_scan( + ReducerConditional::select(m_functor, m_reducer), blockIdx.x, + gridDim.x, kokkos_impl_cuda_shared_memory(), + m_scratch_space, m_scratch_flags)) { + // This is the final block with the final result at the final threads' + // location - // This is the final block with the final result at the final threads' location + size_type* const shared = kokkos_impl_cuda_shared_memory() + + (blockDim.y - 1) * word_count.value; + size_type* const global = + m_result_ptr_device_accessible + ? reinterpret_cast(m_result_ptr) + : (m_unified_space ? m_unified_space : m_scratch_space); - size_type * const shared = kokkos_impl_cuda_shared_memory() + ( blockDim.y - 1 ) * word_count.value ; - size_type * const global = m_result_ptr_device_accessible? reinterpret_cast(m_result_ptr) : - ( m_unified_space ? m_unified_space : m_scratch_space ); - - if ( threadIdx.y == 0 ) { - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >::final( ReducerConditional::select(m_functor , m_reducer) , shared ); + if (threadIdx.y == 0) { + Kokkos::Impl::FunctorFinal::final( + ReducerConditional::select(m_functor, m_reducer), shared); } - if ( CudaTraits::WarpSize < word_count.value ) { __syncthreads(); } + if (CudaTraits::WarpSize < word_count.value) { + __syncthreads(); + } - for ( unsigned i = threadIdx.y ; i < word_count.value ; i += blockDim.y ) { global[i] = shared[i]; } + for (unsigned i = threadIdx.y; i < word_count.value; i += blockDim.y) { + global[i] = shared[i]; + } } - } - __device__ inline - void run(const DummyShflReductionType&, const int& threadid) const - { + __device__ inline void run(const DummyShflReductionType&, + const int& threadid) const { value_type value; - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , &value); + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), &value); // Iterate this block through the league const int int_league_size = (int)m_league_size; - for ( int league_rank = blockIdx.x ; league_rank < int_league_size ; league_rank += gridDim.x ) { - this-> template exec_team< WorkTag > - ( Member( kokkos_impl_cuda_shared_memory() + m_team_begin - , m_shmem_begin - , m_shmem_size - , (void*) ( ((char*)m_scratch_ptr[1]) + ptrdiff_t(threadid/(blockDim.x*blockDim.y)) * m_scratch_size[1]) - , m_scratch_size[1] - , league_rank - , m_league_size ) - , value ); + for (int league_rank = blockIdx.x; league_rank < int_league_size; + league_rank += gridDim.x) { + this->template exec_team( + Member(kokkos_impl_cuda_shared_memory() + m_team_begin, + m_shmem_begin, m_shmem_size, + (void*)(((char*)m_scratch_ptr[1]) + + ptrdiff_t(threadid / (blockDim.x * blockDim.y)) * + m_scratch_size[1]), + m_scratch_size[1], league_rank, m_league_size), + value); } - pointer_type const result = m_result_ptr_device_accessible? m_result_ptr : - (pointer_type) ( m_unified_space ? m_unified_space : m_scratch_space ); + pointer_type const result = + m_result_ptr_device_accessible + ? m_result_ptr + : (pointer_type)(m_unified_space ? m_unified_space + : m_scratch_space); value_type init; - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , &init); - if( - Impl::cuda_inter_block_reduction - (value,init,ValueJoin(ReducerConditional::select(m_functor , m_reducer)),m_scratch_space,result,m_scratch_flags,blockDim.y) - //This breaks a test - // Kokkos::Impl::CudaReductionsFunctor::scalar_inter_block_reduction(ReducerConditional::select(m_functor , m_reducer) , blockIdx.x , gridDim.x , - // kokkos_impl_cuda_shared_memory() , m_scratch_space , m_scratch_flags) + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), &init); + if (Impl::cuda_inter_block_reduction( + value, init, + ValueJoin(ReducerConditional::select(m_functor, m_reducer)), + m_scratch_space, result, m_scratch_flags, blockDim.y) + // This breaks a test + // Kokkos::Impl::CudaReductionsFunctor::scalar_inter_block_reduction(ReducerConditional::select(m_functor + // , m_reducer) , blockIdx.x , gridDim.x , + // kokkos_impl_cuda_shared_memory() , + // m_scratch_space , m_scratch_flags) ) { - const unsigned id = threadIdx.y*blockDim.x + threadIdx.x; - if(id==0) { - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >::final( ReducerConditional::select(m_functor , m_reducer) , (void*) &value ); + const unsigned id = threadIdx.y * blockDim.x + threadIdx.x; + if (id == 0) { + Kokkos::Impl::FunctorFinal::final( + ReducerConditional::select(m_functor, m_reducer), (void*)&value); *result = value; } } } - inline - void execute() - { - const int nwork = m_league_size * m_team_size ; - if ( nwork ) { - const int block_count = UseShflReduction? std::min( m_league_size , size_type(1024*32) ) - :std::min( int(m_league_size) , m_team_size ); + inline void execute() { + const int nwork = m_league_size * m_team_size; + if (nwork) { + const int block_count = + UseShflReduction ? std::min(m_league_size, size_type(1024 * 32)) + : std::min(int(m_league_size), m_team_size); - m_scratch_space = cuda_internal_scratch_space(m_policy.space(), ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) * block_count ); - m_scratch_flags = cuda_internal_scratch_flags(m_policy.space(), sizeof(size_type) ); - m_unified_space = cuda_internal_scratch_unified( m_policy.space(),ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) ); + m_scratch_space = cuda_internal_scratch_space( + m_policy.space(), ValueTraits::value_size(ReducerConditional::select( + m_functor, m_reducer)) * + block_count); + m_scratch_flags = + cuda_internal_scratch_flags(m_policy.space(), sizeof(size_type)); + m_unified_space = cuda_internal_scratch_unified( + m_policy.space(), ValueTraits::value_size(ReducerConditional::select( + m_functor, m_reducer))); - const dim3 block( m_vector_size , m_team_size , 1 ); - const dim3 grid( block_count , 1 , 1 ); - const int shmem_size_total = m_team_begin + m_shmem_begin + m_shmem_size ; + dim3 block(m_vector_size, m_team_size, 1); + dim3 grid(block_count, 1, 1); + const int shmem_size_total = m_team_begin + m_shmem_begin + m_shmem_size; - CudaParallelLaunch< ParallelReduce, LaunchBounds >( *this, grid, block, shmem_size_total , m_policy.space().impl_internal_space_instance() , true ); // copy to device and execute +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + if (Kokkos::Impl::CudaInternal::cuda_use_serial_execution()) { + block = dim3(1, 1, 1); + grid = dim3(1, 1, 1); + } +#endif - if(!m_result_ptr_device_accessible) { - Cuda().fence(); + CudaParallelLaunch( + *this, grid, block, shmem_size_total, + m_policy.space().impl_internal_space_instance(), + true); // copy to device and execute - if ( m_result_ptr ) { - if ( m_unified_space ) { - const int count = ValueTraits::value_count( ReducerConditional::select(m_functor , m_reducer) ); - for ( int i = 0 ; i < count ; ++i ) { m_result_ptr[i] = pointer_type(m_unified_space)[i] ; } - } - else { - const int size = ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ); - DeepCopy( m_result_ptr, m_scratch_space, size ); + if (!m_result_ptr_device_accessible) { + Cuda().fence(); + + if (m_result_ptr) { + if (m_unified_space) { + const int count = ValueTraits::value_count( + ReducerConditional::select(m_functor, m_reducer)); + for (int i = 0; i < count; ++i) { + m_result_ptr[i] = pointer_type(m_unified_space)[i]; } + } else { + const int size = ValueTraits::value_size( + ReducerConditional::select(m_functor, m_reducer)); + DeepCopy(m_result_ptr, m_scratch_space, size); } } } - else { - if (m_result_ptr) { - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , m_result_ptr ); + } else { + if (m_result_ptr) { + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + m_result_ptr); + } + } + } + + template + ParallelReduce(const FunctorType& arg_functor, const Policy& arg_policy, + const ViewType& arg_result, + typename std::enable_if::value, + void*>::type = NULL) + : m_functor(arg_functor), + m_policy(arg_policy), + m_reducer(InvalidType()), + m_result_ptr(arg_result.data()), + m_result_ptr_device_accessible( + MemorySpaceAccess::accessible), + m_scratch_space(0), + m_scratch_flags(0), + m_unified_space(0), + m_team_begin(0), + m_shmem_begin(0), + m_shmem_size(0), + m_scratch_ptr{NULL, NULL}, + m_league_size(arg_policy.league_size()), + m_team_size(arg_policy.team_size()), + m_vector_size(arg_policy.vector_length()) { + cudaFuncAttributes attr = + CudaParallelLaunch::get_cuda_func_attributes(); + m_team_size = + m_team_size >= 0 + ? m_team_size + : Kokkos::Impl::cuda_get_opt_block_size( + m_policy.space().impl_internal_space_instance(), attr, + m_functor, m_vector_size, m_policy.team_scratch_size(0), + m_policy.thread_scratch_size(0)) / + m_vector_size; + + // Return Init value if the number of worksets is zero + if (m_league_size * m_team_size == 0) { + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + arg_result.data()); + return; + } + + m_team_begin = + UseShflReduction + ? 0 + : cuda_single_inter_block_reduce_scan_shmem(arg_functor, + m_team_size); + m_shmem_begin = sizeof(double) * (m_team_size + 2); + m_shmem_size = + m_policy.scratch_size(0, m_team_size) + + FunctorTeamShmemSize::value(arg_functor, m_team_size); + m_scratch_size[0] = m_shmem_size; + m_scratch_size[1] = m_policy.scratch_size(1, m_team_size); + m_scratch_ptr[1] = + m_team_size <= 0 + ? NULL + : cuda_resize_scratch_space( + static_cast(m_scratch_size[1]) * + (static_cast(Cuda::concurrency() / + (m_team_size * m_vector_size)))); + + // The global parallel_reduce does not support vector_length other than 1 at + // the moment + if ((arg_policy.vector_length() > 1) && !UseShflReduction) + Impl::throw_runtime_exception( + "Kokkos::parallel_reduce with a TeamPolicy using a vector length of " + "greater than 1 is not currently supported for CUDA for dynamic " + "sized reduction types."); + + if ((m_team_size < 32) && !UseShflReduction) + Impl::throw_runtime_exception( + "Kokkos::parallel_reduce with a TeamPolicy using a team_size smaller " + "than 32 is not currently supported with CUDA for dynamic sized " + "reduction types."); + + // Functor's reduce memory, team scan memory, and team shared memory depend + // upon team size. + + const int shmem_size_total = m_team_begin + m_shmem_begin + m_shmem_size; + + if (!Kokkos::Impl::is_integral_power_of_two(m_team_size) && + !UseShflReduction) { + Kokkos::Impl::throw_runtime_exception( + std::string("Kokkos::Impl::ParallelReduce< Cuda > bad team size")); + } + + if (m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < + shmem_size_total) { + Kokkos::Impl::throw_runtime_exception( + std::string("Kokkos::Impl::ParallelReduce< Cuda > requested too much " + "L0 scratch memory")); + } + + if (int(m_team_size) > + arg_policy.team_size_max(m_functor, m_reducer, ParallelReduceTag())) { + Kokkos::Impl::throw_runtime_exception( + std::string("Kokkos::Impl::ParallelReduce< Cuda > requested too " + "large team size.")); + } + } + + ParallelReduce(const FunctorType& arg_functor, const Policy& arg_policy, + const ReducerType& reducer) + : m_functor(arg_functor), + m_policy(arg_policy), + m_reducer(reducer), + m_result_ptr(reducer.view().data()), + m_result_ptr_device_accessible( + MemorySpaceAccess::accessible), + m_scratch_space(0), + m_scratch_flags(0), + m_unified_space(0), + m_team_begin(0), + m_shmem_begin(0), + m_shmem_size(0), + m_scratch_ptr{NULL, NULL}, + m_league_size(arg_policy.league_size()), + m_team_size(arg_policy.team_size()), + m_vector_size(arg_policy.vector_length()) { + cudaFuncAttributes attr = + CudaParallelLaunch::get_cuda_func_attributes(); + m_team_size = + m_team_size >= 0 + ? m_team_size + : Kokkos::Impl::cuda_get_opt_block_size( + m_policy.space().impl_internal_space_instance(), attr, + m_functor, m_vector_size, m_policy.team_scratch_size(0), + m_policy.thread_scratch_size(0)) / + m_vector_size; + + // Return Init value if the number of worksets is zero + if (arg_policy.league_size() == 0) { + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + m_result_ptr); + return; + } + + m_team_begin = + UseShflReduction + ? 0 + : cuda_single_inter_block_reduce_scan_shmem(arg_functor, + m_team_size); + m_shmem_begin = sizeof(double) * (m_team_size + 2); + m_shmem_size = + m_policy.scratch_size(0, m_team_size) + + FunctorTeamShmemSize::value(arg_functor, m_team_size); + m_scratch_size[0] = m_shmem_size; + m_scratch_size[1] = m_policy.scratch_size(1, m_team_size); + m_scratch_ptr[1] = + m_team_size <= 0 + ? NULL + : cuda_resize_scratch_space( + static_cast(m_scratch_size[1]) * + static_cast(Cuda::concurrency() / + (m_team_size * m_vector_size))); + + // The global parallel_reduce does not support vector_length other than 1 at + // the moment + if ((arg_policy.vector_length() > 1) && !UseShflReduction) + Impl::throw_runtime_exception( + "Kokkos::parallel_reduce with a TeamPolicy using a vector length of " + "greater than 1 is not currently supported for CUDA for dynamic " + "sized reduction types."); + + if ((m_team_size < 32) && !UseShflReduction) + Impl::throw_runtime_exception( + "Kokkos::parallel_reduce with a TeamPolicy using a team_size smaller " + "than 32 is not currently supported with CUDA for dynamic sized " + "reduction types."); + + // Functor's reduce memory, team scan memory, and team shared memory depend + // upon team size. + + const int shmem_size_total = m_team_begin + m_shmem_begin + m_shmem_size; + + if ((!Kokkos::Impl::is_integral_power_of_two(m_team_size) && + !UseShflReduction) || + m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < + shmem_size_total) { + Kokkos::Impl::throw_runtime_exception( + std::string("Kokkos::Impl::ParallelReduce< Cuda > bad team size")); + } + if (int(m_team_size) > + arg_policy.team_size_max(m_functor, m_reducer, ParallelReduceTag())) { + Kokkos::Impl::throw_runtime_exception( + std::string("Kokkos::Impl::ParallelReduce< Cuda > requested too " + "large team size.")); + } + } +}; + +} // namespace Impl +} // namespace Kokkos + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +namespace Kokkos { +namespace Impl { + +template +class ParallelScan, Kokkos::Cuda> { + public: + typedef Kokkos::RangePolicy Policy; + + private: + typedef typename Policy::member_type Member; + typedef typename Policy::work_tag WorkTag; + typedef typename Policy::WorkRange WorkRange; + typedef typename Policy::launch_bounds LaunchBounds; + + typedef Kokkos::Impl::FunctorValueTraits ValueTraits; + typedef Kokkos::Impl::FunctorValueInit ValueInit; + typedef Kokkos::Impl::FunctorValueOps ValueOps; + + public: + typedef typename ValueTraits::pointer_type pointer_type; + typedef typename ValueTraits::reference_type reference_type; + typedef FunctorType functor_type; + typedef Cuda::size_type size_type; + + private: + // Algorithmic constraints: + // (a) blockDim.y is a power of two + // (b) blockDim.y == blockDim.z == 1 + // (c) gridDim.x <= blockDim.y * blockDim.y + // (d) gridDim.y == gridDim.z == 1 + + const FunctorType m_functor; + const Policy m_policy; + size_type* m_scratch_space; + size_type* m_scratch_flags; + size_type m_final; +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + bool m_run_serial; +#endif + + template + __device__ inline + typename std::enable_if::value>::type + exec_range(const Member& i, reference_type update, + const bool final_result) const { + m_functor(i, update, final_result); + } + + template + __device__ inline + typename std::enable_if::value>::type + exec_range(const Member& i, reference_type update, + const bool final_result) const { + m_functor(TagType(), i, update, final_result); + } + + //---------------------------------------- + + __device__ inline void initial(void) const { + const integral_nonzero_constant + word_count(ValueTraits::value_size(m_functor) / sizeof(size_type)); + + size_type* const shared_value = + kokkos_impl_cuda_shared_memory() + + word_count.value * threadIdx.y; + + ValueInit::init(m_functor, shared_value); + + // Number of blocks is bounded so that the reduction can be limited to two + // passes. Each thread block is given an approximately equal amount of work + // to perform. Accumulate the values for this block. The accumulation + // ordering does not match the final pass, but is arithmatically equivalent. + + const WorkRange range(m_policy, blockIdx.x, gridDim.x); + + for (Member iwork = range.begin() + threadIdx.y, iwork_end = range.end(); + iwork < iwork_end; iwork += blockDim.y) { + this->template exec_range( + iwork, ValueOps::reference(shared_value), false); + } + + // Reduce and scan, writing out scan of blocks' totals and block-groups' + // totals. Blocks' scan values are written to 'blockIdx.x' location. + // Block-groups' scan values are at: i = ( j * blockDim.y - 1 ) for i < + // gridDim.x + cuda_single_inter_block_reduce_scan( + m_functor, blockIdx.x, gridDim.x, + kokkos_impl_cuda_shared_memory(), m_scratch_space, + m_scratch_flags); + } + + //---------------------------------------- + + __device__ inline void final(void) const { + const integral_nonzero_constant + word_count(ValueTraits::value_size(m_functor) / sizeof(size_type)); + + // Use shared memory as an exclusive scan: { 0 , value[0] , value[1] , + // value[2] , ... } + size_type* const shared_data = kokkos_impl_cuda_shared_memory(); + size_type* const shared_prefix = + shared_data + word_count.value * threadIdx.y; + size_type* const shared_accum = + shared_data + word_count.value * (blockDim.y + 1); + + // Starting value for this thread block is the previous block's total. + if (blockIdx.x) { + size_type* const block_total = + m_scratch_space + word_count.value * (blockIdx.x - 1); + for (unsigned i = threadIdx.y; i < word_count.value; ++i) { + shared_accum[i] = block_total[i]; + } + } else if (0 == threadIdx.y) { + ValueInit::init(m_functor, shared_accum); + } + + const WorkRange range(m_policy, blockIdx.x, gridDim.x); + + for (typename Policy::member_type iwork_base = range.begin(); + iwork_base < range.end(); iwork_base += blockDim.y) { +#ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK + unsigned MASK = KOKKOS_IMPL_CUDA_ACTIVEMASK; +#endif + const typename Policy::member_type iwork = iwork_base + threadIdx.y; + + __syncthreads(); // Don't overwrite previous iteration values until they + // are used + + ValueInit::init(m_functor, shared_prefix + word_count.value); + + // Copy previous block's accumulation total into thread[0] prefix and + // inclusive scan value of this block + for (unsigned i = threadIdx.y; i < word_count.value; ++i) { + shared_data[i + word_count.value] = shared_data[i] = shared_accum[i]; + } +#ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK + KOKKOS_IMPL_CUDA_SYNCWARP_MASK(MASK); +#else + KOKKOS_IMPL_CUDA_SYNCWARP; +#endif + if (CudaTraits::WarpSize < word_count.value) { + __syncthreads(); + } // Protect against large scan values. + + // Call functor to accumulate inclusive scan value for this work item + if (iwork < range.end()) { + this->template exec_range( + iwork, ValueOps::reference(shared_prefix + word_count.value), + false); + } + + // Scan block values into locations shared_data[1..blockDim.y] + cuda_intra_block_reduce_scan( + m_functor, + typename ValueTraits::pointer_type(shared_data + word_count.value)); + + { + size_type* const block_total = + shared_data + word_count.value * blockDim.y; + for (unsigned i = threadIdx.y; i < word_count.value; ++i) { + shared_accum[i] = block_total[i]; } } + + // Call functor with exclusive scan value + if (iwork < range.end()) { + this->template exec_range( + iwork, ValueOps::reference(shared_prefix), true); + } } - - template< class ViewType > - ParallelReduce( const FunctorType & arg_functor - , const Policy & arg_policy - , const ViewType & arg_result - , typename std::enable_if< - Kokkos::is_view< ViewType >::value - ,void*>::type = NULL) - : m_functor( arg_functor ) - , m_policy ( arg_policy ) - , m_reducer( InvalidType() ) - , m_result_ptr( arg_result.data() ) - , m_result_ptr_device_accessible(MemorySpaceAccess< Kokkos::CudaSpace , typename ViewType::memory_space>::accessible ) - , m_scratch_space( 0 ) - , m_scratch_flags( 0 ) - , m_unified_space( 0 ) - , m_team_begin( 0 ) - , m_shmem_begin( 0 ) - , m_shmem_size( 0 ) - , m_scratch_ptr{NULL,NULL} - , m_league_size( arg_policy.league_size() ) - , m_team_size( arg_policy.team_size() ) - , m_vector_size( arg_policy.vector_length() ) - { - cudaFuncAttributes attr = CudaParallelLaunch< ParallelReduce, LaunchBounds >:: - get_cuda_func_attributes(); - m_team_size = m_team_size>=0?m_team_size: - Kokkos::Impl::cuda_get_opt_block_size< FunctorType, LaunchBounds>( - m_policy.space().impl_internal_space_instance(), - attr, m_functor , m_vector_size, - m_policy.team_scratch_size(0), m_policy.thread_scratch_size(0) )/m_vector_size; - - // Return Init value if the number of worksets is zero - if( m_league_size*m_team_size == 0) { - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , arg_result.data() ); - return ; - } - - m_team_begin = UseShflReduction?0:cuda_single_inter_block_reduce_scan_shmem( arg_functor , m_team_size ); - m_shmem_begin = sizeof(double) * ( m_team_size + 2 ); - m_shmem_size = m_policy.scratch_size(0,m_team_size) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , m_team_size ); - m_scratch_size[0] = m_shmem_size; - m_scratch_size[1] = m_policy.scratch_size(1,m_team_size); - m_scratch_ptr[1] = m_team_size<=0?NULL:cuda_resize_scratch_space(static_cast(m_scratch_size[1])*(static_cast(Cuda::concurrency()/(m_team_size*m_vector_size)))); - - // The global parallel_reduce does not support vector_length other than 1 at the moment - if( (arg_policy.vector_length() > 1) && !UseShflReduction ) - Impl::throw_runtime_exception( "Kokkos::parallel_reduce with a TeamPolicy using a vector length of greater than 1 is not currently supported for CUDA for dynamic sized reduction types."); - - if( (m_team_size < 32) && !UseShflReduction ) - Impl::throw_runtime_exception( "Kokkos::parallel_reduce with a TeamPolicy using a team_size smaller than 32 is not currently supported with CUDA for dynamic sized reduction types."); - - // Functor's reduce memory, team scan memory, and team shared memory depend upon team size. - - const int shmem_size_total = m_team_begin + m_shmem_begin + m_shmem_size ; - - if (! Kokkos::Impl::is_integral_power_of_two( m_team_size ) && !UseShflReduction ) { - Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > bad team size")); - } - - if ( m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < shmem_size_total ) { - Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > requested too much L0 scratch memory")); - } - - if ( int(m_team_size) > arg_policy.team_size_max(m_functor,ParallelReduceTag()) ) { - Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > requested too large team size.")); - } - } - ParallelReduce( const FunctorType & arg_functor - , const Policy & arg_policy - , const ReducerType & reducer) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_reducer( reducer ) - , m_result_ptr( reducer.view().data() ) - , m_result_ptr_device_accessible(MemorySpaceAccess< Kokkos::CudaSpace , typename ReducerType::result_view_type::memory_space>::accessible ) - , m_scratch_space( 0 ) - , m_scratch_flags( 0 ) - , m_unified_space( 0 ) - , m_team_begin( 0 ) - , m_shmem_begin( 0 ) - , m_shmem_size( 0 ) - , m_scratch_ptr{NULL,NULL} - , m_league_size( arg_policy.league_size() ) - , m_team_size( arg_policy.team_size() ) - , m_vector_size( arg_policy.vector_length() ) + public: + //---------------------------------------- + + __device__ inline void operator()(void) const { +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + if (m_run_serial) { + typename ValueTraits::value_type value; + ValueInit::init(m_functor, (void*)&value); + const WorkRange range(m_policy, blockIdx.x, gridDim.x); + + for (typename Policy::member_type iwork_base = range.begin(); + iwork_base < range.end(); iwork_base++) { + this->template exec_range(iwork_base, value, true); + } + } else { +#endif + if (!m_final) { + initial(); + } else { + final(); + } +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + } +#endif + } + + // Determine block size constrained by shared memory: + inline unsigned local_block_size(const FunctorType& f) { + // blockDim.y must be power of two = 128 (4 warps) or 256 (8 warps) or 512 + // (16 warps) gridDim.x <= blockDim.y * blockDim.y + // + // 4 warps was 10% faster than 8 warps and 20% faster than 16 warps in unit + // testing + + unsigned n = CudaTraits::WarpSize * 4; + while (n && + unsigned(m_policy.space() + .impl_internal_space_instance() + ->m_maxShmemPerBlock) < + cuda_single_inter_block_reduce_scan_shmem(f, n)) { + n >>= 1; + } + return n; + } + + inline void execute() { + const int nwork = m_policy.end() - m_policy.begin(); + if (nwork) { + enum { GridMaxComputeCapability_2x = 0x0ffff }; + + const int block_size = local_block_size(m_functor); + + const int grid_max = + (block_size * block_size) < GridMaxComputeCapability_2x + ? (block_size * block_size) + : GridMaxComputeCapability_2x; + + // At most 'max_grid' blocks: + const int max_grid = + std::min(int(grid_max), int((nwork + block_size - 1) / block_size)); + + // How much work per block: + const int work_per_block = (nwork + max_grid - 1) / max_grid; + + // How many block are really needed for this much work: + const int grid_x = (nwork + work_per_block - 1) / work_per_block; + + m_scratch_space = cuda_internal_scratch_space( + m_policy.space(), ValueTraits::value_size(m_functor) * grid_x); + m_scratch_flags = + cuda_internal_scratch_flags(m_policy.space(), sizeof(size_type) * 1); + + dim3 grid(grid_x, 1, 1); + dim3 block(1, block_size, 1); // REQUIRED DIMENSIONS ( 1 , N , 1 ) + const int shmem = ValueTraits::value_size(m_functor) * (block_size + 2); + +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + if (m_run_serial) { + block = dim3(1, 1, 1); + grid = dim3(1, 1, 1); + } else { +#endif + m_final = false; + CudaParallelLaunch( + *this, grid, block, shmem, + m_policy.space().impl_internal_space_instance(), + false); // copy to device and execute +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + } +#endif + m_final = true; + CudaParallelLaunch( + *this, grid, block, shmem, + m_policy.space().impl_internal_space_instance(), + false); // copy to device and execute + } + } + + ParallelScan(const FunctorType& arg_functor, const Policy& arg_policy) + : m_functor(arg_functor), + m_policy(arg_policy), + m_scratch_space(0), + m_scratch_flags(0), + m_final(false) +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + , + m_run_serial(Kokkos::Impl::CudaInternal::cuda_use_serial_execution()) +#endif { - cudaFuncAttributes attr = CudaParallelLaunch< ParallelReduce, LaunchBounds >:: - get_cuda_func_attributes(); - m_team_size = m_team_size>=0?m_team_size: - Kokkos::Impl::cuda_get_opt_block_size< FunctorType, LaunchBounds>( - m_policy.space().impl_internal_space_instance(), - attr, m_functor , m_vector_size, - m_policy.team_scratch_size(0), m_policy.thread_scratch_size(0) )/m_vector_size; - - // Return Init value if the number of worksets is zero - if( arg_policy.league_size() == 0) { - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , m_result_ptr ); - return ; - } - - m_team_begin = UseShflReduction?0:cuda_single_inter_block_reduce_scan_shmem( arg_functor , m_team_size ); - m_shmem_begin = sizeof(double) * ( m_team_size + 2 ); - m_shmem_size = m_policy.scratch_size(0,m_team_size) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , m_team_size ); - m_scratch_size[0] = m_shmem_size; - m_scratch_size[1] = m_policy.scratch_size(1,m_team_size); - m_scratch_ptr[1] = m_team_size<=0?NULL:cuda_resize_scratch_space(static_cast(m_scratch_size[1])*static_cast(Cuda::concurrency()/(m_team_size*m_vector_size))); - - // The global parallel_reduce does not support vector_length other than 1 at the moment - if( (arg_policy.vector_length() > 1) && !UseShflReduction ) - Impl::throw_runtime_exception( "Kokkos::parallel_reduce with a TeamPolicy using a vector length of greater than 1 is not currently supported for CUDA for dynamic sized reduction types."); - - if( (m_team_size < 32) && !UseShflReduction ) - Impl::throw_runtime_exception( "Kokkos::parallel_reduce with a TeamPolicy using a team_size smaller than 32 is not currently supported with CUDA for dynamic sized reduction types."); - - // Functor's reduce memory, team scan memory, and team shared memory depend upon team size. - - const int shmem_size_total = m_team_begin + m_shmem_begin + m_shmem_size ; - - if ( (! Kokkos::Impl::is_integral_power_of_two( m_team_size ) && !UseShflReduction ) || - m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < shmem_size_total ) { - Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > bad team size")); - } - if ( int(m_team_size) > arg_policy.team_size_max(m_functor,ParallelReduceTag()) ) { - Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > requested too large team size.")); - } - } }; -} // namespace Impl -} // namespace Kokkos - -//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- +template +class ParallelScanWithTotal, + ReturnType, Kokkos::Cuda> { + public: + typedef Kokkos::RangePolicy Policy; -namespace Kokkos { -namespace Impl { + private: + typedef typename Policy::member_type Member; + typedef typename Policy::work_tag WorkTag; + typedef typename Policy::WorkRange WorkRange; + typedef typename Policy::launch_bounds LaunchBounds; -template< class FunctorType , class ... Traits > -class ParallelScan< FunctorType - , Kokkos::RangePolicy< Traits ... > - , Kokkos::Cuda - > -{ -public: - typedef Kokkos::RangePolicy< Traits ... > Policy ; -private: - typedef typename Policy::member_type Member ; - typedef typename Policy::work_tag WorkTag ; - typedef typename Policy::WorkRange WorkRange ; - typedef typename Policy::launch_bounds LaunchBounds ; + typedef Kokkos::Impl::FunctorValueTraits ValueTraits; + typedef Kokkos::Impl::FunctorValueInit ValueInit; + typedef Kokkos::Impl::FunctorValueOps ValueOps; - typedef Kokkos::Impl::FunctorValueTraits< FunctorType, WorkTag > ValueTraits ; - typedef Kokkos::Impl::FunctorValueInit< FunctorType, WorkTag > ValueInit ; - typedef Kokkos::Impl::FunctorValueOps< FunctorType, WorkTag > ValueOps ; - -public: - - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::reference_type reference_type ; - typedef FunctorType functor_type ; - typedef Cuda::size_type size_type ; - -private: + public: + typedef typename ValueTraits::pointer_type pointer_type; + typedef typename ValueTraits::reference_type reference_type; + typedef FunctorType functor_type; + typedef Cuda::size_type size_type; + private: // Algorithmic constraints: // (a) blockDim.y is a power of two // (b) blockDim.y == blockDim.z == 1 // (c) gridDim.x <= blockDim.y * blockDim.y // (d) gridDim.y == gridDim.z == 1 - const FunctorType m_functor ; - const Policy m_policy ; - size_type * m_scratch_space ; - size_type * m_scratch_flags ; - size_type m_final ; + const FunctorType m_functor; + const Policy m_policy; + size_type* m_scratch_space; + size_type* m_scratch_flags; + size_type m_final; + ReturnType& m_returnvalue; +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + bool m_run_serial; +#endif - template< class TagType > + template __device__ inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec_range( const Member & i , reference_type update , const bool final_result ) const - { m_functor( i , update , final_result ); } + typename std::enable_if::value>::type + exec_range(const Member& i, reference_type update, + const bool final_result) const { + m_functor(i, update, final_result); + } - template< class TagType > + template __device__ inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec_range( const Member & i , reference_type update , const bool final_result ) const - { m_functor( TagType() , i , update , final_result ); } - - //---------------------------------------- - - __device__ inline - void initial(void) const - { - const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) > - word_count( ValueTraits::value_size( m_functor ) / sizeof(size_type) ); - - size_type * const shared_value = kokkos_impl_cuda_shared_memory() + word_count.value * threadIdx.y ; - - ValueInit::init( m_functor , shared_value ); - - // Number of blocks is bounded so that the reduction can be limited to two passes. - // Each thread block is given an approximately equal amount of work to perform. - // Accumulate the values for this block. - // The accumulation ordering does not match the final pass, but is arithmatically equivalent. - - const WorkRange range( m_policy , blockIdx.x , gridDim.x ); - - for ( Member iwork = range.begin() + threadIdx.y , iwork_end = range.end() ; - iwork < iwork_end ; iwork += blockDim.y ) { - this-> template exec_range< WorkTag >( iwork , ValueOps::reference( shared_value ) , false ); - } - - // Reduce and scan, writing out scan of blocks' totals and block-groups' totals. - // Blocks' scan values are written to 'blockIdx.x' location. - // Block-groups' scan values are at: i = ( j * blockDim.y - 1 ) for i < gridDim.x - cuda_single_inter_block_reduce_scan( m_functor , blockIdx.x , gridDim.x , kokkos_impl_cuda_shared_memory() , m_scratch_space , m_scratch_flags ); + typename std::enable_if::value>::type + exec_range(const Member& i, reference_type update, + const bool final_result) const { + m_functor(TagType(), i, update, final_result); } //---------------------------------------- - __device__ inline - void final(void) const - { - const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) > - word_count( ValueTraits::value_size( m_functor ) / sizeof(size_type) ); + __device__ inline void initial(void) const { + const integral_nonzero_constant + word_count(ValueTraits::value_size(m_functor) / sizeof(size_type)); - // Use shared memory as an exclusive scan: { 0 , value[0] , value[1] , value[2] , ... } - size_type * const shared_data = kokkos_impl_cuda_shared_memory(); - size_type * const shared_prefix = shared_data + word_count.value * threadIdx.y ; - size_type * const shared_accum = shared_data + word_count.value * ( blockDim.y + 1 ); + size_type* const shared_value = + kokkos_impl_cuda_shared_memory() + + word_count.value * threadIdx.y; + + ValueInit::init(m_functor, shared_value); + + // Number of blocks is bounded so that the reduction can be limited to two + // passes. Each thread block is given an approximately equal amount of work + // to perform. Accumulate the values for this block. The accumulation + // ordering does not match the final pass, but is arithmatically equivalent. + + const WorkRange range(m_policy, blockIdx.x, gridDim.x); + + for (Member iwork = range.begin() + threadIdx.y, iwork_end = range.end(); + iwork < iwork_end; iwork += blockDim.y) { + this->template exec_range( + iwork, ValueOps::reference(shared_value), false); + } + + // Reduce and scan, writing out scan of blocks' totals and block-groups' + // totals. Blocks' scan values are written to 'blockIdx.x' location. + // Block-groups' scan values are at: i = ( j * blockDim.y - 1 ) for i < + // gridDim.x + cuda_single_inter_block_reduce_scan( + m_functor, blockIdx.x, gridDim.x, + kokkos_impl_cuda_shared_memory(), m_scratch_space, + m_scratch_flags); + } + + //---------------------------------------- + + __device__ inline void final(void) const { + const integral_nonzero_constant + word_count(ValueTraits::value_size(m_functor) / sizeof(size_type)); + + // Use shared memory as an exclusive scan: { 0 , value[0] , value[1] , + // value[2] , ... } + size_type* const shared_data = kokkos_impl_cuda_shared_memory(); + size_type* const shared_prefix = + shared_data + word_count.value * threadIdx.y; + size_type* const shared_accum = + shared_data + word_count.value * (blockDim.y + 1); // Starting value for this thread block is the previous block's total. - if ( blockIdx.x ) { - size_type * const block_total = m_scratch_space + word_count.value * ( blockIdx.x - 1 ); - for ( unsigned i = threadIdx.y ; i < word_count.value ; ++i ) { shared_accum[i] = block_total[i] ; } - } - else if ( 0 == threadIdx.y ) { - ValueInit::init( m_functor , shared_accum ); - } - - const WorkRange range( m_policy , blockIdx.x , gridDim.x ); - - for ( typename Policy::member_type iwork_base = range.begin(); iwork_base < range.end() ; iwork_base += blockDim.y ) { - #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - unsigned MASK=KOKKOS_IMPL_CUDA_ACTIVEMASK; - #endif - const typename Policy::member_type iwork = iwork_base + threadIdx.y ; - - __syncthreads(); // Don't overwrite previous iteration values until they are used - - ValueInit::init( m_functor , shared_prefix + word_count.value ); - - // Copy previous block's accumulation total into thread[0] prefix and inclusive scan value of this block - for ( unsigned i = threadIdx.y ; i < word_count.value ; ++i ) { - shared_data[i + word_count.value] = shared_data[i] = shared_accum[i] ; + if (blockIdx.x) { + size_type* const block_total = + m_scratch_space + word_count.value * (blockIdx.x - 1); + for (unsigned i = threadIdx.y; i < word_count.value; ++i) { + shared_accum[i] = block_total[i]; } - #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK + } else if (0 == threadIdx.y) { + ValueInit::init(m_functor, shared_accum); + } + + const WorkRange range(m_policy, blockIdx.x, gridDim.x); + + for (typename Policy::member_type iwork_base = range.begin(); + iwork_base < range.end(); iwork_base += blockDim.y) { +#ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK + unsigned MASK = KOKKOS_IMPL_CUDA_ACTIVEMASK; +#endif + + const typename Policy::member_type iwork = iwork_base + threadIdx.y; + + __syncthreads(); // Don't overwrite previous iteration values until they + // are used + + ValueInit::init(m_functor, shared_prefix + word_count.value); + + // Copy previous block's accumulation total into thread[0] prefix and + // inclusive scan value of this block + for (unsigned i = threadIdx.y; i < word_count.value; ++i) { + shared_data[i + word_count.value] = shared_data[i] = shared_accum[i]; + } + +#ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK KOKKOS_IMPL_CUDA_SYNCWARP_MASK(MASK); - #else +#else KOKKOS_IMPL_CUDA_SYNCWARP; - #endif - if ( CudaTraits::WarpSize < word_count.value ) { __syncthreads(); } // Protect against large scan values. +#endif + if (CudaTraits::WarpSize < word_count.value) { + __syncthreads(); + } // Protect against large scan values. // Call functor to accumulate inclusive scan value for this work item - if ( iwork < range.end() ) { - this-> template exec_range< WorkTag >( iwork , ValueOps::reference( shared_prefix + word_count.value ) , false ); + if (iwork < range.end()) { + this->template exec_range( + iwork, ValueOps::reference(shared_prefix + word_count.value), + false); } // Scan block values into locations shared_data[1..blockDim.y] - cuda_intra_block_reduce_scan( m_functor , typename ValueTraits::pointer_type(shared_data+word_count.value) ); + cuda_intra_block_reduce_scan( + m_functor, + typename ValueTraits::pointer_type(shared_data + word_count.value)); { - size_type * const block_total = shared_data + word_count.value * blockDim.y ; - for ( unsigned i = threadIdx.y ; i < word_count.value ; ++i ) { shared_accum[i] = block_total[i]; } + size_type* const block_total = + shared_data + word_count.value * blockDim.y; + for (unsigned i = threadIdx.y; i < word_count.value; ++i) { + shared_accum[i] = block_total[i]; + } } // Call functor with exclusive scan value - if ( iwork < range.end() ) { - this-> template exec_range< WorkTag >( iwork , ValueOps::reference( shared_prefix ) , true ); + if (iwork < range.end()) { + this->template exec_range( + iwork, ValueOps::reference(shared_prefix), true); } } } -public: - + public: //---------------------------------------- - __device__ inline - void operator()(void) const - { - if ( ! m_final ) { - initial(); - } - else { - final(); + __device__ inline void operator()(void) const { +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + if (m_run_serial) { + typename ValueTraits::value_type value; + ValueInit::init(m_functor, (void*)&value); + const WorkRange range(m_policy, blockIdx.x, gridDim.x); + + for (typename Policy::member_type iwork_base = range.begin(); + iwork_base < range.end(); iwork_base++) { + this->template exec_range(iwork_base, value, true); + } + *((typename ValueTraits::value_type*)m_scratch_space) = value; + } else { +#endif + if (!m_final) { + initial(); + } else { + final(); + } +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION } +#endif } // Determine block size constrained by shared memory: - inline - unsigned local_block_size( const FunctorType & f ) - { - // blockDim.y must be power of two = 128 (4 warps) or 256 (8 warps) or 512 (16 warps) - // gridDim.x <= blockDim.y * blockDim.y - // - // 4 warps was 10% faster than 8 warps and 20% faster than 16 warps in unit testing + inline unsigned local_block_size(const FunctorType& f) { + // blockDim.y must be power of two = 128 (4 warps) or 256 (8 warps) or 512 + // (16 warps) gridDim.x <= blockDim.y * blockDim.y + // + // 4 warps was 10% faster than 8 warps and 20% faster than 16 warps in unit + // testing - unsigned n = CudaTraits::WarpSize * 4 ; - while ( n && unsigned(m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock) < cuda_single_inter_block_reduce_scan_shmem( f , n ) ) { n >>= 1 ; } - return n ; + unsigned n = CudaTraits::WarpSize * 4; + while (n && + unsigned(m_policy.space() + .impl_internal_space_instance() + ->m_maxShmemPerBlock) < + cuda_single_inter_block_reduce_scan_shmem(f, n)) { + n >>= 1; } + return n; + } - inline - void execute() - { - const int nwork = m_policy.end() - m_policy.begin(); - if ( nwork ) { - enum { GridMaxComputeCapability_2x = 0x0ffff }; + inline void execute() { + const int nwork = m_policy.end() - m_policy.begin(); + if (nwork) { + enum { GridMaxComputeCapability_2x = 0x0ffff }; - const int block_size = local_block_size( m_functor ); + const int block_size = local_block_size(m_functor); - const int grid_max = - ( block_size * block_size ) < GridMaxComputeCapability_2x ? - ( block_size * block_size ) : GridMaxComputeCapability_2x ; + const int grid_max = + (block_size * block_size) < GridMaxComputeCapability_2x + ? (block_size * block_size) + : GridMaxComputeCapability_2x; - // At most 'max_grid' blocks: - const int max_grid = std::min( int(grid_max) , int(( nwork + block_size - 1 ) / block_size )); + // At most 'max_grid' blocks: + const int max_grid = + std::min(int(grid_max), int((nwork + block_size - 1) / block_size)); - // How much work per block: - const int work_per_block = ( nwork + max_grid - 1 ) / max_grid ; + // How much work per block: + const int work_per_block = (nwork + max_grid - 1) / max_grid; - // How many block are really needed for this much work: - const int grid_x = ( nwork + work_per_block - 1 ) / work_per_block ; + // How many block are really needed for this much work: + const int grid_x = (nwork + work_per_block - 1) / work_per_block; - m_scratch_space = cuda_internal_scratch_space( m_policy.space(), ValueTraits::value_size( m_functor ) * grid_x ); - m_scratch_flags = cuda_internal_scratch_flags( m_policy.space(), sizeof(size_type) * 1 ); + m_scratch_space = cuda_internal_scratch_space( + m_policy.space(), ValueTraits::value_size(m_functor) * grid_x); + m_scratch_flags = + cuda_internal_scratch_flags(m_policy.space(), sizeof(size_type) * 1); - const dim3 grid( grid_x , 1 , 1 ); - const dim3 block( 1 , block_size , 1 ); // REQUIRED DIMENSIONS ( 1 , N , 1 ) - const int shmem = ValueTraits::value_size( m_functor ) * ( block_size + 2 ); + dim3 grid(grid_x, 1, 1); + dim3 block(1, block_size, 1); // REQUIRED DIMENSIONS ( 1 , N , 1 ) + const int shmem = ValueTraits::value_size(m_functor) * (block_size + 2); - m_final = false ; - CudaParallelLaunch< ParallelScan, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + if (m_run_serial) { + block = dim3(1, 1, 1); + grid = dim3(1, 1, 1); + } else { +#endif - m_final = true ; - CudaParallelLaunch< ParallelScan, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute + m_final = false; + CudaParallelLaunch( + *this, grid, block, shmem, + m_policy.space().impl_internal_space_instance(), + false); // copy to device and execute +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION } - } +#endif + m_final = true; + CudaParallelLaunch( + *this, grid, block, shmem, + m_policy.space().impl_internal_space_instance(), + false); // copy to device and execute - ParallelScan( const FunctorType & arg_functor , - const Policy & arg_policy ) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_scratch_space( 0 ) - , m_scratch_flags( 0 ) - , m_final( false ) - { } + const int size = ValueTraits::value_size(m_functor); +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + if (m_run_serial) + DeepCopy(&m_returnvalue, m_scratch_space, size); + else +#endif + DeepCopy( + &m_returnvalue, m_scratch_space + (grid_x - 1) * size / sizeof(int), + size); + } + } + + ParallelScanWithTotal(const FunctorType& arg_functor, + const Policy& arg_policy, ReturnType& arg_returnvalue) + : m_functor(arg_functor), + m_policy(arg_policy), + m_scratch_space(0), + m_scratch_flags(0), + m_final(false), + m_returnvalue(arg_returnvalue) +#ifdef KOKKOS_IMPL_DEBUG_CUDA_SERIAL_EXECUTION + , + m_run_serial(Kokkos::Impl::CudaInternal::cuda_use_serial_execution()) +#endif + { + } }; -//---------------------------------------------------------------------------- -template< class FunctorType, class ReturnType, class ... Traits > -class ParallelScanWithTotal< FunctorType - , Kokkos::RangePolicy< Traits ... > - , ReturnType - , Kokkos::Cuda - > -{ -public: - typedef Kokkos::RangePolicy< Traits ... > Policy ; - -private: - typedef typename Policy::member_type Member ; - typedef typename Policy::work_tag WorkTag ; - typedef typename Policy::WorkRange WorkRange ; - typedef typename Policy::launch_bounds LaunchBounds ; - - typedef Kokkos::Impl::FunctorValueTraits< FunctorType, WorkTag > ValueTraits ; - typedef Kokkos::Impl::FunctorValueInit< FunctorType, WorkTag > ValueInit ; - typedef Kokkos::Impl::FunctorValueOps< FunctorType, WorkTag > ValueOps ; - -public: - - typedef typename ValueTraits::pointer_type pointer_type ; - typedef typename ValueTraits::reference_type reference_type ; - typedef FunctorType functor_type ; - typedef Cuda::size_type size_type ; - -private: - - // Algorithmic constraints: - // (a) blockDim.y is a power of two - // (b) blockDim.y == blockDim.z == 1 - // (c) gridDim.x <= blockDim.y * blockDim.y - // (d) gridDim.y == gridDim.z == 1 - - const FunctorType m_functor ; - const Policy m_policy ; - size_type * m_scratch_space ; - size_type * m_scratch_flags ; - size_type m_final ; - ReturnType & m_returnvalue; - - template< class TagType > - __device__ inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec_range( const Member & i , reference_type update , const bool final_result ) const - { m_functor( i , update , final_result ); } - - template< class TagType > - __device__ inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec_range( const Member & i , reference_type update , const bool final_result ) const - { m_functor( TagType() , i , update , final_result ); } - - //---------------------------------------- - - __device__ inline - void initial(void) const - { - const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) > - word_count( ValueTraits::value_size( m_functor ) / sizeof(size_type) ); - - size_type * const shared_value = kokkos_impl_cuda_shared_memory() + word_count.value * threadIdx.y ; - - ValueInit::init( m_functor , shared_value ); - - // Number of blocks is bounded so that the reduction can be limited to two passes. - // Each thread block is given an approximately equal amount of work to perform. - // Accumulate the values for this block. - // The accumulation ordering does not match the final pass, but is arithmatically equivalent. - - const WorkRange range( m_policy , blockIdx.x , gridDim.x ); - - for ( Member iwork = range.begin() + threadIdx.y , iwork_end = range.end() ; - iwork < iwork_end ; iwork += blockDim.y ) { - this-> template exec_range< WorkTag >( iwork , ValueOps::reference( shared_value ) , false ); - } - - // Reduce and scan, writing out scan of blocks' totals and block-groups' totals. - // Blocks' scan values are written to 'blockIdx.x' location. - // Block-groups' scan values are at: i = ( j * blockDim.y - 1 ) for i < gridDim.x - cuda_single_inter_block_reduce_scan( m_functor , blockIdx.x , gridDim.x , kokkos_impl_cuda_shared_memory() , m_scratch_space , m_scratch_flags ); - } - - //---------------------------------------- - - __device__ inline - void final(void) const - { - const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) > - word_count( ValueTraits::value_size( m_functor ) / sizeof(size_type) ); - - // Use shared memory as an exclusive scan: { 0 , value[0] , value[1] , value[2] , ... } - size_type * const shared_data = kokkos_impl_cuda_shared_memory(); - size_type * const shared_prefix = shared_data + word_count.value * threadIdx.y ; - size_type * const shared_accum = shared_data + word_count.value * ( blockDim.y + 1 ); - - // Starting value for this thread block is the previous block's total. - if ( blockIdx.x ) { - size_type * const block_total = m_scratch_space + word_count.value * ( blockIdx.x - 1 ); - for ( unsigned i = threadIdx.y ; i < word_count.value ; ++i ) { shared_accum[i] = block_total[i] ; } - } - else if ( 0 == threadIdx.y ) { - ValueInit::init( m_functor , shared_accum ); - } - - const WorkRange range( m_policy , blockIdx.x , gridDim.x ); - - for ( typename Policy::member_type iwork_base = range.begin(); iwork_base < range.end() ; iwork_base += blockDim.y ) { - #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - unsigned MASK=KOKKOS_IMPL_CUDA_ACTIVEMASK; - #endif - - const typename Policy::member_type iwork = iwork_base + threadIdx.y ; - - __syncthreads(); // Don't overwrite previous iteration values until they are used - - ValueInit::init( m_functor , shared_prefix + word_count.value ); - - // Copy previous block's accumulation total into thread[0] prefix and inclusive scan value of this block - for ( unsigned i = threadIdx.y ; i < word_count.value ; ++i ) { - shared_data[i + word_count.value] = shared_data[i] = shared_accum[i] ; - } - - #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - KOKKOS_IMPL_CUDA_SYNCWARP_MASK(MASK); - #else - KOKKOS_IMPL_CUDA_SYNCWARP; - #endif - if ( CudaTraits::WarpSize < word_count.value ) { __syncthreads(); } // Protect against large scan values. - - // Call functor to accumulate inclusive scan value for this work item - if ( iwork < range.end() ) { - this-> template exec_range< WorkTag >( iwork , ValueOps::reference( shared_prefix + word_count.value ) , false ); - } - - // Scan block values into locations shared_data[1..blockDim.y] - cuda_intra_block_reduce_scan( m_functor , typename ValueTraits::pointer_type(shared_data+word_count.value) ); - - { - size_type * const block_total = shared_data + word_count.value * blockDim.y ; - for ( unsigned i = threadIdx.y ; i < word_count.value ; ++i ) { shared_accum[i] = block_total[i]; } - } - - // Call functor with exclusive scan value - if ( iwork < range.end() ) { - this-> template exec_range< WorkTag >( iwork , ValueOps::reference( shared_prefix ) , true ); - } - } - } - -public: - - //---------------------------------------- - - __device__ inline - void operator()(void) const - { - if ( ! m_final ) { - initial(); - } - else { - final(); - } - } - - // Determine block size constrained by shared memory: - inline - unsigned local_block_size( const FunctorType & f ) - { - // blockDim.y must be power of two = 128 (4 warps) or 256 (8 warps) or 512 (16 warps) - // gridDim.x <= blockDim.y * blockDim.y - // - // 4 warps was 10% faster than 8 warps and 20% faster than 16 warps in unit testing - - unsigned n = CudaTraits::WarpSize * 4 ; - while ( n && unsigned(m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock) < cuda_single_inter_block_reduce_scan_shmem( f , n ) ) { n >>= 1 ; } - return n ; - } - - inline - void execute() - { - const int nwork = m_policy.end() - m_policy.begin(); - if ( nwork ) { - enum { GridMaxComputeCapability_2x = 0x0ffff }; - - const int block_size = local_block_size( m_functor ); - - const int grid_max = - ( block_size * block_size ) < GridMaxComputeCapability_2x ? - ( block_size * block_size ) : GridMaxComputeCapability_2x ; - - // At most 'max_grid' blocks: - const int max_grid = std::min( int(grid_max) , int(( nwork + block_size - 1 ) / block_size )); - - // How much work per block: - const int work_per_block = ( nwork + max_grid - 1 ) / max_grid ; - - // How many block are really needed for this much work: - const int grid_x = ( nwork + work_per_block - 1 ) / work_per_block ; - - m_scratch_space = cuda_internal_scratch_space( m_policy.space(), ValueTraits::value_size( m_functor ) * grid_x ); - m_scratch_flags = cuda_internal_scratch_flags( m_policy.space(), sizeof(size_type) * 1 ); - - const dim3 grid( grid_x , 1 , 1 ); - const dim3 block( 1 , block_size , 1 ); // REQUIRED DIMENSIONS ( 1 , N , 1 ) - const int shmem = ValueTraits::value_size( m_functor ) * ( block_size + 2 ); - - m_final = false ; - CudaParallelLaunch< ParallelScanWithTotal, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute - - m_final = true ; - CudaParallelLaunch< ParallelScanWithTotal, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute - - const int size = ValueTraits::value_size( m_functor ); - DeepCopy( &m_returnvalue, m_scratch_space + (grid_x - 1)*size/sizeof(int), size ); - } - } - - ParallelScanWithTotal( const FunctorType & arg_functor , - const Policy & arg_policy , - ReturnType & arg_returnvalue ) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_scratch_space( 0 ) - , m_scratch_flags( 0 ) - , m_final( false ) - , m_returnvalue( arg_returnvalue ) - { } -}; - -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -2131,155 +2606,228 @@ public: namespace Kokkos { namespace Impl { - template< class FunctorType, class ExecPolicy, class ValueType , class Tag = typename ExecPolicy::work_tag> - struct CudaFunctorAdapter { - const FunctorType f; - typedef ValueType value_type; - CudaFunctorAdapter(const FunctorType& f_):f(f_) {} +template +struct CudaFunctorAdapter { + const FunctorType f; + typedef ValueType value_type; + CudaFunctorAdapter(const FunctorType& f_) : f(f_) {} - __device__ inline - void operator() (typename ExecPolicy::work_tag, const typename ExecPolicy::member_type& i, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals third argument type of FunctorType::operator() - f(typename ExecPolicy::work_tag(), i, val); - } + __device__ inline void operator()(typename ExecPolicy::work_tag, + const typename ExecPolicy::member_type& i, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals third argument + // type of FunctorType::operator() + f(typename ExecPolicy::work_tag(), i, val); + } - __device__ inline - void operator() (typename ExecPolicy::work_tag, const typename ExecPolicy::member_type& i, const typename ExecPolicy::member_type& j, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals third argument type of FunctorType::operator() - f(typename ExecPolicy::work_tag(), i, j, val); - } + __device__ inline void operator()(typename ExecPolicy::work_tag, + const typename ExecPolicy::member_type& i, + const typename ExecPolicy::member_type& j, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals third argument + // type of FunctorType::operator() + f(typename ExecPolicy::work_tag(), i, j, val); + } - __device__ inline - void operator() (typename ExecPolicy::work_tag, const typename ExecPolicy::member_type& i, const typename ExecPolicy::member_type& j, const typename ExecPolicy::member_type& k, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals third argument type of FunctorType::operator() - f(typename ExecPolicy::work_tag(), i, j, k, val); - } + __device__ inline void operator()(typename ExecPolicy::work_tag, + const typename ExecPolicy::member_type& i, + const typename ExecPolicy::member_type& j, + const typename ExecPolicy::member_type& k, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals third argument + // type of FunctorType::operator() + f(typename ExecPolicy::work_tag(), i, j, k, val); + } - __device__ inline - void operator() (typename ExecPolicy::work_tag, const typename ExecPolicy::member_type& i, const typename ExecPolicy::member_type& j, const typename ExecPolicy::member_type& k, const typename ExecPolicy::member_type& l, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals third argument type of FunctorType::operator() - f(typename ExecPolicy::work_tag(), i, j, k, l, val); - } + __device__ inline void operator()(typename ExecPolicy::work_tag, + const typename ExecPolicy::member_type& i, + const typename ExecPolicy::member_type& j, + const typename ExecPolicy::member_type& k, + const typename ExecPolicy::member_type& l, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals third argument + // type of FunctorType::operator() + f(typename ExecPolicy::work_tag(), i, j, k, l, val); + } - __device__ inline - void operator() (typename ExecPolicy::work_tag, const typename ExecPolicy::member_type& i, const typename ExecPolicy::member_type& j, const typename ExecPolicy::member_type& k, const typename ExecPolicy::member_type& l, const typename ExecPolicy::member_type& m, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals third argument type of FunctorType::operator() - f(typename ExecPolicy::work_tag(), i, j, k, l, m, val); - } + __device__ inline void operator()(typename ExecPolicy::work_tag, + const typename ExecPolicy::member_type& i, + const typename ExecPolicy::member_type& j, + const typename ExecPolicy::member_type& k, + const typename ExecPolicy::member_type& l, + const typename ExecPolicy::member_type& m, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals third argument + // type of FunctorType::operator() + f(typename ExecPolicy::work_tag(), i, j, k, l, m, val); + } - __device__ inline - void operator() (typename ExecPolicy::work_tag, const typename ExecPolicy::member_type& i, const typename ExecPolicy::member_type& j, const typename ExecPolicy::member_type& k, const typename ExecPolicy::member_type& l, const typename ExecPolicy::member_type& m, const typename ExecPolicy::member_type& n, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals third argument type of FunctorType::operator() - f(typename ExecPolicy::work_tag(), i, j, k, l, m, n, val); - } + __device__ inline void operator()(typename ExecPolicy::work_tag, + const typename ExecPolicy::member_type& i, + const typename ExecPolicy::member_type& j, + const typename ExecPolicy::member_type& k, + const typename ExecPolicy::member_type& l, + const typename ExecPolicy::member_type& m, + const typename ExecPolicy::member_type& n, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals third argument + // type of FunctorType::operator() + f(typename ExecPolicy::work_tag(), i, j, k, l, m, n, val); + } +}; +template +struct CudaFunctorAdapter { + const FunctorType f; + typedef ValueType value_type; + CudaFunctorAdapter(const FunctorType& f_) : f(f_) {} + + __device__ inline void operator()(const typename ExecPolicy::member_type& i, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, val); + } + + __device__ inline void operator()(const typename ExecPolicy::member_type& i, + const typename ExecPolicy::member_type& j, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, j, val); + } + + __device__ inline void operator()(const typename ExecPolicy::member_type& i, + const typename ExecPolicy::member_type& j, + const typename ExecPolicy::member_type& k, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, j, k, val); + } + + __device__ inline void operator()(const typename ExecPolicy::member_type& i, + const typename ExecPolicy::member_type& j, + const typename ExecPolicy::member_type& k, + const typename ExecPolicy::member_type& l, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, j, k, l, val); + } + + __device__ inline void operator()(const typename ExecPolicy::member_type& i, + const typename ExecPolicy::member_type& j, + const typename ExecPolicy::member_type& k, + const typename ExecPolicy::member_type& l, + const typename ExecPolicy::member_type& m, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, j, k, l, m, val); + } + + __device__ inline void operator()(const typename ExecPolicy::member_type& i, + const typename ExecPolicy::member_type& j, + const typename ExecPolicy::member_type& k, + const typename ExecPolicy::member_type& l, + const typename ExecPolicy::member_type& m, + const typename ExecPolicy::member_type& n, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, j, k, l, m, n, val); + } + + __device__ inline void operator()(typename ExecPolicy::member_type& i, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, val); + } + + __device__ inline void operator()(typename ExecPolicy::member_type& i, + typename ExecPolicy::member_type& j, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, j, val); + } + + __device__ inline void operator()(typename ExecPolicy::member_type& i, + typename ExecPolicy::member_type& j, + typename ExecPolicy::member_type& k, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, j, k, val); + } + + __device__ inline void operator()(typename ExecPolicy::member_type& i, + typename ExecPolicy::member_type& j, + typename ExecPolicy::member_type& k, + typename ExecPolicy::member_type& l, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, j, k, l, val); + } + + __device__ inline void operator()(typename ExecPolicy::member_type& i, + typename ExecPolicy::member_type& j, + typename ExecPolicy::member_type& k, + typename ExecPolicy::member_type& l, + typename ExecPolicy::member_type& m, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, j, k, l, m, val); + } + + __device__ inline void operator()(typename ExecPolicy::member_type& i, + typename ExecPolicy::member_type& j, + typename ExecPolicy::member_type& k, + typename ExecPolicy::member_type& l, + typename ExecPolicy::member_type& m, + typename ExecPolicy::member_type& n, + ValueType& val) const { + // Insert Static Assert with decltype on ValueType equals second argument + // type of FunctorType::operator() + f(i, j, k, l, m, n, val); + } +}; + +template ::value> +struct FunctorReferenceType { + typedef ResultType& reference_type; +}; + +template +struct FunctorReferenceType { + typedef typename Kokkos::Impl::FunctorValueTraits< + FunctorType, Tag>::reference_type reference_type; +}; + +template +struct ParallelReduceFunctorType { + enum { + FunctorHasValueType = IsNonTrivialReduceFunctor::value }; + typedef typename Kokkos::Impl::if_c< + FunctorHasValueType, FunctorTypeIn, + Impl::CudaFunctorAdapter>::type + functor_type; + static functor_type functor(const FunctorTypeIn& functor_in) { + return Impl::if_c::select( + functor_in, functor_type(functor_in)); + } +}; - template< class FunctorType, class ExecPolicy, class ValueType > - struct CudaFunctorAdapter { - const FunctorType f; - typedef ValueType value_type; - CudaFunctorAdapter(const FunctorType& f_):f(f_) {} +} // namespace Impl - __device__ inline - void operator() (const typename ExecPolicy::member_type& i, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,val); - } - - __device__ inline - void operator() (const typename ExecPolicy::member_type& i, const typename ExecPolicy::member_type& j, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,j,val); - } - - __device__ inline - void operator() (const typename ExecPolicy::member_type& i, const typename ExecPolicy::member_type& j, const typename ExecPolicy::member_type& k, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,j,k,val); - } - - __device__ inline - void operator() (const typename ExecPolicy::member_type& i, const typename ExecPolicy::member_type& j, const typename ExecPolicy::member_type& k, const typename ExecPolicy::member_type& l, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,j,k,l,val); - } - - __device__ inline - void operator() (const typename ExecPolicy::member_type& i, const typename ExecPolicy::member_type& j, const typename ExecPolicy::member_type& k, const typename ExecPolicy::member_type& l, const typename ExecPolicy::member_type& m, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,j,k,l,m,val); - } - - __device__ inline - void operator() (const typename ExecPolicy::member_type& i, const typename ExecPolicy::member_type& j, const typename ExecPolicy::member_type& k, const typename ExecPolicy::member_type& l, const typename ExecPolicy::member_type& m, const typename ExecPolicy::member_type& n, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,j,k,l,m,n,val); - } - - - __device__ inline - void operator() (typename ExecPolicy::member_type& i, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,val); - } - - __device__ inline - void operator() (typename ExecPolicy::member_type& i, typename ExecPolicy::member_type& j, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,j,val); - } - - __device__ inline - void operator() (typename ExecPolicy::member_type& i, typename ExecPolicy::member_type& j, typename ExecPolicy::member_type& k, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,j,k,val); - } - - __device__ inline - void operator() (typename ExecPolicy::member_type& i, typename ExecPolicy::member_type& j, typename ExecPolicy::member_type& k, typename ExecPolicy::member_type& l, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,j,k,l,val); - } - - __device__ inline - void operator() (typename ExecPolicy::member_type& i, typename ExecPolicy::member_type& j, typename ExecPolicy::member_type& k, typename ExecPolicy::member_type& l, typename ExecPolicy::member_type& m, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,j,k,l,m,val); - } - - __device__ inline - void operator() (typename ExecPolicy::member_type& i, typename ExecPolicy::member_type& j, typename ExecPolicy::member_type& k, typename ExecPolicy::member_type& l, typename ExecPolicy::member_type& m, typename ExecPolicy::member_type& n, ValueType& val) const { - //Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator() - f(i,j,k,l,m,n,val); - } - - }; - - template::value > - struct FunctorReferenceType { - typedef ResultType& reference_type; - }; - - template - struct FunctorReferenceType { - typedef typename Kokkos::Impl::FunctorValueTraits< FunctorType ,Tag >::reference_type reference_type; - }; - - template< class FunctorTypeIn, class ExecPolicy, class ValueType> - struct ParallelReduceFunctorType { - - enum {FunctorHasValueType = IsNonTrivialReduceFunctor::value }; - typedef typename Kokkos::Impl::if_c >::type functor_type; - static functor_type functor(const FunctorTypeIn& functor_in) { - return Impl::if_c::select(functor_in,functor_type(functor_in)); - } - }; - -} - -} // namespace Kokkos +} // namespace Kokkos #endif /* defined( __CUDACC__ ) */ #endif /* #ifndef KOKKOS_CUDA_PARALLEL_HPP */ - diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp index c39dddb198..41431bfb8d 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_CUDA_REDUCESCAN_HPP #include -#if defined( __CUDACC__ ) && defined( KOKKOS_ENABLE_CUDA ) +#if defined(__CUDACC__) && defined(KOKKOS_ENABLE_CUDA) #include @@ -60,131 +61,6 @@ namespace Kokkos { namespace Impl { -//---------------------------------------------------------------------------- -// Shuffle operations require input to be a register (stack) variable - -// TODO: reconcile these implementations with those in Kokkos_Cuda_Vectorization.hpp - -template< typename T > -__device__ inline -void cuda_shfl( T & out , T const & in , int lane , - typename std::enable_if< sizeof(int) == sizeof(T) , int >::type width - , unsigned mask = 0xffffffff ) -{ - *reinterpret_cast(&out) = - KOKKOS_IMPL_CUDA_SHFL_MASK( mask , *reinterpret_cast(&in) , lane , width ); -} - -// TODO: figure out why 64-bit shfl fails in Clang -#if ( CUDA_VERSION >= 9000 ) && (!defined(KOKKOS_COMPILER_CLANG)) - -template< typename T > -__device__ inline -void cuda_shfl( T & out , T const & in , int lane , - typename std::enable_if< sizeof(long long) == sizeof(T) , int >::type width - , unsigned mask = 0xffffffff ) -{ - *reinterpret_cast(&out) = - KOKKOS_IMPL_CUDA_SHFL_MASK( mask , *reinterpret_cast(&in) , lane , width ); -} - -#endif - -template< typename T > -__device__ inline -void cuda_shfl( T & out , T const & in , int lane , - typename std::enable_if - < ( KOKKOS_IMPL_CUDA_MAX_SHFL_SIZEOF < sizeof(T) ) && ( 0 == ( sizeof(T) % sizeof(int) ) ) - , int >::type width, unsigned mask = 0xffffffff ) -{ - enum : int { N = sizeof(T) / sizeof(int) }; - - for ( int i = 0 ; i < N ; ++i ) { - reinterpret_cast(&out)[i] = - KOKKOS_IMPL_CUDA_SHFL_MASK( mask , reinterpret_cast(&in)[i] , lane , width ); - } -} - -//---------------------------------------------------------------------------- - -template< typename T > -__device__ inline -void cuda_shfl_down( T & out , T const & in , int delta , - typename std::enable_if< sizeof(int) == sizeof(T) , int >::type width , unsigned mask = 0xffffffff ) -{ - *reinterpret_cast(&out) = - KOKKOS_IMPL_CUDA_SHFL_DOWN_MASK( mask , *reinterpret_cast(&in) , delta , width ); -} - -// TODO: figure out why 64-bit shfl fails in Clang -#if ( CUDA_VERSION >= 9000 ) && (!defined(KOKKOS_COMPILER_CLANG)) - -template< typename T > -__device__ inline -void cuda_shfl_down( T & out , T const & in , int delta , - typename std::enable_if< sizeof(long long) == sizeof(T) , int >::type width , unsigned mask = 0xffffffff ) -{ - *reinterpret_cast(&out) = - KOKKOS_IMPL_CUDA_SHFL_DOWN_MASK( mask , *reinterpret_cast(&in) , delta , width ); -} - -#endif - -template< typename T > -__device__ inline -void cuda_shfl_down( T & out , T const & in , int delta , - typename std::enable_if - < ( KOKKOS_IMPL_CUDA_MAX_SHFL_SIZEOF < sizeof(T) ) && ( 0 == ( sizeof(T) % sizeof(int) ) ) - , int >::type width , unsigned mask = 0xffffffff ) -{ - enum : int { N = sizeof(T) / sizeof(int) }; - - for ( int i = 0 ; i < N ; ++i ) { - reinterpret_cast(&out)[i] = - KOKKOS_IMPL_CUDA_SHFL_DOWN_MASK( mask , reinterpret_cast(&in)[i] , delta , width ); - } -} - -//---------------------------------------------------------------------------- - -template< typename T > -__device__ inline -void cuda_shfl_up( T & out , T const & in , int delta , - typename std::enable_if< sizeof(int) == sizeof(T) , int >::type width , unsigned mask = 0xffffffff ) -{ - *reinterpret_cast(&out) = - KOKKOS_IMPL_CUDA_SHFL_UP_MASK( mask , *reinterpret_cast(&in) , delta , width ); -} - -// TODO: figure out why 64-bit shfl fails in Clang -#if ( CUDA_VERSION >= 9000 ) && (!defined(KOKKOS_COMPILER_CLANG)) - -template< typename T > -__device__ inline -void cuda_shfl_up( T & out , T const & in , int delta , - typename std::enable_if< sizeof(long long) == sizeof(T) , int >::type width , unsigned mask = 0xffffffff ) -{ - *reinterpret_cast(&out) = - KOKKOS_IMPL_CUDA_SHFL_UP_MASK( mask , *reinterpret_cast(&in) , delta , width ); -} - -#endif - -template< typename T > -__device__ inline -void cuda_shfl_up( T & out , T const & in , int delta , - typename std::enable_if - < ( KOKKOS_IMPL_CUDA_MAX_SHFL_SIZEOF < sizeof(T) ) && ( 0 == ( sizeof(T) % sizeof(int) ) ) - , int >::type width , unsigned mask = 0xffffffff ) -{ - enum : int { N = sizeof(T) / sizeof(int) }; - - for ( int i = 0 ; i < N ; ++i ) { - reinterpret_cast(&out)[i] = - KOKKOS_IMPL_CUDA_SHFL_UP_MASK( mask , reinterpret_cast(&in)[i] , delta , width ); - } -} - //---------------------------------------------------------------------------- /* * Algorithmic constraints: @@ -193,511 +69,502 @@ void cuda_shfl_up( T & out , T const & in , int delta , * (c) blockDim.z == 1 */ -template< class ValueType , class JoinOp> +template __device__ inline -typename std::enable_if< !Kokkos::is_reducer::value >::type -cuda_intra_warp_reduction( ValueType& result, - const JoinOp& join, - const uint32_t max_active_thread = blockDim.y) { - + typename std::enable_if::value>::type + cuda_intra_warp_reduction(ValueType& result, const JoinOp& join, + const uint32_t max_active_thread = blockDim.y) { unsigned int shift = 1; - //Reduce over values from threads with different threadIdx.y - while(blockDim.x * shift < 32 ) { - const ValueType tmp = shfl_down(result, blockDim.x*shift,32u); - //Only join if upper thread is active (this allows non power of two for blockDim.y - if(threadIdx.y + shift < max_active_thread) - join(result , tmp); - shift*=2; + // Reduce over values from threads with different threadIdx.y + while (blockDim.x * shift < 32) { + const ValueType tmp = shfl_down(result, blockDim.x * shift, 32u); + // Only join if upper thread is active (this allows non power of two for + // blockDim.y + if (threadIdx.y + shift < max_active_thread) join(result, tmp); + shift *= 2; } - result = shfl(result,0,32); + result = shfl(result, 0, 32); } -template< class ValueType , class JoinOp> +template __device__ inline -typename std::enable_if< !Kokkos::is_reducer::value >::type -cuda_inter_warp_reduction( ValueType& value, - const JoinOp& join, - const int max_active_thread = blockDim.y) { - - #define STEP_WIDTH 4 - // Depending on the ValueType _shared__ memory must be aligned up to 8byte boundaries - // The reason not to use ValueType directly is that for types with constructors it - // could lead to race conditions - __shared__ double sh_result[(sizeof(ValueType)+7)/8*STEP_WIDTH]; - ValueType* result = (ValueType*) & sh_result; - const int step = 32 / blockDim.x; - int shift = STEP_WIDTH; - const int id = threadIdx.y%step==0?threadIdx.y/step:65000; - if(id < STEP_WIDTH ) { + typename std::enable_if::value>::type + cuda_inter_warp_reduction(ValueType& value, const JoinOp& join, + const int max_active_thread = blockDim.y) { +#define STEP_WIDTH 4 + // Depending on the ValueType _shared__ memory must be aligned up to 8byte + // boundaries The reason not to use ValueType directly is that for types with + // constructors it could lead to race conditions + __shared__ double sh_result[(sizeof(ValueType) + 7) / 8 * STEP_WIDTH]; + ValueType* result = (ValueType*)&sh_result; + const int step = 32 / blockDim.x; + int shift = STEP_WIDTH; + const int id = threadIdx.y % step == 0 ? threadIdx.y / step : 65000; + if (id < STEP_WIDTH) { result[id] = value; } __syncthreads(); - while (shift<=max_active_thread/step) { - if(shift<=id && shift+STEP_WIDTH>id && threadIdx.x==0) { - join(result[id%STEP_WIDTH],value); + while (shift <= max_active_thread / step) { + if (shift <= id && shift + STEP_WIDTH > id && threadIdx.x == 0) { + join(result[id % STEP_WIDTH], value); } __syncthreads(); - shift+=STEP_WIDTH; + shift += STEP_WIDTH; } - value = result[0]; - for(int i = 1; (i*step +template __device__ inline -typename std::enable_if< !Kokkos::is_reducer::value >::type -cuda_intra_block_reduction( ValueType& value, - const JoinOp& join, - const int max_active_thread = blockDim.y) { - cuda_intra_warp_reduction(value,join,max_active_thread); - cuda_inter_warp_reduction(value,join,max_active_thread); + typename std::enable_if::value>::type + cuda_intra_block_reduction(ValueType& value, const JoinOp& join, + const int max_active_thread = blockDim.y) { + cuda_intra_warp_reduction(value, join, max_active_thread); + cuda_inter_warp_reduction(value, join, max_active_thread); } -template< class FunctorType , class JoinOp , class ArgTag = void > -__device__ -bool cuda_inter_block_reduction( typename FunctorValueTraits< FunctorType , ArgTag >::reference_type value, - typename FunctorValueTraits< FunctorType , ArgTag >::reference_type neutral, - const JoinOp& join, - Cuda::size_type * const m_scratch_space, - typename FunctorValueTraits< FunctorType , ArgTag >::pointer_type const result, - Cuda::size_type * const m_scratch_flags, - const int max_active_thread = blockDim.y) { +template +__device__ bool cuda_inter_block_reduction( + typename FunctorValueTraits::reference_type value, + typename FunctorValueTraits::reference_type neutral, + const JoinOp& join, Cuda::size_type* const m_scratch_space, + typename FunctorValueTraits::pointer_type const result, + Cuda::size_type* const m_scratch_flags, + const int max_active_thread = blockDim.y) { #ifdef __CUDA_ARCH__ - typedef typename FunctorValueTraits< FunctorType , ArgTag >::pointer_type pointer_type; - typedef typename FunctorValueTraits< FunctorType , ArgTag >::value_type value_type; + typedef typename FunctorValueTraits::pointer_type + pointer_type; + typedef + typename FunctorValueTraits::value_type value_type; - //Do the intra-block reduction with shfl operations and static shared memory - cuda_intra_block_reduction(value,join,max_active_thread); + // Do the intra-block reduction with shfl operations and static shared memory + cuda_intra_block_reduction(value, join, max_active_thread); - const int id = threadIdx.y*blockDim.x + threadIdx.x; + const int id = threadIdx.y * blockDim.x + threadIdx.x; - //One thread in the block writes block result to global scratch_memory - if(id == 0 ) { - pointer_type global = ((pointer_type) m_scratch_space) + blockIdx.x; - *global = value; + // One thread in the block writes block result to global scratch_memory + if (id == 0) { + pointer_type global = ((pointer_type)m_scratch_space) + blockIdx.x; + *global = value; } - //One warp of last block performs inter block reduction through loading the block values from global scratch_memory + // One warp of last block performs inter block reduction through loading the + // block values from global scratch_memory bool last_block = false; - + __threadfence(); __syncthreads(); - if ( id < 32 ) { + if (id < 32) { Cuda::size_type count; - //Figure out whether this is the last block - if(id == 0) - count = Kokkos::atomic_fetch_add(m_scratch_flags,1); - count = Kokkos::shfl(count,0,32); + // Figure out whether this is the last block + if (id == 0) count = Kokkos::atomic_fetch_add(m_scratch_flags, 1); + count = Kokkos::shfl(count, 0, 32); - //Last block does the inter block reduction - if( count == gridDim.x - 1) { - //set flag back to zero - if(id == 0) - *m_scratch_flags = 0; + // Last block does the inter block reduction + if (count == gridDim.x - 1) { + // set flag back to zero + if (id == 0) *m_scratch_flags = 0; last_block = true; - value = neutral; + value = neutral; - pointer_type const volatile global = (pointer_type) m_scratch_space ; + pointer_type const volatile global = (pointer_type)m_scratch_space; - //Reduce all global values with splitting work over threads in one warp - const int step_size = blockDim.x*blockDim.y < 32 ? blockDim.x*blockDim.y : 32; - for(int i=id; i<(int)gridDim.x; i+=step_size) { + // Reduce all global values with splitting work over threads in one warp + const int step_size = + blockDim.x * blockDim.y < 32 ? blockDim.x * blockDim.y : 32; + for (int i = id; i < (int)gridDim.x; i += step_size) { value_type tmp = global[i]; join(value, tmp); } - //Perform shfl reductions within the warp only join if contribution is valid (allows gridDim.x non power of two and <32) - if (int(blockDim.x*blockDim.y) > 1) { - value_type tmp = Kokkos::shfl_down(value, 1,32); - if( id + 1 < int(gridDim.x) ) - join(value, tmp); + // Perform shfl reductions within the warp only join if contribution is + // valid (allows gridDim.x non power of two and <32) + if (int(blockDim.x * blockDim.y) > 1) { + value_type tmp = Kokkos::shfl_down(value, 1, 32); + if (id + 1 < int(gridDim.x)) join(value, tmp); } #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK unsigned int mask = KOKKOS_IMPL_CUDA_ACTIVEMASK; - int active = KOKKOS_IMPL_CUDA_BALLOT_MASK(mask,1); + int active = KOKKOS_IMPL_CUDA_BALLOT_MASK(mask, 1); #else int active = KOKKOS_IMPL_CUDA_BALLOT(1); #endif - if (int(blockDim.x*blockDim.y) > 2) { - value_type tmp = Kokkos::shfl_down(value, 2,32); - if( id + 2 < int(gridDim.x) ) - join(value, tmp); + if (int(blockDim.x * blockDim.y) > 2) { + value_type tmp = Kokkos::shfl_down(value, 2, 32); + if (id + 2 < int(gridDim.x)) join(value, tmp); } #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask,1); + active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask, 1); #else active += KOKKOS_IMPL_CUDA_BALLOT(1); #endif - if (int(blockDim.x*blockDim.y) > 4) { - value_type tmp = Kokkos::shfl_down(value, 4,32); - if( id + 4 < int(gridDim.x) ) - join(value, tmp); + if (int(blockDim.x * blockDim.y) > 4) { + value_type tmp = Kokkos::shfl_down(value, 4, 32); + if (id + 4 < int(gridDim.x)) join(value, tmp); } #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask,1); + active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask, 1); #else active += KOKKOS_IMPL_CUDA_BALLOT(1); #endif - if (int(blockDim.x*blockDim.y) > 8) { - value_type tmp = Kokkos::shfl_down(value, 8,32); - if( id + 8 < int(gridDim.x) ) - join(value, tmp); + if (int(blockDim.x * blockDim.y) > 8) { + value_type tmp = Kokkos::shfl_down(value, 8, 32); + if (id + 8 < int(gridDim.x)) join(value, tmp); } #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask,1); + active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask, 1); #else active += KOKKOS_IMPL_CUDA_BALLOT(1); #endif - if (int(blockDim.x*blockDim.y) > 16) { - value_type tmp = Kokkos::shfl_down(value, 16,32); - if( id + 16 < int(gridDim.x) ) - join(value, tmp); + if (int(blockDim.x * blockDim.y) > 16) { + value_type tmp = Kokkos::shfl_down(value, 16, 32); + if (id + 16 < int(gridDim.x)) join(value, tmp); } #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask,1); + active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask, 1); #else active += KOKKOS_IMPL_CUDA_BALLOT(1); #endif } } - //The last block has in its thread=0 the global reduction value through "value" + // The last block has in its thread=0 the global reduction value through + // "value" return last_block; #else return true; #endif } -template< class ReducerType > +template __device__ inline -typename std::enable_if< Kokkos::is_reducer::value >::type -cuda_intra_warp_reduction( const ReducerType& reducer, - typename ReducerType::value_type& result, - const uint32_t max_active_thread = blockDim.y) { - + typename std::enable_if::value>::type + cuda_intra_warp_reduction(const ReducerType& reducer, + typename ReducerType::value_type& result, + const uint32_t max_active_thread = blockDim.y) { typedef typename ReducerType::value_type ValueType; unsigned int shift = 1; - //Reduce over values from threads with different threadIdx.y - while(blockDim.x * shift < 32 ) { - const ValueType tmp = shfl_down(result, blockDim.x*shift,32u); - //Only join if upper thread is active (this allows non power of two for blockDim.y - if(threadIdx.y + shift < max_active_thread) - reducer.join(result , tmp); - shift*=2; + // Reduce over values from threads with different threadIdx.y + while (blockDim.x * shift < 32) { + const ValueType tmp = shfl_down(result, blockDim.x * shift, 32u); + // Only join if upper thread is active (this allows non power of two for + // blockDim.y + if (threadIdx.y + shift < max_active_thread) reducer.join(result, tmp); + shift *= 2; } - result = shfl(result,0,32); + result = shfl(result, 0, 32); reducer.reference() = result; } -template< class ReducerType > +template __device__ inline -typename std::enable_if< Kokkos::is_reducer::value >::type -cuda_inter_warp_reduction( const ReducerType& reducer, - typename ReducerType::value_type value, - const int max_active_thread = blockDim.y) { - + typename std::enable_if::value>::type + cuda_inter_warp_reduction(const ReducerType& reducer, + typename ReducerType::value_type value, + const int max_active_thread = blockDim.y) { typedef typename ReducerType::value_type ValueType; - #define STEP_WIDTH 4 - // Depending on the ValueType _shared__ memory must be aligned up to 8byte boundaries - // The reason not to use ValueType directly is that for types with constructors it - // could lead to race conditions - __shared__ double sh_result[(sizeof(ValueType)+7)/8*STEP_WIDTH]; - ValueType* result = (ValueType*) & sh_result; - const int step = 32 / blockDim.x; - int shift = STEP_WIDTH; - const int id = threadIdx.y%step==0?threadIdx.y/step:65000; - if(id < STEP_WIDTH ) { +#define STEP_WIDTH 4 + // Depending on the ValueType _shared__ memory must be aligned up to 8byte + // boundaries The reason not to use ValueType directly is that for types with + // constructors it could lead to race conditions + __shared__ double sh_result[(sizeof(ValueType) + 7) / 8 * STEP_WIDTH]; + ValueType* result = (ValueType*)&sh_result; + const int step = 32 / blockDim.x; + int shift = STEP_WIDTH; + const int id = threadIdx.y % step == 0 ? threadIdx.y / step : 65000; + if (id < STEP_WIDTH) { result[id] = value; } __syncthreads(); - while (shift<=max_active_thread/step) { - if(shift<=id && shift+STEP_WIDTH>id && threadIdx.x==0) { - reducer.join(result[id%STEP_WIDTH],value); + while (shift <= max_active_thread / step) { + if (shift <= id && shift + STEP_WIDTH > id && threadIdx.x == 0) { + reducer.join(result[id % STEP_WIDTH], value); } __syncthreads(); - shift+=STEP_WIDTH; + shift += STEP_WIDTH; } - value = result[0]; - for(int i = 1; (i*step +template __device__ inline -typename std::enable_if< Kokkos::is_reducer::value >::type -cuda_intra_block_reduction( const ReducerType& reducer, - typename ReducerType::value_type value, - const int max_active_thread = blockDim.y) { - cuda_intra_warp_reduction(reducer,value,max_active_thread); - cuda_inter_warp_reduction(reducer,value,max_active_thread); + typename std::enable_if::value>::type + cuda_intra_block_reduction(const ReducerType& reducer, + typename ReducerType::value_type value, + const int max_active_thread = blockDim.y) { + cuda_intra_warp_reduction(reducer, value, max_active_thread); + cuda_inter_warp_reduction(reducer, value, max_active_thread); } -template< class ReducerType > +template __device__ inline -typename std::enable_if< Kokkos::is_reducer::value >::type -cuda_intra_block_reduction( const ReducerType& reducer, - const int max_active_thread = blockDim.y) { - cuda_intra_block_reduction(reducer,reducer.reference(),max_active_thread); + typename std::enable_if::value>::type + cuda_intra_block_reduction(const ReducerType& reducer, + const int max_active_thread = blockDim.y) { + cuda_intra_block_reduction(reducer, reducer.reference(), max_active_thread); } -template< class ReducerType> +template __device__ inline -typename std::enable_if< Kokkos::is_reducer::value , bool >::type -cuda_inter_block_reduction( const ReducerType& reducer, - Cuda::size_type * const m_scratch_space, - Cuda::size_type * const m_scratch_flags, - const int max_active_thread = blockDim.y) { + typename std::enable_if::value, bool>::type + cuda_inter_block_reduction(const ReducerType& reducer, + Cuda::size_type* const m_scratch_space, + Cuda::size_type* const m_scratch_flags, + const int max_active_thread = blockDim.y) { #ifdef __CUDA_ARCH__ typedef typename ReducerType::value_type* pointer_type; typedef typename ReducerType::value_type value_type; - //Do the intra-block reduction with shfl operations and static shared memory - cuda_intra_block_reduction(reducer,max_active_thread); + // Do the intra-block reduction with shfl operations and static shared memory + cuda_intra_block_reduction(reducer, max_active_thread); value_type value = reducer.reference(); - const int id = threadIdx.y*blockDim.x + threadIdx.x; + const int id = threadIdx.y * blockDim.x + threadIdx.x; - //One thread in the block writes block result to global scratch_memory - if(id == 0 ) { - pointer_type global = ((pointer_type) m_scratch_space) + blockIdx.x; - *global = value; + // One thread in the block writes block result to global scratch_memory + if (id == 0) { + pointer_type global = ((pointer_type)m_scratch_space) + blockIdx.x; + *global = value; } - //One warp of last block performs inter block reduction through loading the block values from global scratch_memory + // One warp of last block performs inter block reduction through loading the + // block values from global scratch_memory bool last_block = false; + __threadfence(); __syncthreads(); - if ( id < 32 ) { + if (id < 32) { Cuda::size_type count; - //Figure out whether this is the last block - if(id == 0) - count = Kokkos::atomic_fetch_add(m_scratch_flags,1); - count = Kokkos::shfl(count,0,32); + // Figure out whether this is the last block + if (id == 0) count = Kokkos::atomic_fetch_add(m_scratch_flags, 1); + count = Kokkos::shfl(count, 0, 32); - //Last block does the inter block reduction - if( count == gridDim.x - 1) { - //set flag back to zero - if(id == 0) - *m_scratch_flags = 0; + // Last block does the inter block reduction + if (count == gridDim.x - 1) { + // set flag back to zero + if (id == 0) *m_scratch_flags = 0; last_block = true; reducer.init(value); - pointer_type const volatile global = (pointer_type) m_scratch_space ; + pointer_type const volatile global = (pointer_type)m_scratch_space; - //Reduce all global values with splitting work over threads in one warp - const int step_size = blockDim.x*blockDim.y < 32 ? blockDim.x*blockDim.y : 32; - for(int i=id; i<(int)gridDim.x; i+=step_size) { + // Reduce all global values with splitting work over threads in one warp + const int step_size = + blockDim.x * blockDim.y < 32 ? blockDim.x * blockDim.y : 32; + for (int i = id; i < (int)gridDim.x; i += step_size) { value_type tmp = global[i]; reducer.join(value, tmp); } - //Perform shfl reductions within the warp only join if contribution is valid (allows gridDim.x non power of two and <32) - if (int(blockDim.x*blockDim.y) > 1) { - value_type tmp = Kokkos::shfl_down(value, 1,32); - if( id + 1 < int(gridDim.x) ) - reducer.join(value, tmp); + // Perform shfl reductions within the warp only join if contribution is + // valid (allows gridDim.x non power of two and <32) + if (int(blockDim.x * blockDim.y) > 1) { + value_type tmp = Kokkos::shfl_down(value, 1, 32); + if (id + 1 < int(gridDim.x)) reducer.join(value, tmp); } #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK unsigned int mask = KOKKOS_IMPL_CUDA_ACTIVEMASK; - int active = KOKKOS_IMPL_CUDA_BALLOT_MASK(mask,1); + int active = KOKKOS_IMPL_CUDA_BALLOT_MASK(mask, 1); #else int active = KOKKOS_IMPL_CUDA_BALLOT(1); #endif - if (int(blockDim.x*blockDim.y) > 2) { - value_type tmp = Kokkos::shfl_down(value, 2,32); - if( id + 2 < int(gridDim.x) ) - reducer.join(value, tmp); + if (int(blockDim.x * blockDim.y) > 2) { + value_type tmp = Kokkos::shfl_down(value, 2, 32); + if (id + 2 < int(gridDim.x)) reducer.join(value, tmp); } #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask,1); + active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask, 1); #else active += KOKKOS_IMPL_CUDA_BALLOT(1); #endif - if (int(blockDim.x*blockDim.y) > 4) { - value_type tmp = Kokkos::shfl_down(value, 4,32); - if( id + 4 < int(gridDim.x) ) - reducer.join(value, tmp); + if (int(blockDim.x * blockDim.y) > 4) { + value_type tmp = Kokkos::shfl_down(value, 4, 32); + if (id + 4 < int(gridDim.x)) reducer.join(value, tmp); } #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask,1); + active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask, 1); #else active += KOKKOS_IMPL_CUDA_BALLOT(1); #endif - if (int(blockDim.x*blockDim.y) > 8) { - value_type tmp = Kokkos::shfl_down(value, 8,32); - if( id + 8 < int(gridDim.x) ) - reducer.join(value, tmp); + if (int(blockDim.x * blockDim.y) > 8) { + value_type tmp = Kokkos::shfl_down(value, 8, 32); + if (id + 8 < int(gridDim.x)) reducer.join(value, tmp); } #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask,1); + active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask, 1); #else active += KOKKOS_IMPL_CUDA_BALLOT(1); #endif - if (int(blockDim.x*blockDim.y) > 16) { - value_type tmp = Kokkos::shfl_down(value, 16,32); - if( id + 16 < int(gridDim.x) ) - reducer.join(value, tmp); + if (int(blockDim.x * blockDim.y) > 16) { + value_type tmp = Kokkos::shfl_down(value, 16, 32); + if (id + 16 < int(gridDim.x)) reducer.join(value, tmp); } #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask,1); + active += KOKKOS_IMPL_CUDA_BALLOT_MASK(mask, 1); #else active += KOKKOS_IMPL_CUDA_BALLOT(1); #endif } } - //The last block has in its thread=0 the global reduction value through "value" + // The last block has in its thread=0 the global reduction value through + // "value" return last_block; #else return true; #endif } -template +template struct CudaReductionsFunctor; -template +template struct CudaReductionsFunctor { - typedef FunctorValueTraits< FunctorType , ArgTag > ValueTraits ; - typedef FunctorValueJoin< FunctorType , ArgTag > ValueJoin ; - typedef FunctorValueInit< FunctorType , ArgTag > ValueInit ; - typedef FunctorValueOps< FunctorType , ArgTag > ValueOps ; - typedef typename ValueTraits::pointer_type pointer_type ; + typedef FunctorValueTraits ValueTraits; + typedef FunctorValueJoin ValueJoin; + typedef FunctorValueInit ValueInit; + typedef FunctorValueOps ValueOps; + typedef typename ValueTraits::pointer_type pointer_type; typedef typename ValueTraits::value_type Scalar; - __device__ - static inline void scalar_intra_warp_reduction( + __device__ static inline void scalar_intra_warp_reduction( const FunctorType& functor, - Scalar value, // Contribution - const bool skip_vector, // Skip threads if Kokkos vector lanes are not part of the reduction - const int width, // How much of the warp participates - Scalar& result) - { - unsigned mask = width==32?0xffffffff:((1<=w && warp_id= w && warp_id < w + shared_elements) { + if ((threadIdx.y * blockDim.x + threadIdx.x) % 32 == 0) + ValueJoin::join(functor, my_shared_team_buffer_element, &value); } __syncthreads(); } - - if( warp_id == 0) { - ValueInit::init( functor , &value ); - for(unsigned int i=threadIdx.y*blockDim.x+threadIdx.x; i +template struct CudaReductionsFunctor { - typedef FunctorValueTraits< FunctorType , ArgTag > ValueTraits ; - typedef FunctorValueJoin< FunctorType , ArgTag > ValueJoin ; - typedef FunctorValueInit< FunctorType , ArgTag > ValueInit ; - typedef FunctorValueOps< FunctorType , ArgTag > ValueOps ; - typedef typename ValueTraits::pointer_type pointer_type ; + typedef FunctorValueTraits ValueTraits; + typedef FunctorValueJoin ValueJoin; + typedef FunctorValueInit ValueInit; + typedef FunctorValueOps ValueOps; + typedef typename ValueTraits::pointer_type pointer_type; typedef typename ValueTraits::value_type Scalar; - __device__ - static inline void scalar_intra_warp_reduction( + __device__ static inline void scalar_intra_warp_reduction( const FunctorType& functor, - Scalar* value, // Contribution - const bool skip_vector, // Skip threads if Kokkos vector lanes are not part of the reduction - const int width) // How much of the warp participates + Scalar* value, // Contribution + const bool skip_vector, // Skip threads if Kokkos vector lanes are not + // part of the reduction + const int width) // How much of the warp participates { #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - unsigned mask = width==32?0xffffffff:((1< { KOKKOS_IMPL_CUDA_SYNCWARP; #endif } - *value=*(value-lane_id); + *value = *(value - lane_id); } - - __device__ - static inline void scalar_intra_block_reduction( - const FunctorType& functor, - Scalar value, - const bool skip, - Scalar* result, - const int shared_elements, - Scalar* shared_team_buffer_element) { - - const int warp_id = (threadIdx.y*blockDim.x)/32; + __device__ static inline void scalar_intra_block_reduction( + const FunctorType& functor, Scalar value, const bool skip, Scalar* result, + const int shared_elements, Scalar* shared_team_buffer_element) { + const int warp_id = (threadIdx.y * blockDim.x) / 32; Scalar* const my_shared_team_buffer_element = - shared_team_buffer_element + threadIdx.y*blockDim.x+threadIdx.x; + shared_team_buffer_element + threadIdx.y * blockDim.x + threadIdx.x; *my_shared_team_buffer_element = value; // Warp Level Reduction, ignoring Kokkos vector entries - scalar_intra_warp_reduction(functor,my_shared_team_buffer_element,skip,32); - // Wait for every warp to be done before using one warp to do final cross warp reduction + scalar_intra_warp_reduction(functor, my_shared_team_buffer_element, skip, + 32); + // Wait for every warp to be done before using one warp to do final cross + // warp reduction __syncthreads(); - if( warp_id == 0) { - const unsigned int delta = (threadIdx.y*blockDim.x+threadIdx.x)*32; - if(delta { * (c) blockDim.x == blockDim.z == 1 */ -template< bool DoScan , class FunctorType , class ArgTag > -__device__ -void cuda_intra_block_reduce_scan( const FunctorType & functor , - const typename FunctorValueTraits< FunctorType , ArgTag >::pointer_type base_data ) -{ - typedef FunctorValueTraits< FunctorType , ArgTag > ValueTraits ; - typedef FunctorValueJoin< FunctorType , ArgTag > ValueJoin ; +template +__device__ void cuda_intra_block_reduce_scan( + const FunctorType& functor, + const typename FunctorValueTraits::pointer_type + base_data) { + typedef FunctorValueTraits ValueTraits; + typedef FunctorValueJoin ValueJoin; - typedef typename ValueTraits::pointer_type pointer_type ; + typedef typename ValueTraits::pointer_type pointer_type; - const unsigned value_count = ValueTraits::value_count( functor ); - const unsigned BlockSizeMask = blockDim.y - 1 ; + const unsigned value_count = ValueTraits::value_count(functor); + const unsigned BlockSizeMask = blockDim.y - 1; // Must have power of two thread count - if ( BlockSizeMask & blockDim.y ) { Kokkos::abort("Cuda::cuda_intra_block_scan requires power-of-two blockDim"); } + if (BlockSizeMask & blockDim.y) { + Kokkos::abort("Cuda::cuda_intra_block_scan requires power-of-two blockDim"); + } -#define BLOCK_REDUCE_STEP( R , TD , S ) \ - if ( ! ( R & ((1<<(S+1))-1) ) ) { ValueJoin::join( functor , TD , (TD - (value_count< -__device__ -bool cuda_single_inter_block_reduce_scan2( const FunctorType & functor , - const Cuda::size_type block_id , - const Cuda::size_type block_count , - Cuda::size_type * const shared_data , - Cuda::size_type * const global_data , - Cuda::size_type * const global_flags ) -{ - typedef Cuda::size_type size_type ; - typedef FunctorValueTraits< FunctorType , ArgTag > ValueTraits ; - typedef FunctorValueJoin< FunctorType , ArgTag > ValueJoin ; - typedef FunctorValueInit< FunctorType , ArgTag > ValueInit ; - typedef FunctorValueOps< FunctorType , ArgTag > ValueOps ; +template +__device__ bool cuda_single_inter_block_reduce_scan2( + const FunctorType& functor, const Cuda::size_type block_id, + const Cuda::size_type block_count, Cuda::size_type* const shared_data, + Cuda::size_type* const global_data, Cuda::size_type* const global_flags) { + typedef Cuda::size_type size_type; + typedef FunctorValueTraits ValueTraits; + typedef FunctorValueJoin ValueJoin; + typedef FunctorValueInit ValueInit; + typedef FunctorValueOps ValueOps; - typedef typename ValueTraits::pointer_type pointer_type ; + typedef typename ValueTraits::pointer_type pointer_type; // '__ffs' = position of the least significant bit set to 1. // 'blockDim.y' is guaranteed to be a power of two so this // is the integral shift value that can replace an integral divide. - const unsigned BlockSizeShift = __ffs( blockDim.y ) - 1 ; - const unsigned BlockSizeMask = blockDim.y - 1 ; + const unsigned BlockSizeShift = __ffs(blockDim.y) - 1; + const unsigned BlockSizeMask = blockDim.y - 1; // Must have power of two thread count - if ( BlockSizeMask & blockDim.y ) { Kokkos::abort("Cuda::cuda_single_inter_block_reduce_scan requires power-of-two blockDim"); } + if (BlockSizeMask & blockDim.y) { + Kokkos::abort( + "Cuda::cuda_single_inter_block_reduce_scan requires power-of-two " + "blockDim"); + } - const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) > - word_count( ValueTraits::value_size( functor ) / sizeof(size_type) ); + const integral_nonzero_constant + word_count(ValueTraits::value_size(functor) / sizeof(size_type)); // Reduce the accumulation for the entire block. - cuda_intra_block_reduce_scan( functor , pointer_type(shared_data) ); + cuda_intra_block_reduce_scan( + functor, pointer_type(shared_data)); { // Write accumulation total to global scratch space. // Accumulation total is the last thread's data. - size_type * const shared = shared_data + word_count.value * BlockSizeMask ; - size_type * const global = global_data + word_count.value * block_id ; + size_type* const shared = shared_data + word_count.value * BlockSizeMask; + size_type* const global = global_data + word_count.value * block_id; - for ( int i = int(threadIdx.y) ; i < int(word_count.value) ; i += int(blockDim.y) ) { global[i] = shared[i] ; } + for (int i = int(threadIdx.y); i < int(word_count.value); + i += int(blockDim.y)) { + global[i] = shared[i]; + } } + __threadfence(); - // Contributing blocks note that their contribution has been completed via an atomic-increment flag - // If this block is not the last block to contribute to this group then the block is done. - const bool is_last_block = - ! __syncthreads_or( threadIdx.y ? 0 : ( 1 + atomicInc( global_flags , block_count - 1 ) < block_count ) ); + // Contributing blocks note that their contribution has been completed via an + // atomic-increment flag If this block is not the last block to contribute to + // this group then the block is done. + const bool is_last_block = !__syncthreads_or( + threadIdx.y + ? 0 + : (1 + atomicInc(global_flags, block_count - 1) < block_count)); - if ( is_last_block ) { - - const size_type b = ( long(block_count) * long(threadIdx.y) ) >> BlockSizeShift ; - const size_type e = ( long(block_count) * long( threadIdx.y + 1 ) ) >> BlockSizeShift ; + if (is_last_block) { + const size_type b = + (long(block_count) * long(threadIdx.y)) >> BlockSizeShift; + const size_type e = + (long(block_count) * long(threadIdx.y + 1)) >> BlockSizeShift; { - void * const shared_ptr = shared_data + word_count.value * threadIdx.y ; - /* reference_type shared_value = */ ValueInit::init( functor , shared_ptr ); + void* const shared_ptr = shared_data + word_count.value * threadIdx.y; + /* reference_type shared_value = */ ValueInit::init(functor, shared_ptr); - for ( size_type i = b ; i < e ; ++i ) { - ValueJoin::join( functor , shared_ptr , global_data + word_count.value * i ); + for (size_type i = b; i < e; ++i) { + ValueJoin::join(functor, shared_ptr, + global_data + word_count.value * i); } } - cuda_intra_block_reduce_scan( functor , pointer_type(shared_data) ); + cuda_intra_block_reduce_scan( + functor, pointer_type(shared_data)); - if ( DoScan ) { + if (DoScan) { + size_type* const shared_value = + shared_data + + word_count.value * (threadIdx.y ? threadIdx.y - 1 : blockDim.y); - size_type * const shared_value = shared_data + word_count.value * ( threadIdx.y ? threadIdx.y - 1 : blockDim.y ); - - if ( ! threadIdx.y ) { ValueInit::init( functor , shared_value ); } + if (!threadIdx.y) { + ValueInit::init(functor, shared_value); + } // Join previous inclusive scan value to each member - for ( size_type i = b ; i < e ; ++i ) { - size_type * const global_value = global_data + word_count.value * i ; - ValueJoin::join( functor , shared_value , global_value ); - ValueOps ::copy( functor , global_value , shared_value ); + for (size_type i = b; i < e; ++i) { + size_type* const global_value = global_data + word_count.value * i; + ValueJoin::join(functor, shared_value, global_value); + ValueOps ::copy(functor, global_value, shared_value); } } } - return is_last_block ; + return is_last_block; } -template< bool DoScan , class FunctorType , class ArgTag > -__device__ -bool cuda_single_inter_block_reduce_scan( const FunctorType & functor , - const Cuda::size_type block_id , - const Cuda::size_type block_count , - Cuda::size_type * const shared_data , - Cuda::size_type * const global_data , - Cuda::size_type * const global_flags ) -{ - typedef FunctorValueTraits< FunctorType , ArgTag > ValueTraits ; - if(!DoScan && ValueTraits::StaticValueSize) - return Kokkos::Impl::CudaReductionsFunctor16)>::scalar_inter_block_reduction(functor,block_id,block_count,shared_data,global_data,global_flags); +template +__device__ bool cuda_single_inter_block_reduce_scan( + const FunctorType& functor, const Cuda::size_type block_id, + const Cuda::size_type block_count, Cuda::size_type* const shared_data, + Cuda::size_type* const global_data, Cuda::size_type* const global_flags) { + typedef FunctorValueTraits ValueTraits; + if (!DoScan && ValueTraits::StaticValueSize) + return Kokkos::Impl::CudaReductionsFunctor< + FunctorType, ArgTag, false, (ValueTraits::StaticValueSize > 16)>:: + scalar_inter_block_reduction(functor, block_id, block_count, + shared_data, global_data, global_flags); else - return cuda_single_inter_block_reduce_scan2(functor, block_id, block_count, shared_data, global_data, global_flags); + return cuda_single_inter_block_reduce_scan2( + functor, block_id, block_count, shared_data, global_data, global_flags); } // Size in bytes required for inter block reduce or scan -template< bool DoScan , class FunctorType , class ArgTag > -inline -unsigned cuda_single_inter_block_reduce_scan_shmem( const FunctorType & functor , const unsigned BlockSize ) -{ - return ( BlockSize + 2 ) * Impl::FunctorValueTraits< FunctorType , ArgTag >::value_size( functor ); +template +inline unsigned cuda_single_inter_block_reduce_scan_shmem( + const FunctorType& functor, const unsigned BlockSize) { + return (BlockSize + 2) * + Impl::FunctorValueTraits::value_size(functor); } -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- #endif /* #if defined( __CUDACC__ ) */ #endif /* KOKKOS_CUDA_REDUCESCAN_HPP */ - diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp index ac36cfd67e..777f57ced4 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -42,7 +43,7 @@ */ #include -#if defined( KOKKOS_ENABLE_CUDA ) && defined( KOKKOS_ENABLE_TASKDAG ) +#if defined(KOKKOS_ENABLE_CUDA) && defined(KOKKOS_ENABLE_TASKDAG) #include @@ -54,13 +55,18 @@ namespace Kokkos { namespace Impl { -template class TaskQueue< Kokkos::Cuda, Impl::default_tasking_memory_space_for_execution_space_t > ; -template class TaskQueueMultiple< Kokkos::Cuda, Impl::default_tasking_memory_space_for_execution_space_t > ; +template class TaskQueue< + Kokkos::Cuda, + Impl::default_tasking_memory_space_for_execution_space_t >; +template class TaskQueueMultiple< + Kokkos::Cuda, + Impl::default_tasking_memory_space_for_execution_space_t >; -}} /* namespace Kokkos::Impl */ +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- #else void KOKKOS_CORE_SRC_CUDA_KOKKOS_CUDA_TASK_PREVENT_LINK_ERROR() {} -#endif /* #if defined( KOKKOS_ENABLE_CUDA ) && defined( KOKKOS_ENABLE_TASKDAG ) */ - +#endif /* #if defined( KOKKOS_ENABLE_CUDA ) && defined( KOKKOS_ENABLE_TASKDAG \ + ) */ diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp index c35987e49e..237d2430d6 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_IMPL_CUDA_TASK_HPP #include -#if defined( KOKKOS_ENABLE_TASKDAG ) +#if defined(KOKKOS_ENABLE_TASKDAG) //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -53,7 +54,7 @@ #include #include -#include // CUDA_SAFE_CALL +#include // CUDA_SAFE_CALL #include //---------------------------------------------------------------------------- @@ -62,65 +63,57 @@ namespace Kokkos { namespace Impl { namespace { -template< typename TaskType > -__global__ -void set_cuda_task_base_apply_function_pointer - ( typename TaskType::function_type * ptr, typename TaskType::destroy_type* dtor ) -{ - *ptr = TaskType::apply; +template +__global__ void set_cuda_task_base_apply_function_pointer( + typename TaskType::function_type* ptr, + typename TaskType::destroy_type* dtor) { + *ptr = TaskType::apply; *dtor = TaskType::destroy; } -template< typename Scheduler > -__global__ -void cuda_task_queue_execute( Scheduler scheduler, int32_t shmem_size ) { - TaskQueueSpecialization< Scheduler >::driver( std::move(scheduler) , shmem_size ); +template +__global__ void cuda_task_queue_execute(Scheduler scheduler, + int32_t shmem_size) { + TaskQueueSpecialization::driver(std::move(scheduler), shmem_size); } -} +} // namespace -template class TaskExec ; +template +class TaskExec; -template -class TaskQueueSpecialization< - SimpleTaskScheduler -> -{ -public: - - using scheduler_type = SimpleTaskScheduler; +template +class TaskQueueSpecialization> { + public: + using scheduler_type = SimpleTaskScheduler; using execution_space = Kokkos::Cuda; - using memory_space = Kokkos::CudaUVMSpace; - using member_type = TaskExec ; + using memory_space = Kokkos::CudaUVMSpace; + using member_type = TaskExec; enum : long { max_league_size = 16 }; enum : int { warps_per_block = 4 }; KOKKOS_INLINE_FUNCTION - static - void iff_single_thread_recursive_execute( scheduler_type const& ) {} + static void iff_single_thread_recursive_execute(scheduler_type const&) {} - static int get_max_team_count( - execution_space const& - ) { + static int get_max_team_count(execution_space const&) { return Kokkos::Impl::cuda_internal_multiprocessor_count() * warps_per_block; } - __device__ - static void driver(scheduler_type scheduler, int32_t shmem_per_warp) - { - using queue_type = typename scheduler_type::task_queue_type; + __device__ static void driver(scheduler_type scheduler, + int32_t shmem_per_warp) { + using queue_type = typename scheduler_type::task_queue_type; using task_base_type = typename scheduler_type::task_base_type; - using runnable_task_base_type = typename scheduler_type::runnable_task_base_type; - using scheduling_info_storage_type = - SchedulingInfoStorage< + using runnable_task_base_type = + typename scheduler_type::runnable_task_base_type; + using scheduling_info_storage_type = SchedulingInfoStorage< runnable_task_base_type, - typename scheduler_type::task_scheduling_info_type - >; + typename scheduler_type::task_scheduling_info_type>; extern __shared__ int32_t shmem_all[]; - int32_t* const warp_shmem = shmem_all + (threadIdx.z * shmem_per_warp) / sizeof(int32_t); + int32_t* const warp_shmem = + shmem_all + (threadIdx.z * shmem_per_warp) / sizeof(int32_t); task_base_type* const shared_memory_task_copy = (task_base_type*)warp_shmem; @@ -129,44 +122,47 @@ public: member_type single_exec(scheduler, warp_shmem, 1); member_type team_exec(scheduler, warp_shmem, blockDim.y); - auto& queue = scheduler.queue(); + auto& queue = scheduler.queue(); auto& team_scheduler = team_exec.scheduler(); auto current_task = OptionalRef(); // Loop until all queues are empty and no tasks in flight - while(not queue.is_done()) { - - if(warp_lane == 0) { // should be (?) same as team_exec.team_rank() == 0 + while (not queue.is_done()) { + if (warp_lane == 0) { // should be (?) same as team_exec.team_rank() == 0 // pop off a task - current_task = queue.pop_ready_task(team_scheduler.team_scheduler_info()); + current_task = + queue.pop_ready_task(team_scheduler.team_scheduler_info()); } // Broadcast task pointer: // Sync before the broadcast KOKKOS_IMPL_CUDA_SYNCWARP; - + // pretend it's an int* for shuffle purposes - ((int*) ¤t_task)[0] = KOKKOS_IMPL_CUDA_SHFL(((int*) ¤t_task)[0], 0, 32); - ((int*) ¤t_task)[1] = KOKKOS_IMPL_CUDA_SHFL(((int*) ¤t_task)[1], 0, 32); - - if(current_task) { + ((int*)¤t_task)[0] = + KOKKOS_IMPL_CUDA_SHFL(((int*)¤t_task)[0], 0, 32); + ((int*)¤t_task)[1] = + KOKKOS_IMPL_CUDA_SHFL(((int*)¤t_task)[1], 0, 32); + if (current_task) { KOKKOS_ASSERT(!current_task->as_runnable_task().get_respawn_flag()); int32_t b = sizeof(scheduling_info_storage_type) / sizeof(int32_t); static_assert( - sizeof(scheduling_info_storage_type) % sizeof(int32_t) == 0, - "bad task size" - ); + sizeof(scheduling_info_storage_type) % sizeof(int32_t) == 0, + "bad task size"); int32_t const e = current_task->get_allocation_size() / sizeof(int32_t); - KOKKOS_ASSERT(current_task->get_allocation_size() % sizeof(int32_t) == 0); + KOKKOS_ASSERT(current_task->get_allocation_size() % sizeof(int32_t) == + 0); - int32_t volatile* const task_mem = (int32_t volatile*)current_task.get(); + int32_t volatile* const task_mem = + (int32_t volatile*)current_task.get(); - // do a coordinated copy of the task closure from global to shared memory: - for(int32_t i = warp_lane; i < e; i += CudaTraits::WarpSize) { + // do a coordinated copy of the task closure from global to shared + // memory: + for (int32_t i = warp_lane; i < e; i += CudaTraits::WarpSize) { warp_shmem[i] = task_mem[i]; } @@ -174,13 +170,12 @@ public: // writes are visible to all threads in the warp. KOKKOS_IMPL_CUDA_SYNCWARP; - if(shared_memory_task_copy->is_team_runnable()) { + if (shared_memory_task_copy->is_team_runnable()) { // Thread Team Task shared_memory_task_copy->as_runnable_task().run(team_exec); - } - else if(threadIdx.y == 0) { - // TODO @tasking @optimization DSH Change this to warp_lane == 0 when we allow blockDim.x to be more than 1 - // Single Thread Task + } else if (threadIdx.y == 0) { + // TODO @tasking @optimization DSH Change this to warp_lane == 0 when + // we allow blockDim.x to be more than 1 Single Thread Task shared_memory_task_copy->as_runnable_task().run(single_exec); } @@ -189,8 +184,8 @@ public: KOKKOS_IMPL_CUDA_SYNCWARP; - //if(warp_lane < b % CudaTraits::WarpSize) b += CudaTraits::WarpSize; - //b -= b % CudaTraits::WarpSize; + // if(warp_lane < b % CudaTraits::WarpSize) b += CudaTraits::WarpSize; + // b -= b % CudaTraits::WarpSize; // copy task closure from shared to global memory: for (int32_t i = b + warp_lane; i < e; i += CudaTraits::WarpSize) { @@ -203,17 +198,15 @@ public: KOKKOS_IMPL_CUDA_SYNCWARP; - if (warp_lane == 0) { // If respawn requested copy respawn data back to main memory - if(shared_memory_task_copy->as_runnable_task().get_respawn_flag()) { - if(shared_memory_task_copy->as_runnable_task().has_predecessor()) { + if (shared_memory_task_copy->as_runnable_task().get_respawn_flag()) { + if (shared_memory_task_copy->as_runnable_task().has_predecessor()) { // It's not necessary to make this a volatile write because // the next read of the predecessor is on this thread in complete, // and the predecessor is cleared there (using a volatile write) current_task->as_runnable_task().acquire_predecessor_from( - shared_memory_task_copy->as_runnable_task() - ); + shared_memory_task_copy->as_runnable_task()); } // It may not necessary to make this a volatile write, since the @@ -224,39 +217,35 @@ public: // where else the priority would be read after it is scheduled // by this thread; for now, we leave it volatile, but we should // benchmark the cost of this.) - current_task.as_volatile()->set_priority(shared_memory_task_copy->get_priority()); + current_task.as_volatile()->set_priority( + shared_memory_task_copy->get_priority()); // It's not necessary to make this a volatile write, since the // next read of it (if true) will be by this thread in `complete()`, // which will unset the flag (using volatile) once it has handled // the respawn current_task->as_runnable_task().set_respawn_flag(); - } - queue.complete( - (*std::move(current_task)).as_runnable_task(), - team_scheduler.team_scheduler_info() - ); + queue.complete((*std::move(current_task)).as_runnable_task(), + team_scheduler.team_scheduler_info()); } - } } } - static - void execute(scheduler_type const& scheduler) - { - const int shared_per_warp = 2048 ; + static void execute(scheduler_type const& scheduler) { + const int shared_per_warp = 2048; const dim3 grid(Kokkos::Impl::cuda_internal_multiprocessor_count(), 1, 1); const dim3 block(1, Kokkos::Impl::CudaTraits::WarpSize, warps_per_block); - const int shared_total = shared_per_warp * warps_per_block; + const int shared_total = shared_per_warp * warps_per_block; const cudaStream_t stream = nullptr; KOKKOS_ASSERT( - static_cast(grid.x * grid.y * grid.z * block.x * block.y * block.z) - == static_cast(get_max_team_count(scheduler.get_execution_space()) * Kokkos::Impl::CudaTraits::WarpSize) - ); + static_cast(grid.x * grid.y * grid.z * block.x * block.y * + block.z) == + static_cast(get_max_team_count(scheduler.get_execution_space()) * + Kokkos::Impl::CudaTraits::WarpSize)); auto& queue = scheduler.queue(); @@ -265,7 +254,8 @@ public: // Query the stack size, in bytes: size_t previous_stack_size = 0; - CUDA_SAFE_CALL(cudaDeviceGetLimit(&previous_stack_size, cudaLimitStackSize)); + CUDA_SAFE_CALL( + cudaDeviceGetLimit(&previous_stack_size, cudaLimitStackSize)); // If not large enough then set the stack size, in bytes: @@ -275,45 +265,45 @@ public: CUDA_SAFE_CALL(cudaDeviceSetLimit(cudaLimitStackSize, larger_stack_size)); } - cuda_task_queue_execute<<>>(scheduler, shared_per_warp); + cuda_task_queue_execute<<>>( + scheduler, shared_per_warp); CUDA_SAFE_CALL(cudaGetLastError()); CUDA_SAFE_CALL(cudaDeviceSynchronize()); if (previous_stack_size < larger_stack_size) { - CUDA_SAFE_CALL(cudaDeviceSetLimit(cudaLimitStackSize, previous_stack_size)); + CUDA_SAFE_CALL( + cudaDeviceSetLimit(cudaLimitStackSize, previous_stack_size)); } } template static - // TODO @tasking @optimiazation DSH specialize this for trivially destructible types - void - get_function_pointer( - typename TaskType::function_type& ptr, - typename TaskType::destroy_type& dtor - ) - { + // TODO @tasking @optimiazation DSH specialize this for trivially + // destructible types + void + get_function_pointer(typename TaskType::function_type& ptr, + typename TaskType::destroy_type& dtor) { using function_type = typename TaskType::function_type; - using destroy_type = typename TaskType::destroy_type; + using destroy_type = typename TaskType::destroy_type; // TODO @tasking @minor DSH make sure there aren't any alignment concerns? - void* storage = cuda_internal_scratch_unified( - Kokkos::Cuda(), - sizeof(function_type) + sizeof(destroy_type) - ); + void* storage = cuda_internal_scratch_unified( + Kokkos::Cuda(), sizeof(function_type) + sizeof(destroy_type)); function_type* ptr_ptr = (function_type*)storage; - destroy_type* dtor_ptr = (destroy_type*)((char*)storage + sizeof(function_type)); + destroy_type* dtor_ptr = + (destroy_type*)((char*)storage + sizeof(function_type)); - CUDA_SAFE_CALL( cudaDeviceSynchronize() ); + CUDA_SAFE_CALL(cudaDeviceSynchronize()); - set_cuda_task_base_apply_function_pointer<<<1,1>>>(ptr_ptr, dtor_ptr); + set_cuda_task_base_apply_function_pointer + <<<1, 1>>>(ptr_ptr, dtor_ptr); - CUDA_SAFE_CALL( cudaGetLastError() ); - CUDA_SAFE_CALL( cudaDeviceSynchronize() ); + CUDA_SAFE_CALL(cudaGetLastError()); + CUDA_SAFE_CALL(cudaDeviceSynchronize()); - ptr = *ptr_ptr; + ptr = *ptr_ptr; dtor = *dtor_ptr; } }; @@ -321,144 +311,133 @@ public: //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- -template +template class TaskQueueSpecializationConstrained< - Scheduler, - typename std::enable_if< - std::is_same::value - >::type -> -{ -public: - - using scheduler_type = Scheduler; + Scheduler, + typename std::enable_if::value>::type> { + public: + using scheduler_type = Scheduler; using execution_space = Kokkos::Cuda; - using memory_space = Kokkos::CudaUVMSpace; - using member_type = TaskExec ; + using memory_space = Kokkos::CudaUVMSpace; + using member_type = TaskExec; enum : long { max_league_size = 16 }; KOKKOS_INLINE_FUNCTION - static - void iff_single_thread_recursive_execute( scheduler_type const& ) {} + static void iff_single_thread_recursive_execute(scheduler_type const&) {} - __device__ - static void driver(scheduler_type scheduler, int32_t shmem_per_warp) - { - using queue_type = typename scheduler_type::queue_type; + __device__ static void driver(scheduler_type scheduler, + int32_t shmem_per_warp) { + using queue_type = typename scheduler_type::queue_type; using task_root_type = TaskBase; extern __shared__ int32_t shmem_all[]; - task_root_type* const end = (task_root_type *) task_root_type::EndTag ; + task_root_type* const end = (task_root_type*)task_root_type::EndTag; task_root_type* const no_more_tasks_sentinel = nullptr; - int32_t * const warp_shmem = - shmem_all + ( threadIdx.z * shmem_per_warp ) / sizeof(int32_t); + int32_t* const warp_shmem = + shmem_all + (threadIdx.z * shmem_per_warp) / sizeof(int32_t); - task_root_type * const task_shmem = (task_root_type *) warp_shmem ; + task_root_type* const task_shmem = (task_root_type*)warp_shmem; - const int warp_lane = threadIdx.x + threadIdx.y * blockDim.x ; + const int warp_lane = threadIdx.x + threadIdx.y * blockDim.x; member_type single_exec(scheduler, warp_shmem, 1); member_type team_exec(scheduler, warp_shmem, blockDim.y); auto& team_queue = team_exec.scheduler().queue(); - task_root_type * task_ptr = no_more_tasks_sentinel; + task_root_type* task_ptr = no_more_tasks_sentinel; // Loop until all queues are empty and no tasks in flight do { - // Each team lead attempts to acquire either a thread team task // or collection of single thread tasks for the team. - if ( 0 == warp_lane ) { - - if( *((volatile int *) & team_queue.m_ready_count) > 0 ) { + if (0 == warp_lane) { + if (*((volatile int*)&team_queue.m_ready_count) > 0) { task_ptr = end; // Attempt to acquire a task // Loop by priority and then type - for ( int i = 0 ; i < queue_type::NumQueue && end == task_ptr ; ++i ) { - for ( int j = 0 ; j < 2 && end == task_ptr ; ++j ) { - task_ptr = queue_type::pop_ready_task( & team_queue.m_ready[i][j] ); + for (int i = 0; i < queue_type::NumQueue && end == task_ptr; ++i) { + for (int j = 0; j < 2 && end == task_ptr; ++j) { + task_ptr = queue_type::pop_ready_task(&team_queue.m_ready[i][j]); } } - } - else { + } else { // returns nullptr if and only if all other queues have a ready // count of 0 also. Otherwise, returns a task from another queue // or `end` if one couldn't be popped task_ptr = team_queue.attempt_to_steal_task(); - #if 0 +#if 0 if(task != no_more_tasks_sentinel && task != end) { std::printf("task stolen on rank %d\n", team_exec.league_rank()); } - #endif +#endif } - } // Synchronize warp with memory fence before broadcasting task pointer: // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "A" ); - KOKKOS_IMPL_CUDA_SYNCWARP ; + KOKKOS_IMPL_CUDA_SYNCWARP; // Broadcast task pointer: - ((int*) & task_ptr )[0] = KOKKOS_IMPL_CUDA_SHFL( ((int*) & task_ptr )[0] , 0 , 32 ); - ((int*) & task_ptr )[1] = KOKKOS_IMPL_CUDA_SHFL( ((int*) & task_ptr )[1] , 0 , 32 ); + ((int*)&task_ptr)[0] = KOKKOS_IMPL_CUDA_SHFL(((int*)&task_ptr)[0], 0, 32); + ((int*)&task_ptr)[1] = KOKKOS_IMPL_CUDA_SHFL(((int*)&task_ptr)[1], 0, 32); - #if defined( KOKKOS_DEBUG ) - KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "TaskQueue CUDA task_ptr" ); - #endif +#if defined(KOKKOS_DEBUG) + KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN("TaskQueue CUDA task_ptr"); +#endif - if ( 0 == task_ptr ) break ; // 0 == queue->m_ready_count - - if ( end != task_ptr ) { + if (0 == task_ptr) break; // 0 == queue->m_ready_count + if (end != task_ptr) { // Whole warp copy task's closure to/from shared memory. // Use all threads of warp for coalesced read/write. int32_t const b = sizeof(task_root_type) / sizeof(int32_t); - int32_t const e = *((int32_t volatile *)( & task_ptr->m_alloc_size )) / sizeof(int32_t); + int32_t const e = + *((int32_t volatile*)(&task_ptr->m_alloc_size)) / sizeof(int32_t); - int32_t volatile * const task_mem = (int32_t volatile *) task_ptr ; + int32_t volatile* const task_mem = (int32_t volatile*)task_ptr; KOKKOS_ASSERT(e * sizeof(int32_t) < shmem_per_warp); // copy task closure from global to shared memory: - for ( int32_t i = warp_lane ; i < e ; i += CudaTraits::WarpSize ) { - warp_shmem[i] = task_mem[i] ; + for (int32_t i = warp_lane; i < e; i += CudaTraits::WarpSize) { + warp_shmem[i] = task_mem[i]; } // Synchronize threads of the warp and insure memory // writes are visible to all threads in the warp. // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "B" ); - KOKKOS_IMPL_CUDA_SYNCWARP ; + KOKKOS_IMPL_CUDA_SYNCWARP; - if ( task_root_type::TaskTeam == task_shmem->m_task_type ) { + if (task_root_type::TaskTeam == task_shmem->m_task_type) { // Thread Team Task - (*task_shmem->m_apply)( task_shmem , & team_exec ); - } - else if ( 0 == threadIdx.y ) { + (*task_shmem->m_apply)(task_shmem, &team_exec); + } else if (0 == threadIdx.y) { // Single Thread Task - (*task_shmem->m_apply)( task_shmem , & single_exec ); + (*task_shmem->m_apply)(task_shmem, &single_exec); } // Synchronize threads of the warp and insure memory // writes are visible to all threads in the warp. // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "C" ); - KOKKOS_IMPL_CUDA_SYNCWARP ; + KOKKOS_IMPL_CUDA_SYNCWARP; // copy task closure from shared to global memory: - for ( int32_t i = b + warp_lane ; i < e ; i += CudaTraits::WarpSize ) { - task_mem[i] = warp_shmem[i] ; + for (int32_t i = b + warp_lane; i < e; i += CudaTraits::WarpSize) { + task_mem[i] = warp_shmem[i]; } // Synchronize threads of the warp and insure memory @@ -466,99 +445,96 @@ public: // respawn or completion. // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "D" ); - KOKKOS_IMPL_CUDA_SYNCWARP ; + KOKKOS_IMPL_CUDA_SYNCWARP; // If respawn requested copy respawn data back to main memory - if ( 0 == warp_lane ) { - - if ( ((task_root_type *) task_root_type::LockTag) != task_shmem->m_next ) { - ( (volatile task_root_type *) task_ptr )->m_next = task_shmem->m_next ; - ( (volatile task_root_type *) task_ptr )->m_priority = task_shmem->m_priority ; + if (0 == warp_lane) { + if (((task_root_type*)task_root_type::LockTag) != + task_shmem->m_next) { + ((volatile task_root_type*)task_ptr)->m_next = task_shmem->m_next; + ((volatile task_root_type*)task_ptr)->m_priority = + task_shmem->m_priority; } - team_queue.complete( task_ptr ); + team_queue.complete(task_ptr); } - } - } while(1); + } while (1); } - static - void execute(scheduler_type const& scheduler) - { - const int shared_per_warp = 2048 ; - const int warps_per_block = 4 ; - const dim3 grid( Kokkos::Impl::cuda_internal_multiprocessor_count() , 1 , 1 ); - //const dim3 grid( 1 , 1 , 1 ); - const dim3 block( 1 , Kokkos::Impl::CudaTraits::WarpSize , warps_per_block ); - const int shared_total = shared_per_warp * warps_per_block ; - const cudaStream_t stream = 0 ; + static void execute(scheduler_type const& scheduler) { + const int shared_per_warp = 2048; + const int warps_per_block = 4; + const dim3 grid(Kokkos::Impl::cuda_internal_multiprocessor_count(), 1, 1); + // const dim3 grid( 1 , 1 , 1 ); + const dim3 block(1, Kokkos::Impl::CudaTraits::WarpSize, warps_per_block); + const int shared_total = shared_per_warp * warps_per_block; + const cudaStream_t stream = 0; auto& queue = scheduler.queue(); queue.initialize_team_queues(warps_per_block * grid.x); - CUDA_SAFE_CALL( cudaDeviceSynchronize() ); + CUDA_SAFE_CALL(cudaDeviceSynchronize()); // Query the stack size, in bytes: - size_t previous_stack_size = 0 ; - CUDA_SAFE_CALL( cudaDeviceGetLimit( & previous_stack_size , cudaLimitStackSize ) ); + size_t previous_stack_size = 0; + CUDA_SAFE_CALL( + cudaDeviceGetLimit(&previous_stack_size, cudaLimitStackSize)); // If not large enough then set the stack size, in bytes: - const size_t larger_stack_size = 2048 ; + const size_t larger_stack_size = 2048; - if ( previous_stack_size < larger_stack_size ) { - CUDA_SAFE_CALL( cudaDeviceSetLimit( cudaLimitStackSize , larger_stack_size ) ); + if (previous_stack_size < larger_stack_size) { + CUDA_SAFE_CALL(cudaDeviceSetLimit(cudaLimitStackSize, larger_stack_size)); } - cuda_task_queue_execute<<< grid , block , shared_total , stream >>>( scheduler , shared_per_warp ); + cuda_task_queue_execute<<>>( + scheduler, shared_per_warp); - CUDA_SAFE_CALL( cudaGetLastError() ); + CUDA_SAFE_CALL(cudaGetLastError()); - CUDA_SAFE_CALL( cudaDeviceSynchronize() ); + CUDA_SAFE_CALL(cudaDeviceSynchronize()); - if ( previous_stack_size < larger_stack_size ) { - CUDA_SAFE_CALL( cudaDeviceSetLimit( cudaLimitStackSize , previous_stack_size ) ); + if (previous_stack_size < larger_stack_size) { + CUDA_SAFE_CALL( + cudaDeviceSetLimit(cudaLimitStackSize, previous_stack_size)); } - } - template< typename TaskType > - static - void - get_function_pointer( - typename TaskType::function_type& ptr, - typename TaskType::destroy_type& dtor - ) - { - using function_type = typename TaskType::function_type; - using destroy_type = typename TaskType::destroy_type; + template + static void get_function_pointer(typename TaskType::function_type& ptr, + typename TaskType::destroy_type& dtor) { + using function_type = typename TaskType::function_type; + using destroy_type = typename TaskType::destroy_type; - void* storage = cuda_internal_scratch_unified( - Kokkos::Cuda(), - sizeof(function_type) + sizeof(destroy_type) - ); - function_type* ptr_ptr = (function_type*)storage; - destroy_type* dtor_ptr = (destroy_type*)((char*)storage + sizeof(function_type)); + void* storage = cuda_internal_scratch_unified( + Kokkos::Cuda(), sizeof(function_type) + sizeof(destroy_type)); + function_type* ptr_ptr = (function_type*)storage; + destroy_type* dtor_ptr = + (destroy_type*)((char*)storage + sizeof(function_type)); - CUDA_SAFE_CALL( cudaDeviceSynchronize() ); + CUDA_SAFE_CALL(cudaDeviceSynchronize()); - set_cuda_task_base_apply_function_pointer<<<1,1>>>(ptr_ptr, dtor_ptr); + set_cuda_task_base_apply_function_pointer + <<<1, 1>>>(ptr_ptr, dtor_ptr); - CUDA_SAFE_CALL( cudaGetLastError() ); - CUDA_SAFE_CALL( cudaDeviceSynchronize() ); + CUDA_SAFE_CALL(cudaGetLastError()); + CUDA_SAFE_CALL(cudaDeviceSynchronize()); - ptr = *ptr_ptr; - dtor = *dtor_ptr; - - } + ptr = *ptr_ptr; + dtor = *dtor_ptr; + } }; -extern template class TaskQueue< Kokkos::Cuda, default_tasking_memory_space_for_execution_space_t > ; +extern template class TaskQueue< + Kokkos::Cuda, + default_tasking_memory_space_for_execution_space_t>; -}} /* namespace Kokkos::Impl */ +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -589,85 +565,82 @@ namespace Impl { * warp synchronizing functions must not be called. */ template -class TaskExec -{ -private: - +class TaskExec { + private: enum : int { WarpSize = Kokkos::Impl::CudaTraits::WarpSize }; - TaskExec( TaskExec && ) = delete ; - TaskExec( TaskExec const & ) = delete ; - TaskExec & operator = ( TaskExec && ) = delete ; - TaskExec & operator = ( TaskExec const & ) = delete ; + TaskExec(TaskExec&&) = delete; + TaskExec(TaskExec const&) = delete; + TaskExec& operator=(TaskExec&&) = delete; + TaskExec& operator=(TaskExec const&) = delete; - friend class Kokkos::Impl::TaskQueue< Kokkos::Cuda, default_tasking_memory_space_for_execution_space_t > ; + friend class Kokkos::Impl::TaskQueue< + Kokkos::Cuda, + default_tasking_memory_space_for_execution_space_t>; template friend class Kokkos::Impl::TaskQueueSpecializationConstrained; template friend class Kokkos::Impl::TaskQueueSpecialization; - int32_t * m_team_shmem ; - const int m_team_size ; + int32_t* m_team_shmem; + const int m_team_size; Scheduler m_scheduler; // If constructed with arg_team_size == 1 the object // can only be used by 0 == threadIdx.y. KOKKOS_INLINE_FUNCTION - TaskExec( - Scheduler const& parent_scheduler, - int32_t* arg_team_shmem, - int arg_team_size = blockDim.y - ) - : m_team_shmem(arg_team_shmem), - m_team_size(arg_team_size), - m_scheduler(parent_scheduler.get_team_scheduler(league_rank())) - { } - -public: + TaskExec(Scheduler const& parent_scheduler, int32_t* arg_team_shmem, + int arg_team_size = blockDim.y) + : m_team_shmem(arg_team_shmem), + m_team_size(arg_team_size), + m_scheduler(parent_scheduler.get_team_scheduler(league_rank())) {} + public: using thread_team_member = TaskExec; -#if defined( __CUDA_ARCH__ ) - __device__ int team_rank() const { return threadIdx.y ; } - __device__ int team_size() const { return m_team_size ; } +#if defined(__CUDA_ARCH__) + __device__ int team_rank() const { return threadIdx.y; } + __device__ int team_size() const { return m_team_size; } //__device__ int league_rank() const { return threadIdx.z; } - __device__ int league_rank() const { return blockIdx.x * blockDim.z + threadIdx.z; } + __device__ int league_rank() const { + return blockIdx.x * blockDim.z + threadIdx.z; + } __device__ int league_size() const { return blockDim.z * gridDim.x; } - __device__ void team_barrier() const - { - if ( 1 < m_team_size ) { - KOKKOS_IMPL_CUDA_SYNCWARP ; - } + __device__ void team_barrier() const { + if (1 < m_team_size) { + KOKKOS_IMPL_CUDA_SYNCWARP; } + } - template< class ValueType > - __device__ void team_broadcast( ValueType & val , const int thread_id ) const - { - if ( 1 < m_team_size ) { - // WarpSize = blockDim.X * blockDim.y - // thread_id < blockDim.y - ValueType tmp( val ); // input might not be register variable - cuda_shfl( val, tmp, blockDim.x * thread_id, WarpSize ); - } + template + __device__ void team_broadcast(ValueType& val, const int thread_id) const { + if (1 < m_team_size) { + // WarpSize = blockDim.X * blockDim.y + // thread_id < blockDim.y + ValueType tmp(val); // input might not be register variable + Impl::in_place_shfl(val, tmp, blockDim.x * thread_id, WarpSize); } + } #else - __host__ int team_rank() const { return 0 ; } - __host__ int team_size() const { return 0 ; } + __host__ int team_rank() const { return 0; } + __host__ int team_size() const { return 0; } __host__ int league_rank() const { return 0; } __host__ int league_size() const { return 0; } __host__ void team_barrier() const {} - template< class ValueType > - __host__ void team_broadcast( ValueType & , const int ) const {} + template + __host__ void team_broadcast(ValueType&, const int) const {} #endif - KOKKOS_INLINE_FUNCTION Scheduler const& scheduler() const noexcept { return m_scheduler; } + KOKKOS_INLINE_FUNCTION Scheduler const& scheduler() const noexcept { + return m_scheduler; + } KOKKOS_INLINE_FUNCTION Scheduler& scheduler() noexcept { return m_scheduler; } - }; -}} /* namespace Kokkos::Impl */ +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -675,144 +648,137 @@ public: namespace Kokkos { namespace Impl { -template -struct TeamThreadRangeBoundariesStruct> -{ - using index_type = iType; +template +struct TeamThreadRangeBoundariesStruct> { + using index_type = iType; using member_type = TaskExec; - const iType start ; - const iType end ; - const iType increment ; + const iType start; + const iType end; + const iType increment; member_type const& thread; -#if defined( __CUDA_ARCH__ ) +#if defined(__CUDA_ARCH__) - __device__ inline - TeamThreadRangeBoundariesStruct - ( member_type const& arg_thread, const iType& arg_count) - : start( threadIdx.y ) - , end(arg_count) - , increment( blockDim.y ) - , thread(arg_thread) - {} + __device__ inline TeamThreadRangeBoundariesStruct( + member_type const& arg_thread, const iType& arg_count) + : start(threadIdx.y), + end(arg_count), + increment(blockDim.y), + thread(arg_thread) {} - __device__ inline - TeamThreadRangeBoundariesStruct - ( member_type const& arg_thread - , const iType & arg_start - , const iType & arg_end - ) - : start( arg_start + threadIdx.y ) - , end( arg_end) - , increment( blockDim.y ) - , thread( arg_thread ) - {} + __device__ inline TeamThreadRangeBoundariesStruct( + member_type const& arg_thread, const iType& arg_start, + const iType& arg_end) + : start(arg_start + threadIdx.y), + end(arg_end), + increment(blockDim.y), + thread(arg_thread) {} #else - TeamThreadRangeBoundariesStruct - ( member_type const& arg_thread, const iType& arg_count); + TeamThreadRangeBoundariesStruct(member_type const& arg_thread, + const iType& arg_count); - TeamThreadRangeBoundariesStruct - ( member_type const& arg_thread - , const iType & arg_start - , const iType & arg_end - ); + TeamThreadRangeBoundariesStruct(member_type const& arg_thread, + const iType& arg_start, const iType& arg_end); #endif - }; //---------------------------------------------------------------------------- -template -struct ThreadVectorRangeBoundariesStruct > -{ - using index_type = iType; +template +struct ThreadVectorRangeBoundariesStruct> { + using index_type = iType; using member_type = TaskExec; - const index_type start ; - const index_type end ; - const index_type increment ; + const index_type start; + const index_type end; + const index_type increment; const member_type& thread; -#if defined( __CUDA_ARCH__ ) +#if defined(__CUDA_ARCH__) - __device__ inline - ThreadVectorRangeBoundariesStruct - ( member_type const& arg_thread, const index_type& arg_count ) - : start( threadIdx.x ) - , end(arg_count) - , increment( blockDim.x ) - , thread(arg_thread) - {} + __device__ inline ThreadVectorRangeBoundariesStruct( + member_type const& arg_thread, const index_type& arg_count) + : start(threadIdx.x), + end(arg_count), + increment(blockDim.x), + thread(arg_thread) {} - __device__ inline - ThreadVectorRangeBoundariesStruct - ( member_type const& arg_thread, const index_type& arg_begin, const index_type& arg_end ) - : start( arg_begin + threadIdx.x ) - , end(arg_end) - , increment( blockDim.x ) - , thread(arg_thread) - {} + __device__ inline ThreadVectorRangeBoundariesStruct( + member_type const& arg_thread, const index_type& arg_begin, + const index_type& arg_end) + : start(arg_begin + threadIdx.x), + end(arg_end), + increment(blockDim.x), + thread(arg_thread) {} #else - ThreadVectorRangeBoundariesStruct - ( member_type const& arg_thread, const index_type& arg_count ); + ThreadVectorRangeBoundariesStruct(member_type const& arg_thread, + const index_type& arg_count); - ThreadVectorRangeBoundariesStruct - ( member_type const& arg_thread, const index_type& arg_begin, const index_type& arg_end); + ThreadVectorRangeBoundariesStruct(member_type const& arg_thread, + const index_type& arg_begin, + const index_type& arg_end); #endif - }; -}} /* namespace Kokkos::Impl */ +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- namespace Kokkos { -//template -//KOKKOS_INLINE_FUNCTION -//Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Cuda > > -//TeamThreadRange( const Impl::TaskExec< Kokkos::Cuda > & thread, const iType & count ) +// template +// KOKKOS_INLINE_FUNCTION +// Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Cuda > +// > TeamThreadRange( const Impl::TaskExec< Kokkos::Cuda > & thread, const iType +// & count ) //{ -// return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Cuda > >( thread, count ); +// return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< +// Kokkos::Cuda > >( thread, count ); //} // -//template -//KOKKOS_INLINE_FUNCTION -//Impl::TeamThreadRangeBoundariesStruct +// template +// KOKKOS_INLINE_FUNCTION +// Impl::TeamThreadRangeBoundariesStruct // < typename std::common_type::type // , Impl::TaskExec< Kokkos::Cuda > > -//TeamThreadRange( const Impl::TaskExec< Kokkos::Cuda > & thread +// TeamThreadRange( const Impl::TaskExec< Kokkos::Cuda > & thread // , const iType1 & begin, const iType2 & end ) //{ // typedef typename std::common_type< iType1, iType2 >::type iType; -// return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Cuda > >( +// return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< +// Kokkos::Cuda > >( // thread, iType(begin), iType(end) ); //} // -//template -//KOKKOS_INLINE_FUNCTION -//Impl::ThreadVectorRangeBoundariesStruct > -//ThreadVectorRange( const Impl::TaskExec< Kokkos::Cuda > & thread +// template +// KOKKOS_INLINE_FUNCTION +// Impl::ThreadVectorRangeBoundariesStruct +// > ThreadVectorRange( const Impl::TaskExec< Kokkos::Cuda > & thread // , const iType & count ) //{ -// return Impl::ThreadVectorRangeBoundariesStruct >(thread,count); +// return Impl::ThreadVectorRangeBoundariesStruct >(thread,count); //} // -//template -//KOKKOS_INLINE_FUNCTION -//Impl::ThreadVectorRangeBoundariesStruct > -//ThreadVectorRange( const Impl::TaskExec< Kokkos::Cuda > & thread +// template +// KOKKOS_INLINE_FUNCTION +// Impl::ThreadVectorRangeBoundariesStruct +// > ThreadVectorRange( const Impl::TaskExec< Kokkos::Cuda > & thread // , const iType & arg_begin // , const iType & arg_end ) //{ -// return Impl::ThreadVectorRangeBoundariesStruct >(thread,arg_begin,arg_end); +// return Impl::ThreadVectorRangeBoundariesStruct >(thread,arg_begin,arg_end); //} // KOKKOS_INLINE_FUNCTION @@ -829,78 +795,70 @@ namespace Kokkos { // return Impl::VectorSingleStruct >(thread); // } -/** \brief Inter-thread parallel_for. Executes lambda(iType i) for each i=0..N-1. +/** \brief Inter-thread parallel_for. Executes lambda(iType i) for each + * i=0..N-1. * * The range i=0..N-1 is mapped to all threads of the the calling thread team. * This functionality requires C++11 support. -*/ -template -KOKKOS_INLINE_FUNCTION -void parallel_for - ( const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries - , const Lambda& lambda - ) -{ - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { + */ +template +KOKKOS_INLINE_FUNCTION void parallel_for( + const Impl::TeamThreadRangeBoundariesStruct< + iType, Impl::TaskExec>& loop_boundaries, + const Lambda& lambda) { + for (iType i = loop_boundaries.start; i < loop_boundaries.end; + i += loop_boundaries.increment) { lambda(i); } } -template< typename iType, class Lambda, class Scheduler > -KOKKOS_INLINE_FUNCTION -void parallel_for - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda) { - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { +template +KOKKOS_INLINE_FUNCTION void parallel_for( + const Impl::ThreadVectorRangeBoundariesStruct< + iType, Impl::TaskExec>& loop_boundaries, + const Lambda& lambda) { + for (iType i = loop_boundaries.start; i < loop_boundaries.end; + i += loop_boundaries.increment) { lambda(i); } } // reduce across corresponding lanes between team members within warp // assume stride*team_size == warp_size -template< typename ValueType, class JoinType > -KOKKOS_INLINE_FUNCTION -void strided_shfl_warp_reduction - (const JoinType& join, - ValueType& val, - int team_size, - int stride) -{ - for (int lane_delta=(team_size*stride)>>1; lane_delta>=stride; lane_delta>>=1) { - join(val, Kokkos::shfl_down(val, lane_delta, team_size*stride)); +template +KOKKOS_INLINE_FUNCTION void strided_shfl_warp_reduction(const JoinType& join, + ValueType& val, + int team_size, + int stride) { + for (int lane_delta = (team_size * stride) >> 1; lane_delta >= stride; + lane_delta >>= 1) { + join(val, Kokkos::shfl_down(val, lane_delta, team_size * stride)); } } // multiple within-warp non-strided reductions -template< typename ValueType, class JoinType > -KOKKOS_INLINE_FUNCTION -void multi_shfl_warp_reduction - (const JoinType& join, - ValueType& val, - int vec_length) -{ - for (int lane_delta=vec_length>>1; lane_delta; lane_delta>>=1) { +template +KOKKOS_INLINE_FUNCTION void multi_shfl_warp_reduction(const JoinType& join, + ValueType& val, + int vec_length) { + for (int lane_delta = vec_length >> 1; lane_delta; lane_delta >>= 1) { join(val, Kokkos::shfl_down(val, lane_delta, vec_length)); } } // broadcast within warp -template< class ValueType > -KOKKOS_INLINE_FUNCTION -ValueType shfl_warp_broadcast - (ValueType& val, - int src_lane, - int width) -{ - if ( 1 < width ) { +template +KOKKOS_INLINE_FUNCTION ValueType shfl_warp_broadcast(ValueType& val, + int src_lane, int width) { + if (1 < width) { return Kokkos::shfl(val, src_lane, width); - } - else { - return val ; + } else { + return val; } } -/*// all-reduce across corresponding vector lanes between team members within warp +/*// all-reduce across corresponding vector lanes between team members within +warp // assume vec_length*team_size == warp_size // blockDim.x == vec_length == stride // blockDim.y == team_size @@ -909,14 +867,13 @@ ValueType shfl_warp_broadcast template< typename iType, class Lambda, typename ValueType, class JoinType > KOKKOS_INLINE_FUNCTION void parallel_reduce - (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - const JoinType& join, + (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& initialized_result) { ValueType result = initialized_result; - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i,result); + for( iType i = loop_boundaries.start; i < loop_boundaries.end; +i+=loop_boundaries.increment) { lambda(i,result); } initialized_result = result; @@ -925,7 +882,8 @@ void parallel_reduce initialized_result, loop_boundaries.thread.team_size(), blockDim.x); - initialized_result = shfl_warp_broadcast( initialized_result, threadIdx.x, Impl::CudaTraits::WarpSize ); + initialized_result = shfl_warp_broadcast( initialized_result, +threadIdx.x, Impl::CudaTraits::WarpSize ); }*/ // all-reduce across corresponding vector lanes between team members within warp @@ -935,63 +893,55 @@ void parallel_reduce // blockDim.y == team_size // threadIdx.x == position in vec // threadIdx.y == member number -template< typename iType, class Lambda, typename ValueType, class Scheduler > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - ValueType& initialized_result) { - - //TODO @internal_documentation what is the point of creating this temporary? +template +KOKKOS_INLINE_FUNCTION void parallel_reduce( + const Impl::TeamThreadRangeBoundariesStruct< + iType, Impl::TaskExec>& loop_boundaries, + const Lambda& lambda, ValueType& initialized_result) { + // TODO @internal_documentation what is the point of creating this temporary? ValueType result = initialized_result; - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i,result); + for (iType i = loop_boundaries.start; i < loop_boundaries.end; + i += loop_boundaries.increment) { + lambda(i, result); } initialized_result = result; - if ( 1 < loop_boundaries.thread.team_size() ) { - + if (1 < loop_boundaries.thread.team_size()) { strided_shfl_warp_reduction( - [&] (ValueType& val1, const ValueType& val2) { val1 += val2; }, - initialized_result, - loop_boundaries.thread.team_size(), - blockDim.x); + [&](ValueType& val1, const ValueType& val2) { val1 += val2; }, + initialized_result, loop_boundaries.thread.team_size(), blockDim.x); - initialized_result = - shfl_warp_broadcast( - initialized_result, threadIdx.x, Impl::CudaTraits::WarpSize ); + initialized_result = shfl_warp_broadcast( + initialized_result, threadIdx.x, Impl::CudaTraits::WarpSize); } } -template< typename iType, class Lambda, typename ReducerType, class Scheduler > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - const ReducerType& reducer) { - +template +KOKKOS_INLINE_FUNCTION void parallel_reduce( + const Impl::TeamThreadRangeBoundariesStruct< + iType, Impl::TaskExec>& loop_boundaries, + const Lambda& lambda, const ReducerType& reducer) { typedef typename ReducerType::value_type ValueType; - //TODO @internal_documentation what is the point of creating this temporary? + // TODO @internal_documentation what is the point of creating this temporary? ValueType result = ValueType(); reducer.init(result); - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i,result); + for (iType i = loop_boundaries.start; i < loop_boundaries.end; + i += loop_boundaries.increment) { + lambda(i, result); } - if ( 1 < loop_boundaries.thread.team_size() ) { + if (1 < loop_boundaries.thread.team_size()) { strided_shfl_warp_reduction( - [&] (ValueType& val1, const ValueType& val2) { reducer.join(val1,val2); }, - result, - loop_boundaries.thread.team_size(), - blockDim.x); + [&](ValueType& val1, const ValueType& val2) { + reducer.join(val1, val2); + }, + result, loop_boundaries.thread.team_size(), blockDim.x); - reducer.reference() = - shfl_warp_broadcast( - result, threadIdx.x, Impl::CudaTraits::WarpSize ); - } - else { - reducer.reference() = result ; + reducer.reference() = shfl_warp_broadcast( + result, threadIdx.x, Impl::CudaTraits::WarpSize); + } else { + reducer.reference() = result; } } // all-reduce within team members within warp @@ -1003,19 +953,19 @@ void parallel_reduce /*template< typename iType, class Lambda, typename ValueType, class JoinType > KOKKOS_INLINE_FUNCTION void parallel_reduce - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - const JoinType& join, + (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& initialized_result) { ValueType result = initialized_result; - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i,result); + for( iType i = loop_boundaries.start; i < loop_boundaries.end; +i+=loop_boundaries.increment) { lambda(i,result); } initialized_result = result; - multi_shfl_warp_reduction(join, initialized_result, blockDim.x); - initialized_result = shfl_warp_broadcast( initialized_result, 0, blockDim.x ); + multi_shfl_warp_reduction(join, initialized_result, +blockDim.x); initialized_result = shfl_warp_broadcast( +initialized_result, 0, blockDim.x ); }*/ // all-reduce within team members within warp @@ -1025,60 +975,56 @@ void parallel_reduce // blockDim.y == team_size // threadIdx.x == position in vec // threadIdx.y == member number -template< typename iType, class Lambda, typename ValueType, class Scheduler > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - ValueType& initialized_result) { - +template +KOKKOS_INLINE_FUNCTION void parallel_reduce( + const Impl::ThreadVectorRangeBoundariesStruct< + iType, Impl::TaskExec>& loop_boundaries, + const Lambda& lambda, ValueType& initialized_result) { ValueType result = initialized_result; - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i,result); + for (iType i = loop_boundaries.start; i < loop_boundaries.end; + i += loop_boundaries.increment) { + lambda(i, result); } initialized_result = result; - if ( 1 < loop_boundaries.thread.team_size() ) { - //initialized_result = multi_shfl_warp_reduction( + if (1 < loop_boundaries.thread.team_size()) { + // initialized_result = multi_shfl_warp_reduction( multi_shfl_warp_reduction( - [&] (ValueType& val1, const ValueType& val2) { val1 += val2; }, - initialized_result, - blockDim.x); + [&](ValueType& val1, const ValueType& val2) { val1 += val2; }, + initialized_result, blockDim.x); initialized_result = - shfl_warp_broadcast( initialized_result, 0, blockDim.x ); + shfl_warp_broadcast(initialized_result, 0, blockDim.x); } } -template< typename iType, class Lambda, typename ReducerType, class Scheduler > -KOKKOS_INLINE_FUNCTION -void parallel_reduce - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Lambda & lambda, - const ReducerType& reducer) { - +template +KOKKOS_INLINE_FUNCTION void parallel_reduce( + const Impl::ThreadVectorRangeBoundariesStruct< + iType, Impl::TaskExec>& loop_boundaries, + const Lambda& lambda, const ReducerType& reducer) { typedef typename ReducerType::value_type ValueType; ValueType result = ValueType(); reducer.init(result); - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - lambda(i,result); + for (iType i = loop_boundaries.start; i < loop_boundaries.end; + i += loop_boundaries.increment) { + lambda(i, result); } - if ( 1 < loop_boundaries.thread.team_size() ) { + if (1 < loop_boundaries.thread.team_size()) { multi_shfl_warp_reduction( - [&] (ValueType& val1, const ValueType& val2) { reducer.join(val1,val2); }, - result, - blockDim.x); + [&](ValueType& val1, const ValueType& val2) { + reducer.join(val1, val2); + }, + result, blockDim.x); - reducer.reference() = - shfl_warp_broadcast( result, 0, blockDim.x ); - } - else { - reducer.reference() = result ; + reducer.reference() = shfl_warp_broadcast(result, 0, blockDim.x); + } else { + reducer.reference() = result; } } // scan across corresponding vector lanes between team members within warp @@ -1087,61 +1033,61 @@ void parallel_reduce // blockDim.y == team_size // threadIdx.x == position in vec // threadIdx.y == member number -template< typename iType, class Closure, class Scheduler > -KOKKOS_INLINE_FUNCTION -void parallel_scan - (const Impl::TeamThreadRangeBoundariesStruct >& loop_boundaries, - const Closure & closure ) -{ +template +KOKKOS_INLINE_FUNCTION void parallel_scan( + const Impl::TeamThreadRangeBoundariesStruct< + iType, Impl::TaskExec>& loop_boundaries, + const Closure& closure) { // Extract value_type from closure - using value_type = - typename Kokkos::Impl::FunctorAnalysis - < Kokkos::Impl::FunctorPatternInterface::SCAN - , void - , Closure >::value_type ; - - if ( 1 < loop_boundaries.thread.team_size() ) { + using value_type = typename Kokkos::Impl::FunctorAnalysis< + Kokkos::Impl::FunctorPatternInterface::SCAN, void, Closure>::value_type; + if (1 < loop_boundaries.thread.team_size()) { // make sure all threads perform all loop iterations - const iType bound = loop_boundaries.end + loop_boundaries.start ; - const int lane = threadIdx.y * blockDim.x ; + const iType bound = loop_boundaries.end + loop_boundaries.start; + const int lane = threadIdx.y * blockDim.x; - value_type accum = 0 ; + value_type accum = 0; value_type val, y, local_total; - for( iType i = loop_boundaries.start; i < bound; i+=loop_boundaries.increment) { + for (iType i = loop_boundaries.start; i < bound; + i += loop_boundaries.increment) { val = 0; - if ( i < loop_boundaries.end ) closure(i,val,false); + if (i < loop_boundaries.end) closure(i, val, false); // intra-blockDim.y exclusive scan on 'val' // accum = accumulated, sum in total for this iteration // INCLUSIVE scan - for( int offset = blockDim.x ; offset < Impl::CudaTraits::WarpSize ; offset <<= 1 ) { + for (int offset = blockDim.x; offset < Impl::CudaTraits::WarpSize; + offset <<= 1) { y = Kokkos::shfl_up(val, offset, Impl::CudaTraits::WarpSize); - if(lane >= offset) { val += y; } + if (lane >= offset) { + val += y; + } } // pass accum to all threads local_total = shfl_warp_broadcast( - val, - threadIdx.x+Impl::CudaTraits::WarpSize-blockDim.x, - Impl::CudaTraits::WarpSize); + val, threadIdx.x + Impl::CudaTraits::WarpSize - blockDim.x, + Impl::CudaTraits::WarpSize); // make EXCLUSIVE scan by shifting values over one val = Kokkos::shfl_up(val, blockDim.x, Impl::CudaTraits::WarpSize); - if ( threadIdx.y == 0 ) { val = 0 ; } + if (threadIdx.y == 0) { + val = 0; + } val += accum; - if ( i < loop_boundaries.end ) closure(i,val,true); + if (i < loop_boundaries.end) closure(i, val, true); accum += local_total; } - } - else { - value_type accum = 0 ; - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - closure(i,accum,true); + } else { + value_type accum = 0; + for (iType i = loop_boundaries.start; i < loop_boundaries.end; + i += loop_boundaries.increment) { + closure(i, accum, true); } } } @@ -1152,57 +1098,58 @@ void parallel_scan // blockDim.y == team_size // threadIdx.x == position in vec // threadIdx.y == member number -template< typename iType, class Closure, class Scheduler > -KOKKOS_INLINE_FUNCTION -void parallel_scan - (const Impl::ThreadVectorRangeBoundariesStruct >& loop_boundaries, - const Closure & closure ) -{ +template +KOKKOS_INLINE_FUNCTION void parallel_scan( + const Impl::ThreadVectorRangeBoundariesStruct< + iType, Impl::TaskExec>& loop_boundaries, + const Closure& closure) { // Extract value_type from closure - using value_type = - typename Kokkos::Impl::FunctorAnalysis - < Kokkos::Impl::FunctorPatternInterface::SCAN - , void - , Closure >::value_type ; - - if ( 1 < loop_boundaries.thread.team_size() ) { + using value_type = typename Kokkos::Impl::FunctorAnalysis< + Kokkos::Impl::FunctorPatternInterface::SCAN, void, Closure>::value_type; + if (1 < loop_boundaries.thread.team_size()) { // make sure all threads perform all loop iterations - const iType bound = loop_boundaries.end + loop_boundaries.start ; + const iType bound = loop_boundaries.end + loop_boundaries.start; - value_type accum = 0 ; + value_type accum = 0; value_type val, y, local_total; - for( iType i = loop_boundaries.start; i < bound; i+=loop_boundaries.increment) { + for (iType i = loop_boundaries.start; i < bound; + i += loop_boundaries.increment) { val = 0; - if ( i < loop_boundaries.end ) closure(i,val,false); + if (i < loop_boundaries.end) closure(i, val, false); // intra-blockDim.x exclusive scan on 'val' // accum = accumulated, sum in total for this iteration // INCLUSIVE scan - for( int offset = 1 ; offset < blockDim.x ; offset <<= 1 ) { + for (int offset = 1; offset < blockDim.x; offset <<= 1) { y = Kokkos::shfl_up(val, offset, blockDim.x); - if(threadIdx.x >= offset) { val += y; } + if (threadIdx.x >= offset) { + val += y; + } } // pass accum to all threads - local_total = shfl_warp_broadcast(val, blockDim.x-1, blockDim.x); + local_total = + shfl_warp_broadcast(val, blockDim.x - 1, blockDim.x); // make EXCLUSIVE scan by shifting values over one val = Kokkos::shfl_up(val, 1, blockDim.x); - if ( threadIdx.x == 0 ) { val = 0 ; } + if (threadIdx.x == 0) { + val = 0; + } val += accum; - if ( i < loop_boundaries.end ) closure(i,val,true); + if (i < loop_boundaries.end) closure(i, val, true); accum += local_total; } - } - else { - value_type accum = 0 ; - for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) { - closure(i,accum,true); + } else { + value_type accum = 0; + for (iType i = loop_boundaries.start; i < loop_boundaries.end; + i += loop_boundaries.increment) { + closure(i, accum, true); } } } @@ -1211,49 +1158,53 @@ void parallel_scan namespace Kokkos { - template - KOKKOS_INLINE_FUNCTION - void single(const Impl::VectorSingleStruct >& , const FunctorType& lambda) { +template +KOKKOS_INLINE_FUNCTION void single( + const Impl::VectorSingleStruct>&, + const FunctorType& lambda) { #ifdef __CUDA_ARCH__ - if(threadIdx.x == 0) lambda(); + if (threadIdx.x == 0) lambda(); #endif - } - - template - KOKKOS_INLINE_FUNCTION - void single(const Impl::ThreadSingleStruct >& , const FunctorType& lambda) { -#ifdef __CUDA_ARCH__ - if(threadIdx.x == 0 && threadIdx.y == 0) lambda(); -#endif - } - - template - KOKKOS_INLINE_FUNCTION - void single(const Impl::VectorSingleStruct >& s , const FunctorType& lambda, ValueType& val) { -#ifdef __CUDA_ARCH__ - if(threadIdx.x == 0) lambda(val); - if ( 1 < s.team_member.team_size() ) { - val = shfl(val,0,blockDim.x); - } -#endif - } - - template - KOKKOS_INLINE_FUNCTION - void single(const Impl::ThreadSingleStruct >& single_struct, const FunctorType& lambda, ValueType& val) { -#ifdef __CUDA_ARCH__ - if(threadIdx.x == 0 && threadIdx.y == 0) { - lambda(val); - } - single_struct.team_member.team_broadcast(val,0); -#endif - } +} -} // namespace Kokkos +template +KOKKOS_INLINE_FUNCTION void single( + const Impl::ThreadSingleStruct>&, + const FunctorType& lambda) { +#ifdef __CUDA_ARCH__ + if (threadIdx.x == 0 && threadIdx.y == 0) lambda(); +#endif +} + +template +KOKKOS_INLINE_FUNCTION void single( + const Impl::VectorSingleStruct>& s, + const FunctorType& lambda, ValueType& val) { +#ifdef __CUDA_ARCH__ + if (threadIdx.x == 0) lambda(val); + if (1 < s.team_member.team_size()) { + val = shfl(val, 0, blockDim.x); + } +#endif +} + +template +KOKKOS_INLINE_FUNCTION void single( + const Impl::ThreadSingleStruct>& + single_struct, + const FunctorType& lambda, ValueType& val) { +#ifdef __CUDA_ARCH__ + if (threadIdx.x == 0 && threadIdx.y == 0) { + lambda(val); + } + single_struct.team_member.team_broadcast(val, 0); +#endif +} + +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ #endif /* #ifndef KOKKOS_IMPL_CUDA_TASK_HPP */ - diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp index 587ad6001d..ac9ab9660c 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -51,7 +52,7 @@ #include /* only compile this file if CUDA is enabled for Kokkos */ -#if defined( __CUDACC__ ) && defined( KOKKOS_ENABLE_CUDA ) +#if defined(__CUDACC__) && defined(KOKKOS_ENABLE_CUDA) #include #include @@ -72,14 +73,15 @@ namespace Kokkos { namespace Impl { -template< typename Type > +template struct CudaJoinFunctor { - typedef Type value_type ; + typedef Type value_type; KOKKOS_INLINE_FUNCTION - static void join( volatile value_type & update , - volatile const value_type & input ) - { update += input ; } + static void join(volatile value_type& update, + volatile const value_type& input) { + update += input; + } }; /**\brief Team member_type passed to TeamPolicy or TeamTask closures. @@ -101,108 +103,105 @@ struct CudaJoinFunctor { * total available shared memory must be partitioned among teams. */ class CudaTeamMember { + public: + typedef Kokkos::Cuda execution_space; + typedef execution_space::scratch_memory_space scratch_memory_space; -public: - typedef Kokkos::Cuda execution_space ; - typedef execution_space::scratch_memory_space scratch_memory_space ; + private: + mutable void* m_team_reduce; + scratch_memory_space m_team_shared; + int m_team_reduce_size; + int m_league_rank; + int m_league_size; -private: - - mutable void * m_team_reduce ; - scratch_memory_space m_team_shared ; - int m_team_reduce_size ; - int m_league_rank ; - int m_league_size ; - -public: + public: + KOKKOS_INLINE_FUNCTION + const execution_space::scratch_memory_space& team_shmem() const { + return m_team_shared.set_team_thread_mode(0, 1, 0); + } KOKKOS_INLINE_FUNCTION - const execution_space::scratch_memory_space & team_shmem() const - { return m_team_shared.set_team_thread_mode(0,1,0) ; } + const execution_space::scratch_memory_space& team_scratch( + const int& level) const { + return m_team_shared.set_team_thread_mode(level, 1, 0); + } KOKKOS_INLINE_FUNCTION - const execution_space::scratch_memory_space & - team_scratch(const int& level) const - { return m_team_shared.set_team_thread_mode(level,1,0) ; } + const execution_space::scratch_memory_space& thread_scratch( + const int& level) const { + return m_team_shared.set_team_thread_mode(level, team_size(), team_rank()); + } - KOKKOS_INLINE_FUNCTION - const execution_space::scratch_memory_space & - thread_scratch(const int& level) const - { return m_team_shared.set_team_thread_mode(level,team_size(),team_rank()) ; } + KOKKOS_INLINE_FUNCTION int league_rank() const { return m_league_rank; } + KOKKOS_INLINE_FUNCTION int league_size() const { return m_league_size; } + KOKKOS_INLINE_FUNCTION int team_rank() const { +#ifdef __CUDA_ARCH__ + return threadIdx.y; +#else + return 0; +#endif + } - KOKKOS_INLINE_FUNCTION int league_rank() const { return m_league_rank ; } - KOKKOS_INLINE_FUNCTION int league_size() const { return m_league_size ; } - KOKKOS_INLINE_FUNCTION int team_rank() const - { - #ifdef __CUDA_ARCH__ - return threadIdx.y ; - #else - return 0; - #endif - } + KOKKOS_INLINE_FUNCTION int team_size() const { +#ifdef __CUDA_ARCH__ + return blockDim.y; +#else + return 1; +#endif + } - KOKKOS_INLINE_FUNCTION int team_size() const - { - #ifdef __CUDA_ARCH__ - return blockDim.y ; - #else - return 1; - #endif - } - - KOKKOS_INLINE_FUNCTION void team_barrier() const - { - #ifdef __CUDA_ARCH__ - if ( 1 == blockDim.z ) __syncthreads(); // team == block - else __threadfence_block(); // team <= warp - #endif - } + KOKKOS_INLINE_FUNCTION void team_barrier() const { +#ifdef __CUDA_ARCH__ + if (1 == blockDim.z) + __syncthreads(); // team == block + else + __threadfence_block(); // team <= warp +#endif + } //-------------------------------------------------------------------------- - template - KOKKOS_INLINE_FUNCTION - void team_broadcast( ValueType & val, const int& thread_id ) const - { - #ifdef __CUDA_ARCH__ - if ( 1 == blockDim.z ) { // team == block - __syncthreads(); - // Wait for shared data write until all threads arrive here - if ( threadIdx.x == 0u && threadIdx.y == (uint32_t)thread_id ) { - *((ValueType*) m_team_reduce) = val ; - } - __syncthreads(); // Wait for shared data read until root thread writes - val = *((ValueType*) m_team_reduce); + template + KOKKOS_INLINE_FUNCTION void team_broadcast(ValueType& val, + const int& thread_id) const { +#ifdef __CUDA_ARCH__ + if (1 == blockDim.z) { // team == block + __syncthreads(); + // Wait for shared data write until all threads arrive here + if (threadIdx.x == 0u && threadIdx.y == (uint32_t)thread_id) { + *((ValueType*)m_team_reduce) = val; } - else { // team <= warp - ValueType tmp( val ); // input might not be a register variable - cuda_shfl( val, tmp, blockDim.x * thread_id, blockDim.x * blockDim.y ); - } - #endif + __syncthreads(); // Wait for shared data read until root thread writes + val = *((ValueType*)m_team_reduce); + } else { // team <= warp + ValueType tmp(val); // input might not be a register variable + Impl::in_place_shfl(val, tmp, blockDim.x * thread_id, + blockDim.x * blockDim.y); } - - template - KOKKOS_INLINE_FUNCTION - void team_broadcast( Closure const & f, ValueType & val, const int& thread_id ) const - { - #ifdef __CUDA_ARCH__ - f( val ); +#endif + } - if ( 1 == blockDim.z ) { // team == block - __syncthreads(); - // Wait for shared data write until all threads arrive here - if ( threadIdx.x == 0u && threadIdx.y == (uint32_t)thread_id ) { - *((ValueType*) m_team_reduce) = val ; - } - __syncthreads(); // Wait for shared data read until root thread writes - val = *((ValueType*) m_team_reduce); + template + KOKKOS_INLINE_FUNCTION void team_broadcast(Closure const& f, ValueType& val, + const int& thread_id) const { +#ifdef __CUDA_ARCH__ + f(val); + + if (1 == blockDim.z) { // team == block + __syncthreads(); + // Wait for shared data write until all threads arrive here + if (threadIdx.x == 0u && threadIdx.y == (uint32_t)thread_id) { + *((ValueType*)m_team_reduce) = val; } - else { // team <= warp - ValueType tmp( val ); // input might not be a register variable - cuda_shfl( val, tmp, blockDim.x * thread_id, blockDim.x * blockDim.y ); - } - #endif + __syncthreads(); // Wait for shared data read until root thread writes + val = *((ValueType*)m_team_reduce); + } else { // team <= warp + ValueType tmp(val); // input might not be a register variable + Impl::in_place_shfl(val, tmp, blockDim.x * thread_id, + blockDim.x * blockDim.y); } +#endif + } //-------------------------------------------------------------------------- /**\brief Reduction across a team @@ -219,24 +218,22 @@ public: * OR * ( 1 == blockDim.z ) */ - template< typename ReducerType > + template KOKKOS_INLINE_FUNCTION - typename std::enable_if< is_reducer< ReducerType >::value >::type - team_reduce( ReducerType const & reducer ) const noexcept - { - team_reduce(reducer,reducer.reference()); - } - - template< typename ReducerType > - KOKKOS_INLINE_FUNCTION - typename std::enable_if< is_reducer< ReducerType >::value >::type - team_reduce( ReducerType const & reducer, typename ReducerType::value_type& value ) const noexcept - { - #ifdef __CUDA_ARCH__ - cuda_intra_block_reduction(reducer,value,blockDim.y); - #endif /* #ifdef __CUDA_ARCH__ */ - } + typename std::enable_if::value>::type + team_reduce(ReducerType const& reducer) const noexcept { + team_reduce(reducer, reducer.reference()); + } + template + KOKKOS_INLINE_FUNCTION + typename std::enable_if::value>::type + team_reduce(ReducerType const& reducer, + typename ReducerType::value_type& value) const noexcept { +#ifdef __CUDA_ARCH__ + cuda_intra_block_reduction(reducer, value, blockDim.y); +#endif /* #ifdef __CUDA_ARCH__ */ + } //-------------------------------------------------------------------------- /** \brief Intra-team exclusive prefix sum with team_rank() ordering @@ -248,307 +245,299 @@ public: * As such the base value for each team's scan operation is similarly * non-deterministic. */ - template< typename Type > - KOKKOS_INLINE_FUNCTION - Type team_scan( const Type & value , Type * const global_accum ) const - { - #ifdef __CUDA_ARCH__ - Type * const base_data = (Type *) m_team_reduce ; + template + KOKKOS_INLINE_FUNCTION Type team_scan(const Type& value, + Type* const global_accum) const { +#ifdef __CUDA_ARCH__ + Type* const base_data = (Type*)m_team_reduce; - __syncthreads(); // Don't write in to shared data until all threads have entered this function + __syncthreads(); // Don't write in to shared data until all threads have + // entered this function - if ( 0 == threadIdx.y ) { base_data[0] = 0 ; } - - base_data[ threadIdx.y + 1 ] = value ; - - Impl::cuda_intra_block_reduce_scan,void>( Impl::CudaJoinFunctor() , base_data + 1 ); - - if ( global_accum ) { - if ( blockDim.y == threadIdx.y + 1 ) { - base_data[ blockDim.y ] = atomic_fetch_add( global_accum , base_data[ blockDim.y ] ); - } - __syncthreads(); // Wait for atomic - base_data[ threadIdx.y ] += base_data[ blockDim.y ] ; - } - - return base_data[ threadIdx.y ]; - #else - return Type(); - #endif + if (0 == threadIdx.y) { + base_data[0] = 0; } + base_data[threadIdx.y + 1] = value; + + Impl::cuda_intra_block_reduce_scan, void>( + Impl::CudaJoinFunctor(), base_data + 1); + + if (global_accum) { + if (blockDim.y == threadIdx.y + 1) { + base_data[blockDim.y] = + atomic_fetch_add(global_accum, base_data[blockDim.y]); + } + __syncthreads(); // Wait for atomic + base_data[threadIdx.y] += base_data[blockDim.y]; + } + + return base_data[threadIdx.y]; +#else + return Type(); +#endif + } + /** \brief Intra-team exclusive prefix sum with team_rank() ordering. * * The highest rank thread can compute the reduction total as * reduction_total = dev.team_scan( value ) + value ; */ - template< typename Type > - KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value ) const { - return this->template team_scan( value , 0 ); + template + KOKKOS_INLINE_FUNCTION Type team_scan(const Type& value) const { + return this->template team_scan(value, 0); } //---------------------------------------- - template< typename ReducerType > + template KOKKOS_INLINE_FUNCTION static - typename std::enable_if< is_reducer< ReducerType >::value >::type - vector_reduce( ReducerType const & reducer ) { - vector_reduce(reducer,reducer.reference()); + typename std::enable_if::value>::type + vector_reduce(ReducerType const& reducer) { + vector_reduce(reducer, reducer.reference()); } - template< typename ReducerType > + template KOKKOS_INLINE_FUNCTION static - typename std::enable_if< is_reducer< ReducerType >::value >::type - vector_reduce( ReducerType const & reducer, typename ReducerType::value_type& value ) - { + typename std::enable_if::value>::type + vector_reduce(ReducerType const& reducer, + typename ReducerType::value_type& value) { +#ifdef __CUDA_ARCH__ + if (blockDim.x == 1) return; - #ifdef __CUDA_ARCH__ - if(blockDim.x == 1) return; + // Intra vector lane shuffle reduction: + typename ReducerType::value_type tmp(value); + typename ReducerType::value_type tmp2 = tmp; - // Intra vector lane shuffle reduction: - typename ReducerType::value_type tmp ( value ); - typename ReducerType::value_type tmp2 = tmp; + unsigned mask = + blockDim.x == 32 + ? 0xffffffff + : ((1 << blockDim.x) - 1) + << ((threadIdx.y % (32 / blockDim.x)) * blockDim.x); - unsigned mask = blockDim.x==32?0xffffffff:((1<>= 1 ) ; ) { - cuda_shfl_down( tmp2 , tmp , i , blockDim.x , mask ); - if ( (int)threadIdx.x < i ) { reducer.join( tmp , tmp2 ); } + for (int i = blockDim.x; (i >>= 1);) { + Impl::in_place_shfl_down(tmp2, tmp, i, blockDim.x, mask); + if ((int)threadIdx.x < i) { + reducer.join(tmp, tmp2); } - - // Broadcast from root lane to all other lanes. - // Cannot use "butterfly" algorithm to avoid the broadcast - // because floating point summation is not associative - // and thus different threads could have different results. - - cuda_shfl( tmp2 , tmp , 0 , blockDim.x , mask ); - value = tmp2; - reducer.reference() = tmp2; - #endif } + // Broadcast from root lane to all other lanes. + // Cannot use "butterfly" algorithm to avoid the broadcast + // because floating point summation is not associative + // and thus different threads could have different results. + + Impl::in_place_shfl(tmp2, tmp, 0, blockDim.x, mask); + value = tmp2; + reducer.reference() = tmp2; +#endif + } + //-------------------------------------------------------------------------- /**\brief Global reduction across all blocks * * Return !0 if reducer contains the final value */ - template< typename ReducerType > + template KOKKOS_INLINE_FUNCTION static - typename std::enable_if< is_reducer< ReducerType >::value , int >::type - global_reduce( ReducerType const & reducer - , int * const global_scratch_flags - , void * const global_scratch_space - , void * const shmem - , int const shmem_size - ) - { - #ifdef __CUDA_ARCH__ + typename std::enable_if::value, int>::type + global_reduce(ReducerType const& reducer, int* const global_scratch_flags, + void* const global_scratch_space, void* const shmem, + int const shmem_size) { +#ifdef __CUDA_ARCH__ - typedef typename ReducerType::value_type value_type ; - typedef value_type volatile * pointer_type ; + typedef typename ReducerType::value_type value_type; + typedef value_type volatile* pointer_type; - // Number of shared memory entries for the reduction: - const int nsh = shmem_size / sizeof(value_type); + // Number of shared memory entries for the reduction: + const int nsh = shmem_size / sizeof(value_type); - // Number of CUDA threads in the block, rank within the block - const int nid = blockDim.x * blockDim.y * blockDim.z ; - const int tid = threadIdx.x + blockDim.x * ( - threadIdx.y + blockDim.y * threadIdx.z ); + // Number of CUDA threads in the block, rank within the block + const int nid = blockDim.x * blockDim.y * blockDim.z; + const int tid = + threadIdx.x + blockDim.x * (threadIdx.y + blockDim.y * threadIdx.z); - // Reduces within block using all available shared memory - // Contributes if it is the root "vector lane" + // Reduces within block using all available shared memory + // Contributes if it is the root "vector lane" - // wn == number of warps in the block - // wx == which lane within the warp - // wy == which warp within the block + // wn == number of warps in the block + // wx == which lane within the warp + // wy == which warp within the block - const int wn = ( nid + CudaTraits::WarpIndexMask ) >> CudaTraits::WarpIndexShift ; - const int wx = tid & CudaTraits::WarpIndexMask ; - const int wy = tid >> CudaTraits::WarpIndexShift ; + const int wn = + (nid + CudaTraits::WarpIndexMask) >> CudaTraits::WarpIndexShift; + const int wx = tid & CudaTraits::WarpIndexMask; + const int wy = tid >> CudaTraits::WarpIndexShift; - //------------------------ - { // Intra warp shuffle reduction from contributing CUDA threads + //------------------------ + { // Intra warp shuffle reduction from contributing CUDA threads - value_type tmp( reducer.reference() ); + value_type tmp(reducer.reference()); - for ( int i = CudaTraits::WarpSize ; (int)blockDim.x <= ( i >>= 1 ) ; ) { + for (int i = CudaTraits::WarpSize; (int)blockDim.x <= (i >>= 1);) { + Impl::in_place_shfl_down(reducer.reference(), tmp, i, + CudaTraits::WarpSize); - cuda_shfl_down( reducer.reference(), tmp, i, CudaTraits::WarpSize ); - - // Root of each vector lane reduces "thread" contribution - if ( 0 == threadIdx.x && wx < i ) { - reducer.join( & tmp , reducer.data() ); - } + // Root of each vector lane reduces "thread" contribution + if (0 == threadIdx.x && wx < i) { + reducer.join(&tmp, reducer.data()); } + } - // Reduce across warps using shared memory. - // Number of warps may not be power of two. + // Reduce across warps using shared memory. + // Number of warps may not be power of two. - __syncthreads(); // Wait before shared data write + __syncthreads(); // Wait before shared data write - // Number of shared memory entries for the reduction - // is at most one per warp - const int nentry = wn < nsh ? wn : nsh ; + // Number of shared memory entries for the reduction + // is at most one per warp + const int nentry = wn < nsh ? wn : nsh; - if ( 0 == wx && wy < nentry ) { + if (0 == wx && wy < nentry) { + // Root thread of warp 'wy' has warp's value to contribute + ((value_type*)shmem)[wy] = tmp; + } + + __syncthreads(); // Wait for write to be visible to block + + // When more warps than shared entries + // then warps must take turns joining their contribution + // to the designated shared memory entry. + for (int i = nentry; i < wn; i += nentry) { + const int k = wy - i; + + if (0 == wx && i <= wy && k < nentry) { // Root thread of warp 'wy' has warp's value to contribute - ((value_type*) shmem)[wy] = tmp ; + reducer.join(((value_type*)shmem) + k, &tmp); } - __syncthreads(); // Wait for write to be visible to block - - // When more warps than shared entries - // then warps must take turns joining their contribution - // to the designated shared memory entry. - for ( int i = nentry ; i < wn ; i += nentry ) { - - const int k = wy - i ; - - if ( 0 == wx && i <= wy && k < nentry ) { - // Root thread of warp 'wy' has warp's value to contribute - reducer.join( ((value_type*) shmem) + k , & tmp ); - } - - __syncthreads(); // Wait for write to be visible to block - } - - // One warp performs the inter-warp reduction: - - if ( 0 == wy ) { - - // Start fan-in at power of two covering nentry - - for ( int i = ( 1 << ( 32 - __clz(nentry-1) ) ) ; ( i >>= 1 ) ; ) { - const int k = wx + i ; - if ( wx < i && k < nentry ) { - reducer.join( ((pointer_type)shmem) + wx - , ((pointer_type)shmem) + k ); - __threadfence_block(); // Wait for write to be visible to warp - } - } - } - } - //------------------------ - { // Write block's value to global_scratch_memory - - int last_block = 0 ; - - if ( 0 == wx ) { - reducer.copy( ((pointer_type)global_scratch_space) - + blockIdx.x * reducer.length() - , reducer.data() ); - - __threadfence(); // Wait until global write is visible. - - last_block = (int)gridDim.x == - 1 + Kokkos::atomic_fetch_add(global_scratch_flags,1); - - // If last block then reset count - if ( last_block ) *global_scratch_flags = 0 ; - } - - last_block = __syncthreads_or( last_block ); - - if ( ! last_block ) return 0 ; - - } - //------------------------ - // Last block reads global_scratch_memory into shared memory. - - const int nentry = nid < gridDim.x ? - ( nid < nsh ? nid : nsh ) : - ( gridDim.x < nsh ? gridDim.x : nsh ) ; - - // nentry = min( nid , nsh , gridDim.x ) - - // whole block reads global memory into shared memory: - - if ( tid < nentry ) { - - const int offset = tid * reducer.length(); - - reducer.copy( ((pointer_type)shmem) + offset - , ((pointer_type)global_scratch_space) + offset ); - - for ( int i = nentry + tid ; i < (int)gridDim.x ; i += nentry ) { - reducer.join( ((pointer_type)shmem) + offset - , ((pointer_type)global_scratch_space) - + i * reducer.length() ); - } + __syncthreads(); // Wait for write to be visible to block } - __syncthreads(); // Wait for writes to be visible to block - - if ( 0 == wy ) { - - // Iterate to reduce shared memory to single warp fan-in size - - const int nreduce = CudaTraits::WarpSize < nentry - ? CudaTraits::WarpSize : nentry ; - - // nreduce = min( CudaTraits::WarpSize , nsh , gridDim.x ) - - if ( wx < nreduce && nreduce < nentry ) { - for ( int i = nreduce + wx ; i < nentry ; i += nreduce ) { - reducer.join( ((pointer_type)shmem) + wx - , ((pointer_type)shmem) + i ); - } - __threadfence_block(); // Wait for writes to be visible to warp - } + // One warp performs the inter-warp reduction: + if (0 == wy) { // Start fan-in at power of two covering nentry - for ( int i = ( 1 << ( 32 - __clz(nreduce-1) ) ) ; ( i >>= 1 ) ; ) { - const int k = wx + i ; - if ( wx < i && k < nreduce ) { - reducer.join( ((pointer_type)shmem) + wx - , ((pointer_type)shmem) + k ); - __threadfence_block(); // Wait for writes to be visible to warp + for (int i = (1 << (32 - __clz(nentry - 1))); (i >>= 1);) { + const int k = wx + i; + if (wx < i && k < nentry) { + reducer.join(((pointer_type)shmem) + wx, ((pointer_type)shmem) + k); + __threadfence_block(); // Wait for write to be visible to warp } } + } + } + //------------------------ + { // Write block's value to global_scratch_memory - if ( 0 == wx ) { - reducer.copy( reducer.data() , (pointer_type)shmem ); - return 1 ; + int last_block = 0; + + if (0 == wx) { + reducer.copy(((pointer_type)global_scratch_space) + + blockIdx.x * reducer.length(), + reducer.data()); + + __threadfence(); // Wait until global write is visible. + + last_block = (int)gridDim.x == + 1 + Kokkos::atomic_fetch_add(global_scratch_flags, 1); + + // If last block then reset count + if (last_block) *global_scratch_flags = 0; + } + + last_block = __syncthreads_or(last_block); + + if (!last_block) return 0; + } + //------------------------ + // Last block reads global_scratch_memory into shared memory. + + const int nentry = nid < gridDim.x ? (nid < nsh ? nid : nsh) + : (gridDim.x < nsh ? gridDim.x : nsh); + + // nentry = min( nid , nsh , gridDim.x ) + + // whole block reads global memory into shared memory: + + if (tid < nentry) { + const int offset = tid * reducer.length(); + + reducer.copy(((pointer_type)shmem) + offset, + ((pointer_type)global_scratch_space) + offset); + + for (int i = nentry + tid; i < (int)gridDim.x; i += nentry) { + reducer.join( + ((pointer_type)shmem) + offset, + ((pointer_type)global_scratch_space) + i * reducer.length()); + } + } + + __syncthreads(); // Wait for writes to be visible to block + + if (0 == wy) { + // Iterate to reduce shared memory to single warp fan-in size + + const int nreduce = + CudaTraits::WarpSize < nentry ? CudaTraits::WarpSize : nentry; + + // nreduce = min( CudaTraits::WarpSize , nsh , gridDim.x ) + + if (wx < nreduce && nreduce < nentry) { + for (int i = nreduce + wx; i < nentry; i += nreduce) { + reducer.join(((pointer_type)shmem) + wx, ((pointer_type)shmem) + i); + } + __threadfence_block(); // Wait for writes to be visible to warp + } + + // Start fan-in at power of two covering nentry + + for (int i = (1 << (32 - __clz(nreduce - 1))); (i >>= 1);) { + const int k = wx + i; + if (wx < i && k < nreduce) { + reducer.join(((pointer_type)shmem) + wx, ((pointer_type)shmem) + k); + __threadfence_block(); // Wait for writes to be visible to warp } } - return 0 ; - #else - return 0 ; - #endif + if (0 == wx) { + reducer.copy(reducer.data(), (pointer_type)shmem); + return 1; + } } + return 0; + +#else + return 0; +#endif + } //---------------------------------------- // Private for the driver KOKKOS_INLINE_FUNCTION - CudaTeamMember( void * shared - , const int shared_begin - , const int shared_size - , void* scratch_level_1_ptr - , const int scratch_level_1_size - , const int arg_league_rank - , const int arg_league_size ) - : m_team_reduce( shared ) - , m_team_shared( ((char *)shared) + shared_begin , shared_size, scratch_level_1_ptr, scratch_level_1_size) - , m_team_reduce_size( shared_begin ) - , m_league_rank( arg_league_rank ) - , m_league_size( arg_league_size ) - {} + CudaTeamMember(void* shared, const int shared_begin, const int shared_size, + void* scratch_level_1_ptr, const int scratch_level_1_size, + const int arg_league_rank, const int arg_league_size) + : m_team_reduce(shared), + m_team_shared(((char*)shared) + shared_begin, shared_size, + scratch_level_1_ptr, scratch_level_1_size), + m_team_reduce_size(shared_begin), + m_league_rank(arg_league_rank), + m_league_size(arg_league_size) {} -public: + public: // Declare to avoid unused private member warnings which are trigger // when SFINAE excludes the member function which uses these variables // Making another class a friend also surpresses these warnings - bool impl_avoid_sfinae_warning() const noexcept - { + bool impl_avoid_sfinae_warning() const noexcept { return m_team_reduce_size > 0 && m_team_reduce != nullptr; } }; -} // namspace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -556,124 +545,128 @@ public: namespace Kokkos { namespace Impl { -template -struct TeamThreadRangeBoundariesStruct { +template +struct TeamThreadRangeBoundariesStruct { typedef iType index_type; const CudaTeamMember& member; const iType start; const iType end; KOKKOS_INLINE_FUNCTION - TeamThreadRangeBoundariesStruct (const CudaTeamMember& thread_, iType count) - : member(thread_) - , start( 0 ) - , end( count ) {} + TeamThreadRangeBoundariesStruct(const CudaTeamMember& thread_, iType count) + : member(thread_), start(0), end(count) {} KOKKOS_INLINE_FUNCTION - TeamThreadRangeBoundariesStruct (const CudaTeamMember& thread_, iType begin_, iType end_) - : member(thread_) - , start( begin_ ) - , end( end_ ) {} + TeamThreadRangeBoundariesStruct(const CudaTeamMember& thread_, iType begin_, + iType end_) + : member(thread_), start(begin_), end(end_) {} }; -template -struct TeamVectorRangeBoundariesStruct { +template +struct TeamVectorRangeBoundariesStruct { typedef iType index_type; const CudaTeamMember& member; const iType start; const iType end; KOKKOS_INLINE_FUNCTION - TeamVectorRangeBoundariesStruct (const CudaTeamMember& thread_, const iType& count) - : member(thread_) - , start( 0 ) - , end( count ) {} + TeamVectorRangeBoundariesStruct(const CudaTeamMember& thread_, + const iType& count) + : member(thread_), start(0), end(count) {} KOKKOS_INLINE_FUNCTION - TeamVectorRangeBoundariesStruct (const CudaTeamMember& thread_, const iType& begin_, const iType& end_) - : member(thread_) - , start( begin_ ) - , end( end_ ) {} + TeamVectorRangeBoundariesStruct(const CudaTeamMember& thread_, + const iType& begin_, const iType& end_) + : member(thread_), start(begin_), end(end_) {} }; -template -struct ThreadVectorRangeBoundariesStruct { +template +struct ThreadVectorRangeBoundariesStruct { typedef iType index_type; const index_type start; const index_type end; KOKKOS_INLINE_FUNCTION - ThreadVectorRangeBoundariesStruct (const CudaTeamMember, index_type count) - : start( static_cast(0) ), end( count ) {} + ThreadVectorRangeBoundariesStruct(const CudaTeamMember, index_type count) + : start(static_cast(0)), end(count) {} KOKKOS_INLINE_FUNCTION - ThreadVectorRangeBoundariesStruct (index_type count) - : start( static_cast(0) ), end( count ) {} + ThreadVectorRangeBoundariesStruct(index_type count) + : start(static_cast(0)), end(count) {} KOKKOS_INLINE_FUNCTION - ThreadVectorRangeBoundariesStruct (const CudaTeamMember, index_type arg_begin, index_type arg_end) - : start( arg_begin ), end( arg_end ) {} + ThreadVectorRangeBoundariesStruct(const CudaTeamMember, index_type arg_begin, + index_type arg_end) + : start(arg_begin), end(arg_end) {} KOKKOS_INLINE_FUNCTION - ThreadVectorRangeBoundariesStruct (index_type arg_begin, index_type arg_end) - : start( arg_begin ), end( arg_end ) {} + ThreadVectorRangeBoundariesStruct(index_type arg_begin, index_type arg_end) + : start(arg_begin), end(arg_end) {} }; -} // namespace Impl +} // namespace Impl -template +template KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct< iType, Impl::CudaTeamMember > -TeamThreadRange( const Impl::CudaTeamMember & thread, iType count ) { - return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::CudaTeamMember >( thread, count ); + Impl::TeamThreadRangeBoundariesStruct + TeamThreadRange(const Impl::CudaTeamMember& thread, iType count) { + return Impl::TeamThreadRangeBoundariesStruct( + thread, count); } -template< typename iType1, typename iType2 > -KOKKOS_INLINE_FUNCTION -Impl::TeamThreadRangeBoundariesStruct< typename std::common_type< iType1, iType2 >::type, - Impl::CudaTeamMember > -TeamThreadRange( const Impl::CudaTeamMember & thread, iType1 begin, iType2 end ) { - typedef typename std::common_type< iType1, iType2 >::type iType; - return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::CudaTeamMember >( thread, iType(begin), iType(end) ); +template +KOKKOS_INLINE_FUNCTION Impl::TeamThreadRangeBoundariesStruct< + typename std::common_type::type, Impl::CudaTeamMember> +TeamThreadRange(const Impl::CudaTeamMember& thread, iType1 begin, iType2 end) { + typedef typename std::common_type::type iType; + return Impl::TeamThreadRangeBoundariesStruct( + thread, iType(begin), iType(end)); } -template +template KOKKOS_INLINE_FUNCTION -Impl::TeamVectorRangeBoundariesStruct< iType, Impl::CudaTeamMember > -TeamVectorRange( const Impl::CudaTeamMember & thread, const iType & count ) { - return Impl::TeamVectorRangeBoundariesStruct< iType, Impl::CudaTeamMember >( thread, count ); + Impl::TeamVectorRangeBoundariesStruct + TeamVectorRange(const Impl::CudaTeamMember& thread, const iType& count) { + return Impl::TeamVectorRangeBoundariesStruct( + thread, count); } -template< typename iType1, typename iType2 > -KOKKOS_INLINE_FUNCTION -Impl::TeamVectorRangeBoundariesStruct< typename std::common_type< iType1, iType2 >::type, - Impl::CudaTeamMember > -TeamVectorRange( const Impl::CudaTeamMember & thread, const iType1 & begin, const iType2 & end ) { - typedef typename std::common_type< iType1, iType2 >::type iType; - return Impl::TeamVectorRangeBoundariesStruct< iType, Impl::CudaTeamMember >( thread, iType(begin), iType(end) ); +template +KOKKOS_INLINE_FUNCTION Impl::TeamVectorRangeBoundariesStruct< + typename std::common_type::type, Impl::CudaTeamMember> +TeamVectorRange(const Impl::CudaTeamMember& thread, const iType1& begin, + const iType2& end) { + typedef typename std::common_type::type iType; + return Impl::TeamVectorRangeBoundariesStruct( + thread, iType(begin), iType(end)); } -template +template KOKKOS_INLINE_FUNCTION -Impl::ThreadVectorRangeBoundariesStruct -ThreadVectorRange(const Impl::CudaTeamMember& thread, iType count) { - return Impl::ThreadVectorRangeBoundariesStruct(thread,count); + Impl::ThreadVectorRangeBoundariesStruct + ThreadVectorRange(const Impl::CudaTeamMember& thread, iType count) { + return Impl::ThreadVectorRangeBoundariesStruct( + thread, count); } -template +template KOKKOS_INLINE_FUNCTION -Impl::ThreadVectorRangeBoundariesStruct -ThreadVectorRange(const Impl::CudaTeamMember& thread, iType arg_begin, iType arg_end) { - return Impl::ThreadVectorRangeBoundariesStruct(thread,arg_begin,arg_end); + Impl::ThreadVectorRangeBoundariesStruct + ThreadVectorRange(const Impl::CudaTeamMember& thread, iType arg_begin, + iType arg_end) { + return Impl::ThreadVectorRangeBoundariesStruct( + thread, arg_begin, arg_end); } KOKKOS_INLINE_FUNCTION -Impl::ThreadSingleStruct PerTeam(const Impl::CudaTeamMember& thread) { +Impl::ThreadSingleStruct PerTeam( + const Impl::CudaTeamMember& thread) { return Impl::ThreadSingleStruct(thread); } KOKKOS_INLINE_FUNCTION -Impl::VectorSingleStruct PerThread(const Impl::CudaTeamMember& thread) { +Impl::VectorSingleStruct PerThread( + const Impl::CudaTeamMember& thread) { return Impl::VectorSingleStruct(thread); } @@ -685,20 +678,16 @@ Impl::VectorSingleStruct PerThread(const Impl::CudaTeamMem * * The range [0..N) is mapped to all threads of the the calling thread team. */ -template -KOKKOS_INLINE_FUNCTION -void parallel_for - ( const Impl::TeamThreadRangeBoundariesStruct& - loop_boundaries - , const Closure & closure - ) -{ - #ifdef __CUDA_ARCH__ - for( iType i = loop_boundaries.start + threadIdx.y - ; i < loop_boundaries.end - ; i += blockDim.y ) +template +KOKKOS_INLINE_FUNCTION void parallel_for( + const Impl::TeamThreadRangeBoundariesStruct& + loop_boundaries, + const Closure& closure) { +#ifdef __CUDA_ARCH__ + for (iType i = loop_boundaries.start + threadIdx.y; i < loop_boundaries.end; + i += blockDim.y) closure(i); - #endif +#endif } //---------------------------------------------------------------------------- @@ -711,32 +700,26 @@ void parallel_for * calling thread team and a summation of val is * performed and put into result. */ -template< typename iType, class Closure, class ReducerType > +template KOKKOS_INLINE_FUNCTION -typename std::enable_if< Kokkos::is_reducer< ReducerType >::value >::type -parallel_reduce - ( const Impl::TeamThreadRangeBoundariesStruct & - loop_boundaries - , const Closure & closure - , const ReducerType & reducer - ) -{ + typename std::enable_if::value>::type + parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct< + iType, Impl::CudaTeamMember>& loop_boundaries, + const Closure& closure, const ReducerType& reducer) { #ifdef __CUDA_ARCH__ typename ReducerType::value_type value; - reducer.init( value ); + reducer.init(value); - for( iType i = loop_boundaries.start + threadIdx.y - ; i < loop_boundaries.end - ; i += blockDim.y ) { - closure(i,value); + for (iType i = loop_boundaries.start + threadIdx.y; i < loop_boundaries.end; + i += blockDim.y) { + closure(i, value); } - loop_boundaries.member.team_reduce( reducer, value ); + loop_boundaries.member.team_reduce(reducer, value); #endif } - /** \brief Inter-thread parallel_reduce assuming summation. * * Executes closure(iType i, ValueType & val) for each i=[0..N) @@ -745,98 +728,79 @@ parallel_reduce * calling thread team and a summation of val is * performed and put into result. */ -template< typename iType, class Closure, typename ValueType > +template KOKKOS_INLINE_FUNCTION -typename std::enable_if< ! Kokkos::is_reducer< ValueType >::value >::type -parallel_reduce - ( const Impl::TeamThreadRangeBoundariesStruct & - loop_boundaries - , const Closure & closure - , ValueType & result - ) -{ + typename std::enable_if::value>::type + parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct< + iType, Impl::CudaTeamMember>& loop_boundaries, + const Closure& closure, ValueType& result) { #ifdef __CUDA_ARCH__ ValueType val; Kokkos::Sum reducer(val); - reducer.init( reducer.reference() ); + reducer.init(reducer.reference()); - for( iType i = loop_boundaries.start + threadIdx.y - ; i < loop_boundaries.end - ; i += blockDim.y ) { - closure(i,val); + for (iType i = loop_boundaries.start + threadIdx.y; i < loop_boundaries.end; + i += blockDim.y) { + closure(i, val); } - loop_boundaries.member.team_reduce( reducer , val); + loop_boundaries.member.team_reduce(reducer, val); result = reducer.reference(); #endif } -template -KOKKOS_INLINE_FUNCTION -void parallel_for - ( const Impl::TeamVectorRangeBoundariesStruct& - loop_boundaries - , const Closure & closure - ) -{ - #ifdef __CUDA_ARCH__ - for( iType i = loop_boundaries.start + threadIdx.y * blockDim.x + threadIdx.x - ; i < loop_boundaries.end - ; i += blockDim.y*blockDim.x ) - closure(i); - #endif -} - -template< typename iType, class Closure, class ReducerType > -KOKKOS_INLINE_FUNCTION -typename std::enable_if< Kokkos::is_reducer< ReducerType >::value >::type -parallel_reduce - ( const Impl::TeamVectorRangeBoundariesStruct & - loop_boundaries - , const Closure & closure - , const ReducerType & reducer - ) -{ +template +KOKKOS_INLINE_FUNCTION void parallel_for( + const Impl::TeamVectorRangeBoundariesStruct& + loop_boundaries, + const Closure& closure) { #ifdef __CUDA_ARCH__ - typename ReducerType::value_type value; - reducer.init( value ); - - for( iType i = loop_boundaries.start + threadIdx.y * blockDim.x + threadIdx.x - ; i < loop_boundaries.end - ; i += blockDim.y * blockDim.x ) { - closure(i,value); - } - - loop_boundaries.member.vector_reduce( reducer, value ); - loop_boundaries.member.team_reduce( reducer, value ); + for (iType i = loop_boundaries.start + threadIdx.y * blockDim.x + threadIdx.x; + i < loop_boundaries.end; i += blockDim.y * blockDim.x) + closure(i); #endif } -template< typename iType, class Closure, typename ValueType > +template KOKKOS_INLINE_FUNCTION -typename std::enable_if< ! Kokkos::is_reducer< ValueType >::value >::type -parallel_reduce - ( const Impl::TeamVectorRangeBoundariesStruct & - loop_boundaries - , const Closure & closure - , ValueType & result - ) -{ + typename std::enable_if::value>::type + parallel_reduce(const Impl::TeamVectorRangeBoundariesStruct< + iType, Impl::CudaTeamMember>& loop_boundaries, + const Closure& closure, const ReducerType& reducer) { +#ifdef __CUDA_ARCH__ + typename ReducerType::value_type value; + reducer.init(value); + + for (iType i = loop_boundaries.start + threadIdx.y * blockDim.x + threadIdx.x; + i < loop_boundaries.end; i += blockDim.y * blockDim.x) { + closure(i, value); + } + + loop_boundaries.member.vector_reduce(reducer, value); + loop_boundaries.member.team_reduce(reducer, value); +#endif +} + +template +KOKKOS_INLINE_FUNCTION + typename std::enable_if::value>::type + parallel_reduce(const Impl::TeamVectorRangeBoundariesStruct< + iType, Impl::CudaTeamMember>& loop_boundaries, + const Closure& closure, ValueType& result) { #ifdef __CUDA_ARCH__ ValueType val; Kokkos::Sum reducer(val); - reducer.init( reducer.reference() ); + reducer.init(reducer.reference()); - for( iType i = loop_boundaries.start + threadIdx.y * blockDim.x + threadIdx.x - ; i < loop_boundaries.end - ; i += blockDim.y * blockDim.x ) { - closure(i,val); + for (iType i = loop_boundaries.start + threadIdx.y * blockDim.x + threadIdx.x; + i < loop_boundaries.end; i += blockDim.y * blockDim.x) { + closure(i, val); } - loop_boundaries.member.vector_reduce( reducer ); - loop_boundaries.member.team_reduce( reducer ); + loop_boundaries.member.vector_reduce(reducer); + loop_boundaries.member.team_reduce(reducer); result = reducer.reference(); #endif } @@ -849,25 +813,24 @@ parallel_reduce * * The range [0..N) is mapped to all vector lanes of the the calling thread. */ -template -KOKKOS_INLINE_FUNCTION -void parallel_for - ( const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries - , const Closure & closure - ) -{ +template +KOKKOS_INLINE_FUNCTION void parallel_for( + const Impl::ThreadVectorRangeBoundariesStruct& + loop_boundaries, + const Closure& closure) { #ifdef __CUDA_ARCH__ - for ( iType i = loop_boundaries.start + threadIdx.x - ; i < loop_boundaries.end - ; i += blockDim.x ) { + for (iType i = loop_boundaries.start + threadIdx.x; i < loop_boundaries.end; + i += blockDim.x) { closure(i); } - #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - KOKKOS_IMPL_CUDA_SYNCWARP_MASK(blockDim.x==32?0xffffffff:((1< +template KOKKOS_INLINE_FUNCTION -typename std::enable_if< is_reducer< ReducerType >::value >::type -parallel_reduce - ( Impl::ThreadVectorRangeBoundariesStruct - const & loop_boundaries - , Closure const & closure - , ReducerType const & reducer ) -{ + typename std::enable_if::value>::type + parallel_reduce(Impl::ThreadVectorRangeBoundariesStruct< + iType, Impl::CudaTeamMember> const& loop_boundaries, + Closure const& closure, ReducerType const& reducer) { #ifdef __CUDA_ARCH__ - reducer.init( reducer.reference() ); + reducer.init(reducer.reference()); - for ( iType i = loop_boundaries.start + threadIdx.x - ; i < loop_boundaries.end - ; i += blockDim.x ) { - closure(i,reducer.reference()); + for (iType i = loop_boundaries.start + threadIdx.x; i < loop_boundaries.end; + i += blockDim.x) { + closure(i, reducer.reference()); } - Impl::CudaTeamMember::vector_reduce( reducer ); + Impl::CudaTeamMember::vector_reduce(reducer); #endif } @@ -919,26 +878,21 @@ parallel_reduce * The identity value for the += operator is assumed to be the default * constructed value. */ -template< typename iType, class Closure, typename ValueType > +template KOKKOS_INLINE_FUNCTION -typename std::enable_if< ! is_reducer< ValueType >::value >::type -parallel_reduce - ( Impl::ThreadVectorRangeBoundariesStruct - const & loop_boundaries - , Closure const & closure - , ValueType & result ) -{ + typename std::enable_if::value>::type + parallel_reduce(Impl::ThreadVectorRangeBoundariesStruct< + iType, Impl::CudaTeamMember> const& loop_boundaries, + Closure const& closure, ValueType& result) { #ifdef __CUDA_ARCH__ result = ValueType(); - for ( iType i = loop_boundaries.start + threadIdx.x - ; i < loop_boundaries.end - ; i += blockDim.x ) { - closure(i,result); + for (iType i = loop_boundaries.start + threadIdx.x; i < loop_boundaries.end; + i += blockDim.x) { + closure(i, result); } - Impl::CudaTeamMember::vector_reduce( - Kokkos::Sum(result ) ); + Impl::CudaTeamMember::vector_reduce(Kokkos::Sum(result)); #endif } @@ -953,29 +907,22 @@ parallel_reduce * thread and a scan operation is performed. * The last call to closure has final == true. */ -template< typename iType, class Closure > -KOKKOS_INLINE_FUNCTION -void parallel_scan - ( const Impl::ThreadVectorRangeBoundariesStruct& - loop_boundaries - , const Closure & closure - ) -{ - +template +KOKKOS_INLINE_FUNCTION void parallel_scan( + const Impl::ThreadVectorRangeBoundariesStruct& + loop_boundaries, + const Closure& closure) { #ifdef __CUDA_ARCH__ // Extract value_type from closure - using value_type = - typename Kokkos::Impl::FunctorAnalysis - < Kokkos::Impl::FunctorPatternInterface::SCAN - , void - , Closure >::value_type ; + using value_type = typename Kokkos::Impl::FunctorAnalysis< + Kokkos::Impl::FunctorPatternInterface::SCAN, void, Closure>::value_type; // Loop through boundaries by vector-length chunks // must scan at each iteration - value_type accum = 0 ; + value_type accum = 0; // All thread "lanes" must loop the same number of times. // Determine an loop end for all thread "lanes." @@ -984,19 +931,21 @@ void parallel_scan // ( end % blockDim.x ) == ( end & ( blockDim.x - 1 ) ) // 1 <= blockDim.x <= CudaTraits::WarpSize - const int mask = blockDim.x - 1 ; - const unsigned active_mask = blockDim.x==32?0xffffffff:((1<= 4 // ... - for ( int j = 1 ; j < (int)blockDim.x ; j <<= 1 ) { - value_type tmp = 0 ; - Impl::cuda_shfl_up(tmp, sval , j , blockDim.x, active_mask ); - if ( j <= (int)threadIdx.x ) { sval += tmp ; } + for (int j = 1; j < (int)blockDim.x; j <<= 1) { + value_type tmp = 0; + Impl::in_place_shfl_up(tmp, sval, j, blockDim.x, active_mask); + if (j <= (int)threadIdx.x) { + sval += tmp; + } } // Include accumulation and remove value for exclusive scan: - val = accum + sval - val ; + val = accum + sval - val; // Provide exclusive scan value: - if ( i < loop_boundaries.end ) closure( i , val , true ); + if (i < loop_boundaries.end) closure(i, val, true); // Accumulate the last value in the inclusive scan: - Impl::cuda_shfl( sval , sval , mask , blockDim.x, active_mask ); + Impl::in_place_shfl(sval, sval, mask, blockDim.x, active_mask); - accum += sval ; + accum += sval; } #endif } -} +} // namespace Kokkos namespace Kokkos { -template -KOKKOS_INLINE_FUNCTION -void single(const Impl::VectorSingleStruct& , const FunctorType& lambda) { +template +KOKKOS_INLINE_FUNCTION void single( + const Impl::VectorSingleStruct&, + const FunctorType& lambda) { #ifdef __CUDA_ARCH__ - if(threadIdx.x == 0) lambda(); - #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - KOKKOS_IMPL_CUDA_SYNCWARP_MASK(blockDim.x==32?0xffffffff:((1< -KOKKOS_INLINE_FUNCTION -void single(const Impl::ThreadSingleStruct& , const FunctorType& lambda) { +template +KOKKOS_INLINE_FUNCTION void single( + const Impl::ThreadSingleStruct&, + const FunctorType& lambda) { #ifdef __CUDA_ARCH__ - if(threadIdx.x == 0 && threadIdx.y == 0) lambda(); - #ifdef KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - KOKKOS_IMPL_CUDA_SYNCWARP_MASK(blockDim.x==32?0xffffffff:((1< -KOKKOS_INLINE_FUNCTION -void single(const Impl::VectorSingleStruct& , const FunctorType& lambda, ValueType& val) { +template +KOKKOS_INLINE_FUNCTION void single( + const Impl::VectorSingleStruct&, + const FunctorType& lambda, ValueType& val) { #ifdef __CUDA_ARCH__ - if(threadIdx.x == 0) lambda(val); - unsigned mask = blockDim.x==32?0xffffffff:((1< -KOKKOS_INLINE_FUNCTION -void single(const Impl::ThreadSingleStruct& single_struct, const FunctorType& lambda, ValueType& val) { +template +KOKKOS_INLINE_FUNCTION void single( + const Impl::ThreadSingleStruct& single_struct, + const FunctorType& lambda, ValueType& val) { #ifdef __CUDA_ARCH__ - if(threadIdx.x == 0 && threadIdx.y == 0) { + if (threadIdx.x == 0 && threadIdx.y == 0) { lambda(val); } - single_struct.team_member.team_broadcast(val,0); + single_struct.team_member.team_broadcast(val, 0); #endif } -} // namespace Kokkos +} // namespace Kokkos #endif /* defined( __CUDACC__ ) */ #endif /* #ifndef KOKKOS_CUDA_TEAM_HPP */ - diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_UniqueToken.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_UniqueToken.hpp index c4140750da..a0de4eaa7f 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_UniqueToken.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_UniqueToken.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -52,92 +53,79 @@ #include #include -namespace Kokkos { namespace Experimental { +namespace Kokkos { +namespace Experimental { // both global and instance Unique Tokens are implemented in the same way -template<> -class UniqueToken< Cuda, UniqueTokenScope::Global > -{ -private: - - uint32_t volatile * m_buffer ; - uint32_t m_count ; - -public: +template <> +class UniqueToken { + private: + uint32_t volatile* m_buffer; + uint32_t m_count; + public: using execution_space = Cuda; - using size_type = int32_t; + using size_type = int32_t; -#if defined( KOKKOS_ENABLE_DEPRECATED_CODE ) - explicit - UniqueToken( execution_space const& ); +#if defined(KOKKOS_ENABLE_DEPRECATED_CODE) + explicit UniqueToken(execution_space const&); KOKKOS_INLINE_FUNCTION UniqueToken() : m_buffer(0), m_count(0) {} #else - explicit - UniqueToken( execution_space const& = execution_space() ); + explicit UniqueToken(execution_space const& = execution_space()); #endif #ifdef KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND KOKKOS_INLINE_FUNCTION - UniqueToken( const UniqueToken & rhs ) - : m_buffer(rhs.m_buffer) - , m_count(rhs.m_count) - { - } + UniqueToken(const UniqueToken& rhs) + : m_buffer(rhs.m_buffer), m_count(rhs.m_count) {} KOKKOS_INLINE_FUNCTION - UniqueToken( UniqueToken && rhs ) - : m_buffer(std::move(rhs.m_buffer)) - , m_count(std::move(rhs.m_count)) - { - } + UniqueToken(UniqueToken&& rhs) + : m_buffer(std::move(rhs.m_buffer)), m_count(std::move(rhs.m_count)) {} KOKKOS_INLINE_FUNCTION - UniqueToken & operator=( const UniqueToken & rhs ) { + UniqueToken& operator=(const UniqueToken& rhs) { m_buffer = rhs.m_buffer; - m_count = rhs.m_count; + m_count = rhs.m_count; return *this; } KOKKOS_INLINE_FUNCTION - UniqueToken & operator=( UniqueToken && rhs ) { + UniqueToken& operator=(UniqueToken&& rhs) { m_buffer = std::move(rhs.m_buffer); - m_count = std::move(rhs.m_count); + m_count = std::move(rhs.m_count); return *this; } #else KOKKOS_INLINE_FUNCTION - UniqueToken( const UniqueToken & ) = default; + UniqueToken(const UniqueToken&) = default; KOKKOS_INLINE_FUNCTION - UniqueToken( UniqueToken && ) = default; + UniqueToken(UniqueToken&&) = default; KOKKOS_INLINE_FUNCTION - UniqueToken & operator=( const UniqueToken & ) = default ; + UniqueToken& operator=(const UniqueToken&) = default; KOKKOS_INLINE_FUNCTION - UniqueToken & operator=( UniqueToken && ) = default ; + UniqueToken& operator=(UniqueToken&&) = default; #endif /// \brief upper bound for acquired values, i.e. 0 <= value < size() KOKKOS_INLINE_FUNCTION - size_type size() const noexcept { return m_count ; } + size_type size() const noexcept { return m_count; } /// \brief acquire value such that 0 <= value < size() KOKKOS_INLINE_FUNCTION - size_type acquire() const - { - const Kokkos::pair result = - Kokkos::Impl::concurrent_bitset:: - acquire_bounded( m_buffer - , m_count - , Kokkos::Impl::clock_tic() % m_count - ); + size_type acquire() const { + const Kokkos::pair result = + Kokkos::Impl::concurrent_bitset::acquire_bounded( + m_buffer, m_count, Kokkos::Impl::clock_tic() % m_count); - if ( result.first < 0 ) { - Kokkos::abort("UniqueToken failure to release tokens, no tokens available" ); + if (result.first < 0) { + Kokkos::abort( + "UniqueToken failure to release tokens, no tokens available"); } return result.first; @@ -145,31 +133,26 @@ public: /// \brief release an acquired value KOKKOS_INLINE_FUNCTION - void release( size_type i ) const noexcept - { - Kokkos::Impl::concurrent_bitset::release( m_buffer, i ); + void release(size_type i) const noexcept { + Kokkos::Impl::concurrent_bitset::release(m_buffer, i); } }; -template<> -class UniqueToken< Cuda, UniqueTokenScope::Instance > - : public UniqueToken< Cuda, UniqueTokenScope::Global > -{ -public: - +template <> +class UniqueToken + : public UniqueToken { + public: #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - explicit - UniqueToken( execution_space const& arg ) - : UniqueToken< Cuda, UniqueTokenScope::Global >( arg ) {} + explicit UniqueToken(execution_space const& arg) + : UniqueToken(arg) {} #else - explicit - UniqueToken( execution_space const& arg = execution_space() ) - : UniqueToken< Cuda, UniqueTokenScope::Global >( arg ) {} + explicit UniqueToken(execution_space const& arg = execution_space()) + : UniqueToken(arg) {} #endif }; -}} // namespace Kokkos::Experimental - -#endif // KOKKOS_ENABLE_CUDA -#endif // KOKKOS_CUDA_UNIQUE_TOKEN_HPP +} // namespace Experimental +} // namespace Kokkos +#endif // KOKKOS_ENABLE_CUDA +#endif // KOKKOS_CUDA_UNIQUE_TOKEN_HPP diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Vectorization.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Vectorization.hpp index fc369191bd..085262b804 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Vectorization.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Vectorization.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,342 +49,163 @@ #include #include + namespace Kokkos { - -// Shuffle only makes sense on >= Kepler GPUs; it doesn't work on CPUs -// or other GPUs. We provide a generic definition (which is trivial -// and doesn't do what it claims to do) because we don't actually use -// this function unless we are on a suitable GPU, with a suitable -// Scalar type. (For example, in the mat-vec, the "ThreadsPerRow" -// internal parameter depends both on the ExecutionSpace and the Scalar type, -// and it controls whether shfl_down() gets called.) namespace Impl { - template< typename Scalar > - struct shfl_union { - enum {n = sizeof(Scalar)/4}; - float fval[n]; - KOKKOS_INLINE_FUNCTION - Scalar value() { - return *(Scalar*) fval; - } - KOKKOS_INLINE_FUNCTION - void operator= (Scalar& value_) { - float* const val_ptr = (float*) &value_; - for(int i=0; i +struct in_place_shfl_op { + // CRTP boilerplate + __device__ KOKKOS_IMPL_FORCEINLINE const Derived& self() const noexcept { + return *static_cast(this); + } + + // sizeof(Scalar) == sizeof(int) case + template + // requires _assignable_from_bits + __device__ inline typename std::enable_if::type + operator()(Scalar& out, Scalar const& in, int lane_or_delta, int width, + unsigned mask = shfl_all_mask) const noexcept { + //------------------------------------------------ + reinterpret_cast(out) = self().do_shfl_op( + mask, reinterpret_cast(in), lane_or_delta, width); + //------------------------------------------------ + } + +// TODO: figure out why 64-bit shfl fails in Clang +#if (CUDA_VERSION >= 9000) && (!defined(KOKKOS_COMPILER_CLANG)) + // sizeof(Scalar) == sizeof(double) case + // requires _assignable_from_bits + template + __device__ inline + typename std::enable_if::type + operator()(Scalar& out, Scalar const& in, int lane_or_delta, int width, + unsigned mask = shfl_all_mask) const noexcept { + //------------------------------------------------ + reinterpret_cast(out) = self().do_shfl_op( + mask, *reinterpret_cast(&in), lane_or_delta, width); + //------------------------------------------------ + } +#else + // sizeof(Scalar) == sizeof(double) case + // requires _assignable_from_bits + template + __device__ inline + typename std::enable_if::type + operator()(Scalar& out, const Scalar& val, int lane_or_delta, int width, + unsigned mask = shfl_all_mask) const noexcept { + //------------------------------------------------ + int lo = __double2loint(*reinterpret_cast(&val)); + int hi = __double2hiint(*reinterpret_cast(&val)); + lo = self().do_shfl_op(mask, lo, lane_or_delta, width); + hi = self().do_shfl_op(mask, hi, lane_or_delta, width); + auto tmp = __hiloint2double(hi, lo); + out = reinterpret_cast(tmp); + //------------------------------------------------ + } +#endif + + // sizeof(Scalar) > sizeof(double) case + template + __device__ inline + typename std::enable_if<(sizeof(Scalar) > sizeof(double))>::type + operator()(Scalar& out, const Scalar& val, int lane_or_delta, int width, + unsigned mask = shfl_all_mask) const noexcept { + // TODO DSH shouldn't this be KOKKOS_IMPL_CUDA_MAX_SHFL_SIZEOF instead of + // sizeof(int)? (Need benchmarks to decide which is faster) + using shuffle_as_t = int; + enum : int { N = sizeof(Scalar) / sizeof(shuffle_as_t) }; + + for (int i = 0; i < N; ++i) { + reinterpret_cast(&out)[i] = self().do_shfl_op( + mask, reinterpret_cast(&val)[i], lane_or_delta, + width); + } + } +}; + +struct in_place_shfl_fn : in_place_shfl_op { + template + __device__ KOKKOS_IMPL_FORCEINLINE T do_shfl_op(unsigned mask, T& val, + int lane, int width) const + noexcept { + return KOKKOS_IMPL_CUDA_SHFL_MASK(mask, val, lane, width); + } +}; +template +__device__ KOKKOS_IMPL_FORCEINLINE void in_place_shfl(Args&&... args) noexcept { + in_place_shfl_fn{}((Args &&) args...); } -#ifdef __CUDA_ARCH__ -#if (__CUDA_ARCH__ >= 300) +struct in_place_shfl_up_fn : in_place_shfl_op { + template + __device__ KOKKOS_IMPL_FORCEINLINE T do_shfl_op(unsigned mask, T& val, + int lane, int width) const + noexcept { + return KOKKOS_IMPL_CUDA_SHFL_UP_MASK(mask, val, lane, width); + } +}; +template +__device__ KOKKOS_IMPL_FORCEINLINE void in_place_shfl_up( + Args&&... args) noexcept { + in_place_shfl_up_fn{}((Args &&) args...); +} - KOKKOS_INLINE_FUNCTION - int shfl(const int &val, const int& srcLane, const int& width ) { - return KOKKOS_IMPL_CUDA_SHFL(val,srcLane,width); - } +struct in_place_shfl_down_fn : in_place_shfl_op { + template + __device__ KOKKOS_IMPL_FORCEINLINE T do_shfl_op(unsigned mask, T& val, + int lane, int width) const + noexcept { + return KOKKOS_IMPL_CUDA_SHFL_DOWN_MASK(mask, val, lane, width); + } +}; +template +__device__ KOKKOS_IMPL_FORCEINLINE void in_place_shfl_down( + Args&&... args) noexcept { + in_place_shfl_down_fn{}((Args &&) args...); +} - KOKKOS_INLINE_FUNCTION - float shfl(const float &val, const int& srcLane, const int& width ) { - return KOKKOS_IMPL_CUDA_SHFL(val,srcLane,width); - } +} // namespace Impl -// TODO: figure out why 64-bit shfl fails with Clang -#if ( CUDA_VERSION >= 9000 ) && (!defined(KOKKOS_COMPILER_CLANG)) +template +// requires default_constructible && _assignable_from_bits +__device__ inline T shfl(const T& val, const int& srcLane, const int& width, + unsigned mask = Impl::shfl_all_mask) { + T rv = {}; + Impl::in_place_shfl(rv, val, srcLane, width, mask); + return rv; +} - KOKKOS_INLINE_FUNCTION - long shfl(const long &val, const int& srcLane, const int& width ) { - return KOKKOS_IMPL_CUDA_SHFL(val,srcLane,width); - } +template +// requires default_constructible && _assignable_from_bits +__device__ inline T shfl_down(const T& val, int delta, int width, + unsigned mask = Impl::shfl_all_mask) { + T rv = {}; + Impl::in_place_shfl_down(rv, val, delta, width, mask); + return rv; +} - KOKKOS_INLINE_FUNCTION - long long shfl(const long long &val, const int& srcLane, const int& width ) { - return KOKKOS_IMPL_CUDA_SHFL(val,srcLane,width); - } +template +// requires default_constructible && _assignable_from_bits +__device__ inline T shfl_up(const T& val, int delta, int width, + unsigned mask = Impl::shfl_all_mask) { + T rv = {}; + Impl::in_place_shfl_up(rv, val, delta, width, mask); + return rv; +} - KOKKOS_INLINE_FUNCTION - double shfl(const double &val, const int& srcLane, const int& width ) { - return KOKKOS_IMPL_CUDA_SHFL(val,srcLane,width); - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl(const Scalar &val, const int& srcLane, const typename Impl::enable_if< (sizeof(Scalar) == 8) , int >::type& width - ) { - Scalar tmp1 = val; - double tmp = *reinterpret_cast(&tmp1); - tmp = KOKKOS_IMPL_CUDA_SHFL(tmp,srcLane,width); - return *reinterpret_cast(&tmp); - } - -#else // ( CUDA_VERSION < 9000 ) - - KOKKOS_INLINE_FUNCTION - double shfl(const double &val, const int& srcLane, const int& width) { - int lo = __double2loint(val); - int hi = __double2hiint(val); - lo = KOKKOS_IMPL_CUDA_SHFL(lo,srcLane,width); - hi = KOKKOS_IMPL_CUDA_SHFL(hi,srcLane,width); - return __hiloint2double(hi,lo); - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl(const Scalar &val, const int& srcLane, const typename Impl::enable_if< (sizeof(Scalar) == 8) ,int>::type& width) { - int lo = __double2loint(*reinterpret_cast(&val)); - int hi = __double2hiint(*reinterpret_cast(&val)); - lo = KOKKOS_IMPL_CUDA_SHFL(lo,srcLane,width); - hi = KOKKOS_IMPL_CUDA_SHFL(hi,srcLane,width); - const double tmp = __hiloint2double(hi,lo); - return *(reinterpret_cast(&tmp)); - } - -#endif // ( CUDA_VERSION < 9000 ) - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl(const Scalar &val, const int& srcLane, const typename Impl::enable_if< (sizeof(Scalar) == 4) , int >::type& width - ) { - Scalar tmp1 = val; - float tmp = *reinterpret_cast(&tmp1); - tmp = KOKKOS_IMPL_CUDA_SHFL(tmp,srcLane,width); - return *reinterpret_cast(&tmp); - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl(const Scalar &val, const int& srcLane, const typename Impl::enable_if< (sizeof(Scalar) > 8) ,int>::type& width) { - Impl::shfl_union s_val; - Impl::shfl_union r_val; - s_val = val; - - for(int i = 0; i= 9000 ) && (!defined(KOKKOS_COMPILER_CLANG)) - - KOKKOS_INLINE_FUNCTION - long shfl_down(const long &val, const int& delta, const int& width) { - return KOKKOS_IMPL_CUDA_SHFL_DOWN(val,delta,width); - } - - KOKKOS_INLINE_FUNCTION - long long shfl_down(const long long &val, const int& delta, const int& width) { - return KOKKOS_IMPL_CUDA_SHFL_DOWN(val,delta,width); - } - - KOKKOS_INLINE_FUNCTION - double shfl_down(const double &val, const int& delta, const int& width) { - return KOKKOS_IMPL_CUDA_SHFL_DOWN(val,delta,width); - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl_down(const Scalar &val, const int& delta, const typename Impl::enable_if< (sizeof(Scalar) == 8) , int >::type & width) { - Scalar tmp1 = val; - double tmp = *reinterpret_cast(&tmp1); - tmp = KOKKOS_IMPL_CUDA_SHFL_DOWN(tmp,delta,width); - return *reinterpret_cast(&tmp); - } - -#else // ( CUDA_VERSION < 9000 ) - - KOKKOS_INLINE_FUNCTION - double shfl_down(const double &val, const int& delta, const int& width) { - int lo = __double2loint(val); - int hi = __double2hiint(val); - lo = KOKKOS_IMPL_CUDA_SHFL_DOWN(lo,delta,width); - hi = KOKKOS_IMPL_CUDA_SHFL_DOWN(hi,delta,width); - return __hiloint2double(hi,lo); - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl_down(const Scalar &val, const int& delta, const typename Impl::enable_if< (sizeof(Scalar) == 8) , int >::type & width) { - int lo = __double2loint(*reinterpret_cast(&val)); - int hi = __double2hiint(*reinterpret_cast(&val)); - lo = KOKKOS_IMPL_CUDA_SHFL_DOWN(lo,delta,width); - hi = KOKKOS_IMPL_CUDA_SHFL_DOWN(hi,delta,width); - const double tmp = __hiloint2double(hi,lo); - return *(reinterpret_cast(&tmp)); - } - -#endif // ( CUDA_VERSION < 9000 ) - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl_down(const Scalar &val, const int& delta, const typename Impl::enable_if< (sizeof(Scalar) == 4) , int >::type & width) { - Scalar tmp1 = val; - float tmp = *reinterpret_cast(&tmp1); - tmp = KOKKOS_IMPL_CUDA_SHFL_DOWN(tmp,delta,width); - return *reinterpret_cast(&tmp); - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl_down(const Scalar &val, const int& delta, const typename Impl::enable_if< (sizeof(Scalar) > 8) , int >::type & width) { - Impl::shfl_union s_val; - Impl::shfl_union r_val; - s_val = val; - - for(int i = 0; i= 9000 ) && (!defined(KOKKOS_COMPILER_CLANG)) - - KOKKOS_INLINE_FUNCTION - long shfl_up(const long &val, const int& delta, const int& width ) { - return KOKKOS_IMPL_CUDA_SHFL_UP(val,delta,width); - } - - KOKKOS_INLINE_FUNCTION - long long shfl_up(const long long &val, const int& delta, const int& width ) { - return KOKKOS_IMPL_CUDA_SHFL_UP(val,delta,width); - } - - KOKKOS_INLINE_FUNCTION - double shfl_up(const double &val, const int& delta, const int& width ) { - return KOKKOS_IMPL_CUDA_SHFL_UP(val,delta,width); - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl_up(const Scalar &val, const int& delta, const typename Impl::enable_if< (sizeof(Scalar) == 8) , int >::type & width) { - Scalar tmp1 = val; - double tmp = *reinterpret_cast(&tmp1); - tmp = KOKKOS_IMPL_CUDA_SHFL_UP(tmp,delta,width); - return *reinterpret_cast(&tmp); - } - -#else // ( CUDA_VERSION < 9000 ) - - KOKKOS_INLINE_FUNCTION - double shfl_up(const double &val, const int& delta, const int& width ) { - int lo = __double2loint(val); - int hi = __double2hiint(val); - lo = KOKKOS_IMPL_CUDA_SHFL_UP(lo,delta,width); - hi = KOKKOS_IMPL_CUDA_SHFL_UP(hi,delta,width); - return __hiloint2double(hi,lo); - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl_up(const Scalar &val, const int& delta, const typename Impl::enable_if< (sizeof(Scalar) == 8) , int >::type & width) { - int lo = __double2loint(*reinterpret_cast(&val)); - int hi = __double2hiint(*reinterpret_cast(&val)); - lo = KOKKOS_IMPL_CUDA_SHFL_UP(lo,delta,width); - hi = KOKKOS_IMPL_CUDA_SHFL_UP(hi,delta,width); - const double tmp = __hiloint2double(hi,lo); - return *(reinterpret_cast(&tmp)); - } - -#endif // ( CUDA_VERSION < 9000 ) - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl_up(const Scalar &val, const int& delta, const typename Impl::enable_if< (sizeof(Scalar) == 4) , int >::type & width) { - Scalar tmp1 = val; - float tmp = *reinterpret_cast(&tmp1); - tmp = KOKKOS_IMPL_CUDA_SHFL_UP(tmp,delta,width); - return *reinterpret_cast(&tmp); - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl_up(const Scalar &val, const int& delta, const typename Impl::enable_if< (sizeof(Scalar) > 8) , int >::type & width) { - Impl::shfl_union s_val; - Impl::shfl_union r_val; - s_val = val; - - for(int i = 0; i - KOKKOS_INLINE_FUNCTION - Scalar shfl(const Scalar &val, const int& srcLane, const int& width) { - if(width > 1) Kokkos::abort("Error: calling shfl from a device with CC<3.0."); - return val; - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl_down(const Scalar &val, const int& delta, const int& width) { - if(width > 1) Kokkos::abort("Error: calling shfl_down from a device with CC<3.0."); - return val; - } - - template - KOKKOS_INLINE_FUNCTION - Scalar shfl_up(const Scalar &val, const int& delta, const int& width) { - if(width > 1) Kokkos::abort("Error: calling shfl_down from a device with CC<3.0."); - return val; - } -#endif // (__CUDA_ARCH__ < 300) -#else // !defined( __CUDA_ARCH__ ) - template - inline - Scalar shfl(const Scalar &val, const int& srcLane, const int& width) { - if(width > 1) Kokkos::abort("Error: calling shfl outside __CUDA_ARCH__."); - return val; - } - - template - inline - Scalar shfl_down(const Scalar &val, const int& delta, const int& width) { - if(width > 1) Kokkos::abort("Error: calling shfl_down outside __CUDA_ARCH__."); - return val; - } - - template - inline - Scalar shfl_up(const Scalar &val, const int& delta, const int& width) { - if(width > 1) Kokkos::abort("Error: calling shfl_down outside __CUDA_ARCH__."); - return val; - } -#endif // !defined( __CUDA_ARCH__ ) - -} // end namespace Kokkos - -#endif // defined( KOKKOS_ENABLE_CUDA ) -#endif // !defined( KOKKOS_CUDA_VECTORIZATION_HPP ) +} // end namespace Kokkos +#endif // defined( KOKKOS_ENABLE_CUDA ) +#endif // !defined( KOKKOS_CUDA_VECTORIZATION_HPP ) diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Version_9_8_Compatibility.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Version_9_8_Compatibility.hpp index 8aa8b8f459..66231e55f9 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Version_9_8_Compatibility.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Version_9_8_Compatibility.hpp @@ -1,86 +1,77 @@ -#include +#include -#if defined( __CUDA_ARCH__ ) -#if ( CUDA_VERSION < 9000 ) +#if defined(__CUDA_ARCH__) +#if (CUDA_VERSION < 9000) #define KOKKOS_IMPL_CUDA_ACTIVEMASK 0 #define KOKKOS_IMPL_CUDA_SYNCWARP __threadfence_block() -#define KOKKOS_IMPL_CUDA_SYNCWARP_MASK(m) if(m)__threadfence_block() +#define KOKKOS_IMPL_CUDA_SYNCWARP_MASK(m) \ + if (m) __threadfence_block() #define KOKKOS_IMPL_CUDA_BALLOT(x) __ballot(x) -#define KOKKOS_IMPL_CUDA_BALLOT_MASK(m,x) __ballot(x) -#define KOKKOS_IMPL_CUDA_SHFL(x,y,z) __shfl(x,y,z) -#define KOKKOS_IMPL_CUDA_SHFL_MASK(m,x,y,z) __shfl(x,y,z) -#define KOKKOS_IMPL_CUDA_SHFL_UP(x,y,z) __shfl_up(x,y,z) -#define KOKKOS_IMPL_CUDA_SHFL_UP_MASK(m,x,y,z) __shfl_up(x,y,z) -#define KOKKOS_IMPL_CUDA_SHFL_DOWN(x,y,z) __shfl_down(x,y,z) -#define KOKKOS_IMPL_CUDA_SHFL_DOWN_MASK(m,x,y,z) __shfl_down(x,y,z) +#define KOKKOS_IMPL_CUDA_BALLOT_MASK(m, x) __ballot(x) +#define KOKKOS_IMPL_CUDA_SHFL(x, y, z) __shfl(x, y, z) +#define KOKKOS_IMPL_CUDA_SHFL_MASK(m, x, y, z) __shfl(x, y, z) +#define KOKKOS_IMPL_CUDA_SHFL_UP(x, y, z) __shfl_up(x, y, z) +#define KOKKOS_IMPL_CUDA_SHFL_UP_MASK(m, x, y, z) __shfl_up(x, y, z) +#define KOKKOS_IMPL_CUDA_SHFL_DOWN(x, y, z) __shfl_down(x, y, z) +#define KOKKOS_IMPL_CUDA_SHFL_DOWN_MASK(m, x, y, z) __shfl_down(x, y, z) #else #define KOKKOS_IMPL_CUDA_ACTIVEMASK __activemask() #define KOKKOS_IMPL_CUDA_SYNCWARP __syncwarp(0xffffffff) #define KOKKOS_IMPL_CUDA_SYNCWARP_MASK(m) __syncwarp(m) -#define KOKKOS_IMPL_CUDA_BALLOT(x) __ballot_sync(__activemask(),x) -#define KOKKOS_IMPL_CUDA_BALLOT_MASK(m,x) __ballot_sync(m,x) -#define KOKKOS_IMPL_CUDA_SHFL(x,y,z) __shfl_sync(0xffffffff,x,y,z) -#define KOKKOS_IMPL_CUDA_SHFL_MASK(m,x,y,z) __shfl_sync(m,x,y,z) -#define KOKKOS_IMPL_CUDA_SHFL_UP(x,y,z) __shfl_up_sync(0xffffffff,x,y,z) -#define KOKKOS_IMPL_CUDA_SHFL_UP_MASK(m,x,y,z) __shfl_up_sync(m,x,y,z) -#define KOKKOS_IMPL_CUDA_SHFL_DOWN(x,y,z) __shfl_down_sync(0xffffffff,x,y,z) -#define KOKKOS_IMPL_CUDA_SHFL_DOWN_MASK(m,x,y,z) __shfl_down_sync(m,x,y,z) -#endif +#define KOKKOS_IMPL_CUDA_BALLOT(x) __ballot_sync(__activemask(), x) +#define KOKKOS_IMPL_CUDA_BALLOT_MASK(m, x) __ballot_sync(m, x) +#define KOKKOS_IMPL_CUDA_SHFL(x, y, z) __shfl_sync(0xffffffff, x, y, z) +#define KOKKOS_IMPL_CUDA_SHFL_MASK(m, x, y, z) __shfl_sync(m, x, y, z) +#define KOKKOS_IMPL_CUDA_SHFL_UP(x, y, z) __shfl_up_sync(0xffffffff, x, y, z) +#define KOKKOS_IMPL_CUDA_SHFL_UP_MASK(m, x, y, z) __shfl_up_sync(m, x, y, z) +#define KOKKOS_IMPL_CUDA_SHFL_DOWN(x, y, z) \ + __shfl_down_sync(0xffffffff, x, y, z) +#define KOKKOS_IMPL_CUDA_SHFL_DOWN_MASK(m, x, y, z) __shfl_down_sync(m, x, y, z) +#endif #else #define KOKKOS_IMPL_CUDA_ACTIVEMASK 0 -#define KOKKOS_IMPL_CUDA_SYNCWARP +#define KOKKOS_IMPL_CUDA_SYNCWARP #define KOKKOS_IMPL_CUDA_SYNCWARP_MASK(m) (void)m #define KOKKOS_IMPL_CUDA_BALLOT(x) 0 -#define KOKKOS_IMPL_CUDA_BALLOT_MASK(m,x) 0 -#define KOKKOS_IMPL_CUDA_SHFL(x,y,z) 0 -#define KOKKOS_IMPL_CUDA_SHFL_MASK(m,x,y,z) 0 -#define KOKKOS_IMPL_CUDA_SHFL_UP(x,y,z) 0 -#define KOKKOS_IMPL_CUDA_SHFL_DOWN(x,y,z) 0 -#define KOKKOS_IMPL_CUDA_SHFL_DOWN_MASK(m,x,y,z) 0 -#endif +#define KOKKOS_IMPL_CUDA_BALLOT_MASK(m, x) 0 +#define KOKKOS_IMPL_CUDA_SHFL(x, y, z) 0 +#define KOKKOS_IMPL_CUDA_SHFL_MASK(m, x, y, z) 0 +#define KOKKOS_IMPL_CUDA_SHFL_UP(x, y, z) 0 +#define KOKKOS_IMPL_CUDA_SHFL_DOWN(x, y, z) 0 +#define KOKKOS_IMPL_CUDA_SHFL_DOWN_MASK(m, x, y, z) 0 +#endif -#if ( CUDA_VERSION >= 9000 ) && (!defined(KOKKOS_COMPILER_CLANG)) +#if (CUDA_VERSION >= 9000) && (!defined(KOKKOS_COMPILER_CLANG)) #define KOKKOS_IMPL_CUDA_MAX_SHFL_SIZEOF sizeof(long long) #else #define KOKKOS_IMPL_CUDA_MAX_SHFL_SIZEOF sizeof(int) #endif -#if defined( __CUDA_ARCH__ ) -#if ( CUDA_VERSION < 9000 ) -#define KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( MSG ) { \ - const unsigned b = __ballot(1); \ - if ( b != 0xffffffff ) { \ - printf(" SYNCWARP AT %s (%d,%d,%d) (%d,%d,%d) failed %x\n" \ - , MSG \ - , blockIdx.x \ - , blockIdx.y \ - , blockIdx.z \ - , threadIdx.x \ - , threadIdx.y \ - , threadIdx.z \ - , b ); \ - return ; \ - } \ -} +#if defined(__CUDA_ARCH__) +#if (CUDA_VERSION < 9000) +#define KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN(MSG) \ + { \ + const unsigned b = __ballot(1); \ + if (b != 0xffffffff) { \ + printf(" SYNCWARP AT %s (%d,%d,%d) (%d,%d,%d) failed %x\n", MSG, \ + blockIdx.x, blockIdx.y, blockIdx.z, threadIdx.x, threadIdx.y, \ + threadIdx.z, b); \ + return; \ + } \ + } #else -#define KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( MSG ) { \ - __syncwarp(); \ - const unsigned b = __activemask(); \ - if ( b != 0xffffffff ) { \ - printf(" SYNCWARP AT %s (%d,%d,%d) (%d,%d,%d) failed %x\n" \ - , MSG \ - , blockIdx.x \ - , blockIdx.y \ - , blockIdx.z \ - , threadIdx.x \ - , threadIdx.y \ - , threadIdx.z \ - , b ); \ - return ; \ - } \ -} -#endif +#define KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN(MSG) \ + { \ + __syncwarp(); \ + const unsigned b = __activemask(); \ + if (b != 0xffffffff) { \ + printf(" SYNCWARP AT %s (%d,%d,%d) (%d,%d,%d) failed %x\n", MSG, \ + blockIdx.x, blockIdx.y, blockIdx.z, threadIdx.x, threadIdx.y, \ + threadIdx.z, b); \ + return; \ + } \ + } +#endif #else -#define KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( MSG ) -#endif - +#define KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN(MSG) +#endif diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp index 2fe9d8ccf7..08fdbea387 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_EXPERIMENTAL_CUDA_VIEW_HPP #include -#if defined( KOKKOS_ENABLE_CUDA ) +#if defined(KOKKOS_ENABLE_CUDA) //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -53,117 +54,101 @@ namespace Kokkos { namespace Impl { -// Cuda Texture fetches can be performed for 4, 8 and 16 byte objects (int,int2,int4) -// Via reinterpret_case this can be used to support all scalar types of those sizes. -// Any other scalar type falls back to either normal reads out of global memory, -// or using the __ldg intrinsic on Kepler GPUs or newer (Compute Capability >= 3.0) +// Cuda Texture fetches can be performed for 4, 8 and 16 byte objects +// (int,int2,int4) Via reinterpret_case this can be used to support all scalar +// types of those sizes. Any other scalar type falls back to either normal reads +// out of global memory, or using the __ldg intrinsic on Kepler GPUs or newer +// (Compute Capability >= 3.0) -template< typename ValueType , typename AliasType > +template struct CudaTextureFetch { - - ::cudaTextureObject_t m_obj ; - const ValueType * m_ptr ; - int m_offset ; + ::cudaTextureObject_t m_obj; + const ValueType* m_ptr; + int m_offset; // Deference operator pulls through texture object and returns by value - template< typename iType > - KOKKOS_INLINE_FUNCTION - ValueType operator[]( const iType & i ) const - { -#if defined( __CUDA_ARCH__ ) && ( 300 <= __CUDA_ARCH__ ) - AliasType v = tex1Dfetch( m_obj , i + m_offset ); - return *(reinterpret_cast (&v)); + template + KOKKOS_INLINE_FUNCTION ValueType operator[](const iType& i) const { +#if defined(__CUDA_ARCH__) && (300 <= __CUDA_ARCH__) + AliasType v = tex1Dfetch(m_obj, i + m_offset); + return *(reinterpret_cast(&v)); #else - return m_ptr[ i ]; + return m_ptr[i]; #endif - } + } // Pointer to referenced memory KOKKOS_INLINE_FUNCTION - operator const ValueType * () const { return m_ptr ; } - + operator const ValueType*() const { return m_ptr; } KOKKOS_INLINE_FUNCTION - CudaTextureFetch() : m_obj() , m_ptr() , m_offset() {} + CudaTextureFetch() : m_obj(), m_ptr(), m_offset() {} KOKKOS_INLINE_FUNCTION ~CudaTextureFetch() {} KOKKOS_INLINE_FUNCTION - CudaTextureFetch( const CudaTextureFetch & rhs ) - : m_obj( rhs.m_obj ) - , m_ptr( rhs.m_ptr ) - , m_offset( rhs.m_offset ) - {} + CudaTextureFetch(const CudaTextureFetch& rhs) + : m_obj(rhs.m_obj), m_ptr(rhs.m_ptr), m_offset(rhs.m_offset) {} KOKKOS_INLINE_FUNCTION - CudaTextureFetch( CudaTextureFetch && rhs ) - : m_obj( rhs.m_obj ) - , m_ptr( rhs.m_ptr ) - , m_offset( rhs.m_offset ) - {} + CudaTextureFetch(CudaTextureFetch&& rhs) + : m_obj(rhs.m_obj), m_ptr(rhs.m_ptr), m_offset(rhs.m_offset) {} KOKKOS_INLINE_FUNCTION - CudaTextureFetch & operator = ( const CudaTextureFetch & rhs ) - { - m_obj = rhs.m_obj ; - m_ptr = rhs.m_ptr ; - m_offset = rhs.m_offset ; - return *this ; - } + CudaTextureFetch& operator=(const CudaTextureFetch& rhs) { + m_obj = rhs.m_obj; + m_ptr = rhs.m_ptr; + m_offset = rhs.m_offset; + return *this; + } KOKKOS_INLINE_FUNCTION - CudaTextureFetch & operator = ( CudaTextureFetch && rhs ) - { - m_obj = rhs.m_obj ; - m_ptr = rhs.m_ptr ; - m_offset = rhs.m_offset ; - return *this ; - } + CudaTextureFetch& operator=(CudaTextureFetch&& rhs) { + m_obj = rhs.m_obj; + m_ptr = rhs.m_ptr; + m_offset = rhs.m_offset; + return *this; + } // Texture object spans the entire allocation. // This handle may view a subset of the allocation, so an offset is required. - template< class CudaMemorySpace > - inline explicit - CudaTextureFetch( const ValueType * const arg_ptr - , Kokkos::Impl::SharedAllocationRecord< CudaMemorySpace , void > * record - ) - : m_obj( record->template attach_texture_object< AliasType >() ) - , m_ptr( arg_ptr ) - , m_offset( record->attach_texture_object_offset( reinterpret_cast( arg_ptr ) ) ) - {} + template + inline explicit CudaTextureFetch( + const ValueType* const arg_ptr, + Kokkos::Impl::SharedAllocationRecord* record) + : m_obj(record->template attach_texture_object()), + m_ptr(arg_ptr), + m_offset(record->attach_texture_object_offset( + reinterpret_cast(arg_ptr))) {} // Texture object spans the entire allocation. // This handle may view a subset of the allocation, so an offset is required. KOKKOS_INLINE_FUNCTION - CudaTextureFetch( const CudaTextureFetch & rhs , size_t offset ) - : m_obj( rhs.m_obj ) - , m_ptr( rhs.m_ptr + offset) - , m_offset( offset + rhs.m_offset ) - {} + CudaTextureFetch(const CudaTextureFetch& rhs, size_t offset) + : m_obj(rhs.m_obj), + m_ptr(rhs.m_ptr + offset), + m_offset(offset + rhs.m_offset) {} }; -#if defined( KOKKOS_ENABLE_CUDA_LDG_INTRINSIC ) +#if defined(KOKKOS_ENABLE_CUDA_LDG_INTRINSIC) -template< typename ValueType , typename AliasType > +template struct CudaLDGFetch { + const ValueType* m_ptr; - const ValueType * m_ptr ; - - template< typename iType > - KOKKOS_INLINE_FUNCTION - ValueType operator[]( const iType & i ) const - { - #ifdef __CUDA_ARCH__ - AliasType v = __ldg(reinterpret_cast(&m_ptr[i])); - return *(reinterpret_cast (&v)); - #else - return m_ptr[i]; - #endif - } + template + KOKKOS_INLINE_FUNCTION ValueType operator[](const iType& i) const { +#ifdef __CUDA_ARCH__ + AliasType v = __ldg(reinterpret_cast(&m_ptr[i])); + return *(reinterpret_cast(&v)); +#else + return m_ptr[i]; +#endif + } KOKKOS_INLINE_FUNCTION - operator const ValueType * () const { return m_ptr ; } + operator const ValueType*() const { return m_ptr; } KOKKOS_INLINE_FUNCTION CudaLDGFetch() : m_ptr() {} @@ -172,48 +157,38 @@ struct CudaLDGFetch { ~CudaLDGFetch() {} KOKKOS_INLINE_FUNCTION - CudaLDGFetch( const CudaLDGFetch & rhs ) - : m_ptr( rhs.m_ptr ) - {} + CudaLDGFetch(const CudaLDGFetch& rhs) : m_ptr(rhs.m_ptr) {} KOKKOS_INLINE_FUNCTION - CudaLDGFetch( CudaLDGFetch && rhs ) - : m_ptr( rhs.m_ptr ) - {} + CudaLDGFetch(CudaLDGFetch&& rhs) : m_ptr(rhs.m_ptr) {} KOKKOS_INLINE_FUNCTION - CudaLDGFetch & operator = ( const CudaLDGFetch & rhs ) - { - m_ptr = rhs.m_ptr ; - return *this ; - } + CudaLDGFetch& operator=(const CudaLDGFetch& rhs) { + m_ptr = rhs.m_ptr; + return *this; + } KOKKOS_INLINE_FUNCTION - CudaLDGFetch & operator = ( CudaLDGFetch && rhs ) - { - m_ptr = rhs.m_ptr ; - return *this ; - } + CudaLDGFetch& operator=(CudaLDGFetch&& rhs) { + m_ptr = rhs.m_ptr; + return *this; + } - template< class CudaMemorySpace > - inline explicit - CudaLDGFetch( const ValueType * const arg_ptr - , Kokkos::Impl::SharedAllocationRecord* - ) - : m_ptr( arg_ptr ) - {} + template + inline explicit CudaLDGFetch( + const ValueType* const arg_ptr, + Kokkos::Impl::SharedAllocationRecord*) + : m_ptr(arg_ptr) {} KOKKOS_INLINE_FUNCTION - CudaLDGFetch( CudaLDGFetch const rhs ,size_t offset) - : m_ptr( rhs.m_ptr + offset ) - {} - + CudaLDGFetch(CudaLDGFetch const rhs, size_t offset) + : m_ptr(rhs.m_ptr + offset) {} }; #endif -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -221,98 +196,95 @@ struct CudaLDGFetch { namespace Kokkos { namespace Impl { -/** \brief Replace Default ViewDataHandle with Cuda texture fetch specialization - * if 'const' value type, CudaSpace and random access. +/** \brief Replace Default ViewDataHandle with Cuda texture fetch + * specialization if 'const' value type, CudaSpace and random access. */ -template< class Traits > -class ViewDataHandle< Traits , - typename std::enable_if<( - // Is Cuda memory space - ( std::is_same< typename Traits::memory_space,Kokkos::CudaSpace>::value || - std::is_same< typename Traits::memory_space,Kokkos::CudaUVMSpace>::value ) - && - // Is a trivial const value of 4, 8, or 16 bytes - std::is_trivial::value - && - std::is_same::value - && - ( sizeof(typename Traits::const_value_type) == 4 || - sizeof(typename Traits::const_value_type) == 8 || - sizeof(typename Traits::const_value_type) == 16 ) - && - // Random access trait - ( Traits::memory_traits::is_random_access != 0 ) - )>::type > -{ -public: +template +class ViewDataHandle< + Traits, typename std::enable_if<( + // Is Cuda memory space + (std::is_same::value || + std::is_same::value) && + // Is a trivial const value of 4, 8, or 16 bytes + std::is_trivial::value && + std::is_same::value && + (sizeof(typename Traits::const_value_type) == 4 || + sizeof(typename Traits::const_value_type) == 8 || + sizeof(typename Traits::const_value_type) == 16) && + // Random access trait + (Traits::memory_traits::is_random_access != 0))>::type> { + public: + using track_type = Kokkos::Impl::SharedAllocationTracker; - using track_type = Kokkos::Impl::SharedAllocationTracker ; + using value_type = typename Traits::const_value_type; + using return_type = typename Traits::const_value_type; // NOT a reference - using value_type = typename Traits::const_value_type ; - using return_type = typename Traits::const_value_type ; // NOT a reference + using alias_type = typename std::conditional< + (sizeof(value_type) == 4), int, + typename std::conditional< + (sizeof(value_type) == 8), ::int2, + typename std::conditional<(sizeof(value_type) == 16), ::int4, + void>::type>::type>::type; - using alias_type = typename std::conditional< ( sizeof(value_type) == 4 ) , int , - typename std::conditional< ( sizeof(value_type) == 8 ) , ::int2 , - typename std::conditional< ( sizeof(value_type) == 16 ) , ::int4 , void - >::type - >::type - >::type ; - -#if defined( KOKKOS_ENABLE_CUDA_LDG_INTRINSIC ) - using handle_type = Kokkos::Impl::CudaLDGFetch< value_type , alias_type > ; +#if defined(KOKKOS_ENABLE_CUDA_LDG_INTRINSIC) + using handle_type = Kokkos::Impl::CudaLDGFetch; #else - using handle_type = Kokkos::Impl::CudaTextureFetch< value_type , alias_type > ; + using handle_type = Kokkos::Impl::CudaTextureFetch; #endif KOKKOS_INLINE_FUNCTION - static handle_type const & assign( handle_type const & arg_handle , track_type const & /* arg_tracker */ ) - { - return arg_handle ; - } + static handle_type const& assign(handle_type const& arg_handle, + track_type const& /* arg_tracker */) { + return arg_handle; + } KOKKOS_INLINE_FUNCTION - static handle_type const assign( handle_type const & arg_handle , size_t offset ) - { - return handle_type(arg_handle,offset) ; - } + static handle_type const assign(handle_type const& arg_handle, + size_t offset) { + return handle_type(arg_handle, offset); + } KOKKOS_INLINE_FUNCTION - static handle_type assign( value_type * arg_data_ptr, track_type const & arg_tracker ) - { - if(arg_data_ptr == NULL) return handle_type(); + static handle_type assign(value_type* arg_data_ptr, + track_type const& arg_tracker) { + if (arg_data_ptr == NULL) return handle_type(); -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - // Assignment of texture = non-texture requires creation of a texture object - // which can only occur on the host. In addition, 'get_record' is only valid - // if called in a host execution space +#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST) + // Assignment of texture = non-texture requires creation of a texture object + // which can only occur on the host. In addition, 'get_record' is only + // valid if called in a host execution space + typedef typename Traits::memory_space memory_space; + typedef typename Impl::SharedAllocationRecord record; - typedef typename Traits::memory_space memory_space ; - typedef typename Impl::SharedAllocationRecord record ; + record* const r = arg_tracker.template get_record(); - record * const r = arg_tracker.template get_record< memory_space >(); - -#if ! defined( KOKKOS_ENABLE_CUDA_LDG_INTRINSIC ) - if ( 0 == r ) { - Kokkos::abort("Cuda const random access View using Cuda texture memory requires Kokkos to allocate the View's memory"); - } +#if !defined(KOKKOS_ENABLE_CUDA_LDG_INTRINSIC) + if (0 == r) { + Kokkos::abort( + "Cuda const random access View using Cuda texture memory requires " + "Kokkos to allocate the View's memory"); + } #endif - return handle_type( arg_data_ptr , r ); + return handle_type(arg_data_ptr, r); #else - Kokkos::Impl::cuda_abort("Cannot create Cuda texture object from within a Cuda kernel"); - return handle_type(); + Kokkos::Impl::cuda_abort( + "Cannot create Cuda texture object from within a Cuda kernel"); + return handle_type(); #endif - } + } }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- #endif /* #if defined( KOKKOS_ENABLE_CUDA ) */ #endif /* #ifndef KOKKOS_CUDA_VIEW_HPP */ - diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ViewCopyETIAvail.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ViewCopyETIAvail.hpp index 33615f3f9f..2fbfb67277 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ViewCopyETIAvail.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ViewCopyETIAvail.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,10 +49,9 @@ namespace Kokkos { namespace Impl { #define KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE Kokkos::Cuda -#include +#include #undef KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE -} -} +} // namespace Impl +} // namespace Kokkos #endif - diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ViewCopyETIDecl.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ViewCopyETIDecl.hpp index befff1a865..18e56aa32d 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ViewCopyETIDecl.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ViewCopyETIDecl.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,10 +49,9 @@ namespace Kokkos { namespace Impl { #define KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE Kokkos::Cuda -#include +#include #undef KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE -} -} +} // namespace Impl +} // namespace Kokkos #endif - diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_WorkGraphPolicy.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_WorkGraphPolicy.hpp index 9c0ac470c8..0753e383a1 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_WorkGraphPolicy.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_WorkGraphPolicy.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -47,74 +48,64 @@ namespace Kokkos { namespace Impl { -template< class FunctorType , class ... Traits > -class ParallelFor< FunctorType - , Kokkos::WorkGraphPolicy< Traits ... > - , Kokkos::Cuda - > -{ -public: +template +class ParallelFor, + Kokkos::Cuda> { + public: + typedef Kokkos::WorkGraphPolicy Policy; + typedef ParallelFor Self; - typedef Kokkos::WorkGraphPolicy< Traits ... > Policy ; - typedef ParallelFor Self ; + private: + Policy m_policy; + FunctorType m_functor; -private: - - Policy m_policy ; - FunctorType m_functor ; - - template< class TagType > + template __device__ inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec_one( const std::int32_t w ) const noexcept - { m_functor( w ); } + typename std::enable_if::value>::type + exec_one(const std::int32_t w) const noexcept { + m_functor(w); + } - template< class TagType > + template __device__ inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec_one( const std::int32_t w ) const noexcept - { const TagType t{} ; m_functor( t , w ); } + typename std::enable_if::value>::type + exec_one(const std::int32_t w) const noexcept { + const TagType t{}; + m_functor(t, w); + } -public: + public: + __device__ inline void operator()() const noexcept { + if (0 == (threadIdx.y % 16)) { + // Spin until COMPLETED_TOKEN. + // END_TOKEN indicates no work is currently available. - __device__ inline - void operator()() const noexcept - { - if ( 0 == ( threadIdx.y % 16 ) ) { - - // Spin until COMPLETED_TOKEN. - // END_TOKEN indicates no work is currently available. - - for ( std::int32_t w = Policy::END_TOKEN ; - Policy::COMPLETED_TOKEN != ( w = m_policy.pop_work() ) ; ) { - if ( Policy::END_TOKEN != w ) { - exec_one< typename Policy::work_tag >( w ); - m_policy.completed_work(w); - } + for (std::int32_t w = Policy::END_TOKEN; + Policy::COMPLETED_TOKEN != (w = m_policy.pop_work());) { + if (Policy::END_TOKEN != w) { + exec_one(w); + m_policy.completed_work(w); } } } - - inline - void execute() - { - const int warps_per_block = 4 ; - const dim3 grid( Kokkos::Impl::cuda_internal_multiprocessor_count() , 1 , 1 ); - const dim3 block( 1 , Kokkos::Impl::CudaTraits::WarpSize , warps_per_block ); - const int shared = 0 ; - - Kokkos::Impl::CudaParallelLaunch(*this, grid, block, shared, Cuda().impl_internal_space_instance() , false ); } - inline - ParallelFor( const FunctorType & arg_functor - , const Policy & arg_policy ) - : m_policy( arg_policy ) - , m_functor( arg_functor ) - {} + inline void execute() { + const int warps_per_block = 4; + const dim3 grid(Kokkos::Impl::cuda_internal_multiprocessor_count(), 1, 1); + const dim3 block(1, Kokkos::Impl::CudaTraits::WarpSize, warps_per_block); + const int shared = 0; + + Kokkos::Impl::CudaParallelLaunch( + *this, grid, block, shared, Cuda().impl_internal_space_instance(), + false); + } + + inline ParallelFor(const FunctorType& arg_functor, const Policy& arg_policy) + : m_policy(arg_policy), m_functor(arg_functor) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos #endif /* #define KOKKOS_CUDA_WORKGRAPHPOLICY_HPP */ diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_abort.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_abort.hpp index 9f5415b511..698695dbdb 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_abort.hpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_abort.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -47,7 +48,7 @@ //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- #include -#if defined( __CUDACC__ ) && defined( KOKKOS_ENABLE_CUDA ) +#if defined(__CUDACC__) && defined(KOKKOS_ENABLE_CUDA) #include @@ -55,35 +56,26 @@ extern "C" { /* Cuda runtime function, declared in * Requires capability 2.x or better. */ -extern __device__ void __assertfail( - const void *message, - const void *file, - unsigned int line, - const void *function, - size_t charsize); +extern __device__ void __assertfail(const void *message, const void *file, + unsigned int line, const void *function, + size_t charsize); } namespace Kokkos { namespace Impl { -__device__ inline -void cuda_abort( const char * const message ) -{ +__device__ inline void cuda_abort(const char *const message) { #ifndef __APPLE__ - const char empty[] = "" ; + const char empty[] = ""; - __assertfail( (const void *) message , - (const void *) empty , - (unsigned int) 0 , - (const void *) empty , - sizeof(char) ); + __assertfail((const void *)message, (const void *)empty, (unsigned int)0, + (const void *)empty, sizeof(char)); #endif } -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos #else void KOKKOS_CORE_SRC_CUDA_ABORT_PREVENT_LINK_ERROR() {} #endif /* #if defined(__CUDACC__) && defined( KOKKOS_ENABLE_CUDA ) */ #endif /* #ifndef KOKKOS_CUDA_ABORT_HPP */ - diff --git a/lib/kokkos/core/src/HPX/Kokkos_HPX.cpp b/lib/kokkos/core/src/HPX/Kokkos_HPX.cpp index da9783467c..0c4cca70f8 100644 --- a/lib/kokkos/core/src/HPX/Kokkos_HPX.cpp +++ b/lib/kokkos/core/src/HPX/Kokkos_HPX.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -41,7 +42,6 @@ //@HEADER */ - #include #ifdef KOKKOS_ENABLE_HPX @@ -80,8 +80,8 @@ void HPX::impl_initialize(int thread_count) { "--hpx:attach-debugger=exception", #endif }; - int argc_hpx = 1; - char name[] = "kokkos_hpx"; + int argc_hpx = 1; + char name[] = "kokkos_hpx"; char *argv_hpx[] = {name, nullptr}; hpx::start(nullptr, argc_hpx, argv_hpx, config); @@ -107,8 +107,8 @@ void HPX::impl_initialize() { "--hpx:attach-debugger=exception", #endif }; - int argc_hpx = 1; - char name[] = "kokkos_hpx"; + int argc_hpx = 1; + char name[] = "kokkos_hpx"; char *argv_hpx[] = {name, nullptr}; hpx::start(nullptr, argc_hpx, argv_hpx, config); @@ -138,15 +138,16 @@ void HPX::impl_finalize() { hpx::apply([]() { hpx::finalize(); }); hpx::stop(); } else { - Kokkos::abort("Kokkos::Experimental::HPX::impl_finalize: Kokkos started " - "HPX but something else already stopped HPX\n"); + Kokkos::abort( + "Kokkos::Experimental::HPX::impl_finalize: Kokkos started " + "HPX but something else already stopped HPX\n"); } } } -} // namespace Experimental -} // namespace Kokkos +} // namespace Experimental +} // namespace Kokkos #else void KOKKOS_CORE_SRC_IMPL_HPX_PREVENT_LINK_ERROR() {} -#endif //#ifdef KOKKOS_ENABLE_HPX +#endif //#ifdef KOKKOS_ENABLE_HPX diff --git a/lib/kokkos/core/src/HPX/Kokkos_HPX_ChunkedRoundRobinExecutor.hpp b/lib/kokkos/core/src/HPX/Kokkos_HPX_ChunkedRoundRobinExecutor.hpp new file mode 100644 index 0000000000..b364b4a6eb --- /dev/null +++ b/lib/kokkos/core/src/HPX/Kokkos_HPX_ChunkedRoundRobinExecutor.hpp @@ -0,0 +1,208 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Christian R. Trott (crtrott@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef KOKKOS_HPX_CHUNKEDROUNDROBINEXECUTOR_HPP +#define KOKKOS_HPX_CHUNKEDROUNDROBINEXECUTOR_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace Kokkos { +namespace Impl { + +/////////////////////////////////////////////////////////////////////////// +/// A \a ChunkedRoundRobinExecutor creates groups of parallel execution +/// agents which execute in threads implicitly created by the executor. This +/// executor uses the scheduling hint to spawn threads with the first grouped on +/// the first core, the second group getting the next consecutive threads, etc. +/// For example, if 10 tasks are spawned (num_tasks is set to 10) and num_cores +/// is set to 2 the executor will schedule the tasks in the following order: +/// +/// worker thread | 1 | 2 +/// --------------+---+--- +/// tasks | 1 | 6 +/// | 2 | 7 +/// | 3 | 8 +/// | 4 | 9 +/// | 5 | 10 +/// +/// rather than the typical round robin: +/// +/// worker thread | 1 | 2 +/// --------------+---+--- +/// tasks | 1 | 2 +/// | 3 | 4 +/// | 5 | 6 +/// | 7 | 8 +/// | 9 | 10 +struct ChunkedRoundRobinExecutor { + using execution_category = hpx::parallel::execution::parallel_execution_tag; + + HPX_CONSTEXPR explicit ChunkedRoundRobinExecutor( + std::size_t num_tasks = std::size_t(-1), std::size_t core_offset = 0, + std::size_t num_cores = hpx::get_os_thread_count()) + : num_tasks_(num_tasks), + core_offset_(core_offset), + num_cores_(num_cores), + num_tasks_per_core_(double(num_tasks_) / num_cores_), + num_tasks_spawned_(0) {} + + bool operator==(ChunkedRoundRobinExecutor const &rhs) const noexcept { + return num_cores_ == rhs.num_cores_ && num_tasks_ == rhs.num_tasks_; + } + + bool operator!=(ChunkedRoundRobinExecutor const &rhs) const noexcept { + return !(*this == rhs); + } + + ChunkedRoundRobinExecutor const &context() const noexcept { return *this; } + + template + hpx::future< + typename hpx::util::detail::invoke_deferred_result::type> + async_execute(F &&f, Ts &&... ts) const { + return hpx::detail::async_launch_policy_dispatch::call( + hpx::launch::async_policy{}, std::forward(f), + std::forward(ts)...); + } + + template + void post(F &&f, Ts &&... ts) const { + hpx::util::thread_description const desc( + f, "Kokkos::Impl::ChunkedRoundRobinExecutor::async_execute"); + hpx::threads::thread_schedule_hint const hint( + hpx::threads::thread_schedule_hint_mode_thread, + core_offset_ + std::floor(double(num_tasks_spawned_ % num_tasks_) / + num_tasks_per_core_)); + + hpx::threads::register_thread_nullary( + hpx::util::deferred_call(std::forward(f), std::forward(ts)...), + desc, hpx::threads::pending, false, + hpx::threads::thread_priority_normal, hint, + hpx::threads::thread_stacksize_default); + + ++num_tasks_spawned_; + } + + template + std::vector::type>> + bulk_async_execute(F &&f, Shape const &shape, Ts &&... ts) { + hpx::util::thread_description desc( + f, "Kokkos::Impl::ChunkedRoundRobinExecutor::bulk_sync_execute"); + + hpx::lcos::local::latch l(hpx::util::size(shape)); + // Keep a separate counter for bulk launch + std::size_t num_tasks_spawned = 0; + + for (auto const &s : shape) { + hpx::threads::thread_schedule_hint const hint( + hpx::threads::thread_schedule_hint_mode_thread, + core_offset_ + std::floor(double(num_tasks_spawned % num_tasks_) / + num_tasks_per_core_)); + + hpx::threads::register_thread_nullary( + [&, s]() { + hpx::util::invoke(f, s, ts...); + l.count_down(1); + }, + desc, hpx::threads::pending, false, + hpx::threads::thread_priority_normal, hint, + hpx::threads::thread_stacksize_default); + + ++num_tasks_spawned; + } + + // NOTE: We block here to avoid extra synchronization. Since this executor + // is only used in the HPX backend we get away with this. + l.wait(); + + return {}; + } + + private: + std::size_t num_tasks_; + std::size_t core_offset_; + std::size_t num_cores_; + double num_tasks_per_core_; + mutable std::size_t num_tasks_spawned_; +}; + +} // namespace Impl +} // namespace Kokkos + +namespace hpx { +namespace parallel { +namespace execution { + +template <> +struct is_one_way_executor + : std::true_type {}; + +template <> +struct is_two_way_executor + : std::true_type {}; + +template <> +struct is_bulk_two_way_executor + : std::true_type {}; + +} // namespace execution +} // namespace parallel +} // namespace hpx + +#endif diff --git a/lib/kokkos/core/src/HPX/Kokkos_HPX_Task.cpp b/lib/kokkos/core/src/HPX/Kokkos_HPX_Task.cpp index df7c403685..8d42589bdf 100644 --- a/lib/kokkos/core/src/HPX/Kokkos_HPX_Task.cpp +++ b/lib/kokkos/core/src/HPX/Kokkos_HPX_Task.cpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -57,9 +58,9 @@ namespace Impl { template class TaskQueue; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos #else void KOKKOS_CORE_SRC_IMPL_HPX_TASK_PREVENT_LINK_ERROR() {} -#endif // #if defined( KOKKOS_ENABLE_HPX ) && defined( KOKKOS_ENABLE_TASKDAG ) +#endif // #if defined( KOKKOS_ENABLE_HPX ) && defined( KOKKOS_ENABLE_TASKDAG ) diff --git a/lib/kokkos/core/src/HPX/Kokkos_HPX_Task.hpp b/lib/kokkos/core/src/HPX/Kokkos_HPX_Task.hpp index c3a14efee6..803d955914 100644 --- a/lib/kokkos/core/src/HPX/Kokkos_HPX_Task.hpp +++ b/lib/kokkos/core/src/HPX/Kokkos_HPX_Task.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -49,10 +50,11 @@ #include +#include #include #include -#include +#include #include @@ -65,7 +67,7 @@ namespace Impl { template class TaskQueueSpecialization< SimpleTaskScheduler> { -public: + public: using execution_space = Kokkos::Experimental::HPX; using scheduler_type = SimpleTaskScheduler; @@ -85,7 +87,7 @@ public: // Must provide task queue execution function void execute_task() const { using hpx::apply; - using hpx::lcos::local::counting_semaphore; + using hpx::lcos::local::latch; using task_base_type = typename scheduler_type::task_base_type; const int num_worker_threads = Kokkos::Experimental::HPX::concurrency(); @@ -95,25 +97,28 @@ public: auto &queue = scheduler->queue(); - counting_semaphore sem(0); + latch num_tasks_remaining(num_worker_threads); + ChunkedRoundRobinExecutor exec(num_worker_threads); for (int thread = 0; thread < num_worker_threads; ++thread) { - apply([this, &sem, &queue, &buffer, num_worker_threads, thread]() { + apply(exec, [this, &num_tasks_remaining, &queue, &buffer, + num_worker_threads]() { // NOTE: This implementation has been simplified based on the // assumption that team_size = 1. The HPX backend currently only // supports a team size of 1. std::size_t t = Kokkos::Experimental::HPX::impl_hardware_thread_id(); buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id()); - HPXTeamMember member(TeamPolicyInternal( - Kokkos::Experimental::HPX(), num_worker_threads, 1), - 0, t, buffer.get(t), 512); + HPXTeamMember member( + TeamPolicyInternal( + Kokkos::Experimental::HPX(), num_worker_threads, 1), + 0, t, buffer.get(t), 512); member_type single_exec(*scheduler, member); member_type &team_exec = single_exec; auto &team_scheduler = team_exec.scheduler(); - auto current_task = OptionalRef(nullptr); + auto current_task = OptionalRef(nullptr); while (!queue.is_done()) { current_task = @@ -128,11 +133,11 @@ public: } } - sem.signal(1); + num_tasks_remaining.count_down(1); }); } - sem.wait(num_worker_threads); + num_tasks_remaining.wait(); } static uint32_t get_max_team_count(execution_space const &espace) { @@ -142,11 +147,11 @@ public: template static void get_function_pointer(typename TaskType::function_type &ptr, typename TaskType::destroy_type &dtor) { - ptr = TaskType::apply; + ptr = TaskType::apply; dtor = TaskType::destroy; } -private: + private: const scheduler_type *scheduler; }; @@ -155,21 +160,21 @@ class TaskQueueSpecializationConstrained< Scheduler, typename std::enable_if< std::is_same::value>::type> { -public: + public: using execution_space = Kokkos::Experimental::HPX; - using scheduler_type = Scheduler; + using scheduler_type = Scheduler; using member_type = TaskTeamMemberAdapter; using memory_space = Kokkos::HostSpace; - static void - iff_single_thread_recursive_execute(scheduler_type const &scheduler) { + static void iff_single_thread_recursive_execute( + scheduler_type const &scheduler) { using task_base_type = typename scheduler_type::task_base; - using queue_type = typename scheduler_type::queue_type; + using queue_type = typename scheduler_type::queue_type; if (1 == Kokkos::Experimental::HPX::concurrency()) { task_base_type *const end = (task_base_type *)task_base_type::EndTag; - task_base_type *task = end; + task_base_type *task = end; HPXTeamMember member(TeamPolicyInternal( Kokkos::Experimental::HPX(), 1, 1), @@ -187,8 +192,7 @@ public: } } - if (end == task) - break; + if (end == task) break; (*task->m_apply)(task, &single_exec); @@ -210,11 +214,11 @@ public: // Must provide task queue execution function void execute_task() const { using hpx::apply; - using hpx::lcos::local::counting_semaphore; + using hpx::lcos::local::latch; using task_base_type = typename scheduler_type::task_base; - using queue_type = typename scheduler_type::queue_type; + using queue_type = typename scheduler_type::queue_type; - const int num_worker_threads = Kokkos::Experimental::HPX::concurrency(); + const int num_worker_threads = Kokkos::Experimental::HPX::concurrency(); static task_base_type *const end = (task_base_type *)task_base_type::EndTag; constexpr task_base_type *no_more_tasks_sentinel = nullptr; @@ -224,10 +228,11 @@ public: auto &queue = scheduler->queue(); queue.initialize_team_queues(num_worker_threads); - counting_semaphore sem(0); + latch num_tasks_remaining(num_worker_threads); + ChunkedRoundRobinExecutor exec(num_worker_threads); for (int thread = 0; thread < num_worker_threads; ++thread) { - apply([this, &sem, &buffer, num_worker_threads, thread]() { + apply(exec, [this, &num_tasks_remaining, &buffer, num_worker_threads]() { // NOTE: This implementation has been simplified based on the assumption // that team_size = 1. The HPX backend currently only supports a team // size of 1. @@ -242,7 +247,7 @@ public: member_type single_exec(*scheduler, member); member_type &team_exec = single_exec; - auto &team_queue = team_exec.scheduler().queue(); + auto &team_queue = team_exec.scheduler().queue(); task_base_type *task = no_more_tasks_sentinel; do { @@ -266,21 +271,21 @@ public: } } while (task != no_more_tasks_sentinel); - sem.signal(1); + num_tasks_remaining.count_down(1); }); } - sem.wait(num_worker_threads); + num_tasks_remaining.wait(); } template static void get_function_pointer(typename TaskType::function_type &ptr, typename TaskType::destroy_type &dtor) { - ptr = TaskType::apply; + ptr = TaskType::apply; dtor = TaskType::destroy; } -private: + private: const scheduler_type *scheduler; }; @@ -288,8 +293,8 @@ extern template class TaskQueue< Kokkos::Experimental::HPX, typename Kokkos::Experimental::HPX::memory_space>; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- diff --git a/lib/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIAvail.hpp b/lib/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIAvail.hpp index bbc1b33bf9..99020a3e0d 100644 --- a/lib/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIAvail.hpp +++ b/lib/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIAvail.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,10 +49,9 @@ namespace Kokkos { namespace Impl { #define KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE Kokkos::Experimental::HPX -#include +#include #undef KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE -} -} +} // namespace Impl +} // namespace Kokkos #endif - diff --git a/lib/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIDecl.hpp b/lib/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIDecl.hpp index aa1c2f1518..fae486f4b0 100644 --- a/lib/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIDecl.hpp +++ b/lib/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIDecl.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,10 +49,9 @@ namespace Kokkos { namespace Impl { #define KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE Kokkos::Experimental::HPX -#include +#include #undef KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE -} -} +} // namespace Impl +} // namespace Kokkos #endif - diff --git a/lib/kokkos/core/src/HPX/Kokkos_HPX_WorkGraphPolicy.hpp b/lib/kokkos/core/src/HPX/Kokkos_HPX_WorkGraphPolicy.hpp index 4dd28dd994..6705005c1b 100644 --- a/lib/kokkos/core/src/HPX/Kokkos_HPX_WorkGraphPolicy.hpp +++ b/lib/kokkos/core/src/HPX/Kokkos_HPX_WorkGraphPolicy.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,8 +45,10 @@ #ifndef KOKKOS_HPX_WORKGRAPHPOLICY_HPP #define KOKKOS_HPX_WORKGRAPHPOLICY_HPP +#include + #include -#include +#include namespace Kokkos { namespace Impl { @@ -53,8 +56,8 @@ namespace Impl { template class ParallelFor, Kokkos::Experimental::HPX> { -private: - using Policy = Kokkos::WorkGraphPolicy; + private: + using Policy = Kokkos::WorkGraphPolicy; using WorkTag = typename Policy::work_tag; Policy m_policy; @@ -73,7 +76,7 @@ private: m_functor(t, w); } -public: + public: void execute() const { dispatch_execute_task(this); Kokkos::Experimental::HPX().fence(); @@ -83,12 +86,13 @@ public: const int num_worker_threads = Kokkos::Experimental::HPX::concurrency(); using hpx::apply; - using hpx::lcos::local::counting_semaphore; + using hpx::lcos::local::latch; - counting_semaphore sem(0); + latch num_tasks_remaining(num_worker_threads); + ChunkedRoundRobinExecutor exec(num_worker_threads); for (int thread = 0; thread < num_worker_threads; ++thread) { - apply([this, &sem]() { + apply(exec, [this, &num_tasks_remaining]() { std::int32_t w = m_policy.pop_work(); while (w != Policy::COMPLETED_TOKEN) { if (w != Policy::END_TOKEN) { @@ -99,18 +103,18 @@ public: w = m_policy.pop_work(); } - sem.signal(1); + num_tasks_remaining.count_down(1); }); } - sem.wait(num_worker_threads); + num_tasks_remaining.wait(); } inline ParallelFor(const FunctorType &arg_functor, const Policy &arg_policy) : m_policy(arg_policy), m_functor(arg_functor) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos #endif /* #define KOKKOS_HPX_WORKGRAPHPOLICY_HPP */ diff --git a/lib/kokkos/core/src/KokkosExp_MDRangePolicy.hpp b/lib/kokkos/core/src/KokkosExp_MDRangePolicy.hpp index 1972aa485b..7981c04b4f 100644 --- a/lib/kokkos/core/src/KokkosExp_MDRangePolicy.hpp +++ b/lib/kokkos/core/src/KokkosExp_MDRangePolicy.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,16 +49,16 @@ #include -#include +#include #include #include -#if defined( __CUDACC__ ) && defined( KOKKOS_ENABLE_CUDA ) -#include +#if defined(__CUDACC__) && defined(KOKKOS_ENABLE_CUDA) +#include #include #endif -#if defined( __HCC__ ) && defined( KOKKOS_ENABLE_ROCM ) +#if defined(__HCC__) && defined(KOKKOS_ENABLE_ROCM) //#include #include #endif @@ -76,583 +77,613 @@ enum class Iterate */ template -struct default_outer_direction -{ +struct default_outer_direction { using type = Iterate; - #if defined( KOKKOS_ENABLE_CUDA)||defined( KOKKOS_ENABLE_ROCM) +#if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_ROCM) static constexpr Iterate value = Iterate::Left; - #else +#else static constexpr Iterate value = Iterate::Right; - #endif +#endif }; template -struct default_inner_direction -{ +struct default_inner_direction { using type = Iterate; - #if defined( KOKKOS_ENABLE_CUDA)||defined( KOKKOS_ENABLE_ROCM) +#if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_ROCM) static constexpr Iterate value = Iterate::Left; - #else +#else static constexpr Iterate value = Iterate::Right; - #endif +#endif }; - // Iteration Pattern -template < unsigned N - , Iterate OuterDir = Iterate::Default - , Iterate InnerDir = Iterate::Default - > -struct Rank -{ - static_assert( N != 0u, "Kokkos Error: rank 0 undefined"); - static_assert( N != 1u, "Kokkos Error: rank 1 is not a multi-dimensional range"); - static_assert( N < 7u, "Kokkos Error: Unsupported rank..."); +template +struct Rank { + static_assert(N != 0u, "Kokkos Error: rank 0 undefined"); + static_assert(N != 1u, + "Kokkos Error: rank 1 is not a multi-dimensional range"); + static_assert(N < 7u, "Kokkos Error: Unsupported rank..."); using iteration_pattern = Rank; - static constexpr int rank = N; + static constexpr int rank = N; static constexpr Iterate outer_direction = OuterDir; static constexpr Iterate inner_direction = InnerDir; }; - // multi-dimensional iteration pattern template -struct MDRangePolicy - : public Kokkos::Impl::PolicyTraits -{ - using traits = Kokkos::Impl::PolicyTraits; +struct MDRangePolicy : public Kokkos::Impl::PolicyTraits { + using traits = Kokkos::Impl::PolicyTraits; using range_policy = RangePolicy; typename traits::execution_space m_space; - using impl_range_policy = RangePolicy< typename traits::execution_space - , typename traits::schedule_type - , typename traits::index_type - > ; + using impl_range_policy = + RangePolicy; - typedef MDRangePolicy execution_policy; // needed for is_execution_space interrogation + typedef MDRangePolicy + execution_policy; // needed for is_execution_space interrogation - template + template friend struct MDRangePolicy; - static_assert( !std::is_same::value - , "Kokkos Error: MD iteration pattern not defined" ); + static_assert(!std::is_same::value, + "Kokkos Error: MD iteration pattern not defined"); - using iteration_pattern = typename traits::iteration_pattern; - using work_tag = typename traits::work_tag; - using launch_bounds = typename traits::launch_bounds; - using member_type = typename range_policy::member_type; + using iteration_pattern = typename traits::iteration_pattern; + using work_tag = typename traits::work_tag; + using launch_bounds = typename traits::launch_bounds; + using member_type = typename range_policy::member_type; enum { rank = static_cast(iteration_pattern::rank) }; - using index_type = typename traits::index_type; + using index_type = typename traits::index_type; using array_index_type = long; - using point_type = Kokkos::Array; //was index_type - using tile_type = Kokkos::Array; - // If point_type or tile_type is not templated on a signed integral type (if it is unsigned), - // then if user passes in intializer_list of runtime-determined values of - // signed integral type that are not const will receive a compiler error due - // to an invalid case for implicit conversion - - // "conversion from integer or unscoped enumeration type to integer type that cannot represent all values of the original, except where source is a constant expression whose value can be stored exactly in the target type" + using point_type = Kokkos::Array; // was index_type + using tile_type = Kokkos::Array; + // If point_type or tile_type is not templated on a signed integral type (if + // it is unsigned), then if user passes in intializer_list of + // runtime-determined values of signed integral type that are not const will + // receive a compiler error due to an invalid case for implicit conversion - + // "conversion from integer or unscoped enumeration type to integer type that + // cannot represent all values of the original, except where source is a + // constant expression whose value can be stored exactly in the target type" // This would require the user to either pass a matching index_type parameter - // as template parameter to the MDRangePolicy or static_cast the individual values + // as template parameter to the MDRangePolicy or static_cast the individual + // values point_type m_lower; point_type m_upper; - tile_type m_tile; + tile_type m_tile; point_type m_tile_end; index_type m_num_tiles; index_type m_prod_tile_dims; -/* - // NDE enum impl definition alternative - replace static constexpr int ? - enum { outer_direction = static_cast ( + /* + // NDE enum impl definition alternative - replace static constexpr int ? + enum { outer_direction = static_cast ( + (iteration_pattern::outer_direction != Iterate::Default) + ? iteration_pattern::outer_direction + : default_outer_direction< typename traits::execution_space>::value ) }; + + enum { inner_direction = static_cast ( + iteration_pattern::inner_direction != Iterate::Default + ? iteration_pattern::inner_direction + : default_inner_direction< typename traits::execution_space>::value ) }; + + enum { Right = static_cast( Iterate::Right ) }; + enum { Left = static_cast( Iterate::Left ) }; + */ + // static constexpr int rank = iteration_pattern::rank; + + static constexpr int outer_direction = static_cast( (iteration_pattern::outer_direction != Iterate::Default) - ? iteration_pattern::outer_direction - : default_outer_direction< typename traits::execution_space>::value ) }; + ? iteration_pattern::outer_direction + : default_outer_direction::value); - enum { inner_direction = static_cast ( + static constexpr int inner_direction = static_cast( iteration_pattern::inner_direction != Iterate::Default - ? iteration_pattern::inner_direction - : default_inner_direction< typename traits::execution_space>::value ) }; - - enum { Right = static_cast( Iterate::Right ) }; - enum { Left = static_cast( Iterate::Left ) }; -*/ - //static constexpr int rank = iteration_pattern::rank; - - static constexpr int outer_direction = static_cast ( - (iteration_pattern::outer_direction != Iterate::Default) - ? iteration_pattern::outer_direction - : default_outer_direction< typename traits::execution_space>::value ); - - static constexpr int inner_direction = static_cast ( - iteration_pattern::inner_direction != Iterate::Default - ? iteration_pattern::inner_direction - : default_inner_direction< typename traits::execution_space>::value ) ; + ? iteration_pattern::inner_direction + : default_inner_direction::value); // Ugly ugly workaround intel 14 not handling scoped enum correctly - static constexpr int Right = static_cast( Iterate::Right ); - static constexpr int Left = static_cast( Iterate::Left ); + static constexpr int Right = static_cast(Iterate::Right); + static constexpr int Left = static_cast(Iterate::Left); - KOKKOS_INLINE_FUNCTION const typename traits::execution_space & space() const { return m_space ; } - template < typename LT , typename UT , typename TT = array_index_type > - MDRangePolicy(std::initializer_list const& lower, std::initializer_list const& upper, std::initializer_list const& tile = {} ) - : m_space() { + KOKKOS_INLINE_FUNCTION const typename traits::execution_space& space() const { + return m_space; + } + template + MDRangePolicy(std::initializer_list const& lower, + std::initializer_list const& upper, + std::initializer_list const& tile = {}) + : m_space() { init(lower, upper, tile); } - template < typename LT , typename UT , typename TT = array_index_type > - MDRangePolicy(const typename traits::execution_space & work_space, - std::initializer_list const& lower, std::initializer_list const& upper, std::initializer_list const& tile = {} ) - : m_space( work_space ) { + template + MDRangePolicy(const typename traits::execution_space& work_space, + std::initializer_list const& lower, + std::initializer_list const& upper, + std::initializer_list const& tile = {}) + : m_space(work_space) { init(lower, upper, tile); } - MDRangePolicy( point_type const& lower, point_type const& upper, tile_type const& tile = tile_type{} ) - : m_space() - , m_lower(lower) - , m_upper(upper) - , m_tile(tile) - , m_num_tiles(1) - , m_prod_tile_dims(1) { + MDRangePolicy(point_type const& lower, point_type const& upper, + tile_type const& tile = tile_type{}) + : m_space(), + m_lower(lower), + m_upper(upper), + m_tile(tile), + m_num_tiles(1), + m_prod_tile_dims(1) { init(); } - MDRangePolicy( const typename traits::execution_space & work_space, - point_type const& lower, point_type const& upper, tile_type const& tile = tile_type{} ) - : m_space( work_space ) - , m_lower(lower) - , m_upper(upper) - , m_tile(tile) - , m_num_tiles(1) - , m_prod_tile_dims(1) { + MDRangePolicy(const typename traits::execution_space& work_space, + point_type const& lower, point_type const& upper, + tile_type const& tile = tile_type{}) + : m_space(work_space), + m_lower(lower), + m_upper(upper), + m_tile(tile), + m_num_tiles(1), + m_prod_tile_dims(1) { init(); } - template - MDRangePolicy( const MDRangePolicy p ): - m_space(p.m_space), - m_lower(p.m_lower), - m_upper(p.m_upper), - m_tile(p.m_tile), - m_tile_end(p.m_tile_end), - m_num_tiles(p.m_num_tiles), - m_prod_tile_dims(p.m_prod_tile_dims) {} - -private: + template + MDRangePolicy(const MDRangePolicy p) + : m_space(p.m_space), + m_lower(p.m_lower), + m_upper(p.m_upper), + m_tile(p.m_tile), + m_tile_end(p.m_tile_end), + m_num_tiles(p.m_num_tiles), + m_prod_tile_dims(p.m_prod_tile_dims) {} + private: void init() { // Host - if ( true - #if defined(KOKKOS_ENABLE_CUDA) - && !std::is_same< typename traits::execution_space, Kokkos::Cuda >::value - #endif - #if defined(KOKKOS_ENABLE_ROCM) - && !std::is_same< typename traits::execution_space, Kokkos::Experimental::ROCm >::value - #endif - ) - { + if (true +#if defined(KOKKOS_ENABLE_CUDA) + && !std::is_same::value +#endif +#if defined(KOKKOS_ENABLE_ROCM) + && !std::is_same::value +#endif + ) { index_type span; - for (int i=0; i 0)) ) - { + if (m_tile[i] <= 0) { + if (((int)inner_direction == (int)Right && (i < rank - 1)) || + ((int)inner_direction == (int)Left && (i > 0))) { m_tile[i] = 2; - } - else { + } else { m_tile[i] = (span == 0 ? 1 : span); } } - m_tile_end[i] = static_cast((span + m_tile[i] - 1) / m_tile[i]); + m_tile_end[i] = + static_cast((span + m_tile[i] - 1) / m_tile[i]); m_num_tiles *= m_tile_end[i]; m_prod_tile_dims *= m_tile[i]; } } - #if defined(KOKKOS_ENABLE_CUDA) - else // Cuda +#if defined(KOKKOS_ENABLE_CUDA) + else // Cuda { index_type span; - int increment = 1; + int increment = 1; int rank_start = 0; - int rank_end = rank; - if((int)inner_direction == (int)Right) { - increment = -1; - rank_start = rank-1; - rank_end = -1; + int rank_end = rank; + if ((int)inner_direction == (int)Right) { + increment = -1; + rank_start = rank - 1; + rank_end = -1; } - for (int i=rank_start; i!=rank_end; i+=increment) { + for (int i = rank_start; i != rank_end; i += increment) { span = m_upper[i] - m_lower[i]; - if ( m_tile[i] <= 0 ) { + if (m_tile[i] <= 0) { // TODO: determine what is a good default tile size for cuda // may be rank dependent - if ( ((int)inner_direction == (int)Right && (i < rank-1)) - || ((int)inner_direction == (int)Left && (i > 0)) ) - { - if ( m_prod_tile_dims < 256 ) { + if (((int)inner_direction == (int)Right && (i < rank - 1)) || + ((int)inner_direction == (int)Left && (i > 0))) { + if (m_prod_tile_dims < 256) { m_tile[i] = 2; } else { m_tile[i] = 1; } - } - else { + } else { m_tile[i] = 16; } } - m_tile_end[i] = static_cast((span + m_tile[i] - 1) / m_tile[i]); + m_tile_end[i] = + static_cast((span + m_tile[i] - 1) / m_tile[i]); m_num_tiles *= m_tile_end[i]; m_prod_tile_dims *= m_tile[i]; } - if ( m_prod_tile_dims > 1024 ) { // Match Cuda restriction for ParallelReduce; 1024,1024,64 max per dim (Kepler), but product num_threads < 1024 + if (m_prod_tile_dims > + 1024) { // Match Cuda restriction for ParallelReduce; 1024,1024,64 + // max per dim (Kepler), but product num_threads < 1024 printf(" Tile dimensions exceed Cuda limits\n"); - Kokkos::abort(" Cuda ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); - //Kokkos::Impl::throw_runtime_exception( " Cuda ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); + Kokkos::abort( + " Cuda ExecSpace Error: MDRange tile dims exceed maximum number of " + "threads per block - choose smaller tile dims"); + // Kokkos::Impl::throw_runtime_exception( " Cuda ExecSpace Error: + // MDRange tile dims exceed maximum number of threads per block - choose + // smaller tile dims"); } } - #endif - #if defined(KOKKOS_ENABLE_ROCM) - else // ROCm +#endif +#if defined(KOKKOS_ENABLE_ROCM) + else // ROCm { index_type span; - int increment = 1; + int increment = 1; int rank_start = 0; - int rank_end = rank; - if((int)inner_direction == (int)Right) { - increment = -1; - rank_start = rank-1; - rank_end = -1; + int rank_end = rank; + if ((int)inner_direction == (int)Right) { + increment = -1; + rank_start = rank - 1; + rank_end = -1; } - for (int i=rank_start; i!=rank_end; i+=increment) { + for (int i = rank_start; i != rank_end; i += increment) { span = m_upper[i] - m_lower[i]; - if ( m_tile[i] <= 0 ) { + if (m_tile[i] <= 0) { // TODO: determine what is a good default tile size for rocm // may be rank dependent - if ( ((int)inner_direction == (int)Right && (i < rank-1)) - || ((int)inner_direction == (int)Left && (i > 0)) ) - { - if ( m_prod_tile_dims < 256 ) { + if (((int)inner_direction == (int)Right && (i < rank - 1)) || + ((int)inner_direction == (int)Left && (i > 0))) { + if (m_prod_tile_dims < 256) { m_tile[i] = 4; } else { m_tile[i] = 1; } - } - else { + } else { m_tile[i] = 16; } } - m_tile_end[i] = static_cast((span + m_tile[i] - 1) / m_tile[i]); + m_tile_end[i] = + static_cast((span + m_tile[i] - 1) / m_tile[i]); m_num_tiles *= m_tile_end[i]; m_prod_tile_dims *= m_tile[i]; } - if ( m_prod_tile_dims > 1024 ) { //but product num_threads < 1024 + if (m_prod_tile_dims > 1024) { // but product num_threads < 1024 printf(" Tile dimensions exceed ROCm limits\n"); - Kokkos::abort(" ROCm ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); - //Kokkos::Impl::throw_runtime_exception( " Cuda ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); + Kokkos::abort( + " ROCm ExecSpace Error: MDRange tile dims exceed maximum number of " + "threads per block - choose smaller tile dims"); + // Kokkos::Impl::throw_runtime_exception( " Cuda ExecSpace Error: + // MDRange tile dims exceed maximum number of threads per block - choose + // smaller tile dims"); } } - #endif +#endif } - template < typename LT , typename UT , typename TT = array_index_type > - void init( std::initializer_list const& lower, std::initializer_list const& upper, std::initializer_list const& tile = {} ) - { - if(static_cast(m_lower.size()) != rank || static_cast(m_upper.size()) != rank) - Kokkos::abort("MDRangePolicy: Constructor initializer lists have wrong size"); + template + void init(std::initializer_list const& lower, + std::initializer_list const& upper, + std::initializer_list const& tile = {}) { + if (static_cast(m_lower.size()) != rank || + static_cast(m_upper.size()) != rank) + Kokkos::abort( + "MDRangePolicy: Constructor initializer lists have wrong size"); - for ( auto i = 0; i < rank; ++i ) { + for (auto i = 0; i < rank; ++i) { m_lower[i] = static_cast(lower.begin()[i]); m_upper[i] = static_cast(upper.begin()[i]); - if(static_cast(tile.size())==rank) + if (static_cast(tile.size()) == rank) m_tile[i] = static_cast(tile.begin()[i]); else m_tile[i] = 0; } - m_num_tiles = 1; + m_num_tiles = 1; m_prod_tile_dims = 1; // Host - if ( true - #if defined(KOKKOS_ENABLE_CUDA) - && !std::is_same< typename traits::execution_space, Kokkos::Cuda >::value - #endif - #if defined(KOKKOS_ENABLE_ROCM) - && !std::is_same< typename traits::execution_space, Kokkos::Experimental::ROCm >::value - #endif - ) - { + if (true +#if defined(KOKKOS_ENABLE_CUDA) + && !std::is_same::value +#endif +#if defined(KOKKOS_ENABLE_ROCM) + && !std::is_same::value +#endif + ) { index_type span; - for (int i=0; i 0)) ) - { + if (m_tile[i] <= 0) { + if (((int)inner_direction == (int)Right && (i < rank - 1)) || + ((int)inner_direction == (int)Left && (i > 0))) { m_tile[i] = 2; - } - else { + } else { m_tile[i] = (span == 0 ? 1 : span); } } - m_tile_end[i] = static_cast((span + m_tile[i] - 1) / m_tile[i]); + m_tile_end[i] = + static_cast((span + m_tile[i] - 1) / m_tile[i]); m_num_tiles *= m_tile_end[i]; m_prod_tile_dims *= m_tile[i]; } } - #if defined(KOKKOS_ENABLE_CUDA) - else // Cuda +#if defined(KOKKOS_ENABLE_CUDA) + else // Cuda { index_type span; - int increment = 1; + int increment = 1; int rank_start = 0; - int rank_end = rank; - if((int)inner_direction == (int)Right) { - increment = -1; - rank_start = rank-1; - rank_end = -1; + int rank_end = rank; + if ((int)inner_direction == (int)Right) { + increment = -1; + rank_start = rank - 1; + rank_end = -1; } - for (int i=rank_start; i!=rank_end; i+=increment) { + for (int i = rank_start; i != rank_end; i += increment) { span = m_upper[i] - m_lower[i]; - if ( m_tile[i] <= 0 ) { + if (m_tile[i] <= 0) { // TODO: determine what is a good default tile size for cuda // may be rank dependent - if ( ((int)inner_direction == (int)Right && (i < rank-1)) - || ((int)inner_direction == (int)Left && (i > 0)) ) - { - if ( m_prod_tile_dims < 256 ) { + if (((int)inner_direction == (int)Right && (i < rank - 1)) || + ((int)inner_direction == (int)Left && (i > 0))) { + if (m_prod_tile_dims < 256) { m_tile[i] = 2; } else { m_tile[i] = 1; } - } - else { + } else { m_tile[i] = 16; } } - m_tile_end[i] = static_cast((span + m_tile[i] - 1) / m_tile[i]); + m_tile_end[i] = + static_cast((span + m_tile[i] - 1) / m_tile[i]); m_num_tiles *= m_tile_end[i]; m_prod_tile_dims *= m_tile[i]; } - if ( m_prod_tile_dims > 1024 ) { // Match Cuda restriction for ParallelReduce; 1024,1024,64 max per dim (Kepler), but product num_threads < 1024 + if (m_prod_tile_dims > + 1024) { // Match Cuda restriction for ParallelReduce; 1024,1024,64 + // max per dim (Kepler), but product num_threads < 1024 printf(" Tile dimensions exceed Cuda limits\n"); - Kokkos::abort(" Cuda ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); - //Kokkos::Impl::throw_runtime_exception( " Cuda ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); + Kokkos::abort( + " Cuda ExecSpace Error: MDRange tile dims exceed maximum number of " + "threads per block - choose smaller tile dims"); + // Kokkos::Impl::throw_runtime_exception( " Cuda ExecSpace Error: + // MDRange tile dims exceed maximum number of threads per block - choose + // smaller tile dims"); } } - #endif - #if defined(KOKKOS_ENABLE_ROCM) - else // ROCm +#endif +#if defined(KOKKOS_ENABLE_ROCM) + else // ROCm { index_type span; - int increment = 1; + int increment = 1; int rank_start = 0; - int rank_end = rank; - if((int)inner_direction == (int)Right) { - increment = -1; - rank_start = rank-1; - rank_end = -1; + int rank_end = rank; + if ((int)inner_direction == (int)Right) { + increment = -1; + rank_start = rank - 1; + rank_end = -1; } - for (int i=rank_start; i!=rank_end; i+=increment) { + for (int i = rank_start; i != rank_end; i += increment) { span = m_upper[i] - m_lower[i]; - if ( m_tile[i] <= 0 ) { + if (m_tile[i] <= 0) { // TODO: determine what is a good default tile size for cuda // may be rank dependent - if ( ((int)inner_direction == (int)Right && (i < rank-1)) - || ((int)inner_direction == (int)Left && (i > 0)) ) - { - if ( m_prod_tile_dims < 256 ) { + if (((int)inner_direction == (int)Right && (i < rank - 1)) || + ((int)inner_direction == (int)Left && (i > 0))) { + if (m_prod_tile_dims < 256) { m_tile[i] = 2; } else { m_tile[i] = 1; } - } - else { + } else { m_tile[i] = 16; } } - m_tile_end[i] = static_cast((span + m_tile[i] - 1) / m_tile[i]); + m_tile_end[i] = + static_cast((span + m_tile[i] - 1) / m_tile[i]); m_num_tiles *= m_tile_end[i]; m_prod_tile_dims *= m_tile[i]; } - if ( m_prod_tile_dims > 1024 ) { // Match ROCm restriction for ParallelReduce; 1024,1024,1024 max per dim , but product num_threads < 1024 + if (m_prod_tile_dims > + 1024) { // Match ROCm restriction for ParallelReduce; 1024,1024,1024 + // max per dim , but product num_threads < 1024 printf(" Tile dimensions exceed ROCm limits\n"); - Kokkos::abort(" ROCm ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); - //Kokkos::Impl::throw_runtime_exception( " Cuda ExecSpace Error: MDRange tile dims exceed maximum number of threads per block - choose smaller tile dims"); + Kokkos::abort( + " ROCm ExecSpace Error: MDRange tile dims exceed maximum number of " + "threads per block - choose smaller tile dims"); + // Kokkos::Impl::throw_runtime_exception( " Cuda ExecSpace Error: + // MDRange tile dims exceed maximum number of threads per block - choose + // smaller tile dims"); } } - #endif +#endif } - }; -} // namespace Kokkos +} // namespace Kokkos // For backward compatibility -namespace Kokkos { namespace Experimental { - using Kokkos::MDRangePolicy; - using Kokkos::Rank; - using Kokkos::Iterate; -} } // end Kokkos::Experimental +namespace Kokkos { +namespace Experimental { +using Kokkos::Iterate; +using Kokkos::MDRangePolicy; +using Kokkos::Rank; +} // namespace Experimental +} // namespace Kokkos // ------------------------------------------------------------------ // #ifdef KOKKOS_ENABLE_DEPRECATED_CODE // ------------------------------------------------------------------ // -//md_parallel_for - deprecated use parallel_for +// md_parallel_for - deprecated use parallel_for // ------------------------------------------------------------------ // -namespace Kokkos { namespace Experimental { +namespace Kokkos { +namespace Experimental { template -void md_parallel_for( MDRange const& range - , Functor const& f - , const std::string& str = "" - , typename std::enable_if<( true - #if defined( KOKKOS_ENABLE_CUDA) - && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value - #endif - #if defined( KOKKOS_ENABLE_ROCM) - && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Experimental::ROCm>::value - #endif - ) >::type* = 0 - ) -{ +void md_parallel_for( + MDRange const& range, Functor const& f, const std::string& str = "", + typename std::enable_if< + (true +#if defined(KOKKOS_ENABLE_CUDA) + && !std::is_same::value +#endif +#if defined(KOKKOS_ENABLE_ROCM) + && !std::is_same::value +#endif + )>::type* = 0) { Kokkos::Impl::Experimental::MDFunctor g(range, f); using range_policy = typename MDRange::impl_range_policy; - Kokkos::parallel_for( range_policy(0, range.m_num_tiles).set_chunk_size(1), g, str ); + Kokkos::parallel_for(range_policy(0, range.m_num_tiles).set_chunk_size(1), g, + str); } template -void md_parallel_for( const std::string& str - , MDRange const& range - , Functor const& f - , typename std::enable_if<( true - #if defined( KOKKOS_ENABLE_CUDA) - && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value - #endif - #if defined( KOKKOS_ENABLE_ROCM) - && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Experimental::ROCm>::value - #endif - ) >::type* = 0 - ) -{ +void md_parallel_for( + const std::string& str, MDRange const& range, Functor const& f, + typename std::enable_if< + (true +#if defined(KOKKOS_ENABLE_CUDA) + && !std::is_same::value +#endif +#if defined(KOKKOS_ENABLE_ROCM) + && !std::is_same::value +#endif + )>::type* = 0) { Kokkos::Impl::Experimental::MDFunctor g(range, f); using range_policy = typename MDRange::impl_range_policy; - Kokkos::parallel_for( range_policy(0, range.m_num_tiles).set_chunk_size(1), g, str ); + Kokkos::parallel_for(range_policy(0, range.m_num_tiles).set_chunk_size(1), g, + str); } // Cuda specialization -#if defined( __CUDACC__ ) && defined( KOKKOS_ENABLE_CUDA ) +#if defined(__CUDACC__) && defined(KOKKOS_ENABLE_CUDA) template -void md_parallel_for( const std::string& str - , MDRange const& range - , Functor const& f - , typename std::enable_if<( true - #if defined( KOKKOS_ENABLE_CUDA) - && std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value - #endif - ) >::type* = 0 - ) -{ - Kokkos::Impl::DeviceIterateTile closure(range, f); +void md_parallel_for( + const std::string& str, MDRange const& range, Functor const& f, + typename std::enable_if< + (true +#if defined(KOKKOS_ENABLE_CUDA) + && std::is_same::value +#endif + )>::type* = 0) { + Kokkos::Impl::DeviceIterateTile + closure(range, f); closure.execute(); } template -void md_parallel_for( MDRange const& range - , Functor const& f - , const std::string& str = "" - , typename std::enable_if<( true - #if defined( KOKKOS_ENABLE_CUDA) - && std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value - #endif - ) >::type* = 0 - ) -{ - Kokkos::Impl::DeviceIterateTile closure(range, f); +void md_parallel_for( + MDRange const& range, Functor const& f, const std::string& str = "", + typename std::enable_if< + (true +#if defined(KOKKOS_ENABLE_CUDA) + && std::is_same::value +#endif + )>::type* = 0) { + Kokkos::Impl::DeviceIterateTile + closure(range, f); closure.execute(); } #endif // ------------------------------------------------------------------ // // ------------------------------------------------------------------ // -//md_parallel_reduce - deprecated use parallel_reduce +// md_parallel_reduce - deprecated use parallel_reduce // ------------------------------------------------------------------ // template -void md_parallel_reduce( MDRange const& range - , Functor const& f - , ValueType & v - , const std::string& str = "" - , typename std::enable_if<( true - #if defined( KOKKOS_ENABLE_CUDA) - && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value - #endif - #if defined( KOKKOS_ENABLE_ROCM) - && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Experimental::ROCm>::value - #endif - ) >::type* = 0 - ) -{ - Kokkos::Impl::Experimental::MDFunctor g(range, f); +void md_parallel_reduce( + MDRange const& range, Functor const& f, ValueType& v, + const std::string& str = "", + typename std::enable_if< + (true +#if defined(KOKKOS_ENABLE_CUDA) + && !std::is_same::value +#endif +#if defined(KOKKOS_ENABLE_ROCM) + && !std::is_same::value +#endif + )>::type* = 0) { + Kokkos::Impl::Experimental::MDFunctor g(range, + f); using range_policy = typename MDRange::impl_range_policy; - Kokkos::parallel_reduce( str, range_policy(0, range.m_num_tiles).set_chunk_size(1), g, v ); + Kokkos::parallel_reduce( + str, range_policy(0, range.m_num_tiles).set_chunk_size(1), g, v); } template -void md_parallel_reduce( const std::string& str - , MDRange const& range - , Functor const& f - , ValueType & v - , typename std::enable_if<( true - #if defined( KOKKOS_ENABLE_CUDA) - && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Cuda>::value - #endif - #if defined( KOKKOS_ENABLE_ROCM) - && !std::is_same< typename MDRange::range_policy::execution_space, Kokkos::Experimental::ROCm>::value - #endif - ) >::type* = 0 - ) -{ - Kokkos::Impl::Experimental::MDFunctor g(range, f); +void md_parallel_reduce( + const std::string& str, MDRange const& range, Functor const& f, + ValueType& v, + typename std::enable_if< + (true +#if defined(KOKKOS_ENABLE_CUDA) + && !std::is_same::value +#endif +#if defined(KOKKOS_ENABLE_ROCM) + && !std::is_same::value +#endif + )>::type* = 0) { + Kokkos::Impl::Experimental::MDFunctor g(range, + f); using range_policy = typename MDRange::impl_range_policy; - Kokkos::parallel_reduce( str, range_policy(0, range.m_num_tiles).set_chunk_size(1), g, v ); + Kokkos::parallel_reduce( + str, range_policy(0, range.m_num_tiles).set_chunk_size(1), g, v); } // Cuda - md_parallel_reduce not implemented - use parallel_reduce -} } // namespace Kokkos::Experimental +} // namespace Experimental +} // namespace Kokkos #endif namespace Kokkos { namespace Experimental { namespace Impl { -template -struct PolicyPropertyAdaptor,MDRangePolicy> { +template +struct PolicyPropertyAdaptor, + MDRangePolicy> { typedef MDRangePolicy policy_in_t; typedef MDRangePolicy> policy_out_t; + typename policy_in_t::traits::schedule_type, + typename policy_in_t::traits::work_tag, + typename policy_in_t::traits::index_type, + typename policy_in_t::traits::iteration_pattern, + typename policy_in_t::traits::launch_bounds, + WorkItemProperty::ImplWorkItemProperty

    > + policy_out_t; }; -} -} -} - - -#endif //KOKKOS_CORE_EXP_MD_RANGE_POLICY_HPP +} // namespace Impl +} // namespace Experimental +} // namespace Kokkos +#endif // KOKKOS_CORE_EXP_MD_RANGE_POLICY_HPP diff --git a/lib/kokkos/core/src/Kokkos_AnonymousSpace.hpp b/lib/kokkos/core/src/Kokkos_AnonymousSpace.hpp index c345158996..a4e887668f 100644 --- a/lib/kokkos/core/src/Kokkos_AnonymousSpace.hpp +++ b/lib/kokkos/core/src/Kokkos_AnonymousSpace.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -53,28 +54,28 @@ namespace Kokkos { class AnonymousSpace { -public: + public: //! Tag this class as a kokkos memory space - typedef AnonymousSpace memory_space; + typedef AnonymousSpace memory_space; typedef Kokkos::DefaultExecutionSpace execution_space; - typedef size_t size_type; + typedef size_t size_type; //! This memory space preferred device_type - typedef Kokkos::Device< execution_space, memory_space > device_type; + typedef Kokkos::Device device_type; /**\brief Default memory space instance */ - AnonymousSpace() = default; - AnonymousSpace( AnonymousSpace && rhs ) = default; - AnonymousSpace( const AnonymousSpace & rhs ) = default; - AnonymousSpace & operator = ( AnonymousSpace && ) = default; - AnonymousSpace & operator = ( const AnonymousSpace & ) = default; - ~AnonymousSpace() = default; + AnonymousSpace() = default; + AnonymousSpace(AnonymousSpace &&rhs) = default; + AnonymousSpace(const AnonymousSpace &rhs) = default; + AnonymousSpace &operator=(AnonymousSpace &&) = default; + AnonymousSpace &operator=(const AnonymousSpace &) = default; + ~AnonymousSpace() = default; /**\brief Return Name of the MemorySpace */ - static constexpr const char* name() { return "Anonymous"; } + static constexpr const char *name() { return "Anonymous"; } }; -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- @@ -82,46 +83,43 @@ namespace Kokkos { namespace Impl { -template -struct MemorySpaceAccess< Kokkos::AnonymousSpace , OtherSpace > { +template +struct MemorySpaceAccess { enum { assignable = true }; enum { accessible = true }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template -struct MemorySpaceAccess< OtherSpace, Kokkos::AnonymousSpace > { +template +struct MemorySpaceAccess { enum { assignable = true }; enum { accessible = true }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::AnonymousSpace, Kokkos::AnonymousSpace > { +template <> +struct MemorySpaceAccess { enum { assignable = true }; enum { accessible = true }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template -struct VerifyExecutionCanAccessMemorySpace -{ - enum {value = 1}; +template +struct VerifyExecutionCanAccessMemorySpace { + enum { value = 1 }; KOKKOS_INLINE_FUNCTION static void verify(void) {} KOKKOS_INLINE_FUNCTION static void verify(const void *) {} }; -template -struct VerifyExecutionCanAccessMemorySpace -{ - enum {value = 1}; +template +struct VerifyExecutionCanAccessMemorySpace { + enum { value = 1 }; KOKKOS_INLINE_FUNCTION static void verify(void) {} KOKKOS_INLINE_FUNCTION static void verify(const void *) {} }; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos - -#endif // #define KOKKOS_ANONYMOUSSPACE_HPP +} // namespace Kokkos +#endif // #define KOKKOS_ANONYMOUSSPACE_HPP diff --git a/lib/kokkos/core/src/Kokkos_Array.hpp b/lib/kokkos/core/src/Kokkos_Array.hpp index 8e5862fe9c..88e7883cb9 100644 --- a/lib/kokkos/core/src/Kokkos_Array.hpp +++ b/lib/kokkos/core/src/Kokkos_Array.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -82,7 +83,7 @@ template struct ArrayBoundsCheck { KOKKOS_INLINE_FUNCTION ArrayBoundsCheck(Integral i, size_t N) { - if ( size_t(i) >= N) { + if (size_t(i) >= N) { #ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST std::string s = "Kokkos::Array: index "; s += std::to_string(i); @@ -95,7 +96,7 @@ struct ArrayBoundsCheck { } } }; -} // end namespace Impl +} // end namespace Impl #define KOKKOS_ARRAY_BOUNDS_CHECK(i, N) \ Kokkos::Impl::ArrayBoundsCheck(i, N) @@ -104,17 +105,14 @@ struct ArrayBoundsCheck { #define KOKKOS_ARRAY_BOUNDS_CHECK(i, N) (void)0 -#endif // !defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ) +#endif // !defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ) /**\brief Derived from the C++17 'std::array'. * Dropping the iterator interface. */ -template< class T = void - , size_t N =KOKKOS_INVALID_INDEX - , class Proxy = void - > +template struct Array { -public: + public: /** * The elements of this C array shall not be accessed directly. The data * member has to be declared public to enable aggregate initialization as for @@ -122,115 +120,113 @@ public: * @private */ T m_internal_implementation_private_member_data[N]; -public: - typedef T & reference ; - typedef typename std::add_const::type & const_reference ; - typedef size_t size_type ; - typedef ptrdiff_t difference_type ; - typedef T value_type ; - typedef T * pointer ; - typedef typename std::add_const::type * const_pointer ; + public: + typedef T& reference; + typedef typename std::add_const::type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef T* pointer; + typedef typename std::add_const::type* const_pointer; - KOKKOS_INLINE_FUNCTION static constexpr size_type size() { return N ; } - KOKKOS_INLINE_FUNCTION static constexpr bool empty(){ return false ; } - KOKKOS_INLINE_FUNCTION constexpr size_type max_size() const { return N ; } + KOKKOS_INLINE_FUNCTION static constexpr size_type size() { return N; } + KOKKOS_INLINE_FUNCTION static constexpr bool empty() { return false; } + KOKKOS_INLINE_FUNCTION constexpr size_type max_size() const { return N; } - template< typename iType > - KOKKOS_INLINE_FUNCTION - reference operator[]( const iType & i ) - { - static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); - KOKKOS_ARRAY_BOUNDS_CHECK(i, N); - return m_internal_implementation_private_member_data[i]; - } + template + KOKKOS_INLINE_FUNCTION reference operator[](const iType& i) { + static_assert( + (std::is_integral::value || std::is_enum::value), + "Must be integral argument"); + KOKKOS_ARRAY_BOUNDS_CHECK(i, N); + return m_internal_implementation_private_member_data[i]; + } - template< typename iType > - KOKKOS_INLINE_FUNCTION - const_reference operator[]( const iType & i ) const - { - static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); - KOKKOS_ARRAY_BOUNDS_CHECK(i, N); - return m_internal_implementation_private_member_data[i]; - } + template + KOKKOS_INLINE_FUNCTION const_reference operator[](const iType& i) const { + static_assert( + (std::is_integral::value || std::is_enum::value), + "Must be integral argument"); + KOKKOS_ARRAY_BOUNDS_CHECK(i, N); + return m_internal_implementation_private_member_data[i]; + } - KOKKOS_INLINE_FUNCTION pointer data() - { - return & m_internal_implementation_private_member_data[0]; - } - KOKKOS_INLINE_FUNCTION const_pointer data() const - { - return & m_internal_implementation_private_member_data[0]; - } + KOKKOS_INLINE_FUNCTION pointer data() { + return &m_internal_implementation_private_member_data[0]; + } + KOKKOS_INLINE_FUNCTION const_pointer data() const { + return &m_internal_implementation_private_member_data[0]; + } - #ifdef KOKKOS_IMPL_ROCM_CLANG_WORKAROUND +#ifdef KOKKOS_IMPL_ROCM_CLANG_WORKAROUND // Do not default unless move and move-assignment are also defined KOKKOS_INLINE_FUNCTION - ~Array() = default ; - Array() = default ; - Array( const Array & ) = default ; - Array & operator = ( const Array & ) = default ; + ~Array() = default; + Array() = default; + Array(const Array&) = default; + Array& operator=(const Array&) = default; // Some supported compilers are not sufficiently C++11 compliant // for default move constructor and move assignment operator. - Array( Array && ) = default ; - Array & operator = ( Array && ) = default ; - + Array(Array&&) = default; + Array& operator=(Array&&) = default; + KOKKOS_INLINE_FUNCTION Array(const std::initializer_list& vals) { - for(int i=0; i +struct Array { + public: + typedef T& reference; + typedef typename std::add_const::type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef T* pointer; + typedef typename std::add_const::type* const_pointer; -template< class T , class Proxy > -struct Array { -public: + KOKKOS_INLINE_FUNCTION static constexpr size_type size() { return 0; } + KOKKOS_INLINE_FUNCTION static constexpr bool empty() { return true; } + KOKKOS_INLINE_FUNCTION constexpr size_type max_size() const { return 0; } - typedef typename std::add_const::type & reference ; - typedef typename std::add_const::type & const_reference ; - typedef size_t size_type ; - typedef ptrdiff_t difference_type ; - typedef typename std::add_const::type value_type ; - typedef typename std::add_const::type * pointer ; - typedef typename std::add_const::type * const_pointer ; + template + KOKKOS_INLINE_FUNCTION reference operator[](const iType&) { + static_assert( + (std::is_integral::value || std::is_enum::value), + "Must be integer argument"); + Kokkos::abort("Unreachable code"); + return *reinterpret_cast(-1); + } - KOKKOS_INLINE_FUNCTION static constexpr size_type size() { return 0 ; } - KOKKOS_INLINE_FUNCTION static constexpr bool empty() { return true ; } - KOKKOS_INLINE_FUNCTION constexpr size_type max_size() const { return 0 ; } + template + KOKKOS_INLINE_FUNCTION const_reference operator[](const iType&) const { + static_assert( + (std::is_integral::value || std::is_enum::value), + "Must be integer argument"); + Kokkos::abort("Unreachable code"); + return *reinterpret_cast(-1); + } - template< typename iType > - KOKKOS_INLINE_FUNCTION - value_type operator[]( const iType & ) - { - static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integer argument" ); - return value_type(); - } - - template< typename iType > - KOKKOS_INLINE_FUNCTION - value_type operator[]( const iType & ) const - { - static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integer argument" ); - return value_type(); - } - - KOKKOS_INLINE_FUNCTION pointer data() { return pointer(0) ; } + KOKKOS_INLINE_FUNCTION pointer data() { return pointer(0); } KOKKOS_INLINE_FUNCTION const_pointer data() const { return const_pointer(0); } #ifdef KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND KOKKOS_INLINE_FUNCTION ~Array() {} KOKKOS_INLINE_FUNCTION Array() {} - KOKKOS_INLINE_FUNCTION Array( const Array & ) {} - KOKKOS_INLINE_FUNCTION Array & operator = ( const Array & ) {} + KOKKOS_INLINE_FUNCTION Array(const Array&) {} + KOKKOS_INLINE_FUNCTION Array& operator=(const Array&) {} #else - KOKKOS_INLINE_FUNCTION ~Array() = default; - KOKKOS_INLINE_FUNCTION Array() = default; - KOKKOS_INLINE_FUNCTION Array( const Array & ) = default; - KOKKOS_INLINE_FUNCTION Array & operator = ( const Array & ) = default; + KOKKOS_INLINE_FUNCTION ~Array() = default; + KOKKOS_INLINE_FUNCTION Array() = default; + KOKKOS_INLINE_FUNCTION Array(const Array&) = default; + KOKKOS_INLINE_FUNCTION Array& operator=(const Array&) = default; #endif // Some supported compilers are not sufficiently C++11 compliant @@ -239,62 +235,59 @@ public: // Array & operator = ( Array && ) = default ; }; - -template<> -struct Array -{ +template <> +struct Array { struct contiguous {}; struct strided {}; }; -template< class T > -struct Array< T ,KOKKOS_INVALID_INDEX , Array<>::contiguous > -{ -private: - T * m_elem ; - size_t m_size ; -public: +template +struct Array::contiguous> { + private: + T* m_elem; + size_t m_size; - typedef T & reference ; - typedef typename std::add_const::type & const_reference ; - typedef size_t size_type ; - typedef ptrdiff_t difference_type ; - typedef T value_type ; - typedef T * pointer ; - typedef typename std::add_const::type * const_pointer ; + public: + typedef T& reference; + typedef typename std::add_const::type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef T* pointer; + typedef typename std::add_const::type* const_pointer; - KOKKOS_INLINE_FUNCTION constexpr size_type size() const { return m_size ; } - KOKKOS_INLINE_FUNCTION constexpr bool empty() const { return 0 != m_size ; } - KOKKOS_INLINE_FUNCTION constexpr size_type max_size() const { return m_size ; } + KOKKOS_INLINE_FUNCTION constexpr size_type size() const { return m_size; } + KOKKOS_INLINE_FUNCTION constexpr bool empty() const { return 0 != m_size; } + KOKKOS_INLINE_FUNCTION constexpr size_type max_size() const { return m_size; } - template< typename iType > - KOKKOS_INLINE_FUNCTION - reference operator[]( const iType & i ) - { - static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); - KOKKOS_ARRAY_BOUNDS_CHECK(i, m_size); - return m_elem[i]; - } + template + KOKKOS_INLINE_FUNCTION reference operator[](const iType& i) { + static_assert( + (std::is_integral::value || std::is_enum::value), + "Must be integral argument"); + KOKKOS_ARRAY_BOUNDS_CHECK(i, m_size); + return m_elem[i]; + } - template< typename iType > - KOKKOS_INLINE_FUNCTION - const_reference operator[]( const iType & i ) const - { - static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); - KOKKOS_ARRAY_BOUNDS_CHECK(i, m_size); - return m_elem[i]; - } + template + KOKKOS_INLINE_FUNCTION const_reference operator[](const iType& i) const { + static_assert( + (std::is_integral::value || std::is_enum::value), + "Must be integral argument"); + KOKKOS_ARRAY_BOUNDS_CHECK(i, m_size); + return m_elem[i]; + } - KOKKOS_INLINE_FUNCTION pointer data() { return m_elem ; } - KOKKOS_INLINE_FUNCTION const_pointer data() const { return m_elem ; } + KOKKOS_INLINE_FUNCTION pointer data() { return m_elem; } + KOKKOS_INLINE_FUNCTION const_pointer data() const { return m_elem; } #ifdef KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND KOKKOS_INLINE_FUNCTION ~Array() {} #else - KOKKOS_INLINE_FUNCTION ~Array() = default; + KOKKOS_INLINE_FUNCTION ~Array() = default; #endif - Array() = delete ; - Array( const Array & rhs ) = delete ; + Array() = delete; + Array(const Array& rhs) = delete; // Some supported compilers are not sufficiently C++11 compliant // for default move constructor and move assignment operator. @@ -302,76 +295,72 @@ public: // Array & operator = ( Array && rhs ) = delete ; KOKKOS_INLINE_FUNCTION - Array & operator = ( const Array & rhs ) - { - const size_t n = std::min( m_size , rhs.size() ); - for ( size_t i = 0 ; i < n ; ++i ) m_elem[i] = rhs[i] ; - return *this ; - } + Array& operator=(const Array& rhs) { + const size_t n = std::min(m_size, rhs.size()); + for (size_t i = 0; i < n; ++i) m_elem[i] = rhs[i]; + return *this; + } - template< size_t N , class P > - KOKKOS_INLINE_FUNCTION - Array & operator = ( const Array & rhs ) - { - const size_t n = std::min( m_size , rhs.size() ); - for ( size_t i = 0 ; i < n ; ++i ) m_elem[i] = rhs[i] ; - return *this ; - } + template + KOKKOS_INLINE_FUNCTION Array& operator=(const Array& rhs) { + const size_t n = std::min(m_size, rhs.size()); + for (size_t i = 0; i < n; ++i) m_elem[i] = rhs[i]; + return *this; + } - KOKKOS_INLINE_FUNCTION constexpr Array( pointer arg_ptr , size_type arg_size , size_type = 0 ) - : m_elem(arg_ptr), m_size(arg_size) {} + KOKKOS_INLINE_FUNCTION constexpr Array(pointer arg_ptr, size_type arg_size, + size_type = 0) + : m_elem(arg_ptr), m_size(arg_size) {} }; -template< class T > -struct Array< T ,KOKKOS_INVALID_INDEX , Array<>::strided > -{ -private: - T * m_elem ; - size_t m_size ; - size_t m_stride ; -public: +template +struct Array::strided> { + private: + T* m_elem; + size_t m_size; + size_t m_stride; - typedef T & reference ; - typedef typename std::add_const::type & const_reference ; - typedef size_t size_type ; - typedef ptrdiff_t difference_type ; - typedef T value_type ; - typedef T * pointer ; - typedef typename std::add_const::type * const_pointer ; + public: + typedef T& reference; + typedef typename std::add_const::type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef T* pointer; + typedef typename std::add_const::type* const_pointer; - KOKKOS_INLINE_FUNCTION constexpr size_type size() const { return m_size ; } - KOKKOS_INLINE_FUNCTION constexpr bool empty() const { return 0 != m_size ; } - KOKKOS_INLINE_FUNCTION constexpr size_type max_size() const { return m_size ; } + KOKKOS_INLINE_FUNCTION constexpr size_type size() const { return m_size; } + KOKKOS_INLINE_FUNCTION constexpr bool empty() const { return 0 != m_size; } + KOKKOS_INLINE_FUNCTION constexpr size_type max_size() const { return m_size; } - template< typename iType > - KOKKOS_INLINE_FUNCTION - reference operator[]( const iType & i ) - { - static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); - KOKKOS_ARRAY_BOUNDS_CHECK(i, m_size); - return m_elem[i*m_stride]; - } + template + KOKKOS_INLINE_FUNCTION reference operator[](const iType& i) { + static_assert( + (std::is_integral::value || std::is_enum::value), + "Must be integral argument"); + KOKKOS_ARRAY_BOUNDS_CHECK(i, m_size); + return m_elem[i * m_stride]; + } - template< typename iType > - KOKKOS_INLINE_FUNCTION - const_reference operator[]( const iType & i ) const - { - static_assert( ( std::is_integral::value || std::is_enum::value ) , "Must be integral argument" ); - KOKKOS_ARRAY_BOUNDS_CHECK(i, m_size); - return m_elem[i*m_stride]; - } + template + KOKKOS_INLINE_FUNCTION const_reference operator[](const iType& i) const { + static_assert( + (std::is_integral::value || std::is_enum::value), + "Must be integral argument"); + KOKKOS_ARRAY_BOUNDS_CHECK(i, m_size); + return m_elem[i * m_stride]; + } - KOKKOS_INLINE_FUNCTION pointer data() { return m_elem ; } - KOKKOS_INLINE_FUNCTION const_pointer data() const { return m_elem ; } + KOKKOS_INLINE_FUNCTION pointer data() { return m_elem; } + KOKKOS_INLINE_FUNCTION const_pointer data() const { return m_elem; } #ifdef KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND KOKKOS_INLINE_FUNCTION ~Array() {} #else - KOKKOS_INLINE_FUNCTION ~Array() = default; + KOKKOS_INLINE_FUNCTION ~Array() = default; #endif - Array() = delete ; - Array( const Array & ) = delete ; - + Array() = delete; + Array(const Array&) = delete; // Some supported compilers are not sufficiently C++11 compliant // for default move constructor and move assignment operator. @@ -379,27 +368,24 @@ public: // Array & operator = ( Array && rhs ) = delete ; KOKKOS_INLINE_FUNCTION - Array & operator = ( const Array & rhs ) - { - const size_t n = std::min( m_size , rhs.size() ); - for ( size_t i = 0 ; i < n ; ++i ) m_elem[i] = rhs[i] ; - return *this ; - } + Array& operator=(const Array& rhs) { + const size_t n = std::min(m_size, rhs.size()); + for (size_t i = 0; i < n; ++i) m_elem[i] = rhs[i]; + return *this; + } - template< size_t N , class P > - KOKKOS_INLINE_FUNCTION - Array & operator = ( const Array & rhs ) - { - const size_t n = std::min( m_size , rhs.size() ); - for ( size_t i = 0 ; i < n ; ++i ) m_elem[i] = rhs[i] ; - return *this ; - } + template + KOKKOS_INLINE_FUNCTION Array& operator=(const Array& rhs) { + const size_t n = std::min(m_size, rhs.size()); + for (size_t i = 0; i < n; ++i) m_elem[i] = rhs[i]; + return *this; + } - KOKKOS_INLINE_FUNCTION constexpr Array( pointer arg_ptr , size_type arg_size , size_type arg_stride ) - : m_elem(arg_ptr), m_size(arg_size), m_stride(arg_stride) {} + KOKKOS_INLINE_FUNCTION constexpr Array(pointer arg_ptr, size_type arg_size, + size_type arg_stride) + : m_elem(arg_ptr), m_size(arg_size), m_stride(arg_stride) {} }; -} // namespace Kokkos +} // namespace Kokkos #endif /* #ifndef KOKKOS_ARRAY_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_Atomic.hpp b/lib/kokkos/core/src/Kokkos_Atomic.hpp index c2268bd35f..c4f7fa3ec1 100644 --- a/lib/kokkos/core/src/Kokkos_Atomic.hpp +++ b/lib/kokkos/core/src/Kokkos_Atomic.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -75,7 +76,7 @@ #if defined(_WIN32) #define KOKKOS_ENABLE_WINDOWS_ATOMICS #else -#if defined( KOKKOS_ENABLE_CUDA ) +#if defined(KOKKOS_ENABLE_CUDA) // Compiling NVIDIA device code, must use Cuda atomics: @@ -87,32 +88,30 @@ #endif -#if ! defined( KOKKOS_ENABLE_GNU_ATOMICS ) && \ - ! defined( KOKKOS_ENABLE_INTEL_ATOMICS ) && \ - ! defined( KOKKOS_ENABLE_OPENMP_ATOMICS ) && \ - ! defined( KOKKOS_ENABLE_STD_ATOMICS ) && \ - ! defined( KOKKOS_ENABLE_SERIAL_ATOMICS ) +#if !defined(KOKKOS_ENABLE_GNU_ATOMICS) && \ + !defined(KOKKOS_ENABLE_INTEL_ATOMICS) && \ + !defined(KOKKOS_ENABLE_OPENMP_ATOMICS) && \ + !defined(KOKKOS_ENABLE_STD_ATOMICS) && \ + !defined(KOKKOS_ENABLE_SERIAL_ATOMICS) // Compiling for non-Cuda atomic implementation has not been pre-selected. // Choose the best implementation for the detected compiler. // Preference: GCC, INTEL, OMP31 -#if defined( KOKKOS_INTERNAL_NOT_PARALLEL ) +#if defined(KOKKOS_INTERNAL_NOT_PARALLEL) #define KOKKOS_ENABLE_SERIAL_ATOMICS -#elif defined( KOKKOS_COMPILER_GNU ) || \ - defined( KOKKOS_COMPILER_CLANG ) || \ - ( defined ( KOKKOS_COMPILER_NVCC ) ) +#elif defined(KOKKOS_COMPILER_GNU) || defined(KOKKOS_COMPILER_CLANG) || \ + (defined(KOKKOS_COMPILER_NVCC)) #define KOKKOS_ENABLE_GNU_ATOMICS -#elif defined( KOKKOS_COMPILER_INTEL ) || \ - defined( KOKKOS_COMPILER_CRAYC ) +#elif defined(KOKKOS_COMPILER_INTEL) || defined(KOKKOS_COMPILER_CRAYC) #define KOKKOS_ENABLE_INTEL_ATOMICS -#elif defined( _OPENMP ) && ( 201107 <= _OPENMP ) +#elif defined(_OPENMP) && (201107 <= _OPENMP) #define KOKKOS_ENABLE_OPENMP_ATOMICS @@ -131,43 +130,37 @@ namespace Kokkos { template -KOKKOS_INLINE_FUNCTION -void atomic_add(volatile T * const dest, const T src); +KOKKOS_INLINE_FUNCTION void atomic_add(volatile T* const dest, const T src); // Atomic increment -template -KOKKOS_INLINE_FUNCTION -void atomic_increment(volatile T* a); +template +KOKKOS_INLINE_FUNCTION void atomic_increment(volatile T* a); -template -KOKKOS_INLINE_FUNCTION -void atomic_decrement(volatile T* a); -} +template +KOKKOS_INLINE_FUNCTION void atomic_decrement(volatile T* a); +} // namespace Kokkos namespace Kokkos { - -inline -const char * atomic_query_version() -{ -#if defined( KOKKOS_ENABLE_CUDA_ATOMICS ) - return "KOKKOS_ENABLE_CUDA_ATOMICS" ; -#elif defined( KOKKOS_ENABLE_GNU_ATOMICS ) - return "KOKKOS_ENABLE_GNU_ATOMICS" ; -#elif defined( KOKKOS_ENABLE_INTEL_ATOMICS ) - return "KOKKOS_ENABLE_INTEL_ATOMICS" ; -#elif defined( KOKKOS_ENABLE_OPENMP_ATOMICS ) - return "KOKKOS_ENABLE_OPENMP_ATOMICS" ; -#elif defined( KOKKOS_ENABLE_WINDOWS_ATOMICS ) +inline const char* atomic_query_version() { +#if defined(KOKKOS_ENABLE_CUDA_ATOMICS) + return "KOKKOS_ENABLE_CUDA_ATOMICS"; +#elif defined(KOKKOS_ENABLE_GNU_ATOMICS) + return "KOKKOS_ENABLE_GNU_ATOMICS"; +#elif defined(KOKKOS_ENABLE_INTEL_ATOMICS) + return "KOKKOS_ENABLE_INTEL_ATOMICS"; +#elif defined(KOKKOS_ENABLE_OPENMP_ATOMICS) + return "KOKKOS_ENABLE_OPENMP_ATOMICS"; +#elif defined(KOKKOS_ENABLE_WINDOWS_ATOMICS) return "KOKKOS_ENABLE_WINDOWS_ATOMICS"; -#elif defined( KOKKOS_ENABLE_SERIAL_ATOMICS ) +#elif defined(KOKKOS_ENABLE_SERIAL_ATOMICS) return "KOKKOS_ENABLE_SERIAL_ATOMICS"; #else #error "No valid response for atomic_query_version!" #endif } -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- // Atomic Memory Orders @@ -175,16 +168,14 @@ const char * atomic_query_version() // Implements Strongly-typed analogs of C++ standard memory orders #include "impl/Kokkos_Atomic_Memory_Order.hpp" -#if defined( KOKKOS_ENABLE_ROCM ) +#if defined(KOKKOS_ENABLE_ROCM) namespace Kokkos { namespace Impl { -extern KOKKOS_INLINE_FUNCTION -bool lock_address_rocm_space(void* ptr); +extern KOKKOS_INLINE_FUNCTION bool lock_address_rocm_space(void* ptr); -extern KOKKOS_INLINE_FUNCTION -void unlock_address_rocm_space(void* ptr); -} -} +extern KOKKOS_INLINE_FUNCTION void unlock_address_rocm_space(void* ptr); +} // namespace Impl +} // namespace Kokkos #include #endif @@ -212,8 +203,9 @@ void unlock_address_rocm_space(void* ptr); // Atomic compare-and-exchange // // template -// bool atomic_compare_exchange_strong(volatile T* const dest, const T compare, const T val) -// { bool equal = compare == *dest ; if ( equal ) { *dest = val ; } return equal ; } +// bool atomic_compare_exchange_strong(volatile T* const dest, const T compare, +// const T val) { bool equal = compare == *dest ; if ( equal ) { *dest = val ; } +// return equal ; } #include "impl/Kokkos_Atomic_Compare_Exchange_Strong.hpp" @@ -275,7 +267,8 @@ void unlock_address_rocm_space(void* ptr); //---------------------------------------------------------------------------- // Memory fence // -// All loads and stores from this thread will be globally consistent before continuing +// All loads and stores from this thread will be globally consistent before +// continuing // // void memory_fence() {...}; #include "impl/Kokkos_Memory_Fence.hpp" @@ -301,23 +294,22 @@ void unlock_address_rocm_space(void* ptr); #include "impl/Kokkos_Atomic_Load.hpp" #include "impl/Kokkos_Atomic_Store.hpp" - //---------------------------------------------------------------------------- // This atomic-style macro should be an inlined function, not a macro -#if defined( KOKKOS_COMPILER_GNU ) && !defined(__PGIC__) && !defined(__CUDA_ARCH__) +#if defined(KOKKOS_COMPILER_GNU) && !defined(__PGIC__) && \ + !defined(__CUDA_ARCH__) - #define KOKKOS_NONTEMPORAL_PREFETCH_LOAD(addr) __builtin_prefetch(addr,0,0) - #define KOKKOS_NONTEMPORAL_PREFETCH_STORE(addr) __builtin_prefetch(addr,1,0) +#define KOKKOS_NONTEMPORAL_PREFETCH_LOAD(addr) __builtin_prefetch(addr, 0, 0) +#define KOKKOS_NONTEMPORAL_PREFETCH_STORE(addr) __builtin_prefetch(addr, 1, 0) #else - #define KOKKOS_NONTEMPORAL_PREFETCH_LOAD(addr) ((void)0) - #define KOKKOS_NONTEMPORAL_PREFETCH_STORE(addr) ((void)0) +#define KOKKOS_NONTEMPORAL_PREFETCH_LOAD(addr) ((void)0) +#define KOKKOS_NONTEMPORAL_PREFETCH_STORE(addr) ((void)0) #endif //---------------------------------------------------------------------------- #endif /* KOKKOS_ATOMIC_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_Complex.hpp b/lib/kokkos/core/src/Kokkos_Complex.hpp index a3ada5d55e..a9af073b41 100644 --- a/lib/kokkos/core/src/Kokkos_Complex.hpp +++ b/lib/kokkos/core/src/Kokkos_Complex.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -57,658 +58,683 @@ namespace Kokkos { /// complex number. As with std::complex, this is only defined for /// \c float, \c double, and long double. The latter is /// currently forbidden in CUDA device kernels. -template -class complex { -private: - RealType re_, im_; +template +class +#ifdef KOKKOS_ENABLE_COMPLEX_ALIGN + alignas(2 * sizeof(RealType)) +#endif + complex { + private: + RealType re_{}; + RealType im_{}; -public: + public: //! The type of the real or imaginary parts of this complex number. - typedef RealType value_type; + using value_type = RealType; //! Default constructor (initializes both real and imaginary parts to zero). - KOKKOS_INLINE_FUNCTION complex () : - re_ (0.0), im_ (0.0) - {} + KOKKOS_INLINE_FUNCTION + complex() noexcept = default; //! Copy constructor. - KOKKOS_INLINE_FUNCTION complex (const complex& src) : - re_ (src.re_), im_ (src.im_) - {} + KOKKOS_INLINE_FUNCTION + complex(const complex&) noexcept = default; - //! Copy constructor from volatile. - KOKKOS_INLINE_FUNCTION complex (const volatile complex& src) : - re_ (src.re_), im_ (src.im_) - {} + KOKKOS_INLINE_FUNCTION + complex& operator=(const complex&) noexcept = default; + + /// \brief Conversion constructor from compatible RType + template ::value, + int>::type = 0> + KOKKOS_INLINE_FUNCTION complex(const complex& other) noexcept + // Intentionally do the conversions implicitly here so that users don't + // get any warnings about narrowing, etc., that they would expect to get + // otherwise. + : re_(other.real()), im_(other.imag()) {} /// \brief Conversion constructor from std::complex. /// /// This constructor cannot be called in a CUDA device function, /// because std::complex's methods and nonmember functions are not /// marked as CUDA device functions. - template - complex (const std::complex& src) : - re_ (std::real (src)), im_ (std::imag (src)) - {} + KOKKOS_INLINE_FUNCTION + complex(const std::complex& src) noexcept + // We can use this aspect of the standard to avoid calling + // non-device-marked functions `std::real` and `std::imag`: "For any + // object z of type complex, reinterpret_cast(z)[0] is the + // real part of z and reinterpret_cast(z)[1] is the imaginary + // part of z." Now we don't have to provide a whole bunch of the overloads + // of things taking either Kokkos::complex or std::complex + : re_(reinterpret_cast(src)[0]), + im_(reinterpret_cast(src)[1]) {} /// \brief Conversion operator to std::complex. /// /// This operator cannot be called in a CUDA device function, /// because std::complex's methods and nonmember functions are not /// marked as CUDA device functions. - operator std::complex () const { - return std::complex (re_, im_); + // TODO: make explicit. DJS 2019-08-28 + operator std::complex() const noexcept { + return std::complex(re_, im_); } /// \brief Constructor that takes just the real part, and sets the /// imaginary part to zero. - template - KOKKOS_INLINE_FUNCTION complex (const InputRealType& val) : - re_ (val), im_ (static_cast(0.0)) - {} + KOKKOS_INLINE_FUNCTION complex(const RealType& val) noexcept + : re_(val), im_(static_cast(0)) {} - // BUG HCC WORKAROUND - KOKKOS_INLINE_FUNCTION complex( const RealType& re, const RealType& im): - re_ (re), im_ (im) - {} - //! Constructor that takes the real and imaginary parts. - template - KOKKOS_INLINE_FUNCTION complex (const RealType1& re, const RealType2& im) : - re_ (re), im_ (im) - {} - - //! Assignment operator. - template KOKKOS_INLINE_FUNCTION - complex& operator= (const complex& src) { - re_ = src.re_; - im_ = src.im_; - return *this; - } - - /// \brief Assignment operator, for volatile *this and - /// nonvolatile input. - /// - /// \param src [in] Input; right-hand side of the assignment. - /// - /// This operator returns \c void instead of volatile - /// complex& . See Kokkos Issue #177 for the - /// explanation. In practice, this means that you should not chain - /// assignments with volatile lvalues. - template - KOKKOS_INLINE_FUNCTION - void operator= (const complex& src) volatile { - re_ = src.re_; - im_ = src.im_; - // We deliberately do not return anything here. See explanation - // in public documentation above. - } - - //! Assignment operator. - template - KOKKOS_INLINE_FUNCTION - volatile complex& operator= (const volatile complex& src) volatile { - re_ = src.re_; - im_ = src.im_; - return *this; - } - - //! Assignment operator. - template - KOKKOS_INLINE_FUNCTION - complex& operator= (const volatile complex& src) { - re_ = src.re_; - im_ = src.im_; - return *this; - } + complex(const RealType& re, const RealType& im) noexcept : re_(re), im_(im) {} //! Assignment operator (from a real number). - template - KOKKOS_INLINE_FUNCTION - complex& operator= (const InputRealType& val) { + KOKKOS_INLINE_FUNCTION complex& operator=(const RealType& val) noexcept { re_ = val; - im_ = static_cast (0.0); + im_ = RealType(0); return *this; } - //! Assignment operator (from a real number). - template - KOKKOS_INLINE_FUNCTION - void operator= (const InputRealType& val) volatile { - re_ = val; - im_ = static_cast (0.0); - } - /// \brief Assignment operator from std::complex. /// /// This constructor cannot be called in a CUDA device function, /// because std::complex's methods and nonmember functions are not /// marked as CUDA device functions. - template - complex& operator= (const std::complex& src) { - re_ = std::real (src); - im_ = std::imag (src); + complex& operator=(const std::complex& src) noexcept { + *this = complex(src); return *this; } //! The imaginary part of this complex number. - KOKKOS_INLINE_FUNCTION RealType& imag () { - return im_; - } + KOKKOS_INLINE_FUNCTION + KOKKOS_CONSTEXPR_14 RealType& imag() noexcept { return im_; } //! The real part of this complex number. - KOKKOS_INLINE_FUNCTION RealType& real () { - return re_; - } + KOKKOS_INLINE_FUNCTION + KOKKOS_CONSTEXPR_14 RealType& real() noexcept { return re_; } //! The imaginary part of this complex number. - KOKKOS_INLINE_FUNCTION const RealType imag () const { - return im_; - } + KOKKOS_INLINE_FUNCTION + constexpr RealType imag() const noexcept { return im_; } //! The real part of this complex number. - KOKKOS_INLINE_FUNCTION const RealType real () const { - return re_; - } - - //! The imaginary part of this complex number (volatile overload). - KOKKOS_INLINE_FUNCTION volatile RealType& imag () volatile { - return im_; - } - - //! The real part of this complex number (volatile overload). - KOKKOS_INLINE_FUNCTION volatile RealType& real () volatile { - return re_; - } - - //! The imaginary part of this complex number (volatile overload). - KOKKOS_INLINE_FUNCTION const RealType imag () const volatile { - return im_; - } - - //! The real part of this complex number (volatile overload). - KOKKOS_INLINE_FUNCTION const RealType real () const volatile { - return re_; - } + KOKKOS_INLINE_FUNCTION + constexpr RealType real() const noexcept { return re_; } //! Set the imaginary part of this complex number. - KOKKOS_INLINE_FUNCTION void imag (RealType v) { - im_ = v; - } + KOKKOS_INLINE_FUNCTION + KOKKOS_CONSTEXPR_14 + void imag(RealType v) noexcept { im_ = v; } //! Set the real part of this complex number. - KOKKOS_INLINE_FUNCTION void real (RealType v) { - re_ = v; - } - - template KOKKOS_INLINE_FUNCTION - complex& - operator += (const complex& src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); + KOKKOS_CONSTEXPR_14 + void real(RealType v) noexcept { re_ = v; } + + KOKKOS_CONSTEXPR_14 KOKKOS_INLINE_FUNCTION complex& operator+=( + const complex& src) noexcept { re_ += src.re_; im_ += src.im_; return *this; } - template - KOKKOS_INLINE_FUNCTION - void - operator += (const volatile complex& src) volatile { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); - re_ += src.re_; - im_ += src.im_; - } - - KOKKOS_INLINE_FUNCTION - complex& - operator += (const std::complex& src) { - re_ += src.real(); - im_ += src.imag(); - return *this; - } - - template - KOKKOS_INLINE_FUNCTION - complex& - operator += (const InputRealType& src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); + KOKKOS_CONSTEXPR_14 KOKKOS_INLINE_FUNCTION complex& operator+=( + const RealType& src) noexcept { re_ += src; return *this; } - template - KOKKOS_INLINE_FUNCTION - void - operator += (const volatile InputRealType& src) volatile { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); - re_ += src; - } - - template - KOKKOS_INLINE_FUNCTION - complex& - operator -= (const complex& src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); + KOKKOS_CONSTEXPR_14 KOKKOS_INLINE_FUNCTION complex& operator-=( + const complex& src) noexcept { re_ -= src.re_; im_ -= src.im_; return *this; } - KOKKOS_INLINE_FUNCTION - complex& - operator -= (const std::complex& src) { - re_ -= src.real(); - im_ -= src.imag(); - return *this; - } - - template - KOKKOS_INLINE_FUNCTION - complex& - operator -= (const InputRealType& src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); + KOKKOS_CONSTEXPR_14 KOKKOS_INLINE_FUNCTION complex& operator-=( + const RealType& src) noexcept { re_ -= src; return *this; } - template - KOKKOS_INLINE_FUNCTION - complex& - operator *= (const complex& src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); + KOKKOS_CONSTEXPR_14 KOKKOS_INLINE_FUNCTION complex& operator*=( + const complex& src) noexcept { const RealType realPart = re_ * src.re_ - im_ * src.im_; const RealType imagPart = re_ * src.im_ + im_ * src.re_; - re_ = realPart; - im_ = imagPart; + re_ = realPart; + im_ = imagPart; return *this; } - template - KOKKOS_INLINE_FUNCTION - void - operator *= (const volatile complex& src) volatile { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); - const RealType realPart = re_ * src.re_ - im_ * src.im_; - const RealType imagPart = re_ * src.im_ + im_ * src.re_; - re_ = realPart; - im_ = imagPart; - } - - KOKKOS_INLINE_FUNCTION - complex& - operator *= (const std::complex& src) { - const RealType realPart = re_ * src.real() - im_ * src.imag(); - const RealType imagPart = re_ * src.imag() + im_ * src.real(); - re_ = realPart; - im_ = imagPart; - return *this; - } - - template - KOKKOS_INLINE_FUNCTION - complex& - operator *= (const InputRealType& src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); + KOKKOS_CONSTEXPR_14 KOKKOS_INLINE_FUNCTION complex& operator*=( + const RealType& src) noexcept { re_ *= src; im_ *= src; return *this; } - template - KOKKOS_INLINE_FUNCTION - void - operator *= (const volatile InputRealType& src) volatile { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); - re_ *= src; - im_ *= src; - } - - template - KOKKOS_INLINE_FUNCTION - complex& - operator /= (const complex& y) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); - + // Conditional noexcept, just in case RType throws on divide-by-zero + KOKKOS_CONSTEXPR_14 KOKKOS_INLINE_FUNCTION complex& operator/=( + const complex& y) noexcept(noexcept(RealType{} / RealType{})) { // Scale (by the "1-norm" of y) to avoid unwarranted overflow. // If the real part is +/-Inf and the imaginary part is -/+Inf, // this won't change the result. - const RealType s = std::fabs (y.real ()) + std::fabs (y.imag ()); + const RealType s = std::fabs(y.real()) + std::fabs(y.imag()); // If s is 0, then y is zero, so x/y == real(x)/0 + i*imag(x)/0. // In that case, the relation x/y == (x/s) / (y/s) doesn't hold, // because y/s is NaN. - if (s == 0.0) { + // TODO mark this branch unlikely + if (s == RealType(0)) { this->re_ /= s; this->im_ /= s; - } - else { - const complex x_scaled (this->re_ / s, this->im_ / s); - const complex y_conj_scaled (y.re_ / s, -(y.im_) / s); - const RealType y_scaled_abs = y_conj_scaled.re_ * y_conj_scaled.re_ + - y_conj_scaled.im_ * y_conj_scaled.im_; // abs(y) == abs(conj(y)) - *this = x_scaled * y_conj_scaled; - *this /= y_scaled_abs; - } - return *this; - } - - KOKKOS_INLINE_FUNCTION - complex& - operator /= (const std::complex& y) { - - // Scale (by the "1-norm" of y) to avoid unwarranted overflow. - // If the real part is +/-Inf and the imaginary part is -/+Inf, - // this won't change the result. - const RealType s = std::fabs (y.real ()) + std::fabs (y.imag ()); - - // If s is 0, then y is zero, so x/y == real(x)/0 + i*imag(x)/0. - // In that case, the relation x/y == (x/s) / (y/s) doesn't hold, - // because y/s is NaN. - if (s == 0.0) { - this->re_ /= s; - this->im_ /= s; - } - else { - const complex x_scaled (this->re_ / s, this->im_ / s); - const complex y_conj_scaled (y.re_ / s, -(y.im_) / s); - const RealType y_scaled_abs = y_conj_scaled.re_ * y_conj_scaled.re_ + - y_conj_scaled.im_ * y_conj_scaled.im_; // abs(y) == abs(conj(y)) + } else { + const complex x_scaled(this->re_ / s, this->im_ / s); + const complex y_conj_scaled(y.re_ / s, -(y.im_) / s); + const RealType y_scaled_abs = + y_conj_scaled.re_ * y_conj_scaled.re_ + + y_conj_scaled.im_ * y_conj_scaled.im_; // abs(y) == abs(conj(y)) *this = x_scaled * y_conj_scaled; *this /= y_scaled_abs; } return *this; } + KOKKOS_CONSTEXPR_14 + KOKKOS_INLINE_FUNCTION complex& operator/=( + const std::complex& y) noexcept(noexcept(RealType{} / + RealType{})) { + // Scale (by the "1-norm" of y) to avoid unwarranted overflow. + // If the real part is +/-Inf and the imaginary part is -/+Inf, + // this won't change the result. + const RealType s = std::fabs(y.real()) + std::fabs(y.imag()); - template - KOKKOS_INLINE_FUNCTION - complex& - operator /= (const InputRealType& src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); + // If s is 0, then y is zero, so x/y == real(x)/0 + i*imag(x)/0. + // In that case, the relation x/y == (x/s) / (y/s) doesn't hold, + // because y/s is NaN. + if (s == RealType(0)) { + this->re_ /= s; + this->im_ /= s; + } else { + const complex x_scaled(this->re_ / s, this->im_ / s); + const complex y_conj_scaled(y.re_ / s, -(y.im_) / s); + const RealType y_scaled_abs = + y_conj_scaled.re_ * y_conj_scaled.re_ + + y_conj_scaled.im_ * y_conj_scaled.im_; // abs(y) == abs(conj(y)) + *this = x_scaled * y_conj_scaled; + *this /= y_scaled_abs; + } + return *this; + } + KOKKOS_CONSTEXPR_14 KOKKOS_INLINE_FUNCTION complex& operator/=( + const RealType& src) noexcept(noexcept(RealType{} / RealType{})) { re_ /= src; im_ /= src; return *this; } - template - KOKKOS_INLINE_FUNCTION - bool - operator == (const complex& src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); + //--------------------------------------------------------------------------- + // TODO: refactor Kokkos reductions to remove dependency on + // volatile member overloads since they are being deprecated in c++20 + //--------------------------------------------------------------------------- - return (re_ == static_cast(src.re_)) && (im_ == static_cast(src.im_)); + //! Copy constructor from volatile. + template ::value, + int>::type = 0> + KOKKOS_INLINE_FUNCTION complex(const volatile complex& src) noexcept + // Intentionally do the conversions implicitly here so that users don't + // get any warnings about narrowing, etc., that they would expect to get + // otherwise. + : re_(src.re_), im_(src.im_) {} + + /// \brief Assignment operator, for volatile *this and + /// nonvolatile input. + /// + /// \param src [in] Input; right-hand side of the assignment. + /// + /// This operator returns \c void instead of volatile + /// complex& . See Kokkos Issue #177 for the + /// explanation. In practice, this means that you should not chain + /// assignments with volatile lvalues. + KOKKOS_INLINE_FUNCTION void operator=( + const complex& src) volatile noexcept { + re_ = src.re_; + im_ = src.im_; + // We deliberately do not return anything here. See explanation + // in public documentation above. } - KOKKOS_INLINE_FUNCTION - bool - operator == (const std::complex& src) { - return (re_ == src.real()) && (im_ == src.imag()); + //! Assignment operator, volatile LHS and volatile RHS + // TODO Should this return void like the other volatile assignment operators? + KOKKOS_INLINE_FUNCTION volatile complex& operator=( + const volatile complex& src) volatile noexcept { + re_ = src.re_; + im_ = src.im_; + return *this; } - template - KOKKOS_INLINE_FUNCTION - bool - operator == (const InputRealType src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); - - return (re_ == static_cast(src)) && (im_ == RealType(0)); + //! Assignment operator, volatile RHS and non-volatile LHS + KOKKOS_INLINE_FUNCTION complex& operator=( + const volatile complex& src) noexcept { + re_ = src.re_; + im_ = src.im_; + return *this; } - template - KOKKOS_INLINE_FUNCTION - bool - operator != (const complex& src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); + // Mirroring the behavior of the assignment operators from complex RHS in the + // RealType RHS versions. - return (re_ != static_cast(src.re_)) || (im_ != static_cast(src.im_)); + //! Assignment operator (from a volatile real number). + KOKKOS_INLINE_FUNCTION void operator=(const volatile RealType& val) noexcept { + re_ = val; + im_ = RealType(0); + // We deliberately do not return anything here. See explanation + // in public documentation above. } - KOKKOS_INLINE_FUNCTION - bool - operator != (const std::complex& src) { - return (re_ != src.real()) || (im_ != src.imag()); + //! Assignment operator volatile LHS and non-volatile RHS + KOKKOS_INLINE_FUNCTION complex& operator=( + const RealType& val) volatile noexcept { + re_ = val; + im_ = RealType(0); + return *this; } - template - KOKKOS_INLINE_FUNCTION - bool - operator != (const InputRealType src) { - static_assert(std::is_convertible::value, - "InputRealType must be convertible to RealType"); - - return (re_ != static_cast(src)) || (im_ != RealType(0)); + //! Assignment operator volatile LHS and volatile RHS + // TODO Should this return void like the other volatile assignment operators? + KOKKOS_INLINE_FUNCTION complex& operator=( + const volatile RealType& val) volatile noexcept { + re_ = val; + im_ = RealType(0); + return *this; } - + + //! The imaginary part of this complex number (volatile overload). + KOKKOS_INLINE_FUNCTION + volatile RealType& imag() volatile noexcept { return im_; } + + //! The real part of this complex number (volatile overload). + KOKKOS_INLINE_FUNCTION + volatile RealType& real() volatile noexcept { return re_; } + + //! The imaginary part of this complex number (volatile overload). + KOKKOS_INLINE_FUNCTION + RealType imag() const volatile noexcept { return im_; } + + //! The real part of this complex number (volatile overload). + KOKKOS_INLINE_FUNCTION + RealType real() const volatile noexcept { return re_; } + + KOKKOS_INLINE_FUNCTION void operator+=( + const volatile complex& src) volatile noexcept { + re_ += src.re_; + im_ += src.im_; + } + + KOKKOS_INLINE_FUNCTION void operator+=( + const volatile RealType& src) volatile noexcept { + re_ += src; + } + + KOKKOS_INLINE_FUNCTION void operator*=( + const volatile complex& src) volatile noexcept { + const RealType realPart = re_ * src.re_ - im_ * src.im_; + const RealType imagPart = re_ * src.im_ + im_ * src.re_; + + re_ = realPart; + im_ = imagPart; + } + + KOKKOS_INLINE_FUNCTION void operator*=( + const volatile RealType& src) volatile noexcept { + re_ *= src; + im_ *= src; + } + + // TODO DSH 2019-10-7 why are there no volatile /= and friends? }; +//============================================================================== +// {{{1 + +// Note that this is not the same behavior as std::complex, which doesn't allow +// implicit conversions, but since this is the way we had it before, we have +// to do it this way now. + +//! Binary == operator for complex complex. +template +KOKKOS_INLINE_FUNCTION bool operator==(complex const& x, + complex const& y) noexcept { + using common_type = typename std::common_type::type; + return common_type(x.real()) == common_type(y.real()) && + common_type(x.imag()) == common_type(y.imag()); +} + +// TODO (here and elsewhere) decide if we should convert to a Kokkos::complex +// and do the comparison in a device-marked function +//! Binary == operator for std::complex complex. +template +inline bool operator==(std::complex const& x, + complex const& y) noexcept { + using common_type = typename std::common_type::type; + return common_type(x.real()) == common_type(y.real()) && + common_type(x.imag()) == common_type(y.imag()); +} + +//! Binary == operator for complex std::complex. +template +inline bool operator==(complex const& x, + std::complex const& y) noexcept { + using common_type = typename std::common_type::type; + return common_type(x.real()) == common_type(y.real()) && + common_type(x.imag()) == common_type(y.imag()); +} + +//! Binary == operator for complex real. +template < + class RealType1, class RealType2, + // Constraints to avoid participation in oparator==() for every possible RHS + typename std::enable_if::value, + int>::type = 0> +KOKKOS_INLINE_FUNCTION bool operator==(complex const& x, + RealType2 const& y) noexcept { + using common_type = typename std::common_type::type; + return common_type(x.real()) == common_type(y) && + common_type(x.imag()) == common_type(0); +} + +//! Binary == operator for real complex. +template < + class RealType1, class RealType2, + // Constraints to avoid participation in oparator==() for every possible RHS + typename std::enable_if::value, + int>::type = 0> +KOKKOS_INLINE_FUNCTION bool operator==(RealType1 const& x, + complex const& y) noexcept { + using common_type = typename std::common_type::type; + return common_type(x) == common_type(y.real()) && + common_type(0) == common_type(y.imag()); +} + +//! Binary != operator for complex complex. +template +KOKKOS_INLINE_FUNCTION bool operator!=(complex const& x, + complex const& y) noexcept { + using common_type = typename std::common_type::type; + return common_type(x.real()) != common_type(y.real()) || + common_type(x.imag()) != common_type(y.imag()); +} + +//! Binary != operator for std::complex complex. +template +inline bool operator!=(std::complex const& x, + complex const& y) noexcept { + using common_type = typename std::common_type::type; + return common_type(x.real()) != common_type(y.real()) || + common_type(x.imag()) != common_type(y.imag()); +} + +//! Binary != operator for complex std::complex. +template +inline bool operator!=(complex const& x, + std::complex const& y) noexcept { + using common_type = typename std::common_type::type; + return common_type(x.real()) != common_type(y.real()) || + common_type(x.imag()) != common_type(y.imag()); +} + +//! Binary != operator for complex real. +template < + class RealType1, class RealType2, + // Constraints to avoid participation in oparator==() for every possible RHS + typename std::enable_if::value, + int>::type = 0> +KOKKOS_INLINE_FUNCTION bool operator!=(complex const& x, + RealType2 const& y) noexcept { + using common_type = typename std::common_type::type; + return common_type(x.real()) != common_type(y) || + common_type(x.imag()) != common_type(0); +} + +//! Binary != operator for real complex. +template < + class RealType1, class RealType2, + // Constraints to avoid participation in oparator==() for every possible RHS + typename std::enable_if::value, + int>::type = 0> +KOKKOS_INLINE_FUNCTION bool operator!=(RealType1 const& x, + complex const& y) noexcept { + using common_type = typename std::common_type::type; + return common_type(x) != common_type(y.real()) || + common_type(0) != common_type(y.imag()); +} + +// end Equality and inequality }}}1 +//============================================================================== //! Binary + operator for complex complex. -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator + (const complex& x, const complex& y) { - return complex::type > (x.real () + y.real (), x.imag () + y.imag ()); + complex::type> + operator+(const complex& x, + const complex& y) noexcept { + return complex::type>( + x.real() + y.real(), x.imag() + y.imag()); } //! Binary + operator for complex scalar. -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator + (const complex& x, const RealType2& y) { - return complex::type> (x.real () + y , x.imag ()); + complex::type> + operator+(const complex& x, const RealType2& y) noexcept { + return complex::type>( + x.real() + y, x.imag()); } //! Binary + operator for scalar complex. -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator + (const RealType1& x, const complex& y) { - return complex::type> (x + y.real (), y.imag ()); + complex::type> + operator+(const RealType1& x, const complex& y) noexcept { + return complex::type>( + x + y.real(), y.imag()); } //! Unary + operator for complex. -template -KOKKOS_INLINE_FUNCTION -complex -operator + (const complex& x) { - return x; +template +KOKKOS_INLINE_FUNCTION complex operator+( + const complex& x) noexcept { + return complex{+x.real(), +x.imag()}; } //! Binary - operator for complex. -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator - (const complex& x, const complex& y) { - return complex::type> (x.real () - y.real (), x.imag () - y.imag ()); + complex::type> + operator-(const complex& x, + const complex& y) noexcept { + return complex::type>( + x.real() - y.real(), x.imag() - y.imag()); } //! Binary - operator for complex scalar. -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator - (const complex& x, const RealType2& y) { - return complex::type> (x.real () - y , x.imag ()); + complex::type> + operator-(const complex& x, const RealType2& y) noexcept { + return complex::type>( + x.real() - y, x.imag()); } //! Binary - operator for scalar complex. -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator - (const RealType1& x, const complex& y) { - return complex::type> (x - y.real (), - y.imag ()); + complex::type> + operator-(const RealType1& x, const complex& y) noexcept { + return complex::type>( + x - y.real(), -y.imag()); } //! Unary - operator for complex. -template -KOKKOS_INLINE_FUNCTION -complex -operator - (const complex& x) { - return complex (-x.real (), -x.imag ()); +template +KOKKOS_INLINE_FUNCTION complex operator-( + const complex& x) noexcept { + return complex(-x.real(), -x.imag()); } //! Binary * operator for complex. -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator * (const complex& x, const complex& y) { - return complex::type> (x.real () * y.real () - x.imag () * y.imag (), - x.real () * y.imag () + x.imag () * y.real ()); + complex::type> + operator*(const complex& x, + const complex& y) noexcept { + return complex::type>( + x.real() * y.real() - x.imag() * y.imag(), + x.real() * y.imag() + x.imag() * y.real()); } /// \brief Binary * operator for std::complex and complex. /// -/// This function exists because GCC 4.7.2 (and perhaps other -/// compilers) are not able to deduce that they can multiply -/// std::complex by Kokkos::complex, by first converting std::complex -/// to Kokkos::complex. +/// This needs to exist because template parameters can't be deduced when +/// conversions occur. We could probably fix this using hidden friends patterns /// /// This function cannot be called in a CUDA device function, because /// std::complex's methods and nonmember functions are not marked as /// CUDA device functions. -template -inline -complex::type> -operator * (const std::complex& x, const complex& y) { - return complex::type> (x.real () * y.real () - x.imag () * y.imag (), - x.real () * y.imag () + x.imag () * y.real ()); +template +inline complex::type> operator*( + const std::complex& x, const complex& y) { + return complex::type>( + x.real() * y.real() - x.imag() * y.imag(), + x.real() * y.imag() + x.imag() * y.real()); } /// \brief Binary * operator for RealType times complex. /// /// This function exists because the compiler doesn't know that /// RealType and complex commute with respect to operator*. -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator * (const RealType1& x, const complex& y) { - return complex::type> (x * y.real (), x * y.imag ()); + complex::type> + operator*(const RealType1& x, const complex& y) noexcept { + return complex::type>( + x * y.real(), x * y.imag()); } /// \brief Binary * operator for RealType times complex. /// /// This function exists because the compiler doesn't know that /// RealType and complex commute with respect to operator*. -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator * (const complex& y, const RealType2& x) { - return complex::type> (x * y.real (), x * y.imag ()); + complex::type> + operator*(const complex& y, const RealType2& x) noexcept { + return complex::type>( + x * y.real(), x * y.imag()); } //! Imaginary part of a complex number. -template -KOKKOS_INLINE_FUNCTION -RealType imag (const complex& x) { - return x.imag (); +template +KOKKOS_INLINE_FUNCTION RealType imag(const complex& x) noexcept { + return x.imag(); } //! Real part of a complex number. -template -KOKKOS_INLINE_FUNCTION -RealType real (const complex& x) { - return x.real (); +template +KOKKOS_INLINE_FUNCTION RealType real(const complex& x) noexcept { + return x.real(); } //! Absolute value (magnitude) of a complex number. -template -KOKKOS_INLINE_FUNCTION -RealType abs (const complex& x) { +template +KOKKOS_INLINE_FUNCTION RealType abs(const complex& x) { #ifndef __CUDA_ARCH__ using std::hypot; #endif - return hypot(x.real(),x.imag()); + return hypot(x.real(), x.imag()); } //! Power of a complex number -template -KOKKOS_INLINE_FUNCTION -Kokkos::complex pow (const complex& x, const RealType& e) { - RealType r = abs(x); - RealType phi = std::atan(x.imag()/x.real()); - return std::pow(r,e) * Kokkos::complex(std::cos(phi*e),std::sin(phi*e)); +template +KOKKOS_INLINE_FUNCTION Kokkos::complex pow(const complex& x, + const RealType& e) { + RealType r = abs(x); + RealType phi = std::atan(x.imag() / x.real()); + return std::pow(r, e) * + Kokkos::complex(std::cos(phi * e), std::sin(phi * e)); } //! Square root of a complex number. -template -KOKKOS_INLINE_FUNCTION -Kokkos::complex sqrt (const complex& x) { - RealType r = abs(x); - RealType phi = std::atan(x.imag()/x.real()); - return std::sqrt(r) * Kokkos::complex(std::cos(phi*0.5),std::sin(phi*0.5)); +template +KOKKOS_INLINE_FUNCTION Kokkos::complex sqrt( + const complex& x) { + RealType r = abs(x); + RealType phi = std::atan(x.imag() / x.real()); + return std::sqrt(r) * + Kokkos::complex(std::cos(phi * 0.5), std::sin(phi * 0.5)); } //! Conjugate of a complex number. -template -KOKKOS_INLINE_FUNCTION -complex conj (const complex& x) { - return complex (real (x), -imag (x)); +template +KOKKOS_INLINE_FUNCTION complex conj( + const complex& x) noexcept { + return complex(real(x), -imag(x)); } //! Exponential of a complex number. -template -KOKKOS_INLINE_FUNCTION -complex exp (const complex& x) { - return std::exp(x.real()) * complex (std::cos (x.imag()), std::sin(x.imag())); +template +KOKKOS_INLINE_FUNCTION complex exp(const complex& x) { + return std::exp(x.real()) * + complex(std::cos(x.imag()), std::sin(x.imag())); } /// This function cannot be called in a CUDA device function, /// because std::complex's methods and nonmember functions are not /// marked as CUDA device functions. -template -inline -complex -exp (const std::complex& c) { - return complex( std::exp( c.real() )*std::cos( c.imag() ), std::exp( c.real() )*std::sin( c.imag() ) ); +template +inline complex exp(const std::complex& c) { + return complex(std::exp(c.real()) * std::cos(c.imag()), + std::exp(c.real()) * std::sin(c.imag())); } //! Binary operator / for complex and real numbers -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator / (const complex& x, const RealType2& y) { - return complex::type> (real (x) / y, imag (x) / y); + complex::type> + operator/(const complex& x, + const RealType2& y) noexcept(noexcept(RealType1{} / + RealType2{})) { + return complex::type>( + real(x) / y, imag(x) / y); } //! Binary operator / for complex. -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator / (const complex& x, const complex& y) { + complex::type> + operator/(const complex& x, + const complex& y) noexcept(noexcept(RealType1{} / + RealType2{})) { // Scale (by the "1-norm" of y) to avoid unwarranted overflow. // If the real part is +/-Inf and the imaginary part is -/+Inf, // this won't change the result. - typedef typename std::common_type::type common_real_type; - const common_real_type s = std::fabs (real (y)) + std::fabs (imag (y)); + typedef + typename std::common_type::type common_real_type; + const common_real_type s = std::fabs(real(y)) + std::fabs(imag(y)); // If s is 0, then y is zero, so x/y == real(x)/0 + i*imag(x)/0. // In that case, the relation x/y == (x/s) / (y/s) doesn't hold, // because y/s is NaN. if (s == 0.0) { - return complex (real (x) / s, imag (x) / s); - } - else { - const complex x_scaled (real (x) / s, imag (x) / s); - const complex y_conj_scaled (real (y) / s, -imag (y) / s); - const RealType1 y_scaled_abs = real (y_conj_scaled) * real (y_conj_scaled) + - imag (y_conj_scaled) * imag (y_conj_scaled); // abs(y) == abs(conj(y)) + return complex(real(x) / s, imag(x) / s); + } else { + const complex x_scaled(real(x) / s, imag(x) / s); + const complex y_conj_scaled(real(y) / s, -imag(y) / s); + const RealType1 y_scaled_abs = + real(y_conj_scaled) * real(y_conj_scaled) + + imag(y_conj_scaled) * imag(y_conj_scaled); // abs(y) == abs(conj(y)) complex result = x_scaled * y_conj_scaled; result /= y_scaled_abs; return result; @@ -716,119 +742,43 @@ operator / (const complex& x, const complex& y) { } //! Binary operator / for complex and real numbers -template +template KOKKOS_INLINE_FUNCTION -complex::type> -operator / (const RealType1& x, const complex& y) { - return complex::type> (x)/y; + complex::type> + operator/(const RealType1& x, + const complex& y) noexcept(noexcept(RealType1{} / + RealType2{})) { + return complex::type>(x) / y; } -//! Equality operator for two complex numbers. -template -KOKKOS_INLINE_FUNCTION -bool -operator == (const complex& x, const complex& y) { - typedef typename std::common_type::type common_real_type; - return ( static_cast(real (x)) == static_cast(real (y)) && - static_cast(imag (x)) == static_cast(imag (y)) ); -} - -/// \brief Equality operator for std::complex and Kokkos::complex. -/// -/// This cannot be a device function, since std::real is not. -/// Otherwise, CUDA builds will give compiler warnings ("warning: -/// calling a constexpr __host__ function("real") from a __host__ -/// __device__ function("operator==") is not allowed"). -template -inline -bool -operator == (const std::complex& x, const complex& y) { - typedef typename std::common_type::type common_real_type; - return ( static_cast(std::real (x)) == static_cast(real (y)) && - static_cast(std::imag (x)) == static_cast(imag (y)) ); -} - -//! Equality operator for complex and real number. -template -KOKKOS_INLINE_FUNCTION -bool -operator == (const complex& x, const RealType2& y) { - typedef typename std::common_type::type common_real_type; - return ( static_cast(real (x)) == static_cast(y) && - static_cast(imag (x)) == static_cast(0.0) ); -} - -//! Equality operator for real and complex number. -template -KOKKOS_INLINE_FUNCTION -bool -operator == (const RealType1& x, const complex& y) { - return y == x; -} - -//! Inequality operator for two complex numbers. -template -KOKKOS_INLINE_FUNCTION -bool -operator != (const complex& x, const complex& y) { - typedef typename std::common_type::type common_real_type; - return ( static_cast(real (x)) != static_cast(real (y)) || - static_cast(imag (x)) != static_cast(imag (y)) ); -} - -//! Inequality operator for std::complex and Kokkos::complex. -template -inline -bool -operator != (const std::complex& x, const complex& y) { - typedef typename std::common_type::type common_real_type; - return ( static_cast(std::real (x)) != static_cast(real (y)) || - static_cast(std::imag (x)) != static_cast(imag (y)) ); -} - -//! Inequality operator for complex and real number. -template -KOKKOS_INLINE_FUNCTION -bool -operator != (const complex& x, const RealType2& y) { - typedef typename std::common_type::type common_real_type; - return ( static_cast(real (x)) != static_cast(y) || - static_cast(imag (x)) != static_cast(0.0) ); -} - -//! Inequality operator for real and complex number. -template -KOKKOS_INLINE_FUNCTION -bool -operator != (const RealType1& x, const complex& y) { - return y != x; -} - -template -std::ostream& operator << (std::ostream& os, const complex& x) { - const std::complex x_std (Kokkos::real (x), Kokkos::imag (x)); +template +std::ostream& operator<<(std::ostream& os, const complex& x) { + const std::complex x_std(Kokkos::real(x), Kokkos::imag(x)); os << x_std; return os; } -template -std::ostream& operator >> (std::ostream& os, complex& x) { +template +std::istream& operator>>(std::istream& is, complex& x) { std::complex x_std; - os >> x_std; - x = x_std; // only assigns on success of above - return os; + is >> x_std; + x = x_std; // only assigns on success of above + return is; } - -template +template struct reduction_identity > { typedef reduction_identity t_red_ident; - KOKKOS_FORCEINLINE_FUNCTION constexpr static Kokkos::complex sum() - {return Kokkos::complex(t_red_ident::sum(),t_red_ident::sum());} - KOKKOS_FORCEINLINE_FUNCTION constexpr static Kokkos::complex prod() - {return Kokkos::complex(t_red_ident::prod(),t_red_ident::sum());} + KOKKOS_FORCEINLINE_FUNCTION constexpr static Kokkos::complex + sum() noexcept { + return Kokkos::complex(t_red_ident::sum(), t_red_ident::sum()); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static Kokkos::complex + prod() noexcept { + return Kokkos::complex(t_red_ident::prod(), t_red_ident::sum()); + } }; -} // namespace Kokkos +} // namespace Kokkos -#endif // KOKKOS_COMPLEX_HPP +#endif // KOKKOS_COMPLEX_HPP diff --git a/lib/kokkos/core/src/Kokkos_Concepts.hpp b/lib/kokkos/core/src/Kokkos_Concepts.hpp index ca2e8b4eb6..abfa88e1d2 100644 --- a/lib/kokkos/core/src/Kokkos_Concepts.hpp +++ b/lib/kokkos/core/src/Kokkos_Concepts.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -54,245 +55,264 @@ namespace Kokkos { -//Schedules for Execution Policies +// Schedules for Execution Policies struct Static {}; struct Dynamic {}; -//Schedule Wrapper Type -template -struct Schedule -{ - static_assert( std::is_same::value - || std::is_same::value - , "Kokkos: Invalid Schedule<> type." - ); - using schedule_type = Schedule ; - using type = T; +// Schedule Wrapper Type +template +struct Schedule { + static_assert(std::is_same::value || + std::is_same::value, + "Kokkos: Invalid Schedule<> type."); + using schedule_type = Schedule; + using type = T; }; -//Specify Iteration Index Type -template -struct IndexType -{ - static_assert(std::is_integral::value,"Kokkos: Invalid IndexType<>."); - using index_type = IndexType ; - using type = T; +// Specify Iteration Index Type +template +struct IndexType { + static_assert(std::is_integral::value, "Kokkos: Invalid IndexType<>."); + using index_type = IndexType; + using type = T; }; namespace Experimental { - struct WorkItemProperty { - template - struct ImplWorkItemProperty { - static const unsigned value = Property; - using work_item_property = ImplWorkItemProperty; - }; - - constexpr static const ImplWorkItemProperty<0> None = ImplWorkItemProperty<0>(); - constexpr static const ImplWorkItemProperty<1> HintLightWeight = ImplWorkItemProperty<1>(); - constexpr static const ImplWorkItemProperty<2> HintHeavyWeight = ImplWorkItemProperty<2>(); - constexpr static const ImplWorkItemProperty<4> HintRegular = ImplWorkItemProperty<4>(); - constexpr static const ImplWorkItemProperty<8> HintIrregular = ImplWorkItemProperty<8>(); - typedef ImplWorkItemProperty<0> None_t; - typedef ImplWorkItemProperty<1> HintLightWeight_t; - typedef ImplWorkItemProperty<2> HintHeavyWeight_t; - typedef ImplWorkItemProperty<4> HintRegular_t; - typedef ImplWorkItemProperty<8> HintIrregular_t; +struct WorkItemProperty { + template + struct ImplWorkItemProperty { + static const unsigned value = Property; + using work_item_property = ImplWorkItemProperty; }; -template -inline constexpr WorkItemProperty::ImplWorkItemProperty operator | - (WorkItemProperty::ImplWorkItemProperty, WorkItemProperty::ImplWorkItemProperty) { - return WorkItemProperty::ImplWorkItemProperty(); + constexpr static const ImplWorkItemProperty<0> None = + ImplWorkItemProperty<0>(); + constexpr static const ImplWorkItemProperty<1> HintLightWeight = + ImplWorkItemProperty<1>(); + constexpr static const ImplWorkItemProperty<2> HintHeavyWeight = + ImplWorkItemProperty<2>(); + constexpr static const ImplWorkItemProperty<4> HintRegular = + ImplWorkItemProperty<4>(); + constexpr static const ImplWorkItemProperty<8> HintIrregular = + ImplWorkItemProperty<8>(); + typedef ImplWorkItemProperty<0> None_t; + typedef ImplWorkItemProperty<1> HintLightWeight_t; + typedef ImplWorkItemProperty<2> HintHeavyWeight_t; + typedef ImplWorkItemProperty<4> HintRegular_t; + typedef ImplWorkItemProperty<8> HintIrregular_t; +}; + +template +inline constexpr WorkItemProperty::ImplWorkItemProperty operator|( + WorkItemProperty::ImplWorkItemProperty, + WorkItemProperty::ImplWorkItemProperty) { + return WorkItemProperty::ImplWorkItemProperty(); } -template -inline constexpr WorkItemProperty::ImplWorkItemProperty operator & - (WorkItemProperty::ImplWorkItemProperty, WorkItemProperty::ImplWorkItemProperty) { - return WorkItemProperty::ImplWorkItemProperty(); +template +inline constexpr WorkItemProperty::ImplWorkItemProperty operator&( + WorkItemProperty::ImplWorkItemProperty, + WorkItemProperty::ImplWorkItemProperty) { + return WorkItemProperty::ImplWorkItemProperty(); } -template -inline constexpr bool operator == (WorkItemProperty::ImplWorkItemProperty, WorkItemProperty::ImplWorkItemProperty) { - return pv1 == pv2; +template +inline constexpr bool operator==(WorkItemProperty::ImplWorkItemProperty, + WorkItemProperty::ImplWorkItemProperty) { + return pv1 == pv2; } -} +} // namespace Experimental /**\brief Specify Launch Bounds for CUDA execution. * * If no launch bounds specified then do not set launch bounds. */ -template< unsigned int maxT = 0 /* Max threads per block */ - , unsigned int minB = 0 /* Min blocks per SM */ - > -struct LaunchBounds -{ +template +struct LaunchBounds { using launch_bounds = LaunchBounds; - using type = LaunchBounds; - static unsigned int constexpr maxTperB {maxT}; - static unsigned int constexpr minBperSM {minB}; + using type = LaunchBounds; + static unsigned int constexpr maxTperB{maxT}; + static unsigned int constexpr minBperSM{minB}; }; -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Kokkos { -#define KOKKOS_IMPL_IS_CONCEPT( CONCEPT ) \ - template< typename T > struct is_ ## CONCEPT { \ - private: \ - template< typename , typename = std::true_type > struct have : std::false_type {}; \ - template< typename U > struct have::type, \ - typename std::remove_cv::type \ - >::type> : std::true_type {}; \ - template< typename U > struct have::type, \ - typename std::remove_cv::type \ - >::type> : std::true_type {}; \ - public: \ - enum { value = is_ ## CONCEPT::template have::value }; \ +#define KOKKOS_IMPL_IS_CONCEPT(CONCEPT) \ + template \ + struct is_##CONCEPT { \ + private: \ + template \ + struct have : std::false_type {}; \ + template \ + struct have::type, \ + typename std::remove_cv::type>::type> \ + : std::true_type {}; \ + template \ + struct have::type, \ + typename std::remove_cv::type>::type> \ + : std::true_type {}; \ + \ + public: \ + enum { value = is_##CONCEPT::template have::value }; \ }; // Public concept: -KOKKOS_IMPL_IS_CONCEPT( memory_space ) -KOKKOS_IMPL_IS_CONCEPT( memory_traits ) -KOKKOS_IMPL_IS_CONCEPT( execution_space ) -KOKKOS_IMPL_IS_CONCEPT( execution_policy ) -KOKKOS_IMPL_IS_CONCEPT( array_layout ) -KOKKOS_IMPL_IS_CONCEPT( reducer ) +KOKKOS_IMPL_IS_CONCEPT(memory_space) +KOKKOS_IMPL_IS_CONCEPT(memory_traits) +KOKKOS_IMPL_IS_CONCEPT(execution_space) +KOKKOS_IMPL_IS_CONCEPT(execution_policy) +KOKKOS_IMPL_IS_CONCEPT(array_layout) +KOKKOS_IMPL_IS_CONCEPT(reducer) namespace Experimental { -KOKKOS_IMPL_IS_CONCEPT( work_item_property ) +KOKKOS_IMPL_IS_CONCEPT(work_item_property) } namespace Impl { // For backward compatibility: -using Kokkos::is_memory_space ; -using Kokkos::is_memory_traits ; -using Kokkos::is_execution_space ; -using Kokkos::is_execution_policy ; -using Kokkos::is_array_layout ; +using Kokkos::is_array_layout; +using Kokkos::is_execution_policy; +using Kokkos::is_execution_space; +using Kokkos::is_memory_space; +using Kokkos::is_memory_traits; // Implementation concept: -KOKKOS_IMPL_IS_CONCEPT( iteration_pattern ) -KOKKOS_IMPL_IS_CONCEPT( schedule_type ) -KOKKOS_IMPL_IS_CONCEPT( index_type ) -KOKKOS_IMPL_IS_CONCEPT( launch_bounds ) -KOKKOS_IMPL_IS_CONCEPT( thread_team_member ) -KOKKOS_IMPL_IS_CONCEPT( host_thread_team_member ) +KOKKOS_IMPL_IS_CONCEPT(iteration_pattern) +KOKKOS_IMPL_IS_CONCEPT(schedule_type) +KOKKOS_IMPL_IS_CONCEPT(index_type) +KOKKOS_IMPL_IS_CONCEPT(launch_bounds) +KOKKOS_IMPL_IS_CONCEPT(thread_team_member) +KOKKOS_IMPL_IS_CONCEPT(host_thread_team_member) -} +} // namespace Impl #undef KOKKOS_IMPL_IS_CONCEPT -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- namespace Kokkos { -template< class ExecutionSpace , class MemorySpace > +template struct Device { - static_assert( Kokkos::is_execution_space::value - , "Execution space is not valid" ); - static_assert( Kokkos::is_memory_space::value - , "Memory space is not valid" ); - typedef ExecutionSpace execution_space; - typedef MemorySpace memory_space; - typedef Device device_type; + static_assert(Kokkos::is_execution_space::value, + "Execution space is not valid"); + static_assert(Kokkos::is_memory_space::value, + "Memory space is not valid"); + typedef ExecutionSpace execution_space; + typedef MemorySpace memory_space; + typedef Device device_type; }; - -template< typename T > +template struct is_space { -private: + private: + template + struct exe : std::false_type { + typedef void space; + }; - template< typename , typename = void > - struct exe : std::false_type { typedef void space ; }; + template + struct mem : std::false_type { + typedef void space; + }; - template< typename , typename = void > - struct mem : std::false_type { typedef void space ; }; + template + struct dev : std::false_type { + typedef void space; + }; - template< typename , typename = void > - struct dev : std::false_type { typedef void space ; }; + template + struct exe::type> + : std::is_same::type { + typedef typename U::execution_space space; + }; - template< typename U > - struct exe::type> - : std::is_same::type - { typedef typename U::execution_space space ; }; + template + struct mem< + U, typename std::conditional::type> + : std::is_same::type { + typedef typename U::memory_space space; + }; - template< typename U > - struct mem::type> - : std::is_same::type - { typedef typename U::memory_space space ; }; + template + struct dev< + U, typename std::conditional::type> + : std::is_same::type { + typedef typename U::device_type space; + }; - template< typename U > - struct dev::type> - : std::is_same::type - { typedef typename U::device_type space ; }; - - typedef typename is_space::template exe is_exe ; - typedef typename is_space::template mem is_mem ; - typedef typename is_space::template dev is_dev ; - -public: + typedef typename is_space::template exe is_exe; + typedef typename is_space::template mem is_mem; + typedef typename is_space::template dev is_dev; + public: enum { value = is_exe::value || is_mem::value || is_dev::value }; - typedef typename is_exe::space execution_space ; - typedef typename is_mem::space memory_space ; + typedef typename is_exe::space execution_space; + typedef typename is_mem::space memory_space; // For backward compatibility, deprecated in favor of // Kokkos::Impl::HostMirror::host_mirror_space - typedef typename std::conditional - < std::is_same< memory_space , Kokkos::HostSpace >::value -#if defined( KOKKOS_ENABLE_CUDA ) - || std::is_same< memory_space , Kokkos::CudaUVMSpace >::value - || std::is_same< memory_space , Kokkos::CudaHostPinnedSpace >::value + typedef typename std::conditional< + std::is_same::value +#if defined(KOKKOS_ENABLE_CUDA) + || std::is_same::value || + std::is_same::value #endif /* #if defined( KOKKOS_ENABLE_CUDA ) */ - , memory_space - , Kokkos::HostSpace - >::type host_memory_space ; + , + memory_space, Kokkos::HostSpace>::type host_memory_space; -#if defined( KOKKOS_ENABLE_CUDA ) - typedef typename std::conditional - < std::is_same< execution_space , Kokkos::Cuda >::value - , Kokkos::DefaultHostExecutionSpace , execution_space - >::type host_execution_space ; +#if defined(KOKKOS_ENABLE_CUDA) + typedef typename std::conditional< + std::is_same::value, + Kokkos::DefaultHostExecutionSpace, execution_space>::type + host_execution_space; #else - #if defined( KOKKOS_ENABLE_OPENMPTARGET ) - typedef typename std::conditional - < std::is_same< execution_space , Kokkos::Experimental::OpenMPTarget >::value - , Kokkos::DefaultHostExecutionSpace , execution_space - >::type host_execution_space ; - #else - typedef execution_space host_execution_space ; - #endif +#if defined(KOKKOS_ENABLE_OPENMPTARGET) + typedef typename std::conditional< + std::is_same::value, + Kokkos::DefaultHostExecutionSpace, execution_space>::type + host_execution_space; +#else + typedef execution_space host_execution_space; +#endif #endif - typedef typename std::conditional - < std::is_same< execution_space , host_execution_space >::value && - std::is_same< memory_space , host_memory_space >::value - , T , Kokkos::Device< host_execution_space , host_memory_space > - >::type host_mirror_space ; + typedef typename std::conditional< + std::is_same::value && + std::is_same::value, + T, Kokkos::Device >::type + host_mirror_space; }; -// For backward compatibility +// For backward compatiblity namespace Impl { -using Kokkos::is_space ; +using Kokkos::is_space; } -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- @@ -304,12 +324,11 @@ namespace Impl { * The default case can assume accessibility for the same space. * Specializations must be defined for different memory spaces. */ -template< typename DstMemorySpace , typename SrcMemorySpace > +template struct MemorySpaceAccess { - - static_assert( Kokkos::is_memory_space< DstMemorySpace >::value && - Kokkos::is_memory_space< SrcMemorySpace >::value - , "template arguments must be memory spaces" ); + static_assert(Kokkos::is_memory_space::value && + Kokkos::is_memory_space::value, + "template arguments must be memory spaces"); /**\brief Can a View (or pointer) to memory in SrcMemorySpace * be assigned to a View (or pointer) to memory marked DstMemorySpace. @@ -318,7 +337,7 @@ struct MemorySpaceAccess { * 2. All execution spaces that can access DstMemorySpace can also access * SrcMemorySpace. */ - enum { assignable = std::is_same::value }; + enum { assignable = std::is_same::value }; /**\brief For all DstExecSpace::memory_space == DstMemorySpace * DstExecSpace can access SrcMemorySpace. @@ -331,7 +350,8 @@ struct MemorySpaceAccess { enum { deepcopy = assignable }; }; -}} // namespace Kokkos::Impl +} // namespace Impl +} // namespace Kokkos namespace Kokkos { @@ -354,34 +374,31 @@ namespace Kokkos { * When AccessSpace::memory_space == Kokkos::HostSpace * then space is the View host mirror space. */ -template< typename AccessSpace , typename MemorySpace > +template struct SpaceAccessibility { -private: + private: + static_assert(Kokkos::is_space::value, + "template argument #1 must be a Kokkos space"); - static_assert( Kokkos::is_space< AccessSpace >::value - , "template argument #1 must be a Kokkos space" ); - - static_assert( Kokkos::is_memory_space< MemorySpace >::value - , "template argument #2 must be a Kokkos memory space" ); + static_assert(Kokkos::is_memory_space::value, + "template argument #2 must be a Kokkos memory space"); // The input AccessSpace may be a Device // verify that it is a valid combination of spaces. - static_assert( Kokkos::Impl::MemorySpaceAccess - < typename AccessSpace::execution_space::memory_space - , typename AccessSpace::memory_space - >::accessible - , "template argument #1 is an invalid space" ); + static_assert(Kokkos::Impl::MemorySpaceAccess< + typename AccessSpace::execution_space::memory_space, + typename AccessSpace::memory_space>::accessible, + "template argument #1 is an invalid space"); - typedef Kokkos::Impl::MemorySpaceAccess - < typename AccessSpace::execution_space::memory_space , MemorySpace > - exe_access ; + typedef Kokkos::Impl::MemorySpaceAccess< + typename AccessSpace::execution_space::memory_space, MemorySpace> + exe_access; - typedef Kokkos::Impl::MemorySpaceAccess - < typename AccessSpace::memory_space , MemorySpace > - mem_access ; - -public: + typedef Kokkos::Impl::MemorySpaceAccess + mem_access; + public: /**\brief Can AccessSpace::execution_space access MemorySpace ? * * Default based upon memory space accessibility. @@ -394,8 +411,9 @@ public: * Default based upon memory space accessibility. * Specialization required for other relationships. */ - enum { assignable = - is_memory_space< AccessSpace >::value && mem_access::assignable }; + enum { + assignable = is_memory_space::value && mem_access::assignable + }; /**\brief Can deep copy to AccessSpace::memory_Space from MemorySpace ? */ enum { deepcopy = mem_access::deepcopy }; @@ -404,24 +422,24 @@ public: // to be able to access MemorySpace? // If same memory space or not accessible use the AccessSpace // else construct a device with execution space and memory space. - typedef typename std::conditional - < std::is_same::value || - ! exe_access::accessible - , AccessSpace - , Kokkos::Device< typename AccessSpace::execution_space , MemorySpace > - >::type space ; + typedef typename std::conditional< + std::is_same::value || + !exe_access::accessible, + AccessSpace, + Kokkos::Device >::type + space; }; -} // namespace Kokkos +} // namespace Kokkos namespace Kokkos { namespace Impl { -using Kokkos::SpaceAccessibility ; // For backward compatibility +using Kokkos::SpaceAccessibility; // For backward compatibility -}} // namespace Kokkos::Impl +} +} // namespace Kokkos //---------------------------------------------------------------------------- -#endif // KOKKOS_CORE_CONCEPTS_HPP - +#endif // KOKKOS_CORE_CONCEPTS_HPP diff --git a/lib/kokkos/core/src/Kokkos_CopyViews.hpp b/lib/kokkos/core/src/Kokkos_CopyViews.hpp index 9210f21ab7..e64b434d02 100644 --- a/lib/kokkos/core/src/Kokkos_CopyViews.hpp +++ b/lib/kokkos/core/src/Kokkos_CopyViews.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -56,1479 +57,1781 @@ namespace Kokkos { namespace Impl { -template -struct ViewFillLayoutSelector { -}; +template +struct ViewFillLayoutSelector {}; -template<> +template <> struct ViewFillLayoutSelector { static const Kokkos::Iterate iterate = Kokkos::Iterate::Left; }; -template<> +template <> struct ViewFillLayoutSelector { static const Kokkos::Iterate iterate = Kokkos::Iterate::Right; }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos -#include +#include namespace Kokkos { namespace Impl { -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; typedef typename ViewType::non_const_value_type ST; ViewFill(const ViewType&, const ST&); }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; typedef typename ViewType::non_const_value_type ST; ViewFill(const ViewType&, const ST&); KOKKOS_INLINE_FUNCTION - void operator() (const iType&) const; + void operator()(const iType&) const; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; typedef typename ViewType::non_const_value_type ST; ViewFill(const ViewType&, const ST&); KOKKOS_INLINE_FUNCTION - void operator() (const iType&, const iType&) const; + void operator()(const iType&, const iType&) const; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; typedef typename ViewType::non_const_value_type ST; ViewFill(const ViewType&, const ST&); KOKKOS_INLINE_FUNCTION - void operator() (const iType&, const iType&, const iType&) const; + void operator()(const iType&, const iType&, const iType&) const; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; typedef typename ViewType::non_const_value_type ST; ViewFill(const ViewType&, const ST&); KOKKOS_INLINE_FUNCTION - void operator() (const iType&, const iType&, const iType&, const iType&) const; + void operator()(const iType&, const iType&, const iType&, const iType&) const; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; typedef typename ViewType::non_const_value_type ST; ViewFill(const ViewType&, const ST&); KOKKOS_INLINE_FUNCTION - void operator() (const iType&, const iType&, const iType&, const iType&, - const iType&) const; + void operator()(const iType&, const iType&, const iType&, const iType&, + const iType&) const; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; typedef typename ViewType::non_const_value_type ST; ViewFill(const ViewType&, const ST&); KOKKOS_INLINE_FUNCTION - void operator() (const iType&, const iType&, const iType&, const iType&, - const iType&, const iType&) const; + void operator()(const iType&, const iType&, const iType&, const iType&, + const iType&, const iType&) const; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; typedef typename ViewType::non_const_value_type ST; ViewFill(const ViewType&, const ST&); KOKKOS_INLINE_FUNCTION - void operator() (const iType&, const iType&, const iType&, const iType&, - const iType&, const iType&, const iType&) const; + void operator()(const iType&, const iType&, const iType&, const iType&, + const iType&, const iType&, const iType&) const; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; typedef typename ViewType::non_const_value_type ST; ViewFill(const ViewType&, const ST&); KOKKOS_INLINE_FUNCTION - void operator() (const iType&, const iType&, const iType&, const iType&, - const iType&, const iType&, const iType&, const iType&) const; + void operator()(const iType&, const iType&, const iType&, const iType&, + const iType&, const iType&, const iType&, const iType&) const; }; -template -struct ViewFill { +template +struct ViewFill { typedef typename ViewType::non_const_value_type ST; ViewFill(const ViewType& a, const ST& val) { - Kokkos::Impl::DeepCopy< typename ViewType::memory_space, Kokkos::HostSpace >( a.data() , &val, sizeof(ST) ); + Kokkos::Impl::DeepCopy( + a.data(), &val, sizeof(ST)); } }; - -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; - typedef Kokkos::RangePolicy> policy_type; + typedef Kokkos::RangePolicy> policy_type; - ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) { + ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_) + : a(a_), val(val_) { ExecSpace().fence(); - Kokkos::parallel_for("Kokkos::ViewFill-1D",policy_type(0,a.extent(0)),*this); + Kokkos::parallel_for("Kokkos::ViewFill-1D", policy_type(0, a.extent(0)), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i) const { - a(i) = val; - }; + void operator()(const iType& i) const { a(i) = val; }; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; - typedef Kokkos::Rank<2,ViewFillLayoutSelector::iterate,ViewFillLayoutSelector::iterate> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + typedef Kokkos::Rank<2, ViewFillLayoutSelector::iterate, + ViewFillLayoutSelector::iterate> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) { + ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_) + : a(a_), val(val_) { ExecSpace().fence(); Kokkos::parallel_for("Kokkos::ViewFill-2D", - policy_type({0,0},{a.extent(0),a.extent(1)}),*this); + policy_type({0, 0}, {a.extent(0), a.extent(1)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1) const { - a(i0,i1) = val; - }; + void operator()(const iType& i0, const iType& i1) const { a(i0, i1) = val; }; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; - typedef Kokkos::Rank<3,ViewFillLayoutSelector::iterate,ViewFillLayoutSelector::iterate> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + typedef Kokkos::Rank<3, ViewFillLayoutSelector::iterate, + ViewFillLayoutSelector::iterate> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) { + ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_) + : a(a_), val(val_) { ExecSpace().fence(); - Kokkos::parallel_for("Kokkos::ViewFill-3D", - policy_type({0,0,0},{a.extent(0),a.extent(1),a.extent(2)}),*this); + Kokkos::parallel_for( + "Kokkos::ViewFill-3D", + policy_type({0, 0, 0}, {a.extent(0), a.extent(1), a.extent(2)}), *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i2) const { - a(i0,i1,i2) = val; + void operator()(const iType& i0, const iType& i1, const iType& i2) const { + a(i0, i1, i2) = val; }; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; - typedef Kokkos::Rank<4,ViewFillLayoutSelector::iterate,ViewFillLayoutSelector::iterate> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + typedef Kokkos::Rank<4, ViewFillLayoutSelector::iterate, + ViewFillLayoutSelector::iterate> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) { + ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_) + : a(a_), val(val_) { ExecSpace().fence(); Kokkos::parallel_for("Kokkos::ViewFill-4D", - policy_type({0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),a.extent(3)}),*this); + policy_type({0, 0, 0, 0}, {a.extent(0), a.extent(1), + a.extent(2), a.extent(3)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i2, const iType& i3) const { - a(i0,i1,i2,i3) = val; + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3) const { + a(i0, i1, i2, i3) = val; }; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; - typedef Kokkos::Rank<5,ViewFillLayoutSelector::iterate,ViewFillLayoutSelector::iterate> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + typedef Kokkos::Rank<5, ViewFillLayoutSelector::iterate, + ViewFillLayoutSelector::iterate> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) { + ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_) + : a(a_), val(val_) { ExecSpace().fence(); - Kokkos::parallel_for("Kokkos::ViewFill-5D", - policy_type({0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),a.extent(3),a.extent(4)}),*this); + Kokkos::parallel_for( + "Kokkos::ViewFill-5D", + policy_type({0, 0, 0, 0, 0}, {a.extent(0), a.extent(1), a.extent(2), + a.extent(3), a.extent(4)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i2, const iType& i3, const iType& i4) const { - a(i0,i1,i2,i3,i4) = val; + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3, const iType& i4) const { + a(i0, i1, i2, i3, i4) = val; }; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; - typedef Kokkos::Rank<6,ViewFillLayoutSelector::iterate,ViewFillLayoutSelector::iterate> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + typedef Kokkos::Rank<6, ViewFillLayoutSelector::iterate, + ViewFillLayoutSelector::iterate> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) { + ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_) + : a(a_), val(val_) { ExecSpace().fence(); Kokkos::parallel_for("Kokkos::ViewFill-6D", - policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),a.extent(3),a.extent(4),a.extent(5)}),*this); + policy_type({0, 0, 0, 0, 0, 0}, + {a.extent(0), a.extent(1), a.extent(2), + a.extent(3), a.extent(4), a.extent(5)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i2, const iType& i3, const iType& i4, const iType& i5) const { - a(i0,i1,i2,i3,i4,i5) = val; + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3, const iType& i4, const iType& i5) const { + a(i0, i1, i2, i3, i4, i5) = val; }; }; -template -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; - typedef Kokkos::Rank<6,ViewFillLayoutSelector::iterate,ViewFillLayoutSelector::iterate> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + typedef Kokkos::Rank<6, ViewFillLayoutSelector::iterate, + ViewFillLayoutSelector::iterate> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) { + ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_) + : a(a_), val(val_) { ExecSpace().fence(); Kokkos::parallel_for("Kokkos::ViewFill-7D", - policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),a.extent(3), - a.extent(5),a.extent(6)}),*this); + policy_type({0, 0, 0, 0, 0, 0}, + {a.extent(0), a.extent(1), a.extent(2), + a.extent(3), a.extent(5), a.extent(6)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i3, - const iType& i4, const iType& i5, const iType& i6) const { - for(iType i2=0; i2 -struct ViewFill { +template +struct ViewFill { ViewType a; typename ViewType::const_value_type val; - typedef Kokkos::Rank<6,ViewFillLayoutSelector::iterate,ViewFillLayoutSelector::iterate> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + typedef Kokkos::Rank<6, ViewFillLayoutSelector::iterate, + ViewFillLayoutSelector::iterate> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) { + ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_) + : a(a_), val(val_) { ExecSpace().fence(); Kokkos::parallel_for("Kokkos::ViewFill-8D", - policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(3), - a.extent(5),a.extent(6),a.extent(7)}),*this); + policy_type({0, 0, 0, 0, 0, 0}, + {a.extent(0), a.extent(1), a.extent(3), + a.extent(5), a.extent(6), a.extent(7)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i3, - const iType& i5, const iType& i6, const iType& i7) const { - for(iType i2=0; i2 -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; ViewCopy(const ViewTypeA&, const ViewTypeB&); KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0) const; + void operator()(const iType& i0) const; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; ViewCopy(const ViewTypeA&, const ViewTypeB&); KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0,const iType& i1) const; + void operator()(const iType& i0, const iType& i1) const; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; ViewCopy(const ViewTypeA&, const ViewTypeB&); KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0,const iType& i1,const iType& i2) const; + void operator()(const iType& i0, const iType& i1, const iType& i2) const; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; ViewCopy(const ViewTypeA&, const ViewTypeB&); KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0,const iType& i1,const iType& i2,const iType& i3) const; + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3) const; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; ViewCopy(const ViewTypeA&, const ViewTypeB&); KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0,const iType& i1,const iType& i2,const iType& i3, - const iType& i4) const; + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3, const iType& i4) const; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; ViewCopy(const ViewTypeA&, const ViewTypeB&); KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0,const iType& i1,const iType& i2,const iType& i3, - const iType& i4,const iType& i5) const; + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3, const iType& i4, const iType& i5) const; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; ViewCopy(const ViewTypeA&, const ViewTypeB&); KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0,const iType& i1,const iType& i2,const iType& i3, - const iType& i4,const iType& i5,const iType& i6) const; + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3, const iType& i4, const iType& i5, + const iType& i6) const; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; ViewCopy(const ViewTypeA&, const ViewTypeB&); KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0,const iType& i1,const iType& i2,const iType& i3, - const iType& i4,const iType& i5,const iType& i6,const iType& i7) const; + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3, const iType& i4, const iType& i5, + const iType& i6, const iType& i7) const; }; - - -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; - typedef Kokkos::RangePolicy> policy_type; + typedef Kokkos::RangePolicy> policy_type; - ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) { + ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_) : a(a_), b(b_) { ExecSpace().fence(); - Kokkos::parallel_for("Kokkos::ViewCopy-1D", - policy_type(0,a.extent(0)),*this); + Kokkos::parallel_for("Kokkos::ViewCopy-1D", policy_type(0, a.extent(0)), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0) const { - a(i0) = b(i0); - }; + void operator()(const iType& i0) const { a(i0) = b(i0); }; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::layout_iterate_type_selector::outer_iteration_pattern; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::layout_iterate_type_selector::inner_iteration_pattern; - typedef Kokkos::Rank<2,outer_iteration_pattern,inner_iteration_pattern> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + static const Kokkos::Iterate outer_iteration_pattern = + Kokkos::layout_iterate_type_selector::outer_iteration_pattern; + static const Kokkos::Iterate inner_iteration_pattern = + Kokkos::layout_iterate_type_selector::inner_iteration_pattern; + typedef Kokkos::Rank<2, outer_iteration_pattern, inner_iteration_pattern> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) { + ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_) : a(a_), b(b_) { ExecSpace().fence(); Kokkos::parallel_for("Kokkos::ViewCopy-2D", - policy_type({0,0},{a.extent(0),a.extent(1)}),*this); + policy_type({0, 0}, {a.extent(0), a.extent(1)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1) const { - a(i0,i1) = b(i0,i1); + void operator()(const iType& i0, const iType& i1) const { + a(i0, i1) = b(i0, i1); }; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::layout_iterate_type_selector::outer_iteration_pattern; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::layout_iterate_type_selector::inner_iteration_pattern; - typedef Kokkos::Rank<3,outer_iteration_pattern,inner_iteration_pattern> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + static const Kokkos::Iterate outer_iteration_pattern = + Kokkos::layout_iterate_type_selector::outer_iteration_pattern; + static const Kokkos::Iterate inner_iteration_pattern = + Kokkos::layout_iterate_type_selector::inner_iteration_pattern; + typedef Kokkos::Rank<3, outer_iteration_pattern, inner_iteration_pattern> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) { + ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_) : a(a_), b(b_) { ExecSpace().fence(); - Kokkos::parallel_for("Kokkos::ViewCopy-3D", - policy_type({0,0,0},{a.extent(0),a.extent(1),a.extent(2)}),*this); + Kokkos::parallel_for( + "Kokkos::ViewCopy-3D", + policy_type({0, 0, 0}, {a.extent(0), a.extent(1), a.extent(2)}), *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i2) const { - a(i0,i1,i2) = b(i0,i1,i2); + void operator()(const iType& i0, const iType& i1, const iType& i2) const { + a(i0, i1, i2) = b(i0, i1, i2); }; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::layout_iterate_type_selector::outer_iteration_pattern; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::layout_iterate_type_selector::inner_iteration_pattern; - typedef Kokkos::Rank<4,outer_iteration_pattern,inner_iteration_pattern> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + static const Kokkos::Iterate outer_iteration_pattern = + Kokkos::layout_iterate_type_selector::outer_iteration_pattern; + static const Kokkos::Iterate inner_iteration_pattern = + Kokkos::layout_iterate_type_selector::inner_iteration_pattern; + typedef Kokkos::Rank<4, outer_iteration_pattern, inner_iteration_pattern> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) { + ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_) : a(a_), b(b_) { ExecSpace().fence(); Kokkos::parallel_for("Kokkos::ViewCopy-4D", - policy_type({0,0,0,0},{a.extent(0),a.extent(1),a.extent(2), - a.extent(3)}),*this); + policy_type({0, 0, 0, 0}, {a.extent(0), a.extent(1), + a.extent(2), a.extent(3)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i2, - const iType& i3) const { - a(i0,i1,i2,i3) = b(i0,i1,i2,i3); + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3) const { + a(i0, i1, i2, i3) = b(i0, i1, i2, i3); }; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::layout_iterate_type_selector::outer_iteration_pattern; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::layout_iterate_type_selector::inner_iteration_pattern; - typedef Kokkos::Rank<5,outer_iteration_pattern,inner_iteration_pattern> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + static const Kokkos::Iterate outer_iteration_pattern = + Kokkos::layout_iterate_type_selector::outer_iteration_pattern; + static const Kokkos::Iterate inner_iteration_pattern = + Kokkos::layout_iterate_type_selector::inner_iteration_pattern; + typedef Kokkos::Rank<5, outer_iteration_pattern, inner_iteration_pattern> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) { + ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_) : a(a_), b(b_) { ExecSpace().fence(); - Kokkos::parallel_for("Kokkos::ViewCopy-5D", - policy_type({0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(2), - a.extent(3),a.extent(4)}),*this); + Kokkos::parallel_for( + "Kokkos::ViewCopy-5D", + policy_type({0, 0, 0, 0, 0}, {a.extent(0), a.extent(1), a.extent(2), + a.extent(3), a.extent(4)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i2, - const iType& i3, const iType& i4) const { - a(i0,i1,i2,i3,i4) = b(i0,i1,i2,i3,i4); + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3, const iType& i4) const { + a(i0, i1, i2, i3, i4) = b(i0, i1, i2, i3, i4); }; }; -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::layout_iterate_type_selector::outer_iteration_pattern; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::layout_iterate_type_selector::inner_iteration_pattern; - typedef Kokkos::Rank<6,outer_iteration_pattern,inner_iteration_pattern> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + static const Kokkos::Iterate outer_iteration_pattern = + Kokkos::layout_iterate_type_selector::outer_iteration_pattern; + static const Kokkos::Iterate inner_iteration_pattern = + Kokkos::layout_iterate_type_selector::inner_iteration_pattern; + typedef Kokkos::Rank<6, outer_iteration_pattern, inner_iteration_pattern> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) { + ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_) : a(a_), b(b_) { ExecSpace().fence(); Kokkos::parallel_for("Kokkos::ViewCopy-6D", - policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(2), - a.extent(3),a.extent(4),a.extent(5)}),*this); + policy_type({0, 0, 0, 0, 0, 0}, + {a.extent(0), a.extent(1), a.extent(2), + a.extent(3), a.extent(4), a.extent(5)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i2, - const iType& i3, const iType& i4, const iType& i5) const { - a(i0,i1,i2,i3,i4,i5) = b(i0,i1,i2,i3,i4,i5); + void operator()(const iType& i0, const iType& i1, const iType& i2, + const iType& i3, const iType& i4, const iType& i5) const { + a(i0, i1, i2, i3, i4, i5) = b(i0, i1, i2, i3, i4, i5); }; }; - -template -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::layout_iterate_type_selector::outer_iteration_pattern; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::layout_iterate_type_selector::inner_iteration_pattern; - typedef Kokkos::Rank<6,outer_iteration_pattern,inner_iteration_pattern> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + static const Kokkos::Iterate outer_iteration_pattern = + Kokkos::layout_iterate_type_selector::outer_iteration_pattern; + static const Kokkos::Iterate inner_iteration_pattern = + Kokkos::layout_iterate_type_selector::inner_iteration_pattern; + typedef Kokkos::Rank<6, outer_iteration_pattern, inner_iteration_pattern> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) { + ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_) : a(a_), b(b_) { ExecSpace().fence(); Kokkos::parallel_for("Kokkos::ViewCopy-7D", - policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(3), - a.extent(4),a.extent(5),a.extent(6)}),*this); + policy_type({0, 0, 0, 0, 0, 0}, + {a.extent(0), a.extent(1), a.extent(3), + a.extent(4), a.extent(5), a.extent(6)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i3, - const iType& i4, const iType& i5, const iType& i6) const { - for(iType i2=0; i2 -struct ViewCopy { +template +struct ViewCopy { ViewTypeA a; ViewTypeB b; - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::layout_iterate_type_selector::outer_iteration_pattern; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::layout_iterate_type_selector::inner_iteration_pattern; - typedef Kokkos::Rank<6,outer_iteration_pattern,inner_iteration_pattern> iterate_type; - typedef Kokkos::MDRangePolicy> policy_type; + static const Kokkos::Iterate outer_iteration_pattern = + Kokkos::layout_iterate_type_selector::outer_iteration_pattern; + static const Kokkos::Iterate inner_iteration_pattern = + Kokkos::layout_iterate_type_selector::inner_iteration_pattern; + typedef Kokkos::Rank<6, outer_iteration_pattern, inner_iteration_pattern> + iterate_type; + typedef Kokkos::MDRangePolicy> + policy_type; - ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) { + ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_) : a(a_), b(b_) { ExecSpace().fence(); Kokkos::parallel_for("Kokkos::ViewCopy-8D", - policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(3), - a.extent(5),a.extent(6),a.extent(7)}),*this); + policy_type({0, 0, 0, 0, 0, 0}, + {a.extent(0), a.extent(1), a.extent(3), + a.extent(5), a.extent(6), a.extent(7)}), + *this); ExecSpace().fence(); } KOKKOS_INLINE_FUNCTION - void operator() (const iType& i0, const iType& i1, const iType& i3, - const iType& i5, const iType& i6, const iType& i7) const { - for(iType i2=0; i2 +#include namespace Kokkos { namespace Impl { -template +template void view_copy(const DstType& dst, const SrcType& src) { typedef typename DstType::execution_space dst_execution_space; typedef typename SrcType::execution_space src_execution_space; typedef typename DstType::memory_space dst_memory_space; typedef typename SrcType::memory_space src_memory_space; - enum { DstExecCanAccessSrc = - Kokkos::Impl::SpaceAccessibility< dst_execution_space , src_memory_space >::accessible }; + enum { + DstExecCanAccessSrc = + Kokkos::Impl::SpaceAccessibility::accessible + }; - enum { SrcExecCanAccessDst = - Kokkos::Impl::SpaceAccessibility< src_execution_space , dst_memory_space >::accessible }; + enum { + SrcExecCanAccessDst = + Kokkos::Impl::SpaceAccessibility::accessible + }; - if( ! DstExecCanAccessSrc && ! SrcExecCanAccessDst) { - std::string message("Error: Kokkos::deep_copy with no available copy mechanism: "); - message += src.label(); message += " to "; + if (!DstExecCanAccessSrc && !SrcExecCanAccessDst) { + std::string message( + "Error: Kokkos::deep_copy with no available copy mechanism: "); + message += src.label(); + message += " to "; message += dst.label(); Kokkos::Impl::throw_runtime_exception(message); } // Figure out iteration order in case we need it - int64_t strides[DstType::Rank+1]; + int64_t strides[DstType::Rank + 1]; dst.stride(strides); Kokkos::Iterate iterate; - if ( Kokkos::is_layouttiled::value ) { - iterate = Kokkos::layout_iterate_type_selector::outer_iteration_pattern; - } else if ( std::is_same::value ) { + if (Kokkos::is_layouttiled::value) { + iterate = Kokkos::layout_iterate_type_selector< + typename DstType::array_layout>::outer_iteration_pattern; + } else if (std::is_same::value) { iterate = Kokkos::Iterate::Right; - } else if ( std::is_same::value ) { + } else if (std::is_same::value) { iterate = Kokkos::Iterate::Left; - } else if ( std::is_same::value ) { - if( strides[0] > strides[DstType::Rank-1] ) + } else if (std::is_same::value) { + if (strides[0] > strides[DstType::Rank - 1]) iterate = Kokkos::Iterate::Right; else iterate = Kokkos::Iterate::Left; } else { - if( std::is_same::value ) + if (std::is_same::value) iterate = Kokkos::Iterate::Right; else iterate = Kokkos::Iterate::Left; } - if( (dst.span() >= size_t(std::numeric_limits::max())) || - (src.span() >= size_t(std::numeric_limits::max())) ){ - if(DstExecCanAccessSrc) { - if(iterate == Kokkos::Iterate::Right) - Kokkos::Impl::ViewCopy< typename DstType::uniform_runtime_nomemspace_type, typename SrcType::uniform_runtime_const_nomemspace_type, Kokkos::LayoutRight, dst_execution_space, - DstType::Rank, int64_t >( dst , src ); + if ((dst.span() >= size_t(std::numeric_limits::max())) || + (src.span() >= size_t(std::numeric_limits::max()))) { + if (DstExecCanAccessSrc) { + if (iterate == Kokkos::Iterate::Right) + Kokkos::Impl::ViewCopy< + typename DstType::uniform_runtime_nomemspace_type, + typename SrcType::uniform_runtime_const_nomemspace_type, + Kokkos::LayoutRight, dst_execution_space, DstType::Rank, int64_t>( + dst, src); else - Kokkos::Impl::ViewCopy< typename DstType::uniform_runtime_nomemspace_type, typename SrcType::uniform_runtime_const_nomemspace_type, Kokkos::LayoutLeft, dst_execution_space, - DstType::Rank, int64_t >( dst , src ); + Kokkos::Impl::ViewCopy< + typename DstType::uniform_runtime_nomemspace_type, + typename SrcType::uniform_runtime_const_nomemspace_type, + Kokkos::LayoutLeft, dst_execution_space, DstType::Rank, int64_t>( + dst, src); } else { - if(iterate == Kokkos::Iterate::Right) - Kokkos::Impl::ViewCopy< typename DstType::uniform_runtime_nomemspace_type, typename SrcType::uniform_runtime_const_nomemspace_type, Kokkos::LayoutRight, src_execution_space, - DstType::Rank, int64_t >( dst , src ); + if (iterate == Kokkos::Iterate::Right) + Kokkos::Impl::ViewCopy< + typename DstType::uniform_runtime_nomemspace_type, + typename SrcType::uniform_runtime_const_nomemspace_type, + Kokkos::LayoutRight, src_execution_space, DstType::Rank, int64_t>( + dst, src); else - Kokkos::Impl::ViewCopy< typename DstType::uniform_runtime_nomemspace_type, typename SrcType::uniform_runtime_const_nomemspace_type, Kokkos::LayoutLeft, src_execution_space, - DstType::Rank, int64_t >( dst , src ); + Kokkos::Impl::ViewCopy< + typename DstType::uniform_runtime_nomemspace_type, + typename SrcType::uniform_runtime_const_nomemspace_type, + Kokkos::LayoutLeft, src_execution_space, DstType::Rank, int64_t>( + dst, src); } } else { - if(DstExecCanAccessSrc) { - if(iterate == Kokkos::Iterate::Right) - Kokkos::Impl::ViewCopy< typename DstType::uniform_runtime_nomemspace_type, typename SrcType::uniform_runtime_const_nomemspace_type, Kokkos::LayoutRight, dst_execution_space, - DstType::Rank, int >( dst , src ); + if (DstExecCanAccessSrc) { + if (iterate == Kokkos::Iterate::Right) + Kokkos::Impl::ViewCopy< + typename DstType::uniform_runtime_nomemspace_type, + typename SrcType::uniform_runtime_const_nomemspace_type, + Kokkos::LayoutRight, dst_execution_space, DstType::Rank, int>(dst, + src); else - Kokkos::Impl::ViewCopy< typename DstType::uniform_runtime_nomemspace_type, typename SrcType::uniform_runtime_const_nomemspace_type, Kokkos::LayoutLeft, dst_execution_space, - DstType::Rank, int >( dst , src ); + Kokkos::Impl::ViewCopy< + typename DstType::uniform_runtime_nomemspace_type, + typename SrcType::uniform_runtime_const_nomemspace_type, + Kokkos::LayoutLeft, dst_execution_space, DstType::Rank, int>(dst, + src); } else { - if(iterate == Kokkos::Iterate::Right) - Kokkos::Impl::ViewCopy< typename DstType::uniform_runtime_nomemspace_type, typename SrcType::uniform_runtime_const_nomemspace_type, Kokkos::LayoutRight, src_execution_space, - DstType::Rank, int >( dst , src ); + if (iterate == Kokkos::Iterate::Right) + Kokkos::Impl::ViewCopy< + typename DstType::uniform_runtime_nomemspace_type, + typename SrcType::uniform_runtime_const_nomemspace_type, + Kokkos::LayoutRight, src_execution_space, DstType::Rank, int>(dst, + src); else - Kokkos::Impl::ViewCopy< typename DstType::uniform_runtime_nomemspace_type, typename SrcType::uniform_runtime_const_nomemspace_type, Kokkos::LayoutLeft, src_execution_space, - DstType::Rank, int >( dst , src ); + Kokkos::Impl::ViewCopy< + typename DstType::uniform_runtime_nomemspace_type, + typename SrcType::uniform_runtime_const_nomemspace_type, + Kokkos::LayoutLeft, src_execution_space, DstType::Rank, int>(dst, + src); } - } } -template +template struct CommonSubview; -template -struct CommonSubview { - typedef typename Kokkos::Subview dst_subview_type; - typedef typename Kokkos::Subview src_subview_type; +template +struct CommonSubview { + typedef typename Kokkos::Subview dst_subview_type; + typedef typename Kokkos::Subview src_subview_type; dst_subview_type dst_sub; src_subview_type src_sub; - CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, Args... ): - dst_sub(dst,arg0),src_sub(src,arg0) {} + CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, + Args...) + : dst_sub(dst, arg0), src_sub(src, arg0) {} }; -template -struct CommonSubview { - typedef typename Kokkos::Subview dst_subview_type; - typedef typename Kokkos::Subview src_subview_type; +template +struct CommonSubview { + typedef typename Kokkos::Subview dst_subview_type; + typedef typename Kokkos::Subview src_subview_type; dst_subview_type dst_sub; src_subview_type src_sub; - CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, const Arg1& arg1, Args... ): - dst_sub(dst,arg0,arg1),src_sub(src,arg0,arg1) {} + CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, + const Arg1& arg1, Args...) + : dst_sub(dst, arg0, arg1), src_sub(src, arg0, arg1) {} }; -template -struct CommonSubview { - typedef typename Kokkos::Subview dst_subview_type; - typedef typename Kokkos::Subview src_subview_type; +template +struct CommonSubview { + typedef typename Kokkos::Subview dst_subview_type; + typedef typename Kokkos::Subview src_subview_type; dst_subview_type dst_sub; src_subview_type src_sub; - CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, const Arg1& arg1, - const Arg2& arg2, Args... ): - dst_sub(dst,arg0,arg1,arg2),src_sub(src,arg0,arg1,arg2) {} + CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, + const Arg1& arg1, const Arg2& arg2, Args...) + : dst_sub(dst, arg0, arg1, arg2), src_sub(src, arg0, arg1, arg2) {} }; -template -struct CommonSubview { - typedef typename Kokkos::Subview dst_subview_type; - typedef typename Kokkos::Subview src_subview_type; +template +struct CommonSubview { + typedef typename Kokkos::Subview + dst_subview_type; + typedef typename Kokkos::Subview + src_subview_type; dst_subview_type dst_sub; src_subview_type src_sub; - CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, const Arg1& arg1, - const Arg2& arg2, const Arg3& arg3, - const Args ...): - dst_sub(dst,arg0,arg1,arg2,arg3),src_sub(src,arg0,arg1,arg2,arg3) {} + CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, + const Arg1& arg1, const Arg2& arg2, const Arg3& arg3, + const Args...) + : dst_sub(dst, arg0, arg1, arg2, arg3), + src_sub(src, arg0, arg1, arg2, arg3) {} }; -template -struct CommonSubview { - typedef typename Kokkos::Subview dst_subview_type; - typedef typename Kokkos::Subview src_subview_type; +template +struct CommonSubview { + typedef typename Kokkos::Subview + dst_subview_type; + typedef typename Kokkos::Subview + src_subview_type; dst_subview_type dst_sub; src_subview_type src_sub; - CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, const Arg1& arg1, - const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, - const Args ...): - dst_sub(dst,arg0,arg1,arg2,arg3,arg4),src_sub(src,arg0,arg1,arg2,arg3,arg4) {} + CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, + const Arg1& arg1, const Arg2& arg2, const Arg3& arg3, + const Arg4& arg4, const Args...) + : dst_sub(dst, arg0, arg1, arg2, arg3, arg4), + src_sub(src, arg0, arg1, arg2, arg3, arg4) {} }; -template -struct CommonSubview { - typedef typename Kokkos::Subview dst_subview_type; - typedef typename Kokkos::Subview src_subview_type; +template +struct CommonSubview { + typedef typename Kokkos::Subview + dst_subview_type; + typedef typename Kokkos::Subview + src_subview_type; dst_subview_type dst_sub; src_subview_type src_sub; - CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, const Arg1& arg1, - const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5, - const Args ...): - dst_sub(dst,arg0,arg1,arg2,arg3,arg4,arg5),src_sub(src,arg0,arg1,arg2,arg3,arg4,arg5) {} + CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, + const Arg1& arg1, const Arg2& arg2, const Arg3& arg3, + const Arg4& arg4, const Arg5& arg5, const Args...) + : dst_sub(dst, arg0, arg1, arg2, arg3, arg4, arg5), + src_sub(src, arg0, arg1, arg2, arg3, arg4, arg5) {} }; -template -struct CommonSubview { - typedef typename Kokkos::Subview dst_subview_type; - typedef typename Kokkos::Subview src_subview_type; +template +struct CommonSubview { + typedef typename Kokkos::Subview + dst_subview_type; + typedef typename Kokkos::Subview + src_subview_type; dst_subview_type dst_sub; src_subview_type src_sub; - CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, const Arg1& arg1, - const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5, - const Arg6& arg6, Args...): - dst_sub(dst,arg0,arg1,arg2,arg3,arg4,arg5,arg6),src_sub(src,arg0,arg1,arg2,arg3,arg4,arg5,arg6) {} + CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, + const Arg1& arg1, const Arg2& arg2, const Arg3& arg3, + const Arg4& arg4, const Arg5& arg5, const Arg6& arg6, Args...) + : dst_sub(dst, arg0, arg1, arg2, arg3, arg4, arg5, arg6), + src_sub(src, arg0, arg1, arg2, arg3, arg4, arg5, arg6) {} }; -template -struct CommonSubview { - typedef typename Kokkos::Subview dst_subview_type; - typedef typename Kokkos::Subview src_subview_type; +template +struct CommonSubview { + typedef typename Kokkos::Subview + dst_subview_type; + typedef typename Kokkos::Subview + src_subview_type; dst_subview_type dst_sub; src_subview_type src_sub; - CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, const Arg1& arg1, - const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5, - const Arg6& arg6, const Arg7& arg7): - dst_sub(dst,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7),src_sub(src,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7) {} + CommonSubview(const DstType& dst, const SrcType& src, const Arg0& arg0, + const Arg1& arg1, const Arg2& arg2, const Arg3& arg3, + const Arg4& arg4, const Arg5& arg5, const Arg6& arg6, + const Arg7& arg7) + : dst_sub(dst, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7), + src_sub(src, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {} }; - -template +template struct ViewRemap; -template -struct ViewRemap { - typedef Kokkos::pair p_type; +template +struct ViewRemap { + typedef Kokkos::pair p_type; ViewRemap(const DstType& dst, const SrcType& src) { - if(dst.extent(0) == src.extent(0)) { - view_copy(dst,src); + if (dst.extent(0) == src.extent(0)) { + view_copy(dst, src); } else { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0); - view_copy(common_subview.dst_sub,common_subview.src_sub); + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + typedef CommonSubview sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } }; -template -struct ViewRemap { - typedef Kokkos::pair p_type; +template +struct ViewRemap { + typedef Kokkos::pair p_type; ViewRemap(const DstType& dst, const SrcType& src) { - if(dst.extent(0) == src.extent(0)) { - if(dst.extent(1) == src.extent(1)) { - view_copy(dst,src); + if (dst.extent(0) == src.extent(0)) { + if (dst.extent(1) == src.extent(1)) { + view_copy(dst, src); } else { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL,ext1); - view_copy(common_subview.dst_sub,common_subview.src_sub); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } else { - if(dst.extent(1) == src.extent(1)) { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0,Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); + if (dst.extent(1) == src.extent(1)) { + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, Kokkos::ALL); + view_copy(common_subview.dst_sub, common_subview.src_sub); } else { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0,ext1); - view_copy(common_subview.dst_sub,common_subview.src_sub); + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } } }; -template -struct ViewRemap { - typedef Kokkos::pair p_type; +template +struct ViewRemap { + typedef Kokkos::pair p_type; ViewRemap(const DstType& dst, const SrcType& src) { - if(dst.extent(0) == src.extent(0)) { - if(dst.extent(2) == src.extent(2)) { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL,ext1,Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); - } else { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL,ext1,ext2); - view_copy(common_subview.dst_sub,common_subview.src_sub); - } - } else { - if(dst.extent(2) == src.extent(2)) { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0,ext1,Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); - } else { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0,ext1,ext2); - view_copy(common_subview.dst_sub,common_subview.src_sub); - } - } - } -}; - -template -struct ViewRemap { - typedef Kokkos::pair p_type; - - ViewRemap(const DstType& dst, const SrcType& src) { - if(dst.extent(0) == src.extent(0)) { - if(dst.extent(3) == src.extent(3)) { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL, - ext1,ext2, + if (dst.extent(0) == src.extent(0)) { + if (dst.extent(2) == src.extent(2)) { + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); + view_copy(common_subview.dst_sub, common_subview.src_sub); } else { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL, - ext1,ext2, - ext3); - view_copy(common_subview.dst_sub,common_subview.src_sub); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } else { - if(dst.extent(7) == src.extent(7)) { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0, - ext1,ext2, - Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); + if (dst.extent(2) == src.extent(2)) { + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, Kokkos::ALL); + view_copy(common_subview.dst_sub, common_subview.src_sub); } else { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0, - ext1,ext2, - ext3); - view_copy(common_subview.dst_sub,common_subview.src_sub); + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } } }; -template -struct ViewRemap { - typedef Kokkos::pair p_type; +template +struct ViewRemap { + typedef Kokkos::pair p_type; ViewRemap(const DstType& dst, const SrcType& src) { - if(dst.extent(0) == src.extent(0)) { - if(dst.extent(4) == src.extent(4)) { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL, - ext1,ext2,ext3, + if (dst.extent(0) == src.extent(0)) { + if (dst.extent(3) == src.extent(3)) { + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2, Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); + view_copy(common_subview.dst_sub, common_subview.src_sub); } else { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL, - ext1,ext2,ext3, + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2, ext3); + view_copy(common_subview.dst_sub, common_subview.src_sub); + } + } else { + if (dst.extent(7) == src.extent(7)) { + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2, Kokkos::ALL); + view_copy(common_subview.dst_sub, common_subview.src_sub); + } else { + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2, ext3); + view_copy(common_subview.dst_sub, common_subview.src_sub); + } + } + } +}; + +template +struct ViewRemap { + typedef Kokkos::pair p_type; + + ViewRemap(const DstType& dst, const SrcType& src) { + if (dst.extent(0) == src.extent(0)) { + if (dst.extent(4) == src.extent(4)) { + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2, ext3, + Kokkos::ALL); + view_copy(common_subview.dst_sub, common_subview.src_sub); + } else { + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2, ext3, ext4); - view_copy(common_subview.dst_sub,common_subview.src_sub); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } else { - if(dst.extent(4) == src.extent(4)) { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0, - ext1,ext2,ext3, + if (dst.extent(4) == src.extent(4)) { + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2, ext3, Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); + view_copy(common_subview.dst_sub, common_subview.src_sub); } else { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0, - ext1,ext2,ext3, - ext4); - view_copy(common_subview.dst_sub,common_subview.src_sub); + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2, ext3, ext4); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } } }; -template -struct ViewRemap { - typedef Kokkos::pair p_type; +template +struct ViewRemap { + typedef Kokkos::pair p_type; ViewRemap(const DstType& dst, const SrcType& src) { - if(dst.extent(0) == src.extent(0)) { - if(dst.extent(5) == src.extent(5)) { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL, - ext1,ext2,ext3,ext4, - Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); + if (dst.extent(0) == src.extent(0)) { + if (dst.extent(5) == src.extent(5)) { + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2, ext3, + ext4, Kokkos::ALL); + view_copy(common_subview.dst_sub, common_subview.src_sub); } else { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - p_type ext5(0,std::min(dst.extent(5),src.extent(5))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL, - ext1,ext2,ext3,ext4, + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + p_type ext5(0, std::min(dst.extent(5), src.extent(5))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2, ext3, + ext4, ext5); + view_copy(common_subview.dst_sub, common_subview.src_sub); + } + } else { + if (dst.extent(5) == src.extent(5)) { + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2, ext3, ext4, + Kokkos::ALL); + view_copy(common_subview.dst_sub, common_subview.src_sub); + } else { + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + p_type ext5(0, std::min(dst.extent(5), src.extent(5))); + + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2, ext3, ext4, ext5); - view_copy(common_subview.dst_sub,common_subview.src_sub); - } - } else { - if(dst.extent(5) == src.extent(5)) { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0, - ext1,ext2,ext3,ext4, - Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); - } else { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - p_type ext5(0,std::min(dst.extent(5),src.extent(5))); - - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0, - ext1,ext2,ext3,ext4, - ext5); - view_copy(common_subview.dst_sub,common_subview.src_sub); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } } }; -template -struct ViewRemap { - typedef Kokkos::pair p_type; +template +struct ViewRemap { + typedef Kokkos::pair p_type; ViewRemap(const DstType& dst, const SrcType& src) { - if(dst.extent(0) == src.extent(0)) { - if(dst.extent(6) == src.extent(6)) { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - p_type ext5(0,std::min(dst.extent(5),src.extent(5))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL, - ext1,ext2,ext3,ext4,ext5, - Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); + if (dst.extent(0) == src.extent(0)) { + if (dst.extent(6) == src.extent(6)) { + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + p_type ext5(0, std::min(dst.extent(5), src.extent(5))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2, ext3, + ext4, ext5, Kokkos::ALL); + view_copy(common_subview.dst_sub, common_subview.src_sub); } else { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - p_type ext5(0,std::min(dst.extent(5),src.extent(5))); - p_type ext6(0,std::min(dst.extent(6),src.extent(6))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL, - ext1,ext2,ext3,ext4,ext5, - ext6); - view_copy(common_subview.dst_sub,common_subview.src_sub); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + p_type ext5(0, std::min(dst.extent(5), src.extent(5))); + p_type ext6(0, std::min(dst.extent(6), src.extent(6))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2, ext3, + ext4, ext5, ext6); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } else { - if(dst.extent(6) == src.extent(6)) { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - p_type ext5(0,std::min(dst.extent(5),src.extent(5))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0, - ext1,ext2,ext3,ext4,ext5, - Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); + if (dst.extent(6) == src.extent(6)) { + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + p_type ext5(0, std::min(dst.extent(5), src.extent(5))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2, ext3, ext4, + ext5, Kokkos::ALL); + view_copy(common_subview.dst_sub, common_subview.src_sub); } else { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - p_type ext5(0,std::min(dst.extent(5),src.extent(5))); - p_type ext6(0,std::min(dst.extent(6),src.extent(6))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0, - ext1,ext2,ext3,ext4,ext5, - ext6); - view_copy(common_subview.dst_sub,common_subview.src_sub); + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + p_type ext5(0, std::min(dst.extent(5), src.extent(5))); + p_type ext6(0, std::min(dst.extent(6), src.extent(6))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2, ext3, ext4, + ext5, ext6); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } } }; -template -struct ViewRemap { - typedef Kokkos::pair p_type; +template +struct ViewRemap { + typedef Kokkos::pair p_type; ViewRemap(const DstType& dst, const SrcType& src) { - if(dst.extent(0) == src.extent(0)) { - if(dst.extent(7) == src.extent(7)) { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - p_type ext5(0,std::min(dst.extent(5),src.extent(5))); - p_type ext6(0,std::min(dst.extent(6),src.extent(6))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL, - ext1,ext2,ext3,ext4,ext5,ext6, - Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); + if (dst.extent(0) == src.extent(0)) { + if (dst.extent(7) == src.extent(7)) { + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + p_type ext5(0, std::min(dst.extent(5), src.extent(5))); + p_type ext6(0, std::min(dst.extent(6), src.extent(6))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2, ext3, + ext4, ext5, ext6, Kokkos::ALL); + view_copy(common_subview.dst_sub, common_subview.src_sub); } else { - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - p_type ext5(0,std::min(dst.extent(5),src.extent(5))); - p_type ext6(0,std::min(dst.extent(6),src.extent(6))); - p_type ext7(0,std::min(dst.extent(7),src.extent(7))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,Kokkos::ALL, - ext1,ext2,ext3,ext4,ext5,ext6, - ext7); - view_copy(common_subview.dst_sub,common_subview.src_sub); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + p_type ext5(0, std::min(dst.extent(5), src.extent(5))); + p_type ext6(0, std::min(dst.extent(6), src.extent(6))); + p_type ext7(0, std::min(dst.extent(7), src.extent(7))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, Kokkos::ALL, ext1, ext2, ext3, + ext4, ext5, ext6, ext7); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } else { - if(dst.extent(7) == src.extent(7)) { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - p_type ext5(0,std::min(dst.extent(5),src.extent(5))); - p_type ext6(0,std::min(dst.extent(6),src.extent(6))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0, - ext1,ext2,ext3,ext4,ext5,ext6, - Kokkos::ALL); - view_copy(common_subview.dst_sub,common_subview.src_sub); + if (dst.extent(7) == src.extent(7)) { + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + p_type ext5(0, std::min(dst.extent(5), src.extent(5))); + p_type ext6(0, std::min(dst.extent(6), src.extent(6))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2, ext3, ext4, + ext5, ext6, Kokkos::ALL); + view_copy(common_subview.dst_sub, common_subview.src_sub); } else { - p_type ext0(0,std::min(dst.extent(0),src.extent(0))); - p_type ext1(0,std::min(dst.extent(1),src.extent(1))); - p_type ext2(0,std::min(dst.extent(2),src.extent(2))); - p_type ext3(0,std::min(dst.extent(3),src.extent(3))); - p_type ext4(0,std::min(dst.extent(4),src.extent(4))); - p_type ext5(0,std::min(dst.extent(5),src.extent(5))); - p_type ext6(0,std::min(dst.extent(6),src.extent(6))); - p_type ext7(0,std::min(dst.extent(7),src.extent(7))); - typedef CommonSubview sv_adapter_type; - sv_adapter_type common_subview(dst,src,ext0, - ext1,ext2,ext3,ext4,ext5,ext6, - ext7); - view_copy(common_subview.dst_sub,common_subview.src_sub); + p_type ext0(0, std::min(dst.extent(0), src.extent(0))); + p_type ext1(0, std::min(dst.extent(1), src.extent(1))); + p_type ext2(0, std::min(dst.extent(2), src.extent(2))); + p_type ext3(0, std::min(dst.extent(3), src.extent(3))); + p_type ext4(0, std::min(dst.extent(4), src.extent(4))); + p_type ext5(0, std::min(dst.extent(5), src.extent(5))); + p_type ext6(0, std::min(dst.extent(6), src.extent(6))); + p_type ext7(0, std::min(dst.extent(7), src.extent(7))); + typedef CommonSubview + sv_adapter_type; + sv_adapter_type common_subview(dst, src, ext0, ext1, ext2, ext3, ext4, + ext5, ext6, ext7); + view_copy(common_subview.dst_sub, common_subview.src_sub); } } } }; -} +} // namespace Impl /** \brief Deep copy a value from Host memory into a view. */ -template< class DT , class ... DP > -inline -void deep_copy - ( const View & dst - , typename ViewTraits::const_value_type & value - , typename std::enable_if< - std::is_same< typename ViewTraits::specialize , void >::value - >::type * = 0 ) -{ - typedef View ViewType; - if(dst.data() == NULL ) { +template +inline void deep_copy( + const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if::specialize, void>::value>::type* = 0) { + typedef View ViewType; + +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::beginDeepCopy( + Kokkos::Profiling::SpaceHandle( + typename ViewType::memory_space().name()), + dst.label(), dst.data(), + Kokkos::Profiling::SpaceHandle(Kokkos::HostSpace().name()), "Scalar", + &value, dst.span() * sizeof(typename ViewType::value_type)); + } +#endif + + if (dst.data() == NULL) { Kokkos::fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif return; } Kokkos::fence(); - static_assert( - std::is_same< typename ViewType::non_const_value_type , - typename ViewType::value_type >::value - , "deep_copy requires non-const type" ); + static_assert(std::is_same::value, + "deep_copy requires non-const type"); - // If contiguous we can simply do a 1D flat loop - if(dst.span_is_contiguous()) { - typedef Kokkos::View::type>, - Kokkos::MemoryTraits<0> > - ViewTypeFlat; + typename std::conditional< + ViewType::Rank == 0, typename ViewType::memory_space, + Kokkos::AnonymousSpace>::type>, + Kokkos::MemoryTraits<0>> + ViewTypeFlat; - ViewTypeFlat dst_flat(dst.data(),dst.size()); - if(dst.span() < std::numeric_limits::max()) { - Kokkos::Impl::ViewFill< ViewTypeFlat , Kokkos::LayoutRight, typename ViewType::execution_space, ViewTypeFlat::Rank, int >( dst_flat , value ); + ViewTypeFlat dst_flat(dst.data(), dst.size()); + if (dst.span() < static_cast(std::numeric_limits::max())) { + Kokkos::Impl::ViewFill(dst_flat, value); } else - Kokkos::Impl::ViewFill< ViewTypeFlat , Kokkos::LayoutRight, typename ViewType::execution_space, ViewTypeFlat::Rank, int64_t >( dst_flat , value ); + Kokkos::Impl::ViewFill(dst_flat, value); Kokkos::fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif return; } // Figure out iteration order to do the ViewFill - int64_t strides[ViewType::Rank+1]; + int64_t strides[ViewType::Rank + 1]; dst.stride(strides); Kokkos::Iterate iterate; - if ( std::is_same::value ) { + if (std::is_same::value) { iterate = Kokkos::Iterate::Right; - } else if ( std::is_same::value ) { + } else if (std::is_same::value) { iterate = Kokkos::Iterate::Left; - } else if ( std::is_same::value ) { - if( strides[0] > strides[ViewType::Rank>0?ViewType::Rank-1:0] ) + } else if (std::is_same::value) { + if (strides[0] > strides[ViewType::Rank > 0 ? ViewType::Rank - 1 : 0]) iterate = Kokkos::Iterate::Right; else iterate = Kokkos::Iterate::Left; } else { - if( std::is_same::value ) + if (std::is_same::value) iterate = Kokkos::Iterate::Right; else iterate = Kokkos::Iterate::Left; } - // Lets call the right ViewFill functor based on integer space needed and iteration type - typedef typename std::conditional::type ViewTypeUniform; - if(dst.span() > std::numeric_limits::max()) { - if(iterate == Kokkos::Iterate::Right) - Kokkos::Impl::ViewFill< ViewTypeUniform, Kokkos::LayoutRight, typename ViewType::execution_space, ViewType::Rank, int64_t >( dst , value ); + // Lets call the right ViewFill functor based on integer space needed and + // iteration type + typedef typename std::conditional< + ViewType::Rank == 0, typename ViewType::uniform_runtime_type, + typename ViewType::uniform_runtime_nomemspace_type>::type ViewTypeUniform; + if (dst.span() > static_cast(std::numeric_limits::max())) { + if (iterate == Kokkos::Iterate::Right) + Kokkos::Impl::ViewFill(dst, value); else - Kokkos::Impl::ViewFill< ViewTypeUniform, Kokkos::LayoutLeft, typename ViewType::execution_space, ViewType::Rank, int64_t >( dst , value ); + Kokkos::Impl::ViewFill(dst, value); } else { - if(iterate == Kokkos::Iterate::Right) - Kokkos::Impl::ViewFill< ViewTypeUniform, Kokkos::LayoutRight, typename ViewType::execution_space, ViewType::Rank, int >( dst , value ); + if (iterate == Kokkos::Iterate::Right) + Kokkos::Impl::ViewFill(dst, value); else - Kokkos::Impl::ViewFill< ViewTypeUniform, Kokkos::LayoutLeft, typename ViewType::execution_space, ViewType::Rank, int >( dst , value ); + Kokkos::Impl::ViewFill(dst, value); } Kokkos::fence(); + +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif } /** \brief Deep copy into a value in Host memory from a view. */ -template< class ST , class ... SP > -inline -void deep_copy - ( typename ViewTraits::non_const_value_type & dst - , const View & src - , typename std::enable_if< - std::is_same< typename ViewTraits::specialize , void >::value - >::type * = 0 ) -{ - static_assert( ViewTraits::rank == 0 - , "ERROR: Non-rank-zero view in deep_copy( value , View )" ); +template +inline void deep_copy( + typename ViewTraits::non_const_value_type& dst, + const View& src, + typename std::enable_if::specialize, void>::value>::type* = 0) { + typedef ViewTraits src_traits; + typedef typename src_traits::memory_space src_memory_space; - if(src.data() == NULL) { + static_assert(src_traits::rank == 0, + "ERROR: Non-rank-zero view in deep_copy( value , View )"); + +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::beginDeepCopy( + Kokkos::Profiling::SpaceHandle(Kokkos::HostSpace().name()), "Scalar", + &dst, Kokkos::Profiling::SpaceHandle(src_memory_space().name()), + src.label(), src.data(), + src.span() * sizeof(typename src_traits::value_type)); + } +#endif + + if (src.data() == NULL) { Kokkos::fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif return; } - typedef ViewTraits src_traits ; - typedef typename src_traits::memory_space src_memory_space ; - Kokkos::Impl::DeepCopy< HostSpace , src_memory_space >( & dst , src.data() , sizeof(ST) ); + Kokkos::Impl::DeepCopy(&dst, src.data(), + sizeof(ST)); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif } //---------------------------------------------------------------------------- /** \brief A deep copy between views of compatible type, and rank zero. */ -template< class DT , class ... DP , class ST , class ... SP > -inline -void deep_copy - ( const View & dst - , const View & src - , typename std::enable_if<( - std::is_same< typename ViewTraits::specialize , void >::value && - std::is_same< typename ViewTraits::specialize , void >::value && - ( unsigned(ViewTraits::rank) == unsigned(0) && - unsigned(ViewTraits::rank) == unsigned(0) ) - )>::type * = 0 ) -{ - static_assert( - std::is_same< typename ViewTraits::value_type , - typename ViewTraits::non_const_value_type >::value - , "deep_copy requires matching non-const destination type" ); +template +inline void deep_copy( + const View& dst, const View& src, + typename std::enable_if<( + std::is_same::specialize, void>::value && + std::is_same::specialize, void>::value && + (unsigned(ViewTraits::rank) == unsigned(0) && + unsigned(ViewTraits::rank) == unsigned(0)))>::type* = 0) { + typedef View dst_type; + typedef View src_type; - if(dst.data() == NULL && src.data() == NULL) { + typedef typename dst_type::value_type value_type; + typedef typename dst_type::memory_space dst_memory_space; + typedef typename src_type::memory_space src_memory_space; + + static_assert(std::is_same::value, + "deep_copy requires matching non-const destination type"); + +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::beginDeepCopy( + Kokkos::Profiling::SpaceHandle(dst_memory_space().name()), dst.label(), + dst.data(), Kokkos::Profiling::SpaceHandle(src_memory_space().name()), + src.label(), src.data(), + src.span() * sizeof(typename dst_type::value_type)); + } +#endif + + if (dst.data() == NULL && src.data() == NULL) { Kokkos::fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif return; } - typedef View dst_type ; - typedef View src_type ; - - typedef typename dst_type::value_type value_type ; - typedef typename dst_type::memory_space dst_memory_space ; - typedef typename src_type::memory_space src_memory_space ; - Kokkos::fence(); - if ( dst.data() != src.data() ) { - Kokkos::Impl::DeepCopy< dst_memory_space , src_memory_space >( dst.data() , src.data() , sizeof(value_type) ); + if (dst.data() != src.data()) { + Kokkos::Impl::DeepCopy( + dst.data(), src.data(), sizeof(value_type)); Kokkos::fence(); } +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif } //---------------------------------------------------------------------------- -/** \brief A deep copy between views of the default specialization, compatible type, - * same non-zero rank, same contiguous layout. +/** \brief A deep copy between views of the default specialization, compatible + * type, same non-zero rank, same contiguous layout. */ -template< class DT , class ... DP , class ST , class ... SP > -inline -void deep_copy - ( const View & dst - , const View & src - , typename std::enable_if<( - std::is_same< typename ViewTraits::specialize , void >::value && - std::is_same< typename ViewTraits::specialize , void >::value && - ( unsigned(ViewTraits::rank) != 0 || - unsigned(ViewTraits::rank) != 0 ) - )>::type * = 0 ) -{ - typedef View dst_type ; - typedef View src_type ; +template +inline void deep_copy( + const View& dst, const View& src, + typename std::enable_if<( + std::is_same::specialize, void>::value && + std::is_same::specialize, void>::value && + (unsigned(ViewTraits::rank) != 0 || + unsigned(ViewTraits::rank) != 0))>::type* = 0) { + typedef View dst_type; + typedef View src_type; + typedef typename dst_type::execution_space dst_execution_space; + typedef typename src_type::execution_space src_execution_space; + typedef typename dst_type::memory_space dst_memory_space; + typedef typename src_type::memory_space src_memory_space; + typedef typename dst_type::value_type dst_value_type; + typedef typename src_type::value_type src_value_type; - static_assert( - std::is_same< typename dst_type::value_type , - typename dst_type::non_const_value_type >::value - , "deep_copy requires non-const destination type" ); + static_assert(std::is_same::value, + "deep_copy requires non-const destination type"); - static_assert( - ( unsigned(dst_type::rank) == - unsigned(src_type::rank) ) - , "deep_copy requires Views of equal rank" ); + static_assert((unsigned(dst_type::rank) == unsigned(src_type::rank)), + "deep_copy requires Views of equal rank"); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::beginDeepCopy( + Kokkos::Profiling::SpaceHandle(dst_memory_space().name()), dst.label(), + dst.data(), Kokkos::Profiling::SpaceHandle(src_memory_space().name()), + src.label(), src.data(), + src.span() * sizeof(typename dst_type::value_type)); + } +#endif - typedef typename dst_type::execution_space dst_execution_space ; - typedef typename src_type::execution_space src_execution_space ; - typedef typename dst_type::memory_space dst_memory_space ; - typedef typename src_type::memory_space src_memory_space ; - typedef typename dst_type::value_type dst_value_type ; - typedef typename src_type::value_type src_value_type ; - if(dst.data() == NULL || src.data() == NULL) { + if (dst.data() == NULL || src.data() == NULL) { #ifdef KOKKOS_ENABLE_DEPRECATED_CODE // do nothing #else // throw if dimension mismatch - if ( (src.extent(0) != dst.extent(0)) || - (src.extent(1) != dst.extent(1)) || - (src.extent(2) != dst.extent(2)) || - (src.extent(3) != dst.extent(3)) || - (src.extent(4) != dst.extent(4)) || - (src.extent(5) != dst.extent(5)) || - (src.extent(6) != dst.extent(6)) || - (src.extent(7) != dst.extent(7)) - ) { - std::string message("Deprecation Error: Kokkos::deep_copy extents of views don't match: "); - message += dst.label(); message += "("; - for(int r = 0; r::accessible }; + enum { + DstExecCanAccessSrc = + Kokkos::Impl::SpaceAccessibility::accessible + }; - enum { SrcExecCanAccessDst = - Kokkos::Impl::SpaceAccessibility< src_execution_space , dst_memory_space >::accessible }; + enum { + SrcExecCanAccessDst = + Kokkos::Impl::SpaceAccessibility::accessible + }; // Checking for Overlapping Views. dst_value_type* dst_start = dst.data(); dst_value_type* dst_end = dst.data() + dst.span(); src_value_type* src_start = src.data(); src_value_type* src_end = src.data() + src.span(); - if( ((std::ptrdiff_t)dst_start == (std::ptrdiff_t)src_start) && - ((std::ptrdiff_t)dst_end == (std::ptrdiff_t)src_end) && - (dst.span_is_contiguous() && src.span_is_contiguous()) ) { + if (((std::ptrdiff_t)dst_start == (std::ptrdiff_t)src_start) && + ((std::ptrdiff_t)dst_end == (std::ptrdiff_t)src_end) && + (dst.span_is_contiguous() && src.span_is_contiguous())) { Kokkos::fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif return; } - if( ( ( (std::ptrdiff_t)dst_start < (std::ptrdiff_t)src_end ) && ( (std::ptrdiff_t)dst_end > (std::ptrdiff_t)src_start ) ) && - ( ( dst.span_is_contiguous() && src.span_is_contiguous() ))) { + if ((((std::ptrdiff_t)dst_start < (std::ptrdiff_t)src_end) && + ((std::ptrdiff_t)dst_end > (std::ptrdiff_t)src_start)) && + ((dst.span_is_contiguous() && src.span_is_contiguous()))) { std::string message("Error: Kokkos::deep_copy of overlapping views: "); - message += dst.label(); message += "("; - message += std::to_string((std::ptrdiff_t)dst_start); message += ","; - message += std::to_string((std::ptrdiff_t)dst_end); message += ") "; - message += src.label(); message += "("; - message += std::to_string((std::ptrdiff_t)src_start); message += ","; - message += std::to_string((std::ptrdiff_t)src_end); message += ") "; + message += dst.label(); + message += "("; + message += std::to_string((std::ptrdiff_t)dst_start); + message += ","; + message += std::to_string((std::ptrdiff_t)dst_end); + message += ") "; + message += src.label(); + message += "("; + message += std::to_string((std::ptrdiff_t)src_start); + message += ","; + message += std::to_string((std::ptrdiff_t)src_end); + message += ") "; Kokkos::Impl::throw_runtime_exception(message); } // Check for same extents - if ( (src.extent(0) != dst.extent(0)) || - (src.extent(1) != dst.extent(1)) || - (src.extent(2) != dst.extent(2)) || - (src.extent(3) != dst.extent(3)) || - (src.extent(4) != dst.extent(4)) || - (src.extent(5) != dst.extent(5)) || - (src.extent(6) != dst.extent(6)) || - (src.extent(7) != dst.extent(7)) - ) { + if ((src.extent(0) != dst.extent(0)) || (src.extent(1) != dst.extent(1)) || + (src.extent(2) != dst.extent(2)) || (src.extent(3) != dst.extent(3)) || + (src.extent(4) != dst.extent(4)) || (src.extent(5) != dst.extent(5)) || + (src.extent(6) != dst.extent(6)) || (src.extent(7) != dst.extent(7))) { #ifdef KOKKOS_ENABLE_DEPRECATED_CODE Kokkos::fence(); - if ( DstExecCanAccessSrc ) { - // Copying data between views in accessible memory spaces and either non-contiguous or incompatible shape. - Kokkos::Impl::ViewRemap< dst_type , src_type >( dst , src ); - } - else if ( SrcExecCanAccessDst ) { - // Copying data between views in accessible memory spaces and either non-contiguous or incompatible shape. - Kokkos::Impl::ViewRemap< dst_type , src_type , src_execution_space >( dst , src ); - } - else { - Kokkos::Impl::throw_runtime_exception("deep_copy given views that would require a temporary allocation"); + if (DstExecCanAccessSrc) { + // Copying data between views in accessible memory spaces and either + // non-contiguous or incompatible shape. + Kokkos::Impl::ViewRemap(dst, src); + } else if (SrcExecCanAccessDst) { + // Copying data between views in accessible memory spaces and either + // non-contiguous or incompatible shape. + Kokkos::Impl::ViewRemap(dst, + src); + } else { + Kokkos::Impl::throw_runtime_exception( + "deep_copy given views that would require a temporary allocation"); } Kokkos::fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif return; #else - std::string message("Deprecation Error: Kokkos::deep_copy extents of views don't match: "); - message += dst.label(); message += "("; - for(int r = 0; r::value && - ( - std::is_same< typename dst_type::array_layout , - typename src_type::array_layout >::value - || - ( dst_type::rank == 1 && - src_type::rank == 1 ) - ) && - dst.span_is_contiguous() && - src.span_is_contiguous() && - ((dst_type::rank < 1) || (dst.stride_0() == src.stride_0())) && - ((dst_type::rank < 2) || (dst.stride_1() == src.stride_1())) && - ((dst_type::rank < 3) || (dst.stride_2() == src.stride_2())) && - ((dst_type::rank < 4) || (dst.stride_3() == src.stride_3())) && - ((dst_type::rank < 5) || (dst.stride_4() == src.stride_4())) && - ((dst_type::rank < 6) || (dst.stride_5() == src.stride_5())) && - ((dst_type::rank < 7) || (dst.stride_6() == src.stride_6())) && - ((dst_type::rank < 8) || (dst.stride_7() == src.stride_7())) - ) { + if (std::is_same::value && + (std::is_same::value || + (dst_type::rank == 1 && src_type::rank == 1)) && + dst.span_is_contiguous() && src.span_is_contiguous() && + ((dst_type::rank < 1) || (dst.stride_0() == src.stride_0())) && + ((dst_type::rank < 2) || (dst.stride_1() == src.stride_1())) && + ((dst_type::rank < 3) || (dst.stride_2() == src.stride_2())) && + ((dst_type::rank < 4) || (dst.stride_3() == src.stride_3())) && + ((dst_type::rank < 5) || (dst.stride_4() == src.stride_4())) && + ((dst_type::rank < 6) || (dst.stride_5() == src.stride_5())) && + ((dst_type::rank < 7) || (dst.stride_6() == src.stride_6())) && + ((dst_type::rank < 8) || (dst.stride_7() == src.stride_7()))) { const size_t nbytes = sizeof(typename dst_type::value_type) * dst.span(); Kokkos::fence(); - if((void*)dst.data()!=(void*)src.data()) { - Kokkos::Impl::DeepCopy< dst_memory_space , src_memory_space > - ( dst.data() , src.data() , nbytes ); + if ((void*)dst.data() != (void*)src.data()) { + Kokkos::Impl::DeepCopy( + dst.data(), src.data(), nbytes); } Kokkos::fence(); } else { @@ -1536,779 +1839,779 @@ void deep_copy Impl::view_copy(dst, src); Kokkos::fence(); } +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- namespace Experimental { -/** \brief A local deep copy between views of the default specialization, compatible type, - * same non-zero rank. +/** \brief A local deep copy between views of the default specialization, + * compatible type, same non-zero rank. */ -template< class TeamType, class DT , class ... DP , class ST , class ... SP > -void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous(const TeamType& team, const View & dst, const View & src) { - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, src.span()), [&] (const int& i) { - dst.data()[i] = src.data()[i]; - }); +template +void KOKKOS_INLINE_FUNCTION +local_deep_copy_contiguous(const TeamType& team, const View& dst, + const View& src) { + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, src.span()), + [&](const int& i) { dst.data()[i] = src.data()[i]; }); } //---------------------------------------------------------------------------- -template< class DT , class ... DP , class ST , class ... SP > -void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous(const View & dst, const View & src) { - - for(size_t i=0;i +void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous( + const View& dst, const View& src) { + for (size_t i = 0; i < src.span(); ++i) { + dst.data()[i] = src.data()[i]; + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP , class ST , class ... SP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 1 && - unsigned(ViewTraits::rank) == 1 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 1 && + unsigned(ViewTraits::rank) == + 1)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0); + const size_t N = dst.extent(0); + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), + [&](const int& i) { dst(i) = src(i); }); + team.team_barrier(); +} +//---------------------------------------------------------------------------- +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 2 && + unsigned(ViewTraits::rank) == + 2)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } + + const size_t N = dst.extent(0) * dst.extent(1); + + if (dst.span_is_contiguous() && src.span_is_contiguous()) { team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - dst(i) = src(i); + local_deep_copy_contiguous(team, dst, src); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int i1 = i / dst.extent(0); + dst(i0, i1) = src(i0, i1); }); team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP , class ST , class ... SP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 2 && - unsigned(ViewTraits::rank) == 2 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 3 && + unsigned(ViewTraits::rank) == + 3)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1); + const size_t N = dst.extent(0) * dst.extent(1) * dst.extent(2); - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,src); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int i1 = i/dst.extent(0); - dst(i0,i1) = src(i0,i1); - }); - team.team_barrier(); - } + if (dst.span_is_contiguous() && src.span_is_contiguous()) { + team.team_barrier(); + local_deep_copy_contiguous(team, dst, src); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int itmp = i / dst.extent(0); + int i1 = itmp % dst.extent(1); + int i2 = itmp / dst.extent(1); + dst(i0, i1, i2) = src(i0, i1, i2); + }); + team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP , class ST , class ... SP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 3 && - unsigned(ViewTraits::rank) == 3 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 4 && + unsigned(ViewTraits::rank) == + 4)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2); + const size_t N = + dst.extent(0) * dst.extent(1) * dst.extent(2) * dst.extent(3); - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,src); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int itmp = i/dst.extent(0); - int i1 = itmp%dst.extent(1); - int i2 = itmp/dst.extent(1); - dst(i0,i1,i2) = src(i0,i1,i2); - }); - team.team_barrier(); - } + if (dst.span_is_contiguous() && src.span_is_contiguous()) { + team.team_barrier(); + local_deep_copy_contiguous(team, dst, src); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int itmp = i / dst.extent(0); + int i1 = itmp % dst.extent(1); + itmp = itmp / dst.extent(1); + int i2 = itmp % dst.extent(2); + int i3 = itmp / dst.extent(2); + dst(i0, i1, i2, i3) = src(i0, i1, i2, i3); + }); + team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP , class ST , class ... SP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 4 && - unsigned(ViewTraits::rank) == 4 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 5 && + unsigned(ViewTraits::rank) == + 5)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3); + const size_t N = dst.extent(0) * dst.extent(1) * dst.extent(2) * + dst.extent(3) * dst.extent(4); - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,src); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int itmp = i/dst.extent(0); - int i1 = itmp%dst.extent(1); - itmp = itmp/dst.extent(1); - int i2 = itmp%dst.extent(2); - int i3 = itmp/dst.extent(2); - dst(i0,i1,i2,i3) = src(i0,i1,i2,i3); - }); - team.team_barrier(); - } + if (dst.span_is_contiguous() && src.span_is_contiguous()) { + team.team_barrier(); + local_deep_copy_contiguous(team, dst, src); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int itmp = i / dst.extent(0); + int i1 = itmp % dst.extent(1); + itmp = itmp / dst.extent(1); + int i2 = itmp % dst.extent(2); + itmp = itmp / dst.extent(2); + int i3 = itmp % dst.extent(3); + int i4 = itmp / dst.extent(3); + dst(i0, i1, i2, i3, i4) = src(i0, i1, i2, i3, i4); + }); + team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP , class ST , class ... SP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 5 && - unsigned(ViewTraits::rank) == 5 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 6 && + unsigned(ViewTraits::rank) == + 6)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4); + const size_t N = dst.extent(0) * dst.extent(1) * dst.extent(2) * + dst.extent(3) * dst.extent(4) * dst.extent(5); - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,src); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int itmp = i/dst.extent(0); - int i1 = itmp%dst.extent(1); - itmp = itmp/dst.extent(1); - int i2 = itmp%dst.extent(2); - itmp = itmp/dst.extent(2); - int i3 = itmp%dst.extent(3); - int i4 = itmp/dst.extent(3); - dst(i0,i1,i2,i3,i4) = src(i0,i1,i2,i3,i4); - }); - team.team_barrier(); - } + if (dst.span_is_contiguous() && src.span_is_contiguous()) { + team.team_barrier(); + local_deep_copy_contiguous(team, dst, src); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int itmp = i / dst.extent(0); + int i1 = itmp % dst.extent(1); + itmp = itmp / dst.extent(1); + int i2 = itmp % dst.extent(2); + itmp = itmp / dst.extent(2); + int i3 = itmp % dst.extent(3); + itmp = itmp / dst.extent(3); + int i4 = itmp % dst.extent(4); + int i5 = itmp / dst.extent(4); + dst(i0, i1, i2, i3, i4, i5) = src(i0, i1, i2, i3, i4, i5); + }); + team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP , class ST , class ... SP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 6 && - unsigned(ViewTraits::rank) == 6 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 7 && + unsigned(ViewTraits::rank) == + 7)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4)*dst.extent(5); + const size_t N = dst.extent(0) * dst.extent(1) * dst.extent(2) * + dst.extent(3) * dst.extent(4) * dst.extent(5) * + dst.extent(6); - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,src); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int itmp = i/dst.extent(0); - int i1 = itmp%dst.extent(1); - itmp = itmp/dst.extent(1); - int i2 = itmp%dst.extent(2); - itmp = itmp/dst.extent(2); - int i3 = itmp%dst.extent(3); - itmp = itmp/dst.extent(3); - int i4 = itmp%dst.extent(4); - int i5 = itmp/dst.extent(4); - dst(i0,i1,i2,i3,i4,i5) = src(i0,i1,i2,i3,i4,i5); - }); - team.team_barrier(); - } + if (dst.span_is_contiguous() && src.span_is_contiguous()) { + team.team_barrier(); + local_deep_copy_contiguous(team, dst, src); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int itmp = i / dst.extent(0); + int i1 = itmp % dst.extent(1); + itmp = itmp / dst.extent(1); + int i2 = itmp % dst.extent(2); + itmp = itmp / dst.extent(2); + int i3 = itmp % dst.extent(3); + itmp = itmp / dst.extent(3); + int i4 = itmp % dst.extent(4); + itmp = itmp / dst.extent(4); + int i5 = itmp % dst.extent(5); + int i6 = itmp / dst.extent(5); + dst(i0, i1, i2, i3, i4, i5, i6) = src(i0, i1, i2, i3, i4, i5, i6); + }); + team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP , class ST , class ... SP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 7 && - unsigned(ViewTraits::rank) == 7 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 1 && + unsigned(ViewTraits::rank) == + 1)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4)*dst.extent(5)*dst.extent(6); + const size_t N = dst.extent(0); - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,src); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int itmp = i/dst.extent(0); - int i1 = itmp%dst.extent(1); - itmp = itmp/dst.extent(1); - int i2 = itmp%dst.extent(2); - itmp = itmp/dst.extent(2); - int i3 = itmp%dst.extent(3); - itmp = itmp/dst.extent(3); - int i4 = itmp%dst.extent(4); - itmp = itmp/dst.extent(4); - int i5 = itmp%dst.extent(5); - int i6 = itmp/dst.extent(5); - dst(i0,i1,i2,i3,i4,i5,i6) = src(i0,i1,i2,i3,i4,i5,i6); - }); - team.team_barrier(); - } + for (size_t i = 0; i < N; ++i) { + dst(i) = src(i); + } } //---------------------------------------------------------------------------- -template< class DT , class ... DP , class ST , class ... SP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 1 && - unsigned(ViewTraits::rank) == 1 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 2 && + unsigned(ViewTraits::rank) == + 2)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0); - - - for(size_t i=0;i -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 2 && - unsigned(ViewTraits::rank) == 2 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 3 && + unsigned(ViewTraits::rank) == + 3)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,src); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 3 && - unsigned(ViewTraits::rank) == 3 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 4 && + unsigned(ViewTraits::rank) == + 4)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,src); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 4 && - unsigned(ViewTraits::rank) == 4 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 5 && + unsigned(ViewTraits::rank) == + 5)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,src); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 5 && - unsigned(ViewTraits::rank) == 5 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 6 && + unsigned(ViewTraits::rank) == + 6)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,src); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 6 && - unsigned(ViewTraits::rank) == 6 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, const View& src, + typename std::enable_if<(unsigned(ViewTraits::rank) == 7 && + unsigned(ViewTraits::rank) == + 7)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,src); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - const View & src, - typename std::enable_if<( unsigned(ViewTraits::rank) == 7 && - unsigned(ViewTraits::rank) == 7 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } - - if ( dst.span_is_contiguous() && src.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,src); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous(const TeamType& team, const View & dst, typename ViewTraits::const_value_type & value) { - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, dst.span()), [&] (const int& i) { - dst.data()[i] = value; - }); +template +void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous( + const TeamType& team, const View& dst, + typename ViewTraits::const_value_type& value) { + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, dst.span()), + [&](const int& i) { dst.data()[i] = value; }); } //---------------------------------------------------------------------------- -template< class DT , class ... DP > -void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous(const View & dst, typename ViewTraits::const_value_type & value) { - - for(size_t i=0;i +void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous( + const View& dst, + typename ViewTraits::const_value_type& value) { + for (size_t i = 0; i < dst.span(); ++i) { + dst.data()[i] = value; + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 1 )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 1)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0); + const size_t N = dst.extent(0); + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), + [&](const int& i) { dst(i) = value; }); + team.team_barrier(); +} +//---------------------------------------------------------------------------- +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 2)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } + + const size_t N = dst.extent(0) * dst.extent(1); + + if (dst.span_is_contiguous()) { team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - dst(i) = value; + local_deep_copy_contiguous(team, dst, value); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int i1 = i / dst.extent(0); + dst(i0, i1) = value; }); team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 2 )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 3)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1); + const size_t N = dst.extent(0) * dst.extent(1) * dst.extent(2); - if ( dst.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,value); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int i1 = i/dst.extent(0); - dst(i0,i1) = value; - }); - team.team_barrier(); - } + if (dst.span_is_contiguous()) { + team.team_barrier(); + local_deep_copy_contiguous(team, dst, value); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int itmp = i / dst.extent(0); + int i1 = itmp % dst.extent(1); + int i2 = itmp / dst.extent(1); + dst(i0, i1, i2) = value; + }); + team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 3 )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 4)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2); + const size_t N = + dst.extent(0) * dst.extent(1) * dst.extent(2) * dst.extent(3); - if ( dst.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,value); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int itmp = i/dst.extent(0); - int i1 = itmp%dst.extent(1); - int i2 = itmp/dst.extent(1); - dst(i0,i1,i2) = value; - }); - team.team_barrier(); - } + if (dst.span_is_contiguous()) { + team.team_barrier(); + local_deep_copy_contiguous(team, dst, value); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int itmp = i / dst.extent(0); + int i1 = itmp % dst.extent(1); + itmp = itmp / dst.extent(1); + int i2 = itmp % dst.extent(2); + int i3 = itmp / dst.extent(2); + dst(i0, i1, i2, i3) = value; + }); + team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 4 )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 5)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3); + const size_t N = dst.extent(0) * dst.extent(1) * dst.extent(2) * + dst.extent(3) * dst.extent(4); - if ( dst.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,value); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int itmp = i/dst.extent(0); - int i1 = itmp%dst.extent(1); - itmp = itmp/dst.extent(1); - int i2 = itmp%dst.extent(2); - int i3 = itmp/dst.extent(2); - dst(i0,i1,i2,i3) = value; - }); - team.team_barrier(); - } + if (dst.span_is_contiguous()) { + team.team_barrier(); + local_deep_copy_contiguous(team, dst, value); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int itmp = i / dst.extent(0); + int i1 = itmp % dst.extent(1); + itmp = itmp / dst.extent(1); + int i2 = itmp % dst.extent(2); + itmp = itmp / dst.extent(2); + int i3 = itmp % dst.extent(3); + int i4 = itmp / dst.extent(3); + dst(i0, i1, i2, i3, i4) = value; + }); + team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 5 )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 6)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4); + const size_t N = dst.extent(0) * dst.extent(1) * dst.extent(2) * + dst.extent(3) * dst.extent(4) * dst.extent(5); - if ( dst.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,value); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int itmp = i/dst.extent(0); - int i1 = itmp%dst.extent(1); - itmp = itmp/dst.extent(1); - int i2 = itmp%dst.extent(2); - itmp = itmp/dst.extent(2); - int i3 = itmp%dst.extent(3); - int i4 = itmp/dst.extent(3); - dst(i0,i1,i2,i3,i4) = value; - }); - team.team_barrier(); - } + if (dst.span_is_contiguous()) { + team.team_barrier(); + local_deep_copy_contiguous(team, dst, value); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int itmp = i / dst.extent(0); + int i1 = itmp % dst.extent(1); + itmp = itmp / dst.extent(1); + int i2 = itmp % dst.extent(2); + itmp = itmp / dst.extent(2); + int i3 = itmp % dst.extent(3); + itmp = itmp / dst.extent(3); + int i4 = itmp % dst.extent(4); + int i5 = itmp / dst.extent(4); + dst(i0, i1, i2, i3, i4, i5) = value; + }); + team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 6 )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const TeamType& team, const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 7)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4)*dst.extent(5); + const size_t N = dst.extent(0) * dst.extent(1) * dst.extent(2) * + dst.extent(3) * dst.extent(4) * dst.extent(5) * + dst.extent(6); - if ( dst.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,value); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int itmp = i/dst.extent(0); - int i1 = itmp%dst.extent(1); - itmp = itmp/dst.extent(1); - int i2 = itmp%dst.extent(2); - itmp = itmp/dst.extent(2); - int i3 = itmp%dst.extent(3); - itmp = itmp/dst.extent(3); - int i4 = itmp%dst.extent(4); - int i5 = itmp/dst.extent(4); - dst(i0,i1,i2,i3,i4,i5) = value; - }); - team.team_barrier(); - } + if (dst.span_is_contiguous()) { + team.team_barrier(); + local_deep_copy_contiguous(team, dst, value); + team.team_barrier(); + } else { + team.team_barrier(); + Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&](const int& i) { + int i0 = i % dst.extent(0); + int itmp = i / dst.extent(0); + int i1 = itmp % dst.extent(1); + itmp = itmp / dst.extent(1); + int i2 = itmp % dst.extent(2); + itmp = itmp / dst.extent(2); + int i3 = itmp % dst.extent(3); + itmp = itmp / dst.extent(3); + int i4 = itmp % dst.extent(4); + itmp = itmp / dst.extent(4); + int i5 = itmp % dst.extent(5); + int i6 = itmp / dst.extent(5); + dst(i0, i1, i2, i3, i4, i5, i6) = value; + }); + team.team_barrier(); + } } //---------------------------------------------------------------------------- -template< class TeamType, class DT , class ... DP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 7 )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 1)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4)*dst.extent(5)*dst.extent(6); + const size_t N = dst.extent(0); - if ( dst.span_is_contiguous() ) { - team.team_barrier(); - local_deep_copy_contiguous(team,dst,value); - team.team_barrier(); - } else { - team.team_barrier(); - Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) { - int i0 = i%dst.extent(0); - int itmp = i/dst.extent(0); - int i1 = itmp%dst.extent(1); - itmp = itmp/dst.extent(1); - int i2 = itmp%dst.extent(2); - itmp = itmp/dst.extent(2); - int i3 = itmp%dst.extent(3); - itmp = itmp/dst.extent(3); - int i4 = itmp%dst.extent(4); - itmp = itmp/dst.extent(4); - int i5 = itmp%dst.extent(5); - int i6 = itmp/dst.extent(5); - dst(i0,i1,i2,i3,i4,i5,i6) = value; - }); - team.team_barrier(); - } + for (size_t i = 0; i < N; ++i) { + dst(i) = value; + } } //---------------------------------------------------------------------------- -template< class DT , class ... DP > -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 1 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 2)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - const size_t N = dst.extent(0); - - - for(size_t i=0;i -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 2 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 3)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - if ( dst.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,value); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 3 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 4)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - if ( dst.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,value); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 4 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 5)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - if ( dst.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,value); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 5 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 6)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - if ( dst.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,value); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 6 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } +template +void KOKKOS_INLINE_FUNCTION local_deep_copy( + const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if<(unsigned(ViewTraits::rank) == + 7)>::type* = 0) { + if (dst.data() == nullptr) { + return; + } - if ( dst.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,value); - } else { - - for(size_t i0=0;i0 -void KOKKOS_INLINE_FUNCTION local_deep_copy (const View & dst, - typename ViewTraits::const_value_type & value, - typename std::enable_if<( unsigned(ViewTraits::rank) == 7 - )>::type * = 0 ) -{ - if( dst.data() == nullptr ) { - return; - } - - if ( dst.span_is_contiguous() ) { - local_deep_copy_contiguous(dst,value); - } else { - - for(size_t i0=0;i0 & dst, namespace Kokkos { /** \brief Deep copy a value from Host memory into a view. */ -template< class ExecSpace ,class DT , class ... DP > -inline -void deep_copy - ( const ExecSpace & - , const View & dst - , typename ViewTraits::const_value_type & value - , typename std::enable_if< - Kokkos::Impl::is_execution_space< ExecSpace >::value && - std::is_same< typename ViewTraits::specialize , void >::value - >::type * = 0 ) -{ - static_assert( - std::is_same< typename ViewTraits::non_const_value_type , - typename ViewTraits::value_type >::value - , "deep_copy requires non-const type" ); - +template +inline void deep_copy( + const ExecSpace&, const View& dst, + typename ViewTraits::const_value_type& value, + typename std::enable_if< + Kokkos::Impl::is_execution_space::value && + std::is_same::specialize, + void>::value>::type* = 0) { + typedef ViewTraits dst_traits; + typedef typename dst_traits::memory_space dst_memory_space; + static_assert(std::is_same::value, + "deep_copy requires non-const type"); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::beginDeepCopy( + Kokkos::Profiling::SpaceHandle(dst_memory_space().name()), dst.label(), + dst.data(), Kokkos::Profiling::SpaceHandle(Kokkos::HostSpace().name()), + "(none)", &value, dst.span() * sizeof(typename dst_traits::value_type)); + } +#endif ExecSpace().fence(); - typedef typename View::uniform_runtime_nomemspace_type ViewTypeUniform; - Kokkos::Impl::ViewFill< ViewTypeUniform >( dst , value ); + typedef + typename View::uniform_runtime_nomemspace_type ViewTypeUniform; + Kokkos::Impl::ViewFill(dst, value); ExecSpace().fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif } /** \brief Deep copy into a value in Host memory from a view. */ -template< class ExecSpace , class ST , class ... SP > -inline -void deep_copy - ( const ExecSpace & exec_space - , typename ViewTraits::non_const_value_type & dst - , const View & src - , typename std::enable_if< - Kokkos::Impl::is_execution_space< ExecSpace >::value && - std::is_same< typename ViewTraits::specialize , void >::value - >::type * = 0 ) -{ - static_assert( ViewTraits::rank == 0 - , "ERROR: Non-rank-zero view in deep_copy( value , View )" ); +template +inline void deep_copy( + const ExecSpace& exec_space, + typename ViewTraits::non_const_value_type& dst, + const View& src, + typename std::enable_if< + Kokkos::Impl::is_execution_space::value && + std::is_same::specialize, + void>::value>::type* = 0) { + typedef ViewTraits src_traits; + typedef typename src_traits::memory_space src_memory_space; + static_assert(src_traits::rank == 0, + "ERROR: Non-rank-zero view in deep_copy( value , View )"); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::beginDeepCopy( + Kokkos::Profiling::SpaceHandle(Kokkos::HostSpace().name()), "(none)", + &dst, Kokkos::Profiling::SpaceHandle(src_memory_space().name()), + src.label(), src.data(), sizeof(ST)); + } +#endif - if(src.data() == NULL) { + if (src.data() == NULL) { exec_space.fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif return; } - typedef ViewTraits src_traits ; - typedef typename src_traits::memory_space src_memory_space ; - Kokkos::Impl::DeepCopy< HostSpace , src_memory_space , ExecSpace > - ( exec_space , & dst , src.data() , sizeof(ST) ); + Kokkos::Impl::DeepCopy( + exec_space, &dst, src.data(), sizeof(ST)); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif } //---------------------------------------------------------------------------- /** \brief A deep copy between views of compatible type, and rank zero. */ -template< class ExecSpace , class DT , class ... DP , class ST , class ... SP > -inline -void deep_copy - ( const ExecSpace & exec_space - , const View & dst - , const View & src - , typename std::enable_if<( - Kokkos::Impl::is_execution_space< ExecSpace >::value && - std::is_same< typename ViewTraits::specialize , void >::value && - std::is_same< typename ViewTraits::specialize , void >::value && - ( unsigned(ViewTraits::rank) == unsigned(0) && - unsigned(ViewTraits::rank) == unsigned(0) ) - )>::type * = 0 ) -{ - static_assert( - std::is_same< typename ViewTraits::value_type , - typename ViewTraits::non_const_value_type >::value - , "deep_copy requires matching non-const destination type" ); +template +inline void deep_copy( + const ExecSpace& exec_space, const View& dst, + const View& src, + typename std::enable_if<( + Kokkos::Impl::is_execution_space::value && + std::is_same::specialize, void>::value && + std::is_same::specialize, void>::value && + (unsigned(ViewTraits::rank) == unsigned(0) && + unsigned(ViewTraits::rank) == unsigned(0)))>::type* = 0) { + typedef ViewTraits src_traits; + typedef ViewTraits dst_traits; - typedef View dst_type ; - typedef View src_type ; + typedef typename src_traits::memory_space src_memory_space; + typedef typename dst_traits::memory_space dst_memory_space; + static_assert(std::is_same::value, + "deep_copy requires matching non-const destination type"); - typedef typename dst_type::value_type value_type ; - typedef typename dst_type::memory_space dst_memory_space ; - typedef typename src_type::memory_space src_memory_space ; - if(dst.data() == NULL && src.data() == NULL) { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::beginDeepCopy( + Kokkos::Profiling::SpaceHandle(dst_memory_space().name()), dst.label(), + dst.data(), Kokkos::Profiling::SpaceHandle(src_memory_space().name()), + src.label(), src.data(), sizeof(DT)); + } +#endif + + if (dst.data() == NULL && src.data() == NULL) { exec_space.fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif return; } exec_space.fence(); - if ( dst.data() != src.data() ) { - Kokkos::Impl::DeepCopy< dst_memory_space , src_memory_space , ExecSpace > - ( exec_space , dst.data() , src.data() , sizeof(value_type) ); + if (dst.data() != src.data()) { + Kokkos::Impl::DeepCopy( + exec_space, dst.data(), src.data(), + sizeof(typename dst_traits::value_type)); } exec_space.fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif } //---------------------------------------------------------------------------- -/** \brief A deep copy between views of the default specialization, compatible type, - * same non-zero rank +/** \brief A deep copy between views of the default specialization, compatible + * type, same non-zero rank */ -template< class ExecSpace , class DT, class ... DP, class ST, class ... SP > -inline -void deep_copy - ( const ExecSpace & exec_space - , const View & dst - , const View & src - , typename std::enable_if<( - Kokkos::Impl::is_execution_space< ExecSpace >::value && - std::is_same< typename ViewTraits::specialize , void >::value && - std::is_same< typename ViewTraits::specialize , void >::value && - ( unsigned(ViewTraits::rank) != 0 || - unsigned(ViewTraits::rank) != 0 ) - )>::type * = 0 ) -{ - typedef View dst_type ; - typedef View src_type ; +template +inline void deep_copy( + const ExecSpace& exec_space, const View& dst, + const View& src, + typename std::enable_if<( + Kokkos::Impl::is_execution_space::value && + std::is_same::specialize, void>::value && + std::is_same::specialize, void>::value && + (unsigned(ViewTraits::rank) != 0 || + unsigned(ViewTraits::rank) != 0))>::type* = 0) { + typedef View dst_type; + typedef View src_type; - static_assert( - std::is_same< typename dst_type::value_type , - typename dst_type::non_const_value_type >::value - , "deep_copy requires non-const destination type" ); + static_assert(std::is_same::value, + "deep_copy requires non-const destination type"); - static_assert( - ( unsigned(dst_type::rank) == - unsigned(src_type::rank) ) - , "deep_copy requires Views of equal rank" ); + static_assert((unsigned(dst_type::rank) == unsigned(src_type::rank)), + "deep_copy requires Views of equal rank"); - typedef typename dst_type::execution_space dst_execution_space ; - typedef typename src_type::execution_space src_execution_space ; - typedef typename dst_type::memory_space dst_memory_space ; - typedef typename src_type::memory_space src_memory_space ; - typedef typename dst_type::value_type dst_value_type ; - typedef typename src_type::value_type src_value_type ; + typedef typename dst_type::execution_space dst_execution_space; + typedef typename src_type::execution_space src_execution_space; + typedef typename dst_type::memory_space dst_memory_space; + typedef typename src_type::memory_space src_memory_space; + typedef typename dst_type::value_type dst_value_type; + typedef typename src_type::value_type src_value_type; - if(dst.data() == NULL || src.data() == NULL) { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::beginDeepCopy( + Kokkos::Profiling::SpaceHandle(dst_memory_space().name()), dst.label(), + dst.data(), Kokkos::Profiling::SpaceHandle(src_memory_space().name()), + src.label(), src.data(), dst.span() * sizeof(dst_value_type)); + } +#endif + + if (dst.data() == NULL || src.data() == NULL) { #ifdef KOKKOS_ENABLE_DEPRECATED_CODE // do nothing #else // throw if dimension mismatch - if ( (src.extent(0) != dst.extent(0)) || - (src.extent(1) != dst.extent(1)) || - (src.extent(2) != dst.extent(2)) || - (src.extent(3) != dst.extent(3)) || - (src.extent(4) != dst.extent(4)) || - (src.extent(5) != dst.extent(5)) || - (src.extent(6) != dst.extent(6)) || - (src.extent(7) != dst.extent(7)) - ) { - std::string message("Deprecation Error: Kokkos::deep_copy extents of views don't match: "); - message += dst.label(); message += "("; - for(int r = 0; r::accessible && - Kokkos::Impl::SpaceAccessibility< ExecSpace , src_memory_space >::accessible + enum { + ExecCanAccessSrcDst = + Kokkos::Impl::SpaceAccessibility::accessible && + Kokkos::Impl::SpaceAccessibility::accessible + }; + enum { + DstExecCanAccessSrc = + Kokkos::Impl::SpaceAccessibility::accessible }; - enum { DstExecCanAccessSrc = - Kokkos::Impl::SpaceAccessibility< dst_execution_space , src_memory_space >::accessible }; - enum { SrcExecCanAccessDst = - Kokkos::Impl::SpaceAccessibility< src_execution_space , dst_memory_space >::accessible }; + enum { + SrcExecCanAccessDst = + Kokkos::Impl::SpaceAccessibility::accessible + }; // Checking for Overlapping Views. dst_value_type* dst_start = dst.data(); dst_value_type* dst_end = dst.data() + dst.span(); src_value_type* src_start = src.data(); src_value_type* src_end = src.data() + src.span(); - if( ( ( (std::ptrdiff_t)dst_start < (std::ptrdiff_t)src_end ) && ( (std::ptrdiff_t)dst_end > (std::ptrdiff_t)src_start ) ) && - ( ( dst.span_is_contiguous() && src.span_is_contiguous() ))) { + if ((((std::ptrdiff_t)dst_start < (std::ptrdiff_t)src_end) && + ((std::ptrdiff_t)dst_end > (std::ptrdiff_t)src_start)) && + ((dst.span_is_contiguous() && src.span_is_contiguous()))) { std::string message("Error: Kokkos::deep_copy of overlapping views: "); - message += dst.label(); message += "("; - message += std::to_string((std::ptrdiff_t)dst_start); message += ","; - message += std::to_string((std::ptrdiff_t)dst_end); message += ") "; - message += src.label(); message += "("; - message += std::to_string((std::ptrdiff_t)src_start); message += ","; - message += std::to_string((std::ptrdiff_t)src_end); message += ") "; + message += dst.label(); + message += "("; + message += std::to_string((std::ptrdiff_t)dst_start); + message += ","; + message += std::to_string((std::ptrdiff_t)dst_end); + message += ") "; + message += src.label(); + message += "("; + message += std::to_string((std::ptrdiff_t)src_start); + message += ","; + message += std::to_string((std::ptrdiff_t)src_end); + message += ") "; Kokkos::Impl::throw_runtime_exception(message); } // Check for same extents - if ( (src.extent(0) != dst.extent(0)) || - (src.extent(1) != dst.extent(1)) || - (src.extent(2) != dst.extent(2)) || - (src.extent(3) != dst.extent(3)) || - (src.extent(4) != dst.extent(4)) || - (src.extent(5) != dst.extent(5)) || - (src.extent(6) != dst.extent(6)) || - (src.extent(7) != dst.extent(7)) - ) { + if ((src.extent(0) != dst.extent(0)) || (src.extent(1) != dst.extent(1)) || + (src.extent(2) != dst.extent(2)) || (src.extent(3) != dst.extent(3)) || + (src.extent(4) != dst.extent(4)) || (src.extent(5) != dst.extent(5)) || + (src.extent(6) != dst.extent(6)) || (src.extent(7) != dst.extent(7))) { #ifdef KOKKOS_ENABLE_DEPRECATED_CODE exec_space.fence(); - if ( ExecCanAccessSrcDst ) { - Kokkos::Impl::ViewRemap< dst_type , src_type , ExecSpace >( dst , src ); - } - else if ( DstExecCanAccessSrc ) { - // Copying data between views in accessible memory spaces and either non-contiguous or incompatible shape. - Kokkos::Impl::ViewRemap< dst_type , src_type >( dst , src ); - } - else if ( SrcExecCanAccessDst ) { - // Copying data between views in accessible memory spaces and either non-contiguous or incompatible shape. - Kokkos::Impl::ViewRemap< dst_type , src_type , src_execution_space >( dst , src ); - } - else { - Kokkos::Impl::throw_runtime_exception("deep_copy given views that would require a temporary allocation"); + if (ExecCanAccessSrcDst) { + Kokkos::Impl::ViewRemap(dst, src); + } else if (DstExecCanAccessSrc) { + // Copying data between views in accessible memory spaces and either + // non-contiguous or incompatible shape. + Kokkos::Impl::ViewRemap(dst, src); + } else if (SrcExecCanAccessDst) { + // Copying data between views in accessible memory spaces and either + // non-contiguous or incompatible shape. + Kokkos::Impl::ViewRemap(dst, + src); + } else { + Kokkos::Impl::throw_runtime_exception( + "deep_copy given views that would require a temporary allocation"); } exec_space.fence(); +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif return; #else - std::string message("Deprecation Error: Kokkos::deep_copy extents of views don't match: "); - message += dst.label(); message += "("; - for(int r = 0; r::value && - ( - std::is_same< typename dst_type::array_layout , - typename src_type::array_layout >::value - || - ( dst_type::rank == 1 && - src_type::rank == 1 ) - ) && - dst.span_is_contiguous() && - src.span_is_contiguous() && - ((dst_type::rank < 1) || (dst.stride_0() == src.stride_0())) && - ((dst_type::rank < 2) || (dst.stride_1() == src.stride_1())) && - ((dst_type::rank < 3) || (dst.stride_2() == src.stride_2())) && - ((dst_type::rank < 4) || (dst.stride_3() == src.stride_3())) && - ((dst_type::rank < 5) || (dst.stride_4() == src.stride_4())) && - ((dst_type::rank < 6) || (dst.stride_5() == src.stride_5())) && - ((dst_type::rank < 7) || (dst.stride_6() == src.stride_6())) && - ((dst_type::rank < 8) || (dst.stride_7() == src.stride_7())) - ) { + // If same type, equal layout, equal dimensions, equal span, and contiguous + // memory then can byte-wise copy + if (std::is_same::value && + (std::is_same::value || + (dst_type::rank == 1 && src_type::rank == 1)) && + dst.span_is_contiguous() && src.span_is_contiguous() && + ((dst_type::rank < 1) || (dst.stride_0() == src.stride_0())) && + ((dst_type::rank < 2) || (dst.stride_1() == src.stride_1())) && + ((dst_type::rank < 3) || (dst.stride_2() == src.stride_2())) && + ((dst_type::rank < 4) || (dst.stride_3() == src.stride_3())) && + ((dst_type::rank < 5) || (dst.stride_4() == src.stride_4())) && + ((dst_type::rank < 6) || (dst.stride_5() == src.stride_5())) && + ((dst_type::rank < 7) || (dst.stride_6() == src.stride_6())) && + ((dst_type::rank < 8) || (dst.stride_7() == src.stride_7()))) { const size_t nbytes = sizeof(typename dst_type::value_type) * dst.span(); exec_space.fence(); - if((void*)dst.data() != (void*)src.data()) { - Kokkos::Impl::DeepCopy< dst_memory_space , src_memory_space , ExecSpace > - ( exec_space , dst.data() , src.data() , nbytes ); + if ((void*)dst.data() != (void*)src.data()) { + Kokkos::Impl::DeepCopy( + exec_space, dst.data(), src.data(), nbytes); } exec_space.fence(); } else { @@ -2581,6 +2957,11 @@ void deep_copy Impl::view_copy(dst, src); exec_space.fence(); } +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endDeepCopy(); + } +#endif } } /* namespace Kokkos */ @@ -2590,90 +2971,82 @@ void deep_copy namespace Kokkos { -/** \brief Resize a view with copying old data to new data at the corresponding indices. */ -template< class T , class ... P > -inline -typename std::enable_if< - std::is_same::array_layout,Kokkos::LayoutLeft>::value || - std::is_same::array_layout,Kokkos::LayoutRight>::value ->::type -resize( Kokkos::View & v , - const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ) -{ - typedef Kokkos::View view_type ; +/** \brief Resize a view with copying old data to new data at the corresponding + * indices. */ +template +inline typename std::enable_if< + std::is_same::array_layout, + Kokkos::LayoutLeft>::value || + std::is_same::array_layout, + Kokkos::LayoutRight>::value>::type +resize(Kokkos::View& v, const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG) { + typedef Kokkos::View view_type; - static_assert( Kokkos::ViewTraits::is_managed , "Can only resize managed views" ); + static_assert(Kokkos::ViewTraits::is_managed, + "Can only resize managed views"); // Fix #904 by checking dimensions before actually resizing. // // Rank is known at compile time, so hopefully the compiler will // remove branches that are compile-time false. The upcoming "if // constexpr" language feature would make this certain. - if (view_type::Rank == 1 && - n0 == static_cast (v.extent(0))) { + if (view_type::Rank == 1 && n0 == static_cast(v.extent(0))) { return; } - if (view_type::Rank == 2 && - n0 == static_cast (v.extent(0)) && - n1 == static_cast (v.extent(1))) { + if (view_type::Rank == 2 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1))) { return; } - if (view_type::Rank == 3 && - n0 == static_cast (v.extent(0)) && - n1 == static_cast (v.extent(1)) && - n2 == static_cast (v.extent(2))) { + if (view_type::Rank == 3 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2))) { return; } - if (view_type::Rank == 4 && - n0 == static_cast (v.extent(0)) && - n1 == static_cast (v.extent(1)) && - n2 == static_cast (v.extent(2)) && - n3 == static_cast (v.extent(3))) { + if (view_type::Rank == 4 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2)) && + n3 == static_cast(v.extent(3))) { return; } - if (view_type::Rank == 5 && - n0 == static_cast (v.extent(0)) && - n1 == static_cast (v.extent(1)) && - n2 == static_cast (v.extent(2)) && - n3 == static_cast (v.extent(3)) && - n4 == static_cast (v.extent(4))) { + if (view_type::Rank == 5 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2)) && + n3 == static_cast(v.extent(3)) && + n4 == static_cast(v.extent(4))) { return; } - if (view_type::Rank == 6 && - n0 == static_cast (v.extent(0)) && - n1 == static_cast (v.extent(1)) && - n2 == static_cast (v.extent(2)) && - n3 == static_cast (v.extent(3)) && - n4 == static_cast (v.extent(4)) && - n5 == static_cast (v.extent(5))) { + if (view_type::Rank == 6 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2)) && + n3 == static_cast(v.extent(3)) && + n4 == static_cast(v.extent(4)) && + n5 == static_cast(v.extent(5))) { return; } - if (view_type::Rank == 7 && - n0 == static_cast (v.extent(0)) && - n1 == static_cast (v.extent(1)) && - n2 == static_cast (v.extent(2)) && - n3 == static_cast (v.extent(3)) && - n4 == static_cast (v.extent(4)) && - n5 == static_cast (v.extent(5)) && - n6 == static_cast (v.extent(6))) { + if (view_type::Rank == 7 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2)) && + n3 == static_cast(v.extent(3)) && + n4 == static_cast(v.extent(4)) && + n5 == static_cast(v.extent(5)) && + n6 == static_cast(v.extent(6))) { return; } - if (view_type::Rank == 8 && - n0 == static_cast (v.extent(0)) && - n1 == static_cast (v.extent(1)) && - n2 == static_cast (v.extent(2)) && - n3 == static_cast (v.extent(3)) && - n4 == static_cast (v.extent(4)) && - n5 == static_cast (v.extent(5)) && - n6 == static_cast (v.extent(6)) && - n7 == static_cast (v.extent(7))) { + if (view_type::Rank == 8 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2)) && + n3 == static_cast(v.extent(3)) && + n4 == static_cast(v.extent(4)) && + n5 == static_cast(v.extent(5)) && + n6 == static_cast(v.extent(6)) && + n7 == static_cast(v.extent(7))) { return; } // If Kokkos ever supports Views of rank > 8, the above code won't @@ -2687,71 +3060,169 @@ resize( Kokkos::View & v , // reallocates if any of the dimensions change, even if the old View // has enough space. - view_type v_resized( v.label(), n0, n1, n2, n3, n4, n5, n6, n7 ); + view_type v_resized(v.label(), n0, n1, n2, n3, n4, n5, n6, n7); - Kokkos::Impl::ViewRemap< view_type , view_type >( v_resized , v ); + Kokkos::Impl::ViewRemap(v_resized, v); - v = v_resized ; + v = v_resized; } -/** \brief Resize a view with copying old data to new data at the corresponding indices. */ -template< class T , class ... P > -inline -void resize( Kokkos::View & v , - const typename Kokkos::View::array_layout & layout) -{ - typedef Kokkos::View view_type ; +/** \brief Resize a view with copying old data to new data at the corresponding + * indices. */ +template +inline typename std::enable_if< + std::is_same::array_layout, + Kokkos::LayoutLeft>::value || + std::is_same::array_layout, + Kokkos::LayoutRight>::value>::type +resize(const I& arg_prop, Kokkos::View& v, + const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG) { + typedef Kokkos::View view_type; - static_assert( Kokkos::ViewTraits::is_managed , "Can only resize managed views" ); + static_assert(Kokkos::ViewTraits::is_managed, + "Can only resize managed views"); - view_type v_resized( v.label(), layout ); + // Fix #904 by checking dimensions before actually resizing. + // + // Rank is known at compile time, so hopefully the compiler will + // remove branches that are compile-time false. The upcoming "if + // constexpr" language feature would make this certain. + if (view_type::Rank == 1 && n0 == static_cast(v.extent(0))) { + return; + } + if (view_type::Rank == 2 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1))) { + return; + } + if (view_type::Rank == 3 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2))) { + return; + } + if (view_type::Rank == 4 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2)) && + n3 == static_cast(v.extent(3))) { + return; + } + if (view_type::Rank == 5 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2)) && + n3 == static_cast(v.extent(3)) && + n4 == static_cast(v.extent(4))) { + return; + } + if (view_type::Rank == 6 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2)) && + n3 == static_cast(v.extent(3)) && + n4 == static_cast(v.extent(4)) && + n5 == static_cast(v.extent(5))) { + return; + } + if (view_type::Rank == 7 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2)) && + n3 == static_cast(v.extent(3)) && + n4 == static_cast(v.extent(4)) && + n5 == static_cast(v.extent(5)) && + n6 == static_cast(v.extent(6))) { + return; + } + if (view_type::Rank == 8 && n0 == static_cast(v.extent(0)) && + n1 == static_cast(v.extent(1)) && + n2 == static_cast(v.extent(2)) && + n3 == static_cast(v.extent(3)) && + n4 == static_cast(v.extent(4)) && + n5 == static_cast(v.extent(5)) && + n6 == static_cast(v.extent(6)) && + n7 == static_cast(v.extent(7))) { + return; + } + // If Kokkos ever supports Views of rank > 8, the above code won't + // be incorrect, because avoiding reallocation in resize() is just + // an optimization. - Kokkos::Impl::ViewRemap< view_type , view_type >( v_resized , v ); + // TODO (mfh 27 Jun 2017) If the old View has enough space but just + // different dimensions (e.g., if the product of the dimensions, + // including extra space for alignment, will not change), then + // consider just reusing storage. For now, Kokkos always + // reallocates if any of the dimensions change, even if the old View + // has enough space. - v = v_resized ; + view_type v_resized(view_alloc(v.label(), std::forward(arg_prop)), + n0, n1, n2, n3, n4, n5, n6, n7); + + Kokkos::Impl::ViewRemap(v_resized, v); + + v = v_resized; +} + +/** \brief Resize a view with copying old data to new data at the corresponding + * indices. */ +template +inline void resize(Kokkos::View& v, + const typename Kokkos::View::array_layout& layout) { + typedef Kokkos::View view_type; + + static_assert(Kokkos::ViewTraits::is_managed, + "Can only resize managed views"); + + view_type v_resized(v.label(), layout); + + Kokkos::Impl::ViewRemap(v_resized, v); + + v = v_resized; } /** \brief Resize a view with discarding old data. */ -template< class T , class ... P > -inline -typename std::enable_if< - std::is_same::array_layout,Kokkos::LayoutLeft>::value || - std::is_same::array_layout,Kokkos::LayoutRight>::value ->::type -realloc( Kokkos::View & v , - const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG , - const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ) -{ - typedef Kokkos::View view_type ; +template +inline typename std::enable_if< + std::is_same::array_layout, + Kokkos::LayoutLeft>::value || + std::is_same::array_layout, + Kokkos::LayoutRight>::value>::type +realloc(Kokkos::View& v, + const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG) { + typedef Kokkos::View view_type; - static_assert( Kokkos::ViewTraits::is_managed , "Can only realloc managed views" ); + static_assert(Kokkos::ViewTraits::is_managed, + "Can only realloc managed views"); const std::string label = v.label(); - v = view_type(); // Deallocate first, if the only view to allocation - v = view_type( label, n0, n1, n2, n3, n4, n5, n6, n7 ); + v = view_type(); // Deallocate first, if the only view to allocation + v = view_type(label, n0, n1, n2, n3, n4, n5, n6, n7); } /** \brief Resize a view with discarding old data. */ -template< class T , class ... P > -inline -void realloc( Kokkos::View & v , - const typename Kokkos::View::array_layout & layout) -{ - typedef Kokkos::View view_type ; +template +inline void realloc( + Kokkos::View& v, + const typename Kokkos::View::array_layout& layout) { + typedef Kokkos::View view_type; - static_assert( Kokkos::ViewTraits::is_managed , "Can only realloc managed views" ); + static_assert(Kokkos::ViewTraits::is_managed, + "Can only realloc managed views"); const std::string label = v.label(); - v = view_type(); // Deallocate first, if the only view to allocation - v = view_type( label, layout ); + v = view_type(); // Deallocate first, if the only view to allocation + v = view_type(label, layout); } } /* namespace Kokkos */ @@ -2762,94 +3233,99 @@ namespace Kokkos { namespace Impl { // Deduce Mirror Types -template +template struct MirrorViewType { // The incoming view_type - typedef typename Kokkos::View src_view_type; + typedef typename Kokkos::View src_view_type; // The memory space for the mirror view typedef typename Space::memory_space memory_space; // Check whether it is the same memory space - enum { is_same_memspace = std::is_same::value }; + enum { + is_same_memspace = + std::is_same::value + }; // The array_layout typedef typename src_view_type::array_layout array_layout; - // The data type (we probably want it non-const since otherwise we can't even deep_copy to it. + // The data type (we probably want it non-const since otherwise we can't even + // deep_copy to it. typedef typename src_view_type::non_const_data_type data_type; // The destination view type if it is not the same memory space - typedef Kokkos::View dest_view_type; + typedef Kokkos::View dest_view_type; // If it is the same memory_space return the existsing view_type // This will also keep the unmanaged trait if necessary - typedef typename std::conditional::type view_type; + typedef typename std::conditional::type view_type; }; -template +template struct MirrorType { // The incoming view_type - typedef typename Kokkos::View src_view_type; + typedef typename Kokkos::View src_view_type; // The memory space for the mirror view typedef typename Space::memory_space memory_space; // Check whether it is the same memory space - enum { is_same_memspace = std::is_same::value }; + enum { + is_same_memspace = + std::is_same::value + }; // The array_layout typedef typename src_view_type::array_layout array_layout; - // The data type (we probably want it non-const since otherwise we can't even deep_copy to it. + // The data type (we probably want it non-const since otherwise we can't even + // deep_copy to it. typedef typename src_view_type::non_const_data_type data_type; // The destination view type if it is not the same memory space - typedef Kokkos::View view_type; + typedef Kokkos::View view_type; }; -} +} // namespace Impl -template< class T , class ... P > -inline -typename Kokkos::View::HostMirror -create_mirror( const Kokkos::View & src - , typename std::enable_if< - std::is_same< typename ViewTraits::specialize , void >::value && - ! std::is_same< typename Kokkos::ViewTraits::array_layout - , Kokkos::LayoutStride >::value - >::type * = 0 - ) -{ - typedef View src_type ; - typedef typename src_type::HostMirror dst_type ; +template +inline typename Kokkos::View::HostMirror create_mirror( + const Kokkos::View& src, + typename std::enable_if< + std::is_same::specialize, void>::value && + !std::is_same::array_layout, + Kokkos::LayoutStride>::value>::type* = 0) { + typedef View src_type; + typedef typename src_type::HostMirror dst_type; - return dst_type( std::string( src.label() ).append("_mirror") + return dst_type(std::string(src.label()).append("_mirror") #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - , src.extent(0) - , src.extent(1) - , src.extent(2) - , src.extent(3) - , src.extent(4) - , src.extent(5) - , src.extent(6) - , src.extent(7) ); + , + src.extent(0), src.extent(1), src.extent(2), src.extent(3), + src.extent(4), src.extent(5), src.extent(6), src.extent(7)); #else - , src.rank_dynamic > 0 ? src.extent(0): KOKKOS_IMPL_CTOR_DEFAULT_ARG - , src.rank_dynamic > 1 ? src.extent(1): KOKKOS_IMPL_CTOR_DEFAULT_ARG - , src.rank_dynamic > 2 ? src.extent(2): KOKKOS_IMPL_CTOR_DEFAULT_ARG - , src.rank_dynamic > 3 ? src.extent(3): KOKKOS_IMPL_CTOR_DEFAULT_ARG - , src.rank_dynamic > 4 ? src.extent(4): KOKKOS_IMPL_CTOR_DEFAULT_ARG - , src.rank_dynamic > 5 ? src.extent(5): KOKKOS_IMPL_CTOR_DEFAULT_ARG - , src.rank_dynamic > 6 ? src.extent(6): KOKKOS_IMPL_CTOR_DEFAULT_ARG - , src.rank_dynamic > 7 ? src.extent(7): KOKKOS_IMPL_CTOR_DEFAULT_ARG ); + , + src.rank_dynamic > 0 ? src.extent(0) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + src.rank_dynamic > 1 ? src.extent(1) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + src.rank_dynamic > 2 ? src.extent(2) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + src.rank_dynamic > 3 ? src.extent(3) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + src.rank_dynamic > 4 ? src.extent(4) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + src.rank_dynamic > 5 ? src.extent(5) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + src.rank_dynamic > 6 ? src.extent(6) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG, + src.rank_dynamic > 7 ? src.extent(7) + : KOKKOS_IMPL_CTOR_DEFAULT_ARG); #endif } -template< class T , class ... P > -inline -typename Kokkos::View::HostMirror -create_mirror( const Kokkos::View & src - , typename std::enable_if< - std::is_same< typename ViewTraits::specialize , void >::value && - std::is_same< typename Kokkos::ViewTraits::array_layout - , Kokkos::LayoutStride >::value - >::type * = 0 - ) -{ - typedef View src_type ; - typedef typename src_type::HostMirror dst_type ; +template +inline typename Kokkos::View::HostMirror create_mirror( + const Kokkos::View& src, + typename std::enable_if< + std::is_same::specialize, void>::value && + std::is_same::array_layout, + Kokkos::LayoutStride>::value>::type* = 0) { + typedef View src_type; + typedef typename src_type::HostMirror dst_type; - Kokkos::LayoutStride layout ; + Kokkos::LayoutStride layout; layout.dimension[0] = src.extent(0); layout.dimension[1] = src.extent(1); @@ -2869,117 +3345,119 @@ create_mirror( const Kokkos::View & src layout.stride[6] = src.stride_6(); layout.stride[7] = src.stride_7(); - return dst_type( std::string( src.label() ).append("_mirror") , layout ); + return dst_type(std::string(src.label()).append("_mirror"), layout); } - // Create a mirror in a new space (specialization for different space) -template -typename Impl::MirrorType::view_type -create_mirror(const Space& , const Kokkos::View & src - , typename std::enable_if< - std::is_same< typename ViewTraits::specialize , void >::value - >::type * = 0) { - return typename Impl::MirrorType::view_type(src.label(),src.layout()); +template +typename Impl::MirrorType::view_type create_mirror( + const Space&, const Kokkos::View& src, + typename std::enable_if::specialize, void>::value>::type* = 0) { + return typename Impl::MirrorType::view_type(src.label(), + src.layout()); } -template< class T , class ... P > -inline -typename Kokkos::View::HostMirror -create_mirror_view( const Kokkos::View & src - , typename std::enable_if<( - std::is_same< typename Kokkos::View::memory_space - , typename Kokkos::View::HostMirror::memory_space - >::value - && - std::is_same< typename Kokkos::View::data_type - , typename Kokkos::View::HostMirror::data_type - >::value - )>::type * = 0 - ) -{ - return src ; +template +inline typename Kokkos::View::HostMirror create_mirror_view( + const Kokkos::View& src, + typename std::enable_if< + (std::is_same< + typename Kokkos::View::memory_space, + typename Kokkos::View::HostMirror::memory_space>::value && + std::is_same::data_type, + typename Kokkos::View::HostMirror::data_type>:: + value)>::type* = 0) { + return src; } -template< class T , class ... P > -inline -typename Kokkos::View::HostMirror -create_mirror_view( const Kokkos::View & src - , typename std::enable_if< ! ( - std::is_same< typename Kokkos::View::memory_space - , typename Kokkos::View::HostMirror::memory_space - >::value - && - std::is_same< typename Kokkos::View::data_type - , typename Kokkos::View::HostMirror::data_type - >::value - )>::type * = 0 - ) -{ - return Kokkos::create_mirror( src ); +template +inline typename Kokkos::View::HostMirror create_mirror_view( + const Kokkos::View& src, + typename std::enable_if::memory_space, + typename Kokkos::View::HostMirror::memory_space>::value && + std::is_same::data_type, + typename Kokkos::View::HostMirror::data_type>:: + value)>::type* = 0) { + return Kokkos::create_mirror(src); } // Create a mirror view in a new space (specialization for same space) -template -typename Impl::MirrorViewType::view_type -create_mirror_view(const Space& , const Kokkos::View & src - , typename std::enable_if::is_same_memspace>::type* = 0 ) { +template +typename Impl::MirrorViewType::view_type create_mirror_view( + const Space&, const Kokkos::View& src, + typename std::enable_if< + Impl::MirrorViewType::is_same_memspace>::type* = 0) { return src; } // Create a mirror view in a new space (specialization for different space) -template -typename Impl::MirrorViewType::view_type -create_mirror_view(const Space& , const Kokkos::View & src - , typename std::enable_if::is_same_memspace>::type* = 0 ) { - return typename Impl::MirrorViewType::view_type(src.label(),src.layout()); +template +typename Impl::MirrorViewType::view_type create_mirror_view( + const Space&, const Kokkos::View& src, + typename std::enable_if< + !Impl::MirrorViewType::is_same_memspace>::type* = 0) { + return typename Impl::MirrorViewType::view_type(src.label(), + src.layout()); } -// Create a mirror view and deep_copy in a new space (specialization for same space) -template -typename Impl::MirrorViewType::view_type -create_mirror_view_and_copy(const Space& , const Kokkos::View & src - , std::string const& name = "" - , typename std::enable_if::is_same_memspace>::type* = 0 ) { +// Create a mirror view and deep_copy in a new space (specialization for same +// space) +template +typename Impl::MirrorViewType::view_type +create_mirror_view_and_copy( + const Space&, const Kokkos::View& src, + std::string const& name = "", + typename std::enable_if< + Impl::MirrorViewType::is_same_memspace>::type* = 0) { (void)name; return src; } -// Create a mirror view and deep_copy in a new space (specialization for different space) -template -typename Impl::MirrorViewType::view_type -create_mirror_view_and_copy(const Space& , const Kokkos::View & src - , std::string const& name = "" - , typename std::enable_if::is_same_memspace>::type* = 0 ) { - using Mirror = typename Impl::MirrorViewType::view_type; +// Create a mirror view and deep_copy in a new space (specialization for +// different space) +template +typename Impl::MirrorViewType::view_type +create_mirror_view_and_copy( + const Space&, const Kokkos::View& src, + std::string const& name = "", + typename std::enable_if< + !Impl::MirrorViewType::is_same_memspace>::type* = 0) { + using Mirror = typename Impl::MirrorViewType::view_type; std::string label = name.empty() ? src.label() : name; auto mirror = Mirror(ViewAllocateWithoutInitializing(label), src.layout()); deep_copy(mirror, src); return mirror; } - -// Create a mirror view in a new space without initializing (specialization for same space) -template -typename Impl::MirrorViewType::view_type -create_mirror_view(const Space& , const Kokkos::View & src - , Kokkos::Impl::WithoutInitializing_t - , typename std::enable_if::is_same_memspace>::type* = 0 ) { + +// Create a mirror view in a new space without initializing (specialization for +// same space) +template +typename Impl::MirrorViewType::view_type create_mirror_view( + const Space&, const Kokkos::View& src, + Kokkos::Impl::WithoutInitializing_t, + typename std::enable_if< + Impl::MirrorViewType::is_same_memspace>::type* = 0) { return src; } - -// Create a mirror view in a new space without initializing (specialization for different space) -template -typename Impl::MirrorViewType::view_type -create_mirror_view(const Space& , const Kokkos::View & src - , Kokkos::Impl::WithoutInitializing_t - , typename std::enable_if::is_same_memspace>::type* = 0 ) { - using Mirror = typename Impl::MirrorViewType::view_type; - return Mirror(Kokkos::ViewAllocateWithoutInitializing(src.label()), src.layout()); + +// Create a mirror view in a new space without initializing (specialization for +// different space) +template +typename Impl::MirrorViewType::view_type create_mirror_view( + const Space&, const Kokkos::View& src, + Kokkos::Impl::WithoutInitializing_t, + typename std::enable_if< + !Impl::MirrorViewType::is_same_memspace>::type* = 0) { + using Mirror = typename Impl::MirrorViewType::view_type; + return Mirror(Kokkos::ViewAllocateWithoutInitializing(src.label()), + src.layout()); } } /* namespace Kokkos */ - //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- diff --git a/lib/kokkos/core/src/Kokkos_Core.hpp b/lib/kokkos/core/src/Kokkos_Core.hpp index 9fbba0abfa..7661efeca7 100644 --- a/lib/kokkos/core/src/Kokkos_Core.hpp +++ b/lib/kokkos/core/src/Kokkos_Core.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -49,11 +50,11 @@ #include -#if defined( KOKKOS_ENABLE_SERIAL ) +#if defined(KOKKOS_ENABLE_SERIAL) #include #endif -#if defined( KOKKOS_ENABLE_OPENMP ) +#if defined(KOKKOS_ENABLE_OPENMP) #include #endif @@ -62,23 +63,23 @@ #include //#endif -#if defined( KOKKOS_ENABLE_QTHREADS ) +#if defined(KOKKOS_ENABLE_QTHREADS) #include #endif -#if defined( KOKKOS_ENABLE_HPX ) +#if defined(KOKKOS_ENABLE_HPX) #include #endif -#if defined( KOKKOS_ENABLE_THREADS ) +#if defined(KOKKOS_ENABLE_THREADS) #include #endif -#if defined( KOKKOS_ENABLE_CUDA ) +#if defined(KOKKOS_ENABLE_CUDA) #include #endif -#if defined( KOKKOS_ENABLE_ROCM ) +#if defined(KOKKOS_ENABLE_ROCM) #include #endif @@ -111,18 +112,13 @@ struct InitArguments { int skip_device; bool disable_warnings; - InitArguments( int nt = -1 - , int nn = -1 - , int dv = -1 - , bool dw = false - ) - : num_threads{ nt } - , num_numa{ nn } - , device_id{ dv } - , ndevices{ -1 } - , skip_device{ 9999 } - , disable_warnings{ dw } - {} + InitArguments(int nt = -1, int nn = -1, int dv = -1, bool dw = false) + : num_threads{nt}, + num_numa{nn}, + device_id{dv}, + ndevices{-1}, + skip_device{9999}, + disable_warnings{dw} {} }; void initialize(int& narg, char* arg[]); @@ -164,9 +160,9 @@ void finalize_all(); void fence(); /** \brief Print "Bill of Materials" */ -void print_configuration( std::ostream & , const bool detail = false ); +void print_configuration(std::ostream&, const bool detail = false); -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -177,92 +173,80 @@ namespace Kokkos { * The allocation is tracked in Kokkos memory tracking system, so * leaked memory can be identified. */ -template< class Space = typename Kokkos::DefaultExecutionSpace::memory_space > -inline -void * kokkos_malloc( const std::string & arg_alloc_label - , const size_t arg_alloc_size ) -{ - typedef typename Space::memory_space MemorySpace ; - return Impl::SharedAllocationRecord< MemorySpace >:: - allocate_tracked( MemorySpace() , arg_alloc_label , arg_alloc_size ); +template +inline void* kokkos_malloc(const std::string& arg_alloc_label, + const size_t arg_alloc_size) { + typedef typename Space::memory_space MemorySpace; + return Impl::SharedAllocationRecord::allocate_tracked( + MemorySpace(), arg_alloc_label, arg_alloc_size); } -template< class Space = typename Kokkos::DefaultExecutionSpace::memory_space > -inline -void * kokkos_malloc( const size_t arg_alloc_size ) -{ - typedef typename Space::memory_space MemorySpace ; - return Impl::SharedAllocationRecord< MemorySpace >:: - allocate_tracked( MemorySpace() , "no-label" , arg_alloc_size ); +template +inline void* kokkos_malloc(const size_t arg_alloc_size) { + typedef typename Space::memory_space MemorySpace; + return Impl::SharedAllocationRecord::allocate_tracked( + MemorySpace(), "no-label", arg_alloc_size); } -template< class Space = typename Kokkos::DefaultExecutionSpace::memory_space > -inline -void kokkos_free( void * arg_alloc ) -{ - typedef typename Space::memory_space MemorySpace ; - return Impl::SharedAllocationRecord< MemorySpace >:: - deallocate_tracked( arg_alloc ); +template +inline void kokkos_free(void* arg_alloc) { + typedef typename Space::memory_space MemorySpace; + return Impl::SharedAllocationRecord::deallocate_tracked( + arg_alloc); } -template< class Space = typename Kokkos::DefaultExecutionSpace::memory_space > -inline -void * kokkos_realloc( void * arg_alloc , const size_t arg_alloc_size ) -{ - typedef typename Space::memory_space MemorySpace ; - return Impl::SharedAllocationRecord< MemorySpace >:: - reallocate_tracked( arg_alloc , arg_alloc_size ); +template +inline void* kokkos_realloc(void* arg_alloc, const size_t arg_alloc_size) { + typedef typename Space::memory_space MemorySpace; + return Impl::SharedAllocationRecord::reallocate_tracked( + arg_alloc, arg_alloc_size); } -} // namespace Kokkos +} // namespace Kokkos namespace Kokkos { /** \brief ScopeGuard - * Some user scope issues have been identified with some Kokkos::finalize calls; - * ScopeGuard aims to correct these issues. + * Some user scope issues have been identified with some Kokkos::finalize + * calls; ScopeGuard aims to correct these issues. * - * Two requirements for ScopeGuard: - * if Kokkos::is_initialized() in the constructor, don't call Kokkos::initialize or Kokkos::finalize - * it is not copyable or assignable + * Two requirements for ScopeGuard: + * if Kokkos::is_initialized() in the constructor, don't call + * Kokkos::initialize or Kokkos::finalize it is not copyable or assignable */ class ScopeGuard { -public: - ScopeGuard ( int& narg, char* arg[] ) - { - sg_init = false; - if ( ! Kokkos::is_initialized() ) { - initialize( narg, arg ); + public: + ScopeGuard(int& narg, char* arg[]) { + sg_init = false; + if (!Kokkos::is_initialized()) { + initialize(narg, arg); sg_init = true; } } - ScopeGuard ( const InitArguments& args = InitArguments() ) - { - sg_init = false; - if ( ! Kokkos::is_initialized() ) { - initialize( args ); + ScopeGuard(const InitArguments& args = InitArguments()) { + sg_init = false; + if (!Kokkos::is_initialized()) { + initialize(args); sg_init = true; } } - ~ScopeGuard( ) - { - if ( Kokkos::is_initialized() && sg_init) { - finalize(); + ~ScopeGuard() { + if (Kokkos::is_initialized() && sg_init) { + finalize(); } } -//private: - bool sg_init; - - ScopeGuard& operator=( const ScopeGuard& ) = delete; - ScopeGuard( const ScopeGuard& ) = delete; + // private: + bool sg_init; + ScopeGuard& operator=(const ScopeGuard&) = delete; + ScopeGuard(const ScopeGuard&) = delete; }; -} // namespace Kokkos +} // namespace Kokkos #include #include @@ -271,4 +255,3 @@ public: //---------------------------------------------------------------------------- #endif - diff --git a/lib/kokkos/core/src/Kokkos_Core_fwd.hpp b/lib/kokkos/core/src/Kokkos_Core_fwd.hpp index 55c6a5494a..5b89dc51ca 100644 --- a/lib/kokkos/core/src/Kokkos_Core_fwd.hpp +++ b/lib/kokkos/core/src/Kokkos_Core_fwd.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -57,8 +58,8 @@ //---------------------------------------------------------------------------- // Have assumed a 64bit build (8byte pointers) throughout the code base. -static_assert( sizeof(void*) == 8 - , "Kokkos assumes 64-bit build; i.e., 8-byte pointers" ); +static_assert(sizeof(void *) == 8, + "Kokkos assumes 64-bit build; i.e., 8-byte pointers"); //---------------------------------------------------------------------------- @@ -66,133 +67,137 @@ namespace Kokkos { struct AUTO_t { KOKKOS_INLINE_FUNCTION - constexpr const AUTO_t & operator()() const { return *this; } + constexpr const AUTO_t &operator()() const { return *this; } }; namespace { -/**\brief Token to indicate that a parameter's value is to be automatically selected */ +/**\brief Token to indicate that a parameter's value is to be automatically + * selected */ constexpr AUTO_t AUTO = Kokkos::AUTO_t(); -} +} // namespace struct InvalidType {}; -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- // Forward declarations for class inter-relationships namespace Kokkos { -class HostSpace; ///< Memory space for main process and CPU execution spaces +class HostSpace; ///< Memory space for main process and CPU execution spaces class AnonymousSpace; #ifdef KOKKOS_ENABLE_HBWSPACE namespace Experimental { -class HBWSpace; /// Memory space for hbw_malloc from memkind (e.g. for KNL processor) +class HBWSpace; /// Memory space for hbw_malloc from memkind (e.g. for KNL + /// processor) } #endif -#if defined( KOKKOS_ENABLE_SERIAL ) -class Serial; ///< Execution space main process on CPU. +#if defined(KOKKOS_ENABLE_SERIAL) +class Serial; ///< Execution space main process on CPU. #endif -#if defined( KOKKOS_ENABLE_QTHREADS ) +#if defined(KOKKOS_ENABLE_QTHREADS) class Qthreads; ///< Execution space with Qthreads back-end. #endif -#if defined( KOKKOS_ENABLE_HPX ) +#if defined(KOKKOS_ENABLE_HPX) namespace Experimental { class HPX; ///< Execution space with HPX back-end. } #endif -#if defined( KOKKOS_ENABLE_THREADS ) -class Threads; ///< Execution space with pthreads back-end. +#if defined(KOKKOS_ENABLE_THREADS) +class Threads; ///< Execution space with pthreads back-end. #endif -#if defined( KOKKOS_ENABLE_OPENMP ) -class OpenMP; ///< OpenMP execution space. +#if defined(KOKKOS_ENABLE_OPENMP) +class OpenMP; ///< OpenMP execution space. #endif -#if defined( KOKKOS_ENABLE_OPENMPTARGET ) +#if defined(KOKKOS_ENABLE_OPENMPTARGET) namespace Experimental { -class OpenMPTarget; ///< OpenMPTarget execution space. +class OpenMPTarget; ///< OpenMPTarget execution space. class OpenMPTargetSpace; -} +} // namespace Experimental #endif - -#if defined( KOKKOS_ENABLE_CUDA ) +#if defined(KOKKOS_ENABLE_CUDA) class CudaSpace; ///< Memory space on Cuda GPU class CudaUVMSpace; ///< Memory space on Cuda GPU with UVM class CudaHostPinnedSpace; ///< Memory space on Host accessible to Cuda GPU class Cuda; ///< Execution space for Cuda GPU #endif -#if defined( KOKKOS_ENABLE_ROCM ) +#if defined(KOKKOS_ENABLE_ROCM) namespace Experimental { -class ROCmSpace ; ///< Memory space on ROCm GPU -class ROCm ; ///< Execution space for ROCm GPU -} +class ROCmSpace; ///< Memory space on ROCm GPU +class ROCm; ///< Execution space for ROCm GPU +} // namespace Experimental #endif -template +template struct Device; -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- // Set the default execution space. /// Define Kokkos::DefaultExecutionSpace as per configuration option /// or chosen from the enabled execution spaces in the following order: -/// Kokkos::Cuda, Kokkos::Experimental::OpenMPTarget, Kokkos::OpenMP, Kokkos::Threads, Kokkos::Serial +/// Kokkos::Cuda, Kokkos::Experimental::OpenMPTarget, Kokkos::OpenMP, +/// Kokkos::Threads, Kokkos::Serial namespace Kokkos { -#if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) - typedef Cuda DefaultExecutionSpace; -#elif defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET ) - typedef Experimental::OpenMPTarget DefaultExecutionSpace ; -#elif defined ( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM ) - typedef Experimental::ROCm DefaultExecutionSpace ; -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) - typedef OpenMP DefaultExecutionSpace; -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) - typedef Threads DefaultExecutionSpace; +#if defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA) +typedef Cuda DefaultExecutionSpace; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET) +typedef Experimental::OpenMPTarget DefaultExecutionSpace; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM) +typedef Experimental::ROCm DefaultExecutionSpace; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP) +typedef OpenMP DefaultExecutionSpace; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS) +typedef Threads DefaultExecutionSpace; //#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) // typedef Qthreads DefaultExecutionSpace; -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX ) - typedef Kokkos::Experimental::HPX DefaultExecutionSpace; -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) - typedef Serial DefaultExecutionSpace; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX) +typedef Kokkos::Experimental::HPX DefaultExecutionSpace; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL) +typedef Serial DefaultExecutionSpace; #else -# error "At least one of the following execution spaces must be defined in order to use Kokkos: Kokkos::Cuda, Kokkos::Experimental::OpenMPTarget, Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qthreads, or Kokkos::Serial." +#error \ + "At least one of the following execution spaces must be defined in order to use Kokkos: Kokkos::Cuda, Kokkos::Experimental::OpenMPTarget, Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qthreads, or Kokkos::Serial." #endif -#if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) - typedef OpenMP DefaultHostExecutionSpace; -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) - typedef Threads DefaultHostExecutionSpace; +#if defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP) +typedef OpenMP DefaultHostExecutionSpace; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS) +typedef Threads DefaultHostExecutionSpace; //#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) // typedef Qthreads DefaultHostExecutionSpace; -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) - typedef Serial DefaultHostExecutionSpace; -#elif defined( KOKKOS_ENABLE_OPENMP ) - typedef OpenMP DefaultHostExecutionSpace; -#elif defined( KOKKOS_ENABLE_THREADS ) - typedef Threads DefaultHostExecutionSpace; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL) +typedef Serial DefaultHostExecutionSpace; +#elif defined(KOKKOS_ENABLE_OPENMP) +typedef OpenMP DefaultHostExecutionSpace; +#elif defined(KOKKOS_ENABLE_THREADS) +typedef Threads DefaultHostExecutionSpace; //#elif defined( KOKKOS_ENABLE_QTHREADS ) // typedef Qthreads DefaultHostExecutionSpace; -#elif defined( KOKKOS_ENABLE_HPX ) - typedef Kokkos::Experimental::HPX DefaultHostExecutionSpace; -#elif defined( KOKKOS_ENABLE_SERIAL ) - typedef Serial DefaultHostExecutionSpace; +#elif defined(KOKKOS_ENABLE_HPX) +typedef Kokkos::Experimental::HPX DefaultHostExecutionSpace; +#elif defined(KOKKOS_ENABLE_SERIAL) +typedef Serial DefaultHostExecutionSpace; #else -# error "At least one of the following execution spaces must be defined in order to use Kokkos: Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qthreads, or Kokkos::Serial." +#error \ + "At least one of the following execution spaces must be defined in order to use Kokkos: Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qthreads, or Kokkos::Serial." #endif -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- // Detect the active execution space and define its memory space. @@ -203,44 +208,44 @@ namespace Kokkos { namespace Impl { -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) && defined( KOKKOS_ENABLE_CUDA ) -typedef Kokkos::CudaSpace ActiveExecutionMemorySpace; -#elif defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_ROCM_GPU ) -typedef Kokkos::HostSpace ActiveExecutionMemorySpace ; -#elif defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) -typedef Kokkos::HostSpace ActiveExecutionMemorySpace; +#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA) && \ + defined(KOKKOS_ENABLE_CUDA) +typedef Kokkos::CudaSpace ActiveExecutionMemorySpace; +#elif defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_ROCM_GPU) +typedef Kokkos::HostSpace ActiveExecutionMemorySpace; +#elif defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST) +typedef Kokkos::HostSpace ActiveExecutionMemorySpace; #else typedef void ActiveExecutionMemorySpace; #endif -template< class ActiveSpace, class MemorySpace > +template struct VerifyExecutionCanAccessMemorySpace { - enum {value = 0}; + enum { value = 0 }; }; -template< class Space > -struct VerifyExecutionCanAccessMemorySpace< Space, Space > -{ - enum {value = 1}; +template +struct VerifyExecutionCanAccessMemorySpace { + enum { value = 1 }; KOKKOS_INLINE_FUNCTION static void verify(void) {} KOKKOS_INLINE_FUNCTION static void verify(const void *) {} }; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos -#define KOKKOS_RESTRICT_EXECUTION_TO_DATA( DATA_SPACE, DATA_PTR ) \ +#define KOKKOS_RESTRICT_EXECUTION_TO_DATA(DATA_SPACE, DATA_PTR) \ + Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< \ + Kokkos::Impl::ActiveExecutionMemorySpace, DATA_SPACE>::verify(DATA_PTR) + +#define KOKKOS_RESTRICT_EXECUTION_TO_(DATA_SPACE) \ Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< \ - Kokkos::Impl::ActiveExecutionMemorySpace, DATA_SPACE >::verify( DATA_PTR ) - -#define KOKKOS_RESTRICT_EXECUTION_TO_( DATA_SPACE ) \ - Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< \ - Kokkos::Impl::ActiveExecutionMemorySpace, DATA_SPACE >::verify() + Kokkos::Impl::ActiveExecutionMemorySpace, DATA_SPACE>::verify() //---------------------------------------------------------------------------- namespace Kokkos { - void fence(); +void fence(); } //---------------------------------------------------------------------------- @@ -249,29 +254,33 @@ namespace Kokkos { namespace Impl { -template< class DstSpace, class SrcSpace, class ExecutionSpace = typename DstSpace::execution_space > +template struct DeepCopy; -template +template struct ViewFillETIAvail; -template::value> +template ::value> struct ViewFill; -template +template struct ViewCopyETIAvail; -template::value> +template ::value> struct ViewCopy; -template< class Functor - , class Policy - , class EnableFunctor = void - , class EnablePolicy = void - > +template struct FunctorPolicyExecutionSpace; //---------------------------------------------------------------------------- @@ -281,18 +290,20 @@ struct FunctorPolicyExecutionSpace; /// /// This is an implementation detail of parallel_for. Users should /// skip this and go directly to the nonmember function parallel_for. -template< class FunctorType, class ExecPolicy, class ExecutionSpace = - typename Impl::FunctorPolicyExecutionSpace< FunctorType, ExecPolicy >::execution_space - > class ParallelFor; +template ::execution_space> +class ParallelFor; /// \class ParallelReduce /// \brief Implementation detail of parallel_reduce. /// /// This is an implementation detail of parallel_reduce. Users should /// skip this and go directly to the nonmember function parallel_reduce. -template< class FunctorType, class ExecPolicy, class ReducerType = InvalidType, class ExecutionSpace = - typename Impl::FunctorPolicyExecutionSpace< FunctorType, ExecPolicy >::execution_space - > class ParallelReduce; +template ::execution_space> +class ParallelReduce; /// \class ParallelScan /// \brief Implementation detail of parallel_scan. @@ -300,56 +311,71 @@ template< class FunctorType, class ExecPolicy, class ReducerType = InvalidType, /// This is an implementation detail of parallel_scan. Users should /// skip this and go directly to the documentation of the nonmember /// template function Kokkos::parallel_scan. -template< class FunctorType, class ExecPolicy, class ExecutionSapce = - typename Impl::FunctorPolicyExecutionSpace< FunctorType, ExecPolicy >::execution_space - > class ParallelScan; +template ::execution_space> +class ParallelScan; -template< class FunctorType, class ExecPolicy, class ReturnType = InvalidType, class ExecutionSapce = - typename Impl::FunctorPolicyExecutionSpace< FunctorType, ExecPolicy >::execution_space - > class ParallelScanWithTotal; +template ::execution_space> +class ParallelScanWithTotal; -} // namespace Impl +} // namespace Impl -template struct Sum; -template struct Prod; -template struct Min; -template struct Max; -template struct MinMax; -template struct MinLoc; -template struct MaxLoc; -template struct MinMaxLoc; -template struct BAnd; -template struct BOr; -template struct LAnd; -template struct LOr; +template +struct Sum; +template +struct Prod; +template +struct Min; +template +struct Max; +template +struct MinMax; +template +struct MinLoc; +template +struct MaxLoc; +template +struct MinMaxLoc; +template +struct BAnd; +template +struct BOr; +template +struct LAnd; +template +struct LOr; - -} // namespace Kokkos +} // namespace Kokkos #ifdef KOKKOS_ENABLE_DEPRECATED_CODE -namespace Kokkos{ - template struct MinMaxScalar; - template struct MinMaxLocScalar; - template struct ValLocScalar; +namespace Kokkos { +template +struct MinMaxScalar; +template +struct MinMaxLocScalar; +template +struct ValLocScalar; - namespace Experimental { - using Kokkos::Sum; - using Kokkos::Prod; - using Kokkos::Min; - using Kokkos::Max; - using Kokkos::MinMax; - using Kokkos::MinLoc; - using Kokkos::MaxLoc; - using Kokkos::MinMaxLoc; - using Kokkos::BAnd; - using Kokkos::BOr; - using Kokkos::LAnd; - using Kokkos::LOr; - using Kokkos::MinMaxScalar; - using Kokkos::MinMaxLocScalar; - using Kokkos::ValLocScalar; - } -} +namespace Experimental { +using Kokkos::BAnd; +using Kokkos::BOr; +using Kokkos::LAnd; +using Kokkos::LOr; +using Kokkos::Max; +using Kokkos::MaxLoc; +using Kokkos::Min; +using Kokkos::MinLoc; +using Kokkos::MinMax; +using Kokkos::MinMaxLoc; +using Kokkos::MinMaxLocScalar; +using Kokkos::MinMaxScalar; +using Kokkos::Prod; +using Kokkos::Sum; +using Kokkos::ValLocScalar; +} // namespace Experimental +} // namespace Kokkos #endif #endif /* #ifndef KOKKOS_CORE_FWD_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_Crs.hpp b/lib/kokkos/core/src/Kokkos_Crs.hpp index 8412ced921..f57863263b 100644 --- a/lib/kokkos/core/src/Kokkos_Crs.hpp +++ b/lib/kokkos/core/src/Kokkos_Crs.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -76,26 +77,27 @@ namespace Kokkos { ///

  • entries( entry , i2 , i3 , ... );
  • ///
  • entries( row_map[i0] + i1 , i2 , i3 , ... );
  • /// -template< class DataType, - class Arg1Type, - class Arg2Type = void, - typename SizeType = typename ViewTraits::size_type> +template ::size_type> class Crs { -protected: + protected: typedef ViewTraits traits; -public: - typedef DataType data_type; - typedef typename traits::array_layout array_layout; - typedef typename traits::execution_space execution_space; - typedef typename traits::memory_space memory_space; - typedef typename traits::device_type device_type; - typedef SizeType size_type; + public: + typedef DataType data_type; + typedef typename traits::array_layout array_layout; + typedef typename traits::execution_space execution_space; + typedef typename traits::memory_space memory_space; + typedef typename traits::device_type device_type; + typedef SizeType size_type; - typedef Crs< DataType , Arg1Type , Arg2Type , SizeType > staticcrsgraph_type; - typedef Crs< DataType , array_layout , typename traits::host_mirror_space , SizeType > HostMirror; - typedef View row_map_type; - typedef View entries_type; + typedef Crs staticcrsgraph_type; + typedef Crs + HostMirror; + typedef View row_map_type; + typedef View entries_type; row_map_type row_map; entries_type entries; @@ -103,62 +105,49 @@ public: /* * Default Constructors, operators and destructor */ - KOKKOS_FUNCTION Crs() = default; - KOKKOS_FUNCTION Crs(Crs const &) = default; - KOKKOS_FUNCTION Crs(Crs &&) = default; - KOKKOS_FUNCTION Crs& operator=(Crs const &) = default; - KOKKOS_FUNCTION Crs& operator=(Crs &&) = default; - KOKKOS_FUNCTION ~Crs() = default; + KOKKOS_FUNCTION Crs() = default; + KOKKOS_FUNCTION Crs(Crs const&) = default; + KOKKOS_FUNCTION Crs(Crs&&) = default; + KOKKOS_FUNCTION Crs& operator=(Crs const&) = default; + KOKKOS_FUNCTION Crs& operator=(Crs&&) = default; + KOKKOS_FUNCTION ~Crs() = default; /** \brief Assign to a view of the rhs array. * If the old view is the last view * then allocated memory is deallocated. */ - template - KOKKOS_INLINE_FUNCTION - Crs(const RowMapType& row_map_, const EntriesType& entries_) - : row_map(row_map_), entries(entries_) - { - } + template + KOKKOS_INLINE_FUNCTION Crs(const RowMapType& row_map_, + const EntriesType& entries_) + : row_map(row_map_), entries(entries_) {} /** \brief Return number of rows in the graph */ KOKKOS_INLINE_FUNCTION size_type numRows() const { - return (row_map.extent(0) != 0) ? - row_map.extent(0) - static_cast (1) : - static_cast (0); + return (row_map.extent(0) != 0) + ? row_map.extent(0) - static_cast(1) + : static_cast(0); } }; /*--------------------------------------------------------------------------*/ -template< class OutCounts, - class DataType, - class Arg1Type, - class Arg2Type, +template void get_crs_transpose_counts( - OutCounts& out, - Crs const& in, + OutCounts& out, Crs const& in, std::string const& name = "transpose_counts"); -template< class OutCounts, - class InCrs> +template typename OutCounts::value_type get_crs_row_map_from_counts( - OutCounts& out, - InCrs const& in, - std::string const& name = "row_map"); + OutCounts& out, InCrs const& in, std::string const& name = "row_map"); -template< class DataType, - class Arg1Type, - class Arg2Type, - class SizeType> -void transpose_crs( - Crs& out, - Crs const& in); +template +void transpose_crs(Crs& out, + Crs const& in); -} // namespace Kokkos +} // namespace Kokkos /*--------------------------------------------------------------------------*/ @@ -171,21 +160,22 @@ template class GetCrsTransposeCounts { public: using execution_space = typename InCrs::execution_space; - using self_type = GetCrsTransposeCounts; - using index_type = typename InCrs::size_type; + using self_type = GetCrsTransposeCounts; + using index_type = typename InCrs::size_type; + private: InCrs in; OutCounts out; + public: KOKKOS_INLINE_FUNCTION - void operator()(index_type i) const { - atomic_increment( &out[in.entries(i)] ); - } - GetCrsTransposeCounts(InCrs const& arg_in, OutCounts const& arg_out): - in(arg_in),out(arg_out) { - using policy_type = RangePolicy; + void operator()(index_type i) const { atomic_increment(&out[in.entries(i)]); } + GetCrsTransposeCounts(InCrs const& arg_in, OutCounts const& arg_out) + : in(arg_in), out(arg_out) { + using policy_type = RangePolicy; using closure_type = Kokkos::Impl::ParallelFor; - const closure_type closure(*this, policy_type(0, index_type(in.entries.size()))); + const closure_type closure(*this, + policy_type(0, index_type(in.entries.size()))); closure.execute(); execution_space().fence(); } @@ -195,13 +185,15 @@ template class CrsRowMapFromCounts { public: using execution_space = typename InCounts::execution_space; - using value_type = typename OutRowMap::value_type; - using index_type = typename InCounts::size_type; + using value_type = typename OutRowMap::value_type; + using index_type = typename InCounts::size_type; using last_value_type = Kokkos::View; + private: InCounts m_in; OutRowMap m_out; last_value_type m_last_value; + public: KOKKOS_INLINE_FUNCTION void operator()(index_type i, value_type& update, bool final_pass) const { @@ -209,22 +201,22 @@ class CrsRowMapFromCounts { update += m_in(i); if (final_pass) m_out(i + 1) = update; } else if (final_pass) { - m_out(0) = 0; + m_out(0) = 0; m_last_value() = update; } } KOKKOS_INLINE_FUNCTION void init(value_type& update) const { update = 0; } KOKKOS_INLINE_FUNCTION - void join(volatile value_type& update, const volatile value_type& input) const { + void join(volatile value_type& update, + const volatile value_type& input) const { update += input; } using self_type = CrsRowMapFromCounts; - CrsRowMapFromCounts(InCounts const& arg_in, OutRowMap const& arg_out): - m_in(arg_in), m_out(arg_out), m_last_value("last_value") { - } + CrsRowMapFromCounts(InCounts const& arg_in, OutRowMap const& arg_out) + : m_in(arg_in), m_out(arg_out), m_last_value("last_value") {} value_type execute() { - using policy_type = RangePolicy; + using policy_type = RangePolicy; using closure_type = Kokkos::Impl::ParallelScan; closure_type closure(*this, policy_type(0, m_in.size() + 1)); closure.execute(); @@ -238,31 +230,32 @@ template class FillCrsTransposeEntries { public: using execution_space = typename InCrs::execution_space; - using memory_space = typename InCrs::memory_space; - using value_type = typename OutCrs::entries_type::value_type; - using index_type = typename InCrs::size_type; + using memory_space = typename InCrs::memory_space; + using value_type = typename OutCrs::entries_type::value_type; + using index_type = typename InCrs::size_type; + private: using counters_type = View; InCrs in; OutCrs out; counters_type counters; + public: KOKKOS_INLINE_FUNCTION void operator()(index_type i) const { auto begin = in.row_map(i); - auto end = in.row_map(i + 1); + auto end = in.row_map(i + 1); for (auto j = begin; j < end; ++j) { - auto ti = in.entries(j); - auto tbegin = out.row_map(ti); - auto tj = atomic_fetch_add( &counters(ti), 1 ); - out.entries( tbegin + tj ) = i; + auto ti = in.entries(j); + auto tbegin = out.row_map(ti); + auto tj = atomic_fetch_add(&counters(ti), 1); + out.entries(tbegin + tj) = i; } } using self_type = FillCrsTransposeEntries; - FillCrsTransposeEntries(InCrs const& arg_in, OutCrs const& arg_out): - in(arg_in),out(arg_out), - counters("counters", arg_out.numRows()) { - using policy_type = RangePolicy; + FillCrsTransposeEntries(InCrs const& arg_in, OutCrs const& arg_out) + : in(arg_in), out(arg_out), counters("counters", arg_out.numRows()) { + using policy_type = RangePolicy; using closure_type = Kokkos::Impl::ParallelFor; const closure_type closure(*this, policy_type(0, index_type(in.numRows()))); closure.execute(); @@ -270,7 +263,8 @@ class FillCrsTransposeEntries { } }; -}} // namespace Kokkos::Impl +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ @@ -278,66 +272,51 @@ class FillCrsTransposeEntries { namespace Kokkos { -template< class OutCounts, - class DataType, - class Arg1Type, - class Arg2Type, +template void get_crs_transpose_counts( - OutCounts& out, - Crs const& in, + OutCounts& out, Crs const& in, std::string const& name) { using InCrs = Crs; - out = OutCounts(name, in.numRows()); + out = OutCounts(name, in.numRows()); Kokkos::Impl::GetCrsTransposeCounts functor(in, out); } -template< class OutRowMap, - class InCounts> +template typename OutRowMap::value_type get_crs_row_map_from_counts( - OutRowMap& out, - InCounts const& in, - std::string const& name) { + OutRowMap& out, InCounts const& in, std::string const& name) { out = OutRowMap(ViewAllocateWithoutInitializing(name), in.size() + 1); Kokkos::Impl::CrsRowMapFromCounts functor(in, out); return functor.execute(); } -template< class DataType, - class Arg1Type, - class Arg2Type, - class SizeType> -void transpose_crs( - Crs& out, - Crs const& in) -{ - typedef Crs crs_type ; - typedef typename crs_type::memory_space memory_space ; - typedef View counts_type ; +template +void transpose_crs(Crs& out, + Crs const& in) { + typedef Crs crs_type; + typedef typename crs_type::memory_space memory_space; + typedef View counts_type; { - counts_type counts; - Kokkos::get_crs_transpose_counts(counts, in); - Kokkos::get_crs_row_map_from_counts(out.row_map, counts, - "tranpose_row_map"); + counts_type counts; + Kokkos::get_crs_transpose_counts(counts, in); + Kokkos::get_crs_row_map_from_counts(out.row_map, counts, + "tranpose_row_map"); } out.entries = decltype(out.entries)("transpose_entries", in.entries.size()); - Kokkos::Impl:: - FillCrsTransposeEntries entries_functor(in, out); + Kokkos::Impl::FillCrsTransposeEntries entries_functor( + in, out); } -template< class CrsType, - class Functor, +template struct CountAndFillBase; -template< class CrsType, - class Functor, - class ExecutionSpace> +template struct CountAndFillBase { - using data_type = typename CrsType::size_type; - using size_type = typename CrsType::size_type; + using data_type = typename CrsType::size_type; + using size_type = typename CrsType::size_type; using row_map_type = typename CrsType::row_map_type; - using counts_type = row_map_type; + using counts_type = row_map_type; CrsType m_crs; Functor m_functor; counts_type m_counts; @@ -348,30 +327,26 @@ struct CountAndFillBase { struct Fill {}; inline void operator()(Fill, size_type i) const { auto j = m_crs.row_map(i); - /* we don't want to access entries(entries.size()), even if its just to get its - address and never use it. - this can happen when row (i) is empty and all rows after it are also empty. - we could compare to row_map(i + 1), but that is a read from global memory, - whereas dimension_0() should be part of the View in registers (or constant memory) */ - data_type* fill = - (j == static_cast(m_crs.entries.extent(0))) ? - nullptr : (&(m_crs.entries(j))); + /* we don't want to access entries(entries.size()), even if its just to get + its address and never use it. this can happen when row (i) is empty and + all rows after it are also empty. we could compare to row_map(i + 1), but + that is a read from global memory, whereas dimension_0() should be part + of the View in registers (or constant memory) */ + data_type* fill = (j == static_cast(m_crs.entries.extent(0))) + ? nullptr + : (&(m_crs.entries(j))); m_functor(i, fill); } - CountAndFillBase(CrsType& crs, Functor const& f): - m_crs(crs), - m_functor(f) - {} + CountAndFillBase(CrsType& crs, Functor const& f) : m_crs(crs), m_functor(f) {} }; -#if defined( KOKKOS_ENABLE_CUDA ) -template< class CrsType, - class Functor> +#if defined(KOKKOS_ENABLE_CUDA) +template struct CountAndFillBase { - using data_type = typename CrsType::size_type; - using size_type = typename CrsType::size_type; + using data_type = typename CrsType::size_type; + using size_type = typename CrsType::size_type; using row_map_type = typename CrsType::row_map_type; - using counts_type = row_map_type; + using counts_type = row_map_type; CrsType m_crs; Functor m_functor; counts_type m_counts; @@ -382,70 +357,62 @@ struct CountAndFillBase { struct Fill {}; __device__ inline void operator()(Fill, size_type i) const { auto j = m_crs.row_map(i); - /* we don't want to access entries(entries.size()), even if its just to get its - address and never use it. - this can happen when row (i) is empty and all rows after it are also empty. - we could compare to row_map(i + 1), but that is a read from global memory, - whereas dimension_0() should be part of the View in registers (or constant memory) */ - data_type* fill = - (j == static_cast(m_crs.entries.extent(0))) ? - nullptr : (&(m_crs.entries(j))); + /* we don't want to access entries(entries.size()), even if its just to get + its address and never use it. this can happen when row (i) is empty and + all rows after it are also empty. we could compare to row_map(i + 1), but + that is a read from global memory, whereas dimension_0() should be part + of the View in registers (or constant memory) */ + data_type* fill = (j == static_cast(m_crs.entries.extent(0))) + ? nullptr + : (&(m_crs.entries(j))); m_functor(i, fill); } - CountAndFillBase(CrsType& crs, Functor const& f): - m_crs(crs), - m_functor(f) - {} + CountAndFillBase(CrsType& crs, Functor const& f) : m_crs(crs), m_functor(f) {} }; #endif -template< class CrsType, - class Functor> +template struct CountAndFill : public CountAndFillBase { using base_type = CountAndFillBase; - using typename base_type::data_type; - using typename base_type::size_type; - using typename base_type::counts_type; using typename base_type::Count; + using typename base_type::counts_type; + using typename base_type::data_type; using typename base_type::Fill; + using typename base_type::size_type; using entries_type = typename CrsType::entries_type; - using self_type = CountAndFill; - CountAndFill(CrsType& crs, size_type nrows, Functor const& f): - base_type(crs, f) - { + using self_type = CountAndFill; + CountAndFill(CrsType& crs, size_type nrows, Functor const& f) + : base_type(crs, f) { using execution_space = typename CrsType::execution_space; - this->m_counts = counts_type("counts", nrows); + this->m_counts = counts_type("counts", nrows); { - using count_policy_type = RangePolicy; - using count_closure_type = - Kokkos::Impl::ParallelFor; - const count_closure_type closure(*this, count_policy_type(0, nrows)); - closure.execute(); + using count_policy_type = RangePolicy; + using count_closure_type = + Kokkos::Impl::ParallelFor; + const count_closure_type closure(*this, count_policy_type(0, nrows)); + closure.execute(); } - auto nentries = Kokkos:: - get_crs_row_map_from_counts(this->m_crs.row_map, this->m_counts); + auto nentries = Kokkos::get_crs_row_map_from_counts(this->m_crs.row_map, + this->m_counts); this->m_counts = counts_type(); this->m_crs.entries = entries_type("entries", nentries); { - using fill_policy_type = RangePolicy; - using fill_closure_type = - Kokkos::Impl::ParallelFor; - const fill_closure_type closure(*this, fill_policy_type(0, nrows)); - closure.execute(); + using fill_policy_type = RangePolicy; + using fill_closure_type = + Kokkos::Impl::ParallelFor; + const fill_closure_type closure(*this, fill_policy_type(0, nrows)); + closure.execute(); } crs = this->m_crs; } }; -template< class CrsType, - class Functor> -void count_and_fill_crs( - CrsType& crs, - typename CrsType::size_type nrows, - Functor const& f) { +template +void count_and_fill_crs(CrsType& crs, typename CrsType::size_type nrows, + Functor const& f) { Kokkos::CountAndFill(crs, nrows, f); } -} // namespace Kokkos +} // namespace Kokkos #endif /* #define KOKKOS_CRS_HPP */ diff --git a/lib/kokkos/core/src/Kokkos_Cuda.hpp b/lib/kokkos/core/src/Kokkos_Cuda.hpp index 4eb8ab4d4b..ad62ecf383 100644 --- a/lib/kokkos/core/src/Kokkos_Cuda.hpp +++ b/lib/kokkos/core/src/Kokkos_Cuda.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_CUDA_HPP #include -#if defined( KOKKOS_ENABLE_CUDA ) +#if defined(KOKKOS_ENABLE_CUDA) #include @@ -62,37 +63,45 @@ #include #include - /*--------------------------------------------------------------------------*/ namespace Kokkos { namespace Impl { -class CudaExec ; -class CudaInternal ; -} // namespace Impl -} // namespace Kokkos +class CudaExec; +class CudaInternal; +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ namespace Kokkos { namespace Impl { - namespace Experimental { - enum class CudaLaunchMechanism:unsigned{Default=0,ConstantMemory=1,GlobalMemory=2,LocalMemory=4}; +namespace Experimental { +enum class CudaLaunchMechanism : unsigned { + Default = 0, + ConstantMemory = 1, + GlobalMemory = 2, + LocalMemory = 4 +}; - constexpr inline CudaLaunchMechanism operator | (CudaLaunchMechanism p1, CudaLaunchMechanism p2) { - return static_cast(static_cast(p1) | static_cast(p2)); - } - constexpr inline CudaLaunchMechanism operator & (CudaLaunchMechanism p1, CudaLaunchMechanism p2) { - return static_cast(static_cast(p1) & static_cast(p2)); - } - - template - struct CudaDispatchProperties { - CudaLaunchMechanism launch_mechanism = l; - }; - } +constexpr inline CudaLaunchMechanism operator|(CudaLaunchMechanism p1, + CudaLaunchMechanism p2) { + return static_cast(static_cast(p1) | + static_cast(p2)); } +constexpr inline CudaLaunchMechanism operator&(CudaLaunchMechanism p1, + CudaLaunchMechanism p2) { + return static_cast(static_cast(p1) & + static_cast(p2)); +} + +template +struct CudaDispatchProperties { + CudaLaunchMechanism launch_mechanism = l; +}; +} // namespace Experimental +} // namespace Impl /// \class Cuda /// \brief Kokkos Execution Space that uses CUDA to run on GPUs. /// @@ -104,32 +113,32 @@ namespace Impl { /// sequentially. The Cuda execution space uses NVIDIA's CUDA programming /// model to execute kernels in parallel on GPUs. class Cuda { -public: + public: //! \name Type declarations that all Kokkos execution spaces must provide. //@{ //! Tag this class as a kokkos execution space - typedef Cuda execution_space ; + typedef Cuda execution_space; -#if defined( KOKKOS_ENABLE_CUDA_UVM ) +#if defined(KOKKOS_ENABLE_CUDA_UVM) //! This execution space's preferred memory space. - typedef CudaUVMSpace memory_space ; + typedef CudaUVMSpace memory_space; #else //! This execution space's preferred memory space. - typedef CudaSpace memory_space ; + typedef CudaSpace memory_space; #endif //! This execution space preferred device_type - typedef Kokkos::Device device_type; + typedef Kokkos::Device device_type; //! The size_type best suited for this execution space. - typedef memory_space::size_type size_type ; + typedef memory_space::size_type size_type; //! This execution space's preferred array layout. - typedef LayoutLeft array_layout ; + typedef LayoutLeft array_layout; //! - typedef ScratchMemorySpace< Cuda > scratch_memory_space ; + typedef ScratchMemorySpace scratch_memory_space; //@} //-------------------------------------------------- @@ -139,7 +148,7 @@ public: /// \brief True if and only if this method is being called in a /// thread-parallel function. KOKKOS_INLINE_FUNCTION static int in_parallel() { -#if defined( __CUDA_ARCH__ ) +#if defined(__CUDA_ARCH__) return true; #else return false; @@ -174,17 +183,17 @@ public: /// device have completed. static void impl_static_fence(); - #ifdef KOKKOS_ENABLE_DEPRECATED_CODE +#ifdef KOKKOS_ENABLE_DEPRECATED_CODE static void fence(); - #else +#else void fence() const; - #endif +#endif /** \brief Return the maximum amount of concurrency. */ static int concurrency(); //! Print configuration information to the given output stream. - static void print_configuration( std::ostream & , const bool detail = false ); + static void print_configuration(std::ostream&, const bool detail = false); //@} //-------------------------------------------------- @@ -195,10 +204,10 @@ public: Cuda(); - Cuda( Cuda && ) = default ; - Cuda( const Cuda & ) = default ; - Cuda & operator = ( Cuda && ) = default ; - Cuda & operator = ( const Cuda & ) = default ; + Cuda(Cuda&&) = default; + Cuda(const Cuda&) = default; + Cuda& operator=(Cuda&&) = default; + Cuda& operator=(const Cuda&) = default; Cuda(cudaStream_t stream); @@ -207,9 +216,9 @@ public: //@{ struct SelectDevice { - int cuda_device_id ; + int cuda_device_id; SelectDevice() : cuda_device_id(0) {} - explicit SelectDevice( int id ) : cuda_device_id( id ) {} + explicit SelectDevice(int id) : cuda_device_id(id) {} }; #ifdef KOKKOS_ENABLE_DEPRECATED_CODE @@ -220,8 +229,8 @@ public: static int is_initialized(); //! Initialize, telling the CUDA run-time library which device to use. - static void initialize( const SelectDevice = SelectDevice() - , const size_t num_instances = 1 ); + static void initialize(const SelectDevice = SelectDevice(), + const size_t num_instances = 1); #else //! Free any resources being consumed by the device. static void impl_finalize(); @@ -230,8 +239,8 @@ public: static int impl_is_initialized(); //! Initialize, telling the CUDA run-time library which device to use. - static void impl_initialize( const SelectDevice = SelectDevice() - , const size_t num_instances = 1 ); + static void impl_initialize(const SelectDevice = SelectDevice(), + const size_t num_instances = 1); #endif /// \brief Cuda device architecture of the selected device. @@ -248,20 +257,22 @@ public: static std::vector detect_device_arch(); cudaStream_t cuda_stream() const; - int cuda_device() const; + int cuda_device() const; //@} //-------------------------------------------------------------------------- static const char* name(); - inline Impl::CudaInternal* impl_internal_space_instance() const { return m_space_instance; } -private: + inline Impl::CudaInternal* impl_internal_space_instance() const { + return m_space_instance; + } + private: Impl::CudaInternal* m_space_instance; }; -} // namespace Kokkos +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -269,18 +280,15 @@ private: namespace Kokkos { namespace Impl { -template<> -struct MemorySpaceAccess - < Kokkos::CudaSpace - , Kokkos::Cuda::scratch_memory_space - > -{ +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = true }; - enum { deepcopy = false }; + enum { deepcopy = false }; }; -#if defined( KOKKOS_ENABLE_CUDA_UVM ) +#if defined(KOKKOS_ENABLE_CUDA_UVM) // If forcing use of UVM everywhere // then must assume that CudaUVMSpace @@ -288,44 +296,34 @@ struct MemorySpaceAccess // This will fail when a strange host-side execution space // that defines CudaUVMSpace as its preferredmemory space. -template<> -struct MemorySpaceAccess - < Kokkos::CudaUVMSpace - , Kokkos::Cuda::scratch_memory_space - > -{ +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = true }; - enum { deepcopy = false }; + enum { deepcopy = false }; }; #endif - -template<> -struct VerifyExecutionCanAccessMemorySpace - < Kokkos::CudaSpace - , Kokkos::Cuda::scratch_memory_space - > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = true }; - KOKKOS_INLINE_FUNCTION static void verify( void ) { } - KOKKOS_INLINE_FUNCTION static void verify( const void * ) { } + KOKKOS_INLINE_FUNCTION static void verify(void) {} + KOKKOS_INLINE_FUNCTION static void verify(const void*) {} }; -template<> -struct VerifyExecutionCanAccessMemorySpace - < Kokkos::HostSpace - , Kokkos::Cuda::scratch_memory_space - > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = false }; - inline static void verify( void ) { CudaSpace::access_error(); } - inline static void verify( const void * p ) { CudaSpace::access_error(p); } + inline static void verify(void) { CudaSpace::access_error(); } + inline static void verify(const void* p) { CudaSpace::access_error(p); } }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -343,4 +341,3 @@ struct VerifyExecutionCanAccessMemorySpace #endif /* #if defined( KOKKOS_ENABLE_CUDA ) */ #endif /* #ifndef KOKKOS_CUDA_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_CudaSpace.hpp b/lib/kokkos/core/src/Kokkos_CudaSpace.hpp index 4b32811bfc..a320aea2f8 100644 --- a/lib/kokkos/core/src/Kokkos_CudaSpace.hpp +++ b/lib/kokkos/core/src/Kokkos_CudaSpace.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_CUDASPACE_HPP #include -#if defined( KOKKOS_ENABLE_CUDA ) +#if defined(KOKKOS_ENABLE_CUDA) #include @@ -57,6 +58,11 @@ #include +#ifdef KOKKOS_IMPL_DEBUG_CUDA_PIN_UVM_TO_HOST +extern "C" bool kokkos_impl_cuda_pin_uvm_to_host(); +extern "C" void kokkos_impl_cuda_set_pin_uvm_to_host(bool); +#endif + /*--------------------------------------------------------------------------*/ namespace Kokkos { @@ -64,30 +70,28 @@ namespace Kokkos { /** \brief Cuda on-device memory management */ class CudaSpace { -public: - + public: //! Tag this class as a kokkos memory space - typedef CudaSpace memory_space ; - typedef Kokkos::Cuda execution_space ; - typedef Kokkos::Device device_type; + typedef CudaSpace memory_space; + typedef Kokkos::Cuda execution_space; + typedef Kokkos::Device device_type; - typedef unsigned int size_type ; + typedef unsigned int size_type; /*--------------------------------*/ CudaSpace(); - CudaSpace( CudaSpace && rhs ) = default ; - CudaSpace( const CudaSpace & rhs ) = default ; - CudaSpace & operator = ( CudaSpace && rhs ) = default ; - CudaSpace & operator = ( const CudaSpace & rhs ) = default ; - ~CudaSpace() = default ; + CudaSpace(CudaSpace&& rhs) = default; + CudaSpace(const CudaSpace& rhs) = default; + CudaSpace& operator=(CudaSpace&& rhs) = default; + CudaSpace& operator=(const CudaSpace& rhs) = default; + ~CudaSpace() = default; /**\brief Allocate untracked memory in the cuda space */ - void * allocate( const size_t arg_alloc_size ) const ; + void* allocate(const size_t arg_alloc_size) const; /**\brief Deallocate untracked memory in the cuda space */ - void deallocate( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) const ; + void deallocate(void* const arg_alloc_ptr, const size_t arg_alloc_size) const; /**\brief Return Name of the MemorySpace */ static constexpr const char* name() { return m_name; } @@ -95,14 +99,13 @@ public: /*--------------------------------*/ /** \brief Error reporting for HostSpace attempt to access CudaSpace */ static void access_error(); - static void access_error( const void * const ); + static void access_error(const void* const); -private: - - int m_device ; ///< Which Cuda device + private: + int m_device; ///< Which Cuda device static constexpr const char* m_name = "Cuda"; - friend class Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void > ; + friend class Kokkos::Impl::SharedAllocationRecord; }; namespace Impl { @@ -123,10 +126,11 @@ void init_lock_arrays_cuda_space(); /// If the array is not yet allocated it will do so. int* atomic_lock_array_cuda_space_ptr(bool deallocate = false); -/// \brief Retrieve the pointer to the scratch array for team and thread private global memory. +/// \brief Retrieve the pointer to the scratch array for team and thread private +/// global memory. /// /// Team and Thread private scratch allocations in -/// global memory are acquired via locks. +/// global memory are aquired via locks. /// This function retrieves the lock array pointer. /// If the array is not yet allocated it will do so. int* scratch_lock_array_cuda_space_ptr(bool deallocate = false); @@ -138,8 +142,8 @@ int* scratch_lock_array_cuda_space_ptr(bool deallocate = false); /// This function retrieves the lock array pointer. /// If the array is not yet allocated it will do so. int* threadid_lock_array_cuda_space_ptr(bool deallocate = false); -} -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -150,54 +154,56 @@ namespace Kokkos { * through Cuda's unified virtual memory (UVM) runtime. */ class CudaUVMSpace { -public: - + public: //! Tag this class as a kokkos memory space - typedef CudaUVMSpace memory_space ; - typedef Cuda execution_space ; - typedef Kokkos::Device device_type; - typedef unsigned int size_type ; + typedef CudaUVMSpace memory_space; + typedef Cuda execution_space; + typedef Kokkos::Device device_type; + typedef unsigned int size_type; /** \brief If UVM capability is available */ static bool available(); - /*--------------------------------*/ /** \brief CudaUVMSpace specific routine */ static int number_of_allocations(); /*--------------------------------*/ - /*--------------------------------*/ CudaUVMSpace(); - CudaUVMSpace( CudaUVMSpace && rhs ) = default ; - CudaUVMSpace( const CudaUVMSpace & rhs ) = default ; - CudaUVMSpace & operator = ( CudaUVMSpace && rhs ) = default ; - CudaUVMSpace & operator = ( const CudaUVMSpace & rhs ) = default ; - ~CudaUVMSpace() = default ; + CudaUVMSpace(CudaUVMSpace&& rhs) = default; + CudaUVMSpace(const CudaUVMSpace& rhs) = default; + CudaUVMSpace& operator=(CudaUVMSpace&& rhs) = default; + CudaUVMSpace& operator=(const CudaUVMSpace& rhs) = default; + ~CudaUVMSpace() = default; /**\brief Allocate untracked memory in the cuda space */ - void * allocate( const size_t arg_alloc_size ) const ; + void* allocate(const size_t arg_alloc_size) const; /**\brief Deallocate untracked memory in the cuda space */ - void deallocate( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) const ; + void deallocate(void* const arg_alloc_ptr, const size_t arg_alloc_size) const; /**\brief Return Name of the MemorySpace */ static constexpr const char* name() { return m_name; } +#ifdef KOKKOS_IMPL_DEBUG_CUDA_PIN_UVM_TO_HOST + static bool cuda_pin_uvm_to_host(); + static void cuda_set_pin_uvm_to_host(bool val); +#endif /*--------------------------------*/ -private: - int m_device ; ///< Which Cuda device + private: + int m_device; ///< Which Cuda device +#ifdef KOKKOS_IMPL_DEBUG_CUDA_PIN_UVM_TO_HOST + static bool kokkos_impl_cuda_pin_uvm_to_host_v; +#endif static constexpr const char* m_name = "CudaUVM"; - }; -} // namespace Kokkos +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -208,42 +214,39 @@ namespace Kokkos { * through Cuda's host-pinned memory allocation. */ class CudaHostPinnedSpace { -public: - + public: //! Tag this class as a kokkos memory space /** \brief Memory is in HostSpace so use the HostSpace::execution_space */ - typedef HostSpace::execution_space execution_space ; - typedef CudaHostPinnedSpace memory_space ; - typedef Kokkos::Device device_type; - typedef unsigned int size_type ; + typedef HostSpace::execution_space execution_space; + typedef CudaHostPinnedSpace memory_space; + typedef Kokkos::Device device_type; + typedef unsigned int size_type; /*--------------------------------*/ CudaHostPinnedSpace(); - CudaHostPinnedSpace( CudaHostPinnedSpace && rhs ) = default ; - CudaHostPinnedSpace( const CudaHostPinnedSpace & rhs ) = default ; - CudaHostPinnedSpace & operator = ( CudaHostPinnedSpace && rhs ) = default ; - CudaHostPinnedSpace & operator = ( const CudaHostPinnedSpace & rhs ) = default ; - ~CudaHostPinnedSpace() = default ; + CudaHostPinnedSpace(CudaHostPinnedSpace&& rhs) = default; + CudaHostPinnedSpace(const CudaHostPinnedSpace& rhs) = default; + CudaHostPinnedSpace& operator=(CudaHostPinnedSpace&& rhs) = default; + CudaHostPinnedSpace& operator=(const CudaHostPinnedSpace& rhs) = default; + ~CudaHostPinnedSpace() = default; /**\brief Allocate untracked memory in the space */ - void * allocate( const size_t arg_alloc_size ) const ; + void* allocate(const size_t arg_alloc_size) const; /**\brief Deallocate untracked memory in the space */ - void deallocate( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) const ; + void deallocate(void* const arg_alloc_ptr, const size_t arg_alloc_size) const; /**\brief Return Name of the MemorySpace */ static constexpr const char* name() { return m_name; } -private: - + private: static constexpr const char* m_name = "CudaHostPinned"; /*--------------------------------*/ }; -} // namespace Kokkos +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -251,119 +254,126 @@ private: namespace Kokkos { namespace Impl { -static_assert( Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaSpace , Kokkos::CudaSpace >::assignable , "" ); -static_assert( Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::CudaUVMSpace >::assignable , "" ); -static_assert( Kokkos::Impl::MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::CudaHostPinnedSpace >::assignable , "" ); +static_assert(Kokkos::Impl::MemorySpaceAccess::assignable, + ""); +static_assert(Kokkos::Impl::MemorySpaceAccess::assignable, + ""); +static_assert( + Kokkos::Impl::MemorySpaceAccess::assignable, + ""); //---------------------------------------- -template<> -struct MemorySpaceAccess< Kokkos::HostSpace , Kokkos::CudaSpace > { +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = false }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::HostSpace , Kokkos::CudaUVMSpace > { +template <> +struct MemorySpaceAccess { // HostSpace::execution_space != CudaUVMSpace::execution_space enum { assignable = false }; enum { accessible = true }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::HostSpace , Kokkos::CudaHostPinnedSpace > { +template <> +struct MemorySpaceAccess { // HostSpace::execution_space == CudaHostPinnedSpace::execution_space enum { assignable = true }; enum { accessible = true }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; //---------------------------------------- -template<> -struct MemorySpaceAccess< Kokkos::CudaSpace , Kokkos::HostSpace > { +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = false }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::CudaSpace , Kokkos::CudaUVMSpace > { +template <> +struct MemorySpaceAccess { // CudaSpace::execution_space == CudaUVMSpace::execution_space enum { assignable = true }; enum { accessible = true }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::CudaSpace , Kokkos::CudaHostPinnedSpace > { +template <> +struct MemorySpaceAccess { // CudaSpace::execution_space != CudaHostPinnedSpace::execution_space enum { assignable = false }; - enum { accessible = true }; // CudaSpace::execution_space - enum { deepcopy = true }; + enum { accessible = true }; // CudaSpace::execution_space + enum { deepcopy = true }; }; //---------------------------------------- // CudaUVMSpace::execution_space == Cuda // CudaUVMSpace accessible to both Cuda and Host -template<> -struct MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::HostSpace > { +template <> +struct MemorySpaceAccess { enum { assignable = false }; - enum { accessible = false }; // Cuda cannot access HostSpace - enum { deepcopy = true }; + enum { accessible = false }; // Cuda cannot access HostSpace + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::CudaSpace > { +template <> +struct MemorySpaceAccess { // CudaUVMSpace::execution_space == CudaSpace::execution_space // Can access CudaUVMSpace from Host but cannot access CudaSpace from Host enum { assignable = false }; // CudaUVMSpace::execution_space can access CudaSpace enum { accessible = true }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::CudaUVMSpace , Kokkos::CudaHostPinnedSpace > { +template <> +struct MemorySpaceAccess { // CudaUVMSpace::execution_space != CudaHostPinnedSpace::execution_space enum { assignable = false }; - enum { accessible = true }; // CudaUVMSpace::execution_space - enum { deepcopy = true }; + enum { accessible = true }; // CudaUVMSpace::execution_space + enum { deepcopy = true }; }; - //---------------------------------------- // CudaHostPinnedSpace::execution_space == HostSpace::execution_space // CudaHostPinnedSpace accessible to both Cuda and Host -template<> -struct MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::HostSpace > { - enum { assignable = false }; // Cannot access from Cuda - enum { accessible = true }; // CudaHostPinnedSpace::execution_space - enum { deepcopy = true }; +template <> +struct MemorySpaceAccess { + enum { assignable = false }; // Cannot access from Cuda + enum { accessible = true }; // CudaHostPinnedSpace::execution_space + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::CudaSpace > { - enum { assignable = false }; // Cannot access from Host +template <> +struct MemorySpaceAccess { + enum { assignable = false }; // Cannot access from Host enum { accessible = false }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::CudaUVMSpace > { - enum { assignable = false }; // different execution_space - enum { accessible = true }; // same accessibility - enum { deepcopy = true }; +template <> +struct MemorySpaceAccess { + enum { assignable = false }; // different execution_space + enum { accessible = true }; // same accessibility + enum { deepcopy = true }; }; //---------------------------------------- -}} // namespace Kokkos::Impl +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -371,247 +381,223 @@ struct MemorySpaceAccess< Kokkos::CudaHostPinnedSpace , Kokkos::CudaUVMSpace > { namespace Kokkos { namespace Impl { -void DeepCopyAsyncCuda( void * dst , const void * src , size_t n); +void DeepCopyAsyncCuda(void* dst, const void* src, size_t n); -template<> struct DeepCopy< CudaSpace , CudaSpace , Cuda> -{ - DeepCopy( void * dst , const void * src , size_t ); - DeepCopy( const Cuda & , void * dst , const void * src , size_t ); +template <> +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t); + DeepCopy(const Cuda&, void* dst, const void* src, size_t); }; -template<> struct DeepCopy< CudaSpace , HostSpace , Cuda > -{ - DeepCopy( void * dst , const void * src , size_t ); - DeepCopy( const Cuda & , void * dst , const void * src , size_t ); +template <> +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t); + DeepCopy(const Cuda&, void* dst, const void* src, size_t); }; -template<> struct DeepCopy< HostSpace , CudaSpace , Cuda > -{ - DeepCopy( void * dst , const void * src , size_t ); - DeepCopy( const Cuda & , void * dst , const void * src , size_t ); +template <> +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t); + DeepCopy(const Cuda&, void* dst, const void* src, size_t); }; -template struct DeepCopy< CudaSpace , CudaSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< CudaSpace , CudaSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template struct DeepCopy< CudaSpace , HostSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< CudaSpace , HostSpace , Cuda>( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template -struct DeepCopy< HostSpace , CudaSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< HostSpace , CudaSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template -struct DeepCopy< CudaSpace , CudaUVMSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< CudaSpace , CudaSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template -struct DeepCopy< CudaSpace , CudaHostPinnedSpace , ExecutionSpace> -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< CudaSpace , HostSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } -template -struct DeepCopy< CudaUVMSpace , CudaSpace , ExecutionSpace> -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< CudaSpace , CudaSpace , Cuda >( dst , src , n ); } - - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template -struct DeepCopy< CudaUVMSpace , CudaUVMSpace , ExecutionSpace> -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< CudaSpace , CudaSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template -struct DeepCopy< CudaUVMSpace , CudaHostPinnedSpace , ExecutionSpace> -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< CudaSpace , HostSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template struct DeepCopy< CudaUVMSpace , HostSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< CudaSpace , HostSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } -template struct DeepCopy< CudaHostPinnedSpace , CudaSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< HostSpace , CudaSpace , Cuda >( dst , src , n ); } - - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template struct DeepCopy< CudaHostPinnedSpace , CudaUVMSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< HostSpace , CudaSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template struct DeepCopy< CudaHostPinnedSpace , CudaHostPinnedSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< HostSpace , HostSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template struct DeepCopy< CudaHostPinnedSpace , HostSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< HostSpace , HostSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } -template struct DeepCopy< HostSpace , CudaUVMSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< HostSpace , CudaSpace , Cuda >( dst , src , n ); } - - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -template struct DeepCopy< HostSpace , CudaHostPinnedSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< HostSpace , HostSpace , Cuda >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopyAsyncCuda (dst,src,n); + DeepCopyAsyncCuda(dst, src, n); } }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -620,79 +606,83 @@ namespace Kokkos { namespace Impl { /** Running in CudaSpace attempting to access HostSpace: error */ -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::CudaSpace , Kokkos::HostSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = false }; - KOKKOS_INLINE_FUNCTION static void verify( void ) - { Kokkos::abort("Cuda code attempted to access HostSpace memory"); } + KOKKOS_INLINE_FUNCTION static void verify(void) { + Kokkos::abort("Cuda code attempted to access HostSpace memory"); + } - KOKKOS_INLINE_FUNCTION static void verify( const void * ) - { Kokkos::abort("Cuda code attempted to access HostSpace memory"); } + KOKKOS_INLINE_FUNCTION static void verify(const void*) { + Kokkos::abort("Cuda code attempted to access HostSpace memory"); + } }; /** Running in CudaSpace accessing CudaUVMSpace: ok */ -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::CudaSpace , Kokkos::CudaUVMSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = true }; - KOKKOS_INLINE_FUNCTION static void verify( void ) { } - KOKKOS_INLINE_FUNCTION static void verify( const void * ) { } + KOKKOS_INLINE_FUNCTION static void verify(void) {} + KOKKOS_INLINE_FUNCTION static void verify(const void*) {} }; /** Running in CudaSpace accessing CudaHostPinnedSpace: ok */ -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::CudaSpace , Kokkos::CudaHostPinnedSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = true }; - KOKKOS_INLINE_FUNCTION static void verify( void ) { } - KOKKOS_INLINE_FUNCTION static void verify( const void * ) { } + KOKKOS_INLINE_FUNCTION static void verify(void) {} + KOKKOS_INLINE_FUNCTION static void verify(const void*) {} }; /** Running in CudaSpace attempting to access an unknown space: error */ -template< class OtherSpace > +template struct VerifyExecutionCanAccessMemorySpace< - typename enable_if< ! is_same::value , Kokkos::CudaSpace >::type , - OtherSpace > -{ + typename enable_if::value, + Kokkos::CudaSpace>::type, + OtherSpace> { enum { value = false }; - KOKKOS_INLINE_FUNCTION static void verify( void ) - { Kokkos::abort("Cuda code attempted to access unknown Space memory"); } + KOKKOS_INLINE_FUNCTION static void verify(void) { + Kokkos::abort("Cuda code attempted to access unknown Space memory"); + } - KOKKOS_INLINE_FUNCTION static void verify( const void * ) - { Kokkos::abort("Cuda code attempted to access unknown Space memory"); } + KOKKOS_INLINE_FUNCTION static void verify(const void*) { + Kokkos::abort("Cuda code attempted to access unknown Space memory"); + } }; //---------------------------------------------------------------------------- /** Running in HostSpace attempting to access CudaSpace */ -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::CudaSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = false }; - inline static void verify( void ) { CudaSpace::access_error(); } - inline static void verify( const void * p ) { CudaSpace::access_error(p); } + inline static void verify(void) { CudaSpace::access_error(); } + inline static void verify(const void* p) { CudaSpace::access_error(p); } }; /** Running in HostSpace accessing CudaUVMSpace is OK */ -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::CudaUVMSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = true }; - inline static void verify( void ) { } - inline static void verify( const void * ) { } + inline static void verify(void) {} + inline static void verify(const void*) {} }; /** Running in HostSpace accessing CudaHostPinnedSpace is OK */ -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::CudaHostPinnedSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = true }; - KOKKOS_INLINE_FUNCTION static void verify( void ) {} - KOKKOS_INLINE_FUNCTION static void verify( const void * ) {} + KOKKOS_INLINE_FUNCTION static void verify(void) {} + KOKKOS_INLINE_FUNCTION static void verify(const void*) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -700,248 +690,214 @@ struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::CudaHost namespace Kokkos { namespace Impl { -template<> -class SharedAllocationRecord< Kokkos::CudaSpace , void > - : public SharedAllocationRecord< void , void > -{ -private: +template <> +class SharedAllocationRecord + : public SharedAllocationRecord { + private: + friend class SharedAllocationRecord; - friend class SharedAllocationRecord< Kokkos::CudaUVMSpace , void > ; + typedef SharedAllocationRecord RecordBase; - typedef SharedAllocationRecord< void , void > RecordBase ; + SharedAllocationRecord(const SharedAllocationRecord&) = delete; + SharedAllocationRecord& operator=(const SharedAllocationRecord&) = delete; - SharedAllocationRecord( const SharedAllocationRecord & ) = delete ; - SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ; + static void deallocate(RecordBase*); - static void deallocate( RecordBase * ); - - static ::cudaTextureObject_t - attach_texture_object( const unsigned sizeof_alias - , void * const alloc_ptr - , const size_t alloc_size ); + static ::cudaTextureObject_t attach_texture_object( + const unsigned sizeof_alias, void* const alloc_ptr, + const size_t alloc_size); #ifdef KOKKOS_DEBUG - static RecordBase s_root_record ; + static RecordBase s_root_record; #endif - ::cudaTextureObject_t m_tex_obj ; - const Kokkos::CudaSpace m_space ; - -protected: + ::cudaTextureObject_t m_tex_obj; + const Kokkos::CudaSpace m_space; + protected: ~SharedAllocationRecord(); SharedAllocationRecord() : RecordBase(), m_tex_obj(0), m_space() {} - SharedAllocationRecord( const Kokkos::CudaSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const RecordBase::function_type arg_dealloc = & deallocate - ); + SharedAllocationRecord( + const Kokkos::CudaSpace& arg_space, const std::string& arg_label, + const size_t arg_alloc_size, + const RecordBase::function_type arg_dealloc = &deallocate); -public: + public: + std::string get_label() const; - std::string get_label() const ; - - static SharedAllocationRecord * allocate( const Kokkos::CudaSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + static SharedAllocationRecord* allocate(const Kokkos::CudaSpace& arg_space, + const std::string& arg_label, + const size_t arg_alloc_size); /**\brief Allocate tracked memory in the space */ - static - void * allocate_tracked( const Kokkos::CudaSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + static void* allocate_tracked(const Kokkos::CudaSpace& arg_space, + const std::string& arg_label, + const size_t arg_alloc_size); /**\brief Reallocate tracked memory in the space */ - static - void * reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ); + static void* reallocate_tracked(void* const arg_alloc_ptr, + const size_t arg_alloc_size); /**\brief Deallocate tracked memory in the space */ - static - void deallocate_tracked( void * const arg_alloc_ptr ); + static void deallocate_tracked(void* const arg_alloc_ptr); - static SharedAllocationRecord * get_record( void * arg_alloc_ptr ); + static SharedAllocationRecord* get_record(void* arg_alloc_ptr); - template< typename AliasType > - inline - ::cudaTextureObject_t attach_texture_object() - { - static_assert( ( std::is_same< AliasType , int >::value || - std::is_same< AliasType , ::int2 >::value || - std::is_same< AliasType , ::int4 >::value ) - , "Cuda texture fetch only supported for alias types of int, ::int2, or ::int4" ); + template + inline ::cudaTextureObject_t attach_texture_object() { + static_assert((std::is_same::value || + std::is_same::value || + std::is_same::value), + "Cuda texture fetch only supported for alias types of int, " + "::int2, or ::int4"); - if ( m_tex_obj == 0 ) { - m_tex_obj = attach_texture_object( sizeof(AliasType) - , (void*) RecordBase::m_alloc_ptr - , RecordBase::m_alloc_size ); - } - - return m_tex_obj ; + if (m_tex_obj == 0) { + m_tex_obj = attach_texture_object(sizeof(AliasType), + (void*)RecordBase::m_alloc_ptr, + RecordBase::m_alloc_size); } - template< typename AliasType > - inline - int attach_texture_object_offset( const AliasType * const ptr ) - { - // Texture object is attached to the entire allocation range - return ptr - reinterpret_cast( RecordBase::m_alloc_ptr ); - } + return m_tex_obj; + } - static void print_records( std::ostream & , const Kokkos::CudaSpace & , bool detail = false ); + template + inline int attach_texture_object_offset(const AliasType* const ptr) { + // Texture object is attached to the entire allocation range + return ptr - reinterpret_cast(RecordBase::m_alloc_ptr); + } + + static void print_records(std::ostream&, const Kokkos::CudaSpace&, + bool detail = false); }; +template <> +class SharedAllocationRecord + : public SharedAllocationRecord { + private: + typedef SharedAllocationRecord RecordBase; -template<> -class SharedAllocationRecord< Kokkos::CudaUVMSpace , void > - : public SharedAllocationRecord< void , void > -{ -private: + SharedAllocationRecord(const SharedAllocationRecord&) = delete; + SharedAllocationRecord& operator=(const SharedAllocationRecord&) = delete; - typedef SharedAllocationRecord< void , void > RecordBase ; + static void deallocate(RecordBase*); - SharedAllocationRecord( const SharedAllocationRecord & ) = delete ; - SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ; + static RecordBase s_root_record; - static void deallocate( RecordBase * ); - - static RecordBase s_root_record ; - - ::cudaTextureObject_t m_tex_obj ; - const Kokkos::CudaUVMSpace m_space ; - -protected: + ::cudaTextureObject_t m_tex_obj; + const Kokkos::CudaUVMSpace m_space; + protected: ~SharedAllocationRecord(); SharedAllocationRecord() : RecordBase(), m_tex_obj(0), m_space() {} - SharedAllocationRecord( const Kokkos::CudaUVMSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const RecordBase::function_type arg_dealloc = & deallocate - ); + SharedAllocationRecord( + const Kokkos::CudaUVMSpace& arg_space, const std::string& arg_label, + const size_t arg_alloc_size, + const RecordBase::function_type arg_dealloc = &deallocate); -public: + public: + std::string get_label() const; - std::string get_label() const ; - - static SharedAllocationRecord * allocate( const Kokkos::CudaUVMSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - ); + static SharedAllocationRecord* allocate(const Kokkos::CudaUVMSpace& arg_space, + const std::string& arg_label, + const size_t arg_alloc_size); /**\brief Allocate tracked memory in the space */ - static - void * allocate_tracked( const Kokkos::CudaUVMSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + static void* allocate_tracked(const Kokkos::CudaUVMSpace& arg_space, + const std::string& arg_label, + const size_t arg_alloc_size); /**\brief Reallocate tracked memory in the space */ - static - void * reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ); + static void* reallocate_tracked(void* const arg_alloc_ptr, + const size_t arg_alloc_size); /**\brief Deallocate tracked memory in the space */ - static - void deallocate_tracked( void * const arg_alloc_ptr ); + static void deallocate_tracked(void* const arg_alloc_ptr); - static SharedAllocationRecord * get_record( void * arg_alloc_ptr ); + static SharedAllocationRecord* get_record(void* arg_alloc_ptr); + template + inline ::cudaTextureObject_t attach_texture_object() { + static_assert((std::is_same::value || + std::is_same::value || + std::is_same::value), + "Cuda texture fetch only supported for alias types of int, " + "::int2, or ::int4"); - template< typename AliasType > - inline - ::cudaTextureObject_t attach_texture_object() - { - static_assert( ( std::is_same< AliasType , int >::value || - std::is_same< AliasType , ::int2 >::value || - std::is_same< AliasType , ::int4 >::value ) - , "Cuda texture fetch only supported for alias types of int, ::int2, or ::int4" ); - - if ( m_tex_obj == 0 ) { - m_tex_obj = SharedAllocationRecord< Kokkos::CudaSpace , void >:: - attach_texture_object( sizeof(AliasType) - , (void*) RecordBase::m_alloc_ptr - , RecordBase::m_alloc_size ); - } - - return m_tex_obj ; + if (m_tex_obj == 0) { + m_tex_obj = SharedAllocationRecord:: + attach_texture_object(sizeof(AliasType), + (void*)RecordBase::m_alloc_ptr, + RecordBase::m_alloc_size); } - template< typename AliasType > - inline - int attach_texture_object_offset( const AliasType * const ptr ) - { - // Texture object is attached to the entire allocation range - return ptr - reinterpret_cast( RecordBase::m_alloc_ptr ); - } + return m_tex_obj; + } - static void print_records( std::ostream & , const Kokkos::CudaUVMSpace & , bool detail = false ); + template + inline int attach_texture_object_offset(const AliasType* const ptr) { + // Texture object is attached to the entire allocation range + return ptr - reinterpret_cast(RecordBase::m_alloc_ptr); + } + + static void print_records(std::ostream&, const Kokkos::CudaUVMSpace&, + bool detail = false); }; -template<> -class SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void > - : public SharedAllocationRecord< void , void > -{ -private: +template <> +class SharedAllocationRecord + : public SharedAllocationRecord { + private: + typedef SharedAllocationRecord RecordBase; - typedef SharedAllocationRecord< void , void > RecordBase ; + SharedAllocationRecord(const SharedAllocationRecord&) = delete; + SharedAllocationRecord& operator=(const SharedAllocationRecord&) = delete; - SharedAllocationRecord( const SharedAllocationRecord & ) = delete ; - SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ; + static void deallocate(RecordBase*); - static void deallocate( RecordBase * ); + static RecordBase s_root_record; - static RecordBase s_root_record ; - - const Kokkos::CudaHostPinnedSpace m_space ; - -protected: + const Kokkos::CudaHostPinnedSpace m_space; + protected: ~SharedAllocationRecord(); SharedAllocationRecord() : RecordBase(), m_space() {} - SharedAllocationRecord( const Kokkos::CudaHostPinnedSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const RecordBase::function_type arg_dealloc = & deallocate - ); + SharedAllocationRecord( + const Kokkos::CudaHostPinnedSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size, + const RecordBase::function_type arg_dealloc = &deallocate); -public: + public: + std::string get_label() const; - std::string get_label() const ; - - static SharedAllocationRecord * allocate( const Kokkos::CudaHostPinnedSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - ); + static SharedAllocationRecord* allocate( + const Kokkos::CudaHostPinnedSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size); /**\brief Allocate tracked memory in the space */ - static - void * allocate_tracked( const Kokkos::CudaHostPinnedSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + static void* allocate_tracked(const Kokkos::CudaHostPinnedSpace& arg_space, + const std::string& arg_label, + const size_t arg_alloc_size); /**\brief Reallocate tracked memory in the space */ - static - void * reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ); + static void* reallocate_tracked(void* const arg_alloc_ptr, + const size_t arg_alloc_size); /**\brief Deallocate tracked memory in the space */ - static - void deallocate_tracked( void * const arg_alloc_ptr ); + static void deallocate_tracked(void* const arg_alloc_ptr); + static SharedAllocationRecord* get_record(void* arg_alloc_ptr); - static SharedAllocationRecord * get_record( void * arg_alloc_ptr ); - - static void print_records( std::ostream & , const Kokkos::CudaHostPinnedSpace & , bool detail = false ); + static void print_records(std::ostream&, const Kokkos::CudaHostPinnedSpace&, + bool detail = false); }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- #endif /* #if defined( KOKKOS_ENABLE_CUDA ) */ #endif /* #define KOKKOS_CUDASPACE_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_ExecPolicy.hpp b/lib/kokkos/core/src/Kokkos_ExecPolicy.hpp index 5c85850fda..bf3a134b64 100644 --- a/lib/kokkos/core/src/Kokkos_ExecPolicy.hpp +++ b/lib/kokkos/core/src/Kokkos_ExecPolicy.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -53,7 +54,7 @@ #include #if defined(KOKKOS_ENABLE_PROFILING) #include -#endif // KOKKOS_ENABLE_PROFILING +#endif // KOKKOS_ENABLE_PROFILING //---------------------------------------------------------------------------- @@ -65,7 +66,7 @@ struct ParallelReduceTag {}; struct ChunkSize { int value; - ChunkSize(int value_):value(value_) {} + ChunkSize(int value_) : value(value_) {} }; /** \brief Execution policy for work over a range of an integral type. @@ -89,210 +90,192 @@ struct ChunkSize { * * Blocking is the granularity of partitioning the range among threads. */ -template -class RangePolicy - : public Impl::PolicyTraits -{ -public: - typedef Impl::PolicyTraits traits; -private: +template +class RangePolicy : public Impl::PolicyTraits { + public: + typedef Impl::PolicyTraits traits; - typename traits::execution_space m_space ; - typename traits::index_type m_begin ; - typename traits::index_type m_end ; - typename traits::index_type m_granularity ; - typename traits::index_type m_granularity_mask ; + private: + typename traits::execution_space m_space; + typename traits::index_type m_begin; + typename traits::index_type m_end; + typename traits::index_type m_granularity; + typename traits::index_type m_granularity_mask; - template + template friend class RangePolicy; -public: + public: //! Tag this class as an execution policy typedef RangePolicy execution_policy; - typedef typename traits::index_type member_type ; + typedef typename traits::index_type member_type; typedef typename traits::index_type index_type; - KOKKOS_INLINE_FUNCTION const typename traits::execution_space & space() const { return m_space ; } - KOKKOS_INLINE_FUNCTION member_type begin() const { return m_begin ; } - KOKKOS_INLINE_FUNCTION member_type end() const { return m_end ; } + KOKKOS_INLINE_FUNCTION const typename traits::execution_space& space() const { + return m_space; + } + KOKKOS_INLINE_FUNCTION member_type begin() const { return m_begin; } + KOKKOS_INLINE_FUNCTION member_type end() const { return m_end; } - //TODO: find a better workaround for Clangs weird instantiation order - // This thing is here because of an instantiation error, where the RangePolicy is inserted into FunctorValue Traits, which - // tries decltype on the operator. It tries to do this even though the first argument of parallel for clearly doesn't match. + // TODO: find a better workaround for Clangs weird instantiation order + // This thing is here because of an instantiation error, where the RangePolicy + // is inserted into FunctorValue Traits, which tries decltype on the operator. + // It tries to do this even though the first argument of parallel for clearly + // doesn't match. void operator()(const int&) const {} RangePolicy(const RangePolicy&) = default; - RangePolicy(RangePolicy&&) = default; + RangePolicy(RangePolicy&&) = default; - template + template RangePolicy(const RangePolicy p) { - m_space = p.m_space; - m_begin = p.m_begin; - m_end = p.m_end; - m_granularity = p.m_granularity; + m_space = p.m_space; + m_begin = p.m_begin; + m_end = p.m_end; + m_granularity = p.m_granularity; m_granularity_mask = p.m_granularity_mask; } inline RangePolicy() : m_space(), m_begin(0), m_end(0) {} /** \brief Total range */ - inline - RangePolicy( const typename traits::execution_space & work_space - , const member_type work_begin - , const member_type work_end - ) - : m_space( work_space ) - , m_begin( work_begin < work_end ? work_begin : 0 ) - , m_end( work_begin < work_end ? work_end : 0 ) - , m_granularity(0) - , m_granularity_mask(0) - { - set_auto_chunk_size(); - } - - /** \brief Total range */ - inline - RangePolicy( const member_type work_begin - , const member_type work_end - ) - : RangePolicy( typename traits::execution_space() - , work_begin , work_end ) - { - set_auto_chunk_size(); - } - - /** \brief Total range */ - template - inline - RangePolicy( const typename traits::execution_space & work_space - , const member_type work_begin - , const member_type work_end - , Args ... args - ) - : m_space( work_space ) - , m_begin( work_begin < work_end ? work_begin : 0 ) - , m_end( work_begin < work_end ? work_end : 0 ) - , m_granularity(0) - , m_granularity_mask(0) - { - set_auto_chunk_size(); - set(args...); - } - - /** \brief Total range */ - template - inline - RangePolicy( const member_type work_begin - , const member_type work_end - , Args ... args - ) - : RangePolicy( typename traits::execution_space() - , work_begin , work_end ) - { - set_auto_chunk_size(); - set(args...); - } - -private: - inline void set() {} - -public: - template - inline void set(Args ...) { - static_assert( 0 == sizeof...(Args), "Kokkos::RangePolicy: unhandled constructor arguments encountered."); + inline RangePolicy(const typename traits::execution_space& work_space, + const member_type work_begin, const member_type work_end) + : m_space(work_space), + m_begin(work_begin < work_end ? work_begin : 0), + m_end(work_begin < work_end ? work_end : 0), + m_granularity(0), + m_granularity_mask(0) { + set_auto_chunk_size(); } - template - inline void set(const ChunkSize& chunksize, Args ... args) { - m_granularity = chunksize.value; + /** \brief Total range */ + inline RangePolicy(const member_type work_begin, const member_type work_end) + : RangePolicy(typename traits::execution_space(), work_begin, work_end) { + set_auto_chunk_size(); + } + + /** \brief Total range */ + template + inline RangePolicy(const typename traits::execution_space& work_space, + const member_type work_begin, const member_type work_end, + Args... args) + : m_space(work_space), + m_begin(work_begin < work_end ? work_begin : 0), + m_end(work_begin < work_end ? work_end : 0), + m_granularity(0), + m_granularity_mask(0) { + set_auto_chunk_size(); + set(args...); + } + + /** \brief Total range */ + template + inline RangePolicy(const member_type work_begin, const member_type work_end, + Args... args) + : RangePolicy(typename traits::execution_space(), work_begin, work_end) { + set_auto_chunk_size(); + set(args...); + } + + private: + inline void set() {} + + public: + template + inline void set(Args...) { + static_assert( + 0 == sizeof...(Args), + "Kokkos::RangePolicy: unhandled constructor arguments encountered."); + } + + template + inline void set(const ChunkSize& chunksize, Args... args) { + m_granularity = chunksize.value; m_granularity_mask = m_granularity - 1; } -public: + public: /** \brief return chunk_size */ - inline member_type chunk_size() const { - return m_granularity; - } + inline member_type chunk_size() const { return m_granularity; } /** \brief set chunk_size to a discrete value*/ inline RangePolicy set_chunk_size(int chunk_size_) const { - RangePolicy p = *this; - p.m_granularity = chunk_size_; + RangePolicy p = *this; + p.m_granularity = chunk_size_; p.m_granularity_mask = p.m_granularity - 1; return p; } -private: + private: /** \brief finalize chunk_size if it was set to AUTO*/ inline void set_auto_chunk_size() { + typename traits::index_type concurrency = + traits::execution_space::concurrency(); + if (concurrency == 0) concurrency = 1; - typename traits::index_type concurrency = traits::execution_space::concurrency(); - if( concurrency==0 ) concurrency=1; + if (m_granularity > 0) { + if (!Impl::is_integral_power_of_two(m_granularity)) + Kokkos::abort("RangePolicy blocking granularity must be power of two"); + } - if(m_granularity > 0) { - if(!Impl::is_integral_power_of_two( m_granularity )) - Kokkos::abort("RangePolicy blocking granularity must be power of two" ); - } - - member_type new_chunk_size = 1; - while(new_chunk_size*100*concurrency < m_end-m_begin) - new_chunk_size *= 2; - if(new_chunk_size < 128) { - new_chunk_size = 1; - while( (new_chunk_size*40*concurrency < m_end-m_begin ) && (new_chunk_size<128) ) - new_chunk_size*=2; - } - m_granularity = new_chunk_size; - m_granularity_mask = m_granularity - 1; + member_type new_chunk_size = 1; + while (new_chunk_size * 100 * concurrency < m_end - m_begin) + new_chunk_size *= 2; + if (new_chunk_size < 128) { + new_chunk_size = 1; + while ((new_chunk_size * 40 * concurrency < m_end - m_begin) && + (new_chunk_size < 128)) + new_chunk_size *= 2; + } + m_granularity = new_chunk_size; + m_granularity_mask = m_granularity - 1; } -public: + public: /** \brief Subrange for a partition's rank and size. * * Typically used to partition a range over a group of threads. */ struct WorkRange { - typedef typename RangePolicy::work_tag work_tag ; - typedef typename RangePolicy::member_type member_type ; + typedef typename RangePolicy::work_tag work_tag; + typedef typename RangePolicy::member_type member_type; - KOKKOS_INLINE_FUNCTION member_type begin() const { return m_begin ; } - KOKKOS_INLINE_FUNCTION member_type end() const { return m_end ; } + KOKKOS_INLINE_FUNCTION member_type begin() const { return m_begin; } + KOKKOS_INLINE_FUNCTION member_type end() const { return m_end; } /** \brief Subrange for a partition's rank and size. * * Typically used to partition a range over a group of threads. */ KOKKOS_INLINE_FUNCTION - WorkRange( const RangePolicy & range - , const int part_rank - , const int part_size - ) - : m_begin(0), m_end(0) - { - if ( part_size ) { + WorkRange(const RangePolicy& range, const int part_rank, + const int part_size) + : m_begin(0), m_end(0) { + if (part_size) { + // Split evenly among partitions, then round up to the granularity. + const member_type work_part = + ((((range.end() - range.begin()) + (part_size - 1)) / part_size) + + range.m_granularity_mask) & + ~member_type(range.m_granularity_mask); - // Split evenly among partitions, then round up to the granularity. - const member_type work_part = - ( ( ( ( range.end() - range.begin() ) + ( part_size - 1 ) ) / part_size ) - + range.m_granularity_mask ) & ~member_type(range.m_granularity_mask); + m_begin = range.begin() + work_part * part_rank; + m_end = m_begin + work_part; - m_begin = range.begin() + work_part * part_rank ; - m_end = m_begin + work_part ; - - if ( range.end() < m_begin ) m_begin = range.end() ; - if ( range.end() < m_end ) m_end = range.end() ; - } + if (range.end() < m_begin) m_begin = range.end(); + if (range.end() < m_end) m_end = range.end(); } + } - private: - member_type m_begin ; - member_type m_end ; + private: + member_type m_begin; + member_type m_end; WorkRange(); - WorkRange & operator = ( const WorkRange & ); + WorkRange& operator=(const WorkRange&); }; }; -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -301,13 +284,12 @@ namespace Kokkos { namespace Impl { -template< class ExecSpace, class ... Properties> -class TeamPolicyInternal: public Impl::PolicyTraits { -private: - typedef Impl::PolicyTraits traits; +template +class TeamPolicyInternal : public Impl::PolicyTraits { + private: + typedef Impl::PolicyTraits traits; -public: - + public: typedef typename traits::index_type index_type; //---------------------------------------- @@ -321,8 +303,8 @@ public: * With multi-operator functors it cannot be determined * which operator will be called. */ - template< class FunctorType > - static int team_size_max( const FunctorType & ); + template + static int team_size_max(const FunctorType&); /** \brief Query recommended team size for a given functor. * @@ -334,48 +316,56 @@ public: * With multi-operator functors it cannot be determined * which operator will be called. */ - template< class FunctorType > - static int team_size_recommended( const FunctorType & ); + template + static int team_size_recommended(const FunctorType&); - template< class FunctorType > - static int team_size_recommended( const FunctorType & , const int&); + template + static int team_size_recommended(const FunctorType&, const int&); - template - int team_size_recommended( const FunctorType & functor , const int vector_length); + template + int team_size_recommended(const FunctorType& functor, + const int vector_length); //---------------------------------------- /** \brief Construct policy with the given instance of the execution space */ - TeamPolicyInternal( const typename traits::execution_space & , int league_size_request , int team_size_request , int vector_length_request = 1 ); + TeamPolicyInternal(const typename traits::execution_space&, + int league_size_request, int team_size_request, + int vector_length_request = 1); - TeamPolicyInternal( const typename traits::execution_space & , int league_size_request , const Kokkos::AUTO_t & , int vector_length_request = 1 ); + TeamPolicyInternal(const typename traits::execution_space&, + int league_size_request, const Kokkos::AUTO_t&, + int vector_length_request = 1); - /** \brief Construct policy with the default instance of the execution space */ - TeamPolicyInternal( int league_size_request , int team_size_request , int vector_length_request = 1 ); + /** \brief Construct policy with the default instance of the execution space + */ + TeamPolicyInternal(int league_size_request, int team_size_request, + int vector_length_request = 1); - TeamPolicyInternal( int league_size_request , const Kokkos::AUTO_t & , int vector_length_request = 1 ); + TeamPolicyInternal(int league_size_request, const Kokkos::AUTO_t&, + int vector_length_request = 1); -/* TeamPolicyInternal( int league_size_request , int team_size_request ); + /* TeamPolicyInternal( int league_size_request , int team_size_request ); - TeamPolicyInternal( int league_size_request , const Kokkos::AUTO_t & );*/ + TeamPolicyInternal( int league_size_request , const Kokkos::AUTO_t & );*/ /** \brief The actual league size (number of teams) of the policy. * * This may be smaller than the requested league size due to limitations * of the execution space. */ - KOKKOS_INLINE_FUNCTION int league_size() const ; + KOKKOS_INLINE_FUNCTION int league_size() const; /** \brief The actual team size (number of threads per team) of the policy. * * This may be smaller than the requested team size due to limitations * of the execution space. */ - KOKKOS_INLINE_FUNCTION int team_size() const ; + KOKKOS_INLINE_FUNCTION int team_size() const; - inline typename traits::index_type chunk_size() const ; + inline typename traits::index_type chunk_size() const; #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - inline TeamPolicyInternal set_chunk_size(int chunk_size) const ; + inline TeamPolicyInternal set_chunk_size(int chunk_size) const; #else inline TeamPolicyInternal& set_chunk_size(int chunk_size); #endif @@ -384,39 +374,38 @@ public: * each member of the execution policy. */ struct member_type { - /** \brief Handle to the currently executing team shared scratch memory */ KOKKOS_INLINE_FUNCTION - typename traits::execution_space::scratch_memory_space team_shmem() const ; + typename traits::execution_space::scratch_memory_space team_shmem() const; /** \brief Rank of this team within the league of teams */ - KOKKOS_INLINE_FUNCTION int league_rank() const ; + KOKKOS_INLINE_FUNCTION int league_rank() const; /** \brief Number of teams in the league */ - KOKKOS_INLINE_FUNCTION int league_size() const ; + KOKKOS_INLINE_FUNCTION int league_size() const; /** \brief Rank of this thread within this team */ - KOKKOS_INLINE_FUNCTION int team_rank() const ; + KOKKOS_INLINE_FUNCTION int team_rank() const; /** \brief Number of threads in this team */ - KOKKOS_INLINE_FUNCTION int team_size() const ; + KOKKOS_INLINE_FUNCTION int team_size() const; /** \brief Barrier among the threads of this team */ - KOKKOS_INLINE_FUNCTION void team_barrier() const ; + KOKKOS_INLINE_FUNCTION void team_barrier() const; - /** \brief Intra-team reduction. Returns join of all values of the team members. */ - template< class JoinOp > - KOKKOS_INLINE_FUNCTION - typename JoinOp::value_type team_reduce( const typename JoinOp::value_type - , const JoinOp & ) const ; + /** \brief Intra-team reduction. Returns join of all values of the team + * members. */ + template + KOKKOS_INLINE_FUNCTION typename JoinOp::value_type team_reduce( + const typename JoinOp::value_type, const JoinOp&) const; /** \brief Intra-team exclusive prefix sum with team_rank() ordering. * * The highest rank thread can compute the reduction total as * reduction_total = dev.team_scan( value ) + value ; */ - template< typename Type > - KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value ) const ; + template + KOKKOS_INLINE_FUNCTION Type team_scan(const Type& value) const; /** \brief Intra-team exclusive prefix sum with team_rank() ordering * with intra-team non-deterministic ordering accumulation. @@ -427,44 +416,52 @@ public: * As such the base value for each team's scan operation is similarly * non-deterministic. */ - template< typename Type > - KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value , Type * const global_accum ) const ; + template + KOKKOS_INLINE_FUNCTION Type team_scan(const Type& value, + Type* const global_accum) const; }; }; +struct PerTeamValue { + int value; + PerTeamValue(int arg); +}; - struct PerTeamValue { - int value; - PerTeamValue(int arg); - }; +struct PerThreadValue { + int value; + PerThreadValue(int arg); +}; - struct PerThreadValue { - int value; - PerThreadValue(int arg); - }; - - template - struct ExtractVectorLength { - static inline iType value(typename std::enable_if::value,iType>::type val, Args...) { - return val; - } - static inline typename std::enable_if::value,int>::type value(typename std::enable_if::value,iType>::type, Args...) { - return 1; - } - }; - - template - inline typename std::enable_if::value,iType>::type extract_vector_length(iType val, Args...) { +template +struct ExtractVectorLength { + static inline iType value( + typename std::enable_if::value, iType>::type val, + Args...) { return val; } - - template - inline typename std::enable_if::value,int>::type extract_vector_length(iType, Args...) { + static inline + typename std::enable_if::value, int>::type + value( + typename std::enable_if::value, iType>::type, + Args...) { return 1; } +}; +template +inline typename std::enable_if::value, iType>::type +extract_vector_length(iType val, Args...) { + return val; } +template +inline typename std::enable_if::value, int>::type +extract_vector_length(iType, Args...) { + return 1; +} + +} // namespace Impl + Impl::PerTeamValue PerTeam(const int& arg); Impl::PerThreadValue PerThread(const int& arg); @@ -474,38 +471,41 @@ struct ScratchRequest { int per_team; int per_thread; - inline - ScratchRequest(const int& level_, const Impl::PerTeamValue& team_value) { - level = level_; - per_team = team_value.value; + inline ScratchRequest(const int& level_, + const Impl::PerTeamValue& team_value) { + level = level_; + per_team = team_value.value; per_thread = 0; } - inline - ScratchRequest(const int& level_, const Impl::PerThreadValue& thread_value) { - level = level_; - per_team = 0; - per_thread = thread_value.value;; + inline ScratchRequest(const int& level_, + const Impl::PerThreadValue& thread_value) { + level = level_; + per_team = 0; + per_thread = thread_value.value; + ; } - inline - ScratchRequest(const int& level_, const Impl::PerTeamValue& team_value, const Impl::PerThreadValue& thread_value) { - level = level_; - per_team = team_value.value; - per_thread = thread_value.value;; + inline ScratchRequest(const int& level_, const Impl::PerTeamValue& team_value, + const Impl::PerThreadValue& thread_value) { + level = level_; + per_team = team_value.value; + per_thread = thread_value.value; + ; } - inline - ScratchRequest(const int& level_, const Impl::PerThreadValue& thread_value, const Impl::PerTeamValue& team_value) { - level = level_; - per_team = team_value.value; - per_thread = thread_value.value;; + inline ScratchRequest(const int& level_, + const Impl::PerThreadValue& thread_value, + const Impl::PerTeamValue& team_value) { + level = level_; + per_team = team_value.value; + per_thread = thread_value.value; + ; } - }; - -/** \brief Execution policy for parallel work over a league of teams of threads. +/** \brief Execution policy for parallel work over a league of teams of + * threads. * * The work functor is called for each thread of each team such that * the team's member threads are guaranteed to be concurrent. @@ -522,162 +522,197 @@ struct ScratchRequest { * be omitted. * * Possible Template arguments and their default values: - * ExecutionSpace (DefaultExecutionSpace): where to execute code. Must be enabled. - * WorkTag (none): Tag which is used as the first argument for the functor operator. - * Schedule (Schedule): Scheduling Policy (Dynamic, or Static). - * IndexType (IndexType: Integer Index type used to iterate over the Index space. + * ExecutionSpace (DefaultExecutionSpace): where to execute code. Must be + * enabled. WorkTag (none): Tag which is used as the first argument for the + * functor operator. Schedule (Schedule): Scheduling Policy + * (Dynamic, or Static). IndexType (IndexType: + * Integer Index type used to iterate over the Index space. * LaunchBounds Launch Bounds for CUDA compilation, * default of LaunchBounds<0,0> indicates no launch bounds specified. */ -template< class ... Properties> -class TeamPolicy: public - Impl::TeamPolicyInternal< - typename Impl::PolicyTraits::execution_space, - Properties ...> { +template +class TeamPolicy + : public Impl::TeamPolicyInternal< + typename Impl::PolicyTraits::execution_space, + Properties...> { typedef Impl::TeamPolicyInternal< - typename Impl::PolicyTraits::execution_space, - Properties ...> internal_policy; + typename Impl::PolicyTraits::execution_space, + Properties...> + internal_policy; - template + template friend class TeamPolicy; -public: - typedef Impl::PolicyTraits traits; + public: + typedef Impl::PolicyTraits traits; typedef TeamPolicy execution_policy; - TeamPolicy& operator = (const TeamPolicy&) = default; + TeamPolicy& operator=(const TeamPolicy&) = default; /** \brief Construct policy with the given instance of the execution space */ - TeamPolicy( const typename traits::execution_space & space_ , int league_size_request , int team_size_request , int vector_length_request = 1 ) - : internal_policy(space_,league_size_request,team_size_request, vector_length_request) {first_arg = false;} + TeamPolicy(const typename traits::execution_space& space_, + int league_size_request, int team_size_request, + int vector_length_request = 1) + : internal_policy(space_, league_size_request, team_size_request, + vector_length_request) { + first_arg = false; + } - TeamPolicy( const typename traits::execution_space & space_, int league_size_request , const Kokkos::AUTO_t & , int vector_length_request = 1 ) - : internal_policy(space_,league_size_request,Kokkos::AUTO(), vector_length_request) {first_arg = false;} + TeamPolicy(const typename traits::execution_space& space_, + int league_size_request, const Kokkos::AUTO_t&, + int vector_length_request = 1) + : internal_policy(space_, league_size_request, Kokkos::AUTO(), + vector_length_request) { + first_arg = false; + } - /** \brief Construct policy with the default instance of the execution space */ - TeamPolicy( int league_size_request , int team_size_request , int vector_length_request = 1 ) - : internal_policy(league_size_request,team_size_request, vector_length_request) {first_arg = false;} + /** \brief Construct policy with the default instance of the execution space + */ + TeamPolicy(int league_size_request, int team_size_request, + int vector_length_request = 1) + : internal_policy(league_size_request, team_size_request, + vector_length_request) { + first_arg = false; + } - TeamPolicy( int league_size_request , const Kokkos::AUTO_t & , int vector_length_request = 1 ) - : internal_policy(league_size_request,Kokkos::AUTO(), vector_length_request) {first_arg = false;} + TeamPolicy(int league_size_request, const Kokkos::AUTO_t&, + int vector_length_request = 1) + : internal_policy(league_size_request, Kokkos::AUTO(), + vector_length_request) { + first_arg = false; + } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE /** \brief Construct policy with the given instance of the execution space */ - template - TeamPolicy( const typename traits::execution_space & , int league_size_request , int team_size_request , int vector_length_request, - Args ... args) - : internal_policy(typename traits::execution_space(),league_size_request,team_size_request, vector_length_request) { + template + TeamPolicy(const typename traits::execution_space&, int league_size_request, + int team_size_request, int vector_length_request, Args... args) + : internal_policy(typename traits::execution_space(), league_size_request, + team_size_request, vector_length_request) { first_arg = false; set(args...); } - template - TeamPolicy( const typename traits::execution_space & , int league_size_request , const Kokkos::AUTO_t & , int vector_length_request , - Args ... args) - : internal_policy(typename traits::execution_space(),league_size_request,Kokkos::AUTO(), vector_length_request) { + template + TeamPolicy(const typename traits::execution_space&, int league_size_request, + const Kokkos::AUTO_t&, int vector_length_request, Args... args) + : internal_policy(typename traits::execution_space(), league_size_request, + Kokkos::AUTO(), vector_length_request) { first_arg = false; set(args...); } - /** \brief Construct policy with the default instance of the execution space */ - template - TeamPolicy( int league_size_request , int team_size_request , int vector_length_request , - Args ... args) - : internal_policy(league_size_request,team_size_request, vector_length_request) { + /** \brief Construct policy with the default instance of the execution space + */ + template + TeamPolicy(int league_size_request, int team_size_request, + int vector_length_request, Args... args) + : internal_policy(league_size_request, team_size_request, + vector_length_request) { first_arg = false; set(args...); } - template - TeamPolicy( int league_size_request , const Kokkos::AUTO_t & , int vector_length_request , - Args ... args) - : internal_policy(league_size_request,Kokkos::AUTO(), vector_length_request) { + template + TeamPolicy(int league_size_request, const Kokkos::AUTO_t&, + int vector_length_request, Args... args) + : internal_policy(league_size_request, Kokkos::AUTO(), + vector_length_request) { first_arg = false; set(args...); } /** \brief Construct policy with the given instance of the execution space */ - template - TeamPolicy( const typename traits::execution_space & , int league_size_request , int team_size_request , - Args ... args) - : internal_policy(typename traits::execution_space(),league_size_request,team_size_request, - Kokkos::Impl::extract_vector_length(args...)) { + template + TeamPolicy(const typename traits::execution_space&, int league_size_request, + int team_size_request, Args... args) + : internal_policy(typename traits::execution_space(), league_size_request, + team_size_request, + Kokkos::Impl::extract_vector_length(args...)) { first_arg = true; set(args...); } - template - TeamPolicy( const typename traits::execution_space & , int league_size_request , const Kokkos::AUTO_t & , - Args ... args) - : internal_policy(typename traits::execution_space(),league_size_request,Kokkos::AUTO(), - Kokkos::Impl::extract_vector_length(args...)) { + template + TeamPolicy(const typename traits::execution_space&, int league_size_request, + const Kokkos::AUTO_t&, Args... args) + : internal_policy(typename traits::execution_space(), league_size_request, + Kokkos::AUTO(), + Kokkos::Impl::extract_vector_length(args...)) { first_arg = true; set(args...); } - /** \brief Construct policy with the default instance of the execution space */ - template - TeamPolicy( int league_size_request , int team_size_request , - Args ... args) - : internal_policy(league_size_request,team_size_request, - Kokkos::Impl::extract_vector_length(args...)) { + /** \brief Construct policy with the default instance of the execution space + */ + template + TeamPolicy(int league_size_request, int team_size_request, Args... args) + : internal_policy(league_size_request, team_size_request, + Kokkos::Impl::extract_vector_length(args...)) { first_arg = true; set(args...); } - template - TeamPolicy( int league_size_request , const Kokkos::AUTO_t & , - Args ... args) - : internal_policy(league_size_request,Kokkos::AUTO(), - Kokkos::Impl::extract_vector_length(args...)) { + template + TeamPolicy(int league_size_request, const Kokkos::AUTO_t&, Args... args) + : internal_policy(league_size_request, Kokkos::AUTO(), + Kokkos::Impl::extract_vector_length(args...)) { first_arg = true; set(args...); } #endif - template - TeamPolicy(const TeamPolicy p):internal_policy(p) { + template + TeamPolicy(const TeamPolicy p) : internal_policy(p) { first_arg = p.first_arg; } -private: + private: bool first_arg; - TeamPolicy(const internal_policy& p):internal_policy(p) {first_arg = false;} + TeamPolicy(const internal_policy& p) : internal_policy(p) { + first_arg = false; + } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE inline void set() {} #endif -public: + public: #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - template - inline void set(Args ...) { - static_assert( 0 == sizeof...(Args), "Kokkos::TeamPolicy: unhandled constructor arguments encountered."); + template + inline void set(Args...) { + static_assert( + 0 == sizeof...(Args), + "Kokkos::TeamPolicy: unhandled constructor arguments encountered."); } - template - inline typename std::enable_if::value>::type set(iType, Args ... args) { - if(first_arg) { + template + inline typename std::enable_if::value>::type set( + iType, Args... args) { + if (first_arg) { first_arg = false; set(args...); } else { first_arg = false; - Kokkos::Impl::throw_runtime_exception("Kokkos::TeamPolicy: integer argument to constructor in illegal place."); + Kokkos::Impl::throw_runtime_exception( + "Kokkos::TeamPolicy: integer argument to constructor in illegal " + "place."); } } - template - inline void set(const ChunkSize& chunksize, Args ... args) { + template + inline void set(const ChunkSize& chunksize, Args... args) { first_arg = false; internal_policy::internal_set_chunk_size(chunksize.value); set(args...); } - template - inline void set(const ScratchRequest& scr_request, Args ... args) { + template + inline void set(const ScratchRequest& scr_request, Args... args) { first_arg = false; - internal_policy::internal_set_scratch_size(scr_request.level,Impl::PerTeamValue(scr_request.per_team), + internal_policy::internal_set_scratch_size( + scr_request.level, Impl::PerTeamValue(scr_request.per_team), Impl::PerThreadValue(scr_request.per_thread)); set(args...); } @@ -686,267 +721,287 @@ public: return TeamPolicy(internal_policy::set_chunk_size(chunk)); } - inline TeamPolicy set_scratch_size(const int& level, const Impl::PerTeamValue& per_team) const { - return TeamPolicy(internal_policy::set_scratch_size(level,per_team)); + inline TeamPolicy set_scratch_size(const int& level, + const Impl::PerTeamValue& per_team) const { + return TeamPolicy(internal_policy::set_scratch_size(level, per_team)); } - inline TeamPolicy set_scratch_size(const int& level, const Impl::PerThreadValue& per_thread) const { - return TeamPolicy(internal_policy::set_scratch_size(level,per_thread)); + inline TeamPolicy set_scratch_size( + const int& level, const Impl::PerThreadValue& per_thread) const { + return TeamPolicy(internal_policy::set_scratch_size(level, per_thread)); } - inline TeamPolicy set_scratch_size(const int& level, const Impl::PerTeamValue& per_team, const Impl::PerThreadValue& per_thread) const { - return TeamPolicy(internal_policy::set_scratch_size(level, per_team, per_thread)); + inline TeamPolicy set_scratch_size( + const int& level, const Impl::PerTeamValue& per_team, + const Impl::PerThreadValue& per_thread) const { + return TeamPolicy( + internal_policy::set_scratch_size(level, per_team, per_thread)); } - inline TeamPolicy set_scratch_size(const int& level, const Impl::PerThreadValue& per_thread, const Impl::PerTeamValue& per_team) const { - return TeamPolicy(internal_policy::set_scratch_size(level, per_team, per_thread)); + inline TeamPolicy set_scratch_size(const int& level, + const Impl::PerThreadValue& per_thread, + const Impl::PerTeamValue& per_team) const { + return TeamPolicy( + internal_policy::set_scratch_size(level, per_team, per_thread)); } #else inline TeamPolicy& set_chunk_size(int chunk) { - static_assert(std::is_same::value, "internal set_chunk_size should return a reference"); + static_assert(std::is_same::value, + "internal set_chunk_size should return a reference"); return static_cast(internal_policy::set_chunk_size(chunk)); } - inline TeamPolicy& set_scratch_size(const int& level, const Impl::PerTeamValue& per_team) { - static_assert(std::is_same::value, "internal set_chunk_size should return a reference"); - return static_cast(internal_policy::set_scratch_size(level,per_team)); + inline TeamPolicy& set_scratch_size(const int& level, + const Impl::PerTeamValue& per_team) { + static_assert(std::is_same::value, + "internal set_chunk_size should return a reference"); + return static_cast( + internal_policy::set_scratch_size(level, per_team)); } - inline TeamPolicy& set_scratch_size(const int& level, const Impl::PerThreadValue& per_thread) { - return static_cast(internal_policy::set_scratch_size(level,per_thread)); + inline TeamPolicy& set_scratch_size(const int& level, + const Impl::PerThreadValue& per_thread) { + return static_cast( + internal_policy::set_scratch_size(level, per_thread)); } - inline TeamPolicy& set_scratch_size(const int& level, const Impl::PerTeamValue& per_team, const Impl::PerThreadValue& per_thread) { - return static_cast(internal_policy::set_scratch_size(level, per_team, per_thread)); + inline TeamPolicy& set_scratch_size(const int& level, + const Impl::PerTeamValue& per_team, + const Impl::PerThreadValue& per_thread) { + return static_cast( + internal_policy::set_scratch_size(level, per_team, per_thread)); } - inline TeamPolicy& set_scratch_size(const int& level, const Impl::PerThreadValue& per_thread, const Impl::PerTeamValue& per_team) { - return static_cast(internal_policy::set_scratch_size(level, per_team, per_thread)); + inline TeamPolicy& set_scratch_size(const int& level, + const Impl::PerThreadValue& per_thread, + const Impl::PerTeamValue& per_team) { + return static_cast( + internal_policy::set_scratch_size(level, per_team, per_thread)); } #endif - }; namespace Impl { -template +template struct TeamThreadRangeBoundariesStruct { -private: + private: + KOKKOS_INLINE_FUNCTION static iType ibegin(const iType& arg_begin, + const iType& arg_end, + const iType& arg_rank, + const iType& arg_size) { + return arg_begin + + ((arg_end - arg_begin + arg_size - 1) / arg_size) * arg_rank; + } - KOKKOS_INLINE_FUNCTION static - iType ibegin( const iType & arg_begin - , const iType & arg_end - , const iType & arg_rank - , const iType & arg_size - ) - { - return arg_begin + ( ( arg_end - arg_begin + arg_size - 1 ) / arg_size ) * arg_rank ; - } - - KOKKOS_INLINE_FUNCTION static - iType iend( const iType & arg_begin - , const iType & arg_end - , const iType & arg_rank - , const iType & arg_size - ) - { - const iType end_ = arg_begin + ( ( arg_end - arg_begin + arg_size - 1 ) / arg_size ) * ( arg_rank + 1 ); - return end_ < arg_end ? end_ : arg_end ; - } - -public: + KOKKOS_INLINE_FUNCTION static iType iend(const iType& arg_begin, + const iType& arg_end, + const iType& arg_rank, + const iType& arg_size) { + const iType end_ = + arg_begin + + ((arg_end - arg_begin + arg_size - 1) / arg_size) * (arg_rank + 1); + return end_ < arg_end ? end_ : arg_end; + } + public: typedef iType index_type; const iType start; const iType end; - enum {increment = 1}; + enum { increment = 1 }; const TeamMemberType& thread; KOKKOS_INLINE_FUNCTION - TeamThreadRangeBoundariesStruct( const TeamMemberType& arg_thread - , const iType& arg_end - ) - : start( ibegin( 0 , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) ) - , end( iend( 0 , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) ) - , thread( arg_thread ) - {} + TeamThreadRangeBoundariesStruct(const TeamMemberType& arg_thread, + const iType& arg_end) + : start( + ibegin(0, arg_end, arg_thread.team_rank(), arg_thread.team_size())), + end(iend(0, arg_end, arg_thread.team_rank(), arg_thread.team_size())), + thread(arg_thread) {} KOKKOS_INLINE_FUNCTION - TeamThreadRangeBoundariesStruct( const TeamMemberType& arg_thread - , const iType& arg_begin - , const iType& arg_end - ) - : start( ibegin( arg_begin , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) ) - , end( iend( arg_begin , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) ) - , thread( arg_thread ) - {} + TeamThreadRangeBoundariesStruct(const TeamMemberType& arg_thread, + const iType& arg_begin, const iType& arg_end) + : start(ibegin(arg_begin, arg_end, arg_thread.team_rank(), + arg_thread.team_size())), + end(iend(arg_begin, arg_end, arg_thread.team_rank(), + arg_thread.team_size())), + thread(arg_thread) {} }; -template +template struct TeamVectorRangeBoundariesStruct { -private: + private: + KOKKOS_INLINE_FUNCTION static iType ibegin(const iType& arg_begin, + const iType& arg_end, + const iType& arg_rank, + const iType& arg_size) { + return arg_begin + + ((arg_end - arg_begin + arg_size - 1) / arg_size) * arg_rank; + } - KOKKOS_INLINE_FUNCTION static - iType ibegin( const iType & arg_begin - , const iType & arg_end - , const iType & arg_rank - , const iType & arg_size - ) - { - return arg_begin + ( ( arg_end - arg_begin + arg_size - 1 ) / arg_size ) * arg_rank ; - } - - KOKKOS_INLINE_FUNCTION static - iType iend( const iType & arg_begin - , const iType & arg_end - , const iType & arg_rank - , const iType & arg_size - ) - { - const iType end_ = arg_begin + ( ( arg_end - arg_begin + arg_size - 1 ) / arg_size ) * ( arg_rank + 1 ); - return end_ < arg_end ? end_ : arg_end ; - } - -public: + KOKKOS_INLINE_FUNCTION static iType iend(const iType& arg_begin, + const iType& arg_end, + const iType& arg_rank, + const iType& arg_size) { + const iType end_ = + arg_begin + + ((arg_end - arg_begin + arg_size - 1) / arg_size) * (arg_rank + 1); + return end_ < arg_end ? end_ : arg_end; + } + public: typedef iType index_type; const iType start; const iType end; - enum {increment = 1}; + enum { increment = 1 }; const TeamMemberType& thread; KOKKOS_INLINE_FUNCTION - TeamVectorRangeBoundariesStruct( const TeamMemberType& arg_thread - , const iType& arg_end - ) - : start( ibegin( 0 , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) ) - , end( iend( 0 , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) ) - , thread( arg_thread ) - {} + TeamVectorRangeBoundariesStruct(const TeamMemberType& arg_thread, + const iType& arg_end) + : start( + ibegin(0, arg_end, arg_thread.team_rank(), arg_thread.team_size())), + end(iend(0, arg_end, arg_thread.team_rank(), arg_thread.team_size())), + thread(arg_thread) {} KOKKOS_INLINE_FUNCTION - TeamVectorRangeBoundariesStruct( const TeamMemberType& arg_thread - , const iType& arg_begin - , const iType& arg_end - ) - : start( ibegin( arg_begin , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) ) - , end( iend( arg_begin , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) ) - , thread( arg_thread ) - {} + TeamVectorRangeBoundariesStruct(const TeamMemberType& arg_thread, + const iType& arg_begin, const iType& arg_end) + : start(ibegin(arg_begin, arg_end, arg_thread.team_rank(), + arg_thread.team_size())), + end(iend(arg_begin, arg_end, arg_thread.team_rank(), + arg_thread.team_size())), + thread(arg_thread) {} }; -template +template struct ThreadVectorRangeBoundariesStruct { typedef iType index_type; const index_type start; const index_type end; - enum {increment = 1}; + enum { increment = 1 }; KOKKOS_INLINE_FUNCTION - constexpr ThreadVectorRangeBoundariesStruct ( const TeamMemberType, const index_type& count ) noexcept - : start( static_cast(0) ) - , end( count ) {} + constexpr ThreadVectorRangeBoundariesStruct(const TeamMemberType, + const index_type& count) noexcept + : start(static_cast(0)), end(count) {} KOKKOS_INLINE_FUNCTION - constexpr ThreadVectorRangeBoundariesStruct ( const index_type& count ) noexcept - : start( static_cast(0) ) - , end( count ) {} + constexpr ThreadVectorRangeBoundariesStruct(const index_type& count) noexcept + : start(static_cast(0)), end(count) {} KOKKOS_INLINE_FUNCTION - constexpr ThreadVectorRangeBoundariesStruct ( const TeamMemberType, const index_type& arg_begin, const index_type& arg_end ) noexcept - : start( static_cast(arg_begin) ) - , end( arg_end ) {} + constexpr ThreadVectorRangeBoundariesStruct( + const TeamMemberType, const index_type& arg_begin, + const index_type& arg_end) noexcept + : start(static_cast(arg_begin)), end(arg_end) {} KOKKOS_INLINE_FUNCTION - constexpr ThreadVectorRangeBoundariesStruct ( const index_type& arg_begin, const index_type& arg_end ) noexcept - : start( static_cast(arg_begin) ) - , end( arg_end ) {} + constexpr ThreadVectorRangeBoundariesStruct( + const index_type& arg_begin, const index_type& arg_end) noexcept + : start(static_cast(arg_begin)), end(arg_end) {} }; -template +template struct ThreadSingleStruct { const TeamMemberType& team_member; KOKKOS_INLINE_FUNCTION - ThreadSingleStruct( const TeamMemberType& team_member_ ) : team_member( team_member_ ) {} + ThreadSingleStruct(const TeamMemberType& team_member_) + : team_member(team_member_) {} }; -template +template struct VectorSingleStruct { const TeamMemberType& team_member; KOKKOS_INLINE_FUNCTION - VectorSingleStruct( const TeamMemberType& team_member_ ) : team_member( team_member_ ) {} + VectorSingleStruct(const TeamMemberType& team_member_) + : team_member(team_member_) {} }; -} // namespace Impl +} // namespace Impl /** \brief Execution policy for parallel work over a threads within a team. * - * The range is split over all threads in a team. The Mapping scheme depends on the architecture. - * This policy is used together with a parallel pattern as a nested layer within a kernel launched - * with the TeamPolicy. This variant expects a single count. So the range is (0,count]. + * The range is split over all threads in a team. The Mapping scheme depends on + * the architecture. This policy is used together with a parallel pattern as a + * nested layer within a kernel launched with the TeamPolicy. This variant + * expects a single count. So the range is (0,count]. */ -template +template KOKKOS_INLINE_FUNCTION_DELETED -Impl::TeamThreadRangeBoundariesStruct -TeamThreadRange( const TeamMemberType&, const iType& count ) = delete; + Impl::TeamThreadRangeBoundariesStruct + TeamThreadRange(const TeamMemberType&, const iType& count) = delete; /** \brief Execution policy for parallel work over a threads within a team. * - * The range is split over all threads in a team. The Mapping scheme depends on the architecture. - * This policy is used together with a parallel pattern as a nested layer within a kernel launched - * with the TeamPolicy. This variant expects a begin and end. So the range is (begin,end]. + * The range is split over all threads in a team. The Mapping scheme depends on + * the architecture. This policy is used together with a parallel pattern as a + * nested layer within a kernel launched with the TeamPolicy. This variant + * expects a begin and end. So the range is (begin,end]. */ -template -KOKKOS_INLINE_FUNCTION_DELETED -Impl::TeamThreadRangeBoundariesStruct::type, TeamMemberType> -TeamThreadRange( const TeamMemberType&, const iType1& begin, const iType2& end ) = delete; +template +KOKKOS_INLINE_FUNCTION_DELETED Impl::TeamThreadRangeBoundariesStruct< + typename std::common_type::type, TeamMemberType> +TeamThreadRange(const TeamMemberType&, const iType1& begin, + const iType2& end) = delete; /** \brief Execution policy for parallel work over a threads within a team. * - * The range is split over all threads in a team. The Mapping scheme depends on the architecture. - * This policy is used together with a parallel pattern as a nested layer within a kernel launched - * with the TeamPolicy. This variant expects a single count. So the range is (0,count]. + * The range is split over all threads in a team. The Mapping scheme depends on + * the architecture. This policy is used together with a parallel pattern as a + * nested layer within a kernel launched with the TeamPolicy. This variant + * expects a single count. So the range is (0,count]. */ -template +template KOKKOS_INLINE_FUNCTION_DELETED -Impl::TeamThreadRangeBoundariesStruct -TeamVectorRange( const TeamMemberType&, const iType& count ) = delete; + Impl::TeamThreadRangeBoundariesStruct + TeamVectorRange(const TeamMemberType&, const iType& count) = delete; /** \brief Execution policy for parallel work over a threads within a team. * - * The range is split over all threads in a team. The Mapping scheme depends on the architecture. - * This policy is used together with a parallel pattern as a nested layer within a kernel launched - * with the TeamPolicy. This variant expects a begin and end. So the range is (begin,end]. + * The range is split over all threads in a team. The Mapping scheme depends on + * the architecture. This policy is used together with a parallel pattern as a + * nested layer within a kernel launched with the TeamPolicy. This variant + * expects a begin and end. So the range is (begin,end]. */ -template -KOKKOS_INLINE_FUNCTION_DELETED -Impl::TeamThreadRangeBoundariesStruct::type, TeamMemberType> -TeamVectorRange( const TeamMemberType&, const iType1& begin, const iType2& end ) = delete; +template +KOKKOS_INLINE_FUNCTION_DELETED Impl::TeamThreadRangeBoundariesStruct< + typename std::common_type::type, TeamMemberType> +TeamVectorRange(const TeamMemberType&, const iType1& begin, + const iType2& end) = delete; /** \brief Execution policy for a vector parallel loop. * - * The range is split over all vector lanes in a thread. The Mapping scheme depends on the architecture. - * This policy is used together with a parallel pattern as a nested layer within a kernel launched - * with the TeamPolicy. This variant expects a single count. So the range is (0,count]. + * The range is split over all vector lanes in a thread. The Mapping scheme + * depends on the architecture. This policy is used together with a parallel + * pattern as a nested layer within a kernel launched with the TeamPolicy. This + * variant expects a single count. So the range is (0,count]. */ -template +template KOKKOS_INLINE_FUNCTION_DELETED -Impl::ThreadVectorRangeBoundariesStruct -ThreadVectorRange( const TeamMemberType&, const iType& count ) = delete; + Impl::ThreadVectorRangeBoundariesStruct + ThreadVectorRange(const TeamMemberType&, const iType& count) = delete; -template +template KOKKOS_INLINE_FUNCTION_DELETED -Impl::ThreadVectorRangeBoundariesStruct -ThreadVectorRange( const TeamMemberType&, const iType& arg_begin, const iType& arg_end ) = delete; + Impl::ThreadVectorRangeBoundariesStruct + ThreadVectorRange(const TeamMemberType&, const iType& arg_begin, + const iType& arg_end) = delete; #if defined(KOKKOS_ENABLE_PROFILING) namespace Impl { -template::value > +template ::value> struct ParallelConstructName; -template +template struct ParallelConstructName { - ParallelConstructName(std::string const& label):label_ref(label) { + ParallelConstructName(std::string const& label) : label_ref(label) { if (label.empty()) { default_name = std::string(typeid(FunctorType).name()) + "/" + - typeid(TagType).name(); + typeid(TagType).name(); } } std::string const& get() { @@ -956,9 +1011,9 @@ struct ParallelConstructName { std::string default_name; }; -template +template struct ParallelConstructName { - ParallelConstructName(std::string const& label):label_ref(label) { + ParallelConstructName(std::string const& label) : label_ref(label) { if (label.empty()) { default_name = std::string(typeid(FunctorType).name()); } @@ -970,49 +1025,54 @@ struct ParallelConstructName { std::string default_name; }; -} // namespace Impl +} // namespace Impl #endif /* defined KOKKOS_ENABLE_PROFILING */ -} // namespace Kokkos +} // namespace Kokkos namespace Kokkos { namespace Experimental { namespace Impl { - template - struct PolicyPropertyAdaptor; +template +struct PolicyPropertyAdaptor; - template - struct PolicyPropertyAdaptor,RangePolicy> { - typedef RangePolicy policy_in_t; - typedef RangePolicy> policy_out_t; - }; +template +struct PolicyPropertyAdaptor, + RangePolicy> { + typedef RangePolicy policy_in_t; + typedef RangePolicy> + policy_out_t; +}; - template - struct PolicyPropertyAdaptor,TeamPolicy> { - typedef TeamPolicy policy_in_t; - typedef TeamPolicy> policy_out_t; - }; +template +struct PolicyPropertyAdaptor, + TeamPolicy> { + typedef TeamPolicy policy_in_t; + typedef TeamPolicy> + policy_out_t; +}; +} // namespace Impl + +template +constexpr typename Impl::PolicyPropertyAdaptor< + WorkItemProperty::ImplWorkItemProperty

    , PolicyType>::policy_out_t +require(const PolicyType p, WorkItemProperty::ImplWorkItemProperty

    ) { + return typename Impl::PolicyPropertyAdaptor< + WorkItemProperty::ImplWorkItemProperty

    , PolicyType>::policy_out_t(p); } - -template -constexpr typename Impl::PolicyPropertyAdaptor,PolicyType>::policy_out_t - require(const PolicyType p, WorkItemProperty::ImplWorkItemProperty

    ){ - return typename Impl::PolicyPropertyAdaptor,PolicyType>::policy_out_t(p); -} -} //Experimental -} //Kokkos +} // namespace Experimental +} // namespace Kokkos #endif /* #define KOKKOS_EXECPOLICY_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_Extents.hpp b/lib/kokkos/core/src/Kokkos_Extents.hpp index c8b9110485..2e07e8b76b 100644 --- a/lib/kokkos/core/src/Kokkos_Extents.hpp +++ b/lib/kokkos/core/src/Kokkos_Extents.hpp @@ -2,10 +2,10 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 +// Kokkos v. 3.0 // Copyright (2019) Sandia Corporation // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -60,9 +60,7 @@ template struct PrependExtent; template -struct PrependExtent< - Extents, NewExtent -> { +struct PrependExtent, NewExtent> { using type = Extents; }; @@ -70,117 +68,101 @@ template struct AppendExtent; template -struct AppendExtent< - Extents, NewExtent -> { +struct AppendExtent, NewExtent> { using type = Extents; }; -} // end namespace Experimental +} // end namespace Experimental namespace Impl { namespace _parse_view_extents_impl { template -struct _all_remaining_extents_dynamic : std::true_type { }; +struct _all_remaining_extents_dynamic : std::true_type {}; template -struct _all_remaining_extents_dynamic - : _all_remaining_extents_dynamic -{ }; +struct _all_remaining_extents_dynamic : _all_remaining_extents_dynamic { +}; template -struct _all_remaining_extents_dynamic - : std::false_type -{ }; +struct _all_remaining_extents_dynamic : std::false_type {}; -template +template struct _parse_impl { using type = Result; }; -// We have to treat the case of int**[x] specially, since it *doesn't* go backwards +// We have to treat the case of int**[x] specially, since it *doesn't* go +// backwards template struct _parse_impl< - T*, Experimental::Extents, - typename std::enable_if<_all_remaining_extents_dynamic::value>::type -> - : _parse_impl< - T, Experimental::Extents - > -{ }; + T*, Experimental::Extents, + typename std::enable_if<_all_remaining_extents_dynamic::value>::type> + : _parse_impl> {}; // int*(*[x])[y] should still work also (meaning int[][x][][y]) template -struct _parse_impl< - T*, Experimental::Extents, - typename std::enable_if::value>::type -> -{ +struct _parse_impl, + typename std::enable_if< + not _all_remaining_extents_dynamic::value>::type> { using _next = Kokkos::Experimental::AppendExtent< - typename _parse_impl, void>::type, - Experimental::dynamic_extent - >; + typename _parse_impl, void>::type, + Experimental::dynamic_extent>; using type = typename _next::type; }; template -struct _parse_impl< - T[N], Experimental::Extents, void -> - : _parse_impl< - T, Experimental::Extents // TODO @pedantic this could be a narrowing cast - > -{ }; +struct _parse_impl, void> + : _parse_impl // TODO @pedantic this + // could be a + // narrowing cast + > {}; -} // end namespace _parse_view_extents_impl +} // end namespace _parse_view_extents_impl template struct ParseViewExtents { - using type = - typename _parse_view_extents_impl - ::_parse_impl>::type; + using type = typename _parse_view_extents_impl ::_parse_impl< + DataType, Experimental::Extents<>>::type; }; template -struct ApplyExtent -{ +struct ApplyExtent { using type = ValueType[Ext]; }; template -struct ApplyExtent -{ +struct ApplyExtent { using type = ValueType*; }; template -struct ApplyExtent -{ +struct ApplyExtent { using type = typename ApplyExtent::type[N]; }; template -struct ApplyExtent -{ - using type = ValueType*[Ext]; +struct ApplyExtent { + using type = ValueType * [Ext]; }; template -struct ApplyExtent -{ - using type = typename ApplyExtent::type*; +struct ApplyExtent { + using type = + typename ApplyExtent::type*; }; template -struct ApplyExtent -{ - using type = typename ApplyExtent::type[N]; +struct ApplyExtent { + using type = + typename ApplyExtent::type[N]; }; -} // end namespace Impl +} // end namespace Impl -} // end namespace Kokkos +} // end namespace Kokkos -#endif //KOKKOS_KOKKOS_EXTENTS_HPP +#endif // KOKKOS_KOKKOS_EXTENTS_HPP diff --git a/lib/kokkos/core/src/Kokkos_Future.hpp b/lib/kokkos/core/src/Kokkos_Future.hpp index 665ce71cf5..15a5d39aad 100644 --- a/lib/kokkos/core/src/Kokkos_Future.hpp +++ b/lib/kokkos/core/src/Kokkos_Future.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -47,7 +48,7 @@ //---------------------------------------------------------------------------- #include -#if defined( KOKKOS_ENABLE_TASKDAG ) +#if defined(KOKKOS_ENABLE_TASKDAG) #include #include @@ -58,7 +59,7 @@ #include #include -#include // is_space +#include // is_space //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -66,202 +67,165 @@ namespace Kokkos { // For now, hack this in as a partial specialization -// TODO @tasking @cleanup Make this the "normal" class template and make the old code the specialization +// TODO @tasking @cleanup Make this the "normal" class template and make the old +// code the specialization template -class BasicFuture> -{ -public: - - using value_type = ValueType; +class BasicFuture> { + public: + using value_type = ValueType; using execution_space = ExecutionSpace; - using scheduler_type = SimpleTaskScheduler; - using queue_type = typename scheduler_type::task_queue_type; - - -private: + using scheduler_type = SimpleTaskScheduler; + using queue_type = typename scheduler_type::task_queue_type; + private: template friend class SimpleTaskScheduler; template friend class BasicFuture; - using task_base_type = typename scheduler_type::task_base_type; + using task_base_type = typename scheduler_type::task_base_type; using task_queue_type = typename scheduler_type::task_queue_type; using task_queue_traits = typename scheduler_type::task_queue_traits; - using task_scheduling_info_type = typename scheduler_type::task_scheduling_info_type; + using task_scheduling_info_type = + typename scheduler_type::task_scheduling_info_type; - using result_storage_type = - Impl::TaskResultStorage< + using result_storage_type = Impl::TaskResultStorage< ValueType, - Impl::SchedulingInfoStorage< - Impl::RunnableTaskBase, - task_scheduling_info_type - > - >; - - + Impl::SchedulingInfoStorage, + task_scheduling_info_type>>; OwningRawPtr m_task = nullptr; KOKKOS_INLINE_FUNCTION - explicit - BasicFuture(task_base_type* task) - : m_task(task) - { + explicit BasicFuture(task_base_type* task) : m_task(task) { // Note: reference count starts at 2 to account for initial increment - // TODO @tasking @minor DSH verify reference count here and/or encapsulate starting reference count closer to here + // TODO @tasking @minor DSH verify reference count here and/or encapsulate + // starting reference count closer to here } -public: + public: + KOKKOS_INLINE_FUNCTION + BasicFuture() noexcept : m_task(nullptr) {} KOKKOS_INLINE_FUNCTION - BasicFuture() noexcept : m_task(nullptr) { } - - KOKKOS_INLINE_FUNCTION - BasicFuture(BasicFuture&& rhs) noexcept - : m_task(std::move(rhs.m_task)) - { + BasicFuture(BasicFuture&& rhs) noexcept : m_task(std::move(rhs.m_task)) { rhs.m_task = nullptr; } KOKKOS_INLINE_FUNCTION BasicFuture(BasicFuture const& rhs) - // : m_task(rhs.m_task) - : m_task(nullptr) - { + // : m_task(rhs.m_task) + : m_task(nullptr) { *static_cast(&m_task) = rhs.m_task; - if(m_task) m_task->increment_reference_count(); + if (m_task) m_task->increment_reference_count(); } KOKKOS_INLINE_FUNCTION - BasicFuture& operator=(BasicFuture&& rhs) noexcept - { - if(m_task != rhs.m_task) { + BasicFuture& operator=(BasicFuture&& rhs) noexcept { + if (m_task != rhs.m_task) { clear(); - //m_task = std::move(rhs.m_task); + // m_task = std::move(rhs.m_task); *static_cast(&m_task) = rhs.m_task; // rhs.m_task reference count is unchanged, since this is a move - } - else { + } else { // They're the same, but this is a move, so 1 fewer references now rhs.clear(); } rhs.m_task = nullptr; - return *this ; + return *this; } KOKKOS_INLINE_FUNCTION - BasicFuture& operator=(BasicFuture const& rhs) - { - if(m_task != rhs.m_task) { + BasicFuture& operator=(BasicFuture const& rhs) { + if (m_task != rhs.m_task) { clear(); - //m_task = rhs.m_task; + // m_task = rhs.m_task; *static_cast(&m_task) = rhs.m_task; } - if(m_task != nullptr) { m_task->increment_reference_count(); } + if (m_task != nullptr) { + m_task->increment_reference_count(); + } return *this; } //---------------------------------------- template - KOKKOS_INLINE_FUNCTION - BasicFuture(BasicFuture&& rhs) noexcept // NOLINT(google-explicit-constructor) - : m_task(std::move(rhs.m_task)) - { - static_assert( - std::is_same::value || - std::is_same::value, - "Moved Futures must have the same scheduler" - ); + KOKKOS_INLINE_FUNCTION BasicFuture( + BasicFuture&& rhs) noexcept // NOLINT(google-explicit-constructor) + : m_task(std::move(rhs.m_task)) { + static_assert(std::is_same::value || + std::is_same::value, + "Moved Futures must have the same scheduler"); - static_assert( - std::is_same::value || - std::is_same::value, - "Moved Futures must have the same value_type" - ); + static_assert(std::is_same::value || + std::is_same::value, + "Moved Futures must have the same value_type"); // reference counts are unchanged, since this is a move rhs.m_task = nullptr; } template - KOKKOS_INLINE_FUNCTION - BasicFuture(BasicFuture const& rhs) // NOLINT(google-explicit-constructor) - //: m_task(rhs.m_task) - : m_task(nullptr) - { - static_assert( - std::is_same::value || - std::is_same::value, - "Copied Futures must have the same scheduler" - ); + KOKKOS_INLINE_FUNCTION BasicFuture( + BasicFuture const& rhs) // NOLINT(google-explicit-constructor) + //: m_task(rhs.m_task) + : m_task(nullptr) { + static_assert(std::is_same::value || + std::is_same::value, + "Copied Futures must have the same scheduler"); - static_assert( - std::is_same::value || - std::is_same::value, - "Copied Futures must have the same value_type" - ); + static_assert(std::is_same::value || + std::is_same::value, + "Copied Futures must have the same value_type"); *static_cast(&m_task) = rhs.m_task; - if(m_task) m_task->increment_reference_count(); + if (m_task) m_task->increment_reference_count(); } template - KOKKOS_INLINE_FUNCTION - BasicFuture& - operator=(BasicFuture const& rhs) - { - static_assert( - std::is_same::value || - std::is_same::value, - "Assigned Futures must have the same scheduler" - ); + KOKKOS_INLINE_FUNCTION BasicFuture& operator=(BasicFuture const& rhs) { + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same scheduler"); - static_assert( - std::is_same::value || - std::is_same::value, - "Assigned Futures must have the same value_type" - ); + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same value_type"); - if(m_task != rhs.m_task) { + if (m_task != rhs.m_task) { clear(); - //m_task = rhs.m_task; + // m_task = rhs.m_task; *static_cast(&m_task) = rhs.m_task; - if(m_task != nullptr) { m_task->increment_reference_count(); } + if (m_task != nullptr) { + m_task->increment_reference_count(); + } } return *this; } - template - KOKKOS_INLINE_FUNCTION - BasicFuture& operator=(BasicFuture&& rhs) - { - static_assert( - std::is_same::value || - std::is_same::value, - "Assigned Futures must have the same scheduler" - ); + template + KOKKOS_INLINE_FUNCTION BasicFuture& operator=(BasicFuture&& rhs) { + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same scheduler"); - static_assert( - std::is_same::value || - std::is_same::value, - "Assigned Futures must have the same value_type" - ); + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same value_type"); - if(m_task != rhs.m_task) { + if (m_task != rhs.m_task) { clear(); - //m_task = std::move(rhs.m_task); + // m_task = std::move(rhs.m_task); *static_cast(&m_task) = rhs.m_task; // rhs.m_task reference count is unchanged, since this is a move - } - else { + } else { // They're the same, but this is a move, so 1 fewer references now rhs.clear(); } rhs.m_task = nullptr; - return *this ; + return *this; } KOKKOS_INLINE_FUNCTION @@ -271,22 +235,19 @@ public: KOKKOS_INLINE_FUNCTION void clear() noexcept { - if(m_task) { + if (m_task) { bool should_delete = m_task->decrement_and_check_reference_count(); - if(should_delete) { + if (should_delete) { static_cast(m_task->ready_queue_base_ptr()) - ->deallocate(std::move(*m_task)); + ->deallocate(std::move(*m_task)); } } - //m_task = nullptr; + // m_task = nullptr; *static_cast(&m_task) = nullptr; } KOKKOS_INLINE_FUNCTION - bool is_null() const noexcept { - return m_task == nullptr; - } - + bool is_null() const noexcept { return m_task == nullptr; } KOKKOS_INLINE_FUNCTION bool is_ready() const noexcept { @@ -294,14 +255,11 @@ public: } KOKKOS_INLINE_FUNCTION - const typename Impl::TaskResult< ValueType >::reference_type - get() const - { + const typename Impl::TaskResult::reference_type get() const { KOKKOS_EXPECTS(is_ready()); return static_cast(m_task)->value_reference(); - //return Impl::TaskResult::get(m_task); + // return Impl::TaskResult::get(m_task); } - }; //////////////////////////////////////////////////////////////////////////////// @@ -310,57 +268,57 @@ public: template class BasicFuture { -private: - - template< typename , typename > friend class BasicTaskScheduler ; - template< typename , typename > friend class BasicFuture ; - friend class Impl::TaskBase ; - template< typename , typename , typename > friend class Impl::Task ; - + private: + template + friend class BasicTaskScheduler; + template + friend class BasicFuture; + friend class Impl::TaskBase; + template + friend class Impl::Task; //---------------------------------------- -public: - + public: //---------------------------------------- - using scheduler_type = Scheduler; - using queue_type = typename scheduler_type::queue_type; + using scheduler_type = Scheduler; + using queue_type = typename scheduler_type::queue_type; using execution_space = typename scheduler_type::execution_space; - using value_type = ValueType; + using value_type = ValueType; //---------------------------------------- -private: + private: + //---------------------------------------- + + using task_base = Impl::TaskBase; + + task_base* m_task; + + KOKKOS_INLINE_FUNCTION explicit BasicFuture(task_base* task) : m_task(0) { + if (task) queue_type::assign(&m_task, task); + } //---------------------------------------- - using task_base = Impl::TaskBase; - - task_base * m_task ; - - KOKKOS_INLINE_FUNCTION explicit - BasicFuture( task_base * task ) : m_task(0) - { if ( task ) queue_type::assign( & m_task , task ); } - + public: //---------------------------------------- -public: + KOKKOS_INLINE_FUNCTION + bool is_null() const { return 0 == m_task; } + + KOKKOS_INLINE_FUNCTION + int reference_count() const { + return 0 != m_task ? m_task->reference_count() : 0; + } //---------------------------------------- KOKKOS_INLINE_FUNCTION - bool is_null() const { return 0 == m_task ; } - - KOKKOS_INLINE_FUNCTION - int reference_count() const - { return 0 != m_task ? m_task->reference_count() : 0 ; } - - //---------------------------------------- - - KOKKOS_INLINE_FUNCTION - void clear() - { if ( m_task ) queue_type::assign( & m_task , (task_base*)0 ); } + void clear() { + if (m_task) queue_type::assign(&m_task, (task_base*)0); + } //---------------------------------------- @@ -370,141 +328,121 @@ public: //---------------------------------------- KOKKOS_INLINE_FUNCTION - BasicFuture() noexcept : m_task(nullptr) { } + BasicFuture() noexcept : m_task(nullptr) {} KOKKOS_INLINE_FUNCTION - BasicFuture( BasicFuture && rhs ) noexcept - : m_task( rhs.m_task ) - { + BasicFuture(BasicFuture&& rhs) noexcept : m_task(rhs.m_task) { rhs.m_task = 0; } KOKKOS_INLINE_FUNCTION - BasicFuture( const BasicFuture & rhs ) - : m_task(0) - { if ( rhs.m_task ) queue_type::assign( & m_task , rhs.m_task ); } - - KOKKOS_INLINE_FUNCTION - BasicFuture& operator=(BasicFuture&& rhs) noexcept - { - clear(); - m_task = rhs.m_task ; - rhs.m_task = 0 ; - return *this ; + BasicFuture(const BasicFuture& rhs) : m_task(0) { + if (rhs.m_task) queue_type::assign(&m_task, rhs.m_task); } KOKKOS_INLINE_FUNCTION - BasicFuture& operator=(BasicFuture const& rhs) - { - if ( m_task || rhs.m_task ) queue_type::assign( & m_task , rhs.m_task ); - return *this ; + BasicFuture& operator=(BasicFuture&& rhs) noexcept { + clear(); + m_task = rhs.m_task; + rhs.m_task = 0; + return *this; + } + + KOKKOS_INLINE_FUNCTION + BasicFuture& operator=(BasicFuture const& rhs) { + if (m_task || rhs.m_task) queue_type::assign(&m_task, rhs.m_task); + return *this; } //---------------------------------------- template - KOKKOS_INLINE_FUNCTION - BasicFuture(BasicFuture&& rhs) noexcept // NOLINT(google-explicit-constructor) - : m_task( rhs.m_task ) - { - static_assert - ( std::is_same::value || - std::is_same::value - , "Assigned Futures must have the same scheduler" ); + KOKKOS_INLINE_FUNCTION BasicFuture( + BasicFuture&& rhs) noexcept // NOLINT(google-explicit-constructor) + : m_task(rhs.m_task) { + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same scheduler"); - static_assert - ( std::is_same< value_type , void >::value || - std::is_same::value - , "Assigned Futures must have the same value_type" ); + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same value_type"); - rhs.m_task = 0 ; + rhs.m_task = 0; } template - KOKKOS_INLINE_FUNCTION - BasicFuture(BasicFuture const& rhs) // NOLINT(google-explicit-constructor) - : m_task(nullptr) - { - static_assert - ( std::is_same::value || - std::is_same::value - , "Assigned Futures must have the same scheduler" ); + KOKKOS_INLINE_FUNCTION BasicFuture( + BasicFuture const& rhs) // NOLINT(google-explicit-constructor) + : m_task(nullptr) { + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same scheduler"); - static_assert - ( std::is_same< value_type , void >::value || - std::is_same::value - , "Assigned Futures must have the same value_type" ); + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same value_type"); - if ( rhs.m_task ) queue_type::assign( & m_task , rhs.m_task ); + if (rhs.m_task) queue_type::assign(&m_task, rhs.m_task); } template - KOKKOS_INLINE_FUNCTION - BasicFuture& - operator=(BasicFuture const& rhs) - { - static_assert - ( std::is_same::value || - std::is_same::value - , "Assigned Futures must have the same scheduler" ); + KOKKOS_INLINE_FUNCTION BasicFuture& operator=(BasicFuture const& rhs) { + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same scheduler"); - static_assert - ( std::is_same< value_type , void >::value || - std::is_same::value - , "Assigned Futures must have the same value_type" ); + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same value_type"); - if ( m_task || rhs.m_task ) queue_type::assign( & m_task , rhs.m_task ); - return *this ; + if (m_task || rhs.m_task) queue_type::assign(&m_task, rhs.m_task); + return *this; } - template - KOKKOS_INLINE_FUNCTION - BasicFuture& operator=(BasicFuture&& rhs) - { - static_assert - ( std::is_same::value || - std::is_same::value - , "Assigned Futures must have the same scheduler" ); + template + KOKKOS_INLINE_FUNCTION BasicFuture& operator=(BasicFuture&& rhs) { + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same scheduler"); - static_assert - ( std::is_same< value_type , void >::value || - std::is_same::value - , "Assigned Futures must have the same value_type" ); + static_assert(std::is_same::value || + std::is_same::value, + "Assigned Futures must have the same value_type"); clear(); - m_task = rhs.m_task ; - rhs.m_task = 0 ; - return *this ; + m_task = rhs.m_task; + rhs.m_task = 0; + return *this; } //---------------------------------------- KOKKOS_INLINE_FUNCTION - int is_ready() const noexcept - { return ( 0 == m_task ) || ( ((task_base*) task_base::LockTag) == m_task->m_wait ); } + int is_ready() const noexcept { + return (0 == m_task) || + (((task_base*)task_base::LockTag) == m_task->m_wait); + } KOKKOS_INLINE_FUNCTION - const typename Impl::TaskResult< ValueType >::reference_type - get() const - { - if ( 0 == m_task ) { - Kokkos::abort( "Kokkos:::Future::get ERROR: is_null()"); + const typename Impl::TaskResult::reference_type get() const { + if (0 == m_task) { + Kokkos::abort("Kokkos:::Future::get ERROR: is_null()"); } - return Impl::TaskResult< ValueType >::get( m_task ); + return Impl::TaskResult::get(m_task); } }; // Is a Future with the given execution space -template< typename , typename ExecSpace = void > +template struct is_future : public std::false_type {}; -template +template struct is_future, ExecSpace> - : std::integral_constant::value - || std::is_void::value - > -{}; + : std::integral_constant< + bool, + std::is_same::value || + std::is_void::value> {}; //////////////////////////////////////////////////////////////////////////////// // END OLD CODE @@ -514,39 +452,32 @@ namespace Impl { template class ResolveFutureArgOrder { -private: + private: enum { Arg1_is_space = Kokkos::is_space::value }; enum { Arg2_is_space = Kokkos::is_space::value }; enum { Arg1_is_value = !Arg1_is_space && !std::is_same::value }; enum { Arg2_is_value = !Arg2_is_space && !std::is_same::value }; - static_assert( - ! ( Arg1_is_space && Arg2_is_space ), - "Future cannot be given two spaces" - ); + static_assert(!(Arg1_is_space && Arg2_is_space), + "Future cannot be given two spaces"); - static_assert( - ! ( Arg1_is_value && Arg2_is_value ), - "Future cannot be given two value types" - ); + static_assert(!(Arg1_is_value && Arg2_is_value), + "Future cannot be given two value types"); - using value_type = - typename std::conditional::type - >::type; + using value_type = typename std::conditional< + Arg1_is_value, Arg1, + typename std::conditional::type>::type; - using execution_space = - typename std::conditional::type - >::type::execution_space; - -public: + using execution_space = typename std::conditional< + Arg1_is_space, Arg1, + typename std::conditional::type>::type::execution_space; + public: using type = BasicFuture>; - }; -} // end namespace Impl +} // end namespace Impl /** * @@ -558,7 +489,7 @@ public: template using Future = typename Impl::ResolveFutureArgOrder::type; -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- diff --git a/lib/kokkos/core/src/Kokkos_HBWSpace.hpp b/lib/kokkos/core/src/Kokkos_HBWSpace.hpp index aaac7cd7f9..357dcc9014 100644 --- a/lib/kokkos/core/src/Kokkos_HBWSpace.hpp +++ b/lib/kokkos/core/src/Kokkos_HBWSpace.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -63,26 +64,26 @@ namespace Impl { /// This function initializes the locks to zero (unset). void init_lock_array_hbw_space(); -/// \brief Acquire a lock for the address +/// \brief Aquire a lock for the address /// -/// This function tries to acquire the lock for the hash value derived -/// from the provided ptr. If the lock is successfully acquired the +/// This function tries to aquire the lock for the hash value derived +/// from the provided ptr. If the lock is successfully aquired the /// function returns true. Otherwise it returns false. -bool lock_address_hbw_space( void* ptr ); +bool lock_address_hbw_space(void* ptr); /// \brief Release lock for the address /// /// This function releases the lock for the hash value derived /// from the provided ptr. This function should only be called -/// after previously successfully acquiring a lock with +/// after previously successfully aquiring a lock with /// lock_address. -void unlock_address_hbw_space( void* ptr ); +void unlock_address_hbw_space(void* ptr); -} // namespace Impl +} // namespace Impl -} // namespace Experimental +} // namespace Experimental -} // namespace Kokkos +} // namespace Kokkos namespace Kokkos { @@ -94,10 +95,10 @@ namespace Experimental { /// HBWSpace is a memory space that governs host memory. "Host" /// memory means the usual CPU-accessible memory. class HBWSpace { -public: + public: //! Tag this class as a kokkos memory space - typedef HBWSpace memory_space; - typedef size_t size_type; + typedef HBWSpace memory_space; + typedef size_t size_type; /// \typedef execution_space /// \brief Default execution space for this memory space. @@ -105,59 +106,64 @@ public: /// Every memory space has a default execution space. This is /// useful for things like initializing a View (which happens in /// parallel using the View's default execution space). -#if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) - typedef Kokkos::OpenMP execution_space; -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) - typedef Kokkos::Threads execution_space; +#if defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP) + typedef Kokkos::OpenMP execution_space; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS) + typedef Kokkos::Threads execution_space; //#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) // typedef Kokkos::Qthreads execution_space; -#elif defined( KOKKOS_ENABLE_OPENMP ) - typedef Kokkos::OpenMP execution_space; -#elif defined( KOKKOS_ENABLE_THREADS ) - typedef Kokkos::Threads execution_space; +#elif defined(KOKKOS_ENABLE_OPENMP) + typedef Kokkos::OpenMP execution_space; +#elif defined(KOKKOS_ENABLE_THREADS) + typedef Kokkos::Threads execution_space; //#elif defined( KOKKOS_ENABLE_QTHREADS ) // typedef Kokkos::Qthreads execution_space; -#elif defined( KOKKOS_ENABLE_SERIAL ) - typedef Kokkos::Serial execution_space; +#elif defined(KOKKOS_ENABLE_SERIAL) + typedef Kokkos::Serial execution_space; #else -# error "At least one of the following host execution spaces must be defined: Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qhreads, or Kokkos::Serial. You might be seeing this message if you disabled the Kokkos::Serial device explicitly using the Kokkos_ENABLE_Serial:BOOL=OFF CMake option, but did not enable any of the other host execution space devices." +#error \ + "At least one of the following host execution spaces must be defined: Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qhreads, or Kokkos::Serial. You might be seeing this message if you disabled the Kokkos::Serial device explicitly using the Kokkos_ENABLE_Serial:BOOL=OFF CMake option, but did not enable any of the other host execution space devices." #endif //! This memory space preferred device_type - typedef Kokkos::Device< execution_space, memory_space > device_type; + typedef Kokkos::Device device_type; /**\brief Default memory space instance */ HBWSpace(); - HBWSpace( const HBWSpace & rhs ) = default; - HBWSpace & operator = ( const HBWSpace & ) = default; - ~HBWSpace() = default; + HBWSpace(const HBWSpace& rhs) = default; + HBWSpace& operator=(const HBWSpace&) = default; + ~HBWSpace() = default; - /**\brief Non-default memory space instance to choose allocation mechansim, if available */ + /**\brief Non-default memory space instance to choose allocation mechansim, + * if available */ - enum AllocationMechanism { STD_MALLOC, POSIX_MEMALIGN, POSIX_MMAP, INTEL_MM_ALLOC }; + enum AllocationMechanism { + STD_MALLOC, + POSIX_MEMALIGN, + POSIX_MMAP, + INTEL_MM_ALLOC + }; - explicit - HBWSpace( const AllocationMechanism & ); + explicit HBWSpace(const AllocationMechanism&); /**\brief Allocate untracked memory in the space */ - void * allocate( const size_t arg_alloc_size ) const; + void* allocate(const size_t arg_alloc_size) const; /**\brief Deallocate untracked memory in the space */ - void deallocate( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) const; + void deallocate(void* const arg_alloc_ptr, const size_t arg_alloc_size) const; /**\brief Return Name of the MemorySpace */ static constexpr const char* name() { return "HBW"; } -private: - - AllocationMechanism m_alloc_mech; - friend class Kokkos::Impl::SharedAllocationRecord< Kokkos::Experimental::HBWSpace, void >; + private: + AllocationMechanism m_alloc_mech; + friend class Kokkos::Impl::SharedAllocationRecord< + Kokkos::Experimental::HBWSpace, void>; }; -} // namespace Experimental +} // namespace Experimental -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- @@ -165,20 +171,18 @@ namespace Kokkos { namespace Impl { -template<> -class SharedAllocationRecord< Kokkos::Experimental::HBWSpace, void > - : public SharedAllocationRecord< void, void > -{ -private: - +template <> +class SharedAllocationRecord + : public SharedAllocationRecord { + private: friend Kokkos::Experimental::HBWSpace; - typedef SharedAllocationRecord< void, void > RecordBase; + typedef SharedAllocationRecord RecordBase; - SharedAllocationRecord( const SharedAllocationRecord & ) = delete; - SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete; + SharedAllocationRecord(const SharedAllocationRecord&) = delete; + SharedAllocationRecord& operator=(const SharedAllocationRecord&) = delete; - static void deallocate( RecordBase * ); + static void deallocate(RecordBase*); #ifdef KOKKOS_DEBUG /**\brief Root record for tracked allocations from this HBWSpace instance */ @@ -187,61 +191,52 @@ private: const Kokkos::Experimental::HBWSpace m_space; -protected: - + protected: ~SharedAllocationRecord(); SharedAllocationRecord() = default; - SharedAllocationRecord( const Kokkos::Experimental::HBWSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const RecordBase::function_type arg_dealloc = & deallocate - ); + SharedAllocationRecord( + const Kokkos::Experimental::HBWSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size, + const RecordBase::function_type arg_dealloc = &deallocate); -public: + public: + inline std::string get_label() const { + return std::string(RecordBase::head()->m_label); + } - inline - std::string get_label() const - { - return std::string( RecordBase::head()->m_label ); - } - - KOKKOS_INLINE_FUNCTION static - SharedAllocationRecord * allocate( const Kokkos::Experimental::HBWSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - ) - { -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - return new SharedAllocationRecord( arg_space, arg_label, arg_alloc_size ); + KOKKOS_INLINE_FUNCTION static SharedAllocationRecord* allocate( + const Kokkos::Experimental::HBWSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size) { +#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST) + return new SharedAllocationRecord(arg_space, arg_label, arg_alloc_size); #else - return (SharedAllocationRecord *) 0; + return (SharedAllocationRecord*)0; #endif - } + } /**\brief Allocate tracked memory in the space */ - static - void * allocate_tracked( const Kokkos::Experimental::HBWSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + static void* allocate_tracked(const Kokkos::Experimental::HBWSpace& arg_space, + const std::string& arg_label, + const size_t arg_alloc_size); /**\brief Reallocate tracked memory in the space */ - static - void * reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ); + static void* reallocate_tracked(void* const arg_alloc_ptr, + const size_t arg_alloc_size); /**\brief Deallocate tracked memory in the space */ - static - void deallocate_tracked( void * const arg_alloc_ptr ); + static void deallocate_tracked(void* const arg_alloc_ptr); - static SharedAllocationRecord * get_record( void * arg_alloc_ptr ); + static SharedAllocationRecord* get_record(void* arg_alloc_ptr); - static void print_records( std::ostream &, const Kokkos::Experimental::HBWSpace &, bool detail = false ); + static void print_records(std::ostream&, + const Kokkos::Experimental::HBWSpace&, + bool detail = false); }; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- @@ -249,25 +244,28 @@ namespace Kokkos { namespace Impl { -static_assert( Kokkos::Impl::MemorySpaceAccess< Kokkos::Experimental::HBWSpace, Kokkos::Experimental::HBWSpace >::assignable, "" ); +static_assert( + Kokkos::Impl::MemorySpaceAccess::assignable, + ""); -template<> -struct MemorySpaceAccess< Kokkos::HostSpace, Kokkos::Experimental::HBWSpace > { +template <> +struct MemorySpaceAccess { enum { assignable = true }; enum { accessible = true }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::Experimental::HBWSpace, Kokkos::HostSpace > { +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = true }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- @@ -275,70 +273,64 @@ namespace Kokkos { namespace Impl { -template< class ExecutionSpace > -struct DeepCopy< Experimental::HBWSpace, Experimental::HBWSpace, ExecutionSpace > { - DeepCopy( void * dst, const void * src, size_t n ) { - memcpy( dst, src, n ); - } +template +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t n) { memcpy(dst, src, n); } - DeepCopy( const ExecutionSpace& exec, void * dst, const void * src, size_t n ) { + DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, size_t n) { exec.fence(); - memcpy( dst, src, n ); + memcpy(dst, src, n); } }; -template< class ExecutionSpace > -struct DeepCopy< HostSpace, Experimental::HBWSpace, ExecutionSpace > { - DeepCopy( void * dst, const void * src, size_t n ) { - memcpy( dst, src, n ); - } +template +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t n) { memcpy(dst, src, n); } - DeepCopy( const ExecutionSpace& exec, void * dst, const void * src, size_t n ) { + DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, size_t n) { exec.fence(); - memcpy( dst, src, n ); + memcpy(dst, src, n); } }; -template< class ExecutionSpace > -struct DeepCopy< Experimental::HBWSpace, HostSpace, ExecutionSpace > { - DeepCopy( void * dst, const void * src, size_t n ) { - memcpy( dst, src, n ); - } +template +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t n) { memcpy(dst, src, n); } - DeepCopy( const ExecutionSpace& exec, void * dst, const void * src, size_t n ) { + DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, size_t n) { exec.fence(); - memcpy( dst, src, n ); + memcpy(dst, src, n); } }; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos namespace Kokkos { namespace Impl { -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace, Kokkos::Experimental::HBWSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = true }; - inline static void verify( void ) { } - inline static void verify( const void * ) { } + inline static void verify(void) {} + inline static void verify(const void*) {} }; -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::Experimental::HBWSpace, Kokkos::HostSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = true }; - inline static void verify( void ) { } - inline static void verify( const void * ) { } + inline static void verify(void) {} + inline static void verify(const void*) {} }; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos #endif -#endif // #define KOKKOS_HBWSPACE_HPP - +#endif // #define KOKKOS_HBWSPACE_HPP diff --git a/lib/kokkos/core/src/Kokkos_HPX.hpp b/lib/kokkos/core/src/Kokkos_HPX.hpp index 79a2b74da4..46101c824f 100644 --- a/lib/kokkos/core/src/Kokkos_HPX.hpp +++ b/lib/kokkos/core/src/Kokkos_HPX.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -57,6 +58,7 @@ #include #endif +#include #include #include #include @@ -74,7 +76,7 @@ #include #include #include -#include +#include #include #include #include @@ -97,6 +99,7 @@ // - 1: The manual way. This way is more verbose and does not take advantage of // e.g. parallel::for_loop in HPX but it is significantly faster in many // benchmarks. +// - 2: Like 1, but spawn tasks using for_loop and a custom executor. // // In the long run 0 should be the preferred implementation, but until HPX is // improved 1 will be the default. @@ -104,7 +107,7 @@ #define KOKKOS_HPX_IMPLEMENTATION 1 #endif -#if (KOKKOS_HPX_IMPLEMENTATION < 0) || (KOKKOS_HPX_IMPLEMENTATION > 1) +#if (KOKKOS_HPX_IMPLEMENTATION < 0) || (KOKKOS_HPX_IMPLEMENTATION > 2) #error "You have chosen an invalid value for KOKKOS_HPX_IMPLEMENTATION" #endif @@ -123,9 +126,11 @@ class thread_buffer { m_cache_line_size; } -public: + public: thread_buffer() - : m_num_threads(0), m_size_per_thread(0), m_size_total(0), + : m_num_threads(0), + m_size_per_thread(0), + m_size_total(0), m_data(nullptr) {} thread_buffer(const std::size_t num_threads, const std::size_t size_per_thread) { @@ -134,13 +139,13 @@ public: ~thread_buffer() { delete[] m_data; } thread_buffer(const thread_buffer &) = delete; - thread_buffer(thread_buffer &&) = delete; + thread_buffer(thread_buffer &&) = delete; thread_buffer &operator=(const thread_buffer &) = delete; thread_buffer &operator=(thread_buffer) = delete; void resize(const std::size_t num_threads, const std::size_t size_per_thread) { - m_num_threads = num_threads; + m_num_threads = num_threads; m_size_per_thread = size_per_thread; pad_to_cache_line(m_size_per_thread); @@ -149,7 +154,7 @@ public: if (m_size_total < size_total_new) { delete[] m_data; - m_data = new char[size_total_new]; + m_data = new char[size_total_new]; m_size_total = size_total_new; } } @@ -165,23 +170,23 @@ public: std::size_t size_per_thread() const noexcept { return m_size_per_thread; } std::size_t size_total() const noexcept { return m_size_total; } }; -} // namespace Impl +} // namespace Impl namespace Experimental { class HPX { -private: + private: static bool m_hpx_initialized; static Kokkos::Impl::thread_buffer m_buffer; #if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH) static hpx::future m_future; #endif -public: - using execution_space = HPX; - using memory_space = HostSpace; - using device_type = Kokkos::Device; - using array_layout = LayoutRight; - using size_type = memory_space::size_type; + public: + using execution_space = HPX; + using memory_space = HostSpace; + using device_type = Kokkos::Device; + using array_layout = LayoutRight; + using size_type = memory_space::size_type; using scratch_memory_space = ScratchMemorySpace; HPX() noexcept {} @@ -192,26 +197,20 @@ public: static bool in_parallel(HPX const & = HPX()) noexcept { return false; } static void impl_static_fence(HPX const & = HPX()) - #if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH) - { - if (hpx::threads::get_self_ptr() == nullptr) { - hpx::threads::run_as_hpx_thread([]() { impl_get_future().wait(); }); - } else { - impl_get_future().wait(); - } +#if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH) + { + if (hpx::threads::get_self_ptr() == nullptr) { + hpx::threads::run_as_hpx_thread([]() { impl_get_future().wait(); }); + } else { + impl_get_future().wait(); } - #else - noexcept { - } - #endif - - #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - static void fence(HPX const & = HPX()) { - #else - void fence() const { - #endif - impl_static_fence(); } +#else + noexcept { + } +#endif + + void fence() const { impl_static_fence(); } static bool is_asynchronous(HPX const & = HPX()) noexcept { #if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH) @@ -222,8 +221,9 @@ public: } static std::vector partition(...) { - Kokkos::abort("Kokkos::Experimental::HPX::partition_master: can't partition an HPX " - "instance\n"); + Kokkos::abort( + "Kokkos::Experimental::HPX::partition_master: can't partition an HPX " + "instance\n"); return std::vector(); } @@ -231,8 +231,9 @@ public: static void partition_master(F const &f, int requested_num_partitions = 0, int requested_partition_size = 0) { if (requested_num_partitions > 1) { - Kokkos::abort("Kokkos::Experimental::HPX::partition_master: can't partition an " - "HPX instance\n"); + Kokkos::abort( + "Kokkos::Experimental::HPX::partition_master: can't partition an " + "HPX instance\n"); } } @@ -287,13 +288,14 @@ public: static Kokkos::Impl::thread_buffer &impl_get_buffer() noexcept { return m_buffer; } + #if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH) static hpx::future &impl_get_future() noexcept { return m_future; } #endif static constexpr const char *name() noexcept { return "HPX"; } }; -} // namespace Experimental +} // namespace Experimental namespace Impl { template @@ -302,15 +304,15 @@ inline void dispatch_execute_task(Closure *closure) { if (hpx::threads::get_self_ptr() == nullptr) { hpx::threads::run_as_hpx_thread([closure]() { hpx::future &fut = Kokkos::Experimental::HPX::impl_get_future(); - Closure closure_copy = *closure; - fut = fut.then([closure_copy](hpx::future &&) { + Closure closure_copy = *closure; + fut = fut.then([closure_copy](hpx::future &&) { closure_copy.execute_task(); }); }); } else { hpx::future &fut = Kokkos::Experimental::HPX::impl_get_future(); - Closure closure_copy = *closure; - fut = fut.then( + Closure closure_copy = *closure; + fut = fut.then( [closure_copy](hpx::future &&) { closure_copy.execute_task(); }); } #else @@ -321,8 +323,8 @@ inline void dispatch_execute_task(Closure *closure) { } #endif } -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos namespace Kokkos { namespace Impl { @@ -342,15 +344,16 @@ struct VerifyExecutionCanAccessMemorySpace< inline static void verify(void) {} inline static void verify(const void *) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos namespace Kokkos { namespace Experimental { -template <> class UniqueToken { -public: +template <> +class UniqueToken { + public: using execution_space = HPX; - using size_type = int; + using size_type = int; UniqueToken(execution_space const & = execution_space()) noexcept {} // NOTE: Currently this assumes that there is no oversubscription. @@ -361,10 +364,11 @@ public: void release(int) const noexcept {} }; -template <> class UniqueToken { -public: +template <> +class UniqueToken { + public: using execution_space = HPX; - using size_type = int; + using size_type = int; UniqueToken(execution_space const & = execution_space()) noexcept {} // NOTE: Currently this assumes that there is no oversubscription. @@ -374,28 +378,27 @@ public: int acquire() const noexcept { return HPX::impl_hardware_thread_id(); } void release(int) const noexcept {} }; -} // namespace Experimental -} // namespace Kokkos +} // namespace Experimental +} // namespace Kokkos namespace Kokkos { namespace Impl { struct HPXTeamMember { -public: + public: using execution_space = Kokkos::Experimental::HPX; using scratch_memory_space = Kokkos::ScratchMemorySpace; -private: + private: scratch_memory_space m_team_shared; - std::size_t m_team_shared_size; int m_league_size; int m_league_rank; int m_team_size; int m_team_rank; -public: + public: KOKKOS_INLINE_FUNCTION const scratch_memory_space &team_shmem() const { return m_team_shared.set_team_thread_mode(0, 1, 0); @@ -423,14 +426,15 @@ public: KOKKOS_INLINE_FUNCTION int team_size() const noexcept { return m_team_size; } template - constexpr KOKKOS_INLINE_FUNCTION - HPXTeamMember(const TeamPolicyInternal &policy, - const int team_rank, const int league_rank, void *scratch, - int scratch_size) noexcept + constexpr KOKKOS_INLINE_FUNCTION HPXTeamMember( + const TeamPolicyInternal + &policy, + const int team_rank, const int league_rank, void *scratch, + int scratch_size) noexcept : m_team_shared(scratch, scratch_size, scratch, scratch_size), - m_team_shared_size(scratch_size), m_league_size(policy.league_size()), - m_league_rank(league_rank), m_team_size(policy.team_size()), + m_league_size(policy.league_size()), + m_league_rank(league_rank), + m_team_size(policy.team_size()), m_team_rank(team_rank) {} KOKKOS_INLINE_FUNCTION @@ -482,7 +486,7 @@ class TeamPolicyInternal std::size_t m_thread_scratch_size[2]; int m_chunk_size; -public: + public: using member_type = HPXTeamMember; // NOTE: Max size is 1 for simplicity. In most cases more than 1 is not @@ -511,21 +515,35 @@ public: int team_size_max(const FunctorType &, const ParallelReduceTag &) const { return 1; } + + template + int team_size_max(const FunctorType &, const ReducerType &, + const ParallelReduceTag &) const { + return 1; + } + template int team_size_recommended(const FunctorType &, const ParallelForTag &) const { return 1; } + template int team_size_recommended(const FunctorType &, const ParallelReduceTag &) const { return 1; } -private: + template + int team_size_recommended(const FunctorType &, const ReducerType &, + const ParallelReduceTag &) const { + return 1; + } + + private: inline void init(const int league_size_request, const int team_size_request) { - m_league_size = league_size_request; - const int max_team_size = 1; // TODO: Can't use team_size_max(...) because - // it requires a functor as argument. + m_league_size = league_size_request; + const int max_team_size = 1; // TODO: Can't use team_size_max(...) because + // it requires a functor as argument. m_team_size = team_size_request > max_team_size ? max_team_size : team_size_request; @@ -551,7 +569,7 @@ private: } } -public: + public: inline int team_size() const { return m_team_size; } inline int league_size() const { return m_league_size; } @@ -563,26 +581,32 @@ public: team_size_ * m_thread_scratch_size[level]; } -public: + inline static int scratch_size_max(int level) { + return (level == 0 ? 1024 * 32 : // Roughly L1 size + 20 * 1024 * 1024); // Limit to keep compatibility with CUDA + } + + public: template friend class TeamPolicyInternal; template - TeamPolicyInternal( - const TeamPolicyInternal &p) { - m_league_size = p.m_league_size; - m_team_size = p.m_team_size; - m_team_scratch_size[0] = p.m_team_scratch_size[0]; + TeamPolicyInternal(const TeamPolicyInternal &p) { + m_league_size = p.m_league_size; + m_team_size = p.m_team_size; + m_team_scratch_size[0] = p.m_team_scratch_size[0]; m_thread_scratch_size[0] = p.m_thread_scratch_size[0]; - m_team_scratch_size[1] = p.m_team_scratch_size[1]; + m_team_scratch_size[1] = p.m_team_scratch_size[1]; m_thread_scratch_size[1] = p.m_thread_scratch_size[1]; - m_chunk_size = p.m_chunk_size; + m_chunk_size = p.m_chunk_size; } TeamPolicyInternal(const typename traits::execution_space &, int league_size_request, int team_size_request, int /* vector_length_request */ = 1) - : m_team_scratch_size{0, 0}, m_thread_scratch_size{0, 0}, + : m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, m_chunk_size(0) { init(league_size_request, team_size_request); } @@ -591,14 +615,16 @@ public: int league_size_request, const Kokkos::AUTO_t &team_size_request, int /* vector_length_request */ = 1) - : m_team_scratch_size{0, 0}, m_thread_scratch_size{0, 0}, + : m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, m_chunk_size(0) { init(league_size_request, 1); } TeamPolicyInternal(int league_size_request, int team_size_request, int /* vector_length_request */ = 1) - : m_team_scratch_size{0, 0}, m_thread_scratch_size{0, 0}, + : m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, m_chunk_size(0) { init(league_size_request, team_size_request); } @@ -606,15 +632,16 @@ public: TeamPolicyInternal(int league_size_request, const Kokkos::AUTO_t &team_size_request, int /* vector_length_request */ = 1) - : m_team_scratch_size{0, 0}, m_thread_scratch_size{0, 0}, + : m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, m_chunk_size(0) { init(league_size_request, 1); } inline int chunk_size() const { return m_chunk_size; } - inline TeamPolicyInternal & - set_chunk_size(typename traits::index_type chunk_size_) { + inline TeamPolicyInternal &set_chunk_size( + typename traits::index_type chunk_size_) { m_chunk_size = chunk_size_; return *this; } @@ -625,22 +652,22 @@ public: return *this; } - inline TeamPolicyInternal & - set_scratch_size(const int &level, const PerThreadValue &per_thread) { + inline TeamPolicyInternal &set_scratch_size( + const int &level, const PerThreadValue &per_thread) { m_thread_scratch_size[level] = per_thread.value; return *this; } - inline TeamPolicyInternal & - set_scratch_size(const int &level, const PerTeamValue &per_team, - const PerThreadValue &per_thread) { - m_team_scratch_size[level] = per_team.value; + inline TeamPolicyInternal &set_scratch_size( + const int &level, const PerTeamValue &per_team, + const PerThreadValue &per_thread) { + m_team_scratch_size[level] = per_team.value; m_thread_scratch_size[level] = per_thread.value; return *this; } }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos namespace Kokkos { namespace Impl { @@ -648,11 +675,11 @@ namespace Impl { template class ParallelFor, Kokkos::Experimental::HPX> { -private: - using Policy = Kokkos::RangePolicy; - using WorkTag = typename Policy::work_tag; + private: + using Policy = Kokkos::RangePolicy; + using WorkTag = typename Policy::work_tag; using WorkRange = typename Policy::WorkRange; - using Member = typename Policy::member_type; + using Member = typename Policy::member_type; const FunctorType m_functor; const Policy m_policy; @@ -689,7 +716,7 @@ private: } } -public: + public: void execute() const { Kokkos::Impl::dispatch_execute_task(this); } void execute_task() const { @@ -705,25 +732,44 @@ public: #elif KOKKOS_HPX_IMPLEMENTATION == 1 using hpx::apply; - using hpx::lcos::local::counting_semaphore; + using hpx::lcos::local::latch; - counting_semaphore sem(0); - std::size_t num_tasks = 0; + const int num_tasks = + (m_policy.end() - m_policy.begin() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + latch num_tasks_remaining(num_tasks); + ChunkedRoundRobinExecutor exec(num_tasks); for (Member i_begin = m_policy.begin(); i_begin < m_policy.end(); i_begin += m_policy.chunk_size()) { - apply([this, &sem, i_begin]() { + apply(exec, [this, &num_tasks_remaining, i_begin]() { const Member i_end = (std::min)(i_begin + m_policy.chunk_size(), m_policy.end()); execute_functor_range(m_functor, i_begin, i_end); - sem.signal(1); + num_tasks_remaining.count_down(1); }); - - ++num_tasks; } - sem.wait(num_tasks); + num_tasks_remaining.wait(); + +#elif KOKKOS_HPX_IMPLEMENTATION == 2 + using hpx::parallel::for_loop_strided; + using hpx::parallel::execution::par; + using hpx::parallel::execution::static_chunk_size; + + const int num_tasks = + (m_policy.end() - m_policy.begin() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + ChunkedRoundRobinExecutor exec(num_tasks); + + for_loop_strided( + par.on(exec).with(static_chunk_size(1)), m_policy.begin(), + m_policy.end(), m_policy.chunk_size(), [this](const Member i_begin) { + const Member i_end = + (std::min)(i_begin + m_policy.chunk_size(), m_policy.end()); + execute_functor_range(m_functor, i_begin, i_end); + }); #endif } @@ -734,12 +780,12 @@ public: template class ParallelFor, Kokkos::Experimental::HPX> { -private: + private: using MDRangePolicy = Kokkos::MDRangePolicy; - using Policy = typename MDRangePolicy::impl_range_policy; - using WorkTag = typename MDRangePolicy::work_tag; - using WorkRange = typename Policy::WorkRange; - using Member = typename Policy::member_type; + using Policy = typename MDRangePolicy::impl_range_policy; + using WorkTag = typename MDRangePolicy::work_tag; + using WorkRange = typename Policy::WorkRange; + using Member = typename Policy::member_type; using iterate_type = typename Kokkos::Impl::HostIterateTile; @@ -748,7 +794,7 @@ private: const MDRangePolicy m_mdr_policy; const Policy m_policy; -public: + public: void execute() const { dispatch_execute_task(this); } inline void execute_task() const { @@ -764,47 +810,69 @@ public: #elif KOKKOS_HPX_IMPLEMENTATION == 1 using hpx::apply; - using hpx::lcos::local::counting_semaphore; + using hpx::lcos::local::latch; - counting_semaphore sem(0); - std::size_t num_tasks = 0; + const int num_tasks = + (m_policy.end() - m_policy.begin() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + latch num_tasks_remaining(num_tasks); + ChunkedRoundRobinExecutor exec(num_tasks); for (Member i_begin = m_policy.begin(); i_begin < m_policy.end(); i_begin += m_policy.chunk_size()) { - apply([this, &sem, i_begin]() { + apply(exec, [this, &num_tasks_remaining, i_begin]() { const Member i_end = (std::min)(i_begin + m_policy.chunk_size(), m_policy.end()); for (Member i = i_begin; i < i_end; ++i) { iterate_type(m_mdr_policy, m_functor)(i); } - sem.signal(1); + num_tasks_remaining.count_down(1); }); - - ++num_tasks; } - sem.wait(num_tasks); + num_tasks_remaining.wait(); + +#elif KOKKOS_HPX_IMPLEMENTATION == 2 + using hpx::parallel::for_loop_strided; + using hpx::parallel::execution::par; + using hpx::parallel::execution::static_chunk_size; + + const int num_tasks = + (m_policy.end() - m_policy.begin() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + ChunkedRoundRobinExecutor exec(num_tasks); + + for_loop_strided( + par.on(exec).with(static_chunk_size(1)), m_policy.begin(), + m_policy.end(), m_policy.chunk_size(), [this](const Member i_begin) { + const Member i_end = + (std::min)(i_begin + m_policy.chunk_size(), m_policy.end()); + for (Member i = i_begin; i < i_end; ++i) { + iterate_type(m_mdr_policy, m_functor)(i); + } + }); #endif } inline ParallelFor(const FunctorType &arg_functor, MDRangePolicy arg_policy) - : m_functor(arg_functor), m_mdr_policy(arg_policy), + : m_functor(arg_functor), + m_mdr_policy(arg_policy), m_policy(Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1)) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos namespace Kokkos { namespace Impl { template class ParallelReduce, ReducerType, Kokkos::Experimental::HPX> { -private: - using Policy = Kokkos::RangePolicy; - using WorkTag = typename Policy::work_tag; + private: + using Policy = Kokkos::RangePolicy; + using WorkTag = typename Policy::work_tag; using WorkRange = typename Policy::WorkRange; - using Member = typename Policy::member_type; + using Member = typename Policy::member_type; using Analysis = FunctorAnalysis; using ReducerConditional = @@ -814,11 +882,11 @@ private: using WorkTagFwd = typename Kokkos::Impl::if_c::value, WorkTag, void>::type; - using ValueInit = Kokkos::Impl::FunctorValueInit; - using ValueJoin = Kokkos::Impl::FunctorValueJoin; - using ValueOps = Kokkos::Impl::FunctorValueOps; + using ValueInit = Kokkos::Impl::FunctorValueInit; + using ValueJoin = Kokkos::Impl::FunctorValueJoin; + using ValueOps = Kokkos::Impl::FunctorValueOps; using value_type = typename Analysis::value_type; - using pointer_type = typename Analysis::pointer_type; + using pointer_type = typename Analysis::pointer_type; using reference_type = typename Analysis::reference_type; const FunctorType m_functor; @@ -866,11 +934,11 @@ private: } class value_type_wrapper { - private: + private: std::size_t m_value_size; char *m_value_buffer; - public: + public: value_type_wrapper() : m_value_size(0), m_value_buffer(nullptr) {} value_type_wrapper(const std::size_t value_size) @@ -880,7 +948,7 @@ private: : m_value_size(0), m_value_buffer(nullptr) { if (this != &other) { m_value_buffer = new char[other.m_value_size]; - m_value_size = other.m_value_size; + m_value_size = other.m_value_size; std::copy(other.m_value_buffer, other.m_value_buffer + m_value_size, m_value_buffer); @@ -893,10 +961,10 @@ private: : m_value_size(0), m_value_buffer(nullptr) { if (this != &other) { m_value_buffer = other.m_value_buffer; - m_value_size = other.m_value_size; + m_value_size = other.m_value_size; other.m_value_buffer = nullptr; - other.m_value_size = 0; + other.m_value_size = 0; } } @@ -904,7 +972,7 @@ private: if (this != &other) { delete[] m_value_buffer; m_value_buffer = new char[other.m_value_size]; - m_value_size = other.m_value_size; + m_value_size = other.m_value_size; std::copy(other.m_value_buffer, other.m_value_buffer + m_value_size, m_value_buffer); @@ -917,10 +985,10 @@ private: if (this != &other) { delete[] m_value_buffer; m_value_buffer = other.m_value_buffer; - m_value_size = other.m_value_size; + m_value_size = other.m_value_size; other.m_value_buffer = nullptr; - other.m_value_size = 0; + other.m_value_size = 0; } return *this; @@ -936,26 +1004,21 @@ private: } }; -public: - void execute() const { - dispatch_execute_task(this); - } + public: + void execute() const { dispatch_execute_task(this); } inline void execute_task() const { - const int num_worker_threads = Kokkos::Experimental::HPX::concurrency(); - - std::size_t value_size = + const std::size_t value_size = Analysis::value_size(ReducerConditional::select(m_functor, m_reducer)); - using hpx::parallel::for_loop; - using hpx::parallel::execution::par; - #if KOKKOS_HPX_IMPLEMENTATION == 0 // NOTE: This version makes the most use of HPX functionality, but // requires the struct value_type_wrapper to handle different // reference_types. It is also significantly slower than the version // below due to not reusing the buffer used by other functions. + using hpx::parallel::for_loop; using hpx::parallel::reduction; + using hpx::parallel::execution::par; using hpx::parallel::execution::static_chunk_size; value_type_wrapper final_value(value_size); @@ -983,37 +1046,99 @@ public: pointer_type final_value_ptr = final_value.pointer(); #elif KOKKOS_HPX_IMPLEMENTATION == 1 + const int num_worker_threads = Kokkos::Experimental::HPX::concurrency(); + thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer(); buffer.resize(num_worker_threads, value_size); - for_loop(par, 0, num_worker_threads, [this, &buffer](std::size_t t) { - ValueInit::init(ReducerConditional::select(m_functor, m_reducer), - reinterpret_cast(buffer.get(t))); - }); - using hpx::apply; - using hpx::lcos::local::counting_semaphore; + using hpx::lcos::local::latch; - counting_semaphore sem(0); - std::size_t num_tasks = 0; + { + latch num_tasks_remaining(num_worker_threads); + ChunkedRoundRobinExecutor exec(num_worker_threads); + + for (int t = 0; t < num_worker_threads; ++t) { + apply(exec, [this, &num_tasks_remaining, &buffer, t]() { + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + reinterpret_cast(buffer.get(t))); + + num_tasks_remaining.count_down(1); + }); + } + + num_tasks_remaining.wait(); + } + + const int num_tasks = + (m_policy.end() - m_policy.begin() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + latch num_tasks_remaining(num_tasks); + ChunkedRoundRobinExecutor exec(num_tasks); for (Member i_begin = m_policy.begin(); i_begin < m_policy.end(); i_begin += m_policy.chunk_size()) { - apply([this, &buffer, &sem, i_begin]() { + apply(exec, [this, &num_tasks_remaining, &buffer, i_begin]() { reference_type update = - ValueOps::reference(reinterpret_cast( - buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id()))); + ValueOps::reference(reinterpret_cast(buffer.get( + Kokkos::Experimental::HPX::impl_hardware_thread_id()))); const Member i_end = (std::min)(i_begin + m_policy.chunk_size(), m_policy.end()); execute_functor_range(update, i_begin, i_end); - sem.signal(1); + num_tasks_remaining.count_down(1); }); - - ++num_tasks; } - sem.wait(num_tasks); + num_tasks_remaining.wait(); + + for (int i = 1; i < num_worker_threads; ++i) { + ValueJoin::join(ReducerConditional::select(m_functor, m_reducer), + reinterpret_cast(buffer.get(0)), + reinterpret_cast(buffer.get(i))); + } + + pointer_type final_value_ptr = + reinterpret_cast(buffer.get(0)); + +#elif KOKKOS_HPX_IMPLEMENTATION == 2 + const int num_worker_threads = Kokkos::Experimental::HPX::concurrency(); + + thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer(); + buffer.resize(num_worker_threads, value_size); + + using hpx::parallel::for_loop; + using hpx::parallel::for_loop_strided; + using hpx::parallel::execution::par; + using hpx::parallel::execution::static_chunk_size; + + { + ChunkedRoundRobinExecutor exec(num_worker_threads); + + for_loop(par.on(exec).with(static_chunk_size(1)), std::size_t(0), + num_worker_threads, [this, &buffer](const std::size_t t) { + ValueInit::init( + ReducerConditional::select(m_functor, m_reducer), + reinterpret_cast(buffer.get(t))); + }); + } + + const int num_tasks = + (m_policy.end() - m_policy.begin() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + ChunkedRoundRobinExecutor exec(num_tasks); + + for_loop_strided( + par.on(exec).with(static_chunk_size(1)), m_policy.begin(), + m_policy.end(), m_policy.chunk_size(), + [this, &buffer](const Member i_begin) { + reference_type update = + ValueOps::reference(reinterpret_cast(buffer.get( + Kokkos::Experimental::HPX::impl_hardware_thread_id()))); + const Member i_end = + (std::min)(i_begin + m_policy.chunk_size(), m_policy.end()); + execute_functor_range(update, i_begin, i_end); + }); for (int i = 1; i < num_worker_threads; ++i) { ValueJoin::join(ReducerConditional::select(m_functor, m_reducer), @@ -1045,13 +1170,17 @@ public: typename std::enable_if::value && !Kokkos::is_reducer_type::value, void *>::type = NULL) - : m_functor(arg_functor), m_policy(arg_policy), m_reducer(InvalidType()), + : m_functor(arg_functor), + m_policy(arg_policy), + m_reducer(InvalidType()), m_result_ptr(arg_view.data()), m_force_synchronous(!arg_view.impl_track().has_record()) {} inline ParallelReduce(const FunctorType &arg_functor, Policy arg_policy, const ReducerType &reducer) - : m_functor(arg_functor), m_policy(arg_policy), m_reducer(reducer), + : m_functor(arg_functor), + m_policy(arg_policy), + m_reducer(reducer), m_result_ptr(reducer.view().data()), m_force_synchronous(!reducer.view().impl_track().has_record()) {} }; @@ -1059,13 +1188,13 @@ public: template class ParallelReduce, ReducerType, Kokkos::Experimental::HPX> { -private: + private: using MDRangePolicy = Kokkos::MDRangePolicy; - using Policy = typename MDRangePolicy::impl_range_policy; - using WorkTag = typename MDRangePolicy::work_tag; - using WorkRange = typename Policy::WorkRange; - using Member = typename Policy::member_type; - using Analysis = FunctorAnalysis; using ReducerConditional = Kokkos::Impl::if_c::value, @@ -1076,9 +1205,9 @@ private: WorkTag, void>::type; using ValueInit = Kokkos::Impl::FunctorValueInit; using ValueJoin = Kokkos::Impl::FunctorValueJoin; - using ValueOps = Kokkos::Impl::FunctorValueOps; - using pointer_type = typename Analysis::pointer_type; - using value_type = typename Analysis::value_type; + using ValueOps = Kokkos::Impl::FunctorValueOps; + using pointer_type = typename Analysis::pointer_type; + using value_type = typename Analysis::value_type; using reference_type = typename Analysis::reference_type; using iterate_type = typename Kokkos::Impl::HostIterateTile(buffer.get(t))); }); -#if KOKKOS_HPX_IMPLEMENTATION == 0 - using hpx::parallel::execution::static_chunk_size; - for_loop(par.with(static_chunk_size(m_policy.chunk_size())), m_policy.begin(), m_policy.end(), [this, &buffer](const Member i) { reference_type update = ValueOps::reference( @@ -1126,17 +1252,36 @@ public: #elif KOKKOS_HPX_IMPLEMENTATION == 1 using hpx::apply; - using hpx::lcos::local::counting_semaphore; + using hpx::lcos::local::latch; - counting_semaphore sem(0); - std::size_t num_tasks = 0; + { + latch num_tasks_remaining(num_worker_threads); + ChunkedRoundRobinExecutor exec(num_worker_threads); + + for (int t = 0; t < num_worker_threads; ++t) { + apply(exec, [this, &buffer, &num_tasks_remaining, t]() { + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + reinterpret_cast(buffer.get(t))); + + num_tasks_remaining.count_down(1); + }); + } + + num_tasks_remaining.wait(); + } + + const int num_tasks = + (m_policy.end() - m_policy.begin() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + latch num_tasks_remaining(num_tasks); + ChunkedRoundRobinExecutor exec(num_tasks); for (Member i_begin = m_policy.begin(); i_begin < m_policy.end(); i_begin += m_policy.chunk_size()) { - apply([this, &buffer, &sem, i_begin]() { + apply(exec, [this, &num_tasks_remaining, &buffer, i_begin]() { reference_type update = - ValueOps::reference(reinterpret_cast( - buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id()))); + ValueOps::reference(reinterpret_cast(buffer.get( + Kokkos::Experimental::HPX::impl_hardware_thread_id()))); const Member i_end = (std::min)(i_begin + m_policy.chunk_size(), m_policy.end()); @@ -1144,13 +1289,48 @@ public: iterate_type(m_mdr_policy, m_functor, update)(i); } - sem.signal(1); + num_tasks_remaining.count_down(1); }); - - ++num_tasks; } - sem.wait(num_tasks); + num_tasks_remaining.wait(); + +#elif KOKKOS_HPX_IMPLEMENTATION == 2 + using hpx::parallel::for_loop; + using hpx::parallel::for_loop_strided; + using hpx::parallel::execution::par; + using hpx::parallel::execution::static_chunk_size; + + { + ChunkedRoundRobinExecutor exec(num_worker_threads); + + for_loop(par.on(exec).with(static_chunk_size(1)), std::size_t(0), + num_worker_threads, [this, &buffer](const std::size_t t) { + ValueInit::init( + ReducerConditional::select(m_functor, m_reducer), + reinterpret_cast(buffer.get(t))); + }); + } + + const int num_tasks = + (m_policy.end() - m_policy.begin() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + ChunkedRoundRobinExecutor exec(num_tasks); + + for_loop_strided( + par.on(exec).with(static_chunk_size(1)), m_policy.begin(), + m_policy.end(), m_policy.chunk_size(), + [this, &buffer](const Member i_begin) { + reference_type update = + ValueOps::reference(reinterpret_cast(buffer.get( + Kokkos::Experimental::HPX::impl_hardware_thread_id()))); + const Member i_end = + (std::min)(i_begin + m_policy.chunk_size(), m_policy.end()); + + for (Member i = i_begin; i < i_end; ++i) { + iterate_type(m_mdr_policy, m_functor, update)(i); + } + }); #endif for (int i = 1; i < num_worker_threads; ++i) { @@ -1180,20 +1360,24 @@ public: typename std::enable_if::value && !Kokkos::is_reducer_type::value, void *>::type = NULL) - : m_functor(arg_functor), m_mdr_policy(arg_policy), + : m_functor(arg_functor), + m_mdr_policy(arg_policy), m_policy(Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1)), - m_reducer(InvalidType()), m_result_ptr(arg_view.data()), + m_reducer(InvalidType()), + m_result_ptr(arg_view.data()), m_force_synchronous(!arg_view.impl_track().has_record()) {} inline ParallelReduce(const FunctorType &arg_functor, MDRangePolicy arg_policy, const ReducerType &reducer) - : m_functor(arg_functor), m_mdr_policy(arg_policy), + : m_functor(arg_functor), + m_mdr_policy(arg_policy), m_policy(Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1)), - m_reducer(reducer), m_result_ptr(reducer.view().data()), + m_reducer(reducer), + m_result_ptr(reducer.view().data()), m_force_synchronous(!reducer.view().impl_track().has_record()) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos namespace Kokkos { namespace Impl { @@ -1201,19 +1385,19 @@ namespace Impl { template class ParallelScan, Kokkos::Experimental::HPX> { -private: - using Policy = Kokkos::RangePolicy; - using WorkTag = typename Policy::work_tag; + private: + using Policy = Kokkos::RangePolicy; + using WorkTag = typename Policy::work_tag; using WorkRange = typename Policy::WorkRange; - using Member = typename Policy::member_type; + using Member = typename Policy::member_type; using Analysis = FunctorAnalysis; - using ValueInit = Kokkos::Impl::FunctorValueInit; - using ValueJoin = Kokkos::Impl::FunctorValueJoin; - using ValueOps = Kokkos::Impl::FunctorValueOps; - using pointer_type = typename Analysis::pointer_type; + using ValueInit = Kokkos::Impl::FunctorValueInit; + using ValueJoin = Kokkos::Impl::FunctorValueJoin; + using ValueOps = Kokkos::Impl::FunctorValueOps; + using pointer_type = typename Analysis::pointer_type; using reference_type = typename Analysis::reference_type; - using value_type = typename Analysis::value_type; + using value_type = typename Analysis::value_type; const FunctorType m_functor; const Policy m_policy; @@ -1241,64 +1425,70 @@ private: } } -public: + public: void execute() const { dispatch_execute_task(this); } inline void execute_task() const { const int num_worker_threads = Kokkos::Experimental::HPX::concurrency(); - const int value_count = Analysis::value_count(m_functor); + const int value_count = Analysis::value_count(m_functor); const std::size_t value_size = Analysis::value_size(m_functor); thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer(); buffer.resize(num_worker_threads, 2 * value_size); + using hpx::apply; using hpx::lcos::local::barrier; - using hpx::parallel::for_loop; - using hpx::parallel::execution::par; - using hpx::parallel::execution::static_chunk_size; + using hpx::lcos::local::latch; barrier bar(num_worker_threads); + latch num_tasks_remaining(num_worker_threads); + ChunkedRoundRobinExecutor exec(num_worker_threads); - for_loop(par.with(static_chunk_size(1)), 0, num_worker_threads, - [this, &buffer, &bar, num_worker_threads, value_count, - value_size](std::size_t const t) { - reference_type update_sum = ValueInit::init( - m_functor, reinterpret_cast(buffer.get(t))); + for (int t = 0; t < num_worker_threads; ++t) { + apply(exec, [this, &bar, &buffer, &num_tasks_remaining, + num_worker_threads, value_count, value_size, t]() { + reference_type update_sum = ValueInit::init( + m_functor, reinterpret_cast(buffer.get(t))); - const WorkRange range(m_policy, t, num_worker_threads); - execute_functor_range(m_functor, range.begin(), - range.end(), update_sum, false); + const WorkRange range(m_policy, t, num_worker_threads); + execute_functor_range(m_functor, range.begin(), range.end(), + update_sum, false); - bar.wait(); + bar.wait(); - if (t == 0) { - ValueInit::init(m_functor, reinterpret_cast( - buffer.get(0) + value_size)); + if (t == 0) { + ValueInit::init(m_functor, reinterpret_cast( + buffer.get(0) + value_size)); - for (int i = 1; i < num_worker_threads; ++i) { - pointer_type ptr_1_prev = - reinterpret_cast(buffer.get(i - 1)); - pointer_type ptr_2_prev = reinterpret_cast( - buffer.get(i - 1) + value_size); - pointer_type ptr_2 = reinterpret_cast( - buffer.get(i) + value_size); + for (int i = 1; i < num_worker_threads; ++i) { + pointer_type ptr_1_prev = + reinterpret_cast(buffer.get(i - 1)); + pointer_type ptr_2_prev = + reinterpret_cast(buffer.get(i - 1) + value_size); + pointer_type ptr_2 = + reinterpret_cast(buffer.get(i) + value_size); - for (int j = 0; j < value_count; ++j) { - ptr_2[j] = ptr_2_prev[j]; - } + for (int j = 0; j < value_count; ++j) { + ptr_2[j] = ptr_2_prev[j]; + } - ValueJoin::join(m_functor, ptr_2, ptr_1_prev); - } - } + ValueJoin::join(m_functor, ptr_2, ptr_1_prev); + } + } - bar.wait(); + bar.wait(); - reference_type update_base = ValueOps::reference( - reinterpret_cast(buffer.get(t) + value_size)); + reference_type update_base = ValueOps::reference( + reinterpret_cast(buffer.get(t) + value_size)); - execute_functor_range(m_functor, range.begin(), - range.end(), update_base, true); - }); + execute_functor_range(m_functor, range.begin(), range.end(), + update_base, true); + + num_tasks_remaining.count_down(1); + }); + } + + num_tasks_remaining.wait(); } inline ParallelScan(const FunctorType &arg_functor, const Policy &arg_policy) @@ -1308,19 +1498,19 @@ public: template class ParallelScanWithTotal, ReturnType, Kokkos::Experimental::HPX> { -private: - using Policy = Kokkos::RangePolicy; - using WorkTag = typename Policy::work_tag; + private: + using Policy = Kokkos::RangePolicy; + using WorkTag = typename Policy::work_tag; using WorkRange = typename Policy::WorkRange; - using Member = typename Policy::member_type; + using Member = typename Policy::member_type; using Analysis = FunctorAnalysis; - using ValueInit = Kokkos::Impl::FunctorValueInit; - using ValueJoin = Kokkos::Impl::FunctorValueJoin; - using ValueOps = Kokkos::Impl::FunctorValueOps; - using pointer_type = typename Analysis::pointer_type; + using ValueInit = Kokkos::Impl::FunctorValueInit; + using ValueJoin = Kokkos::Impl::FunctorValueJoin; + using ValueOps = Kokkos::Impl::FunctorValueOps; + using pointer_type = typename Analysis::pointer_type; using reference_type = typename Analysis::reference_type; - using value_type = typename Analysis::value_type; + using value_type = typename Analysis::value_type; const FunctorType m_functor; const Policy m_policy; @@ -1349,88 +1539,95 @@ private: } } -public: + public: void execute() const { dispatch_execute_task(this); } inline void execute_task() const { const int num_worker_threads = Kokkos::Experimental::HPX::concurrency(); - const int value_count = Analysis::value_count(m_functor); + const int value_count = Analysis::value_count(m_functor); const std::size_t value_size = Analysis::value_size(m_functor); thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer(); buffer.resize(num_worker_threads, 2 * value_size); + using hpx::apply; using hpx::lcos::local::barrier; - using hpx::parallel::for_loop; - using hpx::parallel::execution::par; - using hpx::parallel::execution::static_chunk_size; + using hpx::lcos::local::latch; barrier bar(num_worker_threads); + latch num_tasks_remaining(num_worker_threads); + ChunkedRoundRobinExecutor exec(num_worker_threads); - for_loop(par.with(static_chunk_size(1)), 0, num_worker_threads, - [this, &buffer, &bar, num_worker_threads, value_count, - value_size](std::size_t const t) { - reference_type update_sum = ValueInit::init( - m_functor, reinterpret_cast(buffer.get(t))); + for (int t = 0; t < num_worker_threads; ++t) { + apply(exec, [this, &bar, &buffer, &num_tasks_remaining, + num_worker_threads, value_count, value_size, t]() { + reference_type update_sum = ValueInit::init( + m_functor, reinterpret_cast(buffer.get(t))); - const WorkRange range(m_policy, t, num_worker_threads); - execute_functor_range(m_functor, range.begin(), - range.end(), update_sum, false); + const WorkRange range(m_policy, t, num_worker_threads); + execute_functor_range(m_functor, range.begin(), range.end(), + update_sum, false); - bar.wait(); + bar.wait(); - if (t == 0) { - ValueInit::init(m_functor, reinterpret_cast( - buffer.get(0) + value_size)); + if (t == 0) { + ValueInit::init(m_functor, reinterpret_cast( + buffer.get(0) + value_size)); - for (int i = 1; i < num_worker_threads; ++i) { - pointer_type ptr_1_prev = - reinterpret_cast(buffer.get(i - 1)); - pointer_type ptr_2_prev = reinterpret_cast( - buffer.get(i - 1) + value_size); - pointer_type ptr_2 = reinterpret_cast( - buffer.get(i) + value_size); + for (int i = 1; i < num_worker_threads; ++i) { + pointer_type ptr_1_prev = + reinterpret_cast(buffer.get(i - 1)); + pointer_type ptr_2_prev = + reinterpret_cast(buffer.get(i - 1) + value_size); + pointer_type ptr_2 = + reinterpret_cast(buffer.get(i) + value_size); - for (int j = 0; j < value_count; ++j) { - ptr_2[j] = ptr_2_prev[j]; - } + for (int j = 0; j < value_count; ++j) { + ptr_2[j] = ptr_2_prev[j]; + } - ValueJoin::join(m_functor, ptr_2, ptr_1_prev); - } - } + ValueJoin::join(m_functor, ptr_2, ptr_1_prev); + } + } - bar.wait(); + bar.wait(); - reference_type update_base = ValueOps::reference( - reinterpret_cast(buffer.get(t) + value_size)); + reference_type update_base = ValueOps::reference( + reinterpret_cast(buffer.get(t) + value_size)); - execute_functor_range(m_functor, range.begin(), - range.end(), update_base, true); + execute_functor_range(m_functor, range.begin(), range.end(), + update_base, true); - if (t == std::size_t(num_worker_threads - 1)) { - m_returnvalue = update_base; - } - }); + if (t == num_worker_threads - 1) { + m_returnvalue = update_base; + } + + num_tasks_remaining.count_down(1); + }); + } + + num_tasks_remaining.wait(); } inline ParallelScanWithTotal(const FunctorType &arg_functor, const Policy &arg_policy, ReturnType &arg_returnvalue) - : m_functor(arg_functor), m_policy(arg_policy), + : m_functor(arg_functor), + m_policy(arg_policy), m_returnvalue(arg_returnvalue) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos namespace Kokkos { namespace Impl { template class ParallelFor, Kokkos::Experimental::HPX> { -private: - using Policy = TeamPolicyInternal; + private: + using Policy = TeamPolicyInternal; using WorkTag = typename Policy::work_tag; - using Member = typename Policy::member_type; + using Member = typename Policy::member_type; using memory_space = Kokkos::HostSpace; const FunctorType m_functor; @@ -1485,7 +1682,7 @@ private: } } -public: + public: void execute() const { dispatch_execute_task(this); } inline void execute_task() const { @@ -1499,42 +1696,66 @@ public: using hpx::parallel::execution::par; using hpx::parallel::execution::static_chunk_size; - for_loop(par.with(static_chunk_size(m_policy.chunk_size())), 0, - m_policy.league_size(), [this, &buffer](const int league_rank) { - execute_functor( - m_functor, m_policy, league_rank, - buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id()), - m_shared); - }); + for_loop( + par.with(static_chunk_size(m_policy.chunk_size())), 0, + m_policy.league_size(), [this, &buffer](const int league_rank) { + execute_functor( + m_functor, m_policy, league_rank, + buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id()), + m_shared); + }); #elif KOKKOS_HPX_IMPLEMENTATION == 1 using hpx::apply; - using hpx::lcos::local::counting_semaphore; + using hpx::lcos::local::latch; - counting_semaphore sem(0); - std::size_t num_tasks = 0; + const int num_tasks = (m_policy.league_size() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + latch num_tasks_remaining(num_tasks); + ChunkedRoundRobinExecutor exec(num_tasks); for (int league_rank_begin = 0; league_rank_begin < m_policy.league_size(); league_rank_begin += m_policy.chunk_size()) { - apply([this, &buffer, &sem, league_rank_begin]() { + apply(exec, [this, &buffer, &num_tasks_remaining, league_rank_begin]() { const int league_rank_end = (std::min)( league_rank_begin + m_policy.chunk_size(), m_policy.league_size()); execute_functor_range( m_functor, m_policy, league_rank_begin, league_rank_end, - buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id()), m_shared); + buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id()), + m_shared); - sem.signal(1); + num_tasks_remaining.count_down(1); }); - - ++num_tasks; } - sem.wait(num_tasks); + num_tasks_remaining.wait(); + +#elif KOKKOS_HPX_IMPLEMENTATION == 2 + using hpx::parallel::for_loop_strided; + using hpx::parallel::execution::par; + using hpx::parallel::execution::static_chunk_size; + + const int num_tasks = (m_policy.league_size() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + ChunkedRoundRobinExecutor exec(num_tasks); + + for_loop_strided( + par.on(exec).with(static_chunk_size(1)), 0, m_policy.league_size(), + m_policy.chunk_size(), [this, &buffer](const int league_rank_begin) { + const int league_rank_end = + (std::min)(league_rank_begin + m_policy.chunk_size(), + m_policy.league_size()); + execute_functor_range( + m_functor, m_policy, league_rank_begin, league_rank_end, + buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id()), + m_shared); + }); #endif } ParallelFor(const FunctorType &arg_functor, const Policy &arg_policy) - : m_functor(arg_functor), m_policy(arg_policy), + : m_functor(arg_functor), + m_policy(arg_policy), m_league(arg_policy.league_size()), m_shared(arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + FunctorTeamShmemSize::value( @@ -1544,11 +1765,11 @@ public: template class ParallelReduce, ReducerType, Kokkos::Experimental::HPX> { -private: + private: using Policy = TeamPolicyInternal; using Analysis = FunctorAnalysis; - using Member = typename Policy::member_type; + using Member = typename Policy::member_type; using WorkTag = typename Policy::work_tag; using ReducerConditional = Kokkos::Impl::if_c::value, @@ -1559,10 +1780,10 @@ private: WorkTag, void>::type; using ValueInit = Kokkos::Impl::FunctorValueInit; using ValueJoin = Kokkos::Impl::FunctorValueJoin; - using ValueOps = Kokkos::Impl::FunctorValueOps; - using pointer_type = typename Analysis::pointer_type; + using ValueOps = Kokkos::Impl::FunctorValueOps; + using pointer_type = typename Analysis::pointer_type; using reference_type = typename Analysis::reference_type; - using value_type = typename Analysis::value_type; + using value_type = typename Analysis::value_type; const FunctorType m_functor; const int m_league; @@ -1628,10 +1849,8 @@ private: } } -public: - void execute() const { - dispatch_execute_task(this); - } + public: + void execute() const { dispatch_execute_task(this); } inline void execute_task() const { const int num_worker_threads = Kokkos::Experimental::HPX::concurrency(); @@ -1641,15 +1860,15 @@ public: thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer(); buffer.resize(num_worker_threads, value_size + m_shared); +#if KOKKOS_HPX_IMPLEMENTATION == 0 using hpx::parallel::for_loop; using hpx::parallel::execution::par; - for_loop(par, 0, num_worker_threads, [this, &buffer](std::size_t t) { + for_loop(par, 0, num_worker_threads, [this, &buffer](const std::size_t t) { ValueInit::init(ReducerConditional::select(m_functor, m_reducer), reinterpret_cast(buffer.get(t))); }); -#if KOKKOS_HPX_IMPLEMENTATION == 0 using hpx::parallel::execution::static_chunk_size; hpx::parallel::for_loop( @@ -1667,14 +1886,33 @@ public: #elif KOKKOS_HPX_IMPLEMENTATION == 1 using hpx::apply; - using hpx::lcos::local::counting_semaphore; + using hpx::lcos::local::latch; - counting_semaphore sem(0); - std::size_t num_tasks = 0; + { + latch num_tasks_remaining(num_worker_threads); + ChunkedRoundRobinExecutor exec(num_worker_threads); + + for (int t = 0; t < num_worker_threads; ++t) { + apply(exec, [this, &buffer, &num_tasks_remaining, t]() { + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), + reinterpret_cast(buffer.get(t))); + + num_tasks_remaining.count_down(1); + }); + } + + num_tasks_remaining.wait(); + } + + const int num_tasks = (m_policy.league_size() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + latch num_tasks_remaining(num_tasks); + ChunkedRoundRobinExecutor exec(num_tasks); for (int league_rank_begin = 0; league_rank_begin < m_policy.league_size(); league_rank_begin += m_policy.chunk_size()) { - apply([this, &buffer, &sem, league_rank_begin, value_size]() { + apply(exec, [this, &buffer, &num_tasks_remaining, league_rank_begin, + value_size]() { std::size_t t = Kokkos::Experimental::HPX::impl_hardware_thread_id(); reference_type update = ValueOps::reference(reinterpret_cast(buffer.get(t))); @@ -1684,13 +1922,47 @@ public: m_functor, m_policy, league_rank_begin, league_rank_end, buffer.get(t) + value_size, m_shared, update); - sem.signal(1); + num_tasks_remaining.count_down(1); }); - - ++num_tasks; } - sem.wait(num_tasks); + num_tasks_remaining.wait(); + +#elif KOKKOS_HPX_IMPLEMENTATION == 2 + using hpx::parallel::for_loop; + using hpx::parallel::for_loop_strided; + using hpx::parallel::execution::par; + using hpx::parallel::execution::static_chunk_size; + + { + ChunkedRoundRobinExecutor exec(num_worker_threads); + + for_loop(par.on(exec).with(static_chunk_size(1)), 0, num_worker_threads, + [this, &buffer](std::size_t const t) { + ValueInit::init( + ReducerConditional::select(m_functor, m_reducer), + reinterpret_cast(buffer.get(t))); + }); + } + + const int num_tasks = (m_policy.league_size() + m_policy.chunk_size() - 1) / + m_policy.chunk_size(); + ChunkedRoundRobinExecutor exec(num_tasks); + + for_loop_strided( + par.on(exec).with(static_chunk_size(1)), 0, m_policy.league_size(), + m_policy.chunk_size(), + [this, &buffer, value_size](int const league_rank_begin) { + std::size_t t = Kokkos::Experimental::HPX::impl_hardware_thread_id(); + reference_type update = ValueOps::reference( + reinterpret_cast(buffer.get(t))); + const int league_rank_end = + (std::min)(league_rank_begin + m_policy.chunk_size(), + m_policy.league_size()); + execute_functor_range( + m_functor, m_policy, league_rank_begin, league_rank_end, + buffer.get(t) + value_size, m_shared, update); + }); #endif const pointer_type ptr = reinterpret_cast(buffer.get(0)); @@ -1719,8 +1991,10 @@ public: typename std::enable_if::value && !Kokkos::is_reducer_type::value, void *>::type = NULL) - : m_functor(arg_functor), m_league(arg_policy.league_size()), - m_policy(arg_policy), m_reducer(InvalidType()), + : m_functor(arg_functor), + m_league(arg_policy.league_size()), + m_policy(arg_policy), + m_reducer(InvalidType()), m_result_ptr(arg_result.data()), m_shared(arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + FunctorTeamShmemSize::value( @@ -1729,16 +2003,18 @@ public: inline ParallelReduce(const FunctorType &arg_functor, Policy arg_policy, const ReducerType &reducer) - : m_functor(arg_functor), m_league(arg_policy.league_size()), - m_policy(arg_policy), m_reducer(reducer), + : m_functor(arg_functor), + m_league(arg_policy.league_size()), + m_policy(arg_policy), + m_reducer(reducer), m_result_ptr(reducer.view().data()), m_shared(arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + FunctorTeamShmemSize::value( arg_functor, arg_policy.team_size())), m_force_synchronous(!reducer.view().impl_track().has_record()) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos namespace Kokkos { @@ -1796,14 +2072,14 @@ KOKKOS_INLINE_FUNCTION } KOKKOS_INLINE_FUNCTION -Impl::ThreadSingleStruct -PerTeam(const Impl::HPXTeamMember &thread) { +Impl::ThreadSingleStruct PerTeam( + const Impl::HPXTeamMember &thread) { return Impl::ThreadSingleStruct(thread); } KOKKOS_INLINE_FUNCTION -Impl::VectorSingleStruct -PerThread(const Impl::HPXTeamMember &thread) { +Impl::VectorSingleStruct PerThread( + const Impl::HPXTeamMember &thread) { return Impl::VectorSingleStruct(thread); } @@ -1950,7 +2226,7 @@ KOKKOS_INLINE_FUNCTION void parallel_scan( &loop_boundaries, const FunctorType &lambda) { using ValueTraits = Kokkos::Impl::FunctorValueTraits; - using value_type = typename ValueTraits::value_type; + using value_type = typename ValueTraits::value_type; value_type scan_val = value_type(); @@ -1964,34 +2240,34 @@ KOKKOS_INLINE_FUNCTION void parallel_scan( } template -KOKKOS_INLINE_FUNCTION void -single(const Impl::VectorSingleStruct &single_struct, - const FunctorType &lambda) { +KOKKOS_INLINE_FUNCTION void single( + const Impl::VectorSingleStruct &single_struct, + const FunctorType &lambda) { lambda(); } template -KOKKOS_INLINE_FUNCTION void -single(const Impl::ThreadSingleStruct &single_struct, - const FunctorType &lambda) { +KOKKOS_INLINE_FUNCTION void single( + const Impl::ThreadSingleStruct &single_struct, + const FunctorType &lambda) { lambda(); } template -KOKKOS_INLINE_FUNCTION void -single(const Impl::VectorSingleStruct &single_struct, - const FunctorType &lambda, ValueType &val) { +KOKKOS_INLINE_FUNCTION void single( + const Impl::VectorSingleStruct &single_struct, + const FunctorType &lambda, ValueType &val) { lambda(val); } template -KOKKOS_INLINE_FUNCTION void -single(const Impl::ThreadSingleStruct &single_struct, - const FunctorType &lambda, ValueType &val) { +KOKKOS_INLINE_FUNCTION void single( + const Impl::ThreadSingleStruct &single_struct, + const FunctorType &lambda, ValueType &val) { lambda(val); } -} // namespace Kokkos +} // namespace Kokkos #include diff --git a/lib/kokkos/core/src/Kokkos_HostSpace.hpp b/lib/kokkos/core/src/Kokkos_HostSpace.hpp index 06ccf63987..974ca1e5ef 100644 --- a/lib/kokkos/core/src/Kokkos_HostSpace.hpp +++ b/lib/kokkos/core/src/Kokkos_HostSpace.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -73,10 +74,10 @@ namespace Impl { /// This function initializes the locks to zero (unset). void init_lock_array_host_space(); -/// \brief Acquire a lock for the address +/// \brief Aquire a lock for the address /// -/// This function tries to acquire the lock for the hash value derived -/// from the provided ptr. If the lock is successfully acquired the +/// This function tries to aquire the lock for the hash value derived +/// from the provided ptr. If the lock is successfully aquired the /// function returns true. Otherwise it returns false. bool lock_address_host_space(void* ptr); @@ -84,13 +85,13 @@ bool lock_address_host_space(void* ptr); /// /// This function releases the lock for the hash value derived /// from the provided ptr. This function should only be called -/// after previously successfully acquiring a lock with +/// after previously successfully aquiring a lock with /// lock_address. -void unlock_address_host_space( void* ptr ); +void unlock_address_host_space(void* ptr); -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos namespace Kokkos { @@ -100,10 +101,10 @@ namespace Kokkos { /// HostSpace is a memory space that governs host memory. "Host" /// memory means the usual CPU-accessible memory. class HostSpace { -public: + public: //! Tag this class as a kokkos memory space - typedef HostSpace memory_space; - typedef size_t size_type; + typedef HostSpace memory_space; + typedef size_t size_type; /// \typedef execution_space /// \brief Default execution space for this memory space. @@ -111,63 +112,68 @@ public: /// Every memory space has a default execution space. This is /// useful for things like initializing a View (which happens in /// parallel using the View's default execution space). -#if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) - typedef Kokkos::OpenMP execution_space; -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) - typedef Kokkos::Threads execution_space; -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX ) +#if defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP) + typedef Kokkos::OpenMP execution_space; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS) + typedef Kokkos::Threads execution_space; +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX) typedef Kokkos::Experimental::HPX execution_space; //#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) // typedef Kokkos::Qthreads execution_space; -#elif defined( KOKKOS_ENABLE_OPENMP ) - typedef Kokkos::OpenMP execution_space; -#elif defined( KOKKOS_ENABLE_THREADS ) - typedef Kokkos::Threads execution_space; +#elif defined(KOKKOS_ENABLE_OPENMP) + typedef Kokkos::OpenMP execution_space; +#elif defined(KOKKOS_ENABLE_THREADS) + typedef Kokkos::Threads execution_space; //#elif defined( KOKKOS_ENABLE_QTHREADS ) // typedef Kokkos::Qthreads execution_space; -#elif defined( KOKKOS_ENABLE_HPX ) +#elif defined(KOKKOS_ENABLE_HPX) typedef Kokkos::Experimental::HPX execution_space; -#elif defined( KOKKOS_ENABLE_SERIAL ) - typedef Kokkos::Serial execution_space; +#elif defined(KOKKOS_ENABLE_SERIAL) + typedef Kokkos::Serial execution_space; #else -# error "At least one of the following host execution spaces must be defined: Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qthreads, or Kokkos::Serial. You might be seeing this message if you disabled the Kokkos::Serial device explicitly using the Kokkos_ENABLE_Serial:BOOL=OFF CMake option, but did not enable any of the other host execution space devices." +#error \ + "At least one of the following host execution spaces must be defined: Kokkos::OpenMP, Kokkos::Threads, Kokkos::Qthreads, or Kokkos::Serial. You might be seeing this message if you disabled the Kokkos::Serial device explicitly using the Kokkos_ENABLE_Serial:BOOL=OFF CMake option, but did not enable any of the other host execution space devices." #endif //! This memory space preferred device_type - typedef Kokkos::Device< execution_space, memory_space > device_type; + typedef Kokkos::Device device_type; /**\brief Default memory space instance */ HostSpace(); - HostSpace( HostSpace && rhs ) = default; - HostSpace( const HostSpace & rhs ) = default; - HostSpace & operator = ( HostSpace && ) = default; - HostSpace & operator = ( const HostSpace & ) = default; - ~HostSpace() = default; + HostSpace(HostSpace&& rhs) = default; + HostSpace(const HostSpace& rhs) = default; + HostSpace& operator=(HostSpace&&) = default; + HostSpace& operator=(const HostSpace&) = default; + ~HostSpace() = default; - /**\brief Non-default memory space instance to choose allocation mechansim, if available */ + /**\brief Non-default memory space instance to choose allocation mechansim, + * if available */ - enum AllocationMechanism { STD_MALLOC, POSIX_MEMALIGN, POSIX_MMAP, INTEL_MM_ALLOC }; + enum AllocationMechanism { + STD_MALLOC, + POSIX_MEMALIGN, + POSIX_MMAP, + INTEL_MM_ALLOC + }; - explicit - HostSpace( const AllocationMechanism & ); + explicit HostSpace(const AllocationMechanism&); /**\brief Allocate untracked memory in the space */ - void * allocate( const size_t arg_alloc_size ) const; + void* allocate(const size_t arg_alloc_size) const; /**\brief Deallocate untracked memory in the space */ - void deallocate( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) const; + void deallocate(void* const arg_alloc_ptr, const size_t arg_alloc_size) const; /**\brief Return Name of the MemorySpace */ static constexpr const char* name() { return m_name; } -private: - AllocationMechanism m_alloc_mech; + private: + AllocationMechanism m_alloc_mech; static constexpr const char* m_name = "Host"; - friend class Kokkos::Impl::SharedAllocationRecord< Kokkos::HostSpace, void >; + friend class Kokkos::Impl::SharedAllocationRecord; }; -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- @@ -175,38 +181,45 @@ namespace Kokkos { namespace Impl { -static_assert( Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace, Kokkos::HostSpace >::assignable, "" ); +static_assert(Kokkos::Impl::MemorySpaceAccess::assignable, + ""); -template< typename S > +template struct HostMirror { -private: + private: // If input execution space can access HostSpace then keep it. // Example: Kokkos::OpenMP can access, Kokkos::Cuda cannot - enum { keep_exe = Kokkos::Impl::MemorySpaceAccess - < typename S::execution_space::memory_space, Kokkos::HostSpace >::accessible }; + enum { + keep_exe = Kokkos::Impl::MemorySpaceAccess< + typename S::execution_space::memory_space, + Kokkos::HostSpace>::accessible + }; // If HostSpace can access memory space then keep it. // Example: Cannot access Kokkos::CudaSpace, can access Kokkos::CudaUVMSpace - enum { keep_mem = Kokkos::Impl::MemorySpaceAccess - < Kokkos::HostSpace, typename S::memory_space >::accessible }; + enum { + keep_mem = + Kokkos::Impl::MemorySpaceAccess::accessible + }; -public: - - typedef typename std::conditional - < keep_exe && keep_mem /* Can keep whole space */ - , S - , typename std::conditional - < keep_mem /* Can keep memory space, use default Host execution space */ - , Kokkos::Device< Kokkos::HostSpace::execution_space - , typename S::memory_space > - , Kokkos::HostSpace - >::type - >::type Space; + public: + typedef typename std::conditional< + keep_exe && keep_mem /* Can keep whole space */ + , + S, + typename std::conditional< + keep_mem /* Can keep memory space, use default Host execution space */ + , + Kokkos::Device, + Kokkos::HostSpace>::type>::type Space; }; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- @@ -214,19 +227,18 @@ namespace Kokkos { namespace Impl { -template<> -class SharedAllocationRecord< Kokkos::HostSpace, void > - : public SharedAllocationRecord< void, void > -{ -private: +template <> +class SharedAllocationRecord + : public SharedAllocationRecord { + private: friend Kokkos::HostSpace; - typedef SharedAllocationRecord< void, void > RecordBase; + typedef SharedAllocationRecord RecordBase; - SharedAllocationRecord( const SharedAllocationRecord & ) = delete; - SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete; + SharedAllocationRecord(const SharedAllocationRecord&) = delete; + SharedAllocationRecord& operator=(const SharedAllocationRecord&) = delete; - static void deallocate( RecordBase * ); + static void deallocate(RecordBase*); #ifdef KOKKOS_DEBUG /**\brief Root record for tracked allocations from this HostSpace instance */ @@ -235,61 +247,51 @@ private: const Kokkos::HostSpace m_space; -protected: + protected: ~SharedAllocationRecord(); SharedAllocationRecord() = default; - SharedAllocationRecord( const Kokkos::HostSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const RecordBase::function_type arg_dealloc = & deallocate - ); + SharedAllocationRecord( + const Kokkos::HostSpace& arg_space, const std::string& arg_label, + const size_t arg_alloc_size, + const RecordBase::function_type arg_dealloc = &deallocate); -public: - - inline - std::string get_label() const - { - return std::string( RecordBase::head()->m_label ); + public: + inline std::string get_label() const { + return std::string(RecordBase::head()->m_label); } - KOKKOS_INLINE_FUNCTION static - SharedAllocationRecord * allocate( const Kokkos::HostSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - ) - { -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) - return new SharedAllocationRecord( arg_space, arg_label, arg_alloc_size ); + KOKKOS_INLINE_FUNCTION static SharedAllocationRecord* allocate( + const Kokkos::HostSpace& arg_space, const std::string& arg_label, + const size_t arg_alloc_size) { +#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST) + return new SharedAllocationRecord(arg_space, arg_label, arg_alloc_size); #else - return (SharedAllocationRecord *) 0; + return (SharedAllocationRecord*)0; #endif } - /**\brief Allocate tracked memory in the space */ - static - void * allocate_tracked( const Kokkos::HostSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + static void* allocate_tracked(const Kokkos::HostSpace& arg_space, + const std::string& arg_label, + const size_t arg_alloc_size); /**\brief Reallocate tracked memory in the space */ - static - void * reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ); + static void* reallocate_tracked(void* const arg_alloc_ptr, + const size_t arg_alloc_size); /**\brief Deallocate tracked memory in the space */ - static - void deallocate_tracked( void * const arg_alloc_ptr ); + static void deallocate_tracked(void* const arg_alloc_ptr); - static SharedAllocationRecord * get_record( void * arg_alloc_ptr ); + static SharedAllocationRecord* get_record(void* arg_alloc_ptr); - static void print_records( std::ostream &, const Kokkos::HostSpace &, bool detail = false ); + static void print_records(std::ostream&, const Kokkos::HostSpace&, + bool detail = false); }; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- @@ -297,24 +299,21 @@ namespace Kokkos { namespace Impl { -#define PAR_DEEP_COPY_USE_MEMCPY - -template< class ExecutionSpace > -struct DeepCopy< HostSpace, HostSpace, ExecutionSpace > { - DeepCopy( void * dst, const void * src, size_t n ) { - hostspace_parallel_deepcopy(dst,src,n); +template +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t n) { + hostspace_parallel_deepcopy(dst, src, n); } - DeepCopy( const ExecutionSpace& exec, void * dst, const void * src, size_t n ) { + DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, size_t n) { exec.fence(); - hostspace_parallel_deepcopy(dst,src,n); + hostspace_parallel_deepcopy(dst, src, n); exec.fence(); } }; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos - -#endif // #define KOKKOS_HOSTSPACE_HPP +} // namespace Kokkos +#endif // #define KOKKOS_HOSTSPACE_HPP diff --git a/lib/kokkos/core/src/Kokkos_Layout.hpp b/lib/kokkos/core/src/Kokkos_Layout.hpp index 6f423d545f..d34bdb9150 100644 --- a/lib/kokkos/core/src/Kokkos_Layout.hpp +++ b/lib/kokkos/core/src/Kokkos_Layout.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -72,22 +73,22 @@ enum { ARRAY_LAYOUT_MAX_RANK = 8 }; /// major." struct LayoutLeft { //! Tag this class as a kokkos array layout - typedef LayoutLeft array_layout ; + typedef LayoutLeft array_layout; - size_t dimension[ ARRAY_LAYOUT_MAX_RANK ]; + size_t dimension[ARRAY_LAYOUT_MAX_RANK]; enum { is_extent_constructible = true }; - LayoutLeft( LayoutLeft const & ) = default ; - LayoutLeft( LayoutLeft && ) = default ; - LayoutLeft & operator = ( LayoutLeft const & ) = default ; - LayoutLeft & operator = ( LayoutLeft && ) = default ; + LayoutLeft(LayoutLeft const&) = default; + LayoutLeft(LayoutLeft&&) = default; + LayoutLeft& operator=(LayoutLeft const&) = default; + LayoutLeft& operator=(LayoutLeft&&) = default; KOKKOS_INLINE_FUNCTION - explicit constexpr - LayoutLeft( size_t N0 = 0 , size_t N1 = 0 , size_t N2 = 0 , size_t N3 = 0 - , size_t N4 = 0 , size_t N5 = 0 , size_t N6 = 0 , size_t N7 = 0 ) - : dimension { N0 , N1 , N2 , N3 , N4 , N5 , N6 , N7 } {} + explicit constexpr LayoutLeft(size_t N0 = 0, size_t N1 = 0, size_t N2 = 0, + size_t N3 = 0, size_t N4 = 0, size_t N5 = 0, + size_t N6 = 0, size_t N7 = 0) + : dimension{N0, N1, N2, N3, N4, N5, N6, N7} {} }; //---------------------------------------------------------------------------- @@ -106,22 +107,22 @@ struct LayoutLeft { /// two-dimensional array, "layout right" is also called "row major." struct LayoutRight { //! Tag this class as a kokkos array layout - typedef LayoutRight array_layout ; + typedef LayoutRight array_layout; - size_t dimension[ ARRAY_LAYOUT_MAX_RANK ]; + size_t dimension[ARRAY_LAYOUT_MAX_RANK]; enum { is_extent_constructible = true }; - LayoutRight( LayoutRight const & ) = default ; - LayoutRight( LayoutRight && ) = default ; - LayoutRight & operator = ( LayoutRight const & ) = default ; - LayoutRight & operator = ( LayoutRight && ) = default ; + LayoutRight(LayoutRight const&) = default; + LayoutRight(LayoutRight&&) = default; + LayoutRight& operator=(LayoutRight const&) = default; + LayoutRight& operator=(LayoutRight&&) = default; KOKKOS_INLINE_FUNCTION - explicit constexpr - LayoutRight( size_t N0 = 0 , size_t N1 = 0 , size_t N2 = 0 , size_t N3 = 0 - , size_t N4 = 0 , size_t N5 = 0 , size_t N6 = 0 , size_t N7 = 0 ) - : dimension { N0 , N1 , N2 , N3 , N4 , N5 , N6 , N7 } {} + explicit constexpr LayoutRight(size_t N0 = 0, size_t N1 = 0, size_t N2 = 0, + size_t N3 = 0, size_t N4 = 0, size_t N5 = 0, + size_t N6 = 0, size_t N7 = 0) + : dimension{N0, N1, N2, N3, N4, N5, N6, N7} {} }; //---------------------------------------------------------------------------- @@ -129,19 +130,18 @@ struct LayoutRight { /// \brief Memory layout tag indicated arbitrarily strided /// multi-index mapping into contiguous memory. struct LayoutStride { - //! Tag this class as a kokkos array layout - typedef LayoutStride array_layout ; + typedef LayoutStride array_layout; - size_t dimension[ ARRAY_LAYOUT_MAX_RANK ] ; - size_t stride[ ARRAY_LAYOUT_MAX_RANK ] ; + size_t dimension[ARRAY_LAYOUT_MAX_RANK]; + size_t stride[ARRAY_LAYOUT_MAX_RANK]; enum { is_extent_constructible = false }; - LayoutStride( LayoutStride const & ) = default ; - LayoutStride( LayoutStride && ) = default ; - LayoutStride & operator = ( LayoutStride const & ) = default ; - LayoutStride & operator = ( LayoutStride && ) = default ; + LayoutStride(LayoutStride const&) = default; + LayoutStride(LayoutStride&&) = default; + LayoutStride& operator=(LayoutStride const&) = default; + LayoutStride& operator=(LayoutStride&&) = default; /** \brief Compute strides from ordered dimensions. * @@ -150,47 +150,40 @@ struct LayoutStride { * Order = {0,1,2,...} is LayoutLeft * Order = {...,2,1,0} is LayoutRight */ - template< typename iTypeOrder , typename iTypeDimen > - KOKKOS_INLINE_FUNCTION static - LayoutStride order_dimensions( int const rank - , iTypeOrder const * const order - , iTypeDimen const * const dimen ) - { - LayoutStride tmp ; - // Verify valid rank order: - int check_input = ARRAY_LAYOUT_MAX_RANK < rank ? 0 : int( 1 << rank ) - 1 ; - for ( int r = 0 ; r < ARRAY_LAYOUT_MAX_RANK ; ++r ) { - tmp.dimension[r] = 0 ; - tmp.stride[r] = 0 ; - } - for ( int r = 0 ; r < rank ; ++r ) { - check_input &= ~int( 1 << order[r] ); - } - if ( 0 == check_input ) { - size_t n = 1 ; - for ( int r = 0 ; r < rank ; ++r ) { - tmp.stride[ order[r] ] = n ; - n *= ( dimen[order[r]] ); - tmp.dimension[r] = dimen[r]; - } - } - return tmp ; + template + KOKKOS_INLINE_FUNCTION static LayoutStride order_dimensions( + int const rank, iTypeOrder const* const order, + iTypeDimen const* const dimen) { + LayoutStride tmp; + // Verify valid rank order: + int check_input = ARRAY_LAYOUT_MAX_RANK < rank ? 0 : int(1 << rank) - 1; + for (int r = 0; r < ARRAY_LAYOUT_MAX_RANK; ++r) { + tmp.dimension[r] = 0; + tmp.stride[r] = 0; } + for (int r = 0; r < rank; ++r) { + check_input &= ~int(1 << order[r]); + } + if (0 == check_input) { + size_t n = 1; + for (int r = 0; r < rank; ++r) { + tmp.stride[order[r]] = n; + n *= (dimen[order[r]]); + tmp.dimension[r] = dimen[r]; + } + } + return tmp; + } KOKKOS_INLINE_FUNCTION - explicit constexpr - LayoutStride( size_t N0 = 0 , size_t S0 = 0 - , size_t N1 = 0 , size_t S1 = 0 - , size_t N2 = 0 , size_t S2 = 0 - , size_t N3 = 0 , size_t S3 = 0 - , size_t N4 = 0 , size_t S4 = 0 - , size_t N5 = 0 , size_t S5 = 0 - , size_t N6 = 0 , size_t S6 = 0 - , size_t N7 = 0 , size_t S7 = 0 - ) - : dimension { N0 , N1 , N2 , N3 , N4 , N5 , N6 , N7 } - , stride { S0 , S1 , S2 , S3 , S4 , S5 , S6 , S7 } - {} + explicit constexpr LayoutStride(size_t N0 = 0, size_t S0 = 0, size_t N1 = 0, + size_t S1 = 0, size_t N2 = 0, size_t S2 = 0, + size_t N3 = 0, size_t S3 = 0, size_t N4 = 0, + size_t S4 = 0, size_t N5 = 0, size_t S5 = 0, + size_t N6 = 0, size_t S6 = 0, size_t N7 = 0, + size_t S7 = 0) + : dimension{N0, N1, N2, N3, N4, N5, N6, N7}, stride{S0, S1, S2, S3, + S4, S5, S6, S7} {} }; // ========================================================================== @@ -213,81 +206,81 @@ struct LayoutStride { /// compile-time constants. This speeds up index calculations. If /// both tile dimensions are powers of two, Kokkos can optimize /// further. -template < unsigned ArgN0 , unsigned ArgN1 , - bool IsPowerOfTwo = ( Impl::is_integral_power_of_two(ArgN0) && - Impl::is_integral_power_of_two(ArgN1) ) - > +template struct LayoutTileLeft { - - static_assert( Impl::is_integral_power_of_two(ArgN0) && - Impl::is_integral_power_of_two(ArgN1) - , "LayoutTileLeft must be given power-of-two tile dimensions" ); + static_assert(Impl::is_integral_power_of_two(ArgN0) && + Impl::is_integral_power_of_two(ArgN1), + "LayoutTileLeft must be given power-of-two tile dimensions"); //! Tag this class as a kokkos array layout - typedef LayoutTileLeft array_layout ; + typedef LayoutTileLeft array_layout; enum { N0 = ArgN0 }; enum { N1 = ArgN1 }; - size_t dimension[ ARRAY_LAYOUT_MAX_RANK ] ; + size_t dimension[ARRAY_LAYOUT_MAX_RANK]; enum { is_extent_constructible = true }; - LayoutTileLeft( LayoutTileLeft const & ) = default ; - LayoutTileLeft( LayoutTileLeft && ) = default ; - LayoutTileLeft & operator = ( LayoutTileLeft const & ) = default ; - LayoutTileLeft & operator = ( LayoutTileLeft && ) = default ; + LayoutTileLeft(LayoutTileLeft const&) = default; + LayoutTileLeft(LayoutTileLeft&&) = default; + LayoutTileLeft& operator=(LayoutTileLeft const&) = default; + LayoutTileLeft& operator=(LayoutTileLeft&&) = default; KOKKOS_INLINE_FUNCTION - explicit constexpr - LayoutTileLeft( size_t argN0 = 0 , size_t argN1 = 0 , size_t argN2 = 0 , size_t argN3 = 0 - , size_t argN4 = 0 , size_t argN5 = 0 , size_t argN6 = 0 , size_t argN7 = 0 - ) - : dimension { argN0 , argN1 , argN2 , argN3 , argN4 , argN5 , argN6 , argN7 } {} + explicit constexpr LayoutTileLeft(size_t argN0 = 0, size_t argN1 = 0, + size_t argN2 = 0, size_t argN3 = 0, + size_t argN4 = 0, size_t argN5 = 0, + size_t argN6 = 0, size_t argN7 = 0) + : dimension{argN0, argN1, argN2, argN3, argN4, argN5, argN6, argN7} {} }; -#endif // KOKKOS_ENABLE_DEPRECATED_CODE +#endif // KOKKOS_ENABLE_DEPRECATED_CODE // =================================================================================== ////////////////////////////////////////////////////////////////////////////////////// -enum class Iterate -{ +enum class Iterate { Default, - Left, // Left indices stride fastest - Right // Right indices stride fastest + Left, // Left indices stride fastest + Right // Right indices stride fastest }; // To check for LayoutTiled -// This is to hide extra compile-time 'identifier' info within the LayoutTiled class by not relying on template specialization to include the ArgN*'s -template < typename LayoutTiledCheck, class Enable = void > +// This is to hide extra compile-time 'identifier' info within the LayoutTiled +// class by not relying on template specialization to include the ArgN*'s +template struct is_layouttiled : std::false_type {}; #ifndef KOKKOS_ENABLE_DEPRECATED_CODE -template < typename LayoutTiledCheck > -struct is_layouttiled< LayoutTiledCheck, typename std::enable_if::type > : std::true_type {}; +template +struct is_layouttiled< + LayoutTiledCheck, + typename std::enable_if::type> + : std::true_type {}; namespace Experimental { /// LayoutTiled // Must have Rank >= 2 -template < Kokkos::Iterate OuterP, Kokkos::Iterate InnerP, - unsigned ArgN0 , unsigned ArgN1 , unsigned ArgN2 = 0, unsigned ArgN3 = 0, unsigned ArgN4 = 0, unsigned ArgN5 = 0, unsigned ArgN6 = 0, unsigned ArgN7 = 0, - bool IsPowerOfTwo = - ( Kokkos::Impl::is_integral_power_of_two(ArgN0) && - Kokkos::Impl::is_integral_power_of_two(ArgN1) && - (Kokkos::Impl::is_integral_power_of_two(ArgN2) || (ArgN2 == 0) ) && - (Kokkos::Impl::is_integral_power_of_two(ArgN3) || (ArgN3 == 0) ) && - (Kokkos::Impl::is_integral_power_of_two(ArgN4) || (ArgN4 == 0) ) && - (Kokkos::Impl::is_integral_power_of_two(ArgN5) || (ArgN5 == 0) ) && - (Kokkos::Impl::is_integral_power_of_two(ArgN6) || (ArgN6 == 0) ) && - (Kokkos::Impl::is_integral_power_of_two(ArgN7) || (ArgN7 == 0) ) - ) - > +template < + Kokkos::Iterate OuterP, Kokkos::Iterate InnerP, unsigned ArgN0, + unsigned ArgN1, unsigned ArgN2 = 0, unsigned ArgN3 = 0, unsigned ArgN4 = 0, + unsigned ArgN5 = 0, unsigned ArgN6 = 0, unsigned ArgN7 = 0, + bool IsPowerOfTwo = + (Kokkos::Impl::is_integral_power_of_two(ArgN0) && + Kokkos::Impl::is_integral_power_of_two(ArgN1) && + (Kokkos::Impl::is_integral_power_of_two(ArgN2) || (ArgN2 == 0)) && + (Kokkos::Impl::is_integral_power_of_two(ArgN3) || (ArgN3 == 0)) && + (Kokkos::Impl::is_integral_power_of_two(ArgN4) || (ArgN4 == 0)) && + (Kokkos::Impl::is_integral_power_of_two(ArgN5) || (ArgN5 == 0)) && + (Kokkos::Impl::is_integral_power_of_two(ArgN6) || (ArgN6 == 0)) && + (Kokkos::Impl::is_integral_power_of_two(ArgN7) || (ArgN7 == 0)))> struct LayoutTiled { - - static_assert( IsPowerOfTwo - , "LayoutTiled must be given power-of-two tile dimensions" ); + static_assert(IsPowerOfTwo, + "LayoutTiled must be given power-of-two tile dimensions"); #if 0 static_assert( (Impl::is_integral_power_of_two(ArgN0) ) && @@ -301,7 +294,9 @@ struct LayoutTiled { , "LayoutTiled must be given power-of-two tile dimensions" ); #endif - typedef LayoutTiled array_layout ; + typedef LayoutTiled + array_layout; static constexpr Iterate outer_pattern = OuterP; static constexpr Iterate inner_pattern = InnerP; @@ -314,79 +309,93 @@ struct LayoutTiled { enum { N6 = ArgN6 }; enum { N7 = ArgN7 }; - size_t dimension[ ARRAY_LAYOUT_MAX_RANK ] ; + size_t dimension[ARRAY_LAYOUT_MAX_RANK]; enum { is_extent_constructible = true }; - LayoutTiled( LayoutTiled const & ) = default ; - LayoutTiled( LayoutTiled && ) = default ; - LayoutTiled & operator = ( LayoutTiled const & ) = default ; - LayoutTiled & operator = ( LayoutTiled && ) = default ; + LayoutTiled(LayoutTiled const&) = default; + LayoutTiled(LayoutTiled&&) = default; + LayoutTiled& operator=(LayoutTiled const&) = default; + LayoutTiled& operator=(LayoutTiled&&) = default; KOKKOS_INLINE_FUNCTION - explicit constexpr - LayoutTiled( size_t argN0 = 0 , size_t argN1 = 0 , size_t argN2 = 0 , size_t argN3 = 0 - , size_t argN4 = 0 , size_t argN5 = 0 , size_t argN6 = 0 , size_t argN7 = 0 - ) - : dimension { argN0 , argN1 , argN2 , argN3 , argN4 , argN5 , argN6 , argN7 } {} + explicit constexpr LayoutTiled(size_t argN0 = 0, size_t argN1 = 0, + size_t argN2 = 0, size_t argN3 = 0, + size_t argN4 = 0, size_t argN5 = 0, + size_t argN6 = 0, size_t argN7 = 0) + : dimension{argN0, argN1, argN2, argN3, argN4, argN5, argN6, argN7} {} }; -} // namespace Experimental +} // namespace Experimental #endif - // For use with view_copy -template < typename ... Layout > +template struct layout_iterate_type_selector { - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Default ; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Default ; + static const Kokkos::Iterate outer_iteration_pattern = + Kokkos::Iterate::Default; + static const Kokkos::Iterate inner_iteration_pattern = + Kokkos::Iterate::Default; }; template <> -struct layout_iterate_type_selector< Kokkos::LayoutRight > { - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Right ; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Right ; +struct layout_iterate_type_selector { + static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Right; + static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Right; }; template <> -struct layout_iterate_type_selector< Kokkos::LayoutLeft > { - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Left ; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Left ; +struct layout_iterate_type_selector { + static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Left; + static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Left; }; template <> -struct layout_iterate_type_selector< Kokkos::LayoutStride > { - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Default ; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Default ; +struct layout_iterate_type_selector { + static const Kokkos::Iterate outer_iteration_pattern = + Kokkos::Iterate::Default; + static const Kokkos::Iterate inner_iteration_pattern = + Kokkos::Iterate::Default; }; #ifndef KOKKOS_ENABLE_DEPRECATED_CODE -template < unsigned ArgN0 , unsigned ArgN1 , unsigned ArgN2 , unsigned ArgN3 , unsigned ArgN4 , unsigned ArgN5 , unsigned ArgN6 , unsigned ArgN7 > -struct layout_iterate_type_selector< Kokkos::Experimental::LayoutTiled > { - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Left ; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Left ; +template +struct layout_iterate_type_selector > { + static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Left; + static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Left; }; -template < unsigned ArgN0 , unsigned ArgN1 , unsigned ArgN2 , unsigned ArgN3 , unsigned ArgN4 , unsigned ArgN5 , unsigned ArgN6 , unsigned ArgN7 > -struct layout_iterate_type_selector< Kokkos::Experimental::LayoutTiled > { - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Right ; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Left ; +template +struct layout_iterate_type_selector > { + static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Right; + static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Left; }; -template < unsigned ArgN0 , unsigned ArgN1 , unsigned ArgN2 , unsigned ArgN3 , unsigned ArgN4 , unsigned ArgN5 , unsigned ArgN6 , unsigned ArgN7 > -struct layout_iterate_type_selector< Kokkos::Experimental::LayoutTiled > { - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Left ; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Right ; +template +struct layout_iterate_type_selector > { + static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Left; + static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Right; }; -template < unsigned ArgN0 , unsigned ArgN1 , unsigned ArgN2 , unsigned ArgN3 , unsigned ArgN4 , unsigned ArgN5 , unsigned ArgN6 , unsigned ArgN7 > -struct layout_iterate_type_selector< Kokkos::Experimental::LayoutTiled > { - static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Right ; - static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Right ; +template +struct layout_iterate_type_selector > { + static const Kokkos::Iterate outer_iteration_pattern = Kokkos::Iterate::Right; + static const Kokkos::Iterate inner_iteration_pattern = Kokkos::Iterate::Right; }; #endif -} // namespace Kokkos - -#endif // #ifndef KOKKOS_LAYOUT_HPP +} // namespace Kokkos +#endif // #ifndef KOKKOS_LAYOUT_HPP diff --git a/lib/kokkos/core/src/Kokkos_Macros.hpp b/lib/kokkos/core/src/Kokkos_Macros.hpp index 6b8ae02f82..5649d12e97 100644 --- a/lib/kokkos/core/src/Kokkos_Macros.hpp +++ b/lib/kokkos/core/src/Kokkos_Macros.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -52,15 +53,16 @@ * KOKKOS_ENABLE_QTHREADS Kokkos::Qthreads execution space * KOKKOS_ENABLE_HPX Kokkos::Experimental::HPX execution space * KOKKOS_ENABLE_OPENMP Kokkos::OpenMP execution space - * KOKKOS_ENABLE_OPENMPTARGET Kokkos::Experimental::OpenMPTarget execution space - * KOKKOS_ENABLE_HWLOC HWLOC library is available. + * KOKKOS_ENABLE_OPENMPTARGET Kokkos::Experimental::OpenMPTarget + * execution space KOKKOS_ENABLE_HWLOC HWLOC library is available. * KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK Insert array bounds checks, is expensive! - * KOKKOS_ENABLE_MPI Negotiate MPI/execution space interactions. - * KOKKOS_ENABLE_CUDA_UVM Use CUDA UVM for Cuda memory space. + * KOKKOS_ENABLE_MPI Negotiate MPI/execution space + * interactions. KOKKOS_ENABLE_CUDA_UVM Use CUDA UVM for Cuda memory + * space. */ #ifndef KOKKOS_DONT_INCLUDE_CORE_CONFIG_H - #include +#include #endif #include @@ -97,449 +99,461 @@ //---------------------------------------------------------------------------- -#if defined(KOKKOS_ENABLE_SERIAL) || defined(KOKKOS_ENABLE_THREADS) || \ +#if defined(KOKKOS_ENABLE_SERIAL) || defined(KOKKOS_ENABLE_THREADS) || \ defined(KOKKOS_ENABLE_OPENMP) || defined(KOKKOS_ENABLE_QTHREADS) || \ - defined(KOKKOS_ENABLE_HPX) || \ - defined(KOKKOS_ENABLE_ROCM) || defined(KOKKOS_ENABLE_OPENMPTARGET) - #define KOKKOS_INTERNAL_ENABLE_NON_CUDA_BACKEND + defined(KOKKOS_ENABLE_HPX) || defined(KOKKOS_ENABLE_ROCM) || \ + defined(KOKKOS_ENABLE_OPENMPTARGET) +#define KOKKOS_INTERNAL_ENABLE_NON_CUDA_BACKEND #endif -#if !defined(KOKKOS_ENABLE_THREADS) && !defined(KOKKOS_ENABLE_CUDA) && \ +#if !defined(KOKKOS_ENABLE_THREADS) && !defined(KOKKOS_ENABLE_CUDA) && \ !defined(KOKKOS_ENABLE_OPENMP) && !defined(KOKKOS_ENABLE_QTHREADS) && \ - !defined(KOKKOS_ENABLE_HPX) && \ - !defined(KOKKOS_ENABLE_ROCM) && !defined(KOKKOS_ENABLE_OPENMPTARGET) - #define KOKKOS_INTERNAL_NOT_PARALLEL + !defined(KOKKOS_ENABLE_HPX) && !defined(KOKKOS_ENABLE_ROCM) && \ + !defined(KOKKOS_ENABLE_OPENMPTARGET) +#define KOKKOS_INTERNAL_NOT_PARALLEL #endif #define KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA -#if defined( KOKKOS_ENABLE_CUDA ) && defined( __CUDACC__ ) - // Compiling with a CUDA compiler. - // - // Include to pick up the CUDA_VERSION macro defined as: - // CUDA_VERSION = ( MAJOR_VERSION * 1000 ) + ( MINOR_VERSION * 10 ) - // - // When generating device code the __CUDA_ARCH__ macro is defined as: - // __CUDA_ARCH__ = ( MAJOR_CAPABILITY * 100 ) + ( MINOR_CAPABILITY * 10 ) +#if defined(KOKKOS_ENABLE_CUDA) && defined(__CUDACC__) +// Compiling with a CUDA compiler. +// +// Include to pick up the CUDA_VERSION macro defined as: +// CUDA_VERSION = ( MAJOR_VERSION * 1000 ) + ( MINOR_VERSION * 10 ) +// +// When generating device code the __CUDA_ARCH__ macro is defined as: +// __CUDA_ARCH__ = ( MAJOR_CAPABILITY * 100 ) + ( MINOR_CAPABILITY * 10 ) - #include - #include +#include +#include - #if !defined( CUDA_VERSION ) - #error "#include did not define CUDA_VERSION." - #endif +#if !defined(CUDA_VERSION) +#error "#include did not define CUDA_VERSION." +#endif - #if ( CUDA_VERSION < 7000 ) - // CUDA supports C++11 in device code starting with version 7.0. - // This includes auto type and device code internal lambdas. - #error "Cuda version 7.0 or greater required." - #endif +#if (CUDA_VERSION < 7000) +// CUDA supports C++11 in device code starting with version 7.0. +// This includes auto type and device code internal lambdas. +#error "Cuda version 7.0 or greater required." +#endif - #if defined( __CUDA_ARCH__ ) && ( __CUDA_ARCH__ < 300 ) - // Compiling with CUDA compiler for device code. - #error "Cuda device capability >= 3.0 is required." - #endif +#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ < 300) +// Compiling with CUDA compiler for device code. +#error "Cuda device capability >= 3.0 is required." +#endif - #ifdef KOKKOS_ENABLE_CUDA_LAMBDA - #if ( CUDA_VERSION < 7050 ) - // CUDA supports C++11 lambdas generated in host code to be given - // to the device starting with version 7.5. But the release candidate (7.5.6) - // still identifies as 7.0. - #error "Cuda version 7.5 or greater required for host-to-device Lambda support." - #endif +#ifdef KOKKOS_ENABLE_CUDA_LAMBDA +#if (CUDA_VERSION < 7050) +// CUDA supports C++11 lambdas generated in host code to be given +// to the device starting with version 7.5. But the release candidate (7.5.6) +// still identifies as 7.0. +#error "Cuda version 7.5 or greater required for host-to-device Lambda support." +#endif - #if ( CUDA_VERSION < 8000 ) && defined( __NVCC__ ) - #define KOKKOS_LAMBDA [=]__device__ - #if defined( KOKKOS_INTERNAL_ENABLE_NON_CUDA_BACKEND ) - #undef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA - #endif - #else - #define KOKKOS_LAMBDA [=]__host__ __device__ +#if (CUDA_VERSION < 8000) && defined(__NVCC__) +#define KOKKOS_LAMBDA [=] __device__ +#if defined(KOKKOS_INTERNAL_ENABLE_NON_CUDA_BACKEND) +#undef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA +#endif +#else +#define KOKKOS_LAMBDA [=] __host__ __device__ - #if defined( KOKKOS_ENABLE_CXX17 ) || defined( KOKKOS_ENABLE_CXX20 ) - #define KOKKOS_CLASS_LAMBDA [=,*this] __host__ __device__ - #endif - #endif +#if defined(KOKKOS_ENABLE_CXX17) || defined(KOKKOS_ENABLE_CXX20) +#define KOKKOS_CLASS_LAMBDA [ =, *this ] __host__ __device__ +#endif +#endif - #if defined( __NVCC__ ) - #define KOKKOS_IMPL_NEED_FUNCTOR_WRAPPER - #endif - #else // !defined(KOKKOS_ENABLE_CUDA_LAMBDA) - #undef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA - #endif // !defined(KOKKOS_ENABLE_CUDA_LAMBDA) +#if defined(__NVCC__) +#define KOKKOS_IMPL_NEED_FUNCTOR_WRAPPER +#endif +#else // !defined(KOKKOS_ENABLE_CUDA_LAMBDA) +#undef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA +#endif // !defined(KOKKOS_ENABLE_CUDA_LAMBDA) - #if ( 9000 <= CUDA_VERSION ) && ( CUDA_VERSION < 10000 ) - // CUDA 9 introduced an incorrect warning, - // see https://github.com/kokkos/kokkos/issues/1470 - #define KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND - #endif +#if (9000 <= CUDA_VERSION) && (CUDA_VERSION < 10000) +// CUDA 9 introduced an incorrect warning, +// see https://github.com/kokkos/kokkos/issues/1470 +#define KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND +#endif - #if ( 10000 > CUDA_VERSION ) - #define KOKKOS_ENABLE_PRE_CUDA_10_DEPRECATION_API - #endif +#if (10000 > CUDA_VERSION) +#define KOKKOS_ENABLE_PRE_CUDA_10_DEPRECATION_API +#endif - #if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 700) - // PTX atomics with memory order semantics are only available on volta and later - #if !defined(KOKKOS_DISABLE_CUDA_ASM) - #if !defined(KOKKOS_ENABLE_CUDA_ASM) - #define KOKKOS_ENABLE_CUDA_ASM - #if !defined(KOKKOS_DISABLE_CUDA_ASM_ATOMICS) - #define KOKKOS_ENABLE_CUDA_ASM_ATOMICS - #endif - #endif - #endif - #endif - - -#endif // #if defined( KOKKOS_ENABLE_CUDA ) && defined( __CUDACC__ ) +#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 700) +// PTX atomics with memory order semantics are only available on volta and later +#if !defined(KOKKOS_DISABLE_CUDA_ASM) +#if !defined(KOKKOS_ENABLE_CUDA_ASM) +#define KOKKOS_ENABLE_CUDA_ASM +#if !defined(KOKKOS_DISABLE_CUDA_ASM_ATOMICS) +#define KOKKOS_ENABLE_CUDA_ASM_ATOMICS +#endif +#endif +#endif +#endif +#endif // #if defined( KOKKOS_ENABLE_CUDA ) && defined( __CUDACC__ ) //---------------------------------------------------------------------------- // Mapping compiler built-ins to KOKKOS_COMPILER_*** macros -#if defined( __NVCC__ ) - // NVIDIA compiler is being used. - // Code is parsed and separated into host and device code. - // Host code is compiled again with another compiler. - // Device code is compile to 'ptx'. - #define KOKKOS_COMPILER_NVCC __NVCC__ -#endif // #if defined( __NVCC__ ) +#if defined(__NVCC__) +// NVIDIA compiler is being used. +// Code is parsed and separated into host and device code. +// Host code is compiled again with another compiler. +// Device code is compile to 'ptx'. +#define KOKKOS_COMPILER_NVCC __NVCC__ +#endif // #if defined( __NVCC__ ) -#if !defined( KOKKOS_LAMBDA ) - #define KOKKOS_LAMBDA [=] +#if !defined(KOKKOS_LAMBDA) +#define KOKKOS_LAMBDA [=] #endif -#if (defined( KOKKOS_ENABLE_CXX17 ) || defined( KOKKOS_ENABLE_CXX20) )&& !defined( KOKKOS_CLASS_LAMBDA ) - #define KOKKOS_CLASS_LAMBDA [=,*this] +#if (defined(KOKKOS_ENABLE_CXX17) || defined(KOKKOS_ENABLE_CXX20)) && \ + !defined(KOKKOS_CLASS_LAMBDA) +#define KOKKOS_CLASS_LAMBDA [ =, *this ] #endif //#if !defined( __CUDA_ARCH__ ) // Not compiling Cuda code to 'ptx'. // Intel compiler for host code. -#if defined( __INTEL_COMPILER ) - #define KOKKOS_COMPILER_INTEL __INTEL_COMPILER -#elif defined( __ICC ) - // Old define - #define KOKKOS_COMPILER_INTEL __ICC -#elif defined( __ECC ) - // Very old define - #define KOKKOS_COMPILER_INTEL __ECC +#if defined(__INTEL_COMPILER) +#define KOKKOS_COMPILER_INTEL __INTEL_COMPILER +#elif defined(__ICC) +// Old define +#define KOKKOS_COMPILER_INTEL __ICC +#elif defined(__ECC) +// Very old define +#define KOKKOS_COMPILER_INTEL __ECC #endif // CRAY compiler for host code -#if defined( _CRAYC ) - #define KOKKOS_COMPILER_CRAYC _CRAYC +#if defined(_CRAYC) +#define KOKKOS_COMPILER_CRAYC _CRAYC #endif -#if defined( __IBMCPP__ ) - // IBM C++ - #define KOKKOS_COMPILER_IBM __IBMCPP__ -#elif defined( __IBMC__ ) - #define KOKKOS_COMPILER_IBM __IBMC__ +#if defined(__IBMCPP__) +// IBM C++ +#define KOKKOS_COMPILER_IBM __IBMCPP__ +#elif defined(__IBMC__) +#define KOKKOS_COMPILER_IBM __IBMC__ #endif -#if defined( __APPLE_CC__ ) - #define KOKKOS_COMPILER_APPLECC __APPLE_CC__ +#if defined(__APPLE_CC__) +#define KOKKOS_COMPILER_APPLECC __APPLE_CC__ #endif -#if defined( __clang__ ) && !defined( KOKKOS_COMPILER_INTEL ) - #define KOKKOS_COMPILER_CLANG __clang_major__*100+__clang_minor__*10+__clang_patchlevel__ +#if defined(__clang__) && !defined(KOKKOS_COMPILER_INTEL) +#define KOKKOS_COMPILER_CLANG \ + __clang_major__ * 100 + __clang_minor__ * 10 + __clang_patchlevel__ #endif -#if !defined( __clang__ ) && !defined( KOKKOS_COMPILER_INTEL ) &&defined( __GNUC__ ) - #define KOKKOS_COMPILER_GNU __GNUC__*100+__GNUC_MINOR__*10+__GNUC_PATCHLEVEL__ +#if !defined(__clang__) && !defined(KOKKOS_COMPILER_INTEL) && defined(__GNUC__) +#define KOKKOS_COMPILER_GNU \ + __GNUC__ * 100 + __GNUC_MINOR__ * 10 + __GNUC_PATCHLEVEL__ - #if ( 472 > KOKKOS_COMPILER_GNU ) - #error "Compiling with GCC version earlier than 4.7.2 is not supported." - #endif +#if (472 > KOKKOS_COMPILER_GNU) +#error "Compiling with GCC version earlier than 4.7.2 is not supported." +#endif #endif -#if defined( __PGIC__ ) - #define KOKKOS_COMPILER_PGI __PGIC__*100+__PGIC_MINOR__*10+__PGIC_PATCHLEVEL__ +#if defined(__PGIC__) +#define KOKKOS_COMPILER_PGI \ + __PGIC__ * 100 + __PGIC_MINOR__ * 10 + __PGIC_PATCHLEVEL__ - #if ( 1540 > KOKKOS_COMPILER_PGI ) - #error "Compiling with PGI version earlier than 15.4 is not supported." - #endif +#if (1540 > KOKKOS_COMPILER_PGI) +#error "Compiling with PGI version earlier than 15.4 is not supported." +#endif #endif //#endif // #if !defined( __CUDA_ARCH__ ) //---------------------------------------------------------------------------- // Language info: C++, CUDA, OPENMP -#if defined( KOKKOS_ENABLE_CUDA ) - // Compiling Cuda code to 'ptx' +#if defined(KOKKOS_ENABLE_CUDA) +// Compiling Cuda code to 'ptx' - #define KOKKOS_FORCEINLINE_FUNCTION __device__ __host__ __forceinline__ - #define KOKKOS_INLINE_FUNCTION __device__ __host__ inline - #define KOKKOS_FUNCTION __device__ __host__ - #if defined( KOKKOS_COMPILER_NVCC ) - #define KOKKOS_INLINE_FUNCTION_DELETED inline - #else - #define KOKKOS_INLINE_FUNCTION_DELETED __device__ __host__ inline - #endif -#endif // #if defined( __CUDA_ARCH__ ) +#define KOKKOS_FORCEINLINE_FUNCTION __device__ __host__ __forceinline__ +#define KOKKOS_IMPL_FORCEINLINE __forceinline__ +#define KOKKOS_INLINE_FUNCTION __device__ __host__ inline +#define KOKKOS_FUNCTION __device__ __host__ +#if defined(KOKKOS_COMPILER_NVCC) +#define KOKKOS_INLINE_FUNCTION_DELETED inline +#else +#define KOKKOS_INLINE_FUNCTION_DELETED __device__ __host__ inline +#endif +#endif // #if defined( __CUDA_ARCH__ ) -#if defined( KOKKOS_ENABLE_ROCM ) && defined( __HCC__ ) +#if defined(KOKKOS_ENABLE_ROCM) && defined(__HCC__) - #define KOKKOS_FORCEINLINE_FUNCTION __attribute__((amp,cpu)) inline - #define KOKKOS_INLINE_FUNCTION __attribute__((amp,cpu)) inline - #define KOKKOS_FUNCTION __attribute__((amp,cpu)) - #define KOKKOS_LAMBDA [=] __attribute__((amp,cpu)) +#define KOKKOS_FORCEINLINE_FUNCTION __attribute__((amp, cpu)) inline +#define KOKKOS_INLINE_FUNCTION __attribute__((amp, cpu)) inline +#define KOKKOS_FUNCTION __attribute__((amp, cpu)) +#define KOKKOS_LAMBDA [=] __attribute__((amp, cpu)) #endif -#if defined( _OPENMP ) - // Compiling with OpenMP. - // The value of _OPENMP is an integer value YYYYMM - // where YYYY and MM are the year and month designation - // of the supported OpenMP API version. -#endif // #if defined( _OPENMP ) +#if defined(_OPENMP) +// Compiling with OpenMP. +// The value of _OPENMP is an integer value YYYYMM +// where YYYY and MM are the year and month designation +// of the supported OpenMP API version. +#endif // #if defined( _OPENMP ) //---------------------------------------------------------------------------- // Intel compiler macros -#if defined( KOKKOS_COMPILER_INTEL ) - #define KOKKOS_ENABLE_PRAGMA_UNROLL 1 - #define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 - #define KOKKOS_ENABLE_PRAGMA_VECTOR 1 - #if ( 1800 > KOKKOS_COMPILER_INTEL ) - #define KOKKOS_ENABLE_PRAGMA_SIMD 1 - #endif +#if defined(KOKKOS_COMPILER_INTEL) +#define KOKKOS_ENABLE_PRAGMA_UNROLL 1 +#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 +#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 +#if (1800 > KOKKOS_COMPILER_INTEL) +#define KOKKOS_ENABLE_PRAGMA_SIMD 1 +#endif - #if ( __INTEL_COMPILER > 1400 ) - #define KOKKOS_ENABLE_PRAGMA_IVDEP 1 - #endif +#if (__INTEL_COMPILER > 1400) +#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 +#endif - #if ! defined( KOKKOS_MEMORY_ALIGNMENT ) - #define KOKKOS_MEMORY_ALIGNMENT 64 - #endif +#if !defined(KOKKOS_MEMORY_ALIGNMENT) +#define KOKKOS_MEMORY_ALIGNMENT 64 +#endif - #define KOKKOS_RESTRICT __restrict__ +#define KOKKOS_RESTRICT __restrict__ - #ifndef KOKKOS_IMPL_ALIGN_PTR - #define KOKKOS_IMPL_ALIGN_PTR(size) __attribute__((align_value(size))) - #endif +#ifndef KOKKOS_IMPL_ALIGN_PTR +#define KOKKOS_IMPL_ALIGN_PTR(size) __attribute__((align_value(size))) +#endif - #if ( 1400 > KOKKOS_COMPILER_INTEL ) - #if ( 1300 > KOKKOS_COMPILER_INTEL ) - #error "Compiling with Intel version earlier than 13.0 is not supported. Official minimal version is 14.0." - #else - #warning "Compiling with Intel version 13.x probably works but is not officially supported. Official minimal version is 14.0." - #endif - #endif +#if (1400 > KOKKOS_COMPILER_INTEL) +#if (1300 > KOKKOS_COMPILER_INTEL) +#error \ + "Compiling with Intel version earlier than 13.0 is not supported. Official minimal version is 14.0." +#else +#warning \ + "Compiling with Intel version 13.x probably works but is not officially supported. Official minimal version is 14.0." +#endif +#endif - #if !defined( KOKKOS_ENABLE_ASM ) && !defined( _WIN32 ) - #define KOKKOS_ENABLE_ASM 1 - #endif +#if !defined(KOKKOS_ENABLE_ASM) && !defined(_WIN32) +#define KOKKOS_ENABLE_ASM 1 +#endif - #if !defined( KOKKOS_FORCEINLINE_FUNCTION ) - #if !defined( _WIN32 ) - #define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline)) - #else - #define KOKKOS_FORCEINLINE_FUNCTION inline - #endif - #endif +#if !defined(KOKKOS_FORCEINLINE_FUNCTION) +#if !defined(_WIN32) +#define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline)) +#define KOKKOS_IMPL_FORCEINLINE __attribute__((always_inline)) +#else +#define KOKKOS_FORCEINLINE_FUNCTION inline +#endif +#endif - #if defined( KOKKOS_ARCH_AVX512MIC ) - #define KOKKOS_ENABLE_RFO_PREFETCH 1 - #if (KOKKOS_COMPILER_INTEL < 1800) && !defined(KOKKOS_KNL_USE_ASM_WORKAROUND) - #define KOKKOS_KNL_USE_ASM_WORKAROUND 1 - #endif - #endif +#if defined(KOKKOS_ARCH_AVX512MIC) +#define KOKKOS_ENABLE_RFO_PREFETCH 1 +#if (KOKKOS_COMPILER_INTEL < 1800) && !defined(KOKKOS_KNL_USE_ASM_WORKAROUND) +#define KOKKOS_KNL_USE_ASM_WORKAROUND 1 +#endif +#endif - #if defined( __MIC__ ) - // Compiling for Xeon Phi - #endif +#if defined(__MIC__) +// Compiling for Xeon Phi +#endif #endif //---------------------------------------------------------------------------- // Cray compiler macros -#if defined( KOKKOS_COMPILER_CRAYC ) +#if defined(KOKKOS_COMPILER_CRAYC) #endif //---------------------------------------------------------------------------- // IBM Compiler macros -#if defined( KOKKOS_COMPILER_IBM ) - #define KOKKOS_ENABLE_PRAGMA_UNROLL 1 - //#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 - //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 - //#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 - //#define KOKKOS_ENABLE_PRAGMA_SIMD 1 +#if defined(KOKKOS_COMPILER_IBM) +#define KOKKOS_ENABLE_PRAGMA_UNROLL 1 +//#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 +//#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 +//#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 +//#define KOKKOS_ENABLE_PRAGMA_SIMD 1 - #if ! defined( KOKKOS_ENABLE_ASM ) - #define KOKKOS_ENABLE_ASM 1 - #endif +#if !defined(KOKKOS_ENABLE_ASM) +#define KOKKOS_ENABLE_ASM 1 +#endif #endif //---------------------------------------------------------------------------- // CLANG compiler macros -#if defined( KOKKOS_COMPILER_CLANG ) - //#define KOKKOS_ENABLE_PRAGMA_UNROLL 1 - //#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 - //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 - //#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 - //#define KOKKOS_ENABLE_PRAGMA_SIMD 1 +#if defined(KOKKOS_COMPILER_CLANG) +//#define KOKKOS_ENABLE_PRAGMA_UNROLL 1 +//#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 +//#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 +//#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 +//#define KOKKOS_ENABLE_PRAGMA_SIMD 1 - #if !defined( KOKKOS_FORCEINLINE_FUNCTION ) - #define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline)) - #endif +#if !defined(KOKKOS_FORCEINLINE_FUNCTION) +#define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline)) +#define KOKKOS_IMPL_FORCEINLINE __attribute__((always_inline)) +#endif - #if !defined( KOKKOS_IMPL_ALIGN_PTR ) - #define KOKKOS_IMPL_ALIGN_PTR(size) __attribute__((aligned(size))) - #endif +#if !defined(KOKKOS_IMPL_ALIGN_PTR) +#define KOKKOS_IMPL_ALIGN_PTR(size) __attribute__((aligned(size))) +#endif #endif //---------------------------------------------------------------------------- // GNU Compiler macros -#if defined( KOKKOS_COMPILER_GNU ) - //#define KOKKOS_ENABLE_PRAGMA_UNROLL 1 - //#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 - //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 - //#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 - //#define KOKKOS_ENABLE_PRAGMA_SIMD 1 +#if defined(KOKKOS_COMPILER_GNU) +//#define KOKKOS_ENABLE_PRAGMA_UNROLL 1 +//#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 +//#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 +//#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 +//#define KOKKOS_ENABLE_PRAGMA_SIMD 1 - #if defined( KOKKOS_ARCH_AVX512MIC ) - #define KOKKOS_ENABLE_RFO_PREFETCH 1 - #endif +#if defined(KOKKOS_ARCH_AVX512MIC) +#define KOKKOS_ENABLE_RFO_PREFETCH 1 +#endif - #if !defined( KOKKOS_FORCEINLINE_FUNCTION ) - #define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline)) - #endif +#if !defined(KOKKOS_FORCEINLINE_FUNCTION) +#define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline)) +#define KOKKOS_IMPL_FORCEINLINE __attribute__((always_inline)) +#endif - #define KOKKOS_RESTRICT __restrict__ +#define KOKKOS_RESTRICT __restrict__ - #if !defined( KOKKOS_ENABLE_ASM ) && !defined( __PGIC__ ) && \ - ( defined( __amd64 ) || defined( __amd64__ ) || \ - defined( __x86_64 ) || defined( __x86_64__ ) || \ - defined(__PPC64__) ) - #define KOKKOS_ENABLE_ASM 1 - #endif +#if !defined(KOKKOS_ENABLE_ASM) && !defined(__PGIC__) && \ + (defined(__amd64) || defined(__amd64__) || defined(__x86_64) || \ + defined(__x86_64__) || defined(__PPC64__)) +#define KOKKOS_ENABLE_ASM 1 +#endif #endif //---------------------------------------------------------------------------- -#if defined( KOKKOS_COMPILER_PGI ) - #define KOKKOS_ENABLE_PRAGMA_UNROLL 1 - #define KOKKOS_ENABLE_PRAGMA_IVDEP 1 - //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 - #define KOKKOS_ENABLE_PRAGMA_VECTOR 1 - //#define KOKKOS_ENABLE_PRAGMA_SIMD 1 +#if defined(KOKKOS_COMPILER_PGI) +#define KOKKOS_ENABLE_PRAGMA_UNROLL 1 +#define KOKKOS_ENABLE_PRAGMA_IVDEP 1 +//#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1 +#define KOKKOS_ENABLE_PRAGMA_VECTOR 1 +//#define KOKKOS_ENABLE_PRAGMA_SIMD 1 #endif //---------------------------------------------------------------------------- -#if defined( KOKKOS_COMPILER_NVCC ) - #if defined( __CUDA_ARCH__ ) - #define KOKKOS_ENABLE_PRAGMA_UNROLL 1 - #endif +#if defined(KOKKOS_COMPILER_NVCC) +#if defined(__CUDA_ARCH__) +#define KOKKOS_ENABLE_PRAGMA_UNROLL 1 +#endif #endif //---------------------------------------------------------------------------- // Define function marking macros if compiler specific macros are undefined: -#if !defined( KOKKOS_FORCEINLINE_FUNCTION ) - define KOKKOS_FORCEINLINE_FUNCTION inline +#if !defined(KOKKOS_FORCEINLINE_FUNCTION) +#define KOKKOS_FORCEINLINE_FUNCTION inline #endif -#if !defined( KOKKOS_INLINE_FUNCTION ) - #define KOKKOS_INLINE_FUNCTION inline +#if !defined(KOKKOS_IMPL_FORCEINLINE) +#define KOKKOS_IMPL_FORCEINLINE inline #endif -#if !defined( KOKKOS_FUNCTION ) - #define KOKKOS_FUNCTION /**/ +#if !defined(KOKKOS_INLINE_FUNCTION) +#define KOKKOS_INLINE_FUNCTION inline #endif -#if !defined( KOKKOS_INLINE_FUNCTION_DELETED ) - #define KOKKOS_INLINE_FUNCTION_DELETED inline +#if !defined(KOKKOS_FUNCTION) +#define KOKKOS_FUNCTION /**/ +#endif + +#if !defined(KOKKOS_INLINE_FUNCTION_DELETED) +#define KOKKOS_INLINE_FUNCTION_DELETED inline #endif //---------------------------------------------------------------------------- // Define empty macro for restrict if necessary: -#if !defined( KOKKOS_RESTRICT ) - #define KOKKOS_RESTRICT +#if !defined(KOKKOS_RESTRICT) +#define KOKKOS_RESTRICT #endif //---------------------------------------------------------------------------- // Define Macro for alignment: -#if ! defined( KOKKOS_MEMORY_ALIGNMENT ) - #define KOKKOS_MEMORY_ALIGNMENT 64 +#if !defined(KOKKOS_MEMORY_ALIGNMENT) +#define KOKKOS_MEMORY_ALIGNMENT 64 #endif -#if ! defined( KOKKOS_MEMORY_ALIGNMENT_THRESHOLD ) - #define KOKKOS_MEMORY_ALIGNMENT_THRESHOLD 1 +#if !defined(KOKKOS_MEMORY_ALIGNMENT_THRESHOLD) +#define KOKKOS_MEMORY_ALIGNMENT_THRESHOLD 1 #endif -#if !defined( KOKKOS_IMPL_ALIGN_PTR ) - #define KOKKOS_IMPL_ALIGN_PTR(size) /* */ +#if !defined(KOKKOS_IMPL_ALIGN_PTR) +#define KOKKOS_IMPL_ALIGN_PTR(size) /* */ #endif //---------------------------------------------------------------------------- // Determine the default execution space for parallel dispatch. // There is zero or one default execution space specified. -#if 1 < ( ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) ? 1 : 0 ) + \ - ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM ) ? 1 : 0 ) + \ - ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET ) ? 1 : 0 ) + \ - ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) ? 1 : 0 ) + \ - ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) ? 1 : 0 ) + \ - ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) ? 1 : 0 ) + \ - ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX ) ? 1 : 0 ) + \ - ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) ? 1 : 0 ) ) - #error "More than one KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_* specified." +#if 1 < ((defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA) ? 1 : 0) + \ + (defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM) ? 1 : 0) + \ + (defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET) ? 1 : 0) + \ + (defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP) ? 1 : 0) + \ + (defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS) ? 1 : 0) + \ + (defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS) ? 1 : 0) + \ + (defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX) ? 1 : 0) + \ + (defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL) ? 1 : 0)) +#error "More than one KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_* specified." #endif // If default is not specified then chose from enabled execution spaces. // Priority: CUDA, OPENMP, THREADS, QTHREADS, HPX, SERIAL -#if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM ) -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET ) -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) +#if defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA) +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM) +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET) +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP) +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS) //#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX ) -#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) -#elif defined( KOKKOS_ENABLE_CUDA ) - #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA -#elif defined( KOKKOS_ENABLE_ROCM ) - #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM -#elif defined( KOKKOS_ENABLE_OPENMPTARGET ) - #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET -#elif defined( KOKKOS_ENABLE_OPENMP ) - #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP -#elif defined( KOKKOS_ENABLE_THREADS ) - #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX) +#elif defined(KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL) +#elif defined(KOKKOS_ENABLE_CUDA) +#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA +#elif defined(KOKKOS_ENABLE_ROCM) +#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM +#elif defined(KOKKOS_ENABLE_OPENMPTARGET) +#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET +#elif defined(KOKKOS_ENABLE_OPENMP) +#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP +#elif defined(KOKKOS_ENABLE_THREADS) +#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS //#elif defined( KOKKOS_ENABLE_QTHREADS ) // #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS -#elif defined( KOKKOS_ENABLE_HPX ) - #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX +#elif defined(KOKKOS_ENABLE_HPX) +#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX #else - #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL +#define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL #endif //---------------------------------------------------------------------------- // Determine for what space the code is being compiled: -#if defined( __CUDACC__ ) && defined( __CUDA_ARCH__ ) && defined( KOKKOS_ENABLE_CUDA ) - #define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA -#elif defined( __HCC__ ) && defined( __HCC_ACCELERATOR__ ) && defined( KOKKOS_ENABLE_ROCM ) - #define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_ROCM_GPU +#if defined(__CUDACC__) && defined(__CUDA_ARCH__) && defined(KOKKOS_ENABLE_CUDA) +#define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA +#elif defined(__HCC__) && defined(__HCC_ACCELERATOR__) && \ + defined(KOKKOS_ENABLE_ROCM) +#define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_ROCM_GPU #else - #define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST +#define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST #endif //---------------------------------------------------------------------------- -#if ( defined( _POSIX_C_SOURCE ) && _POSIX_C_SOURCE >= 200112L ) || \ - ( defined( _XOPEN_SOURCE ) && _XOPEN_SOURCE >= 600 ) - #if defined( KOKKOS_ENABLE_PERFORMANCE_POSIX_MEMALIGN ) - #define KOKKOS_ENABLE_POSIX_MEMALIGN 1 - #endif +#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \ + (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) +#if defined(KOKKOS_ENABLE_PERFORMANCE_POSIX_MEMALIGN) +#define KOKKOS_ENABLE_POSIX_MEMALIGN 1 +#endif #endif //---------------------------------------------------------------------------- @@ -547,53 +561,65 @@ // and use relocateable device code to enable the task policy. // nvcc relocatable device code option: --relocatable-device-code=true -#if ( defined( KOKKOS_ENABLE_CUDA ) ) - #if ( 8000 <= CUDA_VERSION ) && defined( KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE ) - #define KOKKOS_ENABLE_TASKDAG - #endif +#if (defined(KOKKOS_ENABLE_CUDA)) +#if (8000 <= CUDA_VERSION) && \ + defined(KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE) +#define KOKKOS_ENABLE_TASKDAG +#endif #else - #define KOKKOS_ENABLE_TASKDAG +#define KOKKOS_ENABLE_TASKDAG #endif - -#if defined ( KOKKOS_ENABLE_CUDA ) - #if ( 9000 <= CUDA_VERSION ) - #define KOKKOS_IMPL_CUDA_VERSION_9_WORKAROUND - #if ( __CUDA_ARCH__ ) - #define KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK - #endif - #endif +#if defined(KOKKOS_ENABLE_CUDA) +#if (9000 <= CUDA_VERSION) +#define KOKKOS_IMPL_CUDA_VERSION_9_WORKAROUND +#if (__CUDA_ARCH__) +#define KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK +#endif +#endif #endif #define KOKKOS_INVALID_INDEX (~std::size_t(0)) #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - #define KOKKOS_IMPL_CTOR_DEFAULT_ARG 0 +#define KOKKOS_IMPL_CTOR_DEFAULT_ARG 0 #else - #define KOKKOS_IMPL_CTOR_DEFAULT_ARG KOKKOS_INVALID_INDEX +#define KOKKOS_IMPL_CTOR_DEFAULT_ARG KOKKOS_INVALID_INDEX #endif -#if (defined(KOKKOS_ENABLE_CXX14) || defined(KOKKOS_ENABLE_CXX17) || defined(KOKKOS_ENABLE_CXX20)) - #define KOKKOS_CONSTEXPR_14 constexpr - #define KOKKOS_DEPRECATED [[deprecated]] - #define KOKKOS_DEPRECATED_TRAILING_ATTRIBUTE +#if (defined(KOKKOS_ENABLE_CXX14) || defined(KOKKOS_ENABLE_CXX17) || \ + defined(KOKKOS_ENABLE_CXX20)) +#define KOKKOS_CONSTEXPR_14 constexpr +#define KOKKOS_DEPRECATED [[deprecated]] +#define KOKKOS_DEPRECATED_TRAILING_ATTRIBUTE #else - #define KOKKOS_CONSTEXPR_14 - #if defined(KOKKOS_COMPILER_GNU) || defined(KOKKOS_COMPILER_CLANG) - #define KOKKOS_DEPRECATED - #define KOKKOS_DEPRECATED_TRAILING_ATTRIBUTE __attribute__ ((deprecated)) - #else - #define KOKKOS_DEPRECATED - #define KOKKOS_DEPRECATED_TRAILING_ATTRIBUTE - #endif +#define KOKKOS_CONSTEXPR_14 +#if defined(KOKKOS_COMPILER_GNU) || defined(KOKKOS_COMPILER_CLANG) +#define KOKKOS_DEPRECATED +#define KOKKOS_DEPRECATED_TRAILING_ATTRIBUTE __attribute__((deprecated)) +#else +#define KOKKOS_DEPRECATED +#define KOKKOS_DEPRECATED_TRAILING_ATTRIBUTE +#endif #endif - // DJS 05/28/2019: Bugfix: Issue 2155 -// Use KOKKOS_ENABLE_CUDA_LDG_INTRINSIC to avoid memory leak in RandomAccess View +// Use KOKKOS_ENABLE_CUDA_LDG_INTRINSIC to avoid memory leak in RandomAccess +// View #if defined(KOKKOS_ENABLE_CUDA) && !defined(KOKKOS_ENABLE_CUDA_LDG_INTRINSIC) - #define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC +#define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC #endif -#endif // #ifndef KOKKOS_MACROS_HPP +#if defined(KOKKOS_ENABLE_CXX17) || defined(KOKKOS_ENABLE_CXX20) +#define KOKKOS_ATTRIBUTE_NODISCARD [[nodiscard]] +#else +#define KOKKOS_ATTRIBUTE_NODISCARD +#endif +#if defined(KOKKOS_COMPILER_GNU) || defined(KOKKOS_COMPILER_CLANG) || \ + defined(KOKKOS_COMPILER_INTEL) || defined(KOKKOS_COMPILER_PGI) +#define KOKKOS_IMPL_ENABLE_STACKTRACE +#define KOKKOS_IMPL_ENABLE_CXXABI +#endif + +#endif // #ifndef KOKKOS_MACROS_HPP diff --git a/lib/kokkos/core/src/Kokkos_MasterLock.hpp b/lib/kokkos/core/src/Kokkos_MasterLock.hpp index 2db22d2fdd..3c45e131a0 100644 --- a/lib/kokkos/core/src/Kokkos_MasterLock.hpp +++ b/lib/kokkos/core/src/Kokkos_MasterLock.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -46,7 +47,8 @@ #include -namespace Kokkos { namespace Experimental { +namespace Kokkos { +namespace Experimental { // my be used to coordinate work between master instances // SHOULD NOT be used within a parallel algorithm @@ -67,7 +69,7 @@ namespace Kokkos { namespace Experimental { template class MasterLock; -}} // namespace Kokkos::Experimental - -#endif //KOKKOS_MASTER_LOCK_HPP +} // namespace Experimental +} // namespace Kokkos +#endif // KOKKOS_MASTER_LOCK_HPP diff --git a/lib/kokkos/core/src/Kokkos_MemoryPool.hpp b/lib/kokkos/core/src/Kokkos_MemoryPool.hpp index 365db2baec..5228f36612 100644 --- a/lib/kokkos/core/src/Kokkos_MemoryPool.hpp +++ b/lib/kokkos/core/src/Kokkos_MemoryPool.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -55,37 +56,34 @@ namespace Kokkos { namespace Impl { /* Report violation of size constraints: * min_block_alloc_size <= max_block_alloc_size - * max_block_alloc_size <= min_superblock_size + * max_block_alloc_size <= min_superblock_size * min_superblock_size <= max_superblock_size * min_superblock_size <= min_total_alloc_size - * min_superblock_size <= min_block_alloc_size * + * min_superblock_size <= min_block_alloc_size * * max_block_per_superblock */ -void memory_pool_bounds_verification - ( size_t min_block_alloc_size - , size_t max_block_alloc_size - , size_t min_superblock_size - , size_t max_superblock_size - , size_t max_block_per_superblock - , size_t min_total_alloc_size - ); -} -} +void memory_pool_bounds_verification(size_t min_block_alloc_size, + size_t max_block_alloc_size, + size_t min_superblock_size, + size_t max_superblock_size, + size_t max_block_per_superblock, + size_t min_total_alloc_size); +} // namespace Impl +} // namespace Kokkos namespace Kokkos { -template< typename DeviceType > +template class MemoryPool { -private: + private: + typedef typename Kokkos::Impl::concurrent_bitset CB; - typedef typename Kokkos::Impl::concurrent_bitset CB ; - - enum : uint32_t { bits_per_int_lg2 = CB::bits_per_int_lg2 }; - enum : uint32_t { state_shift = CB::state_shift }; - enum : uint32_t { state_used_mask = CB::state_used_mask }; + enum : uint32_t { bits_per_int_lg2 = CB::bits_per_int_lg2 }; + enum : uint32_t { state_shift = CB::state_shift }; + enum : uint32_t { state_used_mask = CB::state_used_mask }; enum : uint32_t { state_header_mask = CB::state_header_mask }; enum : uint32_t { max_bit_count_lg2 = CB::max_bit_count_lg2 }; - enum : uint32_t { max_bit_count = CB::max_bit_count }; + enum : uint32_t { max_bit_count = CB::max_bit_count }; enum : uint32_t { HINT_PER_BLOCK_SIZE = 2 }; @@ -109,231 +107,219 @@ private: * Thus A_block_size < B_block_size <=> A_block_state > B_block_state */ - typedef typename DeviceType::memory_space base_memory_space ; + typedef typename DeviceType::memory_space base_memory_space; - enum { accessible = - Kokkos::Impl::MemorySpaceAccess< Kokkos::HostSpace - , base_memory_space >::accessible }; + enum { + accessible = Kokkos::Impl::MemorySpaceAccess::accessible + }; - typedef Kokkos::Impl::SharedAllocationTracker Tracker ; - typedef Kokkos::Impl::SharedAllocationRecord - < base_memory_space > Record ; + typedef Kokkos::Impl::SharedAllocationTracker Tracker; + typedef Kokkos::Impl::SharedAllocationRecord Record; - Tracker m_tracker ; - uint32_t * m_sb_state_array ; - uint32_t m_sb_state_size ; - uint32_t m_sb_size_lg2 ; - uint32_t m_max_block_size_lg2 ; - uint32_t m_min_block_size_lg2 ; - int32_t m_sb_count ; - int32_t m_hint_offset ; // Offset to K * #block_size array of hints - int32_t m_data_offset ; // Offset to 0th superblock data - int32_t m_unused_padding ; - -public: + Tracker m_tracker; + uint32_t *m_sb_state_array; + uint32_t m_sb_state_size; + uint32_t m_sb_size_lg2; + uint32_t m_max_block_size_lg2; + uint32_t m_min_block_size_lg2; + int32_t m_sb_count; + int32_t m_hint_offset; // Offset to K * #block_size array of hints + int32_t m_data_offset; // Offset to 0th superblock data + int32_t m_unused_padding; + public: using memory_space = typename DeviceType::memory_space; /**\brief The maximum size of a superblock and block */ - enum : uint32_t { max_superblock_size = 1LU << 31 /* 2 gigabytes */ }; + enum : uint32_t { max_superblock_size = 1LU << 31 /* 2 gigabytes */ }; enum : uint32_t { max_block_per_superblock = max_bit_count }; //-------------------------------------------------------------------------- KOKKOS_INLINE_FUNCTION - bool operator==(MemoryPool const& other) const - { return m_sb_state_array == other.m_sb_state_array; } + bool operator==(MemoryPool const &other) const { + return m_sb_state_array == other.m_sb_state_array; + } KOKKOS_INLINE_FUNCTION - size_t capacity() const noexcept - { return size_t(m_sb_count) << m_sb_size_lg2 ; } + size_t capacity() const noexcept { + return size_t(m_sb_count) << m_sb_size_lg2; + } KOKKOS_INLINE_FUNCTION - size_t min_block_size() const noexcept - { return ( 1LU << m_min_block_size_lg2 ); } + size_t min_block_size() const noexcept { + return (1LU << m_min_block_size_lg2); + } KOKKOS_INLINE_FUNCTION - size_t max_block_size() const noexcept - { return ( 1LU << m_max_block_size_lg2 ); } + size_t max_block_size() const noexcept { + return (1LU << m_max_block_size_lg2); + } struct usage_statistics { - size_t capacity_bytes ; ///< Capacity in bytes - size_t superblock_bytes ; ///< Superblock size in bytes - size_t max_block_bytes ; ///< Maximum block size in bytes - size_t min_block_bytes ; ///< Minimum block size in bytes - size_t capacity_superblocks ; ///< Number of superblocks - size_t consumed_superblocks ; ///< Superblocks assigned to allocations - size_t consumed_blocks ; ///< Number of allocations - size_t consumed_bytes ; ///< Bytes allocated - size_t reserved_blocks ; ///< Unallocated blocks in assigned superblocks - size_t reserved_bytes ; ///< Unallocated bytes in assigned superblocks + size_t capacity_bytes; ///< Capacity in bytes + size_t superblock_bytes; ///< Superblock size in bytes + size_t max_block_bytes; ///< Maximum block size in bytes + size_t min_block_bytes; ///< Minimum block size in bytes + size_t capacity_superblocks; ///< Number of superblocks + size_t consumed_superblocks; ///< Superblocks assigned to allocations + size_t consumed_blocks; ///< Number of allocations + size_t consumed_bytes; ///< Bytes allocated + size_t reserved_blocks; ///< Unallocated blocks in assigned superblocks + size_t reserved_bytes; ///< Unallocated bytes in assigned superblocks }; - void get_usage_statistics( usage_statistics & stats ) const - { - Kokkos::HostSpace host ; + void get_usage_statistics(usage_statistics &stats) const { + Kokkos::HostSpace host; - const size_t alloc_size = m_hint_offset * sizeof(uint32_t); + const size_t alloc_size = m_hint_offset * sizeof(uint32_t); - uint32_t * const sb_state_array = - accessible ? m_sb_state_array : (uint32_t *) host.allocate(alloc_size); + uint32_t *const sb_state_array = + accessible ? m_sb_state_array : (uint32_t *)host.allocate(alloc_size); - if ( ! accessible ) { - Kokkos::Impl::DeepCopy< Kokkos::HostSpace , base_memory_space > - ( sb_state_array , m_sb_state_array , alloc_size ); - } + if (!accessible) { + Kokkos::Impl::DeepCopy( + sb_state_array, m_sb_state_array, alloc_size); + } - stats.superblock_bytes = ( 1LU << m_sb_size_lg2 ); - stats.max_block_bytes = ( 1LU << m_max_block_size_lg2 ); - stats.min_block_bytes = ( 1LU << m_min_block_size_lg2 ); - stats.capacity_bytes = stats.superblock_bytes * m_sb_count ; - stats.capacity_superblocks = m_sb_count ; - stats.consumed_superblocks = 0 ; - stats.consumed_blocks = 0 ; - stats.consumed_bytes = 0 ; - stats.reserved_blocks = 0 ; - stats.reserved_bytes = 0 ; + stats.superblock_bytes = (1LU << m_sb_size_lg2); + stats.max_block_bytes = (1LU << m_max_block_size_lg2); + stats.min_block_bytes = (1LU << m_min_block_size_lg2); + stats.capacity_bytes = stats.superblock_bytes * m_sb_count; + stats.capacity_superblocks = m_sb_count; + stats.consumed_superblocks = 0; + stats.consumed_blocks = 0; + stats.consumed_bytes = 0; + stats.reserved_blocks = 0; + stats.reserved_bytes = 0; - const uint32_t * sb_state_ptr = sb_state_array ; + const uint32_t *sb_state_ptr = sb_state_array; - for ( int32_t i = 0 ; i < m_sb_count - ; ++i , sb_state_ptr += m_sb_state_size ) { + for (int32_t i = 0; i < m_sb_count; ++i, sb_state_ptr += m_sb_state_size) { + const uint32_t block_count_lg2 = (*sb_state_ptr) >> state_shift; - const uint32_t block_count_lg2 = (*sb_state_ptr) >> state_shift ; + if (block_count_lg2) { + const uint32_t block_count = 1u << block_count_lg2; + const uint32_t block_size_lg2 = m_sb_size_lg2 - block_count_lg2; + const uint32_t block_size = 1u << block_size_lg2; + const uint32_t block_used = (*sb_state_ptr) & state_used_mask; - if ( block_count_lg2 ) { - const uint32_t block_count = 1u << block_count_lg2 ; - const uint32_t block_size_lg2 = m_sb_size_lg2 - block_count_lg2 ; - const uint32_t block_size = 1u << block_size_lg2 ; - const uint32_t block_used = (*sb_state_ptr) & state_used_mask ; - - stats.consumed_superblocks++ ; - stats.consumed_blocks += block_used ; - stats.consumed_bytes += block_used * block_size ; - stats.reserved_blocks += block_count - block_used ; - stats.reserved_bytes += (block_count - block_used ) * block_size ; - } - } - - if ( ! accessible ) { - host.deallocate( sb_state_array, alloc_size ); + stats.consumed_superblocks++; + stats.consumed_blocks += block_used; + stats.consumed_bytes += block_used * block_size; + stats.reserved_blocks += block_count - block_used; + stats.reserved_bytes += (block_count - block_used) * block_size; } } - void print_state( std::ostream & s ) const - { - Kokkos::HostSpace host ; + if (!accessible) { + host.deallocate(sb_state_array, alloc_size); + } + } - const size_t alloc_size = m_hint_offset * sizeof(uint32_t); + void print_state(std::ostream &s) const { + Kokkos::HostSpace host; - uint32_t * const sb_state_array = - accessible ? m_sb_state_array : (uint32_t *) host.allocate(alloc_size); + const size_t alloc_size = m_hint_offset * sizeof(uint32_t); - if ( ! accessible ) { - Kokkos::Impl::DeepCopy< Kokkos::HostSpace , base_memory_space > - ( sb_state_array , m_sb_state_array , alloc_size ); - } + uint32_t *const sb_state_array = + accessible ? m_sb_state_array : (uint32_t *)host.allocate(alloc_size); - const uint32_t * sb_state_ptr = sb_state_array ; + if (!accessible) { + Kokkos::Impl::DeepCopy( + sb_state_array, m_sb_state_array, alloc_size); + } - s << "pool_size(" << ( size_t(m_sb_count) << m_sb_size_lg2 ) << ")" - << " superblock_size(" << ( 1LU << m_sb_size_lg2 ) << ")" << std::endl ; + const uint32_t *sb_state_ptr = sb_state_array; - for ( int32_t i = 0 ; i < m_sb_count - ; ++i , sb_state_ptr += m_sb_state_size ) { + s << "pool_size(" << (size_t(m_sb_count) << m_sb_size_lg2) << ")" + << " superblock_size(" << (1LU << m_sb_size_lg2) << ")" << std::endl; - if ( *sb_state_ptr ) { + for (int32_t i = 0; i < m_sb_count; ++i, sb_state_ptr += m_sb_state_size) { + if (*sb_state_ptr) { + const uint32_t block_count_lg2 = (*sb_state_ptr) >> state_shift; + const uint32_t block_size_lg2 = m_sb_size_lg2 - block_count_lg2; + const uint32_t block_count = 1u << block_count_lg2; + const uint32_t block_used = (*sb_state_ptr) & state_used_mask; - const uint32_t block_count_lg2 = (*sb_state_ptr) >> state_shift ; - const uint32_t block_size_lg2 = m_sb_size_lg2 - block_count_lg2 ; - const uint32_t block_count = 1u << block_count_lg2 ; - const uint32_t block_used = (*sb_state_ptr) & state_used_mask ; - - s << "Superblock[ " << i << " / " << m_sb_count << " ] {" - << " block_size(" << ( 1 << block_size_lg2 ) << ")" - << " block_count( " << block_used - << " / " << block_count << " )" - << std::endl ; - } - } - - if ( ! accessible ) { - host.deallocate( sb_state_array, alloc_size ); + s << "Superblock[ " << i << " / " << m_sb_count << " ] {" + << " block_size(" << (1 << block_size_lg2) << ")" + << " block_count( " << block_used << " / " << block_count << " )" + << std::endl; } } + if (!accessible) { + host.deallocate(sb_state_array, alloc_size); + } + } + //-------------------------------------------------------------------------- #ifdef KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND - KOKKOS_INLINE_FUNCTION MemoryPool( MemoryPool && rhs ) - : m_tracker(std::move(rhs.m_tracker)) - , m_sb_state_array(std::move(rhs.m_sb_state_array)) - , m_sb_state_size(std::move(rhs.m_sb_state_size)) - , m_sb_size_lg2(std::move(rhs.m_sb_size_lg2)) - , m_max_block_size_lg2(std::move(rhs.m_max_block_size_lg2)) - , m_min_block_size_lg2(std::move(rhs.m_min_block_size_lg2)) - , m_sb_count(std::move(rhs.m_sb_count)) - , m_hint_offset(std::move(rhs.m_hint_offset)) - , m_data_offset(std::move(rhs.m_data_offset)) - { - } - KOKKOS_INLINE_FUNCTION MemoryPool( const MemoryPool & rhs ) - : m_tracker(rhs.m_tracker) - , m_sb_state_array(rhs.m_sb_state_array) - , m_sb_state_size(rhs.m_sb_state_size) - , m_sb_size_lg2(rhs.m_sb_size_lg2) - , m_max_block_size_lg2(rhs.m_max_block_size_lg2) - , m_min_block_size_lg2(rhs.m_min_block_size_lg2) - , m_sb_count(rhs.m_sb_count) - , m_hint_offset(rhs.m_hint_offset) - , m_data_offset(rhs.m_data_offset) - { - } - KOKKOS_INLINE_FUNCTION MemoryPool & operator = ( MemoryPool && rhs ) - { - m_tracker = std::move(rhs.m_tracker); - m_sb_state_array = std::move(rhs.m_sb_state_array); - m_sb_state_size = std::move(rhs.m_sb_state_size); - m_sb_size_lg2 = std::move(rhs.m_sb_size_lg2); + KOKKOS_INLINE_FUNCTION MemoryPool(MemoryPool &&rhs) + : m_tracker(std::move(rhs.m_tracker)), + m_sb_state_array(std::move(rhs.m_sb_state_array)), + m_sb_state_size(std::move(rhs.m_sb_state_size)), + m_sb_size_lg2(std::move(rhs.m_sb_size_lg2)), + m_max_block_size_lg2(std::move(rhs.m_max_block_size_lg2)), + m_min_block_size_lg2(std::move(rhs.m_min_block_size_lg2)), + m_sb_count(std::move(rhs.m_sb_count)), + m_hint_offset(std::move(rhs.m_hint_offset)), + m_data_offset(std::move(rhs.m_data_offset)) {} + KOKKOS_INLINE_FUNCTION MemoryPool(const MemoryPool &rhs) + : m_tracker(rhs.m_tracker), + m_sb_state_array(rhs.m_sb_state_array), + m_sb_state_size(rhs.m_sb_state_size), + m_sb_size_lg2(rhs.m_sb_size_lg2), + m_max_block_size_lg2(rhs.m_max_block_size_lg2), + m_min_block_size_lg2(rhs.m_min_block_size_lg2), + m_sb_count(rhs.m_sb_count), + m_hint_offset(rhs.m_hint_offset), + m_data_offset(rhs.m_data_offset) {} + KOKKOS_INLINE_FUNCTION MemoryPool &operator=(MemoryPool &&rhs) { + m_tracker = std::move(rhs.m_tracker); + m_sb_state_array = std::move(rhs.m_sb_state_array); + m_sb_state_size = std::move(rhs.m_sb_state_size); + m_sb_size_lg2 = std::move(rhs.m_sb_size_lg2); m_max_block_size_lg2 = std::move(rhs.m_max_block_size_lg2); m_min_block_size_lg2 = std::move(rhs.m_min_block_size_lg2); - m_sb_count = std::move(rhs.m_sb_count); - m_hint_offset = std::move(rhs.m_hint_offset); - m_data_offset = std::move(rhs.m_data_offset); + m_sb_count = std::move(rhs.m_sb_count); + m_hint_offset = std::move(rhs.m_hint_offset); + m_data_offset = std::move(rhs.m_data_offset); return *this; } - KOKKOS_INLINE_FUNCTION MemoryPool & operator = ( const MemoryPool & rhs ) - { - m_tracker = rhs.m_tracker; - m_sb_state_array = rhs.m_sb_state_array; - m_sb_state_size = rhs.m_sb_state_size; - m_sb_size_lg2 = rhs.m_sb_size_lg2; + KOKKOS_INLINE_FUNCTION MemoryPool &operator=(const MemoryPool &rhs) { + m_tracker = rhs.m_tracker; + m_sb_state_array = rhs.m_sb_state_array; + m_sb_state_size = rhs.m_sb_state_size; + m_sb_size_lg2 = rhs.m_sb_size_lg2; m_max_block_size_lg2 = rhs.m_max_block_size_lg2; m_min_block_size_lg2 = rhs.m_min_block_size_lg2; - m_sb_count = rhs.m_sb_count; - m_hint_offset = rhs.m_hint_offset; - m_data_offset = rhs.m_data_offset; + m_sb_count = rhs.m_sb_count; + m_hint_offset = rhs.m_hint_offset; + m_data_offset = rhs.m_data_offset; return *this; } #else - KOKKOS_INLINE_FUNCTION MemoryPool( MemoryPool && ) = default ; - KOKKOS_INLINE_FUNCTION MemoryPool( const MemoryPool & ) = default ; - KOKKOS_INLINE_FUNCTION MemoryPool & operator = ( MemoryPool && ) = default ; - KOKKOS_INLINE_FUNCTION MemoryPool & operator = ( const MemoryPool & ) = default ; + KOKKOS_INLINE_FUNCTION MemoryPool(MemoryPool &&) = default; + KOKKOS_INLINE_FUNCTION MemoryPool(const MemoryPool &) = default; + KOKKOS_INLINE_FUNCTION MemoryPool &operator=(MemoryPool &&) = default; + KOKKOS_INLINE_FUNCTION MemoryPool &operator=(const MemoryPool &) = default; #endif KOKKOS_INLINE_FUNCTION MemoryPool() - : m_tracker() - , m_sb_state_array(0) - , m_sb_state_size(0) - , m_sb_size_lg2(0) - , m_max_block_size_lg2(0) - , m_min_block_size_lg2(0) - , m_sb_count(0) - , m_hint_offset(0) - , m_data_offset(0) - , m_unused_padding(0) - {} + : m_tracker(), + m_sb_state_array(0), + m_sb_state_size(0), + m_sb_size_lg2(0), + m_max_block_size_lg2(0), + m_min_block_size_lg2(0), + m_sb_count(0), + m_hint_offset(0), + m_data_offset(0), + m_unused_padding(0) {} /**\brief Allocate a memory pool from 'memspace'. * @@ -349,221 +335,199 @@ public: * is also a power-of-two. These roundings are made to enable * significant runtime performance improvements. */ - MemoryPool( const base_memory_space & memspace - , const size_t min_total_alloc_size - , size_t min_block_alloc_size = 0 - , size_t max_block_alloc_size = 0 - , size_t min_superblock_size = 0 - ) - : m_tracker() - , m_sb_state_array(0) - , m_sb_state_size(0) - , m_sb_size_lg2(0) - , m_max_block_size_lg2(0) - , m_min_block_size_lg2(0) - , m_sb_count(0) - , m_hint_offset(0) - , m_data_offset(0) - , m_unused_padding(0) - { - const uint32_t int_align_lg2 = 3 ; /* align as int[8] */ - const uint32_t int_align_mask = ( 1u << int_align_lg2 ) - 1 ; - const uint32_t default_min_block_size = 1u << 6 ; /* 64 bytes */ - const uint32_t default_max_block_size = 1u << 12 ;/* 4k bytes */ - const uint32_t default_min_superblock_size = 1u << 20 ;/* 1M bytes */ + MemoryPool(const base_memory_space &memspace, + const size_t min_total_alloc_size, size_t min_block_alloc_size = 0, + size_t max_block_alloc_size = 0, size_t min_superblock_size = 0) + : m_tracker(), + m_sb_state_array(0), + m_sb_state_size(0), + m_sb_size_lg2(0), + m_max_block_size_lg2(0), + m_min_block_size_lg2(0), + m_sb_count(0), + m_hint_offset(0), + m_data_offset(0), + m_unused_padding(0) { + const uint32_t int_align_lg2 = 3; /* align as int[8] */ + const uint32_t int_align_mask = (1u << int_align_lg2) - 1; + const uint32_t default_min_block_size = 1u << 6; /* 64 bytes */ + const uint32_t default_max_block_size = 1u << 12; /* 4k bytes */ + const uint32_t default_min_superblock_size = 1u << 20; /* 1M bytes */ - //-------------------------------------------------- - // Default block and superblock sizes: + //-------------------------------------------------- + // Default block and superblock sizes: - if ( 0 == min_block_alloc_size ) { - // Default all sizes: + if (0 == min_block_alloc_size) { + // Default all sizes: - min_superblock_size = - std::min( size_t(default_min_superblock_size) - , min_total_alloc_size ); + min_superblock_size = + std::min(size_t(default_min_superblock_size), min_total_alloc_size); - min_block_alloc_size = - std::min( size_t(default_min_block_size) - , min_superblock_size ); + min_block_alloc_size = + std::min(size_t(default_min_block_size), min_superblock_size); - max_block_alloc_size = - std::min( size_t(default_max_block_size) - , min_superblock_size ); - } - else if ( 0 == min_superblock_size ) { + max_block_alloc_size = + std::min(size_t(default_max_block_size), min_superblock_size); + } else if (0 == min_superblock_size) { + // Choose superblock size as minimum of: + // max_block_per_superblock * min_block_size + // max_superblock_size + // min_total_alloc_size - // Choose superblock size as minimum of: - // max_block_per_superblock * min_block_size - // max_superblock_size - // min_total_alloc_size + const size_t max_superblock = + min_block_alloc_size * max_block_per_superblock; - const size_t max_superblock = - min_block_alloc_size * max_block_per_superblock ; + min_superblock_size = + std::min(max_superblock, + std::min(size_t(max_superblock_size), min_total_alloc_size)); + } - min_superblock_size = - std::min( max_superblock , - std::min( size_t(max_superblock_size) - , min_total_alloc_size ) ); - } + if (0 == max_block_alloc_size) { + max_block_alloc_size = min_superblock_size; + } - if ( 0 == max_block_alloc_size ) { - max_block_alloc_size = min_superblock_size ; - } + //-------------------------------------------------- - //-------------------------------------------------- + /* Enforce size constraints: + * min_block_alloc_size <= max_block_alloc_size + * max_block_alloc_size <= min_superblock_size + * min_superblock_size <= max_superblock_size + * min_superblock_size <= min_total_alloc_size + * min_superblock_size <= min_block_alloc_size * + * max_block_per_superblock + */ - /* Enforce size constraints: - * min_block_alloc_size <= max_block_alloc_size - * max_block_alloc_size <= min_superblock_size - * min_superblock_size <= max_superblock_size - * min_superblock_size <= min_total_alloc_size - * min_superblock_size <= min_block_alloc_size * - * max_block_per_superblock - */ + Kokkos::Impl::memory_pool_bounds_verification( + min_block_alloc_size, max_block_alloc_size, min_superblock_size, + max_superblock_size, max_block_per_superblock, min_total_alloc_size); - Kokkos::Impl::memory_pool_bounds_verification - ( min_block_alloc_size - , max_block_alloc_size - , min_superblock_size - , max_superblock_size - , max_block_per_superblock - , min_total_alloc_size - ); + //-------------------------------------------------- + // Block and superblock size is power of two: + // Maximum value is 'max_superblock_size' - //-------------------------------------------------- - // Block and superblock size is power of two: - // Maximum value is 'max_superblock_size' - - m_min_block_size_lg2 = + m_min_block_size_lg2 = Kokkos::Impl::integral_power_of_two_that_contains(min_block_alloc_size); - m_max_block_size_lg2 = + m_max_block_size_lg2 = Kokkos::Impl::integral_power_of_two_that_contains(max_block_alloc_size); - - m_sb_size_lg2 = + + m_sb_size_lg2 = Kokkos::Impl::integral_power_of_two_that_contains(min_superblock_size); - { - // number of superblocks is multiple of superblock size that - // can hold min_total_alloc_size. + { + // number of superblocks is multiple of superblock size that + // can hold min_total_alloc_size. - const uint64_t sb_size_mask = ( 1LU << m_sb_size_lg2 ) - 1 ; + const uint64_t sb_size_mask = (1LU << m_sb_size_lg2) - 1; - m_sb_count = ( min_total_alloc_size + sb_size_mask ) >> m_sb_size_lg2 ; - } + m_sb_count = (min_total_alloc_size + sb_size_mask) >> m_sb_size_lg2; + } - { - // Any superblock can be assigned to the smallest size block - // Size the block bitset to maximum number of blocks + { + // Any superblock can be assigned to the smallest size block + // Size the block bitset to maximum number of blocks - const uint32_t max_block_count_lg2 = - m_sb_size_lg2 - m_min_block_size_lg2 ; + const uint32_t max_block_count_lg2 = m_sb_size_lg2 - m_min_block_size_lg2; - m_sb_state_size = - ( CB::buffer_bound_lg2( max_block_count_lg2 ) + int_align_mask ) & ~int_align_mask ; - } + m_sb_state_size = + (CB::buffer_bound_lg2(max_block_count_lg2) + int_align_mask) & + ~int_align_mask; + } - // Array of all superblock states + // Array of all superblock states - const size_t all_sb_state_size = - ( m_sb_count * m_sb_state_size + int_align_mask ) & ~int_align_mask ; + const size_t all_sb_state_size = + (m_sb_count * m_sb_state_size + int_align_mask) & ~int_align_mask; - // Number of block sizes + // Number of block sizes - const int32_t number_block_sizes = - 1 + m_max_block_size_lg2 - m_min_block_size_lg2 ; + const int32_t number_block_sizes = + 1 + m_max_block_size_lg2 - m_min_block_size_lg2; - // Array length for possible block sizes - // Hint array is one uint32_t per block size + // Array length for possible block sizes + // Hint array is one uint32_t per block size - const int32_t block_size_array_size = - ( number_block_sizes + int_align_mask ) & ~int_align_mask ; + const int32_t block_size_array_size = + (number_block_sizes + int_align_mask) & ~int_align_mask; - m_hint_offset = all_sb_state_size ; - m_data_offset = m_hint_offset + - block_size_array_size * HINT_PER_BLOCK_SIZE ; + m_hint_offset = all_sb_state_size; + m_data_offset = m_hint_offset + block_size_array_size * HINT_PER_BLOCK_SIZE; - // Allocation: + // Allocation: - const size_t header_size = m_data_offset * sizeof(uint32_t); - const size_t alloc_size = header_size + - ( size_t(m_sb_count) << m_sb_size_lg2 ); + const size_t header_size = m_data_offset * sizeof(uint32_t); + const size_t alloc_size = + header_size + (size_t(m_sb_count) << m_sb_size_lg2); - Record * rec = Record::allocate( memspace , "MemoryPool" , alloc_size ); + Record *rec = Record::allocate(memspace, "MemoryPool", alloc_size); - m_tracker.assign_allocated_record_to_uninitialized( rec ); + m_tracker.assign_allocated_record_to_uninitialized(rec); - m_sb_state_array = (uint32_t *) rec->data(); + m_sb_state_array = (uint32_t *)rec->data(); - Kokkos::HostSpace host ; + Kokkos::HostSpace host; - uint32_t * const sb_state_array = - accessible ? m_sb_state_array - : (uint32_t *) host.allocate(header_size); + uint32_t *const sb_state_array = + accessible ? m_sb_state_array : (uint32_t *)host.allocate(header_size); - for ( int32_t i = 0 ; i < m_data_offset ; ++i ) sb_state_array[i] = 0 ; + for (int32_t i = 0; i < m_data_offset; ++i) sb_state_array[i] = 0; - // Initial assignment of empty superblocks to block sizes: + // Initial assignment of empty superblocks to block sizes: - for ( int32_t i = 0 ; i < number_block_sizes ; ++i ) { - const uint32_t block_size_lg2 = i + m_min_block_size_lg2 ; - const uint32_t block_count_lg2 = m_sb_size_lg2 - block_size_lg2 ; - const uint32_t block_state = block_count_lg2 << state_shift ; - const uint32_t hint_begin = m_hint_offset + i * HINT_PER_BLOCK_SIZE ; + for (int32_t i = 0; i < number_block_sizes; ++i) { + const uint32_t block_size_lg2 = i + m_min_block_size_lg2; + const uint32_t block_count_lg2 = m_sb_size_lg2 - block_size_lg2; + const uint32_t block_state = block_count_lg2 << state_shift; + const uint32_t hint_begin = m_hint_offset + i * HINT_PER_BLOCK_SIZE; - // for block size index 'i': - // sb_id_hint = sb_state_array[ hint_begin ]; - // sb_id_begin = sb_state_array[ hint_begin + 1 ]; + // for block size index 'i': + // sb_id_hint = sb_state_array[ hint_begin ]; + // sb_id_begin = sb_state_array[ hint_begin + 1 ]; - const int32_t jbeg = ( i * m_sb_count ) / number_block_sizes ; - const int32_t jend = ( ( i + 1 ) * m_sb_count ) / number_block_sizes ; + const int32_t jbeg = (i * m_sb_count) / number_block_sizes; + const int32_t jend = ((i + 1) * m_sb_count) / number_block_sizes; - sb_state_array[ hint_begin ] = uint32_t(jbeg); - sb_state_array[ hint_begin + 1 ] = uint32_t(jbeg); + sb_state_array[hint_begin] = uint32_t(jbeg); + sb_state_array[hint_begin + 1] = uint32_t(jbeg); - for ( int32_t j = jbeg ; j < jend ; ++j ) { - sb_state_array[ j * m_sb_state_size ] = block_state ; - } - } - - // Write out initialized state: - - if ( ! accessible ) { - Kokkos::Impl::DeepCopy< base_memory_space , Kokkos::HostSpace > - ( m_sb_state_array , sb_state_array , header_size ); - - host.deallocate( sb_state_array, header_size ); - } - else { - Kokkos::memory_fence(); + for (int32_t j = jbeg; j < jend; ++j) { + sb_state_array[j * m_sb_state_size] = block_state; } } + // Write out initialized state: + + if (!accessible) { + Kokkos::Impl::DeepCopy( + m_sb_state_array, sb_state_array, header_size); + + host.deallocate(sb_state_array, header_size); + } else { + Kokkos::memory_fence(); + } + } + //-------------------------------------------------------------------------- -private: - + private: /* Given a size 'n' get the block size in which it can be allocated. * Restrict lower bound to minimum block size. */ KOKKOS_FORCEINLINE_FUNCTION - uint32_t get_block_size_lg2( uint32_t n ) const noexcept - { - const unsigned i = Kokkos::Impl::integral_power_of_two_that_contains( n ); + uint32_t get_block_size_lg2(uint32_t n) const noexcept { + const unsigned i = Kokkos::Impl::integral_power_of_two_that_contains(n); - return i < m_min_block_size_lg2 ? m_min_block_size_lg2 : i ; - } - -public: + return i < m_min_block_size_lg2 ? m_min_block_size_lg2 : i; + } + public: /* Return 0 for invalid block size */ KOKKOS_INLINE_FUNCTION - uint32_t allocate_block_size( uint64_t alloc_size ) const noexcept - { - return alloc_size <= (1UL << m_max_block_size_lg2) - ? ( 1UL << get_block_size_lg2( uint32_t(alloc_size) ) ) - : 0 ; - } + uint32_t allocate_block_size(uint64_t alloc_size) const noexcept { + return alloc_size <= (1UL << m_max_block_size_lg2) + ? (1UL << get_block_size_lg2(uint32_t(alloc_size))) + : 0; + } //-------------------------------------------------------------------------- /**\brief Allocate a block of memory that is at least 'alloc_size' @@ -576,105 +540,98 @@ public: * The allocation attempt will try up to 'attempt_limit' times. */ KOKKOS_FUNCTION - void * allocate( size_t alloc_size - , int32_t attempt_limit = 1 ) const noexcept - { - if ( size_t(1LU << m_max_block_size_lg2) < alloc_size ) { - Kokkos::abort("Kokkos MemoryPool allocation request exceeded specified maximum allocation size"); - } + void *allocate(size_t alloc_size, int32_t attempt_limit = 1) const noexcept { + if (size_t(1LU << m_max_block_size_lg2) < alloc_size) { + Kokkos::abort( + "Kokkos MemoryPool allocation request exceeded specified maximum " + "allocation size"); + } - if ( 0 == alloc_size ) return (void*) 0 ; + if (0 == alloc_size) return (void *)0; - void * p = 0 ; + void *p = 0; - const uint32_t block_size_lg2 = get_block_size_lg2( alloc_size ); + const uint32_t block_size_lg2 = get_block_size_lg2(alloc_size); - // Allocation will fit within a superblock - // that has block sizes ( 1 << block_size_lg2 ) + // Allocation will fit within a superblock + // that has block sizes ( 1 << block_size_lg2 ) - const uint32_t block_count_lg2 = m_sb_size_lg2 - block_size_lg2 ; - const uint32_t block_state = block_count_lg2 << state_shift ; - const uint32_t block_count = 1u << block_count_lg2 ; + const uint32_t block_count_lg2 = m_sb_size_lg2 - block_size_lg2; + const uint32_t block_state = block_count_lg2 << state_shift; + const uint32_t block_count = 1u << block_count_lg2; - // Superblock hints for this block size: - // hint_sb_id_ptr[0] is the dynamically changing hint - // hint_sb_id_ptr[1] is the static start point + // Superblock hints for this block size: + // hint_sb_id_ptr[0] is the dynamically changing hint + // hint_sb_id_ptr[1] is the static start point - volatile uint32_t * const hint_sb_id_ptr - = m_sb_state_array /* memory pool state array */ - + m_hint_offset /* offset to hint portion of array */ - + HINT_PER_BLOCK_SIZE /* number of hints per block size */ - * ( block_size_lg2 - m_min_block_size_lg2 ); /* block size id */ + volatile uint32_t *const hint_sb_id_ptr = + m_sb_state_array /* memory pool state array */ + + m_hint_offset /* offset to hint portion of array */ + + HINT_PER_BLOCK_SIZE /* number of hints per block size */ + * (block_size_lg2 - m_min_block_size_lg2); /* block size id */ - const int32_t sb_id_begin = int32_t( hint_sb_id_ptr[1] ); + const int32_t sb_id_begin = int32_t(hint_sb_id_ptr[1]); - // Fast query clock register 'tic' to pseudo-randomize - // the guess for which block within a superblock should - // be claimed. If not available then a search occurs. + // Fast query clock register 'tic' to pseudo-randomize + // the guess for which block within a superblock should + // be claimed. If not available then a search occurs. - const uint32_t block_id_hint = - (uint32_t)( Kokkos::Impl::clock_tic() -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) - // Spread out potentially concurrent access - // by threads within a warp or thread block. - + ( threadIdx.x + blockDim.x * threadIdx.y ) + const uint32_t block_id_hint = + (uint32_t)(Kokkos::Impl::clock_tic() +#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA) + // Spread out potentially concurrent access + // by threads within a warp or thread block. + + (threadIdx.x + blockDim.x * threadIdx.y) #endif ); - // expected state of superblock for allocation - uint32_t sb_state = block_state ; + // expected state of superblock for allocation + uint32_t sb_state = block_state; - int32_t sb_id = -1 ; + int32_t sb_id = -1; - volatile uint32_t * sb_state_array = 0 ; + volatile uint32_t *sb_state_array = 0; - while ( attempt_limit ) { + while (attempt_limit) { + int32_t hint_sb_id = -1; - int32_t hint_sb_id = -1 ; + if (sb_id < 0) { + // No superblock specified, try the hint for this block size - if ( sb_id < 0 ) { + sb_id = hint_sb_id = int32_t(*hint_sb_id_ptr); - // No superblock specified, try the hint for this block size + sb_state_array = m_sb_state_array + (sb_id * m_sb_state_size); + } - sb_id = hint_sb_id = int32_t( *hint_sb_id_ptr ); + // Require: + // 0 <= sb_id + // sb_state_array == m_sb_state_array + m_sb_state_size * sb_id - sb_state_array = m_sb_state_array + ( sb_id * m_sb_state_size ); - } + if (sb_state == (state_header_mask & *sb_state_array)) { + // This superblock state is as expected, for the moment. + // Attempt to claim a bit. The attempt updates the state + // so have already made sure the state header is as expected. - // Require: - // 0 <= sb_id - // sb_state_array == m_sb_state_array + m_sb_state_size * sb_id + const uint32_t count_lg2 = sb_state >> state_shift; + const uint32_t mask = (1u << count_lg2) - 1; - if ( sb_state == ( state_header_mask & *sb_state_array ) ) { + const Kokkos::pair result = CB::acquire_bounded_lg2( + sb_state_array, count_lg2, block_id_hint & mask, sb_state); - // This superblock state is as expected, for the moment. - // Attempt to claim a bit. The attempt updates the state - // so have already made sure the state header is as expected. + // If result.first < 0 then failed to acquire + // due to either full or buffer was wrong state. + // Could be wrong state if a deallocation raced the + // superblock to empty before the acquire could succeed. - const uint32_t count_lg2 = sb_state >> state_shift ; - const uint32_t mask = ( 1u << count_lg2 ) - 1 ; + if (0 <= result.first) { // acquired a bit - const Kokkos::pair result = - CB::acquire_bounded_lg2( sb_state_array - , count_lg2 - , block_id_hint & mask - , sb_state - ); + const uint32_t size_lg2 = m_sb_size_lg2 - count_lg2; - // If result.first < 0 then failed to acquire - // due to either full or buffer was wrong state. - // Could be wrong state if a deallocation raced the - // superblock to empty before the acquire could succeed. + // Set the allocated block pointer - if ( 0 <= result.first ) { // acquired a bit - - const uint32_t size_lg2 = m_sb_size_lg2 - count_lg2 ; - - // Set the allocated block pointer - - p = ((char*)( m_sb_state_array + m_data_offset )) - + ( uint64_t(sb_id) << m_sb_size_lg2 ) // superblock memory - + ( uint64_t(result.first) << size_lg2 ); // block memory + p = ((char *)(m_sb_state_array + m_data_offset)) + + (uint64_t(sb_id) << m_sb_size_lg2) // superblock memory + + (uint64_t(result.first) << size_lg2); // block memory #if 0 printf( " MemoryPool(0x%lx) pointer(0x%lx) allocate(%lu) sb_id(%d) sb_state(0x%x) block_size(%d) block_capacity(%d) block_id(%d) block_claimed(%d)\n" @@ -689,146 +646,133 @@ public: , result.second ); #endif - break ; // Success - } + break; // Success } - //------------------------------------------------------------------ - // Arrive here if failed to acquire a block. - // Must find a new superblock. + } + //------------------------------------------------------------------ + // Arrive here if failed to acquire a block. + // Must find a new superblock. - // Start searching at designated index for this block size. - // Look for superblock that, in preferential order, - // 1) part-full superblock of this block size - // 2) empty superblock to claim for this block size - // 3) part-full superblock of the next larger block size + // Start searching at designated index for this block size. + // Look for superblock that, in preferential order, + // 1) part-full superblock of this block size + // 2) empty superblock to claim for this block size + // 3) part-full superblock of the next larger block size - sb_state = block_state ; // Expect to find the desired state - sb_id = -1 ; + sb_state = block_state; // Expect to find the desired state + sb_id = -1; - bool update_hint = false ; - int32_t sb_id_empty = -1 ; - int32_t sb_id_large = -1 ; - uint32_t sb_state_large = 0 ; + bool update_hint = false; + int32_t sb_id_empty = -1; + int32_t sb_id_large = -1; + uint32_t sb_state_large = 0; - sb_state_array = m_sb_state_array + sb_id_begin * m_sb_state_size ; + sb_state_array = m_sb_state_array + sb_id_begin * m_sb_state_size; - for ( int32_t i = 0 , id = sb_id_begin ; i < m_sb_count ; ++i ) { + for (int32_t i = 0, id = sb_id_begin; i < m_sb_count; ++i) { + // Query state of the candidate superblock. + // Note that the state may change at any moment + // as concurrent allocations and deallocations occur. - // Query state of the candidate superblock. - // Note that the state may change at any moment - // as concurrent allocations and deallocations occur. - - const uint32_t full_state = *sb_state_array ; - const uint32_t used = full_state & state_used_mask ; - const uint32_t state = full_state & state_header_mask ; + const uint32_t full_state = *sb_state_array; + const uint32_t used = full_state & state_used_mask; + const uint32_t state = full_state & state_header_mask; - if ( state == block_state ) { + if (state == block_state) { + // Superblock is assigned to this block size - // Superblock is assigned to this block size + if (used < block_count) { + // There is room to allocate one block - if ( used < block_count ) { + sb_id = id; - // There is room to allocate one block + // Is there room to allocate more than one block? - sb_id = id ; + update_hint = used + 1 < block_count; - // Is there room to allocate more than one block? - - update_hint = used + 1 < block_count ; - - break ; - } + break; } - else if ( 0 == used ) { + } else if (0 == used) { + // Superblock is empty - // Superblock is empty + if (-1 == sb_id_empty) { + // Superblock is not assigned to this block size + // and is the first empty superblock encountered. + // Save this id to use if a partfull superblock is not found. - if ( -1 == sb_id_empty ) { - - // Superblock is not assigned to this block size - // and is the first empty superblock encountered. - // Save this id to use if a partfull superblock is not found. - - sb_id_empty = id ; - } - } - else if ( ( -1 == sb_id_empty /* have not found an empty */ ) && - ( -1 == sb_id_large /* have not found a larger */ ) && - ( state < block_state /* a larger block */ ) && - // is not full: - ( used < ( 1u << ( state >> state_shift ) ) ) ) { - // First superblock encountered that is - // larger than this block size and - // has room for an allocation. - // Save this id to use of partfull or empty superblock not found - sb_id_large = id ; - sb_state_large = state ; - } - - // Iterate around the superblock array: - - if ( ++id < m_sb_count ) { - sb_state_array += m_sb_state_size ; - } - else { - id = 0 ; - sb_state_array = m_sb_state_array ; + sb_id_empty = id; } + } else if ((-1 == sb_id_empty /* have not found an empty */) && + (-1 == sb_id_large /* have not found a larger */) && + (state < block_state /* a larger block */) && + // is not full: + (used < (1u << (state >> state_shift)))) { + // First superblock encountered that is + // larger than this block size and + // has room for an allocation. + // Save this id to use of partfull or empty superblock not found + sb_id_large = id; + sb_state_large = state; } - // printf(" search m_sb_count(%d) sb_id(%d) sb_id_empty(%d) sb_id_large(%d)\n" , m_sb_count , sb_id , sb_id_empty , sb_id_large); + // Iterate around the superblock array: - if ( sb_id < 0 ) { - - // Did not find a partfull superblock for this block size. - - if ( 0 <= sb_id_empty ) { - - // Found first empty superblock following designated superblock - // Attempt to claim it for this block size. - // If the claim fails assume that another thread claimed it - // for this block size and try to use it anyway, - // but do not update hint. - - sb_id = sb_id_empty ; - - sb_state_array = m_sb_state_array + ( sb_id * m_sb_state_size ); - - // If successfully changed assignment of empty superblock 'sb_id' - // to this block_size then update the hint. - - const uint32_t state_empty = state_header_mask & *sb_state_array ; - - // If this thread claims the empty block then update the hint - update_hint = - state_empty == - Kokkos::atomic_compare_exchange - (sb_state_array,state_empty,block_state); - } - else if ( 0 <= sb_id_large ) { - - // Found a larger superblock with space available - - sb_id = sb_id_large ; - sb_state = sb_state_large ; - - sb_state_array = m_sb_state_array + ( sb_id * m_sb_state_size ); - } - else { - // Did not find a potentially usable superblock - --attempt_limit ; - } + if (++id < m_sb_count) { + sb_state_array += m_sb_state_size; + } else { + id = 0; + sb_state_array = m_sb_state_array; } + } - if ( update_hint ) { - Kokkos::atomic_compare_exchange - ( hint_sb_id_ptr , uint32_t(hint_sb_id) , uint32_t(sb_id) ); + // printf(" search m_sb_count(%d) sb_id(%d) sb_id_empty(%d) + // sb_id_large(%d)\n" , m_sb_count , sb_id , sb_id_empty , sb_id_large); + + if (sb_id < 0) { + // Did not find a partfull superblock for this block size. + + if (0 <= sb_id_empty) { + // Found first empty superblock following designated superblock + // Attempt to claim it for this block size. + // If the claim fails assume that another thread claimed it + // for this block size and try to use it anyway, + // but do not update hint. + + sb_id = sb_id_empty; + + sb_state_array = m_sb_state_array + (sb_id * m_sb_state_size); + + // If successfully changed assignment of empty superblock 'sb_id' + // to this block_size then update the hint. + + const uint32_t state_empty = state_header_mask & *sb_state_array; + + // If this thread claims the empty block then update the hint + update_hint = + state_empty == Kokkos::atomic_compare_exchange( + sb_state_array, state_empty, block_state); + } else if (0 <= sb_id_large) { + // Found a larger superblock with space available + + sb_id = sb_id_large; + sb_state = sb_state_large; + + sb_state_array = m_sb_state_array + (sb_id * m_sb_state_size); + } else { + // Did not find a potentially usable superblock + --attempt_limit; } - } // end allocation attempt loop - //-------------------------------------------------------------------- + } - return p ; - } + if (update_hint) { + Kokkos::atomic_compare_exchange(hint_sb_id_ptr, uint32_t(hint_sb_id), + uint32_t(sb_id)); + } + } // end allocation attempt loop + //-------------------------------------------------------------------- + + return p; + } // end allocate //-------------------------------------------------------------------------- @@ -839,47 +783,43 @@ public: * For now the alloc_size is ignored. */ KOKKOS_INLINE_FUNCTION - void deallocate( void * p , size_t /* alloc_size */ ) const noexcept - { - if ( 0 == p ) return ; + void deallocate(void *p, size_t /* alloc_size */) const noexcept { + if (0 == p) return; - // Determine which superblock and block - const ptrdiff_t d = - ((char*)p) - ((char*)( m_sb_state_array + m_data_offset )); + // Determine which superblock and block + const ptrdiff_t d = + ((char *)p) - ((char *)(m_sb_state_array + m_data_offset)); - // Verify contained within the memory pool's superblocks: - const int ok_contains = - ( 0 <= d ) && ( size_t(d) < ( size_t(m_sb_count) << m_sb_size_lg2 ) ); + // Verify contained within the memory pool's superblocks: + const int ok_contains = + (0 <= d) && (size_t(d) < (size_t(m_sb_count) << m_sb_size_lg2)); - int ok_block_aligned = 0 ; - int ok_dealloc_once = 0 ; + int ok_block_aligned = 0; + int ok_dealloc_once = 0; - if ( ok_contains ) { + if (ok_contains) { + const int sb_id = d >> m_sb_size_lg2; - const int sb_id = d >> m_sb_size_lg2 ; + // State array for the superblock. + volatile uint32_t *const sb_state_array = + m_sb_state_array + (sb_id * m_sb_state_size); - // State array for the superblock. - volatile uint32_t * const sb_state_array = - m_sb_state_array + ( sb_id * m_sb_state_size ); + const uint32_t block_state = (*sb_state_array) & state_header_mask; + const uint32_t block_size_lg2 = + m_sb_size_lg2 - (block_state >> state_shift); - const uint32_t block_state = (*sb_state_array) & state_header_mask ; - const uint32_t block_size_lg2 = - m_sb_size_lg2 - ( block_state >> state_shift ); + ok_block_aligned = 0 == (d & ((1UL << block_size_lg2) - 1)); - ok_block_aligned = 0 == ( d & ( ( 1UL << block_size_lg2 ) - 1 ) ); + if (ok_block_aligned) { + // Map address to block's bit + // mask into superblock and then shift down for block index - if ( ok_block_aligned ) { + const uint32_t bit = + (d & (ptrdiff_t(1LU << m_sb_size_lg2) - 1)) >> block_size_lg2; - // Map address to block's bit - // mask into superblock and then shift down for block index + const int result = CB::release(sb_state_array, bit, block_state); - const uint32_t bit = - ( d & ( ptrdiff_t( 1LU << m_sb_size_lg2 ) - 1 ) ) >> block_size_lg2 ; - - const int result = - CB::release( sb_state_array , bit , block_state ); - - ok_dealloc_once = 0 <= result ; + ok_dealloc_once = 0 <= result; #if 0 printf( " MemoryPool(0x%lx) pointer(0x%lx) deallocate sb_id(%d) block_size(%d) block_capacity(%d) block_id(%d) block_claimed(%d)\n" @@ -891,10 +831,10 @@ public: , bit , result ); #endif - } } + } - if ( ! ok_contains || ! ok_block_aligned || ! ok_dealloc_once ) { + if (!ok_contains || !ok_block_aligned || !ok_dealloc_once) { #if 0 printf( " MemoryPool(0x%lx) pointer(0x%lx) deallocate ok_contains(%d) ok_block_aligned(%d) ok_dealloc_once(%d)\n" , (uintptr_t)m_sb_state_array @@ -903,44 +843,40 @@ public: , int(ok_block_aligned) , int(ok_dealloc_once) ); #endif - Kokkos::abort("Kokkos MemoryPool::deallocate given erroneous pointer"); - } + Kokkos::abort("Kokkos MemoryPool::deallocate given erroneous pointer"); } + } // end deallocate //-------------------------------------------------------------------------- KOKKOS_INLINE_FUNCTION - int number_of_superblocks() const noexcept { return m_sb_count ; } + int number_of_superblocks() const noexcept { return m_sb_count; } KOKKOS_INLINE_FUNCTION - void superblock_state( int sb_id - , int & block_size - , int & block_count_capacity - , int & block_count_used ) const noexcept - { - block_size = 0 ; - block_count_capacity = 0 ; - block_count_used = 0 ; + void superblock_state(int sb_id, int &block_size, int &block_count_capacity, + int &block_count_used) const noexcept { + block_size = 0; + block_count_capacity = 0; + block_count_used = 0; - if ( Kokkos::Impl::MemorySpaceAccess - < Kokkos::Impl::ActiveExecutionMemorySpace - , base_memory_space >::accessible ) { - // Can access the state array - - const uint32_t state = - ((uint32_t volatile *)m_sb_state_array)[sb_id*m_sb_state_size]; + if (Kokkos::Impl::MemorySpaceAccess< + Kokkos::Impl::ActiveExecutionMemorySpace, + base_memory_space>::accessible) { + // Can access the state array - const uint32_t block_count_lg2 = state >> state_shift ; - const uint32_t block_used = state & state_used_mask ; + const uint32_t state = + ((uint32_t volatile *)m_sb_state_array)[sb_id * m_sb_state_size]; - block_size = 1LU << ( m_sb_size_lg2 - block_count_lg2 ); - block_count_capacity = 1LU << block_count_lg2 ; - block_count_used = block_used ; - } + const uint32_t block_count_lg2 = state >> state_shift; + const uint32_t block_used = state & state_used_mask; + + block_size = 1LU << (m_sb_size_lg2 - block_count_lg2); + block_count_capacity = 1LU << block_count_lg2; + block_count_used = block_used; } + } }; -} // namespace Kokkos +} // namespace Kokkos #endif /* #ifndef KOKKOS_MEMORYPOOL_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_MemoryTraits.hpp b/lib/kokkos/core/src/Kokkos_MemoryTraits.hpp index 509ac6499e..75d3d40144 100644 --- a/lib/kokkos/core/src/Kokkos_MemoryTraits.hpp +++ b/lib/kokkos/core/src/Kokkos_MemoryTraits.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -59,53 +60,64 @@ namespace Kokkos { * A zero value is the default for a View, indicating that none of * these traits are present. */ -enum MemoryTraitsFlags - { Unmanaged = 0x01 - , RandomAccess = 0x02 - , Atomic = 0x04 - , Restrict = 0x08 - , Aligned = 0x10 - }; - -template < unsigned T > -struct MemoryTraits { - //! Tag this class as a kokkos memory traits: - typedef MemoryTraits memory_traits ; -#ifdef KOKKOS_ENABLE_DEPRECATED_CODE - enum : bool { Unmanaged = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged))) }; - enum : bool { RandomAccess = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess))) }; - enum : bool { Atomic = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) }; - enum : bool { Restrict = (unsigned(0) != (T & unsigned(Kokkos::Restrict))) }; - enum : bool { Aligned = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) }; -#endif - enum : bool { is_unmanaged = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged))) }; - enum : bool { is_random_access = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess))) }; - enum : bool { is_atomic = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) }; - enum : bool { is_restrict = (unsigned(0) != (T & unsigned(Kokkos::Restrict))) }; - enum : bool { is_aligned = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) }; +enum MemoryTraitsFlags { + Unmanaged = 0x01, + RandomAccess = 0x02, + Atomic = 0x04, + Restrict = 0x08, + Aligned = 0x10 }; -} // namespace Kokkos +template +struct MemoryTraits { + //! Tag this class as a kokkos memory traits: + typedef MemoryTraits memory_traits; +#ifdef KOKKOS_ENABLE_DEPRECATED_CODE + enum : bool { + Unmanaged = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged))) + }; + enum : bool { + RandomAccess = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess))) + }; + enum : bool { Atomic = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) }; + enum : bool { Restrict = (unsigned(0) != (T & unsigned(Kokkos::Restrict))) }; + enum : bool { Aligned = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) }; +#endif + enum : bool { + is_unmanaged = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged))) + }; + enum : bool { + is_random_access = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess))) + }; + enum : bool { is_atomic = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) }; + enum : bool { + is_restrict = (unsigned(0) != (T & unsigned(Kokkos::Restrict))) + }; + enum : bool { is_aligned = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) }; +}; + +} // namespace Kokkos //---------------------------------------------------------------------------- namespace Kokkos { -typedef Kokkos::MemoryTraits<0> MemoryManaged ; -typedef Kokkos::MemoryTraits< Kokkos::Unmanaged > MemoryUnmanaged ; -typedef Kokkos::MemoryTraits< Kokkos::Unmanaged | Kokkos::RandomAccess > MemoryRandomAccess ; +typedef Kokkos::MemoryTraits<0> MemoryManaged; +typedef Kokkos::MemoryTraits MemoryUnmanaged; +typedef Kokkos::MemoryTraits + MemoryRandomAccess; -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- namespace Kokkos { namespace Impl { -static_assert( - ( 0 < int(KOKKOS_MEMORY_ALIGNMENT) ) && - ( 0 == ( int(KOKKOS_MEMORY_ALIGNMENT) & (int(KOKKOS_MEMORY_ALIGNMENT)-1))) , - "KOKKOS_MEMORY_ALIGNMENT must be a power of two" ); +static_assert((0 < int(KOKKOS_MEMORY_ALIGNMENT)) && + (0 == (int(KOKKOS_MEMORY_ALIGNMENT) & + (int(KOKKOS_MEMORY_ALIGNMENT) - 1))), + "KOKKOS_MEMORY_ALIGNMENT must be a power of two"); /** \brief Memory alignment settings * @@ -113,13 +125,12 @@ static_assert( * Enable compatibility of views from different devices with static stride. * Use compiler flag to enable overwrites. */ -enum : unsigned - { MEMORY_ALIGNMENT = KOKKOS_MEMORY_ALIGNMENT - , MEMORY_ALIGNMENT_THRESHOLD = KOKKOS_MEMORY_ALIGNMENT_THRESHOLD - }; +enum : unsigned { + MEMORY_ALIGNMENT = KOKKOS_MEMORY_ALIGNMENT, + MEMORY_ALIGNMENT_THRESHOLD = KOKKOS_MEMORY_ALIGNMENT_THRESHOLD +}; -} //namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos #endif /* #ifndef KOKKOS_MEMORYTRAITS_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_NumericTraits.hpp b/lib/kokkos/core/src/Kokkos_NumericTraits.hpp index baac782545..666bb33266 100644 --- a/lib/kokkos/core/src/Kokkos_NumericTraits.hpp +++ b/lib/kokkos/core/src/Kokkos_NumericTraits.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -44,176 +45,347 @@ #ifndef KOKKOS_NUMERICTRAITS_HPP #define KOKKOS_NUMERICTRAITS_HPP -#include -#include +#include +#include namespace Kokkos { -template +template struct reduction_identity; /*{ KOKKOS_FORCEINLINE_FUNCTION constexpr static T sum() { return T(); } // 0 KOKKOS_FORCEINLINE_FUNCTION constexpr static T prod() // 1 - { static_assert( false, "Missing specialization of Kokkos::reduction_identity for custom prod reduction type"); return T(); } + { static_assert( false, "Missing specialization of +Kokkos::reduction_identity for custom prod reduction type"); return T(); } KOKKOS_FORCEINLINE_FUNCTION constexpr static T max() // minimum value - { static_assert( false, "Missing specialization of Kokkos::reduction_identity for custom max reduction type"); return T(); } + { static_assert( false, "Missing specialization of +Kokkos::reduction_identity for custom max reduction type"); return T(); } KOKKOS_FORCEINLINE_FUNCTION constexpr static T min() // maximum value - { static_assert( false, "Missing specialization of Kokkos::reduction_identity for custom min reduction type"); return T(); } - KOKKOS_FORCEINLINE_FUNCTION constexpr static T bor() // 0, only for integer type - { static_assert( false, "Missing specialization of Kokkos::reduction_identity for custom bor reduction type"); return T(); } - KOKKOS_FORCEINLINE_FUNCTION constexpr static T band() // !0, only for integer type - { static_assert( false, "Missing specialization of Kokkos::reduction_identity for custom band reduction type"); return T(); } - KOKKOS_FORCEINLINE_FUNCTION constexpr static T lor() // 0, only for integer type - { static_assert( false, "Missing specialization of Kokkos::reduction_identity for custom lor reduction type"); return T(); } - KOKKOS_FORCEINLINE_FUNCTION constexpr static T land() // !0, only for integer type - { static_assert( false, "Missing specialization of Kokkos::reduction_identity for custom land reduction type"); return T(); } + { static_assert( false, "Missing specialization of +Kokkos::reduction_identity for custom min reduction type"); return T(); } + KOKKOS_FORCEINLINE_FUNCTION constexpr static T bor() // 0, only for integer +type { static_assert( false, "Missing specialization of +Kokkos::reduction_identity for custom bor reduction type"); return T(); } + KOKKOS_FORCEINLINE_FUNCTION constexpr static T band() // !0, only for integer +type { static_assert( false, "Missing specialization of +Kokkos::reduction_identity for custom band reduction type"); return T(); } + KOKKOS_FORCEINLINE_FUNCTION constexpr static T lor() // 0, only for integer +type { static_assert( false, "Missing specialization of +Kokkos::reduction_identity for custom lor reduction type"); return T(); } + KOKKOS_FORCEINLINE_FUNCTION constexpr static T land() // !0, only for integer +type { static_assert( false, "Missing specialization of +Kokkos::reduction_identity for custom land reduction type"); return T(); } };*/ -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char sum() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char prod() {return static_cast(1);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char max() {return SCHAR_MIN;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char min() {return SCHAR_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char bor() {return static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char band() {return ~static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char lor() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char land() {return static_cast(1);} + KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char sum() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char prod() { + return static_cast(1); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char max() { + return SCHAR_MIN; + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char min() { + return SCHAR_MAX; + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char bor() { + return static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char band() { + return ~static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char lor() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static signed char land() { + return static_cast(1); + } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static short sum() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static short prod() {return static_cast(1);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static short max() {return SHRT_MIN;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static short min() {return SHRT_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static short bor() {return static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static short band() {return ~static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static short lor() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static short land() {return static_cast(1);} + KOKKOS_FORCEINLINE_FUNCTION constexpr static short sum() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static short prod() { + return static_cast(1); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static short max() { return SHRT_MIN; } + KOKKOS_FORCEINLINE_FUNCTION constexpr static short min() { return SHRT_MAX; } + KOKKOS_FORCEINLINE_FUNCTION constexpr static short bor() { + return static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static short band() { + return ~static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static short lor() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static short land() { + return static_cast(1); + } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static int sum() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static int prod() {return static_cast(1);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static int max() {return INT_MIN;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static int min() {return INT_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static int bor() {return static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static int band() {return ~static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static int lor() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static int land() {return static_cast(1);} + KOKKOS_FORCEINLINE_FUNCTION constexpr static int sum() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static int prod() { + return static_cast(1); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static int max() { return INT_MIN; } + KOKKOS_FORCEINLINE_FUNCTION constexpr static int min() { return INT_MAX; } + KOKKOS_FORCEINLINE_FUNCTION constexpr static int bor() { + return static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static int band() { + return ~static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static int lor() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static int land() { + return static_cast(1); + } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static long sum() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long prod() {return static_cast(1);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long max() {return LLONG_MIN;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long min() {return LLONG_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long bor() {return static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long band() {return ~static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long lor() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long land() {return static_cast(1);} + KOKKOS_FORCEINLINE_FUNCTION constexpr static long sum() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long prod() { + return static_cast(1); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long max() { return LLONG_MIN; } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long min() { return LLONG_MAX; } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long bor() { + return static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long band() { + return ~static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long lor() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long land() { + return static_cast(1); + } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static long long sum() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long long prod() {return static_cast(1);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long long max() {return LLONG_MIN;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long long min() {return LLONG_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long long bor() {return static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long long band() {return ~static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long long lor() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long long land() {return static_cast(1);} + KOKKOS_FORCEINLINE_FUNCTION constexpr static long long sum() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long long prod() { + return static_cast(1); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long long max() { + return LLONG_MIN; + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long long min() { + return LLONG_MAX; + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long long bor() { + return static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long long band() { + return ~static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long long lor() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long long land() { + return static_cast(1); + } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char sum() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char prod() {return static_cast(1);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char max() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char min() {return UCHAR_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char bor() {return static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char band() {return ~static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char lor() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char land() {return static_cast(1);} + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char sum() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char prod() { + return static_cast(1); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char max() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char min() { + return UCHAR_MAX; + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char bor() { + return static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char band() { + return ~static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char lor() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned char land() { + return static_cast(1); + } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short sum() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short prod() {return static_cast(1);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short max() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short min() {return USHRT_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short bor() {return static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short band() {return ~static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short lor() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short land() {return static_cast(1);} + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short sum() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short prod() { + return static_cast(1); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short max() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short min() { + return USHRT_MAX; + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short bor() { + return static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short band() { + return ~static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short lor() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned short land() { + return static_cast(1); + } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int sum() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int prod() {return static_cast(1);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int max() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int min() {return UINT_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int bor() {return static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int band() {return ~static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int lor() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int land() {return static_cast(1);} + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int sum() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int prod() { + return static_cast(1); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int max() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int min() { + return UINT_MAX; + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int bor() { + return static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int band() { + return ~static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int lor() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned int land() { + return static_cast(1); + } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long sum() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long prod() {return static_cast(1);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long max() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long min() {return ULONG_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long bor() {return static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long band() {return ~static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long lor() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long land() {return static_cast(1);} + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long sum() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long prod() { + return static_cast(1); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long max() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long min() { + return ULONG_MAX; + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long bor() { + return static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long band() { + return ~static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long lor() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long land() { + return static_cast(1); + } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long sum() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long prod() {return static_cast(1);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long max() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long min() {return ULLONG_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long bor() {return static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long band() {return ~static_cast(0x0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long lor() {return static_cast(0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long land() {return static_cast(1);} + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long sum() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long prod() { + return static_cast(1); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long max() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long min() { + return ULLONG_MAX; + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long bor() { + return static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long band() { + return ~static_cast(0x0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long lor() { + return static_cast(0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static unsigned long long land() { + return static_cast(1); + } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static float sum() {return static_cast(0.0f);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static float prod() {return static_cast(1.0f);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static float max() {return -FLT_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static float min() {return FLT_MAX;} + KOKKOS_FORCEINLINE_FUNCTION constexpr static float sum() { + return static_cast(0.0f); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static float prod() { + return static_cast(1.0f); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static float max() { return -FLT_MAX; } + KOKKOS_FORCEINLINE_FUNCTION constexpr static float min() { return FLT_MAX; } }; -template<> +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static double sum() {return static_cast(0.0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static double prod() {return static_cast(1.0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static double max() {return -DBL_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static double min() {return DBL_MAX;} + KOKKOS_FORCEINLINE_FUNCTION constexpr static double sum() { + return static_cast(0.0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static double prod() { + return static_cast(1.0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static double max() { return -DBL_MAX; } + KOKKOS_FORCEINLINE_FUNCTION constexpr static double min() { return DBL_MAX; } }; -#if !defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) -template<> +#if !defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA) +template <> struct reduction_identity { - KOKKOS_FORCEINLINE_FUNCTION constexpr static long double sum() {return static_cast(0.0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long double prod() {return static_cast(1.0);} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long double max() {return -LDBL_MAX;} - KOKKOS_FORCEINLINE_FUNCTION constexpr static long double min() {return LDBL_MAX;} + KOKKOS_FORCEINLINE_FUNCTION constexpr static long double sum() { + return static_cast(0.0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long double prod() { + return static_cast(1.0); + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long double max() { + return -LDBL_MAX; + } + KOKKOS_FORCEINLINE_FUNCTION constexpr static long double min() { + return LDBL_MAX; + } }; #endif -} +} // namespace Kokkos #endif diff --git a/lib/kokkos/core/src/Kokkos_OpenMP.hpp b/lib/kokkos/core/src/Kokkos_OpenMP.hpp index 6ee8f08dc8..3955c06156 100644 --- a/lib/kokkos/core/src/Kokkos_OpenMP.hpp +++ b/lib/kokkos/core/src/Kokkos_OpenMP.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_OPENMP_HPP #include -#if defined( KOKKOS_ENABLE_OPENMP) +#if defined(KOKKOS_ENABLE_OPENMP) #include @@ -76,53 +77,48 @@ class OpenMPExec; /// \class OpenMP /// \brief Kokkos device for multicore processors in the host memory space. class OpenMP { -public: + public: //! Tag this class as a kokkos execution space using execution_space = OpenMP; using memory_space = - #ifdef KOKKOS_ENABLE_HBWSPACE - Experimental::HBWSpace; - #else - HostSpace; - #endif +#ifdef KOKKOS_ENABLE_HBWSPACE + Experimental::HBWSpace; +#else + HostSpace; +#endif //! This execution space preferred device_type - using device_type = Kokkos::Device< execution_space, memory_space >; + using device_type = Kokkos::Device; using array_layout = LayoutRight; using size_type = memory_space::size_type; - using scratch_memory_space = ScratchMemorySpace< OpenMP >; + using scratch_memory_space = ScratchMemorySpace; /// \brief Get a handle to the default execution space instance - inline - OpenMP() noexcept; + inline OpenMP() noexcept; /// \brief Print configuration information to the given output stream. - static void print_configuration( std::ostream & , const bool verbose = false ); + static void print_configuration(std::ostream&, const bool verbose = false); /// \brief is the instance running a parallel algorithm - inline - static bool in_parallel( OpenMP const& = OpenMP() ) noexcept; + inline static bool in_parallel(OpenMP const& = OpenMP()) noexcept; /// \brief Wait until all dispatched functors complete on the given instance /// /// This is a no-op on OpenMP - static void impl_static_fence( OpenMP const& = OpenMP() ) noexcept; + static void impl_static_fence(OpenMP const& = OpenMP()) noexcept; - #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - static void fence( OpenMP const& = OpenMP() ) noexcept; - #else +#ifdef KOKKOS_ENABLE_DEPRECATED_CODE + static void fence(OpenMP const& = OpenMP()) noexcept; +#else void fence() const; - #endif - +#endif /// \brief Does the given instance return immediately after launching /// a parallel algorithm /// /// This always returns false on OpenMP - inline - static bool is_asynchronous( OpenMP const& = OpenMP() ) noexcept; - + inline static bool is_asynchronous(OpenMP const& = OpenMP()) noexcept; /// \brief Partition the default instance into new instances without creating /// new masters @@ -137,24 +133,22 @@ public: /// This is a no-op on OpenMP since a non default instance cannot be created static OpenMP create_instance(...); - /// \brief Partition the default instance and call 'f' on each new 'master' thread + /// \brief Partition the default instance and call 'f' on each new 'master' + /// thread /// /// Func is a functor with the following signiture /// void( int partition_id, int num_partitions ) template - static void partition_master( F const& f - , int requested_num_partitions = 0 - , int requested_partition_size = 0 - ); + static void partition_master(F const& f, int requested_num_partitions = 0, + int requested_partition_size = 0); // use UniqueToken static int concurrency(); #ifdef KOKKOS_ENABLE_DEPRECATED_CODE /// \brief Initialize the default execution space - static void initialize( int thread_count, - int use_numa_count, - int use_cores_per_numa = 0); + static void initialize(int thread_count, int use_numa_count, + int use_cores_per_numa = 0); /// \brief Initialize the default execution space /// @@ -166,66 +160,62 @@ public: /// if ( thread_count > 0 ) /// then force openmp to use the given number of threads and change /// the default number of threads - static void initialize( int thread_count = -1 ); + static void initialize(int thread_count = -1); - /// \brief is the default execution space initialized for current 'master' thread + /// \brief is the default execution space initialized for current 'master' + /// thread static bool is_initialized() noexcept; /// \brief Free any resources being consumed by the default execution space static void finalize(); - inline - static int thread_pool_size() noexcept; + inline static int thread_pool_size() noexcept; /** \brief The rank of the executing thread in this thread pool */ KOKKOS_INLINE_FUNCTION static int thread_pool_rank() noexcept; - inline - static int thread_pool_size( int depth ); + inline static int thread_pool_size(int depth); - static void sleep() {}; - static void wake() {}; + static void sleep(){}; + static void wake(){}; // Using omp_get_max_threads(); is problematic // On Intel (essentially an initial call to the OpenMP runtime // without a parallel region before will set a process mask for a single core - // The runtime will than bind threads for a parallel region to other cores on the - // entering the first parallel region and make the process mask the aggregate of - // the thread masks. The intend seems to be to make serial code run fast, if you - // compile with OpenMP enabled but don't actually use parallel regions or so - // static int omp_max_threads = omp_get_max_threads(); + // The runtime will than bind threads for a parallel region to other cores on + // the entering the first parallel region and make the process mask the + // aggregate of the thread masks. The intend seems to be to make serial code + // run fast, if you compile with OpenMP enabled but don't actually use + // parallel regions or so static int omp_max_threads = omp_get_max_threads(); static int get_current_max_threads() noexcept; // use UniqueToken - inline - static int max_hardware_threads() noexcept; + inline static int max_hardware_threads() noexcept; // use UniqueToken KOKKOS_INLINE_FUNCTION static int hardware_thread_id() noexcept; #else - static void impl_initialize( int thread_count = -1 ); + static void impl_initialize(int thread_count = -1); - /// \brief is the default execution space initialized for current 'master' thread + /// \brief is the default execution space initialized for current 'master' + /// thread static bool impl_is_initialized() noexcept; /// \brief Free any resources being consumed by the default execution space static void impl_finalize(); - inline - static int impl_thread_pool_size() noexcept; + inline static int impl_thread_pool_size() noexcept; /** \brief The rank of the executing thread in this thread pool */ KOKKOS_INLINE_FUNCTION static int impl_thread_pool_rank() noexcept; - inline - static int impl_thread_pool_size( int depth ); + inline static int impl_thread_pool_size(int depth); // use UniqueToken - inline - static int impl_max_hardware_threads() noexcept; + inline static int impl_max_hardware_threads() noexcept; // use UniqueToken KOKKOS_INLINE_FUNCTION @@ -237,7 +227,7 @@ public: static constexpr const char* name() noexcept { return "OpenMP"; } }; -} // namespace Kokkos +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -245,30 +235,24 @@ public: namespace Kokkos { namespace Impl { -template<> -struct MemorySpaceAccess - < Kokkos::OpenMP::memory_space - , Kokkos::OpenMP::scratch_memory_space - > -{ +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = true }; - enum { deepcopy = false }; + enum { deepcopy = false }; }; -template<> -struct VerifyExecutionCanAccessMemorySpace - < Kokkos::OpenMP::memory_space - , Kokkos::OpenMP::scratch_memory_space - > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace< + Kokkos::OpenMP::memory_space, Kokkos::OpenMP::scratch_memory_space> { enum { value = true }; - inline static void verify( void ) { } - inline static void verify( const void * ) { } + inline static void verify(void) {} + inline static void verify(const void*) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -283,4 +267,3 @@ struct VerifyExecutionCanAccessMemorySpace #endif /* #if defined( KOKKOS_ENABLE_OPENMP ) && defined( _OPENMP ) */ #endif /* #ifndef KOKKOS_OPENMP_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_OpenMPTarget.hpp b/lib/kokkos/core/src/Kokkos_OpenMPTarget.hpp index e2dd249ff7..9706751f9c 100644 --- a/lib/kokkos/core/src/Kokkos_OpenMPTarget.hpp +++ b/lib/kokkos/core/src/Kokkos_OpenMPTarget.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -46,7 +47,7 @@ #include -#if defined( KOKKOS_ENABLE_OPENMPTARGET ) && defined( _OPENMP ) +#if defined(KOKKOS_ENABLE_OPENMPTARGET) && defined(_OPENMP) #include @@ -67,21 +68,21 @@ namespace Experimental { /// \class OpenMPTarget /// \brief Kokkos device for multicore processors in the host memory space. class OpenMPTarget { -public: + public: //------------------------------------ //! \name Type declarations that all Kokkos devices must provide. //@{ //! Tag this class as a kokkos execution space - typedef OpenMPTarget execution_space ; - typedef OpenMPTargetSpace memory_space ; + typedef OpenMPTarget execution_space; + typedef OpenMPTargetSpace memory_space; //! This execution space preferred device_type - typedef Kokkos::Device device_type; + typedef Kokkos::Device device_type; - typedef LayoutLeft array_layout ; - typedef memory_space::size_type size_type ; + typedef LayoutLeft array_layout; + typedef memory_space::size_type size_type; - typedef ScratchMemorySpace< OpenMPTarget > scratch_memory_space ; + typedef ScratchMemorySpace scratch_memory_space; //@} //------------------------------------ @@ -96,11 +97,12 @@ public: /** \brief Wake the device from the 'sleep' state. A noop for OpenMPTarget. */ static bool wake(); - /** \brief Wait until all dispatched functors complete. A noop for OpenMPTarget. */ + /** \brief Wait until all dispatched functors complete. A noop for + * OpenMPTarget. */ static void fence() {} /// \brief Print configuration information to the given output stream. - static void print_configuration( std::ostream & , const bool detail = false ); + static void print_configuration(std::ostream&, const bool detail = false); /// \brief Free any resources being consumed by the device. static void finalize(); @@ -114,9 +116,8 @@ public: * 2) Allocate a HostThread for each OpenMPTarget thread to hold its * topology and fan in/out data. */ - static void initialize( unsigned thread_count = 0 , - unsigned use_numa_count = 0 , - unsigned use_cores_per_numa = 0 ); + static void initialize(unsigned thread_count = 0, unsigned use_numa_count = 0, + unsigned use_cores_per_numa = 0); static int is_initialized(); @@ -125,14 +126,16 @@ public: //@} //------------------------------------ - /** \brief This execution space has a topological thread pool which can be queried. + /** \brief This execution space has a topological thread pool which can be + * queried. * - * All threads within a pool have a common memory space for which they are cache coherent. - * depth = 0 gives the number of threads in the whole pool. - * depth = 1 gives the number of threads in a NUMA region, typically sharing L3 cache. - * depth = 2 gives the number of threads at the finest granularity, typically sharing L1 cache. + * All threads within a pool have a common memory space for which they are + * cache coherent. depth = 0 gives the number of threads in the whole pool. + * depth = 1 gives the number of threads in a NUMA region, typically + * sharing L3 cache. depth = 2 gives the number of threads at the finest + * granularity, typically sharing L1 cache. */ - inline static int thread_pool_size( int depth = 0 ); + inline static int thread_pool_size(int depth = 0); /** \brief The rank of the executing thread in this thread pool */ KOKKOS_INLINE_FUNCTION static int thread_pool_rank(); @@ -141,15 +144,17 @@ public: inline static unsigned max_hardware_threads() { return thread_pool_size(0); } - KOKKOS_INLINE_FUNCTION static - unsigned hardware_thread_id() { return thread_pool_rank(); } + KOKKOS_INLINE_FUNCTION static unsigned hardware_thread_id() { + return thread_pool_rank(); + } static const char* name(); -private: + + private: static bool m_is_initialized; }; -} // namespace Experimental -} // namespace Kokkos +} // namespace Experimental +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -157,19 +162,17 @@ private: namespace Kokkos { namespace Impl { -template<> -struct VerifyExecutionCanAccessMemorySpace - < Kokkos::Experimental::OpenMPTarget::memory_space - , Kokkos::Experimental::OpenMPTarget::scratch_memory_space - > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace< + Kokkos::Experimental::OpenMPTarget::memory_space, + Kokkos::Experimental::OpenMPTarget::scratch_memory_space> { enum { value = true }; - inline static void verify( void ) { } - inline static void verify( const void * ) { } + inline static void verify(void) {} + inline static void verify(const void*) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -182,5 +185,3 @@ struct VerifyExecutionCanAccessMemorySpace #endif /* #if defined( KOKKOS_ENABLE_OPENMPTARGET ) && defined( _OPENMP ) */ #endif /* #ifndef KOKKOS_OPENMPTARGET_HPP */ - - diff --git a/lib/kokkos/core/src/Kokkos_OpenMPTargetSpace.hpp b/lib/kokkos/core/src/Kokkos_OpenMPTargetSpace.hpp index abb0b8588d..96c46754b4 100644 --- a/lib/kokkos/core/src/Kokkos_OpenMPTargetSpace.hpp +++ b/lib/kokkos/core/src/Kokkos_OpenMPTargetSpace.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -66,25 +67,25 @@ namespace Impl { /// where the hash value is derived from the address of the /// object for which an atomic operation is performed. /// This function initializes the locks to zero (unset). -//void init_lock_array_host_space(); +// void init_lock_array_host_space(); -/// \brief Acquire a lock for the address +/// \brief Aquire a lock for the address /// -/// This function tries to acquire the lock for the hash value derived -/// from the provided ptr. If the lock is successfully acquired the +/// This function tries to aquire the lock for the hash value derived +/// from the provided ptr. If the lock is successfully aquired the /// function returns true. Otherwise it returns false. -//bool lock_address_host_space(void* ptr); +// bool lock_address_host_space(void* ptr); /// \brief Release lock for the address /// /// This function releases the lock for the hash value derived /// from the provided ptr. This function should only be called -/// after previously successfully acquiring a lock with +/// after previously successfully aquiring a lock with /// lock_address. -//void unlock_address_host_space(void* ptr); +// void unlock_address_host_space(void* ptr); -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos namespace Kokkos { namespace Experimental { @@ -95,11 +96,10 @@ namespace Experimental { /// OpenMPTargetSpace is a memory space that governs host memory. "Host" /// memory means the usual CPU-accessible memory. class OpenMPTargetSpace { -public: - + public: //! Tag this class as a kokkos memory space - typedef OpenMPTargetSpace memory_space ; - typedef size_t size_type ; + typedef OpenMPTargetSpace memory_space; + typedef size_t size_type; /// \typedef execution_space /// \brief Default execution space for this memory space. @@ -107,34 +107,33 @@ public: /// Every memory space has a default execution space. This is /// useful for things like initializing a View (which happens in /// parallel using the View's default execution space). - typedef Kokkos::Experimental::OpenMPTarget execution_space ; + typedef Kokkos::Experimental::OpenMPTarget execution_space; //! This memory space preferred device_type - typedef Kokkos::Device device_type; + typedef Kokkos::Device device_type; /*--------------------------------*/ /**\brief Default memory space instance */ OpenMPTargetSpace(); - OpenMPTargetSpace( OpenMPTargetSpace && rhs ) = default ; - OpenMPTargetSpace( const OpenMPTargetSpace & rhs ) = default ; - OpenMPTargetSpace & operator = ( OpenMPTargetSpace && ) = default ; - OpenMPTargetSpace & operator = ( const OpenMPTargetSpace & ) = default ; - ~OpenMPTargetSpace() = default ; + OpenMPTargetSpace(OpenMPTargetSpace&& rhs) = default; + OpenMPTargetSpace(const OpenMPTargetSpace& rhs) = default; + OpenMPTargetSpace& operator=(OpenMPTargetSpace&&) = default; + OpenMPTargetSpace& operator=(const OpenMPTargetSpace&) = default; + ~OpenMPTargetSpace() = default; /**\brief Allocate untracked memory in the space */ - void * allocate( const size_t arg_alloc_size ) const ; + void* allocate(const size_t arg_alloc_size) const; /**\brief Deallocate untracked memory in the space */ - void deallocate( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) const ; + void deallocate(void* const arg_alloc_ptr, const size_t arg_alloc_size) const; -private: - - friend class Kokkos::Impl::SharedAllocationRecord< Kokkos::Experimental::OpenMPTargetSpace , void > ; + private: + friend class Kokkos::Impl::SharedAllocationRecord< + Kokkos::Experimental::OpenMPTargetSpace, void>; }; -} // namespace Experimental -} // namespace Kokkos +} // namespace Experimental +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -142,70 +141,62 @@ private: namespace Kokkos { namespace Impl { -template<> -class SharedAllocationRecord< Kokkos::Experimental::OpenMPTargetSpace , void > - : public SharedAllocationRecord< void , void > -{ -private: +template <> +class SharedAllocationRecord + : public SharedAllocationRecord { + private: + friend Kokkos::Experimental::OpenMPTargetSpace; - friend Kokkos::Experimental::OpenMPTargetSpace ; + typedef SharedAllocationRecord RecordBase; - typedef SharedAllocationRecord< void , void > RecordBase ; + SharedAllocationRecord(const SharedAllocationRecord&) = delete; + SharedAllocationRecord& operator=(const SharedAllocationRecord&) = delete; - SharedAllocationRecord( const SharedAllocationRecord & ) = delete ; - SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ; + static void deallocate(RecordBase*); - static void deallocate( RecordBase * ); + /**\brief Root record for tracked allocations from this OpenMPTargetSpace + * instance */ + static RecordBase s_root_record; - /**\brief Root record for tracked allocations from this OpenMPTargetSpace instance */ - static RecordBase s_root_record ; - - const Kokkos::Experimental::OpenMPTargetSpace m_space ; - -protected: + const Kokkos::Experimental::OpenMPTargetSpace m_space; + protected: ~SharedAllocationRecord(); - SharedAllocationRecord() = default ; + SharedAllocationRecord() = default; - SharedAllocationRecord( const Kokkos::Experimental::OpenMPTargetSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const RecordBase::function_type arg_dealloc = & deallocate - ); - -public: + SharedAllocationRecord( + const Kokkos::Experimental::OpenMPTargetSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size, + const RecordBase::function_type arg_dealloc = &deallocate); + public: std::string get_label() const; - KOKKOS_INLINE_FUNCTION static - SharedAllocationRecord * allocate( const Kokkos::Experimental::OpenMPTargetSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - ); + KOKKOS_INLINE_FUNCTION static SharedAllocationRecord* allocate( + const Kokkos::Experimental::OpenMPTargetSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size); /**\brief Allocate tracked memory in the space */ - static - void * allocate_tracked( const Kokkos::Experimental::OpenMPTargetSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + static void* allocate_tracked( + const Kokkos::Experimental::OpenMPTargetSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size); /**\brief Reallocate tracked memory in the space */ - static - void * reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ); + static void* reallocate_tracked(void* const arg_alloc_ptr, + const size_t arg_alloc_size); /**\brief Deallocate tracked memory in the space */ - static - void deallocate_tracked( void * const arg_alloc_ptr ); + static void deallocate_tracked(void* const arg_alloc_ptr); + static SharedAllocationRecord* get_record(void* arg_alloc_ptr); - static SharedAllocationRecord * get_record( void * arg_alloc_ptr ); - - static void print_records( std::ostream & , const Kokkos::Experimental::OpenMPTargetSpace & , bool detail = false ); + static void print_records(std::ostream&, + const Kokkos::Experimental::OpenMPTargetSpace&, + bool detail = false); }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -213,53 +204,59 @@ public: namespace Kokkos { namespace Impl { -//TODO: implement all possible deep_copies -template -struct DeepCopy { - DeepCopy( void * dst , const void * src , size_t n ) { - omp_target_memcpy( dst , const_cast (src) , n, 0, 0, omp_get_default_device(), omp_get_default_device()); +// TODO: implement all possible deep_copies +template +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t n) { + omp_target_memcpy(dst, const_cast(src), n, 0, 0, + omp_get_default_device(), omp_get_default_device()); } - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) { + DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, size_t n) { exec.fence(); - omp_target_memcpy( dst , const_cast (src) , n, 0, 0, omp_get_default_device(), omp_get_default_device()); + omp_target_memcpy(dst, const_cast(src), n, 0, 0, + omp_get_default_device(), omp_get_default_device()); } }; - -template -struct DeepCopy { - DeepCopy( void * dst , const void * src , size_t n ) { - omp_target_memcpy( dst , const_cast (src) , n, 0, 0, omp_get_default_device(), omp_get_initial_device()); +template +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t n) { + omp_target_memcpy(dst, const_cast(src), n, 0, 0, + omp_get_default_device(), omp_get_initial_device()); } - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) { + DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, size_t n) { exec.fence(); - omp_target_memcpy( dst , const_cast (src) , n, 0, 0, omp_get_default_device(), omp_get_initial_device()); + omp_target_memcpy(dst, const_cast(src), n, 0, 0, + omp_get_default_device(), omp_get_initial_device()); } }; -template -struct DeepCopy { - DeepCopy( void * dst , const void * src , size_t n ) { - omp_target_memcpy( dst , const_cast (src) , n, 0, 0, omp_get_initial_device(), omp_get_default_device()); +template +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t n) { + omp_target_memcpy(dst, const_cast(src), n, 0, 0, + omp_get_initial_device(), omp_get_default_device()); } - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) { + DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, size_t n) { exec.fence(); - omp_target_memcpy( dst , const_cast (src) , n, 0, 0, omp_get_initial_device(), omp_get_default_device()); + omp_target_memcpy(dst, const_cast(src), n, 0, 0, + omp_get_initial_device(), omp_get_default_device()); } }; - -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::Experimental::OpenMPTargetSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace< + Kokkos::HostSpace, Kokkos::Experimental::OpenMPTargetSpace> { enum { value = false }; - inline static void verify( void ) { } - inline static void verify( const void * ) { } + inline static void verify(void) {} + inline static void verify(const void*) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos #endif #endif /* #define KOKKOS_OPENMPTARGETSPACE_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_Pair.hpp b/lib/kokkos/core/src/Kokkos_Pair.hpp index ab0ab8152a..ee9797b4b3 100644 --- a/lib/kokkos/core/src/Kokkos_Pair.hpp +++ b/lib/kokkos/core/src/Kokkos_Pair.hpp @@ -1,10 +1,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -22,10 +23,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -61,15 +62,14 @@ namespace Kokkos { /// implements the same interface as std::pair, but can be used on a /// CUDA device as well as on the host. template -struct pair -{ +struct pair { //! The first template parameter of this class. typedef T1 first_type; //! The second template parameter of this class. typedef T2 second_type; //! The first element of the pair. - first_type first; + first_type first; //! The second element of the pair. second_type second; @@ -80,54 +80,48 @@ struct pair /// public. KOKKOS_FORCEINLINE_FUNCTION constexpr #ifdef KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND - pair() : first(), second() {} + pair() + : first(), second() { + } #else - pair() = default; + pair() = default; #endif /// \brief Constructor that takes both elements of the pair. /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair(first_type const& f, second_type const& s) - : first(f), second(s) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(first_type const& f, + second_type const& s) + : first(f), second(s) {} /// \brief Copy constructor. /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair( const pair &p) - : first(p.first), second(p.second) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(const pair& p) + : first(p.first), second(p.second) {} /// \brief Copy constructor. /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair( const volatile pair &p) - : first(p.first), second(p.second) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(const volatile pair& p) + : first(p.first), second(p.second) {} /// \brief Assignment operator. /// /// This calls the assignment operators of T1 and T2. It won't /// compile if the assignment operators are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION - pair & operator=(const pair &p) - { - first = p.first; + KOKKOS_FORCEINLINE_FUNCTION pair& operator=(const pair& p) { + first = p.first; second = p.second; return *this; } - /// \brief Assignment operator, for volatile *this. /// /// \param p [in] Input; right-hand side of the assignment. @@ -140,10 +134,9 @@ struct pair /// practice, this means that you should not chain assignments with /// volatile lvalues. template - KOKKOS_FORCEINLINE_FUNCTION - void operator=(const volatile pair &p) volatile - { - first = p.first; + KOKKOS_FORCEINLINE_FUNCTION void operator=( + const volatile pair& p) volatile { + first = p.first; second = p.second; // We deliberately do not return anything here. See explanation // in public documentation above. @@ -151,9 +144,7 @@ struct pair // from std::pair template - pair( const std::pair &p) - : first(p.first), second(p.second) - {} + pair(const std::pair& p) : first(p.first), second(p.second) {} /// \brief Return the std::pair version of this object. /// @@ -164,20 +155,20 @@ struct pair /// \note This is not a conversion operator, since defining a /// conversion operator made the relational operators have /// ambiguous definitions. - std::pair to_std_pair() const - { return std::make_pair(first,second); } + std::pair to_std_pair() const { + return std::make_pair(first, second); + } }; template -struct pair -{ +struct pair { //! The first template parameter of this class. typedef T1& first_type; //! The second template parameter of this class. typedef T2& second_type; //! The first element of the pair. - first_type first; + first_type first; //! The second element of the pair. second_type second; @@ -185,36 +176,29 @@ struct pair /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair(first_type f, second_type s) - : first(f), second(s) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(first_type f, second_type s) + : first(f), second(s) {} /// \brief Copy constructor. /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair( const pair &p) - : first(p.first), second(p.second) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(const pair& p) + : first(p.first), second(p.second) {} // from std::pair template - pair( const std::pair &p) - : first(p.first), second(p.second) - {} + pair(const std::pair& p) : first(p.first), second(p.second) {} /// \brief Assignment operator. /// /// This calls the assignment operators of T1 and T2. It won't /// compile if the assignment operators are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION - pair & operator=(const pair &p) - { - first = p.first; + KOKKOS_FORCEINLINE_FUNCTION pair& operator=( + const pair& p) { + first = p.first; second = p.second; return *this; } @@ -228,20 +212,20 @@ struct pair /// \note This is not a conversion operator, since defining a /// conversion operator made the relational operators have /// ambiguous definitions. - std::pair to_std_pair() const - { return std::make_pair(first,second); } + std::pair to_std_pair() const { + return std::make_pair(first, second); + } }; template -struct pair -{ +struct pair { //! The first template parameter of this class. - typedef T1 first_type; + typedef T1 first_type; //! The second template parameter of this class. typedef T2& second_type; //! The first element of the pair. - first_type first; + first_type first; //! The second element of the pair. second_type second; @@ -249,36 +233,29 @@ struct pair /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair(first_type const& f, second_type s) - : first(f), second(s) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(first_type const& f, second_type s) + : first(f), second(s) {} /// \brief Copy constructor. /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair( const pair &p) - : first(p.first), second(p.second) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(const pair& p) + : first(p.first), second(p.second) {} // from std::pair template - pair( const std::pair &p) - : first(p.first), second(p.second) - {} + pair(const std::pair& p) : first(p.first), second(p.second) {} /// \brief Assignment operator. /// /// This calls the assignment operators of T1 and T2. It won't /// compile if the assignment operators are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION - pair & operator=(const pair &p) - { - first = p.first; + KOKKOS_FORCEINLINE_FUNCTION pair& operator=( + const pair& p) { + first = p.first; second = p.second; return *this; } @@ -292,20 +269,20 @@ struct pair /// \note This is not a conversion operator, since defining a /// conversion operator made the relational operators have /// ambiguous definitions. - std::pair to_std_pair() const - { return std::make_pair(first,second); } + std::pair to_std_pair() const { + return std::make_pair(first, second); + } }; template -struct pair -{ +struct pair { //! The first template parameter of this class. - typedef T1& first_type; + typedef T1& first_type; //! The second template parameter of this class. typedef T2 second_type; //! The first element of the pair. - first_type first; + first_type first; //! The second element of the pair. second_type second; @@ -313,36 +290,29 @@ struct pair /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair(first_type f, second_type const& s) - : first(f), second(s) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(first_type f, second_type const& s) + : first(f), second(s) {} /// \brief Copy constructor. /// /// This calls the copy constructors of T1 and T2. It won't compile /// if those copy constructors are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair( const pair &p) - : first(p.first), second(p.second) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(const pair& p) + : first(p.first), second(p.second) {} // from std::pair template - pair( const std::pair &p) - : first(p.first), second(p.second) - {} + pair(const std::pair& p) : first(p.first), second(p.second) {} /// \brief Assignment operator. /// /// This calls the assignment operators of T1 and T2. It won't /// compile if the assignment operators are not defined and public. template - KOKKOS_FORCEINLINE_FUNCTION - pair & operator=(const pair &p) - { - first = p.first; + KOKKOS_FORCEINLINE_FUNCTION pair& operator=( + const pair& p) { + first = p.first; second = p.second; return *this; } @@ -356,54 +326,62 @@ struct pair /// \note This is not a conversion operator, since defining a /// conversion operator made the relational operators have /// ambiguous definitions. - std::pair to_std_pair() const - { return std::make_pair(first,second); } + std::pair to_std_pair() const { + return std::make_pair(first, second); + } }; //! Equality operator for Kokkos::pair. template -KOKKOS_FORCEINLINE_FUNCTION -bool operator== (const pair& lhs, const pair& rhs) -{ return lhs.first==rhs.first && lhs.second==rhs.second; } +KOKKOS_FORCEINLINE_FUNCTION bool operator==(const pair& lhs, + const pair& rhs) { + return lhs.first == rhs.first && lhs.second == rhs.second; +} //! Inequality operator for Kokkos::pair. template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator!= (const pair& lhs, const pair& rhs) -{ return !(lhs==rhs); } +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator!=(const pair& lhs, + const pair& rhs) { + return !(lhs == rhs); +} //! Less-than operator for Kokkos::pair. template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator< (const pair& lhs, const pair& rhs) -{ return lhs.first& lhs, + const pair& rhs) { + return lhs.first < rhs.first || + (!(rhs.first < lhs.first) && lhs.second < rhs.second); +} //! Less-than-or-equal-to operator for Kokkos::pair. template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator<= (const pair& lhs, const pair& rhs) -{ return !(rhs& lhs, + const pair& rhs) { + return !(rhs < lhs); +} //! Greater-than operator for Kokkos::pair. template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator> (const pair& lhs, const pair& rhs) -{ return rhs(const pair& lhs, + const pair& rhs) { + return rhs < lhs; +} //! Greater-than-or-equal-to operator for Kokkos::pair. template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator>= (const pair& lhs, const pair& rhs) -{ return !(lhs=(const pair& lhs, + const pair& rhs) { + return !(lhs < rhs); +} /// \brief Return a new pair. /// /// This is a "nonmember constructor" for Kokkos::pair. It works just /// like std::make_pair. -template -KOKKOS_FORCEINLINE_FUNCTION constexpr -pair make_pair (T1 x, T2 y) -{ return ( pair(x,y) ); } +template +KOKKOS_FORCEINLINE_FUNCTION constexpr pair make_pair(T1 x, T2 y) { + return (pair(x, y)); +} /// \brief Return a pair of references to the input arguments. /// @@ -444,51 +422,44 @@ pair make_pair (T1 x, T2 y) /// element of the pair. The latter could be significant if one or /// both elements of the pair are more substantial objects than \c int /// or \c bool. -template -KOKKOS_FORCEINLINE_FUNCTION -pair tie (T1 & x, T2 & y) -{ return ( pair(x,y) ); } +template +KOKKOS_FORCEINLINE_FUNCTION pair tie(T1& x, T2& y) { + return (pair(x, y)); +} // // Specialization of Kokkos::pair for a \c void second argument. This // is not actually a "pair"; it only contains one element, the first. // template -struct pair -{ +struct pair { typedef T1 first_type; typedef void second_type; - first_type first; + first_type first; enum { second = 0 }; KOKKOS_FORCEINLINE_FUNCTION constexpr #ifdef KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND - pair() : first() {} + pair() + : first() { + } #else - pair() = default; + pair() = default; #endif - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair(const first_type & f) - : first(f) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(const first_type& f) : first(f) {} - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair(const first_type & f, int) - : first(f) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(const first_type& f, int) + : first(f) {} template - KOKKOS_FORCEINLINE_FUNCTION constexpr - pair( const pair &p) - : first(p.first) - {} + KOKKOS_FORCEINLINE_FUNCTION constexpr pair(const pair& p) + : first(p.first) {} template - KOKKOS_FORCEINLINE_FUNCTION - pair & operator=(const pair &p) - { + KOKKOS_FORCEINLINE_FUNCTION pair& operator=( + const pair& p) { first = p.first; return *this; } @@ -499,46 +470,52 @@ struct pair // template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator== (const pair& lhs, const pair& rhs) -{ return lhs.first==rhs.first; } +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator==( + const pair& lhs, const pair& rhs) { + return lhs.first == rhs.first; +} template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator!= (const pair& lhs, const pair& rhs) -{ return !(lhs==rhs); } +KOKKOS_FORCEINLINE_FUNCTION constexpr bool operator!=( + const pair& lhs, const pair& rhs) { + return !(lhs == rhs); +} template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator< (const pair& lhs, const pair& rhs) -{ return lhs.first& lhs, const pair& rhs) { + return lhs.first < rhs.first; +} template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator<= (const pair& lhs, const pair& rhs) -{ return !(rhs& lhs, const pair& rhs) { + return !(rhs < lhs); +} template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator> (const pair& lhs, const pair& rhs) -{ return rhs( + const pair& lhs, const pair& rhs) { + return rhs < lhs; +} template -KOKKOS_FORCEINLINE_FUNCTION constexpr -bool operator>= (const pair& lhs, const pair& rhs) -{ return !(lhs=( + const pair& lhs, const pair& rhs) { + return !(lhs < rhs); +} namespace Impl { -template struct is_pair_like : std::false_type { }; -template struct is_pair_like> : std::true_type { }; -template struct is_pair_like> : std::true_type { }; +template +struct is_pair_like : std::false_type {}; +template +struct is_pair_like> : std::true_type {}; +template +struct is_pair_like> : std::true_type {}; -} // end namespace Impl +} // end namespace Impl -} // namespace Kokkos - - -#endif //KOKKOS_PAIR_HPP +} // namespace Kokkos +#endif // KOKKOS_PAIR_HPP diff --git a/lib/kokkos/core/src/Kokkos_Parallel.hpp b/lib/kokkos/core/src/Kokkos_Parallel.hpp index 09dcf60b11..7277ce287a 100644 --- a/lib/kokkos/core/src/Kokkos_Parallel.hpp +++ b/lib/kokkos/core/src/Kokkos_Parallel.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -63,7 +64,7 @@ #include #ifdef KOKKOS_DEBUG -#include +#include #endif //---------------------------------------------------------------------------- @@ -80,67 +81,52 @@ namespace Impl { * else if the Functor has a device_type use that for backward compatibility * else use the default */ -template< class Functor - , class Policy - , class EnableFunctor - , class EnablePolicy - > +template struct FunctorPolicyExecutionSpace { - typedef Kokkos::DefaultExecutionSpace execution_space ; + typedef Kokkos::DefaultExecutionSpace execution_space; }; -template< class Functor , class Policy > -struct FunctorPolicyExecutionSpace - < Functor , Policy - , typename enable_if_type< typename Functor::device_type >::type - , typename enable_if_type< typename Policy ::execution_space >::type - > -{ - typedef typename Policy ::execution_space execution_space ; +template +struct FunctorPolicyExecutionSpace< + Functor, Policy, + typename enable_if_type::type, + typename enable_if_type::type> { + typedef typename Policy ::execution_space execution_space; }; -template< class Functor , class Policy > -struct FunctorPolicyExecutionSpace - < Functor , Policy - , typename enable_if_type< typename Functor::execution_space >::type - , typename enable_if_type< typename Policy ::execution_space >::type - > -{ - typedef typename Policy ::execution_space execution_space ; +template +struct FunctorPolicyExecutionSpace< + Functor, Policy, + typename enable_if_type::type, + typename enable_if_type::type> { + typedef typename Policy ::execution_space execution_space; }; -template< class Functor , class Policy , class EnableFunctor > -struct FunctorPolicyExecutionSpace - < Functor , Policy - , EnableFunctor - , typename enable_if_type< typename Policy::execution_space >::type - > -{ - typedef typename Policy ::execution_space execution_space ; +template +struct FunctorPolicyExecutionSpace< + Functor, Policy, EnableFunctor, + typename enable_if_type::type> { + typedef typename Policy ::execution_space execution_space; }; -template< class Functor , class Policy , class EnablePolicy > -struct FunctorPolicyExecutionSpace - < Functor , Policy - , typename enable_if_type< typename Functor::device_type >::type - , EnablePolicy - > -{ - typedef typename Functor::device_type execution_space ; +template +struct FunctorPolicyExecutionSpace< + Functor, Policy, + typename enable_if_type::type, + EnablePolicy> { + typedef typename Functor::device_type execution_space; }; -template< class Functor , class Policy , class EnablePolicy > -struct FunctorPolicyExecutionSpace - < Functor , Policy - , typename enable_if_type< typename Functor::execution_space >::type - , EnablePolicy - > -{ - typedef typename Functor::execution_space execution_space ; +template +struct FunctorPolicyExecutionSpace< + Functor, Policy, + typename enable_if_type::type, + EnablePolicy> { + typedef typename Functor::execution_space execution_space; }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -168,89 +154,82 @@ namespace Kokkos { * This compares to a single iteration \c iwork of a \c for loop. * If \c execution_space is not defined DefaultExecutionSpace will be used. */ -template< class ExecPolicy , class FunctorType > -inline -void parallel_for( const ExecPolicy & policy - , const FunctorType & functor - , const std::string& str = "" - , typename Impl::enable_if< Kokkos::Impl::is_execution_policy< ExecPolicy >::value >::type * = 0 - ) -{ +template +inline void parallel_for( + const ExecPolicy& policy, const FunctorType& functor, + const std::string& str = "", + typename Impl::enable_if< + Kokkos::Impl::is_execution_policy::value>::type* = 0) { #if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Impl::ParallelConstructName name(str); + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Impl::ParallelConstructName + name(str); Kokkos::Profiling::beginParallelFor(name.get(), 0, &kpID); } #endif - Kokkos::Impl::shared_allocation_tracking_disable(); - Impl::ParallelFor< FunctorType , ExecPolicy > closure( functor , policy ); - Kokkos::Impl::shared_allocation_tracking_enable(); + Kokkos::Impl::shared_allocation_tracking_disable(); + Impl::ParallelFor closure(functor, policy); + Kokkos::Impl::shared_allocation_tracking_enable(); - closure.execute(); + closure.execute(); #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { + if (Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::endParallelFor(kpID); } #endif } -template< class FunctorType > -inline -void parallel_for( const size_t work_count - , const FunctorType & functor - , const std::string& str = "" - ) -{ - typedef typename - Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space - execution_space ; - typedef RangePolicy< execution_space > policy ; +template +inline void parallel_for(const size_t work_count, const FunctorType& functor, + const std::string& str = "") { + typedef typename Impl::FunctorPolicyExecutionSpace< + FunctorType, void>::execution_space execution_space; + typedef RangePolicy policy; #if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; - if(Kokkos::Profiling::profileLibraryLoaded()) { + if (Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Impl::ParallelConstructName name(str); Kokkos::Profiling::beginParallelFor(name.get(), 0, &kpID); } #endif Kokkos::Impl::shared_allocation_tracking_disable(); - Impl::ParallelFor< FunctorType , policy > closure( functor , policy(0,work_count) ); + Impl::ParallelFor closure(functor, + policy(0, work_count)); Kokkos::Impl::shared_allocation_tracking_enable(); closure.execute(); #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Profiling::endParallelFor(kpID); - } + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endParallelFor(kpID); + } #endif } -template< class ExecPolicy , class FunctorType > -inline -void parallel_for( const std::string & str - , const ExecPolicy & policy - , const FunctorType & functor ) -{ - #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES +template +inline void parallel_for(const std::string& str, const ExecPolicy& policy, + const FunctorType& functor) { +#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES Kokkos::fence(); std::cout << "KOKKOS_DEBUG Start parallel_for kernel: " << str << std::endl; - #endif +#endif - ::Kokkos::parallel_for(policy,functor,str); + ::Kokkos::parallel_for(policy, functor, str); - #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES +#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES Kokkos::fence(); std::cout << "KOKKOS_DEBUG End parallel_for kernel: " << str << std::endl; - #endif - (void) str; +#endif + (void)str; } -} +} // namespace Kokkos #include //---------------------------------------------------------------------------- @@ -291,9 +270,9 @@ namespace Kokkos { /// // operator() or join(). /// typedef PodType value_type; /// -/// void operator () (const ExecPolicy::member_type & i, value_type& update, const bool final_pass) const; -/// void init (value_type& update) const; -/// void join (volatile value_type& update, volatile const value_type& input) const +/// void operator () (const ExecPolicy::member_type & i, value_type& update, +/// const bool final_pass) const; void init (value_type& update) const; void +/// join (volatile value_type& update, volatile const value_type& input) const /// }; /// \endcode /// @@ -310,9 +289,11 @@ namespace Kokkos { /// typedef typename SpaceType::size_type size_type; /// /// InclScanFunctor( Kokkos::View x -/// , Kokkos::View y ) : m_x(x), m_y(y) {} +/// , Kokkos::View y ) : m_x(x), +/// m_y(y) {} /// -/// void operator () (const size_type i, value_type& update, const bool final_pass) const { +/// void operator () (const size_type i, value_type& update, const bool +/// final_pass) const { /// update += m_x(i); /// if (final_pass) { /// m_y(i) = update; @@ -321,7 +302,8 @@ namespace Kokkos { /// void init (value_type& update) const { /// update = 0; /// } -/// void join (volatile value_type& update, volatile const value_type& input) const { +/// void join (volatile value_type& update, volatile const value_type& input) +/// const { /// update += input; /// } /// @@ -347,7 +329,8 @@ namespace Kokkos { /// /// ExclScanFunctor (Kokkos::View x) : x_ (x) {} /// -/// void operator () (const size_type i, value_type& update, const bool final_pass) const { +/// void operator () (const size_type i, value_type& update, const bool +/// final_pass) const { /// const value_type x_i = x_(i); /// if (final_pass) { /// x_(i) = update; @@ -357,7 +340,8 @@ namespace Kokkos { /// void init (value_type& update) const { /// update = 0; /// } -/// void join (volatile value_type& update, volatile const value_type& input) const { +/// void join (volatile value_type& update, volatile const value_type& input) +/// const { /// update += input; /// } /// @@ -385,10 +369,12 @@ namespace Kokkos { /// // If x has length zero, then lastIndex_ won't be used anyway. /// OffsetScanFunctor( Kokkos::View x /// , Kokkos::View y ) -/// : m_x(x), m_y(y), last_index_ (x.dimension_0 () == 0 ? 0 : x.dimension_0 () - 1) +/// : m_x(x), m_y(y), last_index_ (x.dimension_0 () == 0 ? 0 : +/// x.dimension_0 () - 1) /// {} /// -/// void operator () (const size_type i, int& update, const bool final_pass) const { +/// void operator () (const size_type i, int& update, const bool final_pass) +/// const { /// if (final_pass) { /// m_y(i) = update; /// } @@ -396,12 +382,13 @@ namespace Kokkos { /// // The last entry of m_y gets the final sum. /// if (final_pass && i == last_index_) { /// m_y(i+1) = update; -//i/ } +// i/ } /// } /// void init (value_type& update) const { /// update = 0; /// } -/// void join (volatile value_type& update, volatile const value_type& input) const { +/// void join (volatile value_type& update, volatile const value_type& input) +/// const { /// update += input; /// } /// @@ -412,181 +399,164 @@ namespace Kokkos { /// }; /// \endcode /// -template< class ExecutionPolicy , class FunctorType > -inline -void parallel_scan( const ExecutionPolicy & policy - , const FunctorType & functor - , const std::string& str = "" - , typename Impl::enable_if< Kokkos::Impl::is_execution_policy< ExecutionPolicy >::value >::type * = 0 - ) -{ +template +inline void parallel_scan( + const ExecutionPolicy& policy, const FunctorType& functor, + const std::string& str = "", + typename Impl::enable_if< + Kokkos::Impl::is_execution_policy::value>::type* = 0) { #if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Impl::ParallelConstructName name(str); + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Impl::ParallelConstructName + name(str); Kokkos::Profiling::beginParallelScan(name.get(), 0, &kpID); } #endif Kokkos::Impl::shared_allocation_tracking_disable(); - Impl::ParallelScan< FunctorType , ExecutionPolicy > closure( functor , policy ); + Impl::ParallelScan closure(functor, policy); Kokkos::Impl::shared_allocation_tracking_enable(); - + closure.execute(); #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { + if (Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::endParallelScan(kpID); } #endif - } -template< class FunctorType > -inline -void parallel_scan( const size_t work_count - , const FunctorType & functor - , const std::string& str = "" ) -{ - typedef typename - Kokkos::Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space - execution_space ; +template +inline void parallel_scan(const size_t work_count, const FunctorType& functor, + const std::string& str = "") { + typedef typename Kokkos::Impl::FunctorPolicyExecutionSpace< + FunctorType, void>::execution_space execution_space; - typedef Kokkos::RangePolicy< execution_space > policy ; + typedef Kokkos::RangePolicy policy; #if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; - if(Kokkos::Profiling::profileLibraryLoaded()) { + if (Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Impl::ParallelConstructName name(str); Kokkos::Profiling::beginParallelScan(name.get(), 0, &kpID); } #endif Kokkos::Impl::shared_allocation_tracking_disable(); - Impl::ParallelScan< FunctorType , policy > closure( functor , policy(0,work_count) ); + Impl::ParallelScan closure(functor, + policy(0, work_count)); Kokkos::Impl::shared_allocation_tracking_enable(); - + closure.execute(); #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { + if (Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::endParallelScan(kpID); } #endif - } -template< class ExecutionPolicy , class FunctorType > -inline -void parallel_scan( const std::string& str - , const ExecutionPolicy & policy - , const FunctorType & functor) -{ - #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES +template +inline void parallel_scan(const std::string& str, const ExecutionPolicy& policy, + const FunctorType& functor) { +#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES Kokkos::fence(); std::cout << "KOKKOS_DEBUG Start parallel_scan kernel: " << str << std::endl; - #endif - - ::Kokkos::parallel_scan(policy,functor,str); +#endif - #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES + ::Kokkos::parallel_scan(policy, functor, str); + +#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES Kokkos::fence(); std::cout << "KOKKOS_DEBUG End parallel_scan kernel: " << str << std::endl; - #endif - (void) str; +#endif + (void)str; } - -template< class ExecutionPolicy , class FunctorType, class ReturnType > -inline -void parallel_scan( const ExecutionPolicy & policy - , const FunctorType & functor - , ReturnType & return_value - , const std::string& str = "" - , typename Impl::enable_if< Kokkos::Impl::is_execution_policy< ExecutionPolicy >::value >::type * = 0 - ) -{ +template +inline void parallel_scan( + const ExecutionPolicy& policy, const FunctorType& functor, + ReturnType& return_value, const std::string& str = "", + typename Impl::enable_if< + Kokkos::Impl::is_execution_policy::value>::type* = 0) { #if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Impl::ParallelConstructName name(str); + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Impl::ParallelConstructName + name(str); Kokkos::Profiling::beginParallelScan(name.get(), 0, &kpID); } #endif Kokkos::Impl::shared_allocation_tracking_disable(); - Impl::ParallelScanWithTotal< FunctorType , ExecutionPolicy, ReturnType > closure( functor, policy, return_value ); + Impl::ParallelScanWithTotal closure( + functor, policy, return_value); Kokkos::Impl::shared_allocation_tracking_enable(); - + closure.execute(); #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { + if (Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::endParallelScan(kpID); } #endif Kokkos::fence(); } -template< class FunctorType, class ReturnType > -inline -void parallel_scan( const size_t work_count - , const FunctorType & functor - , ReturnType & return_value - , const std::string & str = "" ) -{ - typedef typename - Kokkos::Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space - execution_space ; +template +inline void parallel_scan(const size_t work_count, const FunctorType& functor, + ReturnType& return_value, + const std::string& str = "") { + typedef typename Kokkos::Impl::FunctorPolicyExecutionSpace< + FunctorType, void>::execution_space execution_space; - typedef Kokkos::RangePolicy< execution_space > policy ; + typedef Kokkos::RangePolicy policy; #if defined(KOKKOS_ENABLE_PROFILING) uint64_t kpID = 0; - if(Kokkos::Profiling::profileLibraryLoaded()) { + if (Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Impl::ParallelConstructName name(str); Kokkos::Profiling::beginParallelScan(name.get(), 0, &kpID); } #endif Kokkos::Impl::shared_allocation_tracking_disable(); - Impl::ParallelScanWithTotal< FunctorType, policy, ReturnType > closure( functor, policy(0,work_count), return_value ); + Impl::ParallelScanWithTotal closure( + functor, policy(0, work_count), return_value); Kokkos::Impl::shared_allocation_tracking_enable(); - + closure.execute(); #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { + if (Kokkos::Profiling::profileLibraryLoaded()) { Kokkos::Profiling::endParallelScan(kpID); } #endif Kokkos::fence(); } -template< class ExecutionPolicy, class FunctorType, class ReturnType > -inline -void parallel_scan( const std::string& str - , const ExecutionPolicy & policy - , const FunctorType & functor - , ReturnType & return_value) -{ - #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES +template +inline void parallel_scan(const std::string& str, const ExecutionPolicy& policy, + const FunctorType& functor, + ReturnType& return_value) { +#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES Kokkos::fence(); std::cout << "KOKKOS_DEBUG Start parallel_scan kernel: " << str << std::endl; - #endif - - ::Kokkos::parallel_scan(policy,functor,return_value,str); +#endif - #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES + ::Kokkos::parallel_scan(policy, functor, return_value, str); + +#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES Kokkos::fence(); std::cout << "KOKKOS_DEBUG End parallel_scan kernel: " << str << std::endl; - #endif - (void) str; +#endif + (void)str; } - - -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -594,29 +564,35 @@ void parallel_scan( const std::string& str namespace Kokkos { namespace Impl { -template< class FunctorType , class Enable = void > -struct FunctorTeamShmemSize -{ - KOKKOS_INLINE_FUNCTION static size_t value( const FunctorType & , int ) { return 0 ; } +template +struct FunctorTeamShmemSize { + KOKKOS_INLINE_FUNCTION static size_t value(const FunctorType&, int) { + return 0; + } }; -template< class FunctorType > -struct FunctorTeamShmemSize< FunctorType , typename Impl::enable_if< 0 < sizeof( & FunctorType::team_shmem_size ) >::type > -{ - static inline size_t value( const FunctorType & f , int team_size ) { return f.team_shmem_size( team_size ) ; } +template +struct FunctorTeamShmemSize< + FunctorType, + typename Impl::enable_if<0 < sizeof(&FunctorType::team_shmem_size)>::type> { + static inline size_t value(const FunctorType& f, int team_size) { + return f.team_shmem_size(team_size); + } }; -template< class FunctorType > -struct FunctorTeamShmemSize< FunctorType , typename Impl::enable_if< 0 < sizeof( & FunctorType::shmem_size ) >::type > -{ - static inline size_t value( const FunctorType & f , int team_size ) { return f.shmem_size( team_size ) ; } +template +struct FunctorTeamShmemSize< + FunctorType, + typename Impl::enable_if<0 < sizeof(&FunctorType::shmem_size)>::type> { + static inline size_t value(const FunctorType& f, int team_size) { + return f.shmem_size(team_size); + } }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- #endif /* KOKKOS_PARALLEL_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_Parallel_Reduce.hpp b/lib/kokkos/core/src/Kokkos_Parallel_Reduce.hpp index 0e02c468e4..1fa23f714f 100644 --- a/lib/kokkos/core/src/Kokkos_Parallel_Reduce.hpp +++ b/lib/kokkos/core/src/Kokkos_Parallel_Reduce.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,46 +49,43 @@ namespace Kokkos { -template +template struct is_reducer_type { enum { value = 0 }; }; - -template -struct is_reducer_type::type, - typename std::remove_cv::type>::value - >::type> { +template +struct is_reducer_type< + T, typename std::enable_if::type, + typename std::remove_cv::type>::value>::type> { enum { value = 1 }; }; -template +template struct Sum { -public: - //Required + public: + // Required typedef Sum reducer; typedef typename std::remove_cv::type value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + Sum(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - Sum(value_type& value_): value(&value_),references_scalar_v(true) {} + Sum(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - Sum(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { - dest += src; - } + void join(value_type& dest, const value_type& src) const { dest += src; } KOKKOS_INLINE_FUNCTION void join(volatile value_type& dest, const volatile value_type& src) const { @@ -95,52 +93,44 @@ public: } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { + void init(value_type& val) const { val = reduction_identity::sum(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct Prod { -public: - //Required + public: + // Required typedef Prod reducer; typedef typename std::remove_cv::type value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + Prod(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - Prod(value_type& value_): value(&value_),references_scalar_v(true) {} + Prod(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - Prod(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { - dest *= src; - } + void join(value_type& dest, const value_type& src) const { dest *= src; } KOKKOS_INLINE_FUNCTION void join(volatile value_type& dest, const volatile value_type& src) const { @@ -148,160 +138,138 @@ public: } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { + void init(value_type& val) const { val = reduction_identity::prod(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct Min { -public: - //Required + public: + // Required typedef Min reducer; typedef typename std::remove_cv::type value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + Min(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - Min(value_type& value_): value(&value_),references_scalar_v(true) {} + Min(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - Min(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { - if ( src < dest ) - dest = src; + void join(value_type& dest, const value_type& src) const { + if (src < dest) dest = src; } KOKKOS_INLINE_FUNCTION void join(volatile value_type& dest, const volatile value_type& src) const { - if ( src < dest ) - dest = src; + if (src < dest) dest = src; } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { + void init(value_type& val) const { val = reduction_identity::min(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct Max { -public: - //Required + public: + // Required typedef Max reducer; typedef typename std::remove_cv::type value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + Max(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - Max(value_type& value_): value(&value_),references_scalar_v(true) {} + Max(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - Max(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { - if ( src > dest ) - dest = src; + void join(value_type& dest, const value_type& src) const { + if (src > dest) dest = src; } KOKKOS_INLINE_FUNCTION void join(volatile value_type& dest, const volatile value_type& src) const { - if ( src > dest ) - dest = src; + if (src > dest) dest = src; } - //Required + // Required KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { + void init(value_type& val) const { val = reduction_identity::max(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct LAnd { -public: - //Required + public: + // Required typedef LAnd reducer; typedef typename std::remove_cv::type value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + LAnd(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - LAnd(value_type& value_): value(&value_),references_scalar_v(true) {} + LAnd(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} KOKKOS_INLINE_FUNCTION - LAnd(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { + void join(value_type& dest, const value_type& src) const { dest = dest && src; } @@ -311,50 +279,44 @@ public: } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { + void init(value_type& val) const { val = reduction_identity::land(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct LOr { -public: - //Required + public: + // Required typedef LOr reducer; typedef typename std::remove_cv::type value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + LOr(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - LOr(value_type& value_): value(&value_),references_scalar_v(true) {} + LOr(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - LOr(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { + void join(value_type& dest, const value_type& src) const { dest = dest || src; } @@ -364,51 +326,45 @@ public: } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { + void init(value_type& val) const { val = reduction_identity::lor(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct BAnd { -public: - //Required + public: + // Required typedef BAnd reducer; typedef typename std::remove_cv::type value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + BAnd(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - BAnd(value_type& value_): value(&value_),references_scalar_v(true) {} + BAnd(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - BAnd(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { - dest = dest & src; + void join(value_type& dest, const value_type& src) const { + dest = dest & src; } KOKKOS_INLINE_FUNCTION @@ -417,51 +373,45 @@ public: } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { + void init(value_type& val) const { val = reduction_identity::band(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct BOr { -public: - //Required + public: + // Required typedef BOr reducer; typedef typename std::remove_cv::type value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + BOr(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - BOr(value_type& value_): value(&value_),references_scalar_v(true) {} + BOr(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - BOr(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { - dest = dest | src; + void join(value_type& dest, const value_type& src) const { + dest = dest | src; } KOKKOS_INLINE_FUNCTION @@ -470,256 +420,229 @@ public: } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { + void init(value_type& val) const { val = reduction_identity::bor(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct ValLocScalar { Scalar val; Index loc; KOKKOS_INLINE_FUNCTION - void operator = (const ValLocScalar& rhs) { + void operator=(const ValLocScalar& rhs) { val = rhs.val; loc = rhs.loc; } KOKKOS_INLINE_FUNCTION - void operator = (const volatile ValLocScalar& rhs) volatile { + void operator=(const volatile ValLocScalar& rhs) volatile { val = rhs.val; loc = rhs.loc; } }; -template +template struct MinLoc { -private: + private: typedef typename std::remove_cv::type scalar_type; typedef typename std::remove_cv::type index_type; -public: - //Required + public: + // Required typedef MinLoc reducer; - typedef ValLocScalar value_type; + typedef ValLocScalar value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + MinLoc(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - MinLoc(value_type& value_): value(&value_),references_scalar_v(true) {} + MinLoc(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - MinLoc(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { - if ( src.val < dest.val ) - dest = src; + void join(value_type& dest, const value_type& src) const { + if (src.val < dest.val) dest = src; } KOKKOS_INLINE_FUNCTION void join(volatile value_type& dest, const volatile value_type& src) const { - if ( src.val < dest.val ) - dest = src; + if (src.val < dest.val) dest = src; } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { + void init(value_type& val) const { val.val = reduction_identity::min(); val.loc = reduction_identity::min(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct MaxLoc { -private: + private: typedef typename std::remove_cv::type scalar_type; typedef typename std::remove_cv::type index_type; -public: - //Required + public: + // Required typedef MaxLoc reducer; - typedef ValLocScalar value_type; + typedef ValLocScalar value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + MaxLoc(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - MaxLoc(value_type& value_): value(&value_),references_scalar_v(true) {} + MaxLoc(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - MaxLoc(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { - if ( src.val > dest.val ) - dest = src; + void join(value_type& dest, const value_type& src) const { + if (src.val > dest.val) dest = src; } KOKKOS_INLINE_FUNCTION void join(volatile value_type& dest, const volatile value_type& src) const { - if ( src.val > dest.val ) - dest = src; + if (src.val > dest.val) dest = src; } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { - val.val = reduction_identity::max();; + void init(value_type& val) const { + val.val = reduction_identity::max(); + ; val.loc = reduction_identity::min(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct MinMaxScalar { - Scalar min_val,max_val; + Scalar min_val, max_val; KOKKOS_INLINE_FUNCTION - void operator = (const MinMaxScalar& rhs) { + void operator=(const MinMaxScalar& rhs) { min_val = rhs.min_val; max_val = rhs.max_val; } KOKKOS_INLINE_FUNCTION - void operator = (const volatile MinMaxScalar& rhs) volatile { + void operator=(const volatile MinMaxScalar& rhs) volatile { min_val = rhs.min_val; max_val = rhs.max_val; } }; -template +template struct MinMax { -private: + private: typedef typename std::remove_cv::type scalar_type; -public: - //Required + public: + // Required typedef MinMax reducer; typedef MinMaxScalar value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + MinMax(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - MinMax(value_type& value_): value(&value_),references_scalar_v(true) {} + MinMax(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - MinMax(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { - if ( src.min_val < dest.min_val ) { + void join(value_type& dest, const value_type& src) const { + if (src.min_val < dest.min_val) { dest.min_val = src.min_val; } - if ( src.max_val > dest.max_val ) { + if (src.max_val > dest.max_val) { dest.max_val = src.max_val; } } KOKKOS_INLINE_FUNCTION void join(volatile value_type& dest, const volatile value_type& src) const { - if ( src.min_val < dest.min_val ) { + if (src.min_val < dest.min_val) { dest.min_val = src.min_val; } - if ( src.max_val > dest.max_val ) { + if (src.max_val > dest.max_val) { dest.max_val = src.max_val; } } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { - val.max_val = reduction_identity::max();; + void init(value_type& val) const { + val.max_val = reduction_identity::max(); + ; val.min_val = reduction_identity::min(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -template +template struct MinMaxLocScalar { - Scalar min_val,max_val; - Index min_loc,max_loc; + Scalar min_val, max_val; + Index min_loc, max_loc; KOKKOS_INLINE_FUNCTION - void operator = (const MinMaxLocScalar& rhs) { + void operator=(const MinMaxLocScalar& rhs) { min_val = rhs.min_val; min_loc = rhs.min_loc; max_val = rhs.max_val; @@ -727,7 +650,7 @@ struct MinMaxLocScalar { } KOKKOS_INLINE_FUNCTION - void operator = (const volatile MinMaxLocScalar& rhs) volatile { + void operator=(const volatile MinMaxLocScalar& rhs) volatile { min_val = rhs.min_val; min_loc = rhs.min_loc; max_val = rhs.max_val; @@ -735,39 +658,39 @@ struct MinMaxLocScalar { } }; -template +template struct MinMaxLoc { -private: + private: typedef typename std::remove_cv::type scalar_type; typedef typename std::remove_cv::type index_type; -public: - //Required + public: + // Required typedef MinMaxLoc reducer; - typedef MinMaxLocScalar value_type; + typedef MinMaxLocScalar value_type; typedef Kokkos::View result_view_type; -private: + private: result_view_type value; bool references_scalar_v; -public: + public: + KOKKOS_INLINE_FUNCTION + MinMaxLoc(value_type& value_) : value(&value_), references_scalar_v(true) {} KOKKOS_INLINE_FUNCTION - MinMaxLoc(value_type& value_): value(&value_),references_scalar_v(true) {} + MinMaxLoc(const result_view_type& value_) + : value(value_), references_scalar_v(false) {} + // Required KOKKOS_INLINE_FUNCTION - MinMaxLoc(const result_view_type& value_): value(value_),references_scalar_v(false) {} - - //Required - KOKKOS_INLINE_FUNCTION - void join(value_type& dest, const value_type& src) const { - if ( src.min_val < dest.min_val ) { + void join(value_type& dest, const value_type& src) const { + if (src.min_val < dest.min_val) { dest.min_val = src.min_val; dest.min_loc = src.min_loc; } - if ( src.max_val > dest.max_val ) { + if (src.max_val > dest.max_val) { dest.max_val = src.max_val; dest.max_loc = src.max_loc; } @@ -775,71 +698,68 @@ public: KOKKOS_INLINE_FUNCTION void join(volatile value_type& dest, const volatile value_type& src) const { - if ( src.min_val < dest.min_val ) { + if (src.min_val < dest.min_val) { dest.min_val = src.min_val; dest.min_loc = src.min_loc; } - if ( src.max_val > dest.max_val ) { + if (src.max_val > dest.max_val) { dest.max_val = src.max_val; dest.max_loc = src.max_loc; } } KOKKOS_INLINE_FUNCTION - void init( value_type& val) const { - val.max_val = reduction_identity::max();; + void init(value_type& val) const { + val.max_val = reduction_identity::max(); + ; val.min_val = reduction_identity::min(); val.max_loc = reduction_identity::min(); val.min_loc = reduction_identity::min(); } KOKKOS_INLINE_FUNCTION - value_type& reference() const { - return *value.data(); - } + value_type& reference() const { return *value.data(); } KOKKOS_INLINE_FUNCTION - result_view_type view() const { - return value; - } + result_view_type view() const { return value; } KOKKOS_INLINE_FUNCTION - bool references_scalar() const { - return references_scalar_v; - } + bool references_scalar() const { return references_scalar_v; } }; -} -namespace Kokkos{ +} // namespace Kokkos +namespace Kokkos { namespace Impl { -template< class T, class ReturnType , class ValueTraits> +template struct ParallelReduceReturnValue; -template< class ReturnType , class FunctorType > -struct ParallelReduceReturnValue::value>::type, ReturnType, FunctorType> { +template +struct ParallelReduceReturnValue< + typename std::enable_if::value>::type, + ReturnType, FunctorType> { typedef ReturnType return_type; typedef InvalidType reducer_type; typedef typename return_type::value_type value_type_scalar; typedef typename return_type::value_type* const value_type_array; - typedef typename if_c::type value_type; + typedef typename if_c::type value_type; static return_type& return_value(ReturnType& return_val, const FunctorType&) { return return_val; } }; -template< class ReturnType , class FunctorType> -struct ParallelReduceReturnValue::value && - (!std::is_array::value && !std::is_pointer::value) && - !Kokkos::is_reducer_type::value - >::type, ReturnType, FunctorType> { - typedef Kokkos::View< ReturnType - , Kokkos::HostSpace - , Kokkos::MemoryUnmanaged - > return_type; +template +struct ParallelReduceReturnValue< + typename std::enable_if::value && + (!std::is_array::value && + !std::is_pointer::value) && + !Kokkos::is_reducer_type::value>::type, + ReturnType, FunctorType> { + typedef Kokkos::View + return_type; typedef InvalidType reducer_type; @@ -850,14 +770,14 @@ struct ParallelReduceReturnValue -struct ParallelReduceReturnValue::value || std::is_pointer::value) - >::type, ReturnType, FunctorType> { - typedef Kokkos::View< typename std::remove_const::type - , Kokkos::HostSpace - , Kokkos::MemoryUnmanaged - > return_type; +template +struct ParallelReduceReturnValue< + typename std::enable_if<(is_array::value || + std::is_pointer::value)>::type, + ReturnType, FunctorType> { + typedef Kokkos::View::type, + Kokkos::HostSpace, Kokkos::MemoryUnmanaged> + return_type; typedef InvalidType reducer_type; @@ -866,150 +786,154 @@ struct ParallelReduceReturnValue::value ) + if (is_array::value) return return_type(return_val); else - return return_type(return_val,functor.value_count); + return return_type(return_val, functor.value_count); #endif } }; -template< class ReturnType , class FunctorType> -struct ParallelReduceReturnValue::value - >::type, ReturnType, FunctorType> { +template +struct ParallelReduceReturnValue< + typename std::enable_if::value>::type, + ReturnType, FunctorType> { typedef ReturnType return_type; typedef ReturnType reducer_type; typedef typename return_type::value_type value_type; - static return_type return_value(ReturnType& return_val, - const FunctorType&) { + static return_type return_value(ReturnType& return_val, const FunctorType&) { return return_val; } }; -template< class T, class ReturnType , class FunctorType> +template struct ParallelReducePolicyType; -template< class PolicyType , class FunctorType > -struct ParallelReducePolicyType::value>::type, PolicyType,FunctorType> { - +template +struct ParallelReducePolicyType< + typename std::enable_if< + Kokkos::Impl::is_execution_policy::value>::type, + PolicyType, FunctorType> { typedef PolicyType policy_type; - static PolicyType policy(const PolicyType& policy_) { - return policy_; - } + static PolicyType policy(const PolicyType& policy_) { return policy_; } }; -template< class PolicyType , class FunctorType > -struct ParallelReducePolicyType::value>::type, PolicyType,FunctorType> { - typedef typename - Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space - execution_space ; +template +struct ParallelReducePolicyType< + typename std::enable_if::value>::type, + PolicyType, FunctorType> { + typedef typename Impl::FunctorPolicyExecutionSpace< + FunctorType, void>::execution_space execution_space; typedef Kokkos::RangePolicy policy_type; static policy_type policy(const PolicyType& policy_) { - return policy_type(0,policy_); + return policy_type(0, policy_); } }; +template +struct ParallelReduceFunctorType { + typedef FunctorType functor_type; + static const functor_type& functor(const functor_type& functor) { + return functor; + } +}; - template< class FunctorType, class ExecPolicy, class ValueType, class ExecutionSpace> - struct ParallelReduceFunctorType { - typedef FunctorType functor_type; - static const functor_type& functor(const functor_type& functor) { - return functor; +template +struct ParallelReduceAdaptor { + typedef Impl::ParallelReduceReturnValue + return_value_adapter; +#ifdef KOKKOS_IMPL_NEED_FUNCTOR_WRAPPER + typedef Impl::ParallelReduceFunctorType< + FunctorType, PolicyType, typename return_value_adapter::value_type, + typename PolicyType::execution_space> + functor_adaptor; +#endif + static inline void execute(const std::string& label, const PolicyType& policy, + const FunctorType& functor, + ReturnType& return_value) { +#if defined(KOKKOS_ENABLE_PROFILING) + uint64_t kpID = 0; + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Impl::ParallelConstructName + name(label); + Kokkos::Profiling::beginParallelReduce(name.get(), 0, &kpID); } - }; +#endif - template< class PolicyType, class FunctorType, class ReturnType > - struct ParallelReduceAdaptor { - typedef Impl::ParallelReduceReturnValue return_value_adapter; - #ifdef KOKKOS_IMPL_NEED_FUNCTOR_WRAPPER - typedef Impl::ParallelReduceFunctorType functor_adaptor; - #endif - static inline - void execute(const std::string& label, - const PolicyType& policy, - const FunctorType& functor, - ReturnType& return_value) { - #if defined(KOKKOS_ENABLE_PROFILING) - uint64_t kpID = 0; - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Impl::ParallelConstructName name(label); - Kokkos::Profiling::beginParallelReduce(name.get(), 0, &kpID); - } - #endif + Kokkos::Impl::shared_allocation_tracking_disable(); +#ifdef KOKKOS_IMPL_NEED_FUNCTOR_WRAPPER + Impl::ParallelReduce + closure(functor_adaptor::functor(functor), policy, + return_value_adapter::return_value(return_value, functor)); +#else + Impl::ParallelReduce + closure(functor, policy, + return_value_adapter::return_value(return_value, functor)); +#endif + Kokkos::Impl::shared_allocation_tracking_enable(); + closure.execute(); - Kokkos::Impl::shared_allocation_tracking_disable(); - #ifdef KOKKOS_IMPL_NEED_FUNCTOR_WRAPPER - Impl::ParallelReduce - closure(functor_adaptor::functor(functor), - policy, - return_value_adapter::return_value(return_value,functor)); - #else - Impl::ParallelReduce - closure(functor, - policy, - return_value_adapter::return_value(return_value,functor)); - #endif - Kokkos::Impl::shared_allocation_tracking_enable(); - closure.execute(); - - #if defined(KOKKOS_ENABLE_PROFILING) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Profiling::endParallelReduce(kpID); - } - #endif - } - - }; -} +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::endParallelReduce(kpID); + } +#endif + } +}; +} // namespace Impl //---------------------------------------------------------------------------- /*! \fn void parallel_reduce(label,policy,functor,return_argument) \brief Perform a parallel reduction. - \param label An optional Label giving the call name. Must be able to construct a std::string from the argument. - \param policy A Kokkos Execution Policy, such as an integer, a RangePolicy or a TeamPolicy. - \param functor A functor with a reduction operator, and optional init, join and final functions. - \param return_argument A return argument which can be a scalar, a View, or a ReducerStruct. This argument can be left out if the functor has a final function. + \param label An optional Label giving the call name. Must be able to + construct a std::string from the argument. \param policy A Kokkos Execution + Policy, such as an integer, a RangePolicy or a TeamPolicy. \param functor A + functor with a reduction operator, and optional init, join and final + functions. \param return_argument A return argument which can be a scalar, a + View, or a ReducerStruct. This argument can be left out if the functor has a + final function. */ // Parallel Reduce Blocking behavior namespace Impl { template - struct ReducerHasTestReferenceFunction - { - template static std::true_type test_func( decltype(&E::references_scalar) ) ; - template static std::false_type test_func(...); +struct ReducerHasTestReferenceFunction { + template + static std::true_type test_func(decltype(&E::references_scalar)); + template + static std::false_type test_func(...); - enum { value = std::is_same(0))>::value }; + enum { + value = std::is_same(0))>::value }; +}; - template::value> - struct ParallelReduceFence { - static void fence(const T&) { - Kokkos::fence(); - } - }; - template - struct ParallelReduceFence, false> { - static void fence(const View) {}; - }; - template - struct ParallelReduceFence { - static void fence(const T& reducer) { - if(reducer.references_scalar()) - Kokkos::fence(); - } - }; -} +template ::value> +struct ParallelReduceFence { + static void fence(const T&) { Kokkos::fence(); } +}; +template +struct ParallelReduceFence, false> { + static void fence(const View){}; +}; +template +struct ParallelReduceFence { + static void fence(const T& reducer) { + if (reducer.references_scalar()) Kokkos::fence(); + } +}; +} // namespace Impl /** \brief Parallel reduction * @@ -1033,16 +957,12 @@ template * }; * \endcode * - * Example of a parallel_reduce functor for an array of POD (plain old data) values: - * \code - * class FunctorType { // For array of POD value - * public: - * typedef ... execution_space ; - * typedef value_type[] ; - * void operator()( , update[] ) const ; - * void init( update[] ) const ; - * void join( volatile update[] , - * volatile const input[] ) const ; + * Example of a parallel_reduce functor for an array of POD (plain old data) + * values: \code class FunctorType { // For array of POD value public: typedef + * ... execution_space ; typedef value_type[] ; void operator()( + * , update[] ) const ; void init( update[] ) + * const ; void join( volatile update[] , volatile const + * input[] ) const ; * * typedef true_type has_final ; * void final( update[] ) const ; @@ -1052,226 +972,223 @@ template // ReturnValue is scalar or array: take by reference -template< class PolicyType, class FunctorType, class ReturnType > -inline -void parallel_reduce(const std::string& label, - const PolicyType& policy, - const FunctorType& functor, - ReturnType& return_value, - typename Impl::enable_if< - Kokkos::Impl::is_execution_policy::value - >::type * = 0) { - Impl::ParallelReduceAdaptor::execute(label,policy,functor,return_value); +template +inline void parallel_reduce( + const std::string& label, const PolicyType& policy, + const FunctorType& functor, ReturnType& return_value, + typename Impl::enable_if< + Kokkos::Impl::is_execution_policy::value>::type* = 0) { + Impl::ParallelReduceAdaptor::execute( + label, policy, functor, return_value); Impl::ParallelReduceFence::fence(return_value); } -template< class PolicyType, class FunctorType, class ReturnType > -inline -void parallel_reduce(const PolicyType& policy, - const FunctorType& functor, - ReturnType& return_value, - typename Impl::enable_if< - Kokkos::Impl::is_execution_policy::value - >::type * = 0) { - Impl::ParallelReduceAdaptor::execute("",policy,functor,return_value); +template +inline void parallel_reduce( + const PolicyType& policy, const FunctorType& functor, + ReturnType& return_value, + typename Impl::enable_if< + Kokkos::Impl::is_execution_policy::value>::type* = 0) { + Impl::ParallelReduceAdaptor::execute( + "", policy, functor, return_value); Impl::ParallelReduceFence::fence(return_value); } -template< class FunctorType, class ReturnType > -inline -void parallel_reduce(const size_t& policy, - const FunctorType& functor, - ReturnType& return_value) { - typedef typename Impl::ParallelReducePolicyType::policy_type policy_type; - Impl::ParallelReduceAdaptor::execute("",policy_type(0,policy),functor,return_value); +template +inline void parallel_reduce(const size_t& policy, const FunctorType& functor, + ReturnType& return_value) { + typedef typename Impl::ParallelReducePolicyType< + void, size_t, FunctorType>::policy_type policy_type; + Impl::ParallelReduceAdaptor::execute( + "", policy_type(0, policy), functor, return_value); Impl::ParallelReduceFence::fence(return_value); } -template< class FunctorType, class ReturnType > -inline -void parallel_reduce(const std::string& label, - const size_t& policy, - const FunctorType& functor, - ReturnType& return_value) { - typedef typename Impl::ParallelReducePolicyType::policy_type policy_type; - Impl::ParallelReduceAdaptor::execute(label,policy_type(0,policy),functor,return_value); +template +inline void parallel_reduce(const std::string& label, const size_t& policy, + const FunctorType& functor, + ReturnType& return_value) { + typedef typename Impl::ParallelReducePolicyType< + void, size_t, FunctorType>::policy_type policy_type; + Impl::ParallelReduceAdaptor::execute( + label, policy_type(0, policy), functor, return_value); Impl::ParallelReduceFence::fence(return_value); } // ReturnValue as View or Reducer: take by copy to allow for inline construction -template< class PolicyType, class FunctorType, class ReturnType > -inline -void parallel_reduce(const std::string& label, - const PolicyType& policy, - const FunctorType& functor, - const ReturnType& return_value, - typename Impl::enable_if< - Kokkos::Impl::is_execution_policy::value - >::type * = 0) { +template +inline void parallel_reduce( + const std::string& label, const PolicyType& policy, + const FunctorType& functor, const ReturnType& return_value, + typename Impl::enable_if< + Kokkos::Impl::is_execution_policy::value>::type* = 0) { ReturnType return_value_impl = return_value; - Impl::ParallelReduceAdaptor::execute(label,policy,functor,return_value_impl); + Impl::ParallelReduceAdaptor::execute( + label, policy, functor, return_value_impl); Impl::ParallelReduceFence::fence(return_value); } -template< class PolicyType, class FunctorType, class ReturnType > -inline -void parallel_reduce(const PolicyType& policy, - const FunctorType& functor, - const ReturnType& return_value, - typename Impl::enable_if< - Kokkos::Impl::is_execution_policy::value - >::type * = 0) { +template +inline void parallel_reduce( + const PolicyType& policy, const FunctorType& functor, + const ReturnType& return_value, + typename Impl::enable_if< + Kokkos::Impl::is_execution_policy::value>::type* = 0) { ReturnType return_value_impl = return_value; - Impl::ParallelReduceAdaptor::execute("",policy,functor,return_value_impl); + Impl::ParallelReduceAdaptor::execute( + "", policy, functor, return_value_impl); Impl::ParallelReduceFence::fence(return_value); } -template< class FunctorType, class ReturnType > -inline -void parallel_reduce(const size_t& policy, - const FunctorType& functor, - const ReturnType& return_value) { - typedef typename Impl::ParallelReducePolicyType::policy_type policy_type; +template +inline void parallel_reduce(const size_t& policy, const FunctorType& functor, + const ReturnType& return_value) { + typedef typename Impl::ParallelReducePolicyType< + void, size_t, FunctorType>::policy_type policy_type; ReturnType return_value_impl = return_value; - Impl::ParallelReduceAdaptor::execute("",policy_type(0,policy),functor,return_value_impl); + Impl::ParallelReduceAdaptor::execute( + "", policy_type(0, policy), functor, return_value_impl); Impl::ParallelReduceFence::fence(return_value); } -template< class FunctorType, class ReturnType > -inline -void parallel_reduce(const std::string& label, - const size_t& policy, - const FunctorType& functor, - const ReturnType& return_value) { - typedef typename Impl::ParallelReducePolicyType::policy_type policy_type; +template +inline void parallel_reduce(const std::string& label, const size_t& policy, + const FunctorType& functor, + const ReturnType& return_value) { + typedef typename Impl::ParallelReducePolicyType< + void, size_t, FunctorType>::policy_type policy_type; ReturnType return_value_impl = return_value; - Impl::ParallelReduceAdaptor::execute(label,policy_type(0,policy),functor,return_value_impl); + Impl::ParallelReduceAdaptor::execute( + label, policy_type(0, policy), functor, return_value_impl); Impl::ParallelReduceFence::fence(return_value); } // No Return Argument -template< class PolicyType, class FunctorType> -inline -void parallel_reduce(const std::string& label, - const PolicyType& policy, - const FunctorType& functor, - typename Impl::enable_if< - Kokkos::Impl::is_execution_policy::value - >::type * = 0) { - typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ; - typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0) - , typename ValueTraits::value_type - , typename ValueTraits::pointer_type - >::type value_type ; +template +inline void parallel_reduce( + const std::string& label, const PolicyType& policy, + const FunctorType& functor, + typename Impl::enable_if< + Kokkos::Impl::is_execution_policy::value>::type* = 0) { + typedef Kokkos::Impl::FunctorValueTraits ValueTraits; + typedef typename Kokkos::Impl::if_c< + (ValueTraits::StaticValueSize != 0), typename ValueTraits::value_type, + typename ValueTraits::pointer_type>::type value_type; - static_assert(Impl::FunctorAnalysis:: - has_final_member_function,"Calling parallel_reduce without either return value or final function."); + static_assert( + Impl::FunctorAnalysis::has_final_member_function, + "Calling parallel_reduce without either return value or final function."); - typedef Kokkos::View< value_type - , Kokkos::HostSpace - , Kokkos::MemoryUnmanaged - > result_view_type; - result_view_type result_view ; + typedef Kokkos::View + result_view_type; + result_view_type result_view; - Impl::ParallelReduceAdaptor::execute(label,policy,functor,result_view); + Impl::ParallelReduceAdaptor::execute(label, policy, functor, + result_view); } -template< class PolicyType, class FunctorType > -inline -void parallel_reduce(const PolicyType& policy, - const FunctorType& functor, - typename Impl::enable_if< - Kokkos::Impl::is_execution_policy::value - >::type * = 0) { - typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ; - typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0) - , typename ValueTraits::value_type - , typename ValueTraits::pointer_type - >::type value_type ; +template +inline void parallel_reduce( + const PolicyType& policy, const FunctorType& functor, + typename Impl::enable_if< + Kokkos::Impl::is_execution_policy::value>::type* = 0) { + typedef Kokkos::Impl::FunctorValueTraits ValueTraits; + typedef typename Kokkos::Impl::if_c< + (ValueTraits::StaticValueSize != 0), typename ValueTraits::value_type, + typename ValueTraits::pointer_type>::type value_type; - static_assert(Impl::FunctorAnalysis:: - has_final_member_function,"Calling parallel_reduce without either return value or final function."); + static_assert( + Impl::FunctorAnalysis::has_final_member_function, + "Calling parallel_reduce without either return value or final function."); - typedef Kokkos::View< value_type - , Kokkos::HostSpace - , Kokkos::MemoryUnmanaged - > result_view_type; - result_view_type result_view ; + typedef Kokkos::View + result_view_type; + result_view_type result_view; - Impl::ParallelReduceAdaptor::execute("",policy,functor,result_view); + Impl::ParallelReduceAdaptor::execute("", policy, functor, + result_view); } -template< class FunctorType > -inline -void parallel_reduce(const size_t& policy, - const FunctorType& functor) { - typedef typename Impl::ParallelReducePolicyType::policy_type policy_type; - typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ; - typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0) - , typename ValueTraits::value_type - , typename ValueTraits::pointer_type - >::type value_type ; +template +inline void parallel_reduce(const size_t& policy, const FunctorType& functor) { + typedef typename Impl::ParallelReducePolicyType< + void, size_t, FunctorType>::policy_type policy_type; + typedef Kokkos::Impl::FunctorValueTraits ValueTraits; + typedef typename Kokkos::Impl::if_c< + (ValueTraits::StaticValueSize != 0), typename ValueTraits::value_type, + typename ValueTraits::pointer_type>::type value_type; - static_assert(Impl::FunctorAnalysis,FunctorType>:: - has_final_member_function,"Calling parallel_reduce without either return value or final function."); + static_assert( + Impl::FunctorAnalysis, + FunctorType>::has_final_member_function, + "Calling parallel_reduce without either return value or final function."); - typedef Kokkos::View< value_type - , Kokkos::HostSpace - , Kokkos::MemoryUnmanaged - > result_view_type; - result_view_type result_view ; + typedef Kokkos::View + result_view_type; + result_view_type result_view; - Impl::ParallelReduceAdaptor::execute("",policy_type(0,policy),functor,result_view); + Impl::ParallelReduceAdaptor::execute("", + policy_type(0, policy), + functor, result_view); } -template< class FunctorType> -inline -void parallel_reduce(const std::string& label, - const size_t& policy, - const FunctorType& functor) { - typedef typename Impl::ParallelReducePolicyType::policy_type policy_type; - typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ; - typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0) - , typename ValueTraits::value_type - , typename ValueTraits::pointer_type - >::type value_type ; +template +inline void parallel_reduce(const std::string& label, const size_t& policy, + const FunctorType& functor) { + typedef typename Impl::ParallelReducePolicyType< + void, size_t, FunctorType>::policy_type policy_type; + typedef Kokkos::Impl::FunctorValueTraits ValueTraits; + typedef typename Kokkos::Impl::if_c< + (ValueTraits::StaticValueSize != 0), typename ValueTraits::value_type, + typename ValueTraits::pointer_type>::type value_type; - static_assert(Impl::FunctorAnalysis,FunctorType>:: - has_final_member_function,"Calling parallel_reduce without either return value or final function."); + static_assert( + Impl::FunctorAnalysis, + FunctorType>::has_final_member_function, + "Calling parallel_reduce without either return value or final function."); - typedef Kokkos::View< value_type - , Kokkos::HostSpace - , Kokkos::MemoryUnmanaged - > result_view_type; - result_view_type result_view ; + typedef Kokkos::View + result_view_type; + result_view_type result_view; - Impl::ParallelReduceAdaptor::execute(label,policy_type(0,policy),functor,result_view); + Impl::ParallelReduceAdaptor::execute(label, + policy_type(0, policy), + functor, result_view); } -} //namespace Kokkos +} // namespace Kokkos #ifdef KOKKOS_ENABLE_DEPRECATED_CODE -//backwards compatibility for Kokkos::Experimental reducers -namespace Kokkos { namespace Experimental { -using Kokkos::Sum; -using Kokkos::Prod; -using Kokkos::Min; -using Kokkos::Max; -using Kokkos::LAnd; -using Kokkos::LOr; +// backwards compatiblity for Kokkos::Experimental reducers +namespace Kokkos { +namespace Experimental { using Kokkos::BAnd; using Kokkos::BOr; -using Kokkos::ValLocScalar; -using Kokkos::MinLoc; +using Kokkos::LAnd; +using Kokkos::LOr; +using Kokkos::Max; using Kokkos::MaxLoc; -using Kokkos::MinMaxScalar; +using Kokkos::Min; +using Kokkos::MinLoc; using Kokkos::MinMax; -using Kokkos::MinMaxLocScalar; using Kokkos::MinMaxLoc; -}} //namespace Kokkos::Experimental +using Kokkos::MinMaxLocScalar; +using Kokkos::MinMaxScalar; +using Kokkos::Prod; +using Kokkos::Sum; +using Kokkos::ValLocScalar; +} // namespace Experimental +} // namespace Kokkos #endif -#endif // KOKKOS_PARALLEL_REDUCE_HPP - +#endif // KOKKOS_PARALLEL_REDUCE_HPP diff --git a/lib/kokkos/core/src/Kokkos_PointerOwnership.hpp b/lib/kokkos/core/src/Kokkos_PointerOwnership.hpp index be76ec3def..f1f168c38f 100644 --- a/lib/kokkos/core/src/Kokkos_PointerOwnership.hpp +++ b/lib/kokkos/core/src/Kokkos_PointerOwnership.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -63,12 +64,9 @@ using OwningRawPtr = T*; template using ObservingRawPtr = T*; -} // end namespace Kokkos +} // end namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- - - #endif /* #ifndef KOKKOS_IMPL_POINTEROWNERSHIP_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_Profiling_ProfileSection.hpp b/lib/kokkos/core/src/Kokkos_Profiling_ProfileSection.hpp index b3fd3af70b..3c667f4432 100644 --- a/lib/kokkos/core/src/Kokkos_Profiling_ProfileSection.hpp +++ b/lib/kokkos/core/src/Kokkos_Profiling_ProfileSection.hpp @@ -1,45 +1,46 @@ /* - //@HEADER - // ************************************************************************ - // - // Kokkos v. 2.0 - // Copyright (2014) Sandia Corporation - // - // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - // the U.S. Government retains certain rights in this software. - // - // Redistribution and use in source and binary forms, with or without - // modification, are permitted provided that the following conditions are - // met: - // - // 1. Redistributions of source code must retain the above copyright - // notice, this list of conditions and the following disclaimer. - // - // 2. Redistributions in binary form must reproduce the above copyright - // notice, this list of conditions and the following disclaimer in the - // documentation and/or other materials provided with the distribution. - // - // 3. Neither the name of the Corporation nor the names of the - // contributors may be used to endorse or promote products derived from - // this software without specific prior written permission. - // - // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY - // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE - // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // - // Questions? Contact Christian R. Trott (crtrott@sandia.gov) - // - // ************************************************************************ - //@HEADER - */ +//@HEADER +// ************************************************************************ +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Christian R. Trott (crtrott@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ #ifndef KOKKOSP_PROFILE_SECTION_HPP #define KOKKOSP_PROFILE_SECTION_HPP @@ -53,59 +54,51 @@ namespace Kokkos { namespace Profiling { class ProfilingSection { + public: + ProfilingSection(const std::string& sectionName) : secName(sectionName) { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::createProfileSection(secName, &secID); + } +#else + secID = 0; +#endif + } -public: - ProfilingSection(const std::string& sectionName) : - secName(sectionName) { + void start() { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::startSection(secID); + } +#endif + } - #if defined( KOKKOS_ENABLE_PROFILING ) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Profiling::createProfileSection(secName, &secID); - } - #else - secID = 0; - #endif - } - - void start() { - #if defined( KOKKOS_ENABLE_PROFILING ) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Profiling::startSection(secID); - } - #endif - } - - void stop() { - #if defined( KOKKOS_ENABLE_PROFILING ) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Profiling::stopSection(secID); - } - #endif - } - - ~ProfilingSection() { - #if defined( KOKKOS_ENABLE_PROFILING ) - if(Kokkos::Profiling::profileLibraryLoaded()) { - Kokkos::Profiling::destroyProfileSection(secID); - } - #endif - } - - std::string getName() { - return secName; - } - - uint32_t getSectionID() { - return secID; - } - -protected: - const std::string secName; - uint32_t secID; + void stop() { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::stopSection(secID); + } +#endif + } + ~ProfilingSection() { +#if defined(KOKKOS_ENABLE_PROFILING) + if (Kokkos::Profiling::profileLibraryLoaded()) { + Kokkos::Profiling::destroyProfileSection(secID); + } +#endif + } + + std::string getName() { return secName; } + + uint32_t getSectionID() { return secID; } + + protected: + const std::string secName; + uint32_t secID; }; -} -} +} // namespace Profiling +} // namespace Kokkos -#endif \ No newline at end of file +#endif diff --git a/lib/kokkos/core/src/Kokkos_Qthreads.hpp b/lib/kokkos/core/src/Kokkos_Qthreads.hpp index 16702f8647..e10bd48593 100644 --- a/lib/kokkos/core/src/Kokkos_Qthreads.hpp +++ b/lib/kokkos/core/src/Kokkos_Qthreads.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_QTHREADS_HPP #include -#if defined( KOKKOS_ENABLE_QTHREADS ) +#if defined(KOKKOS_ENABLE_QTHREADS) #include @@ -76,9 +77,9 @@ namespace Impl { class QthreadsExec; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos /*--------------------------------------------------------------------------*/ @@ -86,26 +87,26 @@ namespace Kokkos { /** \brief Execution space supported by Qthreads */ class Qthreads { -public: + public: //! \name Type declarations that all Kokkos devices must provide. //@{ //! Tag this class as an execution space - typedef Qthreads execution_space; - typedef Kokkos::HostSpace memory_space; + typedef Qthreads execution_space; + typedef Kokkos::HostSpace memory_space; //! This execution space preferred device_type - typedef Kokkos::Device< execution_space, memory_space > device_type; + typedef Kokkos::Device device_type; - typedef Kokkos::LayoutRight array_layout; - typedef memory_space::size_type size_type; + typedef Kokkos::LayoutRight array_layout; + typedef memory_space::size_type size_type; - typedef ScratchMemorySpace< Qthreads > scratch_memory_space; + typedef ScratchMemorySpace scratch_memory_space; //@} /*------------------------------------------------------------------------*/ /** \brief Initialization will construct one or more instances */ - static Qthreads & instance( int = 0 ); + static Qthreads& instance(int = 0); /** \brief Set the execution space to a "sleep" state. * @@ -143,11 +144,11 @@ public: /** \brief Return maximum amount of concurrency */ static int concurrency(); - static void initialize( int thread_count ); + static void initialize(int thread_count); static void finalize(); /** \brief Print configuration information to the given output stream. */ - static void print_configuration( std::ostream &, const bool detail = false ); + static void print_configuration(std::ostream&, const bool detail = false); int shepherd_size() const; int shepherd_worker_size() const; @@ -155,7 +156,7 @@ public: static const char* name(); }; -} // namespace Kokkos +} // namespace Kokkos /*--------------------------------------------------------------------------*/ @@ -163,39 +164,33 @@ namespace Kokkos { namespace Impl { -template<> -struct MemorySpaceAccess - < Kokkos::Qthreads::memory_space - , Kokkos::Qthreads::scratch_memory_space - > -{ +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = true }; - enum { deepcopy = false }; + enum { deepcopy = false }; }; -template<> -struct VerifyExecutionCanAccessMemorySpace - < Kokkos::Qthreads::memory_space - , Kokkos::Qthreads::scratch_memory_space - > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace< + Kokkos::Qthreads::memory_space, Kokkos::Qthreads::scratch_memory_space> { enum { value = true }; - inline static void verify( void ) {} - inline static void verify( const void * ) {} + inline static void verify(void) {} + inline static void verify(const void*) {} }; -} // namespace Impl +} // namespace Impl -} // namespace Kokkos +} // namespace Kokkos /*--------------------------------------------------------------------------*/ #include #include -//#include // Uncomment when Tasking working. -//#include // Uncomment when Tasking working. - -#endif // #define KOKKOS_ENABLE_QTHREADS -#endif // #define KOKKOS_QTHREADS_HPP +//#include // Uncomment when Tasking +// working. #include // Uncomment when +// Tasking working. +#endif // #define KOKKOS_ENABLE_QTHREADS +#endif // #define KOKKOS_QTHREADS_HPP diff --git a/lib/kokkos/core/src/Kokkos_ROCm.hpp b/lib/kokkos/core/src/Kokkos_ROCm.hpp index 96207e73c6..57113452b8 100644 --- a/lib/kokkos/core/src/Kokkos_ROCm.hpp +++ b/lib/kokkos/core/src/Kokkos_ROCm.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -46,12 +47,12 @@ #include -#if defined( KOKKOS_ENABLE_ROCM ) +#if defined(KOKKOS_ENABLE_ROCM) class dim3 { -public: -int x,y,z; -dim3(int _x, int _y, int _z):x(_x),y(_y),z(_z) {}; + public: + int x, y, z; + dim3(int _x, int _y, int _z) : x(_x), y(_y), z(_z){}; }; #include @@ -74,9 +75,9 @@ dim3(int _x, int _y, int _z):x(_x),y(_y),z(_z) {}; #include #include -#if defined( __HCC_ACCELERATOR__ ) +#if defined(__HCC_ACCELERATOR__) -using namespace ::Concurrency::precise_math ; +using namespace ::Concurrency::precise_math; #endif @@ -84,9 +85,9 @@ using namespace ::Concurrency::precise_math ; namespace Kokkos { namespace Impl { -class ROCmExec ; -} // namespace Impl -} // namespace Kokkos +class ROCmExec; +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ @@ -95,30 +96,29 @@ namespace Experimental { /// \class ROCm /// \brief Kokkos device for multicore processors in the host memory space. class ROCm { -public: + public: //------------------------------------ //! \name Type declarations that all Kokkos devices must provide. //@{ //! Tag this class as a kokkos execution space - typedef ROCm execution_space ; - typedef ROCmSpace memory_space ; - typedef Kokkos::Device device_type; + typedef ROCm execution_space; + typedef ROCmSpace memory_space; + typedef Kokkos::Device device_type; - typedef LayoutLeft array_layout ; - typedef HostSpace::size_type size_type ; + typedef LayoutLeft array_layout; + typedef HostSpace::size_type size_type; - typedef ScratchMemorySpace< ROCm > scratch_memory_space ; + typedef ScratchMemorySpace scratch_memory_space; ~ROCm() {} ROCm(); -// explicit ROCm( const int instance_id ); - - ROCm( ROCm && ) = default ; - ROCm( const ROCm & ) = default ; - ROCm & operator = ( ROCm && ) = default ; - ROCm & operator = ( const ROCm & ) = default ; + // explicit ROCm( const int instance_id ); + ROCm(ROCm&&) = default; + ROCm(const ROCm&) = default; + ROCm& operator=(ROCm&&) = default; + ROCm& operator=(const ROCm&) = default; //@} //------------------------------------ @@ -126,7 +126,7 @@ public: //@{ KOKKOS_INLINE_FUNCTION static int in_parallel() { -#if defined( __HCC_ACCELERATOR__ ) +#if defined(__HCC_ACCELERATOR__) return true; #else return false; @@ -134,122 +134,109 @@ public: } /** \brief Set the device in a "sleep" state. */ - static bool sleep() ; + static bool sleep(); /** \brief Wake the device from the 'sleep' state. A noop for OpenMP. */ - static bool wake() ; + static bool wake(); /** \brief Wait until all dispatched functors complete. A noop for OpenMP. */ static void impl_static_fence(); - #ifdef KOKKOS_ENABLE_DEPRECATED_CODE +#ifdef KOKKOS_ENABLE_DEPRECATED_CODE static void fence(); - #else +#else void fence() const; - #endif - +#endif /// \brief Print configuration information to the given output stream. - static void print_configuration( std::ostream & , const bool detail = false ); + static void print_configuration(std::ostream&, const bool detail = false); /// \brief Free any resources being consumed by the device. - static void finalize() ; + static void finalize(); /** \brief Initialize the device. * */ struct SelectDevice { - int rocm_device_id ; + int rocm_device_id; SelectDevice() : rocm_device_id(1) {} - explicit SelectDevice( int id ) : rocm_device_id( id+1 ) {} + explicit SelectDevice(int id) : rocm_device_id(id + 1) {} }; - int rocm_device() const { return m_device ; } - bool isAPU(); - bool isAPU(int device); + int rocm_device() const { return m_device; } + bool isAPU(); + bool isAPU(int device); - static void initialize( const SelectDevice = SelectDevice()); + static void initialize(const SelectDevice = SelectDevice()); static int is_initialized(); -// static size_type device_arch(); + // static size_type device_arch(); -// static size_type detect_device_count(); + // static size_type detect_device_count(); - - static int concurrency() ; + static int concurrency(); static const char* name(); -private: - int m_device ; + private: + int m_device; }; -} -} // namespace Kokkos +} // namespace Experimental +} // namespace Kokkos namespace Kokkos { namespace Impl { -template<> -struct MemorySpaceAccess - < Kokkos::Experimental::ROCmSpace - , Kokkos::Experimental::ROCm::scratch_memory_space - > -{ +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = true }; - enum { deepcopy = false }; + enum { deepcopy = false }; }; -template<> -struct VerifyExecutionCanAccessMemorySpace - < Kokkos::Experimental::ROCm::memory_space - , Kokkos::Experimental::ROCm::scratch_memory_space - > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace< + Kokkos::Experimental::ROCm::memory_space, + Kokkos::Experimental::ROCm::scratch_memory_space> { enum { value = true }; - KOKKOS_INLINE_FUNCTION static void verify( void ) { } - KOKKOS_INLINE_FUNCTION static void verify( const void * ) { } + KOKKOS_INLINE_FUNCTION static void verify(void) {} + KOKKOS_INLINE_FUNCTION static void verify(const void*) {} }; -template<> -struct VerifyExecutionCanAccessMemorySpace - < Kokkos::HostSpace - , Kokkos::Experimental::ROCm::scratch_memory_space - > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace< + Kokkos::HostSpace, Kokkos::Experimental::ROCm::scratch_memory_space> { enum { value = false }; - inline static void verify( void ) { Kokkos::Experimental::ROCmSpace::access_error(); } - inline static void verify( const void * p ) { Kokkos::Experimental::ROCmSpace::access_error(p); } + inline static void verify(void) { + Kokkos::Experimental::ROCmSpace::access_error(); + } + inline static void verify(const void* p) { + Kokkos::Experimental::ROCmSpace::access_error(p); + } }; -} // namespace Experimental -} // namespace Kokkos - - - - +} // namespace Impl +} // namespace Kokkos #define threadIdx_x (hc_get_workitem_id(0)) #define threadIdx_y (hc_get_workitem_id(1)) #define threadIdx_z (hc_get_workitem_id(2)) -#define blockIdx_x (hc_get_group_id(0)) -#define blockIdx_y (hc_get_group_id(1)) -#define blockIdx_z (hc_get_group_id(2)) +#define blockIdx_x (hc_get_group_id(0)) +#define blockIdx_y (hc_get_group_id(1)) +#define blockIdx_z (hc_get_group_id(2)) -#define blockDim_x (hc_get_group_size(0)) -#define blockDim_y (hc_get_group_size(1)) -#define blockDim_z (hc_get_group_size(2)) - -#define gridDim_x (hc_get_num_groups(0)) -#define gridDim_y (hc_get_num_groups(1)) -#define gridDim_z (hc_get_num_groups(2)) +#define blockDim_x (hc_get_group_size(0)) +#define blockDim_y (hc_get_group_size(1)) +#define blockDim_z (hc_get_group_size(2)) +#define gridDim_x (hc_get_num_groups(0)) +#define gridDim_y (hc_get_num_groups(1)) +#define gridDim_z (hc_get_num_groups(2)) #include #include #endif #endif - - diff --git a/lib/kokkos/core/src/Kokkos_ROCmSpace.hpp b/lib/kokkos/core/src/Kokkos_ROCmSpace.hpp index c0b7158fde..36017cd40f 100644 --- a/lib/kokkos/core/src/Kokkos_ROCmSpace.hpp +++ b/lib/kokkos/core/src/Kokkos_ROCmSpace.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -46,7 +47,7 @@ #include -#if defined( KOKKOS_ENABLE_ROCM ) +#if defined(KOKKOS_ENABLE_ROCM) #include #include @@ -54,7 +55,6 @@ #include - /*--------------------------------------------------------------------------*/ namespace Kokkos { @@ -62,30 +62,28 @@ namespace Experimental { /** \brief ROCm on-device memory management */ class ROCmSpace { -public: - + public: //! Tag this class as a kokkos memory space - typedef ROCmSpace memory_space ; - typedef Kokkos::Experimental::ROCm execution_space ; - typedef Kokkos::Device device_type; + typedef ROCmSpace memory_space; + typedef Kokkos::Experimental::ROCm execution_space; + typedef Kokkos::Device device_type; - typedef unsigned int size_type ; + typedef unsigned int size_type; /*--------------------------------*/ ROCmSpace(); - ROCmSpace( ROCmSpace && rhs ) = default ; - ROCmSpace( const ROCmSpace & rhs ) = default ; - ROCmSpace & operator = ( ROCmSpace && rhs ) = default ; - ROCmSpace & operator = ( const ROCmSpace & rhs ) = default ; - ~ROCmSpace() = default ; + ROCmSpace(ROCmSpace&& rhs) = default; + ROCmSpace(const ROCmSpace& rhs) = default; + ROCmSpace& operator=(ROCmSpace&& rhs) = default; + ROCmSpace& operator=(const ROCmSpace& rhs) = default; + ~ROCmSpace() = default; /**\brief Allocate untracked memory in the rocm space */ - void * allocate( const size_t arg_alloc_size ) const ; + void* allocate(const size_t arg_alloc_size) const; /**\brief Deallocate untracked memory in the rocm space */ - void deallocate( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) const ; + void deallocate(void* const arg_alloc_ptr, const size_t arg_alloc_size) const; /**\brief Return Name of the MemorySpace */ static constexpr const char* name() { return m_name; }; @@ -93,23 +91,23 @@ public: /*--------------------------------*/ /** \brief Error reporting for HostSpace attempt to access ROCmSpace */ static void access_error(); - static void access_error( const void * const ); + static void access_error(const void* const); -private: - - int m_device ; ///< Which ROCm device + private: + int m_device; ///< Which ROCm device static constexpr const char* m_name = "ROCm"; - friend class Kokkos::Impl::SharedAllocationRecord< Kokkos::Experimental::ROCmSpace , void > ; + friend class Kokkos::Impl::SharedAllocationRecord< + Kokkos::Experimental::ROCmSpace, void>; }; -} // namespace Experimental +} // namespace Experimental namespace Impl { -void * rocm_device_allocate(int); -void * rocm_hostpinned_allocate(int); -void rocm_device_free(void * ); +void* rocm_device_allocate(int); +void* rocm_hostpinned_allocate(int); +void rocm_device_free(void*); /// \brief Initialize lock array for arbitrary size atomics. /// @@ -128,10 +126,11 @@ void init_lock_arrays_rocm_space(); /// If the array is not yet allocated it will do so. int* atomic_lock_array_rocm_space_ptr(bool deallocate = false); -/// \brief Retrieve the pointer to the scratch array for team and thread private global memory. +/// \brief Retrieve the pointer to the scratch array for team and thread private +/// global memory. /// /// Team and Thread private scratch allocations in -/// global memory are acquired via locks. +/// global memory are aquired via locks. /// This function retrieves the lock array pointer. /// If the array is not yet allocated it will do so. int* scratch_lock_array_rocm_space_ptr(bool deallocate = false); @@ -143,55 +142,51 @@ int* scratch_lock_array_rocm_space_ptr(bool deallocate = false); /// This function retrieves the lock array pointer. /// If the array is not yet allocated it will do so. int* threadid_lock_array_rocm_space_ptr(bool deallocate = false); -} -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ - namespace Kokkos { namespace Experimental { /** \brief Host memory that is accessible to ROCm execution space * through ROCm's host-pinned memory allocation. */ class ROCmHostPinnedSpace { -public: - + public: //! Tag this class as a kokkos memory space /** \brief Memory is in HostSpace so use the HostSpace::execution_space */ - typedef HostSpace::execution_space execution_space ; - typedef ROCmHostPinnedSpace memory_space ; - typedef Kokkos::Device device_type; - typedef unsigned int size_type ; + typedef HostSpace::execution_space execution_space; + typedef ROCmHostPinnedSpace memory_space; + typedef Kokkos::Device device_type; + typedef unsigned int size_type; /*--------------------------------*/ ROCmHostPinnedSpace(); - ROCmHostPinnedSpace( ROCmHostPinnedSpace && rhs ) = default ; - ROCmHostPinnedSpace( const ROCmHostPinnedSpace & rhs ) = default ; - ROCmHostPinnedSpace & operator = ( ROCmHostPinnedSpace && rhs ) = default ; - ROCmHostPinnedSpace & operator = ( const ROCmHostPinnedSpace & rhs ) = default ; - ~ROCmHostPinnedSpace() = default ; + ROCmHostPinnedSpace(ROCmHostPinnedSpace&& rhs) = default; + ROCmHostPinnedSpace(const ROCmHostPinnedSpace& rhs) = default; + ROCmHostPinnedSpace& operator=(ROCmHostPinnedSpace&& rhs) = default; + ROCmHostPinnedSpace& operator=(const ROCmHostPinnedSpace& rhs) = default; + ~ROCmHostPinnedSpace() = default; /**\brief Allocate untracked memory in the space */ - void * allocate( const size_t arg_alloc_size ) const ; + void* allocate(const size_t arg_alloc_size) const; /**\brief Deallocate untracked memory in the space */ - void deallocate( void * const arg_alloc_ptr - , const size_t arg_alloc_size ) const ; + void deallocate(void* const arg_alloc_ptr, const size_t arg_alloc_size) const; /**\brief Return Name of the MemorySpace */ static constexpr const char* name() { return m_name; }; -private: - + private: static constexpr const char* m_name = "ROCmHostPinned"; /*--------------------------------*/ }; -} // namespace Experimental -} // namespace Kokkos +} // namespace Experimental +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -199,65 +194,71 @@ private: namespace Kokkos { namespace Impl { -static_assert( Kokkos::Impl::MemorySpaceAccess< Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCmSpace >::assignable , "" ); +static_assert(Kokkos::Impl::MemorySpaceAccess< + Kokkos::Experimental::ROCmSpace, + Kokkos::Experimental::ROCmSpace>::assignable, + ""); //---------------------------------------- -template<> -struct MemorySpaceAccess< Kokkos::HostSpace , Kokkos::Experimental::ROCmSpace > { +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = false }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::HostSpace , Kokkos::Experimental::ROCmHostPinnedSpace > { +template <> +struct MemorySpaceAccess { // HostSpace::execution_space == ROCmHostPinnedSpace::execution_space enum { assignable = true }; enum { accessible = true }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; //---------------------------------------- -template<> -struct MemorySpaceAccess< Kokkos::Experimental::ROCmSpace , Kokkos::HostSpace > { +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = false }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCmHostPinnedSpace > { +template <> +struct MemorySpaceAccess { // ROCmSpace::execution_space != ROCmHostPinnedSpace::execution_space enum { assignable = false }; - enum { accessible = true }; // ROCmSpace::execution_space - enum { deepcopy = true }; + enum { accessible = true }; // ROCmSpace::execution_space + enum { deepcopy = true }; }; - //---------------------------------------- // ROCmHostPinnedSpace::execution_space == HostSpace::execution_space // ROCmHostPinnedSpace accessible to both ROCm and Host -template<> -struct MemorySpaceAccess< Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::HostSpace > { - enum { assignable = false }; // Cannot access from ROCm - enum { accessible = true }; // ROCmHostPinnedSpace::execution_space - enum { deepcopy = true }; +template <> +struct MemorySpaceAccess { + enum { assignable = false }; // Cannot access from ROCm + enum { accessible = true }; // ROCmHostPinnedSpace::execution_space + enum { deepcopy = true }; }; -template<> -struct MemorySpaceAccess< Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::Experimental::ROCmSpace > { - enum { assignable = false }; // Cannot access from Host +template <> +struct MemorySpaceAccess { + enum { assignable = false }; // Cannot access from Host enum { accessible = false }; - enum { deepcopy = true }; + enum { deepcopy = true }; }; -}; +}; // namespace Impl //---------------------------------------- -} // namespace Kokkos::Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -265,171 +266,187 @@ struct MemorySpaceAccess< Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::Ex namespace Kokkos { namespace Impl { -hc::completion_future DeepCopyAsyncROCm( void * dst , const void * src , size_t n); +hc::completion_future DeepCopyAsyncROCm(void* dst, const void* src, size_t n); -template<> struct DeepCopy< Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCm> -{ - DeepCopy( void * dst , const void * src , size_t ); - DeepCopy( const Kokkos::Experimental::ROCm & , void * dst , const void * src , size_t ); +template <> +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t); + DeepCopy(const Kokkos::Experimental::ROCm&, void* dst, const void* src, + size_t); }; -template<> struct DeepCopy< Kokkos::Experimental::ROCmSpace , HostSpace , Kokkos::Experimental::ROCm > -{ - DeepCopy( void * dst , const void * src , size_t ); - DeepCopy( const Kokkos::Experimental::ROCm & , void * dst , const void * src , size_t ); +template <> +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t); + DeepCopy(const Kokkos::Experimental::ROCm&, void* dst, const void* src, + size_t); }; -template<> struct DeepCopy< HostSpace , Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCm > -{ - DeepCopy( void * dst , const void * src , size_t ); - DeepCopy( const Kokkos::Experimental::ROCm & , void * dst , const void * src , size_t ); +template <> +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t); + DeepCopy(const Kokkos::Experimental::ROCm&, void* dst, const void* src, + size_t); }; -template struct DeepCopy< Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCmSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCm >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy( + dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - hc::completion_future fut = DeepCopyAsyncROCm (dst,src,n); + hc::completion_future fut = DeepCopyAsyncROCm(dst, src, n); fut.wait(); -// DeepCopy (dst,src,n); + // DeepCopy (dst,src,n); } }; -template struct DeepCopy< Kokkos::Experimental::ROCmSpace , HostSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< Kokkos::Experimental::ROCmSpace , HostSpace , Kokkos::Experimental::ROCm>( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopy (dst,src,n); + DeepCopy(dst, src, n); } }; -template -struct DeepCopy< HostSpace , Kokkos::Experimental::ROCmSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< HostSpace , Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCm >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopy (dst,src,n); + DeepCopy(dst, src, n); } }; -template<> struct DeepCopy< Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::Experimental::ROCm> -{ - DeepCopy( void * dst , const void * src , size_t ); - DeepCopy( const Kokkos::Experimental::ROCm & , void * dst , const void * src , size_t ); +template <> +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t); + DeepCopy(const Kokkos::Experimental::ROCm&, void* dst, const void* src, + size_t); }; -template<> struct DeepCopy< Kokkos::Experimental::ROCmHostPinnedSpace , HostSpace , Kokkos::Experimental::ROCm > -{ - DeepCopy( void * dst , const void * src , size_t ); - DeepCopy( const Kokkos::Experimental::ROCm & , void * dst , const void * src , size_t ); +template <> +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t); + DeepCopy(const Kokkos::Experimental::ROCm&, void* dst, const void* src, + size_t); }; -template<> struct DeepCopy< HostSpace , Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::Experimental::ROCm > -{ - DeepCopy( void * dst , const void * src , size_t ); - DeepCopy( const Kokkos::Experimental::ROCm & , void * dst , const void * src , size_t ); +template <> +struct DeepCopy { + DeepCopy(void* dst, const void* src, size_t); + DeepCopy(const Kokkos::Experimental::ROCm&, void* dst, const void* src, + size_t); }; -template -struct DeepCopy< Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCmHostPinnedSpace , ExecutionSpace> -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< Kokkos::Experimental::ROCmSpace , HostSpace , Kokkos::Experimental::ROCm >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - hc::completion_future fut = DeepCopyAsyncROCm (dst,src,n); + hc::completion_future fut = DeepCopyAsyncROCm(dst, src, n); fut.wait(); -// DeepCopyROCm (dst,src,n); + // DeepCopyROCm (dst,src,n); } }; -template struct DeepCopy< Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::Experimental::ROCmSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< HostSpace , Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCm >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - hc::completion_future fut = DeepCopyAsyncROCm (dst,src,n); + hc::completion_future fut = DeepCopyAsyncROCm(dst, src, n); fut.wait(); -// DeepCopyROCm (dst,src,n); + // DeepCopyROCm (dst,src,n); } }; +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - -template struct DeepCopy< Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::Experimental::ROCmHostPinnedSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::Experimental::ROCm >( dst , src , n ); } - - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); -// hc::completion_future fut = DeepCopyAsyncROCm (dst,src,n); -// fut.wait(); -// DeepCopyAsyncROCm (dst,src,n); - DeepCopy (dst,src,n); + // hc::completion_future fut = DeepCopyAsyncROCm (dst,src,n); + // fut.wait(); + // DeepCopyAsyncROCm (dst,src,n); + DeepCopy(dst, src, n); } }; -template struct DeepCopy< Kokkos::Experimental::ROCmHostPinnedSpace , HostSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< Kokkos::Experimental::ROCmHostPinnedSpace , HostSpace , Kokkos::Experimental::ROCm>( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopy (dst,src,n); + DeepCopy(dst, src, n); } }; -template -struct DeepCopy< HostSpace , Kokkos::Experimental::ROCmHostPinnedSpace , ExecutionSpace > -{ - inline - DeepCopy( void * dst , const void * src , size_t n ) - { (void) DeepCopy< HostSpace , Kokkos::Experimental::ROCmHostPinnedSpace , Kokkos::Experimental::ROCm >( dst , src , n ); } +template +struct DeepCopy { + inline DeepCopy(void* dst, const void* src, size_t n) { + (void)DeepCopy(dst, src, n); + } - inline - DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) - { + inline DeepCopy(const ExecutionSpace& exec, void* dst, const void* src, + size_t n) { exec.fence(); - DeepCopy (dst,src,n); + DeepCopy(dst, src, n); } }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -438,60 +455,70 @@ namespace Kokkos { namespace Impl { /** Running in ROCmSpace attempting to access HostSpace: error */ -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::Experimental::ROCmSpace , Kokkos::HostSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = false }; - KOKKOS_INLINE_FUNCTION static void verify( void ) - { Kokkos::abort("ROCm code attempted to access HostSpace memory"); } + KOKKOS_INLINE_FUNCTION static void verify(void) { + Kokkos::abort("ROCm code attempted to access HostSpace memory"); + } - KOKKOS_INLINE_FUNCTION static void verify( const void * ) - { Kokkos::abort("ROCm code attempted to access HostSpace memory"); } + KOKKOS_INLINE_FUNCTION static void verify(const void*) { + Kokkos::abort("ROCm code attempted to access HostSpace memory"); + } }; /** Running in ROCmSpace accessing ROCmHostPinnedSpace: ok */ -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::Experimental::ROCmSpace , Kokkos::Experimental::ROCmHostPinnedSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace< + Kokkos::Experimental::ROCmSpace, + Kokkos::Experimental::ROCmHostPinnedSpace> { enum { value = true }; - KOKKOS_INLINE_FUNCTION static void verify( void ) { } - KOKKOS_INLINE_FUNCTION static void verify( const void * ) { } + KOKKOS_INLINE_FUNCTION static void verify(void) {} + KOKKOS_INLINE_FUNCTION static void verify(const void*) {} }; /** Running in ROCmSpace attempting to access an unknown space: error */ -template< class OtherSpace > +template struct VerifyExecutionCanAccessMemorySpace< - typename enable_if< ! is_same::value , Kokkos::Experimental::ROCmSpace >::type , - OtherSpace > -{ + typename enable_if< + !is_same::value, + Kokkos::Experimental::ROCmSpace>::type, + OtherSpace> { enum { value = false }; - KOKKOS_INLINE_FUNCTION static void verify( void ) - { Kokkos::abort("ROCm code attempted to access unknown Space memory"); } + KOKKOS_INLINE_FUNCTION static void verify(void) { + Kokkos::abort("ROCm code attempted to access unknown Space memory"); + } - KOKKOS_INLINE_FUNCTION static void verify( const void * ) - { Kokkos::abort("ROCm code attempted to access unknown Space memory"); } + KOKKOS_INLINE_FUNCTION static void verify(const void*) { + Kokkos::abort("ROCm code attempted to access unknown Space memory"); + } }; //---------------------------------------------------------------------------- /** Running in HostSpace attempting to access ROCmSpace */ -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::Experimental::ROCmSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace { enum { value = false }; - inline static void verify( void ) { Kokkos::Experimental::ROCmSpace::access_error(); } - inline static void verify( const void * p ) { Kokkos::Experimental::ROCmSpace::access_error(p); } + inline static void verify(void) { + Kokkos::Experimental::ROCmSpace::access_error(); + } + inline static void verify(const void* p) { + Kokkos::Experimental::ROCmSpace::access_error(p); + } }; /** Running in HostSpace accessing ROCmHostPinnedSpace is OK */ -template<> -struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::Experimental::ROCmHostPinnedSpace > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace< + Kokkos::HostSpace, Kokkos::Experimental::ROCmHostPinnedSpace> { enum { value = true }; - KOKKOS_INLINE_FUNCTION static void verify( void ) {} - KOKKOS_INLINE_FUNCTION static void verify( const void * ) {} + KOKKOS_INLINE_FUNCTION static void verify(void) {} + KOKKOS_INLINE_FUNCTION static void verify(const void*) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -499,128 +526,112 @@ struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::Experime namespace Kokkos { namespace Impl { -template<> -class SharedAllocationRecord< Kokkos::Experimental::ROCmSpace , void > - : public SharedAllocationRecord< void , void > -{ -private: +template <> +class SharedAllocationRecord + : public SharedAllocationRecord { + private: + typedef SharedAllocationRecord RecordBase; + SharedAllocationRecord(const SharedAllocationRecord&) = delete; + SharedAllocationRecord& operator=(const SharedAllocationRecord&) = delete; - typedef SharedAllocationRecord< void , void > RecordBase ; - - SharedAllocationRecord( const SharedAllocationRecord & ) = delete ; - SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ; - - static void deallocate( RecordBase * ); + static void deallocate(RecordBase*); #ifdef KOKKOS_DEBUG - static RecordBase s_root_record ; + static RecordBase s_root_record; #endif - const Kokkos::Experimental::ROCmSpace m_space ; - -protected: + const Kokkos::Experimental::ROCmSpace m_space; + protected: ~SharedAllocationRecord(); - SharedAllocationRecord( const Kokkos::Experimental::ROCmSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const RecordBase::function_type arg_dealloc = & deallocate - ); + SharedAllocationRecord( + const Kokkos::Experimental::ROCmSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size, + const RecordBase::function_type arg_dealloc = &deallocate); -public: + public: + std::string get_label() const; - std::string get_label() const ; - - static SharedAllocationRecord * allocate( const Kokkos::Experimental::ROCmSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + static SharedAllocationRecord* allocate( + const Kokkos::Experimental::ROCmSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size); /**\brief Allocate tracked memory in the space */ - static - void * allocate_tracked( const Kokkos::Experimental::ROCmSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + static void* allocate_tracked( + const Kokkos::Experimental::ROCmSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size); /**\brief Reallocate tracked memory in the space */ - static - void * reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ); + static void* reallocate_tracked(void* const arg_alloc_ptr, + const size_t arg_alloc_size); /**\brief Deallocate tracked memory in the space */ - static - void deallocate_tracked( void * const arg_alloc_ptr ); + static void deallocate_tracked(void* const arg_alloc_ptr); - static SharedAllocationRecord * get_record( void * arg_alloc_ptr ); + static SharedAllocationRecord* get_record(void* arg_alloc_ptr); - static void print_records( std::ostream & , const Kokkos::Experimental::ROCmSpace & , bool detail = false ); + static void print_records(std::ostream&, + const Kokkos::Experimental::ROCmSpace&, + bool detail = false); }; -template<> -class SharedAllocationRecord< Kokkos::Experimental::ROCmHostPinnedSpace , void > - : public SharedAllocationRecord< void , void > -{ -private: +template <> +class SharedAllocationRecord + : public SharedAllocationRecord { + private: + typedef SharedAllocationRecord RecordBase; - typedef SharedAllocationRecord< void , void > RecordBase ; + SharedAllocationRecord(const SharedAllocationRecord&) = delete; + SharedAllocationRecord& operator=(const SharedAllocationRecord&) = delete; - SharedAllocationRecord( const SharedAllocationRecord & ) = delete ; - SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ; - - static void deallocate( RecordBase * ); + static void deallocate(RecordBase*); #ifdef KOKKOS_DEBUG - static RecordBase s_root_record ; + static RecordBase s_root_record; #endif - const Kokkos::Experimental::ROCmHostPinnedSpace m_space ; - -protected: + const Kokkos::Experimental::ROCmHostPinnedSpace m_space; + protected: ~SharedAllocationRecord(); SharedAllocationRecord() : RecordBase(), m_space() {} - SharedAllocationRecord( const Kokkos::Experimental::ROCmHostPinnedSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - , const RecordBase::function_type arg_dealloc = & deallocate - ); + SharedAllocationRecord( + const Kokkos::Experimental::ROCmHostPinnedSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size, + const RecordBase::function_type arg_dealloc = &deallocate); -public: + public: + std::string get_label() const; - std::string get_label() const ; - - static SharedAllocationRecord * allocate( const Kokkos::Experimental::ROCmHostPinnedSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size - ); + static SharedAllocationRecord* allocate( + const Kokkos::Experimental::ROCmHostPinnedSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size); /**\brief Allocate tracked memory in the space */ - static - void * allocate_tracked( const Kokkos::Experimental::ROCmHostPinnedSpace & arg_space - , const std::string & arg_label - , const size_t arg_alloc_size ); + static void* allocate_tracked( + const Kokkos::Experimental::ROCmHostPinnedSpace& arg_space, + const std::string& arg_label, const size_t arg_alloc_size); /**\brief Reallocate tracked memory in the space */ - static - void * reallocate_tracked( void * const arg_alloc_ptr - , const size_t arg_alloc_size ); + static void* reallocate_tracked(void* const arg_alloc_ptr, + const size_t arg_alloc_size); /**\brief Deallocate tracked memory in the space */ - static - void deallocate_tracked( void * const arg_alloc_ptr ); + static void deallocate_tracked(void* const arg_alloc_ptr); + static SharedAllocationRecord* get_record(void* arg_alloc_ptr); - static SharedAllocationRecord * get_record( void * arg_alloc_ptr ); - - static void print_records( std::ostream & , const Kokkos::Experimental::ROCmHostPinnedSpace & , bool detail = false ); + static void print_records(std::ostream&, + const Kokkos::Experimental::ROCmHostPinnedSpace&, + bool detail = false); }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- #endif /* #if defined( KOKKOS_ENABLE_ROCM ) */ #endif /* #define KOKKOS_ROCMSPACE_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_ScratchSpace.hpp b/lib/kokkos/core/src/Kokkos_ScratchSpace.hpp index 86d803ccc9..c2337f08a1 100644 --- a/lib/kokkos/core/src/Kokkos_ScratchSpace.hpp +++ b/lib/kokkos/core/src/Kokkos_ScratchSpace.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -55,158 +56,157 @@ namespace Kokkos { /** \brief Scratch memory space associated with an execution space. * */ -template< class ExecSpace > +template class ScratchMemorySpace { - static_assert (is_execution_space::value,"Instantiating ScratchMemorySpace on non-execution-space type."); -public: + static_assert( + is_execution_space::value, + "Instantiating ScratchMemorySpace on non-execution-space type."); + public: // Alignment of memory chunks returned by 'get' // must be a power of two enum { ALIGN = 8 }; -private: - - mutable char * m_iter_L0 ; - char * m_end_L0 ; - mutable char * m_iter_L1 ; - char * m_end_L1 ; - + private: + mutable char* m_iter_L0; + char* m_end_L0; + mutable char* m_iter_L1; + char* m_end_L1; mutable int m_multiplier; mutable int m_offset; mutable int m_default_level; ScratchMemorySpace(); - ScratchMemorySpace & operator = ( const ScratchMemorySpace & ); + ScratchMemorySpace& operator=(const ScratchMemorySpace&); - enum { MASK = ALIGN - 1 }; // Alignment used by View::shmem_size - -public: + enum { MASK = ALIGN - 1 }; // Alignment used by View::shmem_size + public: //! Tag this class as a memory space - typedef ScratchMemorySpace memory_space ; - typedef ExecSpace execution_space ; + typedef ScratchMemorySpace memory_space; + typedef ExecSpace execution_space; //! This execution space preferred device_type - typedef Kokkos::Device device_type; + typedef Kokkos::Device device_type; - typedef typename ExecSpace::array_layout array_layout ; - typedef typename ExecSpace::size_type size_type ; + typedef typename ExecSpace::array_layout array_layout; + typedef typename ExecSpace::size_type size_type; - template< typename IntType > - KOKKOS_INLINE_FUNCTION static - IntType align( const IntType & size ) - { return ( size + MASK ) & ~MASK ; } + template + KOKKOS_INLINE_FUNCTION static IntType align(const IntType& size) { + return (size + MASK) & ~MASK; + } - template< typename IntType > - KOKKOS_INLINE_FUNCTION - void* get_shmem (const IntType& size, int level = -1) const { - if(level == -1) - level = m_default_level; - if(level == 0) { - void* tmp = m_iter_L0 + m_offset * align (size); - if (m_end_L0 < (m_iter_L0 += align (size) * m_multiplier)) { - m_iter_L0 -= align (size) * m_multiplier; // put it back like it was - #ifdef KOKKOS_DEBUG + template + KOKKOS_INLINE_FUNCTION void* get_shmem(const IntType& size, + int level = -1) const { + if (level == -1) level = m_default_level; + if (level == 0) { + void* tmp = m_iter_L0 + m_offset * align(size); + if (m_end_L0 < (m_iter_L0 += align(size) * m_multiplier)) { + m_iter_L0 -= align(size) * m_multiplier; // put it back like it was +#ifdef KOKKOS_DEBUG // mfh 23 Jun 2015: printf call consumes 25 registers // in a CUDA build, so only print in debug mode. The // function still returns NULL if not enough memory. - printf ("ScratchMemorySpace<...>::get_shmem: Failed to allocate " - "%ld byte(s); remaining capacity is %ld byte(s)\n", long(size), - long(m_end_L0-m_iter_L0)); - #endif // KOKKOS_DEBUG + printf( + "ScratchMemorySpace<...>::get_shmem: Failed to allocate " + "%ld byte(s); remaining capacity is %ld byte(s)\n", + long(size), long(m_end_L0 - m_iter_L0)); +#endif // KOKKOS_DEBUG tmp = 0; } return tmp; } else { - void* tmp = m_iter_L1 + m_offset * align (size); - if (m_end_L1 < (m_iter_L1 += align (size) * m_multiplier)) { - m_iter_L1 -= align (size) * m_multiplier; // put it back like it was - #ifdef KOKKOS_DEBUG + void* tmp = m_iter_L1 + m_offset * align(size); + if (m_end_L1 < (m_iter_L1 += align(size) * m_multiplier)) { + m_iter_L1 -= align(size) * m_multiplier; // put it back like it was +#ifdef KOKKOS_DEBUG // mfh 23 Jun 2015: printf call consumes 25 registers // in a CUDA build, so only print in debug mode. The // function still returns NULL if not enough memory. - printf ("ScratchMemorySpace<...>::get_shmem: Failed to allocate " - "%ld byte(s); remaining capacity is %ld byte(s)\n", long(size), - long(m_end_L1-m_iter_L1)); - #endif // KOKKOS_DEBUG + printf( + "ScratchMemorySpace<...>::get_shmem: Failed to allocate " + "%ld byte(s); remaining capacity is %ld byte(s)\n", + long(size), long(m_end_L1 - m_iter_L1)); +#endif // KOKKOS_DEBUG tmp = 0; } return tmp; - } } - KOKKOS_INLINE_FUNCTION - void* get_shmem_aligned (const ptrdiff_t size, const ptrdiff_t alignment, int level = -1) const { - if(level == -1) - level = m_default_level; - if(level == 0) { - - char* previous = m_iter_L0; - const ptrdiff_t missalign = size_t(m_iter_L0)%alignment; - if(missalign) m_iter_L0 += alignment-missalign; + void* get_shmem_aligned(const ptrdiff_t size, const ptrdiff_t alignment, + int level = -1) const { + if (level == -1) level = m_default_level; + if (level == 0) { + char* previous = m_iter_L0; + const ptrdiff_t missalign = size_t(m_iter_L0) % alignment; + if (missalign) m_iter_L0 += alignment - missalign; void* tmp = m_iter_L0 + m_offset * size; if (m_end_L0 < (m_iter_L0 += size * m_multiplier)) { - m_iter_L0 = previous; // put it back like it was - #ifdef KOKKOS_DEBUG + m_iter_L0 = previous; // put it back like it was +#ifdef KOKKOS_DEBUG // mfh 23 Jun 2015: printf call consumes 25 registers // in a CUDA build, so only print in debug mode. The // function still returns NULL if not enough memory. - printf ("ScratchMemorySpace<...>::get_shmem: Failed to allocate " - "%ld byte(s); remaining capacity is %ld byte(s)\n", long(size), - long(m_end_L0-m_iter_L0)); - #endif // KOKKOS_DEBUG + printf( + "ScratchMemorySpace<...>::get_shmem: Failed to allocate " + "%ld byte(s); remaining capacity is %ld byte(s)\n", + long(size), long(m_end_L0 - m_iter_L0)); +#endif // KOKKOS_DEBUG tmp = 0; } return tmp; } else { - - char* previous = m_iter_L1; - const ptrdiff_t missalign = size_t(m_iter_L1)%alignment; - if(missalign) m_iter_L1 += alignment-missalign; + char* previous = m_iter_L1; + const ptrdiff_t missalign = size_t(m_iter_L1) % alignment; + if (missalign) m_iter_L1 += alignment - missalign; void* tmp = m_iter_L1 + m_offset * size; if (m_end_L1 < (m_iter_L1 += size * m_multiplier)) { - m_iter_L1 = previous; // put it back like it was - #ifdef KOKKOS_DEBUG + m_iter_L1 = previous; // put it back like it was +#ifdef KOKKOS_DEBUG // mfh 23 Jun 2015: printf call consumes 25 registers // in a CUDA build, so only print in debug mode. The // function still returns NULL if not enough memory. - printf ("ScratchMemorySpace<...>::get_shmem: Failed to allocate " - "%ld byte(s); remaining capacity is %ld byte(s)\n", long(size), - long(m_end_L1-m_iter_L1)); - #endif // KOKKOS_DEBUG + printf( + "ScratchMemorySpace<...>::get_shmem: Failed to allocate " + "%ld byte(s); remaining capacity is %ld byte(s)\n", + long(size), long(m_end_L1 - m_iter_L1)); +#endif // KOKKOS_DEBUG tmp = 0; } return tmp; - } } - template< typename IntType > - KOKKOS_INLINE_FUNCTION - ScratchMemorySpace( void * ptr_L0 , const IntType & size_L0 , void * ptr_L1 = NULL , const IntType & size_L1 = 0) - : m_iter_L0( (char *) ptr_L0 ) - , m_end_L0( m_iter_L0 + size_L0 ) - , m_iter_L1( (char *) ptr_L1 ) - , m_end_L1( m_iter_L1 + size_L1 ) - , m_multiplier( 1 ) - , m_offset( 0 ) - , m_default_level( 0 ) - {} + template + KOKKOS_INLINE_FUNCTION ScratchMemorySpace(void* ptr_L0, + const IntType& size_L0, + void* ptr_L1 = NULL, + const IntType& size_L1 = 0) + : m_iter_L0((char*)ptr_L0), + m_end_L0(m_iter_L0 + size_L0), + m_iter_L1((char*)ptr_L1), + m_end_L1(m_iter_L1 + size_L1), + m_multiplier(1), + m_offset(0), + m_default_level(0) {} KOKKOS_INLINE_FUNCTION - const ScratchMemorySpace& set_team_thread_mode(const int& level, const int& multiplier, const int& offset) const { + const ScratchMemorySpace& set_team_thread_mode(const int& level, + const int& multiplier, + const int& offset) const { m_default_level = level; - m_multiplier = multiplier; - m_offset = offset; + m_multiplier = multiplier; + m_offset = offset; return *this; } }; -} // namespace Kokkos +} // namespace Kokkos #endif /* #ifndef KOKKOS_SCRATCHSPACE_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_Serial.hpp b/lib/kokkos/core/src/Kokkos_Serial.hpp index 5821b0c0c5..e30598be21 100644 --- a/lib/kokkos/core/src/Kokkos_Serial.hpp +++ b/lib/kokkos/core/src/Kokkos_Serial.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -48,7 +49,7 @@ #define KOKKOS_SERIAL_HPP #include -#if defined( KOKKOS_ENABLE_SERIAL ) +#if defined(KOKKOS_ENABLE_SERIAL) #include #include @@ -83,24 +84,24 @@ namespace Kokkos { /// threads, or if you want to explore different combinations of MPI /// and shared-memory parallel programming models. class Serial { -public: + public: //! \name Type declarations that all Kokkos devices must provide. //@{ //! Tag this class as an execution space: - typedef Serial execution_space ; + typedef Serial execution_space; //! The size_type typedef best suited for this device. - typedef HostSpace::size_type size_type ; + typedef HostSpace::size_type size_type; //! This device's preferred memory space. - typedef HostSpace memory_space ; + typedef HostSpace memory_space; //! This execution space preferred device_type - typedef Kokkos::Device device_type; + typedef Kokkos::Device device_type; //! This device's preferred array layout. - typedef LayoutRight array_layout ; + typedef LayoutRight array_layout; /// \brief Scratch memory space - typedef ScratchMemorySpace< Kokkos::Serial > scratch_memory_space ; + typedef ScratchMemorySpace scratch_memory_space; //@} @@ -110,7 +111,7 @@ public: /// For the Serial device, this method always returns false, /// because parallel_for or parallel_reduce with the Serial device /// always execute sequentially. - inline static int in_parallel() { return false ; } + inline static int in_parallel() { return false; } /// \brief Wait until all dispatched functors complete. /// @@ -120,26 +121,27 @@ public: /// device have completed. static void impl_static_fence() {} - #ifdef KOKKOS_ENABLE_DEPRECATED_CODE +#ifdef KOKKOS_ENABLE_DEPRECATED_CODE static void fence() {} - #else +#else void fence() const {} - #endif +#endif /** \brief Return the maximum amount of concurrency. */ - static int concurrency() {return 1;} + static int concurrency() { return 1; } //! Print configuration information to the given output stream. - static void print_configuration( std::ostream & , const bool /* detail */ = false ) {} + static void print_configuration(std::ostream&, + const bool /* detail */ = false) {} #ifdef KOKKOS_ENABLE_DEPRECATED_CODE static bool sleep(); static bool wake(); - static void initialize( unsigned threads_count = 1 , - unsigned use_numa_count = 0 , - unsigned use_cores_per_numa = 0 , - bool allow_asynchronous_threadpool = false); + static void initialize(unsigned threads_count = 1, + unsigned use_numa_count = 0, + unsigned use_cores_per_numa = 0, + bool allow_asynchronous_threadpool = false); static bool is_initialized(); @@ -148,12 +150,14 @@ public: //-------------------------------------------------------------------------- - inline static int thread_pool_size( int = 0 ) { return 1 ; } - KOKKOS_INLINE_FUNCTION static int thread_pool_rank() { return 0 ; } + inline static int thread_pool_size(int = 0) { return 1; } + KOKKOS_INLINE_FUNCTION static int thread_pool_rank() { return 0; } //-------------------------------------------------------------------------- - KOKKOS_INLINE_FUNCTION static unsigned hardware_thread_id() { return thread_pool_rank(); } + KOKKOS_INLINE_FUNCTION static unsigned hardware_thread_id() { + return thread_pool_rank(); + } inline static unsigned max_hardware_threads() { return thread_pool_size(0); } #else static void impl_initialize(); @@ -165,20 +169,24 @@ public: //-------------------------------------------------------------------------- - inline static int impl_thread_pool_size( int = 0 ) { return 1 ; } - KOKKOS_INLINE_FUNCTION static int impl_thread_pool_rank() { return 0 ; } + inline static int impl_thread_pool_size(int = 0) { return 1; } + KOKKOS_INLINE_FUNCTION static int impl_thread_pool_rank() { return 0; } //-------------------------------------------------------------------------- - KOKKOS_INLINE_FUNCTION static unsigned impl_hardware_thread_id() { return impl_thread_pool_rank(); } - inline static unsigned impl_max_hardware_threads() { return impl_thread_pool_size(0); } + KOKKOS_INLINE_FUNCTION static unsigned impl_hardware_thread_id() { + return impl_thread_pool_rank(); + } + inline static unsigned impl_max_hardware_threads() { + return impl_thread_pool_size(0); + } #endif static const char* name(); //-------------------------------------------------------------------------- }; -} // namespace Kokkos +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -186,30 +194,24 @@ public: namespace Kokkos { namespace Impl { -template<> -struct MemorySpaceAccess - < Kokkos::Serial::memory_space - , Kokkos::Serial::scratch_memory_space - > -{ +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = true }; - enum { deepcopy = false }; + enum { deepcopy = false }; }; -template<> -struct VerifyExecutionCanAccessMemorySpace - < Kokkos::Serial::memory_space - , Kokkos::Serial::scratch_memory_space - > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace< + Kokkos::Serial::memory_space, Kokkos::Serial::scratch_memory_space> { enum { value = true }; - inline static void verify( void ) { } - inline static void verify( const void * ) { } + inline static void verify(void) {} + inline static void verify(const void*) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -218,247 +220,294 @@ namespace Kokkos { namespace Impl { // Resize thread team data scratch memory -void serial_resize_thread_team_data( size_t pool_reduce_bytes - , size_t team_reduce_bytes - , size_t team_shared_bytes - , size_t thread_local_bytes ); +void serial_resize_thread_team_data(size_t pool_reduce_bytes, + size_t team_reduce_bytes, + size_t team_shared_bytes, + size_t thread_local_bytes); -HostThreadTeamData * serial_get_thread_team_data(); +HostThreadTeamData* serial_get_thread_team_data(); } /* namespace Impl */ } /* namespace Kokkos */ - namespace Kokkos { namespace Impl { /* * < Kokkos::Serial , WorkArgTag > - * < WorkArgTag , Impl::enable_if< std::is_same< Kokkos::Serial , Kokkos::DefaultExecutionSpace >::value >::type > + * < WorkArgTag , Impl::enable_if< std::is_same< Kokkos::Serial , + * Kokkos::DefaultExecutionSpace >::value >::type > * */ -template< class ... Properties > -class TeamPolicyInternal< Kokkos::Serial , Properties ... >:public PolicyTraits -{ -private: - - size_t m_team_scratch_size[2] ; - size_t m_thread_scratch_size[2] ; - int m_league_size ; - int m_chunk_size; - -public: +template +class TeamPolicyInternal + : public PolicyTraits { + private: + size_t m_team_scratch_size[2]; + size_t m_thread_scratch_size[2]; + int m_league_size; + int m_chunk_size; + public: //! Tag this class as a kokkos execution policy - typedef TeamPolicyInternal execution_policy ; + typedef TeamPolicyInternal execution_policy; - typedef PolicyTraits traits; + typedef PolicyTraits traits; //! Execution space of this execution policy: - typedef Kokkos::Serial execution_space ; + typedef Kokkos::Serial execution_space; - TeamPolicyInternal& operator = (const TeamPolicyInternal& p) { - m_league_size = p.m_league_size; - m_team_scratch_size[0] = p.m_team_scratch_size[0]; + TeamPolicyInternal& operator=(const TeamPolicyInternal& p) { + m_league_size = p.m_league_size; + m_team_scratch_size[0] = p.m_team_scratch_size[0]; m_thread_scratch_size[0] = p.m_thread_scratch_size[0]; - m_team_scratch_size[1] = p.m_team_scratch_size[1]; + m_team_scratch_size[1] = p.m_team_scratch_size[1]; m_thread_scratch_size[1] = p.m_thread_scratch_size[1]; - m_chunk_size = p.m_chunk_size; + m_chunk_size = p.m_chunk_size; return *this; } - template + template friend class TeamPolicyInternal; - template< class ... OtherProperties > - TeamPolicyInternal(const TeamPolicyInternal& p) { - m_league_size = p.m_league_size; - m_team_scratch_size[0] = p.m_team_scratch_size[0]; + template + TeamPolicyInternal( + const TeamPolicyInternal& p) { + m_league_size = p.m_league_size; + m_team_scratch_size[0] = p.m_team_scratch_size[0]; m_thread_scratch_size[0] = p.m_thread_scratch_size[0]; - m_team_scratch_size[1] = p.m_team_scratch_size[1]; + m_team_scratch_size[1] = p.m_team_scratch_size[1]; m_thread_scratch_size[1] = p.m_thread_scratch_size[1]; - m_chunk_size = p.m_chunk_size; + m_chunk_size = p.m_chunk_size; } - //---------------------------------------- #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - template< class FunctorType > - static - int team_size_max( const FunctorType & ) { return 1 ; } + template + static int team_size_max(const FunctorType&) { + return 1; + } - template< class FunctorType > - static - int team_size_recommended( const FunctorType & ) { return 1 ; } + template + static int team_size_recommended(const FunctorType&) { + return 1; + } - template< class FunctorType > - static - int team_size_recommended( const FunctorType & , const int& ) { return 1 ; } + template + static int team_size_recommended(const FunctorType&, const int&) { + return 1; + } #endif - template - int team_size_max( const FunctorType&, const ParallelForTag& ) const { return 1 ; } - template - int team_size_max( const FunctorType&, const ParallelReduceTag& ) const { return 1 ; } - template - int team_size_recommended( const FunctorType&, const ParallelForTag& ) const { return 1 ; } - template - int team_size_recommended( const FunctorType&, const ParallelReduceTag& ) const { return 1 ; } + template + int team_size_max(const FunctorType&, const ParallelForTag&) const { + return 1; + } + template + int team_size_max(const FunctorType&, const ParallelReduceTag&) const { + return 1; + } + template + int team_size_max(const FunctorType&, const ReducerType&, + const ParallelReduceTag&) const { + return 1; + } + template + int team_size_recommended(const FunctorType&, const ParallelForTag&) const { + return 1; + } + template + int team_size_recommended(const FunctorType&, + const ParallelReduceTag&) const { + return 1; + } + template + int team_size_recommended(const FunctorType&, const ReducerType&, + const ParallelReduceTag&) const { + return 1; + } //---------------------------------------- - inline int team_size() const { return 1 ; } - inline int league_size() const { return m_league_size ; } - inline size_t scratch_size(const int& level, int = 0) const { return m_team_scratch_size[level] + m_thread_scratch_size[level]; } + inline int team_size() const { return 1; } + inline int league_size() const { return m_league_size; } + inline size_t scratch_size(const int& level, int = 0) const { + return m_team_scratch_size[level] + m_thread_scratch_size[level]; + } - inline static - int vector_length_max() - { return 1024; } // Use arbitrary large number, is meant as a vectorizable length + inline static int vector_length_max() { + return 1024; + } // Use arbitrary large number, is meant as a vectorizable length - inline static - int scratch_size_max(int level) - { return (level==0? - 1024*32: - 20*1024*1024); + inline static int scratch_size_max(int level) { + return (level == 0 ? 1024 * 32 : 20 * 1024 * 1024); } /** \brief Specify league size, request team size */ - TeamPolicyInternal( const execution_space & - , int league_size_request + TeamPolicyInternal(const execution_space&, int league_size_request #ifndef KOKKOS_ENABLE_DEPRECATED_CODE - , int team_size_request + , + int team_size_request #else - , int /* team_size_request */ + , + int /* team_size_request */ #endif - , int /* vector_length_request */ = 1 ) - : m_team_scratch_size { 0 , 0 } - , m_thread_scratch_size { 0 , 0 } - , m_league_size( league_size_request ) - , m_chunk_size ( 32 ) - { - #ifndef KOKKOS_ENABLE_DEPRECATED_CODE - if(team_size_request > 1) Kokkos::abort("Kokkos::abort: Requested Team Size is too large!"); - #endif - } - - TeamPolicyInternal( const execution_space & - , int league_size_request - , const Kokkos::AUTO_t & /* team_size_request */ - , int /* vector_length_request */ = 1 ) - : m_team_scratch_size { 0 , 0 } - , m_thread_scratch_size { 0 , 0 } - , m_league_size( league_size_request ) - , m_chunk_size ( 32 ) - {} - - TeamPolicyInternal( int league_size_request + , + int /* vector_length_request */ = 1) + : m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, + m_league_size(league_size_request), + m_chunk_size(32) { #ifndef KOKKOS_ENABLE_DEPRECATED_CODE - , int team_size_request -#else - , int /* team_size_request */ + if (team_size_request > 1) + Kokkos::abort("Kokkos::abort: Requested Team Size is too large!"); #endif - , int /* vector_length_request */ = 1 ) - : m_team_scratch_size { 0 , 0 } - , m_thread_scratch_size { 0 , 0 } - , m_league_size( league_size_request ) - , m_chunk_size ( 32 ) - { - #ifndef KOKKOS_ENABLE_DEPRECATED_CODE - if(team_size_request > 1) Kokkos::abort("Kokkos::abort: Requested Team Size is too large!"); - #endif - } + } - TeamPolicyInternal( int league_size_request - , const Kokkos::AUTO_t & /* team_size_request */ - , int /* vector_length_request */ = 1 ) - : m_team_scratch_size { 0 , 0 } - , m_thread_scratch_size { 0 , 0 } - , m_league_size( league_size_request ) - , m_chunk_size ( 32 ) - {} + TeamPolicyInternal(const execution_space&, int league_size_request, + const Kokkos::AUTO_t& /* team_size_request */ + , + int /* vector_length_request */ = 1) + : m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, + m_league_size(league_size_request), + m_chunk_size(32) {} - inline int chunk_size() const { return m_chunk_size ; } + TeamPolicyInternal(int league_size_request +#ifndef KOKKOS_ENABLE_DEPRECATED_CODE + , + int team_size_request +#else + , + int /* team_size_request */ +#endif + , + int /* vector_length_request */ = 1) + : m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, + m_league_size(league_size_request), + m_chunk_size(32) { +#ifndef KOKKOS_ENABLE_DEPRECATED_CODE + if (team_size_request > 1) + Kokkos::abort("Kokkos::abort: Requested Team Size is too large!"); +#endif + } + + TeamPolicyInternal(int league_size_request, + const Kokkos::AUTO_t& /* team_size_request */ + , + int /* vector_length_request */ = 1) + : m_team_scratch_size{0, 0}, + m_thread_scratch_size{0, 0}, + m_league_size(league_size_request), + m_chunk_size(32) {} + + inline int chunk_size() const { return m_chunk_size; } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE /** \brief set chunk_size to a discrete value*/ - inline TeamPolicyInternal set_chunk_size(typename traits::index_type chunk_size_) const { + inline TeamPolicyInternal set_chunk_size( + typename traits::index_type chunk_size_) const { TeamPolicyInternal p = *this; - p.m_chunk_size = chunk_size_; + p.m_chunk_size = chunk_size_; return p; } - /** \brief set per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal set_scratch_size(const int& level, const PerTeamValue& per_team) const { - TeamPolicyInternal p = *this; + /** \brief set per team scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal set_scratch_size( + const int& level, const PerTeamValue& per_team) const { + TeamPolicyInternal p = *this; p.m_team_scratch_size[level] = per_team.value; return p; } - /** \brief set per thread scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal set_scratch_size(const int& level, const PerThreadValue& per_thread) const { - TeamPolicyInternal p = *this; + /** \brief set per thread scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal set_scratch_size( + const int& level, const PerThreadValue& per_thread) const { + TeamPolicyInternal p = *this; p.m_thread_scratch_size[level] = per_thread.value; return p; } - /** \brief set per thread and per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal set_scratch_size(const int& level, const PerTeamValue& per_team, const PerThreadValue& per_thread) const { - TeamPolicyInternal p = *this; - p.m_team_scratch_size[level] = per_team.value; + /** \brief set per thread and per team scratch size for a specific level of + * the scratch hierarchy */ + inline TeamPolicyInternal set_scratch_size( + const int& level, const PerTeamValue& per_team, + const PerThreadValue& per_thread) const { + TeamPolicyInternal p = *this; + p.m_team_scratch_size[level] = per_team.value; p.m_thread_scratch_size[level] = per_thread.value; return p; } #else /** \brief set chunk_size to a discrete value*/ - inline TeamPolicyInternal& set_chunk_size(typename traits::index_type chunk_size_) { + inline TeamPolicyInternal& set_chunk_size( + typename traits::index_type chunk_size_) { m_chunk_size = chunk_size_; return *this; } - /** \brief set per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal& set_scratch_size(const int& level, const PerTeamValue& per_team) { + /** \brief set per team scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal& set_scratch_size(const int& level, + const PerTeamValue& per_team) { m_team_scratch_size[level] = per_team.value; return *this; } - /** \brief set per thread scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal& set_scratch_size(const int& level, const PerThreadValue& per_thread) { + /** \brief set per thread scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal& set_scratch_size( + const int& level, const PerThreadValue& per_thread) { m_thread_scratch_size[level] = per_thread.value; return *this; } - /** \brief set per thread and per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal& set_scratch_size(const int& level, const PerTeamValue& per_team, const PerThreadValue& per_thread) { - m_team_scratch_size[level] = per_team.value; + /** \brief set per thread and per team scratch size for a specific level of + * the scratch hierarchy */ + inline TeamPolicyInternal& set_scratch_size( + const int& level, const PerTeamValue& per_team, + const PerThreadValue& per_thread) { + m_team_scratch_size[level] = per_team.value; m_thread_scratch_size[level] = per_thread.value; return *this; } #endif - typedef Impl::HostThreadTeamMember< Kokkos::Serial > member_type ; + typedef Impl::HostThreadTeamMember member_type; -protected: + protected: #ifdef KOKKOS_ENABLE_DEPRECATED_CODE /** \brief set chunk_size to a discrete value*/ - inline TeamPolicyInternal internal_set_chunk_size(typename traits::index_type chunk_size_) { + inline TeamPolicyInternal internal_set_chunk_size( + typename traits::index_type chunk_size_) { m_chunk_size = chunk_size_; return *this; } - /** \brief set per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal internal_set_scratch_size(const int& level, const PerTeamValue& per_team) { + /** \brief set per team scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal internal_set_scratch_size( + const int& level, const PerTeamValue& per_team) { m_team_scratch_size[level] = per_team.value; return *this; } - /** \brief set per thread scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal internal_set_scratch_size(const int& level, const PerThreadValue& per_thread) { + /** \brief set per thread scratch size for a specific level of the scratch + * hierarchy */ + inline TeamPolicyInternal internal_set_scratch_size( + const int& level, const PerThreadValue& per_thread) { m_thread_scratch_size[level] = per_thread.value; return *this; } - /** \brief set per thread and per team scratch size for a specific level of the scratch hierarchy */ - inline TeamPolicyInternal internal_set_scratch_size(const int& level, const PerTeamValue& per_team, const PerThreadValue& per_thread) { - m_team_scratch_size[level] = per_team.value; + /** \brief set per thread and per team scratch size for a specific level of + * the scratch hierarchy */ + inline TeamPolicyInternal internal_set_scratch_size( + const int& level, const PerTeamValue& per_team, + const PerThreadValue& per_thread) { + m_team_scratch_size[level] = per_team.value; m_thread_scratch_size[level] = per_thread.value; return *this; } @@ -474,339 +523,280 @@ protected: namespace Kokkos { namespace Impl { -template< class FunctorType , class ... Traits > -class ParallelFor< FunctorType , - Kokkos::RangePolicy< Traits ... > , - Kokkos::Serial - > -{ -private: +template +class ParallelFor, Kokkos::Serial> { + private: + typedef Kokkos::RangePolicy Policy; - typedef Kokkos::RangePolicy< Traits ... > Policy ; + const FunctorType m_functor; + const Policy m_policy; - const FunctorType m_functor ; - const Policy m_policy ; - - template< class TagType > - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec() const - { - const typename Policy::member_type e = m_policy.end(); - for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { - m_functor( i ); - } + template + typename std::enable_if::value>::type exec() + const { + const typename Policy::member_type e = m_policy.end(); + for (typename Policy::member_type i = m_policy.begin(); i < e; ++i) { + m_functor(i); } + } - template< class TagType > - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec() const - { - const TagType t{} ; - const typename Policy::member_type e = m_policy.end(); - for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { - m_functor( t , i ); - } + template + typename std::enable_if::value>::type exec() + const { + const TagType t{}; + const typename Policy::member_type e = m_policy.end(); + for (typename Policy::member_type i = m_policy.begin(); i < e; ++i) { + m_functor(t, i); } + } -public: + public: + inline void execute() const { + this->template exec(); + } - inline - void execute() const - { this-> template exec< typename Policy::work_tag >(); } - - inline - ParallelFor( const FunctorType & arg_functor - , const Policy & arg_policy ) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - {} + inline ParallelFor(const FunctorType& arg_functor, const Policy& arg_policy) + : m_functor(arg_functor), m_policy(arg_policy) {} }; /*--------------------------------------------------------------------------*/ -template< class FunctorType , class ReducerType , class ... Traits > -class ParallelReduce< FunctorType - , Kokkos::RangePolicy< Traits ... > - , ReducerType - , Kokkos::Serial - > -{ -private: +template +class ParallelReduce, ReducerType, + Kokkos::Serial> { + private: + typedef Kokkos::RangePolicy Policy; + typedef typename Policy::work_tag WorkTag; - typedef Kokkos::RangePolicy< Traits ... > Policy ; - typedef typename Policy::work_tag WorkTag ; - - typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType> ReducerConditional; + typedef Kokkos::Impl::if_c::value, + FunctorType, ReducerType> + ReducerConditional; typedef typename ReducerConditional::type ReducerTypeFwd; - typedef typename Kokkos::Impl::if_c< std::is_same::value, WorkTag, void>::type WorkTagFwd; + typedef + typename Kokkos::Impl::if_c::value, + WorkTag, void>::type WorkTagFwd; - typedef FunctorAnalysis< FunctorPatternInterface::REDUCE , Policy , FunctorType > Analysis ; + typedef FunctorAnalysis + Analysis; - typedef Kokkos::Impl::FunctorValueInit< ReducerTypeFwd , WorkTagFwd > ValueInit ; + typedef Kokkos::Impl::FunctorValueInit ValueInit; - typedef typename Analysis::pointer_type pointer_type ; - typedef typename Analysis::reference_type reference_type ; + typedef typename Analysis::pointer_type pointer_type; + typedef typename Analysis::reference_type reference_type; - const FunctorType m_functor ; - const Policy m_policy ; - const ReducerType m_reducer ; - const pointer_type m_result_ptr ; + const FunctorType m_functor; + const Policy m_policy; + const ReducerType m_reducer; + const pointer_type m_result_ptr; - template< class TagType > - inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec( reference_type update ) const - { - const typename Policy::member_type e = m_policy.end(); - for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { - m_functor( i , update ); - } + template + inline typename std::enable_if::value>::type exec( + reference_type update) const { + const typename Policy::member_type e = m_policy.end(); + for (typename Policy::member_type i = m_policy.begin(); i < e; ++i) { + m_functor(i, update); } + } - template< class TagType > - inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec( reference_type update ) const - { - const TagType t{} ; + template + inline typename std::enable_if::value>::type + exec(reference_type update) const { + const TagType t{}; - const typename Policy::member_type e = m_policy.end(); - for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { - m_functor( t , i , update ); - } + const typename Policy::member_type e = m_policy.end(); + for (typename Policy::member_type i = m_policy.begin(); i < e; ++i) { + m_functor(t, i, update); } + } -public: + public: + inline void execute() const { + const size_t pool_reduce_size = + Analysis::value_size(ReducerConditional::select(m_functor, m_reducer)); + const size_t team_reduce_size = 0; // Never shrinks + const size_t team_shared_size = 0; // Never shrinks + const size_t thread_local_size = 0; // Never shrinks - inline - void execute() const - { - const size_t pool_reduce_size = - Analysis::value_size( ReducerConditional::select(m_functor , m_reducer) ); - const size_t team_reduce_size = 0 ; // Never shrinks - const size_t team_shared_size = 0 ; // Never shrinks - const size_t thread_local_size = 0 ; // Never shrinks + serial_resize_thread_team_data(pool_reduce_size, team_reduce_size, + team_shared_size, thread_local_size); - serial_resize_thread_team_data( pool_reduce_size - , team_reduce_size - , team_shared_size - , thread_local_size ); + HostThreadTeamData& data = *serial_get_thread_team_data(); - HostThreadTeamData & data = *serial_get_thread_team_data(); - - pointer_type ptr = + pointer_type ptr = m_result_ptr ? m_result_ptr : pointer_type(data.pool_reduce_local()); - reference_type update = - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , ptr ); + reference_type update = + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), ptr); - this-> template exec< WorkTag >( update ); + this->template exec(update); - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >:: - final( ReducerConditional::select(m_functor , m_reducer) , ptr ); - } + Kokkos::Impl::FunctorFinal::final( + ReducerConditional::select(m_functor, m_reducer), ptr); + } - template< class HostViewType > - ParallelReduce( const FunctorType & arg_functor , - const Policy & arg_policy , - const HostViewType & arg_result_view , - typename std::enable_if< - Kokkos::is_view< HostViewType >::value && - !Kokkos::is_reducer_type::value - ,void*>::type = NULL) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_reducer( InvalidType() ) - , m_result_ptr( arg_result_view.data() ) - { - static_assert( Kokkos::is_view< HostViewType >::value - , "Kokkos::Serial reduce result must be a View" ); + template + ParallelReduce( + const FunctorType& arg_functor, const Policy& arg_policy, + const HostViewType& arg_result_view, + typename std::enable_if::value && + !Kokkos::is_reducer_type::value, + void*>::type = NULL) + : m_functor(arg_functor), + m_policy(arg_policy), + m_reducer(InvalidType()), + m_result_ptr(arg_result_view.data()) { + static_assert(Kokkos::is_view::value, + "Kokkos::Serial reduce result must be a View"); - static_assert( std::is_same< typename HostViewType::memory_space , HostSpace >::value - , "Kokkos::Serial reduce result must be a View in HostSpace" ); - } + static_assert( + std::is_same::value, + "Kokkos::Serial reduce result must be a View in HostSpace"); + } - inline - ParallelReduce( const FunctorType & arg_functor - , Policy arg_policy - , const ReducerType& reducer ) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_reducer( reducer ) - , m_result_ptr( reducer.view().data() ) - { - /*static_assert( std::is_same< typename ViewType::memory_space - , Kokkos::HostSpace >::value - , "Reduction result on Kokkos::OpenMP must be a Kokkos::View in HostSpace" );*/ - } -}; - - -/*--------------------------------------------------------------------------*/ - -template< class FunctorType , class ... Traits > -class ParallelScan< FunctorType - , Kokkos::RangePolicy< Traits ... > - , Kokkos::Serial - > -{ -private: - - typedef Kokkos::RangePolicy< Traits ... > Policy ; - typedef typename Policy::work_tag WorkTag ; - - typedef FunctorAnalysis< FunctorPatternInterface::SCAN , Policy , FunctorType > Analysis ; - - typedef Kokkos::Impl::FunctorValueInit< FunctorType , WorkTag > ValueInit ; - - typedef typename Analysis::pointer_type pointer_type ; - typedef typename Analysis::reference_type reference_type ; - - const FunctorType m_functor ; - const Policy m_policy ; - - template< class TagType > - inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec( reference_type update ) const - { - const typename Policy::member_type e = m_policy.end(); - for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { - m_functor( i , update , true ); - } - } - - template< class TagType > - inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec( reference_type update ) const - { - const TagType t{} ; - const typename Policy::member_type e = m_policy.end(); - for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { - m_functor( t , i , update , true ); - } - } - -public: - - inline - void execute() const - { - const size_t pool_reduce_size = Analysis::value_size( m_functor ); - const size_t team_reduce_size = 0 ; // Never shrinks - const size_t team_shared_size = 0 ; // Never shrinks - const size_t thread_local_size = 0 ; // Never shrinks - - serial_resize_thread_team_data( pool_reduce_size - , team_reduce_size - , team_shared_size - , thread_local_size ); - - HostThreadTeamData & data = *serial_get_thread_team_data(); - - reference_type update = - ValueInit::init( m_functor , pointer_type(data.pool_reduce_local()) ); - - this-> template exec< WorkTag >( update ); - } - - inline - ParallelScan( const FunctorType & arg_functor - , const Policy & arg_policy - ) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - {} + inline ParallelReduce(const FunctorType& arg_functor, Policy arg_policy, + const ReducerType& reducer) + : m_functor(arg_functor), + m_policy(arg_policy), + m_reducer(reducer), + m_result_ptr(reducer.view().data()) { + /*static_assert( std::is_same< typename ViewType::memory_space + , Kokkos::HostSpace >::value + , "Reduction result on Kokkos::OpenMP must be a Kokkos::View in HostSpace" + );*/ + } }; /*--------------------------------------------------------------------------*/ -template< class FunctorType , class ReturnType, class ... Traits > -class ParallelScanWithTotal< FunctorType - , Kokkos::RangePolicy< Traits ... > - , ReturnType - , Kokkos::Serial - > -{ -private: - typedef Kokkos::RangePolicy< Traits ... > Policy ; - typedef typename Policy::work_tag WorkTag ; +template +class ParallelScan, + Kokkos::Serial> { + private: + typedef Kokkos::RangePolicy Policy; + typedef typename Policy::work_tag WorkTag; - typedef FunctorAnalysis< FunctorPatternInterface::SCAN , Policy , FunctorType > Analysis ; + typedef FunctorAnalysis + Analysis; - typedef Kokkos::Impl::FunctorValueInit< FunctorType , WorkTag > ValueInit ; + typedef Kokkos::Impl::FunctorValueInit ValueInit; - typedef typename Analysis::pointer_type pointer_type ; - typedef typename Analysis::reference_type reference_type ; + typedef typename Analysis::pointer_type pointer_type; + typedef typename Analysis::reference_type reference_type; - const FunctorType m_functor ; - const Policy m_policy ; - ReturnType & m_returnvalue; + const FunctorType m_functor; + const Policy m_policy; - template< class TagType > - inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec( reference_type update ) const - { - const typename Policy::member_type e = m_policy.end(); - for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { - m_functor( i , update , true ); - } + template + inline typename std::enable_if::value>::type exec( + reference_type update) const { + const typename Policy::member_type e = m_policy.end(); + for (typename Policy::member_type i = m_policy.begin(); i < e; ++i) { + m_functor(i, update, true); } + } - template< class TagType > - inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec( reference_type update ) const - { - const TagType t{} ; - const typename Policy::member_type e = m_policy.end(); - for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { - m_functor( t , i , update , true ); - } + template + inline typename std::enable_if::value>::type + exec(reference_type update) const { + const TagType t{}; + const typename Policy::member_type e = m_policy.end(); + for (typename Policy::member_type i = m_policy.begin(); i < e; ++i) { + m_functor(t, i, update, true); } + } -public: + public: + inline void execute() const { + const size_t pool_reduce_size = Analysis::value_size(m_functor); + const size_t team_reduce_size = 0; // Never shrinks + const size_t team_shared_size = 0; // Never shrinks + const size_t thread_local_size = 0; // Never shrinks - inline - void execute() - { - const size_t pool_reduce_size = Analysis::value_size( m_functor ); - const size_t team_reduce_size = 0 ; // Never shrinks - const size_t team_shared_size = 0 ; // Never shrinks - const size_t thread_local_size = 0 ; // Never shrinks + serial_resize_thread_team_data(pool_reduce_size, team_reduce_size, + team_shared_size, thread_local_size); - serial_resize_thread_team_data( pool_reduce_size - , team_reduce_size - , team_shared_size - , thread_local_size ); + HostThreadTeamData& data = *serial_get_thread_team_data(); - HostThreadTeamData & data = *serial_get_thread_team_data(); + reference_type update = + ValueInit::init(m_functor, pointer_type(data.pool_reduce_local())); - reference_type update = - ValueInit::init( m_functor , pointer_type(data.pool_reduce_local()) ); + this->template exec(update); + } - this-> template exec< WorkTag >( update ); - - m_returnvalue = update; - } - - inline - ParallelScanWithTotal( const FunctorType & arg_functor - , const Policy & arg_policy - , ReturnType & arg_returnvalue - ) - : m_functor( arg_functor ) - , m_policy( arg_policy ) - , m_returnvalue( arg_returnvalue ) - {} + inline ParallelScan(const FunctorType& arg_functor, const Policy& arg_policy) + : m_functor(arg_functor), m_policy(arg_policy) {} }; -} // namespace Impl -} // namespace Kokkos +/*--------------------------------------------------------------------------*/ +template +class ParallelScanWithTotal, + ReturnType, Kokkos::Serial> { + private: + typedef Kokkos::RangePolicy Policy; + typedef typename Policy::work_tag WorkTag; + typedef FunctorAnalysis + Analysis; + + typedef Kokkos::Impl::FunctorValueInit ValueInit; + + typedef typename Analysis::pointer_type pointer_type; + typedef typename Analysis::reference_type reference_type; + + const FunctorType m_functor; + const Policy m_policy; + ReturnType& m_returnvalue; + + template + inline typename std::enable_if::value>::type exec( + reference_type update) const { + const typename Policy::member_type e = m_policy.end(); + for (typename Policy::member_type i = m_policy.begin(); i < e; ++i) { + m_functor(i, update, true); + } + } + + template + inline typename std::enable_if::value>::type + exec(reference_type update) const { + const TagType t{}; + const typename Policy::member_type e = m_policy.end(); + for (typename Policy::member_type i = m_policy.begin(); i < e; ++i) { + m_functor(t, i, update, true); + } + } + + public: + inline void execute() { + const size_t pool_reduce_size = Analysis::value_size(m_functor); + const size_t team_reduce_size = 0; // Never shrinks + const size_t team_shared_size = 0; // Never shrinks + const size_t thread_local_size = 0; // Never shrinks + + serial_resize_thread_team_data(pool_reduce_size, team_reduce_size, + team_shared_size, thread_local_size); + + HostThreadTeamData& data = *serial_get_thread_team_data(); + + reference_type update = + ValueInit::init(m_functor, pointer_type(data.pool_reduce_local())); + + this->template exec(update); + + m_returnvalue = update; + } + + inline ParallelScanWithTotal(const FunctorType& arg_functor, + const Policy& arg_policy, + ReturnType& arg_returnvalue) + : m_functor(arg_functor), + m_policy(arg_policy), + m_returnvalue(arg_returnvalue) {} +}; + +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -815,169 +805,143 @@ public: namespace Kokkos { namespace Impl { -template< class FunctorType , class ... Traits > -class ParallelFor< FunctorType , - Kokkos::MDRangePolicy< Traits ... > , - Kokkos::Serial - > -{ -private: +template +class ParallelFor, + Kokkos::Serial> { + private: + typedef Kokkos::MDRangePolicy MDRangePolicy; + typedef typename MDRangePolicy::impl_range_policy Policy; - typedef Kokkos::MDRangePolicy< Traits ... > MDRangePolicy ; - typedef typename MDRangePolicy::impl_range_policy Policy ; + typedef typename Kokkos::Impl::HostIterateTile< + MDRangePolicy, FunctorType, typename MDRangePolicy::work_tag, void> + iterate_type; - typedef typename Kokkos::Impl::HostIterateTile< MDRangePolicy, FunctorType, typename MDRangePolicy::work_tag, void > iterate_type; + const FunctorType m_functor; + const MDRangePolicy m_mdr_policy; + const Policy m_policy; - const FunctorType m_functor ; - const MDRangePolicy m_mdr_policy ; - const Policy m_policy ; - - void - exec() const - { - const typename Policy::member_type e = m_policy.end(); - for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { - iterate_type( m_mdr_policy, m_functor )( i ); - } + void exec() const { + const typename Policy::member_type e = m_policy.end(); + for (typename Policy::member_type i = m_policy.begin(); i < e; ++i) { + iterate_type(m_mdr_policy, m_functor)(i); } + } -public: + public: + inline void execute() const { this->exec(); } - inline - void execute() const - { this->exec(); } - - inline - ParallelFor( const FunctorType & arg_functor - , const MDRangePolicy & arg_policy ) - : m_functor( arg_functor ) - , m_mdr_policy( arg_policy ) - , m_policy( Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1) ) - {} + inline ParallelFor(const FunctorType& arg_functor, + const MDRangePolicy& arg_policy) + : m_functor(arg_functor), + m_mdr_policy(arg_policy), + m_policy(Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1)) {} }; +template +class ParallelReduce, ReducerType, + Kokkos::Serial> { + private: + typedef Kokkos::MDRangePolicy MDRangePolicy; + typedef typename MDRangePolicy::impl_range_policy Policy; -template< class FunctorType , class ReducerType , class ... Traits > -class ParallelReduce< FunctorType - , Kokkos::MDRangePolicy< Traits ... > - , ReducerType - , Kokkos::Serial - > -{ -private: + typedef typename MDRangePolicy::work_tag WorkTag; - typedef Kokkos::MDRangePolicy< Traits ... > MDRangePolicy ; - typedef typename MDRangePolicy::impl_range_policy Policy ; - - typedef typename MDRangePolicy::work_tag WorkTag ; - - typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType> ReducerConditional; + typedef Kokkos::Impl::if_c::value, + FunctorType, ReducerType> + ReducerConditional; typedef typename ReducerConditional::type ReducerTypeFwd; - typedef typename Kokkos::Impl::if_c< std::is_same::value, WorkTag, void>::type WorkTagFwd; + typedef + typename Kokkos::Impl::if_c::value, + WorkTag, void>::type WorkTagFwd; - typedef FunctorAnalysis< FunctorPatternInterface::REDUCE , MDRangePolicy , FunctorType > Analysis ; + typedef FunctorAnalysis + Analysis; - typedef Kokkos::Impl::FunctorValueInit< ReducerTypeFwd , WorkTagFwd > ValueInit ; + typedef Kokkos::Impl::FunctorValueInit ValueInit; - typedef typename Analysis::pointer_type pointer_type ; - typedef typename Analysis::value_type value_type ; - typedef typename Analysis::reference_type reference_type ; + typedef typename Analysis::pointer_type pointer_type; + typedef typename Analysis::value_type value_type; + typedef typename Analysis::reference_type reference_type; + using iterate_type = + typename Kokkos::Impl::HostIterateTile; - using iterate_type = typename Kokkos::Impl::HostIterateTile< MDRangePolicy - , FunctorType - , WorkTag - , reference_type - >; + const FunctorType m_functor; + const MDRangePolicy m_mdr_policy; + const Policy m_policy; + const ReducerType m_reducer; + const pointer_type m_result_ptr; - - const FunctorType m_functor ; - const MDRangePolicy m_mdr_policy ; - const Policy m_policy ; - const ReducerType m_reducer ; - const pointer_type m_result_ptr ; - - inline - void - exec( reference_type update ) const - { - const typename Policy::member_type e = m_policy.end(); - for ( typename Policy::member_type i = m_policy.begin() ; i < e ; ++i ) { - iterate_type( m_mdr_policy, m_functor, update )( i ); - } + inline void exec(reference_type update) const { + const typename Policy::member_type e = m_policy.end(); + for (typename Policy::member_type i = m_policy.begin(); i < e; ++i) { + iterate_type(m_mdr_policy, m_functor, update)(i); } + } -public: + public: + inline void execute() const { + const size_t pool_reduce_size = + Analysis::value_size(ReducerConditional::select(m_functor, m_reducer)); + const size_t team_reduce_size = 0; // Never shrinks + const size_t team_shared_size = 0; // Never shrinks + const size_t thread_local_size = 0; // Never shrinks - inline - void execute() const - { - const size_t pool_reduce_size = - Analysis::value_size( ReducerConditional::select(m_functor , m_reducer) ); - const size_t team_reduce_size = 0 ; // Never shrinks - const size_t team_shared_size = 0 ; // Never shrinks - const size_t thread_local_size = 0 ; // Never shrinks + serial_resize_thread_team_data(pool_reduce_size, team_reduce_size, + team_shared_size, thread_local_size); - serial_resize_thread_team_data( pool_reduce_size - , team_reduce_size - , team_shared_size - , thread_local_size ); + HostThreadTeamData& data = *serial_get_thread_team_data(); - HostThreadTeamData & data = *serial_get_thread_team_data(); - - pointer_type ptr = + pointer_type ptr = m_result_ptr ? m_result_ptr : pointer_type(data.pool_reduce_local()); - reference_type update = - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , ptr ); + reference_type update = + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), ptr); - this-> exec( update ); + this->exec(update); - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >:: - final( ReducerConditional::select(m_functor , m_reducer) , ptr ); - } + Kokkos::Impl::FunctorFinal::final( + ReducerConditional::select(m_functor, m_reducer), ptr); + } - template< class HostViewType > - ParallelReduce( const FunctorType & arg_functor , - const MDRangePolicy & arg_policy , - const HostViewType & arg_result_view , - typename std::enable_if< - Kokkos::is_view< HostViewType >::value && - !Kokkos::is_reducer_type::value - ,void*>::type = NULL) - : m_functor( arg_functor ) - , m_mdr_policy( arg_policy ) - , m_policy( Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1) ) - , m_reducer( InvalidType() ) - , m_result_ptr( arg_result_view.data() ) - { - static_assert( Kokkos::is_view< HostViewType >::value - , "Kokkos::Serial reduce result must be a View" ); + template + ParallelReduce( + const FunctorType& arg_functor, const MDRangePolicy& arg_policy, + const HostViewType& arg_result_view, + typename std::enable_if::value && + !Kokkos::is_reducer_type::value, + void*>::type = NULL) + : m_functor(arg_functor), + m_mdr_policy(arg_policy), + m_policy(Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1)), + m_reducer(InvalidType()), + m_result_ptr(arg_result_view.data()) { + static_assert(Kokkos::is_view::value, + "Kokkos::Serial reduce result must be a View"); - static_assert( std::is_same< typename HostViewType::memory_space , HostSpace >::value - , "Kokkos::Serial reduce result must be a View in HostSpace" ); - } + static_assert( + std::is_same::value, + "Kokkos::Serial reduce result must be a View in HostSpace"); + } - inline - ParallelReduce( const FunctorType & arg_functor - , MDRangePolicy arg_policy - , const ReducerType& reducer ) - : m_functor( arg_functor ) - , m_mdr_policy( arg_policy ) - , m_policy( Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1) ) - , m_reducer( reducer ) - , m_result_ptr( reducer.view().data() ) - { - /*static_assert( std::is_same< typename ViewType::memory_space - , Kokkos::HostSpace >::value - , "Reduction result on Kokkos::OpenMP must be a Kokkos::View in HostSpace" );*/ - } + inline ParallelReduce(const FunctorType& arg_functor, + MDRangePolicy arg_policy, const ReducerType& reducer) + : m_functor(arg_functor), + m_mdr_policy(arg_policy), + m_policy(Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1)), + m_reducer(reducer), + m_result_ptr(reducer.view().data()) { + /*static_assert( std::is_same< typename ViewType::memory_space + , Kokkos::HostSpace >::value + , "Reduction result on Kokkos::OpenMP must be a Kokkos::View in HostSpace" + );*/ + } }; - - -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ @@ -986,225 +950,193 @@ public: namespace Kokkos { namespace Impl { -template< class FunctorType , class ... Properties > -class ParallelFor< FunctorType - , Kokkos::TeamPolicy< Properties ... > - , Kokkos::Serial - > -{ -private: - +template +class ParallelFor, + Kokkos::Serial> { + private: enum { TEAM_REDUCE_SIZE = 512 }; - typedef TeamPolicyInternal< Kokkos::Serial , Properties ...> Policy ; - typedef typename Policy::member_type Member ; + typedef TeamPolicyInternal Policy; + typedef typename Policy::member_type Member; - const FunctorType m_functor ; - const int m_league ; - const int m_shared ; + const FunctorType m_functor; + const int m_league; + const int m_shared; - template< class TagType > - inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec( HostThreadTeamData & data ) const - { - for ( int ileague = 0 ; ileague < m_league ; ++ileague ) { - m_functor( Member(data,ileague,m_league) ); - } + template + inline typename std::enable_if::value>::type exec( + HostThreadTeamData& data) const { + for (int ileague = 0; ileague < m_league; ++ileague) { + m_functor(Member(data, ileague, m_league)); } - - template< class TagType > - inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec( HostThreadTeamData & data ) const - { - const TagType t{} ; - for ( int ileague = 0 ; ileague < m_league ; ++ileague ) { - m_functor( t , Member(data,ileague,m_league) ); - } - } - -public: - - inline - void execute() const - { - const size_t pool_reduce_size = 0 ; // Never shrinks - const size_t team_reduce_size = TEAM_REDUCE_SIZE ; - const size_t team_shared_size = m_shared ; - const size_t thread_local_size = 0 ; // Never shrinks - - serial_resize_thread_team_data( pool_reduce_size - , team_reduce_size - , team_shared_size - , thread_local_size ); - - HostThreadTeamData & data = *serial_get_thread_team_data(); - - this->template exec< typename Policy::work_tag >( data ); - } - - ParallelFor( const FunctorType & arg_functor - , const Policy & arg_policy ) - : m_functor( arg_functor ) - , m_league( arg_policy.league_size() ) - , m_shared( arg_policy.scratch_size(0) + - arg_policy.scratch_size(1) + - FunctorTeamShmemSize< FunctorType >::value( arg_functor , 1 ) ) - { } -}; - -/*--------------------------------------------------------------------------*/ - -template< class FunctorType , class ReducerType , class ... Properties > -class ParallelReduce< FunctorType - , Kokkos::TeamPolicy< Properties ... > - , ReducerType - , Kokkos::Serial - > -{ -private: - - enum { TEAM_REDUCE_SIZE = 512 }; - - typedef TeamPolicyInternal< Kokkos::Serial, Properties ... > Policy ; - - typedef FunctorAnalysis< FunctorPatternInterface::REDUCE , Policy , FunctorType > Analysis ; - - typedef typename Policy::member_type Member ; - typedef typename Policy::work_tag WorkTag ; - - typedef Kokkos::Impl::if_c< std::is_same::value, FunctorType, ReducerType> ReducerConditional; - typedef typename ReducerConditional::type ReducerTypeFwd; - typedef typename Kokkos::Impl::if_c< std::is_same::value, WorkTag, void>::type WorkTagFwd; - - typedef Kokkos::Impl::FunctorValueInit< ReducerTypeFwd , WorkTagFwd > ValueInit ; - - typedef typename Analysis::pointer_type pointer_type ; - typedef typename Analysis::reference_type reference_type ; - - const FunctorType m_functor ; - const int m_league ; - const ReducerType m_reducer ; - pointer_type m_result_ptr ; - const int m_shared ; - - template< class TagType > - inline - typename std::enable_if< std::is_same< TagType , void >::value >::type - exec( HostThreadTeamData & data , reference_type update ) const - { - for ( int ileague = 0 ; ileague < m_league ; ++ileague ) { - m_functor( Member(data,ileague,m_league) , update ); - } - } - - template< class TagType > - inline - typename std::enable_if< ! std::is_same< TagType , void >::value >::type - exec( HostThreadTeamData & data , reference_type update ) const - { - const TagType t{} ; - - for ( int ileague = 0 ; ileague < m_league ; ++ileague ) { - m_functor( t , Member(data,ileague,m_league) , update ); - } - } - -public: - - inline - void execute() const - { - const size_t pool_reduce_size = - Analysis::value_size( ReducerConditional::select(m_functor, m_reducer)); - - const size_t team_reduce_size = TEAM_REDUCE_SIZE ; - const size_t team_shared_size = m_shared ; - const size_t thread_local_size = 0 ; // Never shrinks - - serial_resize_thread_team_data( pool_reduce_size - , team_reduce_size - , team_shared_size - , thread_local_size ); - - - HostThreadTeamData & data = *serial_get_thread_team_data(); - - pointer_type ptr = - m_result_ptr ? m_result_ptr : pointer_type(data.pool_reduce_local()); - - reference_type update = - ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , ptr ); - - this-> template exec< WorkTag >( data , update ); - - Kokkos::Impl::FunctorFinal< ReducerTypeFwd , WorkTagFwd >:: - final( ReducerConditional::select(m_functor , m_reducer) , ptr ); - } - - template< class ViewType > - ParallelReduce( const FunctorType & arg_functor - , const Policy & arg_policy - , const ViewType & arg_result , - typename std::enable_if< - Kokkos::is_view< ViewType >::value && - !Kokkos::is_reducer_type::value - ,void*>::type = NULL) - : m_functor( arg_functor ) - , m_league( arg_policy.league_size() ) - , m_reducer( InvalidType() ) - , m_result_ptr( arg_result.data() ) - , m_shared( arg_policy.scratch_size(0) + - arg_policy.scratch_size(1) + - FunctorTeamShmemSize< FunctorType >::value( m_functor , 1 ) ) - { - static_assert( Kokkos::is_view< ViewType >::value - , "Reduction result on Kokkos::Serial must be a Kokkos::View" ); - - static_assert( std::is_same< typename ViewType::memory_space - , Kokkos::HostSpace >::value - , "Reduction result on Kokkos::Serial must be a Kokkos::View in HostSpace" ); - } - - inline - ParallelReduce( const FunctorType & arg_functor - , Policy arg_policy - , const ReducerType& reducer ) - : m_functor( arg_functor ) - , m_league( arg_policy.league_size() ) - , m_reducer( reducer ) - , m_result_ptr( reducer.view().data() ) - , m_shared( arg_policy.scratch_size(0) + - arg_policy.scratch_size(1) + - FunctorTeamShmemSize< FunctorType >::value( arg_functor , 1 ) ) - { - /*static_assert( std::is_same< typename ViewType::memory_space - , Kokkos::HostSpace >::value - , "Reduction result on Kokkos::OpenMP must be a Kokkos::View in HostSpace" );*/ } + template + inline typename std::enable_if::value>::type + exec(HostThreadTeamData& data) const { + const TagType t{}; + for (int ileague = 0; ileague < m_league; ++ileague) { + m_functor(t, Member(data, ileague, m_league)); + } + } + + public: + inline void execute() const { + const size_t pool_reduce_size = 0; // Never shrinks + const size_t team_reduce_size = TEAM_REDUCE_SIZE; + const size_t team_shared_size = m_shared; + const size_t thread_local_size = 0; // Never shrinks + + serial_resize_thread_team_data(pool_reduce_size, team_reduce_size, + team_shared_size, thread_local_size); + + HostThreadTeamData& data = *serial_get_thread_team_data(); + + this->template exec(data); + } + + ParallelFor(const FunctorType& arg_functor, const Policy& arg_policy) + : m_functor(arg_functor), + m_league(arg_policy.league_size()), + m_shared(arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + + FunctorTeamShmemSize::value(arg_functor, 1)) {} }; -} // namespace Impl -} // namespace Kokkos +/*--------------------------------------------------------------------------*/ + +template +class ParallelReduce, + ReducerType, Kokkos::Serial> { + private: + enum { TEAM_REDUCE_SIZE = 512 }; + + typedef TeamPolicyInternal Policy; + + typedef FunctorAnalysis + Analysis; + + typedef typename Policy::member_type Member; + typedef typename Policy::work_tag WorkTag; + + typedef Kokkos::Impl::if_c::value, + FunctorType, ReducerType> + ReducerConditional; + typedef typename ReducerConditional::type ReducerTypeFwd; + typedef + typename Kokkos::Impl::if_c::value, + WorkTag, void>::type WorkTagFwd; + + typedef Kokkos::Impl::FunctorValueInit ValueInit; + + typedef typename Analysis::pointer_type pointer_type; + typedef typename Analysis::reference_type reference_type; + + const FunctorType m_functor; + const int m_league; + const ReducerType m_reducer; + pointer_type m_result_ptr; + const int m_shared; + + template + inline typename std::enable_if::value>::type exec( + HostThreadTeamData& data, reference_type update) const { + for (int ileague = 0; ileague < m_league; ++ileague) { + m_functor(Member(data, ileague, m_league), update); + } + } + + template + inline typename std::enable_if::value>::type + exec(HostThreadTeamData& data, reference_type update) const { + const TagType t{}; + + for (int ileague = 0; ileague < m_league; ++ileague) { + m_functor(t, Member(data, ileague, m_league), update); + } + } + + public: + inline void execute() const { + const size_t pool_reduce_size = + Analysis::value_size(ReducerConditional::select(m_functor, m_reducer)); + + const size_t team_reduce_size = TEAM_REDUCE_SIZE; + const size_t team_shared_size = m_shared; + const size_t thread_local_size = 0; // Never shrinks + + serial_resize_thread_team_data(pool_reduce_size, team_reduce_size, + team_shared_size, thread_local_size); + + HostThreadTeamData& data = *serial_get_thread_team_data(); + + pointer_type ptr = + m_result_ptr ? m_result_ptr : pointer_type(data.pool_reduce_local()); + + reference_type update = + ValueInit::init(ReducerConditional::select(m_functor, m_reducer), ptr); + + this->template exec(data, update); + + Kokkos::Impl::FunctorFinal::final( + ReducerConditional::select(m_functor, m_reducer), ptr); + } + + template + ParallelReduce( + const FunctorType& arg_functor, const Policy& arg_policy, + const ViewType& arg_result, + typename std::enable_if::value && + !Kokkos::is_reducer_type::value, + void*>::type = NULL) + : m_functor(arg_functor), + m_league(arg_policy.league_size()), + m_reducer(InvalidType()), + m_result_ptr(arg_result.data()), + m_shared(arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + + FunctorTeamShmemSize::value(m_functor, 1)) { + static_assert(Kokkos::is_view::value, + "Reduction result on Kokkos::Serial must be a Kokkos::View"); + + static_assert( + std::is_same::value, + "Reduction result on Kokkos::Serial must be a Kokkos::View in " + "HostSpace"); + } + + inline ParallelReduce(const FunctorType& arg_functor, Policy arg_policy, + const ReducerType& reducer) + : m_functor(arg_functor), + m_league(arg_policy.league_size()), + m_reducer(reducer), + m_result_ptr(reducer.view().data()), + m_shared(arg_policy.scratch_size(0) + arg_policy.scratch_size(1) + + FunctorTeamShmemSize::value(arg_functor, 1)) { + /*static_assert( std::is_same< typename ViewType::memory_space + , Kokkos::HostSpace >::value + , "Reduction result on Kokkos::OpenMP must be a Kokkos::View in HostSpace" + );*/ + } +}; + +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ -namespace Kokkos { namespace Experimental { +namespace Kokkos { +namespace Experimental { -template<> -class UniqueToken< Serial, UniqueTokenScope::Instance> -{ -public: +template <> +class UniqueToken { + public: using execution_space = Serial; using size_type = int; /// \brief create object size for concurrency on the given instance /// /// This object should not be shared between instances - UniqueToken( execution_space const& = execution_space() ) noexcept {} + UniqueToken(execution_space const& = execution_space()) noexcept {} /// \brief upper bound for acquired values, i.e. 0 <= value < size() KOKKOS_INLINE_FUNCTION @@ -1212,24 +1144,23 @@ public: /// \brief acquire value such that 0 <= value < size() KOKKOS_INLINE_FUNCTION - int acquire() const noexcept { return 0; } + int acquire() const noexcept { return 0; } /// \brief release a value acquired by generate KOKKOS_INLINE_FUNCTION - void release( int ) const noexcept {} + void release(int) const noexcept {} }; -template<> -class UniqueToken< Serial, UniqueTokenScope::Global> -{ -public: +template <> +class UniqueToken { + public: using execution_space = Serial; using size_type = int; /// \brief create object size for concurrency on the given instance /// /// This object should not be shared between instances - UniqueToken( execution_space const& = execution_space() ) noexcept {} + UniqueToken(execution_space const& = execution_space()) noexcept {} /// \brief upper bound for acquired values, i.e. 0 <= value < size() KOKKOS_INLINE_FUNCTION @@ -1237,17 +1168,17 @@ public: /// \brief acquire value such that 0 <= value < size() KOKKOS_INLINE_FUNCTION - int acquire() const noexcept { return 0; } + int acquire() const noexcept { return 0; } /// \brief release a value acquired by generate KOKKOS_INLINE_FUNCTION - void release( int ) const noexcept {} + void release(int) const noexcept {} }; -}} // namespace Kokkos::Experimental +} // namespace Experimental +} // namespace Kokkos #include -#endif // defined( KOKKOS_ENABLE_SERIAL ) -#endif /* #define KOKKOS_SERIAL_HPP */ - +#endif // defined( KOKKOS_ENABLE_SERIAL ) +#endif /* #define KOKKOS_SERIAL_HPP */ diff --git a/lib/kokkos/core/src/Kokkos_TaskPolicy.hpp b/lib/kokkos/core/src/Kokkos_TaskPolicy.hpp index 00bceec2b5..91e079a0e7 100644 --- a/lib/kokkos/core/src/Kokkos_TaskPolicy.hpp +++ b/lib/kokkos/core/src/Kokkos_TaskPolicy.hpp @@ -1,13 +1,14 @@ /* //@HEADER // ************************************************************************ -// -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation -// -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). +// +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -36,7 +37,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Christian R. Trott (crtrott@sandia.gov) -// +// // ************************************************************************ //@HEADER */ @@ -44,4 +45,3 @@ // For backward compatibility: #include - diff --git a/lib/kokkos/core/src/Kokkos_TaskScheduler.hpp b/lib/kokkos/core/src/Kokkos_TaskScheduler.hpp index 1c3d58af08..4a78d6aca1 100644 --- a/lib/kokkos/core/src/Kokkos_TaskScheduler.hpp +++ b/lib/kokkos/core/src/Kokkos_TaskScheduler.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -47,7 +48,7 @@ //---------------------------------------------------------------------------- #include -#if defined( KOKKOS_ENABLE_TASKDAG ) +#if defined(KOKKOS_ENABLE_TASKDAG) #include #include @@ -74,36 +75,33 @@ namespace Impl { template class TaskExec; -} // end namespace Impl +} // end namespace Impl - -template -class BasicTaskScheduler : public Impl::TaskSchedulerBase -{ -public: - - using scheduler_type = BasicTaskScheduler; - using execution_space = ExecSpace; - using queue_type = QueueType; - using memory_space = typename queue_type::memory_space; - using memory_pool = typename queue_type::memory_pool; - using specialization = Impl::TaskQueueSpecialization; - using member_type = typename specialization::member_type; +template +class BasicTaskScheduler : public Impl::TaskSchedulerBase { + public: + using scheduler_type = BasicTaskScheduler; + using execution_space = ExecSpace; + using queue_type = QueueType; + using memory_space = typename queue_type::memory_space; + using memory_pool = typename queue_type::memory_pool; + using specialization = Impl::TaskQueueSpecialization; + using member_type = typename specialization::member_type; using team_scheduler_type = BasicTaskScheduler; template - using runnable_task_type = Impl::Task; + using runnable_task_type = + Impl::Task; template using future_type = Kokkos::BasicFuture; template using future_type_for_functor = future_type; -private: - - using track_type = Kokkos::Impl::SharedAllocationTracker ; + private: + using track_type = Kokkos::Impl::SharedAllocationTracker; using task_base = Impl::TaskBase; track_type m_track; - queue_type * m_queue; + queue_type* m_queue; //---------------------------------------- @@ -121,17 +119,12 @@ private: //---------------------------------------- KOKKOS_INLINE_FUNCTION - BasicTaskScheduler( - track_type arg_track, - queue_type* arg_queue - ) - : m_track(std::move(arg_track)), - m_queue(std::move(arg_queue)) - { } + BasicTaskScheduler(track_type arg_track, queue_type* arg_queue) + : m_track(std::move(arg_track)), m_queue(std::move(arg_queue)) {} KOKKOS_INLINE_FUNCTION team_scheduler_type get_team_scheduler(int team_rank) const { - return { m_track, &m_queue->get_team_queue(team_rank) }; + return {m_track, &m_queue->get_team_queue(team_rank)}; } //---------------------------------------- @@ -140,25 +133,23 @@ private: static constexpr task_base* _get_task_ptr(std::nullptr_t) { return nullptr; } template - KOKKOS_INLINE_FUNCTION - static constexpr task_base* _get_task_ptr(future_type&& f) - { + KOKKOS_INLINE_FUNCTION static constexpr task_base* _get_task_ptr( + future_type&& f) { return f.m_task; } - template< int TaskEnum , typename DepTaskType , typename FunctorType > + template KOKKOS_FUNCTION - Kokkos::BasicFuture - _spawn_impl( - DepTaskType* arg_predecessor_task, - TaskPriority arg_priority, - typename task_base::function_type arg_function, - typename task_base::destroy_type arg_destroy, - FunctorType&& arg_functor - ) - { - using functor_future_type = future_type_for_functor::type>; - using task_type = Impl::Task; + Kokkos::BasicFuture + _spawn_impl(DepTaskType* arg_predecessor_task, TaskPriority arg_priority, + typename task_base::function_type arg_function, + typename task_base::destroy_type arg_destroy, + FunctorType&& arg_functor) { + using functor_future_type = + future_type_for_functor::type>; + using task_type = + Impl::Task; //---------------------------------------- // Give single-thread back-ends an opportunity to clear @@ -169,25 +160,25 @@ private: //---------------------------------------- - functor_future_type f ; + functor_future_type f; // Allocate task from memory pool const size_t alloc_size = - m_queue->template spawn_allocation_size< FunctorType >(); + m_queue->template spawn_allocation_size(); void* task_storage = m_queue->allocate(alloc_size); if (task_storage) { - // Placement new construction // Reference count starts at two: // +1 for the matching decrement when task is complete // +1 for the future - f.m_task = new (task_storage) task_type( std::forward(arg_functor) ); + f.m_task = + new (task_storage) task_type(std::forward(arg_functor)); - f.m_task->m_apply = arg_function; - //f.m_task->m_destroy = arg_destroy; + f.m_task->m_apply = arg_function; + // f.m_task->m_destroy = arg_destroy; f.m_task->m_queue = m_queue; f.m_task->m_next = arg_predecessor_task; f.m_task->m_ref_count = 2; @@ -202,81 +193,70 @@ private: // reference count does not need to be incremented for // the assignment. - m_queue->schedule_runnable( f.m_task ); + m_queue->schedule_runnable(f.m_task); // This task may be updated or executed at any moment, // even during the call to 'schedule'. } return f; - } -public: - - + public: KOKKOS_INLINE_FUNCTION BasicTaskScheduler() : m_track(), m_queue(0) {} KOKKOS_INLINE_FUNCTION - BasicTaskScheduler( BasicTaskScheduler && rhs ) noexcept - : m_track(rhs.m_track), // probably should be a move, but this is deprecated code anyway - m_queue(std::move(rhs.m_queue)) - { } + BasicTaskScheduler(BasicTaskScheduler&& rhs) noexcept + : m_track(rhs.m_track), // probably should be a move, but this is + // deprecated code anyway + m_queue(std::move(rhs.m_queue)) {} KOKKOS_INLINE_FUNCTION - BasicTaskScheduler( BasicTaskScheduler const & rhs ) - : m_track(rhs.m_track), - m_queue(rhs.m_queue) - { } + BasicTaskScheduler(BasicTaskScheduler const& rhs) + : m_track(rhs.m_track), m_queue(rhs.m_queue) {} KOKKOS_INLINE_FUNCTION - BasicTaskScheduler& operator=(BasicTaskScheduler&& rhs) noexcept - { - m_track = rhs.m_track; // probably should be a move, but this is deprecated code anyway + BasicTaskScheduler& operator=(BasicTaskScheduler&& rhs) noexcept { + m_track = rhs.m_track; // probably should be a move, but this is deprecated + // code anyway m_queue = std::move(rhs.m_queue); return *this; } KOKKOS_INLINE_FUNCTION - BasicTaskScheduler& operator=(BasicTaskScheduler const& rhs) - { + BasicTaskScheduler& operator=(BasicTaskScheduler const& rhs) { m_track = rhs.m_track; m_queue = rhs.m_queue; return *this; } - explicit BasicTaskScheduler(memory_pool const & arg_memory_pool) noexcept - : m_track(), m_queue(0) - { - typedef Kokkos::Impl::SharedAllocationRecord - < memory_space , typename queue_type::Destroy > - record_type ; + explicit BasicTaskScheduler(memory_pool const& arg_memory_pool) noexcept + : m_track(), m_queue(0) { + typedef Kokkos::Impl::SharedAllocationRecord + record_type; - record_type * record = - record_type::allocate( memory_space() - , "TaskQueue" - , sizeof(queue_type) - ); + record_type* record = + record_type::allocate(memory_space(), "TaskQueue", sizeof(queue_type)); - m_queue = new( record->data() ) queue_type( arg_memory_pool ); + m_queue = new (record->data()) queue_type(arg_memory_pool); - record->m_destroy.m_queue = m_queue ; + record->m_destroy.m_queue = m_queue; - m_track.assign_allocated_record_to_uninitialized( record ); - } + m_track.assign_allocated_record_to_uninitialized(record); + } - BasicTaskScheduler( memory_space const & arg_memory_space - , size_t const mempool_capacity - , unsigned const mempool_min_block_size // = 1u << 6 - , unsigned const mempool_max_block_size // = 1u << 10 - , unsigned const mempool_superblock_size // = 1u << 12 - ) - : BasicTaskScheduler( memory_pool( arg_memory_space - , mempool_capacity - , mempool_min_block_size - , mempool_max_block_size - , mempool_superblock_size ) ) - {} + BasicTaskScheduler(memory_space const& arg_memory_space, + size_t const mempool_capacity, + unsigned const mempool_min_block_size // = 1u << 6 + , + unsigned const mempool_max_block_size // = 1u << 10 + , + unsigned const mempool_superblock_size // = 1u << 12 + ) + : BasicTaskScheduler(memory_pool( + arg_memory_space, mempool_capacity, mempool_min_block_size, + mempool_max_block_size, mempool_superblock_size)) {} //---------------------------------------- @@ -287,104 +267,89 @@ public: } KOKKOS_INLINE_FUNCTION - memory_pool * memory() const noexcept - { return m_queue ? &( m_queue->m_memory ) : (memory_pool*) 0 ; } + memory_pool* memory() const noexcept { + return m_queue ? &(m_queue->m_memory) : (memory_pool*)0; + } //---------------------------------------- /**\brief Allocation size for a spawned task */ - template< typename FunctorType > - KOKKOS_FUNCTION - size_t spawn_allocation_size() const - { return m_queue->template spawn_allocation_size< FunctorType >(); } + template + KOKKOS_FUNCTION size_t spawn_allocation_size() const { + return m_queue->template spawn_allocation_size(); + } /**\brief Allocation size for a when_all aggregate */ KOKKOS_FUNCTION - size_t when_all_allocation_size( int narg ) const - { return m_queue->when_all_allocation_size( narg ); } - + size_t when_all_allocation_size(int narg) const { + return m_queue->when_all_allocation_size(narg); + } //---------------------------------------- template - KOKKOS_FUNCTION static - Kokkos::BasicFuture - spawn( - Impl::TaskPolicyWithScheduler&& arg_policy, - typename task_base::function_type arg_function, - typename task_base::destroy_type arg_destroy, - FunctorType&& arg_functor - ) - { - return std::move(arg_policy.scheduler()).template _spawn_impl( - _get_task_ptr(std::move(arg_policy.predecessor())), - arg_policy.priority(), - arg_function, - arg_destroy, - std::forward(arg_functor) - ); + KOKKOS_FUNCTION static Kokkos::BasicFuture + spawn(Impl::TaskPolicyWithScheduler&& + arg_policy, + typename task_base::function_type arg_function, + typename task_base::destroy_type arg_destroy, + FunctorType&& arg_functor) { + return std::move(arg_policy.scheduler()) + .template _spawn_impl( + _get_task_ptr(std::move(arg_policy.predecessor())), + arg_policy.priority(), arg_function, arg_destroy, + std::forward(arg_functor)); } template KOKKOS_FUNCTION - future_type_for_functor::type> - spawn( - Impl::TaskPolicyWithPredecessor&& arg_policy, - FunctorType&& arg_functor - ) - { + future_type_for_functor::type> + spawn( + Impl::TaskPolicyWithPredecessor&& arg_policy, + FunctorType&& arg_functor) { using task_type = runnable_task_type; typename task_type::function_type const ptr = task_type::apply; typename task_type::destroy_type const dtor = task_type::destroy; return _spawn_impl( - _get_task_ptr(std::move(arg_policy).predecessor()), - arg_policy.priority(), - ptr, dtor, - std::forward(arg_functor) - ); + _get_task_ptr(std::move(arg_policy).predecessor()), + arg_policy.priority(), ptr, dtor, + std::forward(arg_functor)); } - template - KOKKOS_FUNCTION static - void - respawn( - FunctorType* arg_self, - BasicFuture const & arg_dependence, - TaskPriority const & arg_priority - ) { + template + KOKKOS_FUNCTION static void respawn( + FunctorType* arg_self, + BasicFuture const& arg_dependence, + TaskPriority const& arg_priority) { // Precondition: task is in Executing state - using value_type = typename FunctorType::value_type ; - using task_type = Impl::Task; + using value_type = typename FunctorType::value_type; + using task_type = Impl::Task; - task_type * const task = static_cast< task_type * >( arg_self ); + task_type* const task = static_cast(arg_self); task->m_priority = static_cast(arg_priority); - task->add_dependence( arg_dependence.m_task ); + task->add_dependence(arg_dependence.m_task); // Postcondition: task is in Executing-Respawn state } - template< typename FunctorType > - KOKKOS_FUNCTION static - void - respawn( - FunctorType* arg_self, - BasicTaskScheduler const &, - TaskPriority const & arg_priority - ) - { + template + KOKKOS_FUNCTION static void respawn(FunctorType* arg_self, + BasicTaskScheduler const&, + TaskPriority const& arg_priority) { // Precondition: task is in Executing state using value_type = typename FunctorType::value_type; - using task_type = Impl::Task; + using task_type = Impl::Task; - task_type * const task = static_cast< task_type * >( arg_self ); + task_type* const task = static_cast(arg_self); task->m_priority = static_cast(arg_priority); - task->add_dependence( (task_base*) 0 ); + task->add_dependence((task_base*)0); // Postcondition: task is in Executing-Respawn state } @@ -393,162 +358,153 @@ public: /**\brief Return a future that is complete * when all input futures are complete. */ - template - KOKKOS_FUNCTION - BasicFuture< void, scheduler_type > - when_all(BasicFuture const arg[], int narg) - { - - future_type f ; - - if ( narg ) { + template + KOKKOS_FUNCTION BasicFuture when_all( + BasicFuture const arg[], int narg) { + future_type f; + if (narg) { queue_type* q = m_queue; - //BasicTaskScheduler const* scheduler_ptr = nullptr; + // BasicTaskScheduler const* scheduler_ptr = nullptr; - for ( int i = 0 ; i < narg ; ++i ) { - task_base * const t = arg[i].m_task ; - if ( nullptr != t ) { + for (int i = 0; i < narg; ++i) { + task_base* const t = arg[i].m_task; + if (nullptr != t) { // Increment reference count to track subsequent assignment. - Kokkos::atomic_increment( &(t->m_ref_count) ); - if(q != static_cast< queue_type const* >(t->m_queue)) { - Kokkos::abort("Kokkos when_all Futures must be in the same scheduler" ); + Kokkos::atomic_increment(&(t->m_ref_count)); + if (q != static_cast(t->m_queue)) { + Kokkos::abort( + "Kokkos when_all Futures must be in the same scheduler"); } } } - if ( q != 0 ) { // this should probably handle the queue == 0 case, but this is deprecated code anyway + if (q != 0) { // this should probably handle the queue == 0 case, but + // this is deprecated code anyway - size_t const alloc_size = q->when_all_allocation_size( narg ); + size_t const alloc_size = q->when_all_allocation_size(narg); - f.m_task = - reinterpret_cast< task_base * >( q->allocate( alloc_size ) ); - //f.m_scheduler = *scheduler_ptr; - - if ( f.m_task ) { + f.m_task = reinterpret_cast(q->allocate(alloc_size)); + // f.m_scheduler = *scheduler_ptr; + if (f.m_task) { // Reference count starts at two: // +1 to match decrement when task completes // +1 for the future - new( f.m_task ) task_base(); + new (f.m_task) task_base(); - f.m_task->m_queue = q; - f.m_task->m_ref_count = 2 ; + f.m_task->m_queue = q; + f.m_task->m_ref_count = 2; f.m_task->m_alloc_size = static_cast(alloc_size); - f.m_task->m_dep_count = narg ; - f.m_task->m_task_type = task_base::Aggregate ; + f.m_task->m_dep_count = narg; + f.m_task->m_task_type = task_base::Aggregate; // Assign dependences, reference counts were already incremented - task_base * volatile * const dep = - f.m_task->aggregate_dependences(); + task_base* volatile* const dep = f.m_task->aggregate_dependences(); - for ( int i = 0 ; i < narg ; ++i ) { dep[i] = arg[i].m_task ; } + for (int i = 0; i < narg; ++i) { + dep[i] = arg[i].m_task; + } Kokkos::memory_fence(); - q->schedule_aggregate( f.m_task ); + q->schedule_aggregate(f.m_task); // this when_all may be processed at any moment } } } - return f ; + return f; } - template < class F > - KOKKOS_FUNCTION - BasicFuture< void, scheduler_type > - when_all( int narg , F const func ) - { - using input_type = decltype( func(0) ); + template + KOKKOS_FUNCTION BasicFuture when_all(int narg, + F const func) { + using input_type = decltype(func(0)); - static_assert( is_future< input_type >::value - , "Functor must return a Kokkos::Future" ); + static_assert(is_future::value, + "Functor must return a Kokkos::Future"); - future_type f ; + future_type f; - if ( 0 == narg ) return f ; + if (0 == narg) return f; - size_t const alloc_size = m_queue->when_all_allocation_size( narg ); + size_t const alloc_size = m_queue->when_all_allocation_size(narg); - f.m_task = - reinterpret_cast< task_base * >( m_queue->allocate( alloc_size ) ); + f.m_task = reinterpret_cast(m_queue->allocate(alloc_size)); - if ( f.m_task ) { + if (f.m_task) { + // Reference count starts at two: + // +1 to match decrement when task completes + // +1 for the future - // Reference count starts at two: - // +1 to match decrement when task completes - // +1 for the future + new (f.m_task) task_base(); + // f.m_scheduler = *this; - new( f.m_task ) task_base(); - //f.m_scheduler = *this; + // f.m_task->m_scheduler = &f.m_scheduler; + f.m_task->m_queue = m_queue; + f.m_task->m_ref_count = 2; + f.m_task->m_alloc_size = static_cast(alloc_size); + f.m_task->m_dep_count = narg; + f.m_task->m_task_type = task_base::Aggregate; + // f.m_task->m_apply = nullptr; + // f.m_task->m_destroy = nullptr; - //f.m_task->m_scheduler = &f.m_scheduler; - f.m_task->m_queue = m_queue; - f.m_task->m_ref_count = 2 ; - f.m_task->m_alloc_size = static_cast(alloc_size); - f.m_task->m_dep_count = narg ; - f.m_task->m_task_type = task_base::Aggregate ; - //f.m_task->m_apply = nullptr; - //f.m_task->m_destroy = nullptr; + // Assign dependences, reference counts were already incremented - // Assign dependences, reference counts were already incremented + task_base* volatile* const dep = f.m_task->aggregate_dependences(); - task_base * volatile * const dep = - f.m_task->aggregate_dependences(); - - for ( int i = 0 ; i < narg ; ++i ) { - const input_type arg_f = func(i); - if ( 0 != arg_f.m_task ) { - - // Not scheduled, so task scheduler is not yet set - //if ( m_queue != static_cast< BasicTaskScheduler const * >( arg_f.m_task->m_scheduler )->m_queue ) { - // Kokkos::abort("Kokkos when_all Futures must be in the same scheduler" ); - //} - // Increment reference count to track subsequent assignment. - Kokkos::atomic_increment( &(arg_f.m_task->m_ref_count) ); - dep[i] = arg_f.m_task ; - } + for (int i = 0; i < narg; ++i) { + const input_type arg_f = func(i); + if (0 != arg_f.m_task) { + // Not scheduled, so task scheduler is not yet set + // if ( m_queue != static_cast< BasicTaskScheduler const * >( + // arg_f.m_task->m_scheduler )->m_queue ) { + // Kokkos::abort("Kokkos when_all Futures must be in the same + // scheduler" ); + //} + // Increment reference count to track subsequent assignment. + Kokkos::atomic_increment(&(arg_f.m_task->m_ref_count)); + dep[i] = arg_f.m_task; } - - Kokkos::memory_fence(); - - m_queue->schedule_aggregate( f.m_task ); - // this when_all may be processed at any moment } - return f ; + + Kokkos::memory_fence(); + + m_queue->schedule_aggregate(f.m_task); + // this when_all may be processed at any moment } + return f; + } //---------------------------------------- KOKKOS_INLINE_FUNCTION - int allocation_capacity() const noexcept - { return m_queue->m_memory.capacity(); } + int allocation_capacity() const noexcept { + return m_queue->m_memory.capacity(); + } KOKKOS_INLINE_FUNCTION - int allocated_task_count() const noexcept - { return m_queue->m_count_alloc ; } + int allocated_task_count() const noexcept { return m_queue->m_count_alloc; } KOKKOS_INLINE_FUNCTION - int allocated_task_count_max() const noexcept - { return m_queue->m_max_alloc ; } + int allocated_task_count_max() const noexcept { return m_queue->m_max_alloc; } KOKKOS_INLINE_FUNCTION - long allocated_task_count_accum() const noexcept - { return m_queue->m_accum_alloc ; } + long allocated_task_count_accum() const noexcept { + return m_queue->m_accum_alloc; + } //---------------------------------------- - template - friend - void wait(Kokkos::BasicTaskScheduler const&); - + template + friend void wait(Kokkos::BasicTaskScheduler const&); }; -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -559,121 +515,77 @@ namespace Kokkos { // Construct a TaskTeam execution policy template -Impl::TaskPolicyWithPredecessor< - Impl::TaskType::TaskTeam, - Kokkos::BasicFuture -> -KOKKOS_INLINE_FUNCTION -TaskTeam( - Kokkos::BasicFuture arg_future, - TaskPriority arg_priority = TaskPriority::Regular -) -{ - return { std::move(arg_future), arg_priority }; +Impl::TaskPolicyWithPredecessor > + KOKKOS_INLINE_FUNCTION + TaskTeam(Kokkos::BasicFuture arg_future, + TaskPriority arg_priority = TaskPriority::Regular) { + return {std::move(arg_future), arg_priority}; } template -Impl::TaskPolicyWithScheduler< - Impl::TaskType::TaskTeam, Scheduler -> -KOKKOS_INLINE_FUNCTION -TaskTeam( - Scheduler arg_scheduler, - typename std::enable_if< - Kokkos::is_scheduler::value, - TaskPriority - >::type arg_priority = TaskPriority::Regular -) -{ - return { std::move(arg_scheduler), arg_priority }; +Impl::TaskPolicyWithScheduler + KOKKOS_INLINE_FUNCTION + TaskTeam(Scheduler arg_scheduler, + typename std::enable_if::value, + TaskPriority>::type arg_priority = + TaskPriority::Regular) { + return {std::move(arg_scheduler), arg_priority}; } -template< - class Scheduler, - class PredecessorFuture -> -Impl::TaskPolicyWithScheduler< - Kokkos::Impl::TaskType::TaskTeam, - Scheduler, - PredecessorFuture -> -KOKKOS_INLINE_FUNCTION -TaskTeam( - Scheduler arg_scheduler, - PredecessorFuture arg_future, - typename std::enable_if< - Kokkos::is_scheduler::value - && Kokkos::is_future::value, - TaskPriority - >::type arg_priority = TaskPriority::Regular -) -{ - static_assert( - std::is_same::value, - "Can't create a task policy from a scheduler and a future from a different scheduler" - ); +template +Impl::TaskPolicyWithScheduler + KOKKOS_INLINE_FUNCTION TaskTeam( + Scheduler arg_scheduler, PredecessorFuture arg_future, + typename std::enable_if::value && + Kokkos::is_future::value, + TaskPriority>::type arg_priority = + TaskPriority::Regular) { + static_assert(std::is_same::value, + "Can't create a task policy from a scheduler and a future from " + "a different scheduler"); - return { std::move(arg_scheduler), std::move(arg_future), arg_priority }; + return {std::move(arg_scheduler), std::move(arg_future), arg_priority}; } // Construct a TaskSingle execution policy template -Impl::TaskPolicyWithPredecessor< - Impl::TaskType::TaskSingle, - Kokkos::BasicFuture -> -KOKKOS_INLINE_FUNCTION -TaskSingle( - Kokkos::BasicFuture arg_future, - TaskPriority arg_priority = TaskPriority::Regular -) -{ - return { std::move(arg_future), arg_priority }; +Impl::TaskPolicyWithPredecessor > + KOKKOS_INLINE_FUNCTION + TaskSingle(Kokkos::BasicFuture arg_future, + TaskPriority arg_priority = TaskPriority::Regular) { + return {std::move(arg_future), arg_priority}; } template -Impl::TaskPolicyWithScheduler< - Impl::TaskType::TaskSingle, Scheduler -> -KOKKOS_INLINE_FUNCTION -TaskSingle( - Scheduler arg_scheduler, - typename std::enable_if< - Kokkos::is_scheduler::value, - TaskPriority - >::type arg_priority = TaskPriority::Regular -) -{ - return { std::move(arg_scheduler), arg_priority }; +Impl::TaskPolicyWithScheduler + KOKKOS_INLINE_FUNCTION + TaskSingle(Scheduler arg_scheduler, + typename std::enable_if::value, + TaskPriority>::type arg_priority = + TaskPriority::Regular) { + return {std::move(arg_scheduler), arg_priority}; } -template< - class Scheduler, - class PredecessorFuture -> -Impl::TaskPolicyWithScheduler< - Kokkos::Impl::TaskType::TaskSingle, - Scheduler, - PredecessorFuture -> -KOKKOS_INLINE_FUNCTION -TaskSingle( - Scheduler arg_scheduler, - PredecessorFuture arg_future, - typename std::enable_if< - Kokkos::is_scheduler::value - && Kokkos::is_future::value, - TaskPriority - >::type arg_priority = TaskPriority::Regular -) -{ - static_assert( - std::is_same::value, - "Can't create a task policy from a scheduler and a future from a different scheduler" - ); +template +Impl::TaskPolicyWithScheduler + KOKKOS_INLINE_FUNCTION TaskSingle( + Scheduler arg_scheduler, PredecessorFuture arg_future, + typename std::enable_if::value && + Kokkos::is_future::value, + TaskPriority>::type arg_priority = + TaskPriority::Regular) { + static_assert(std::is_same::value, + "Can't create a task policy from a scheduler and a future from " + "a different scheduler"); - return { std::move(arg_scheduler), std::move(arg_future), arg_priority }; + return {std::move(arg_scheduler), std::move(arg_future), arg_priority}; } //---------------------------------------------------------------------------- @@ -684,31 +596,30 @@ TaskSingle( * 2) With scheduler or dependence * 3) High, Normal, or Low priority */ -template -typename Scheduler::template future_type_for_functor::type> -host_spawn( - Impl::TaskPolicyWithScheduler arg_policy, - FunctorType&& arg_functor -) { +template +typename Scheduler::template future_type_for_functor< + typename std::decay::type> +host_spawn(Impl::TaskPolicyWithScheduler + arg_policy, + FunctorType&& arg_functor) { using scheduler_type = Scheduler; using task_type = - typename scheduler_type::template runnable_task_type; + typename scheduler_type::template runnable_task_type; - static_assert( - TaskEnum == Impl::TaskType::TaskTeam || TaskEnum == Impl::TaskType::TaskSingle, - "Kokkos host_spawn requires TaskTeam or TaskSingle" - ); + static_assert(TaskEnum == Impl::TaskType::TaskTeam || + TaskEnum == Impl::TaskType::TaskSingle, + "Kokkos host_spawn requires TaskTeam or TaskSingle"); // May be spawning a Cuda task, must use the specialization // to query on-device function pointer. typename task_type::function_type ptr; typename task_type::destroy_type dtor; - Kokkos::Impl::TaskQueueSpecialization< scheduler_type >:: - template get_function_pointer< task_type >(ptr, dtor); + Kokkos::Impl::TaskQueueSpecialization< + scheduler_type>::template get_function_pointer(ptr, dtor); - return scheduler_type::spawn( - std::move(arg_policy), ptr, dtor, std::forward(arg_functor) - ); + return scheduler_type::spawn(std::move(arg_policy), ptr, dtor, + std::forward(arg_functor)); } /**\brief A task spawns a task with options @@ -717,38 +628,38 @@ host_spawn( * 2) With scheduler or dependence * 3) High, Normal, or Low priority */ -template -typename Scheduler::template future_type_for_functor::type> -KOKKOS_INLINE_FUNCTION -task_spawn( - Impl::TaskPolicyWithScheduler arg_policy, - FunctorType&& arg_functor -) -{ +template +typename Scheduler::template future_type_for_functor< + typename std::decay::type> + KOKKOS_INLINE_FUNCTION + task_spawn(Impl::TaskPolicyWithScheduler + arg_policy, + FunctorType&& arg_functor) { using scheduler_type = Scheduler; using task_type = - typename scheduler_type::template runnable_task_type; + typename scheduler_type::template runnable_task_type; - #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) && \ - defined( KOKKOS_ENABLE_CUDA ) +#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST) && \ + defined(KOKKOS_ENABLE_CUDA) - static_assert( ! std::is_same< Kokkos::Cuda , typename Scheduler::execution_space >::value - , "Error calling Kokkos::task_spawn for Cuda space within Host code" ); + // This doesn't work with clang cuda + // static_assert( + // !std::is_same::value, + // "Error calling Kokkos::task_spawn for Cuda space within Host code"); - #endif +#endif - static_assert( - TaskEnum == Impl::TaskType::TaskTeam || TaskEnum == Impl::TaskType::TaskSingle, - "Kokkos task_spawn requires TaskTeam or TaskSingle" - ); + static_assert(TaskEnum == Impl::TaskType::TaskTeam || + TaskEnum == Impl::TaskType::TaskSingle, + "Kokkos task_spawn requires TaskTeam or TaskSingle"); - typename task_type::function_type const ptr = task_type::apply ; - typename task_type::destroy_type const dtor = task_type::destroy ; + typename task_type::function_type const ptr = task_type::apply; + typename task_type::destroy_type const dtor = task_type::destroy; return scheduler_type::spawn(std::move(arg_policy), ptr, dtor, - std::forward(arg_functor) - ); + std::forward(arg_functor)); } /**\brief A task respawns itself with options @@ -756,29 +667,22 @@ task_spawn( * 1) With scheduler or dependence * 2) High, Normal, or Low priority */ -template< typename FunctorType , typename T > -void -KOKKOS_INLINE_FUNCTION -respawn( FunctorType * arg_self - , T const & arg - , TaskPriority const & arg_priority = TaskPriority::Regular - ) -{ - static_assert( Kokkos::is_future::value || - Kokkos::is_scheduler::value - , "Kokkos respawn argument must be Future or TaskScheduler" ); +template +void KOKKOS_INLINE_FUNCTION +respawn(FunctorType* arg_self, T const& arg, + TaskPriority const& arg_priority = TaskPriority::Regular) { + static_assert(Kokkos::is_future::value || Kokkos::is_scheduler::value, + "Kokkos respawn argument must be Future or TaskScheduler"); - T::scheduler_type::respawn( - arg_self , arg , arg_priority - ); + T::scheduler_type::respawn(arg_self, arg, arg_priority); } //---------------------------------------------------------------------------- -//template -//KOKKOS_INLINE_FUNCTION -//BasicFuture -//when_all(BasicFuture const arg[], int narg) +// template +// KOKKOS_INLINE_FUNCTION +// BasicFuture +// when_all(BasicFuture const arg[], int narg) //{ // return BasicFuture::scheduler_type::when_all(arg, narg); //} @@ -786,16 +690,14 @@ respawn( FunctorType * arg_self //---------------------------------------------------------------------------- // Wait for all runnable tasks to complete -template -inline -void wait(BasicTaskScheduler const& scheduler) -{ +template +inline void wait(BasicTaskScheduler const& scheduler) { using scheduler_type = BasicTaskScheduler; scheduler_type::specialization::execute(scheduler); - //scheduler.m_queue->execute(); + // scheduler.m_queue->execute(); } -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -806,4 +708,3 @@ void wait(BasicTaskScheduler const& scheduler) #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ #endif /* #ifndef KOKKOS_TASKSCHEDULER_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_TaskScheduler_fwd.hpp b/lib/kokkos/core/src/Kokkos_TaskScheduler_fwd.hpp index 79d502c729..c5f880775d 100644 --- a/lib/kokkos/core/src/Kokkos_TaskScheduler_fwd.hpp +++ b/lib/kokkos/core/src/Kokkos_TaskScheduler_fwd.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -47,7 +48,7 @@ //---------------------------------------------------------------------------- #include -#if defined( KOKKOS_ENABLE_TASKDAG ) +#if defined(KOKKOS_ENABLE_TASKDAG) #include //---------------------------------------------------------------------------- @@ -65,22 +66,20 @@ class SimpleTaskScheduler; template class BasicTaskScheduler; -template< typename Space > +template struct is_scheduler : public std::false_type {}; -template -struct is_scheduler> : public std::true_type {}; - -template -struct is_scheduler> : public std::true_type {}; - -enum class TaskPriority : int { - High = 0, - Regular = 1, - Low = 2 +template +struct is_scheduler> : public std::true_type { }; -} // namespace Kokkos +template +struct is_scheduler> : public std::true_type { +}; + +enum class TaskPriority : int { High = 0, Regular = 1, Low = 2 }; + +} // namespace Kokkos //---------------------------------------------------------------------------- @@ -110,140 +109,124 @@ class TaskBase; * : TaskBase< Space , void , void > * { ... }; */ -template< typename Space , typename ResultType , typename FunctorType > +template class Task; class TaskQueueBase; -template< typename Space, typename MemorySpace> +template class TaskQueue; -template< typename ExecSpace, typename MemorySpace> +template class TaskQueueMultiple; -template< - typename ExecSpace, typename MemSpace, typename TaskQueueTraits, - class MemoryPool = Kokkos::MemoryPool> -> +template >> class SingleTaskQueue; -template< typename ExecSpace, typename MemSpace, typename TaskQueueTraits, class MemoryPool> +template class MultipleTaskQueue; struct TaskQueueTraitsLockBased; -template +template struct TaskQueueTraitsChaseLev; -template< typename ResultType > +template struct TaskResult; struct TaskSchedulerBase; template -struct default_tasking_memory_space_for_execution_space -{ +struct default_tasking_memory_space_for_execution_space { using type = typename ExecSpace::memory_space; }; -#if defined( KOKKOS_ENABLE_CUDA ) +#if defined(KOKKOS_ENABLE_CUDA) template <> -struct default_tasking_memory_space_for_execution_space -{ +struct default_tasking_memory_space_for_execution_space { using type = Kokkos::CudaUVMSpace; }; #endif template using default_tasking_memory_space_for_execution_space_t = - typename default_tasking_memory_space_for_execution_space::type; + typename default_tasking_memory_space_for_execution_space::type; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos //---------------------------------------------------------------------------- namespace Kokkos { -template< typename Space > +template using DeprecatedTaskScheduler = BasicTaskScheduler< - Space, - Impl::TaskQueue> ->; + Space, + Impl::TaskQueue< + Space, + Impl::default_tasking_memory_space_for_execution_space_t>>; -template< typename Space > +template using DeprecatedTaskSchedulerMultiple = BasicTaskScheduler< - Space, - Impl::TaskQueueMultiple> ->; + Space, + Impl::TaskQueueMultiple< + Space, + Impl::default_tasking_memory_space_for_execution_space_t>>; -template< typename Space > +template using TaskScheduler = SimpleTaskScheduler< - Space, - Impl::SingleTaskQueue< Space, - Impl::default_tasking_memory_space_for_execution_space_t, - Impl::TaskQueueTraitsLockBased - > ->; + Impl::SingleTaskQueue< + Space, Impl::default_tasking_memory_space_for_execution_space_t, + Impl::TaskQueueTraitsLockBased>>; -template< typename Space > +template using TaskSchedulerMultiple = SimpleTaskScheduler< - Space, - Impl::MultipleTaskQueue< Space, - Impl::default_tasking_memory_space_for_execution_space_t, - Impl::TaskQueueTraitsLockBased, - Kokkos::MemoryPool< - Kokkos::Device< - Space, - Impl::default_tasking_memory_space_for_execution_space_t - > - > - > ->; + Impl::MultipleTaskQueue< + Space, Impl::default_tasking_memory_space_for_execution_space_t, + Impl::TaskQueueTraitsLockBased, + Kokkos::MemoryPool>>>>; -template< typename Space > +template using ChaseLevTaskScheduler = SimpleTaskScheduler< - Space, - Impl::MultipleTaskQueue< Space, - Impl::default_tasking_memory_space_for_execution_space_t, - Impl::TaskQueueTraitsChaseLev<>, - Kokkos::MemoryPool< - Kokkos::Device< - Space, - Impl::default_tasking_memory_space_for_execution_space_t - > - > - > ->; + Impl::MultipleTaskQueue< + Space, Impl::default_tasking_memory_space_for_execution_space_t, + Impl::TaskQueueTraitsChaseLev<>, + Kokkos::MemoryPool>>>>; -template +template void wait(BasicTaskScheduler const&); namespace Impl { -struct TaskSchedulerBase { }; +struct TaskSchedulerBase {}; -class TaskQueueBase { }; +class TaskQueueBase {}; -template -class TaskQueueSpecializationConstrained { }; +template +class TaskQueueSpecializationConstrained {}; template -struct TaskQueueSpecialization : TaskQueueSpecializationConstrained { }; +struct TaskQueueSpecialization : TaskQueueSpecializationConstrained { +}; template struct TaskPolicyData; +} // end namespace Impl -} // end namespace Impl - -} // namespace Kokkos +} // namespace Kokkos //---------------------------------------------------------------------------- #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */ #endif /* #ifndef KOKKOS_TASKSCHEDULER_FWD_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_Threads.hpp b/lib/kokkos/core/src/Kokkos_Threads.hpp index 03dab1acaf..d44042b062 100644 --- a/lib/kokkos/core/src/Kokkos_Threads.hpp +++ b/lib/kokkos/core/src/Kokkos_Threads.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -45,7 +46,7 @@ #define KOKKOS_THREADS_HPP #include -#if defined( KOKKOS_ENABLE_THREADS ) +#if defined(KOKKOS_ENABLE_THREADS) #include @@ -61,9 +62,9 @@ namespace Kokkos { namespace Impl { -class ThreadsExec ; -} // namespace Impl -} // namespace Kokkos +class ThreadsExec; +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ @@ -71,21 +72,20 @@ namespace Kokkos { /** \brief Execution space for a pool of Pthreads or C11 threads on a CPU. */ class Threads { -public: + public: //! \name Type declarations that all Kokkos devices must provide. //@{ //! Tag this class as a kokkos execution space - typedef Threads execution_space ; - typedef Kokkos::HostSpace memory_space ; + typedef Threads execution_space; + typedef Kokkos::HostSpace memory_space; //! This execution space preferred device_type - typedef Kokkos::Device device_type; + typedef Kokkos::Device device_type; - typedef Kokkos::LayoutRight array_layout ; - typedef memory_space::size_type size_type ; - - typedef ScratchMemorySpace< Threads > scratch_memory_space ; + typedef Kokkos::LayoutRight array_layout; + typedef memory_space::size_type size_type; + typedef ScratchMemorySpace scratch_memory_space; //@} /*------------------------------------------------------------------------*/ @@ -97,7 +97,7 @@ public: static int in_parallel(); /// \brief Print configuration information to the given output stream. - static void print_configuration( std::ostream & , const bool detail = false ); + static void print_configuration(std::ostream&, const bool detail = false); /// \brief Wait until all dispatched functors complete. /// @@ -107,11 +107,11 @@ public: /// device have completed. static void impl_static_fence(); - #ifdef KOKKOS_ENABLE_DEPRECATED_CODE +#ifdef KOKKOS_ENABLE_DEPRECATED_CODE static void fence(); - #else +#else void fence() const; - #endif +#endif /** \brief Return the maximum amount of concurrency. */ static int concurrency(); @@ -123,26 +123,28 @@ public: static void finalize(); - static void initialize( unsigned threads_count = 0 , - unsigned use_numa_count = 0 , - unsigned use_cores_per_numa = 0 , - bool allow_asynchronous_threadpool = false ); + static void initialize(unsigned threads_count = 0, + unsigned use_numa_count = 0, + unsigned use_cores_per_numa = 0, + bool allow_asynchronous_threadpool = false); static int is_initialized(); - static Threads & instance( int = 0 ); + static Threads& instance(int = 0); //---------------------------------------- - static int thread_pool_size( int depth = 0 ); -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + static int thread_pool_size(int depth = 0); +#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST) static int thread_pool_rank(); #else - KOKKOS_INLINE_FUNCTION static int thread_pool_rank() { return 0 ; } + KOKKOS_INLINE_FUNCTION static int thread_pool_rank() { return 0; } #endif inline static unsigned max_hardware_threads() { return thread_pool_size(0); } - KOKKOS_INLINE_FUNCTION static unsigned hardware_thread_id() { return thread_pool_rank(); } + KOKKOS_INLINE_FUNCTION static unsigned hardware_thread_id() { + return thread_pool_rank(); + } #else /// \brief Free any resources being consumed by the device. /// @@ -172,26 +174,30 @@ public: * If the 'use_' arguments are not supplied the hwloc is queried * to use all available cores. */ - static void impl_initialize( unsigned threads_count = 0 , - unsigned use_numa_count = 0 , - unsigned use_cores_per_numa = 0 , - bool allow_asynchronous_threadpool = false ); + static void impl_initialize(unsigned threads_count = 0, + unsigned use_numa_count = 0, + unsigned use_cores_per_numa = 0, + bool allow_asynchronous_threadpool = false); static int impl_is_initialized(); - static Threads & impl_instance( int = 0 ); + static Threads& impl_instance(int = 0); //---------------------------------------- - static int impl_thread_pool_size( int depth = 0 ); -#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) + static int impl_thread_pool_size(int depth = 0); +#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST) static int impl_thread_pool_rank(); #else - KOKKOS_INLINE_FUNCTION static int impl_thread_pool_rank() { return 0 ; } + KOKKOS_INLINE_FUNCTION static int impl_thread_pool_rank() { return 0; } #endif - inline static unsigned impl_max_hardware_threads() { return impl_thread_pool_size(0); } - KOKKOS_INLINE_FUNCTION static unsigned impl_hardware_thread_id() { return impl_thread_pool_rank(); } + inline static unsigned impl_max_hardware_threads() { + return impl_thread_pool_size(0); + } + KOKKOS_INLINE_FUNCTION static unsigned impl_hardware_thread_id() { + return impl_thread_pool_rank(); + } #endif static const char* name(); @@ -199,37 +205,31 @@ public: //---------------------------------------- }; -} // namespace Kokkos +} // namespace Kokkos /*--------------------------------------------------------------------------*/ namespace Kokkos { namespace Impl { -template<> -struct MemorySpaceAccess - < Kokkos::Threads::memory_space - , Kokkos::Threads::scratch_memory_space - > -{ +template <> +struct MemorySpaceAccess { enum { assignable = false }; enum { accessible = true }; - enum { deepcopy = false }; + enum { deepcopy = false }; }; -template<> -struct VerifyExecutionCanAccessMemorySpace - < Kokkos::Threads::memory_space - , Kokkos::Threads::scratch_memory_space - > -{ +template <> +struct VerifyExecutionCanAccessMemorySpace< + Kokkos::Threads::memory_space, Kokkos::Threads::scratch_memory_space> { enum { value = true }; - inline static void verify( void ) { } - inline static void verify( const void * ) { } + inline static void verify(void) {} + inline static void verify(const void*) {} }; -} // namespace Impl -} // namespace Kokkos +} // namespace Impl +} // namespace Kokkos /*--------------------------------------------------------------------------*/ @@ -246,4 +246,3 @@ struct VerifyExecutionCanAccessMemorySpace #endif /* #if defined( KOKKOS_ENABLE_THREADS ) */ #endif /* #define KOKKOS_THREADS_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_Timer.hpp b/lib/kokkos/core/src/Kokkos_Timer.hpp index eb869fd1b0..117f097f66 100644 --- a/lib/kokkos/core/src/Kokkos_Timer.hpp +++ b/lib/kokkos/core/src/Kokkos_Timer.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -51,33 +52,27 @@ namespace Kokkos { /** \brief Time since construction */ class Timer { -private: + private: std::chrono::high_resolution_clock::time_point m_old; - Timer( const Timer & ); - Timer & operator = ( const Timer & ); -public: + Timer(const Timer&); + Timer& operator=(const Timer&); - inline - void reset() { - m_old = std::chrono::high_resolution_clock::now(); - } + public: + inline void reset() { m_old = std::chrono::high_resolution_clock::now(); } - inline - ~Timer() {} + inline ~Timer() {} - inline - Timer() { reset(); } + inline Timer() { reset(); } - inline - double seconds() const - { + inline double seconds() const { std::chrono::high_resolution_clock::time_point m_new = std::chrono::high_resolution_clock::now(); - return std::chrono::duration_cast>(m_new - m_old).count(); + return std::chrono::duration_cast>(m_new - + m_old) + .count(); } }; -} // namespace Kokkos +} // namespace Kokkos #endif /* #ifndef KOKKOS_TIMER_HPP */ - diff --git a/lib/kokkos/core/src/Kokkos_UniqueToken.hpp b/lib/kokkos/core/src/Kokkos_UniqueToken.hpp index d89542631d..523ccad948 100644 --- a/lib/kokkos/core/src/Kokkos_UniqueToken.hpp +++ b/lib/kokkos/core/src/Kokkos_UniqueToken.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -46,43 +47,42 @@ #include -namespace Kokkos { namespace Experimental { +namespace Kokkos { +namespace Experimental { -enum class UniqueTokenScope : int -{ - Instance, - Global -}; +enum class UniqueTokenScope : int { Instance, Global }; -/// \brief class to generate unique ids base on the required amount of concurrency +/// \brief class to generate unique ids base on the required amount of +/// concurrency /// /// This object should behave like a ref-counted object, so that when the last /// instance is destroy resources are free if needed -template -class UniqueToken -{ -public: +template +class UniqueToken { + public: using execution_space = ExecutionSpace; using size_type = typename execution_space::size_type; /// \brief create object size for concurrency on the given instance /// /// This object should not be shared between instances - UniqueToken( execution_space const& = execution_space() ); + UniqueToken(execution_space const& = execution_space()); /// \brief upper bound for acquired values, i.e. 0 <= value < size() KOKKOS_INLINE_FUNCTION - size_type size() const ; + size_type size() const; /// \brief acquire value such that 0 <= value < size() KOKKOS_INLINE_FUNCTION - size_type acquire() const ; + size_type acquire() const; /// \brief release a value acquired by generate KOKKOS_INLINE_FUNCTION - void release( size_type ) const ; + void release(size_type) const; }; -}} // namespace Kokkos::Experimental +} // namespace Experimental +} // namespace Kokkos -#endif //KOKKOS_UNIQUE_TOKEN_HPP +#endif // KOKKOS_UNIQUE_TOKEN_HPP diff --git a/lib/kokkos/core/src/Kokkos_Vectorization.hpp b/lib/kokkos/core/src/Kokkos_Vectorization.hpp index f5b6cad4b7..2604538b1c 100644 --- a/lib/kokkos/core/src/Kokkos_Vectorization.hpp +++ b/lib/kokkos/core/src/Kokkos_Vectorization.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -46,9 +47,8 @@ #ifndef KOKKOS_VECTORIZATION_HPP #define KOKKOS_VECTORIZATION_HPP -#if defined( KOKKOS_ENABLE_CUDA ) +#if defined(KOKKOS_ENABLE_CUDA) #include #endif #endif - diff --git a/lib/kokkos/core/src/Kokkos_View.hpp b/lib/kokkos/core/src/Kokkos_View.hpp index 3fe8e6f067..6610bb842b 100644 --- a/lib/kokkos/core/src/Kokkos_View.hpp +++ b/lib/kokkos/core/src/Kokkos_View.hpp @@ -2,10 +2,11 @@ //@HEADER // ************************************************************************ // -// Kokkos v. 2.0 -// Copyright (2014) Sandia Corporation +// Kokkos v. 3.0 +// Copyright (2020) National Technology & Engineering +// Solutions of Sandia, LLC (NTESS). // -// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Redistribution and use in source and binary forms, with or without @@ -23,10 +24,10 @@ // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NTESS OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -64,122 +65,88 @@ namespace Kokkos { namespace Impl { -template< class DataType > -struct ViewArrayAnalysis ; +template +struct ViewArrayAnalysis; -template< class DataType , class ArrayLayout - , typename ValueType = - typename ViewArrayAnalysis< DataType >::non_const_value_type - > -struct ViewDataAnalysis ; +template ::non_const_value_type> +struct ViewDataAnalysis; -template< class , class ... > +template class ViewMapping { - public: + public: enum { is_assignable_data_type = false }; enum { is_assignable = false }; }; - - template -KOKKOS_INLINE_FUNCTION -std::size_t count_valid_integers(const IntType i0, - const IntType i1, - const IntType i2, - const IntType i3, - const IntType i4, - const IntType i5, - const IntType i6, - const IntType i7 ){ - static_assert(std::is_integral::value, "count_valid_integers() must have integer arguments."); - - return ( i0 !=KOKKOS_INVALID_INDEX ) + ( i1 !=KOKKOS_INVALID_INDEX ) + ( i2 !=KOKKOS_INVALID_INDEX ) + - ( i3 !=KOKKOS_INVALID_INDEX ) + ( i4 !=KOKKOS_INVALID_INDEX ) + ( i5 !=KOKKOS_INVALID_INDEX ) + - ( i6 !=KOKKOS_INVALID_INDEX ) + ( i7 !=KOKKOS_INVALID_INDEX ); - +KOKKOS_INLINE_FUNCTION std::size_t count_valid_integers( + const IntType i0, const IntType i1, const IntType i2, const IntType i3, + const IntType i4, const IntType i5, const IntType i6, const IntType i7) { + static_assert(std::is_integral::value, + "count_valid_integers() must have integer arguments."); + return (i0 != KOKKOS_INVALID_INDEX) + (i1 != KOKKOS_INVALID_INDEX) + + (i2 != KOKKOS_INVALID_INDEX) + (i3 != KOKKOS_INVALID_INDEX) + + (i4 != KOKKOS_INVALID_INDEX) + (i5 != KOKKOS_INVALID_INDEX) + + (i6 != KOKKOS_INVALID_INDEX) + (i7 != KOKKOS_INVALID_INDEX); } #ifndef KOKKOS_ENABLE_DEPRECATED_CODE KOKKOS_INLINE_FUNCTION -void runtime_check_rank_device(const size_t dyn_rank, - const bool is_void_spec, - const size_t i0, - const size_t i1, - const size_t i2, - const size_t i3, - const size_t i4, - const size_t i5, - const size_t i6, - const size_t i7 ){ - - if ( is_void_spec ) { - const size_t num_passed_args = count_valid_integers(i0, i1, i2, i3, - i4, i5, i6, i7); - - if ( num_passed_args != dyn_rank && is_void_spec ) { - - Kokkos::abort("Number of arguments passed to Kokkos::View() constructor must match the dynamic rank of the view.") ; +void runtime_check_rank_device(const size_t dyn_rank, const bool is_void_spec, + const size_t i0, const size_t i1, + const size_t i2, const size_t i3, + const size_t i4, const size_t i5, + const size_t i6, const size_t i7) { + if (is_void_spec) { + const size_t num_passed_args = + count_valid_integers(i0, i1, i2, i3, i4, i5, i6, i7); + if (num_passed_args != dyn_rank && is_void_spec) { + Kokkos::abort( + "Number of arguments passed to Kokkos::View() constructor must match " + "the dynamic rank of the view."); } } } #else KOKKOS_INLINE_FUNCTION -void runtime_check_rank_device(const size_t , - const bool , - const size_t , - const size_t , - const size_t , - const size_t , - const size_t , - const size_t , - const size_t , - const size_t ){ - -} +void runtime_check_rank_device(const size_t, const bool, const size_t, + const size_t, const size_t, const size_t, + const size_t, const size_t, const size_t, + const size_t) {} #endif #ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST #ifndef KOKKOS_ENABLE_DEPRECATED_CODE KOKKOS_INLINE_FUNCTION -void runtime_check_rank_host(const size_t dyn_rank, - const bool is_void_spec, - const size_t i0, - const size_t i1, - const size_t i2, - const size_t i3, - const size_t i4, - const size_t i5, - const size_t i6, - const size_t i7, const std::string & label ){ +void runtime_check_rank_host(const size_t dyn_rank, const bool is_void_spec, + const size_t i0, const size_t i1, const size_t i2, + const size_t i3, const size_t i4, const size_t i5, + const size_t i6, const size_t i7, + const std::string& label) { + if (is_void_spec) { + const size_t num_passed_args = + count_valid_integers(i0, i1, i2, i3, i4, i5, i6, i7); - - if ( is_void_spec ) { - const size_t num_passed_args = count_valid_integers(i0, i1, i2, i3, - i4, i5, i6, i7); - - if ( num_passed_args != dyn_rank ) { - - const std::string message = "Constructor for Kokkos View '" + label + "' has mismatched number of arguments. Number of arguments = " - + std::to_string(num_passed_args) + " but dynamic rank = " + std::to_string(dyn_rank) + " \n"; - Kokkos::abort(message.c_str()) ; + if (num_passed_args != dyn_rank) { + const std::string message = + "Constructor for Kokkos View '" + label + + "' has mismatched number of arguments. Number of arguments = " + + std::to_string(num_passed_args) + + " but dynamic rank = " + std::to_string(dyn_rank) + " \n"; + Kokkos::abort(message.c_str()); } } } #else KOKKOS_INLINE_FUNCTION -void runtime_check_rank_host(const size_t , - const bool , - const size_t , - const size_t , - const size_t , - const size_t , - const size_t , - const size_t , - const size_t , - const size_t , const std::string &){} +void runtime_check_rank_host(const size_t, const bool, const size_t, + const size_t, const size_t, const size_t, + const size_t, const size_t, const size_t, + const size_t, const std::string&) {} #endif #endif @@ -189,10 +156,10 @@ void runtime_check_rank_host(const size_t , // Class to provide a uniform type namespace Kokkos { namespace Impl { - template< class ViewType , int Traits = 0 > - struct ViewUniformType; -} +template +struct ViewUniformType; } +} // namespace Kokkos //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -216,183 +183,183 @@ namespace Kokkos { * - View< DataType , MemoryTraits > */ -template< class DataType , class ... Properties > -struct ViewTraits ; +template +struct ViewTraits; -template<> -struct ViewTraits< void > -{ - typedef void execution_space ; - typedef void memory_space ; - typedef void HostMirrorSpace ; - typedef void array_layout ; - typedef void memory_traits ; - typedef void specialize ; +template <> +struct ViewTraits { + typedef void execution_space; + typedef void memory_space; + typedef void HostMirrorSpace; + typedef void array_layout; + typedef void memory_traits; + typedef void specialize; }; -template< class ... Prop > -struct ViewTraits< void , void , Prop ... > -{ +template +struct ViewTraits { // Ignore an extraneous 'void' - typedef typename ViewTraits::execution_space execution_space ; - typedef typename ViewTraits::memory_space memory_space ; - typedef typename ViewTraits::HostMirrorSpace HostMirrorSpace ; - typedef typename ViewTraits::array_layout array_layout ; - typedef typename ViewTraits::memory_traits memory_traits ; - typedef typename ViewTraits::specialize specialize ; + typedef typename ViewTraits::execution_space execution_space; + typedef typename ViewTraits::memory_space memory_space; + typedef typename ViewTraits::HostMirrorSpace HostMirrorSpace; + typedef typename ViewTraits::array_layout array_layout; + typedef typename ViewTraits::memory_traits memory_traits; + typedef typename ViewTraits::specialize specialize; }; -template< class ArrayLayout , class ... Prop > -struct ViewTraits< typename std::enable_if< Kokkos::Impl::is_array_layout::value >::type , ArrayLayout , Prop ... > -{ +template +struct ViewTraits::value>::type, + ArrayLayout, Prop...> { // Specify layout, keep subsequent space and memory traits arguments - typedef typename ViewTraits::execution_space execution_space ; - typedef typename ViewTraits::memory_space memory_space ; - typedef typename ViewTraits::HostMirrorSpace HostMirrorSpace ; - typedef ArrayLayout array_layout ; - typedef typename ViewTraits::memory_traits memory_traits ; - typedef typename ViewTraits::specialize specialize ; + typedef typename ViewTraits::execution_space execution_space; + typedef typename ViewTraits::memory_space memory_space; + typedef typename ViewTraits::HostMirrorSpace HostMirrorSpace; + typedef ArrayLayout array_layout; + typedef typename ViewTraits::memory_traits memory_traits; + typedef typename ViewTraits::specialize specialize; }; -template< class Space , class ... Prop > -struct ViewTraits< typename std::enable_if< Kokkos::Impl::is_space::value >::type , Space , Prop ... > -{ +template +struct ViewTraits< + typename std::enable_if::value>::type, Space, + Prop...> { // Specify Space, memory traits should be the only subsequent argument. - static_assert( std::is_same< typename ViewTraits::execution_space , void >::value && - std::is_same< typename ViewTraits::memory_space , void >::value && - std::is_same< typename ViewTraits::HostMirrorSpace , void >::value && - std::is_same< typename ViewTraits::array_layout , void >::value - , "Only one View Execution or Memory Space template argument" ); + static_assert( + std::is_same::execution_space, + void>::value && + std::is_same::memory_space, + void>::value && + std::is_same::HostMirrorSpace, + void>::value && + std::is_same::array_layout, + void>::value, + "Only one View Execution or Memory Space template argument"); - typedef typename Space::execution_space execution_space ; - typedef typename Space::memory_space memory_space ; - typedef typename Kokkos::Impl::HostMirror< Space >::Space HostMirrorSpace ; - typedef typename execution_space::array_layout array_layout ; - typedef typename ViewTraits::memory_traits memory_traits ; - typedef typename ViewTraits::specialize specialize ; + typedef typename Space::execution_space execution_space; + typedef typename Space::memory_space memory_space; + typedef typename Kokkos::Impl::HostMirror::Space::memory_space + HostMirrorSpace; + typedef typename execution_space::array_layout array_layout; + typedef typename ViewTraits::memory_traits memory_traits; + typedef typename ViewTraits::specialize specialize; }; -template< class MemoryTraits , class ... Prop > -struct ViewTraits< typename std::enable_if< Kokkos::Impl::is_memory_traits::value >::type , MemoryTraits , Prop ... > -{ +template +struct ViewTraits::value>::type, + MemoryTraits, Prop...> { // Specify memory trait, should not be any subsequent arguments - static_assert( std::is_same< typename ViewTraits::execution_space , void >::value && - std::is_same< typename ViewTraits::memory_space , void >::value && - std::is_same< typename ViewTraits::array_layout , void >::value && - std::is_same< typename ViewTraits::memory_traits , void >::value - , "MemoryTrait is the final optional template argument for a View" ); + static_assert( + std::is_same::execution_space, + void>::value && + std::is_same::memory_space, + void>::value && + std::is_same::array_layout, + void>::value && + std::is_same::memory_traits, + void>::value, + "MemoryTrait is the final optional template argument for a View"); - typedef void execution_space ; - typedef void memory_space ; - typedef void HostMirrorSpace ; - typedef void array_layout ; - typedef MemoryTraits memory_traits ; - typedef void specialize ; + typedef void execution_space; + typedef void memory_space; + typedef void HostMirrorSpace; + typedef void array_layout; + typedef MemoryTraits memory_traits; + typedef void specialize; }; - -template< class DataType , class ... Properties > +template struct ViewTraits { -private: - + private: // Unpack the properties arguments - typedef ViewTraits< void , Properties ... > prop ; + typedef ViewTraits prop; - typedef typename - std::conditional< ! std::is_same< typename prop::execution_space , void >::value - , typename prop::execution_space - , Kokkos::DefaultExecutionSpace - >::type - ExecutionSpace ; + typedef typename std::conditional< + !std::is_same::value, + typename prop::execution_space, Kokkos::DefaultExecutionSpace>::type + ExecutionSpace; - typedef typename - std::conditional< ! std::is_same< typename prop::memory_space , void >::value - , typename prop::memory_space - , typename ExecutionSpace::memory_space - >::type - MemorySpace ; + typedef typename std::conditional< + !std::is_same::value, + typename prop::memory_space, typename ExecutionSpace::memory_space>::type + MemorySpace; - typedef typename - std::conditional< ! std::is_same< typename prop::array_layout , void >::value - , typename prop::array_layout - , typename ExecutionSpace::array_layout - >::type - ArrayLayout ; + typedef typename std::conditional< + !std::is_same::value, + typename prop::array_layout, typename ExecutionSpace::array_layout>::type + ArrayLayout; - typedef typename - std::conditional - < ! std::is_same< typename prop::HostMirrorSpace , void >::value - , typename prop::HostMirrorSpace - , typename Kokkos::Impl::HostMirror< ExecutionSpace >::Space - >::type - HostMirrorSpace ; + typedef typename std::conditional< + !std::is_same::value, + typename prop::HostMirrorSpace, + typename Kokkos::Impl::HostMirror::Space>::type + HostMirrorSpace; - typedef typename - std::conditional< ! std::is_same< typename prop::memory_traits , void >::value - , typename prop::memory_traits - , typename Kokkos::MemoryManaged - >::type - MemoryTraits ; + typedef typename std::conditional< + !std::is_same::value, + typename prop::memory_traits, typename Kokkos::MemoryManaged>::type + MemoryTraits; // Analyze data type's properties, // May be specialized based upon the layout and value type - typedef Kokkos::Impl::ViewDataAnalysis< DataType , ArrayLayout > data_analysis ; - -public: + typedef Kokkos::Impl::ViewDataAnalysis data_analysis; + public: //------------------------------------ // Data type traits: - typedef typename data_analysis::type data_type ; - typedef typename data_analysis::const_type const_data_type ; - typedef typename data_analysis::non_const_type non_const_data_type ; + typedef typename data_analysis::type data_type; + typedef typename data_analysis::const_type const_data_type; + typedef typename data_analysis::non_const_type non_const_data_type; //------------------------------------ // Compatible array of trivial type traits: - typedef typename data_analysis::scalar_array_type scalar_array_type ; - typedef typename data_analysis::const_scalar_array_type const_scalar_array_type ; - typedef typename data_analysis::non_const_scalar_array_type non_const_scalar_array_type ; + typedef typename data_analysis::scalar_array_type scalar_array_type; + typedef + typename data_analysis::const_scalar_array_type const_scalar_array_type; + typedef typename data_analysis::non_const_scalar_array_type + non_const_scalar_array_type; //------------------------------------ // Value type traits: - typedef typename data_analysis::value_type value_type ; - typedef typename data_analysis::const_value_type const_value_type ; - typedef typename data_analysis::non_const_value_type non_const_value_type ; + typedef typename data_analysis::value_type value_type; + typedef typename data_analysis::const_value_type const_value_type; + typedef typename data_analysis::non_const_value_type non_const_value_type; //------------------------------------ // Mapping traits: - typedef ArrayLayout array_layout ; - typedef typename data_analysis::dimension dimension ; + typedef ArrayLayout array_layout; + typedef typename data_analysis::dimension dimension; typedef typename std::conditional< - std::is_same::value - ,typename prop::specialize - ,typename data_analysis::specialize>::type - specialize ; /* mapping specialization tag */ + std::is_same::value, + typename prop::specialize, typename data_analysis::specialize>::type + specialize; /* mapping specialization tag */ - enum { rank = dimension::rank }; + enum { rank = dimension::rank }; enum { rank_dynamic = dimension::rank_dynamic }; //------------------------------------ // Execution space, memory space, memory access traits, and host mirror space. - typedef ExecutionSpace execution_space ; - typedef MemorySpace memory_space ; - typedef Kokkos::Device device_type ; - typedef MemoryTraits memory_traits ; - typedef HostMirrorSpace host_mirror_space ; + typedef ExecutionSpace execution_space; + typedef MemorySpace memory_space; + typedef Kokkos::Device device_type; + typedef MemoryTraits memory_traits; + typedef HostMirrorSpace host_mirror_space; - typedef typename MemorySpace::size_type size_type ; + typedef typename MemorySpace::size_type size_type; - enum { is_hostspace = std::is_same< MemorySpace , HostSpace >::value }; - enum { is_managed = MemoryTraits::is_unmanaged == 0 }; - enum { is_random_access = MemoryTraits::is_random_access == 1 }; + enum { is_hostspace = std::is_same::value }; + enum { is_managed = MemoryTraits::is_unmanaged == 0 }; + enum { is_random_access = MemoryTraits::is_random_access == 1 }; //------------------------------------ }; @@ -450,7 +417,8 @@ public: * * \section Kokkos_View_MT MemoryTraits discussion * - * \subsection Kokkos_View_MT_Interp MemoryTraits interpretation depends on Space + * \subsection Kokkos_View_MT_Interp MemoryTraits interpretation depends on + * Space * * Some \c MemoryTraits options may have different interpretations for * different \c Space types. For example, with the Cuda device, @@ -479,8 +447,8 @@ public: * } * \endcode */ -template< class DataType , class ... Properties > -class View ; +template +class View; } /* namespace Kokkos */ @@ -497,16 +465,15 @@ namespace Kokkos { namespace { -constexpr Kokkos::Impl::ALL_t - ALL = Kokkos::Impl::ALL_t(); +constexpr Kokkos::Impl::ALL_t ALL = Kokkos::Impl::ALL_t(); -constexpr Kokkos::Impl::WithoutInitializing_t - WithoutInitializing = Kokkos::Impl::WithoutInitializing_t(); +constexpr Kokkos::Impl::WithoutInitializing_t WithoutInitializing = + Kokkos::Impl::WithoutInitializing_t(); -constexpr Kokkos::Impl::AllowPadding_t - AllowPadding = Kokkos::Impl::AllowPadding_t(); +constexpr Kokkos::Impl::AllowPadding_t AllowPadding = + Kokkos::Impl::AllowPadding_t(); -} +} // namespace /** \brief Create View allocation parameter bundle from argument list. * @@ -515,39 +482,34 @@ constexpr Kokkos::Impl::AllowPadding_t * 2) memory space instance of the View::memory_space type * 3) execution space instance compatible with the View::memory_space * 4) Kokkos::WithoutInitializing to bypass initialization - * 4) Kokkos::AllowPadding to allow allocation to pad dimensions for memory alignment + * 4) Kokkos::AllowPadding to allow allocation to pad dimensions for memory + * alignment */ -template< class ... Args > -inline -Impl::ViewCtorProp< typename Impl::ViewCtorProp< void , Args >::type ... > -view_alloc( Args const & ... args ) -{ - typedef - Impl::ViewCtorProp< typename Impl::ViewCtorProp< void , Args >::type ... > - return_type ; +template +inline Impl::ViewCtorProp::type...> +view_alloc(Args const&... args) { + typedef Impl::ViewCtorProp::type...> + return_type; - static_assert( ! return_type::has_pointer - , "Cannot give pointer-to-memory for view allocation" ); + static_assert(!return_type::has_pointer, + "Cannot give pointer-to-memory for view allocation"); - return return_type( args... ); + return return_type(args...); } -template< class ... Args > +template KOKKOS_INLINE_FUNCTION -Impl::ViewCtorProp< typename Impl::ViewCtorProp< void , Args >::type ... > -view_wrap( Args const & ... args ) -{ - typedef - Impl::ViewCtorProp< typename Impl::ViewCtorProp< void , Args >::type ... > - return_type ; + Impl::ViewCtorProp::type...> + view_wrap(Args const&... args) { + typedef Impl::ViewCtorProp::type...> + return_type; - static_assert( ! return_type::has_memory_space && - ! return_type::has_execution_space && - ! return_type::has_label && - return_type::has_pointer - , "Must only give pointer-to-memory for view wrapping" ); + static_assert(!return_type::has_memory_space && + !return_type::has_execution_space && + !return_type::has_label && return_type::has_pointer, + "Must only give pointer-to-memory for view wrapping"); - return return_type( args... ); + return return_type(args...); } } /* namespace Kokkos */ @@ -557,113 +519,120 @@ view_wrap( Args const & ... args ) namespace Kokkos { -template< class DataType , class ... Properties > -class View ; +template +class View; -template< class > struct is_view : public std::false_type {}; +template +struct is_view : public std::false_type {}; -template< class D, class ... P > -struct is_view< View > : public std::true_type {}; +template +struct is_view> : public std::true_type {}; -template< class D, class ... P > -struct is_view< const View > : public std::true_type {}; +template +struct is_view> : public std::true_type {}; -template< class DataType , class ... Properties > -class View : public ViewTraits< DataType , Properties ... > { -private: +template +class View : public ViewTraits { + private: + template + friend class View; + template + friend class Kokkos::Impl::ViewMapping; - template< class , class ... > friend class View ; - template< class , class ... > friend class Kokkos::Impl::ViewMapping ; + public: + typedef ViewTraits traits; -public: + private: + typedef Kokkos::Impl::ViewMapping + map_type; + typedef Kokkos::Impl::SharedAllocationTracker track_type; - typedef ViewTraits< DataType , Properties ... > traits ; - -private: - - typedef Kokkos::Impl::ViewMapping< traits , typename traits::specialize > map_type ; - typedef Kokkos::Impl::SharedAllocationTracker track_type ; - - track_type m_track ; - map_type m_map ; - -public: + track_type m_track; + map_type m_map; + public: //---------------------------------------- /** \brief Compatible view of array of scalar types */ - typedef View< typename traits::scalar_array_type , - typename traits::array_layout , - typename traits::device_type , - typename traits::memory_traits > - array_type ; + typedef View + array_type; /** \brief Compatible view of const data type */ - typedef View< typename traits::const_data_type , - typename traits::array_layout , - typename traits::device_type , - typename traits::memory_traits > - const_type ; + typedef View + const_type; /** \brief Compatible view of non-const data type */ - typedef View< typename traits::non_const_data_type , - typename traits::array_layout , - typename traits::device_type , - typename traits::memory_traits > - non_const_type ; + typedef View + non_const_type; /** \brief Compatible HostMirror view */ - typedef View< typename traits::non_const_data_type , - typename traits::array_layout , - typename traits::host_mirror_space > - HostMirror ; + typedef View> + HostMirror; /** \brief Compatible HostMirror view */ - typedef View< typename traits::non_const_data_type , - typename traits::array_layout , - typename traits::host_mirror_space > - host_mirror_type ; + typedef View + host_mirror_type; /** \brief Unified types */ - typedef typename Impl::ViewUniformType::type uniform_type; - typedef typename Impl::ViewUniformType::const_type uniform_const_type; - typedef typename Impl::ViewUniformType::runtime_type uniform_runtime_type; - typedef typename Impl::ViewUniformType::runtime_const_type uniform_runtime_const_type; - typedef typename Impl::ViewUniformType::nomemspace_type uniform_nomemspace_type; - typedef typename Impl::ViewUniformType::const_nomemspace_type uniform_const_nomemspace_type; - typedef typename Impl::ViewUniformType::runtime_nomemspace_type uniform_runtime_nomemspace_type; - typedef typename Impl::ViewUniformType::runtime_const_nomemspace_type uniform_runtime_const_nomemspace_type; + typedef typename Impl::ViewUniformType::type uniform_type; + typedef + typename Impl::ViewUniformType::const_type uniform_const_type; + typedef typename Impl::ViewUniformType::runtime_type + uniform_runtime_type; + typedef typename Impl::ViewUniformType::runtime_const_type + uniform_runtime_const_type; + typedef typename Impl::ViewUniformType::nomemspace_type + uniform_nomemspace_type; + typedef typename Impl::ViewUniformType::const_nomemspace_type + uniform_const_nomemspace_type; + typedef typename Impl::ViewUniformType::runtime_nomemspace_type + uniform_runtime_nomemspace_type; + typedef typename Impl::ViewUniformType::runtime_const_nomemspace_type + uniform_runtime_const_nomemspace_type; //---------------------------------------- // Domain rank and extents enum { Rank = map_type::Rank }; - /** \brief rank() to be implemented - */ - //KOKKOS_INLINE_FUNCTION - //static - //constexpr unsigned rank() { return map_type::Rank; } + /** \brief rank() to be implemented + */ + // KOKKOS_INLINE_FUNCTION + // static + // constexpr unsigned rank() { return map_type::Rank; } - template< typename iType > + template KOKKOS_INLINE_FUNCTION constexpr - typename std::enable_if< std::is_integral::value , size_t >::type - extent( const iType & r ) const noexcept - { return m_map.extent(r); } + typename std::enable_if::value, size_t>::type + extent(const iType& r) const noexcept { + return m_map.extent(r); + } - static KOKKOS_INLINE_FUNCTION constexpr - size_t - static_extent( const unsigned r ) noexcept - { return map_type::static_extent(r); } + static KOKKOS_INLINE_FUNCTION constexpr size_t static_extent( + const unsigned r) noexcept { + return map_type::static_extent(r); + } - template< typename iType > + template KOKKOS_INLINE_FUNCTION constexpr - typename std::enable_if< std::is_integral::value , int >::type - extent_int( const iType & r ) const noexcept - { return static_cast(m_map.extent(r)); } + typename std::enable_if::value, int>::type + extent_int(const iType& r) const noexcept { + return static_cast(m_map.extent(r)); + } - KOKKOS_INLINE_FUNCTION constexpr - typename traits::array_layout layout() const - { return m_map.layout(); } + KOKKOS_INLINE_FUNCTION constexpr typename traits::array_layout layout() + const { + return m_map.layout(); + } //---------------------------------------- /* Deprecate all 'dimension' functions in favor of @@ -672,80 +641,134 @@ public: #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - template< typename iType > + template KOKKOS_INLINE_FUNCTION constexpr - typename std::enable_if< std::is_integral::value , size_t >::type - dimension( const iType & r ) const { return extent( r ); } + typename std::enable_if::value, size_t>::type + dimension(const iType& r) const { + return extent(r); + } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_0() const { return m_map.dimension_0(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_1() const { return m_map.dimension_1(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_2() const { return m_map.dimension_2(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_3() const { return m_map.dimension_3(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_4() const { return m_map.dimension_4(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_5() const { return m_map.dimension_5(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_6() const { return m_map.dimension_6(); } - KOKKOS_INLINE_FUNCTION constexpr size_t dimension_7() const { return m_map.dimension_7(); } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_0() const { + return m_map.dimension_0(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_1() const { + return m_map.dimension_1(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_2() const { + return m_map.dimension_2(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_3() const { + return m_map.dimension_3(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_4() const { + return m_map.dimension_4(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_5() const { + return m_map.dimension_5(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_6() const { + return m_map.dimension_6(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t dimension_7() const { + return m_map.dimension_7(); + } #endif //---------------------------------------- - KOKKOS_INLINE_FUNCTION constexpr size_t size() const { return m_map.dimension_0() * - m_map.dimension_1() * - m_map.dimension_2() * - m_map.dimension_3() * - m_map.dimension_4() * - m_map.dimension_5() * - m_map.dimension_6() * - m_map.dimension_7(); } - - KOKKOS_INLINE_FUNCTION constexpr size_t stride_0() const { return m_map.stride_0(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_1() const { return m_map.stride_1(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_2() const { return m_map.stride_2(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_3() const { return m_map.stride_3(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_4() const { return m_map.stride_4(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_5() const { return m_map.stride_5(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_6() const { return m_map.stride_6(); } - KOKKOS_INLINE_FUNCTION constexpr size_t stride_7() const { return m_map.stride_7(); } - - template< typename iType > - KOKKOS_INLINE_FUNCTION constexpr - typename std::enable_if< std::is_integral::value , size_t >::type - stride(iType r) const { - return (r == 0 ? m_map.stride_0() : - (r == 1 ? m_map.stride_1() : - (r == 2 ? m_map.stride_2() : - (r == 3 ? m_map.stride_3() : - (r == 4 ? m_map.stride_4() : - (r == 5 ? m_map.stride_5() : - (r == 6 ? m_map.stride_6() : - m_map.stride_7()))))))); + KOKKOS_INLINE_FUNCTION constexpr size_t size() const { + return m_map.dimension_0() * m_map.dimension_1() * m_map.dimension_2() * + m_map.dimension_3() * m_map.dimension_4() * m_map.dimension_5() * + m_map.dimension_6() * m_map.dimension_7(); } - template< typename iType > - KOKKOS_INLINE_FUNCTION void stride( iType * const s ) const { m_map.stride(s); } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_0() const { + return m_map.stride_0(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_1() const { + return m_map.stride_1(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_2() const { + return m_map.stride_2(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_3() const { + return m_map.stride_3(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_4() const { + return m_map.stride_4(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_5() const { + return m_map.stride_5(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_6() const { + return m_map.stride_6(); + } + KOKKOS_INLINE_FUNCTION constexpr size_t stride_7() const { + return m_map.stride_7(); + } + + template + KOKKOS_INLINE_FUNCTION constexpr + typename std::enable_if::value, size_t>::type + stride(iType r) const { + return ( + r == 0 + ? m_map.stride_0() + : (r == 1 + ? m_map.stride_1() + : (r == 2 + ? m_map.stride_2() + : (r == 3 + ? m_map.stride_3() + : (r == 4 + ? m_map.stride_4() + : (r == 5 + ? m_map.stride_5() + : (r == 6 + ? m_map.stride_6() + : m_map.stride_7()))))))); + } + + template + KOKKOS_INLINE_FUNCTION void stride(iType* const s) const { + m_map.stride(s); + } //---------------------------------------- // Range span is the span which contains all members. - typedef typename map_type::reference_type reference_type ; - typedef typename map_type::pointer_type pointer_type ; + typedef typename map_type::reference_type reference_type; + typedef typename map_type::pointer_type pointer_type; - enum { reference_type_is_lvalue_reference = std::is_lvalue_reference< reference_type >::value }; + enum { + reference_type_is_lvalue_reference = + std::is_lvalue_reference::value + }; KOKKOS_INLINE_FUNCTION constexpr size_t span() const { return m_map.span(); } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE // Deprecated, use 'span()' instead - KOKKOS_INLINE_FUNCTION constexpr size_t capacity() const { return m_map.span(); } + KOKKOS_INLINE_FUNCTION constexpr size_t capacity() const { + return m_map.span(); + } #endif - KOKKOS_INLINE_FUNCTION bool span_is_contiguous() const { return m_map.span_is_contiguous(); } - KOKKOS_INLINE_FUNCTION constexpr pointer_type data() const { return m_map.data(); } + KOKKOS_INLINE_FUNCTION bool span_is_contiguous() const { + return m_map.span_is_contiguous(); + } + KOKKOS_INLINE_FUNCTION constexpr pointer_type data() const { + return m_map.data(); + } #ifdef KOKKOS_ENABLE_DEPRECATED_CODE // Deprecated, use 'span_is_contigous()' instead - KOKKOS_INLINE_FUNCTION constexpr bool is_contiguous() const { return m_map.span_is_contiguous(); } + KOKKOS_INLINE_FUNCTION constexpr bool is_contiguous() const { + return m_map.span_is_contiguous(); + } // Deprecated, use 'data()' instead - KOKKOS_INLINE_FUNCTION constexpr pointer_type ptr_on_device() const { return m_map.data(); } + KOKKOS_INLINE_FUNCTION constexpr pointer_type ptr_on_device() const { + return m_map.data(); + } #endif //---------------------------------------- @@ -753,1215 +776,946 @@ public: #ifdef KOKKOS_ENABLE_DEPRECATED_CODE KOKKOS_INLINE_FUNCTION - const Kokkos::Impl::ViewMapping< traits , typename traits::specialize > & - implementation_map() const { return m_map ; } + const Kokkos::Impl::ViewMapping& + implementation_map() const { + return m_map; + } #endif KOKKOS_INLINE_FUNCTION - const Kokkos::Impl::ViewMapping< traits , typename traits::specialize > & - impl_map() const { return m_map ; } + const Kokkos::Impl::ViewMapping& + impl_map() const { + return m_map; + } KOKKOS_INLINE_FUNCTION - const Kokkos::Impl::SharedAllocationTracker & - impl_track() const { return m_track ; } + const Kokkos::Impl::SharedAllocationTracker& impl_track() const { + return m_track; + } //---------------------------------------- -private: - + private: enum { - is_layout_left = std::is_same< typename traits::array_layout - , Kokkos::LayoutLeft >::value , + is_layout_left = + std::is_same::value, - is_layout_right = std::is_same< typename traits::array_layout - , Kokkos::LayoutRight >::value , + is_layout_right = + std::is_same::value, - is_layout_stride = std::is_same< typename traits::array_layout - , Kokkos::LayoutStride >::value , + is_layout_stride = std::is_same::value, - is_default_map = - std::is_same< typename traits::specialize , void >::value && - ( is_layout_left || is_layout_right || is_layout_stride ) + is_default_map = std::is_same::value && + (is_layout_left || is_layout_right || is_layout_stride) }; - template< class Space , bool = Kokkos::Impl::MemorySpaceAccess< Space , typename traits::memory_space >::accessible > struct verify_space - { KOKKOS_FORCEINLINE_FUNCTION static void check() {} }; + template ::accessible> + struct verify_space { + KOKKOS_FORCEINLINE_FUNCTION static void check() {} + }; - template< class Space > struct verify_space - { KOKKOS_FORCEINLINE_FUNCTION static void check() - { Kokkos::abort("Kokkos::View ERROR: attempt to access inaccessible memory space"); }; + template + struct verify_space { + KOKKOS_FORCEINLINE_FUNCTION static void check() { + Kokkos::abort( + "Kokkos::View ERROR: attempt to access inaccessible memory space"); }; + }; -#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK ) +#if defined(KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK) -#define KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( ARG ) \ - View::template verify_space< Kokkos::Impl::ActiveExecutionMemorySpace >::check(); \ - Kokkos::Impl::view_verify_operator_bounds< typename traits::memory_space > ARG ; +#define KOKKOS_IMPL_VIEW_OPERATOR_VERIFY(ARG) \ + View::template verify_space< \ + Kokkos::Impl::ActiveExecutionMemorySpace>::check(); \ + Kokkos::Impl::view_verify_operator_bounds ARG; #else -#define KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( ARG ) \ - View::template verify_space< Kokkos::Impl::ActiveExecutionMemorySpace >::check(); +#define KOKKOS_IMPL_VIEW_OPERATOR_VERIFY(ARG) \ + View::template verify_space< \ + Kokkos::Impl::ActiveExecutionMemorySpace>::check(); #endif -public: + public: #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - template< class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if<( Kokkos::Impl::are_integral::value - && ( 0 == Rank ) - ), reference_type >::type - operator()( Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,args...) ) - return m_map.reference(); - } + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (0 == Rank)), + reference_type>::type + operator()(Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, args...)) + return m_map.reference(); + } - template< typename I0 - , class ... Args> - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0, - Args ... args) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,args...) ) - return m_map.reference(i0); - } + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, args...)) + return m_map.reference(i0); + } - template< typename I0 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && is_default_map - && ! is_layout_stride - ), reference_type >::type - operator()( const I0 & i0 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,args...) ) - return m_map.m_impl_handle[ i0 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && is_default_map && + !is_layout_stride), + reference_type>::type + operator()(const I0& i0, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, args...)) + return m_map.m_impl_handle[i0]; + } - template< typename I0 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && is_default_map - && is_layout_stride - ), reference_type >::type - operator()( const I0 & i0 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset.m_stride.S0 * i0 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && is_default_map && + is_layout_stride), + reference_type>::type + operator()(const I0& i0, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset.m_stride.S0 * i0]; + } - //------------------------------ - // Rank 1 operator[] - - template< typename I0 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && ! is_default_map - ), reference_type >::type - operator[]( const I0 & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0) ) - return m_map.reference(i0); - } - - template< typename I0 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && is_default_map - && ! is_layout_stride - ), reference_type >::type - operator[]( const I0 & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0) ) - return m_map.m_impl_handle[ i0 ]; - } - - template< typename I0 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && is_default_map - && is_layout_stride - ), reference_type >::type - operator[]( const I0 & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0) ) - return m_map.m_impl_handle[ m_map.m_impl_offset.m_stride.S0 * i0 ]; - } - - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.reference(i0,i1); - } - - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_left && ( traits::rank_dynamic == 0 ) - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.m_impl_handle[ i0 + m_map.m_impl_offset.m_dim.N0 * i1 ]; - } - - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_left && ( traits::rank_dynamic != 0 ) - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.m_impl_handle[ i0 + m_map.m_impl_offset.m_stride * i1 ]; - } - - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_right && ( traits::rank_dynamic == 0 ) - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.m_impl_handle[ i1 + m_map.m_impl_offset.m_dim.N1 * i0 ]; - } - - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_right && ( traits::rank_dynamic != 0 ) - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.m_impl_handle[ i1 + m_map.m_impl_offset.m_stride * i0 ]; - } - - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_stride - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.m_impl_handle[ i0 * m_map.m_impl_offset.m_stride.S0 + - i1 * m_map.m_impl_offset.m_stride.S1 ]; - } - - //------------------------------ - // Rank 3 - - template< typename I0 , typename I1 , typename I2 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 3 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2) ]; - } - - template< typename I0 , typename I1 , typename I2 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 3 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,args...) ) - return m_map.reference(i0,i1,i2); - } - - //------------------------------ - // Rank 4 - - template< typename I0 , typename I1 , typename I2 , typename I3 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 4 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3) ]; - } - - template< typename I0 , typename I1 , typename I2 , typename I3 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 4 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,args...) ) - return m_map.reference(i0,i1,i2,i3); - } - - //------------------------------ - // Rank 5 - - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 5 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4) ]; - } - - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 5 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,args...) ) - return m_map.reference(i0,i1,i2,i3,i4); - } - - //------------------------------ - // Rank 6 - - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 6 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4,i5) ]; - } - - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 6 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,args...) ) - return m_map.reference(i0,i1,i2,i3,i4,i5); - } - - //------------------------------ - // Rank 7 - - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 7 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4,i5,i6) ]; - } - - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 7 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6,args...) ) - return m_map.reference(i0,i1,i2,i3,i4,i5,i6); - } - - //------------------------------ - // Rank 8 - - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 , typename I7 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 8 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6 , const I7 & i7 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6,i7,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4,i5,i6,i7) ]; - } - - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 , typename I7 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 8 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6 , const I7 & i7 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6,i7,args...) ) - return m_map.reference(i0,i1,i2,i3,i4,i5,i6,i7); - } - - - #else //------------------------------ - // Rank 0 operator() + // Rank 1 operator[] - KOKKOS_FORCEINLINE_FUNCTION - reference_type - operator()() const - { - return m_map.reference(); - } - //------------------------------ - // Rank 1 operator() - - - template< typename I0> + template KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0) ) - return m_map.reference(i0); - } + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && !is_default_map), + reference_type>::type + operator[](const I0& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0)) + return m_map.reference(i0); + } - template< typename I0> + template KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && is_default_map - && ! is_layout_stride - ), reference_type >::type - operator()( const I0 & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0) ) - return m_map.m_impl_handle[ i0 ]; - } + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && is_default_map && + !is_layout_stride), + reference_type>::type + operator[](const I0& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0)) + return m_map.m_impl_handle[i0]; + } - template< typename I0 > + template KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && is_default_map - && is_layout_stride - ), reference_type >::type - operator()( const I0 & i0) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0) ) - return m_map.m_impl_handle[ m_map.m_impl_offset.m_stride.S0 * i0 ]; - } - //------------------------------ - // Rank 1 operator[] + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && is_default_map && + is_layout_stride), + reference_type>::type + operator[](const I0& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0)) + return m_map.m_impl_handle[m_map.m_impl_offset.m_stride.S0 * i0]; + } - template< typename I0 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && ! is_default_map - ), reference_type >::type - operator[]( const I0 & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0) ) - return m_map.reference(i0); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.reference(i0, i1); + } - template< typename I0 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && is_default_map - && ! is_layout_stride - ), reference_type >::type - operator[]( const I0 & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0) ) - return m_map.m_impl_handle[ i0 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + is_default_map && is_layout_left && (traits::rank_dynamic == 0)), + reference_type>::type + operator()(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.m_impl_handle[i0 + m_map.m_impl_offset.m_dim.N0 * i1]; + } - template< typename I0 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && is_default_map - && is_layout_stride - ), reference_type >::type - operator[]( const I0 & i0 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0) ) - return m_map.m_impl_handle[ m_map.m_impl_offset.m_stride.S0 * i0 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + is_default_map && is_layout_left && (traits::rank_dynamic != 0)), + reference_type>::type + operator()(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.m_impl_handle[i0 + m_map.m_impl_offset.m_stride * i1]; + } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + is_default_map && is_layout_right && (traits::rank_dynamic == 0)), + reference_type>::type + operator()(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.m_impl_handle[i1 + m_map.m_impl_offset.m_dim.N1 * i0]; + } - //------------------------------ - // Rank 2 + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + is_default_map && is_layout_right && (traits::rank_dynamic != 0)), + reference_type>::type + operator()(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.m_impl_handle[i1 + m_map.m_impl_offset.m_stride * i0]; + } - template< typename I0 , typename I1 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1) ) - return m_map.reference(i0,i1); - } - - template< typename I0 , typename I1 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_left && ( traits::rank_dynamic == 0 ) - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1) ) - return m_map.m_impl_handle[ i0 + m_map.m_impl_offset.m_dim.N0 * i1 ]; - } - - template< typename I0 , typename I1> - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_left && ( traits::rank_dynamic != 0 ) - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1) ) - return m_map.m_impl_handle[ i0 + m_map.m_impl_offset.m_stride * i1 ]; - } - - template< typename I0 , typename I1 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_right && ( traits::rank_dynamic == 0 ) - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1) ) - return m_map.m_impl_handle[ i1 + m_map.m_impl_offset.m_dim.N1 * i0 ]; - } - - template< typename I0 , typename I1 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_right && ( traits::rank_dynamic != 0 ) - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1) ) - return m_map.m_impl_handle[ i1 + m_map.m_impl_offset.m_stride * i0 ]; - } - - template< typename I0 , typename I1> - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_stride - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1) ) - return m_map.m_impl_handle[ i0 * m_map.m_impl_offset.m_stride.S0 + - i1 * m_map.m_impl_offset.m_stride.S1 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + is_default_map && is_layout_stride), + reference_type>::type + operator()(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.m_impl_handle[i0 * m_map.m_impl_offset.m_stride.S0 + + i1 * m_map.m_impl_offset.m_stride.S1]; + } //------------------------------ // Rank 3 - template< typename I0 , typename I1 , typename I2 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 3 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (3 == Rank) && + is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2)]; + } - template< typename I0 , typename I1 , typename I2> - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 3 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2) ) - return m_map.reference(i0,i1,i2); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (3 == Rank) && + !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, args...)) + return m_map.reference(i0, i1, i2); + } //------------------------------ // Rank 4 - template< typename I0 , typename I1 , typename I2 , typename I3> - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 4 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (4 == Rank) && is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, i3, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3)]; + } - template< typename I0 , typename I1 , typename I2 , typename I3 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 4 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3) ) - return m_map.reference(i0,i1,i2,i3); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (4 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, i3, args...)) + return m_map.reference(i0, i1, i2, i3); + } //------------------------------ // Rank 5 - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4> - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 5 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (5 == Rank) && is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4)]; + } - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4> - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 5 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4) ) - return m_map.reference(i0,i1,i2,i3,i4); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (5 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, args...)) + return m_map.reference(i0, i1, i2, i3, i4); + } //------------------------------ // Rank 6 - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 6 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4,i5) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (6 == Rank) && is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4, i5)]; + } - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5> - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 6 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5) ) - return m_map.reference(i0,i1,i2,i3,i4,i5); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (6 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, args...)) + return m_map.reference(i0, i1, i2, i3, i4, i5); + } //------------------------------ // Rank 7 - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6> - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 7 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4,i5,i6) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (7 == Rank) && is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5, const I6& i6, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4, i5, i6)]; + } - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 7 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6) ) - return m_map.reference(i0,i1,i2,i3,i4,i5,i6); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (7 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5, const I6& i6, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6, args...)) + return m_map.reference(i0, i1, i2, i3, i4, i5, i6); + } //------------------------------ // Rank 8 - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 , typename I7 > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 8 == Rank ) - && is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6 , const I7 & i7) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6,i7) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4,i5,i6,i7) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (8 == Rank) && is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5, const I6& i6, const I7& i7, + Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6, i7, args...)) + return m_map + .m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4, i5, i6, i7)]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (8 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5, const I6& i6, const I7& i7, + Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6, i7, args...)) + return m_map.reference(i0, i1, i2, i3, i4, i5, i6, i7); + } + +#else + //------------------------------ + // Rank 0 operator() - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 , typename I7> KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 8 == Rank ) - && ! is_default_map - ), reference_type >::type - operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6 , const I7 & i7 ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6,i7) ) - return m_map.reference(i0,i1,i2,i3,i4,i5,i6,i7); - } + reference_type operator()() const { return m_map.reference(); } + //------------------------------ + // Rank 1 operator() + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0)) + return m_map.reference(i0); + } + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && is_default_map && + !is_layout_stride), + reference_type>::type + operator()(const I0& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0)) + return m_map.m_impl_handle[i0]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && is_default_map && + is_layout_stride), + reference_type>::type + operator()(const I0& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0)) + return m_map.m_impl_handle[m_map.m_impl_offset.m_stride.S0 * i0]; + } + //------------------------------ + // Rank 1 operator[] + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && !is_default_map), + reference_type>::type + operator[](const I0& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0)) + return m_map.reference(i0); + } + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && is_default_map && + !is_layout_stride), + reference_type>::type + operator[](const I0& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0)) + return m_map.m_impl_handle[i0]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && is_default_map && + is_layout_stride), + reference_type>::type + operator[](const I0& i0) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0)) + return m_map.m_impl_handle[m_map.m_impl_offset.m_stride.S0 * i0]; + } + + //------------------------------ + // Rank 2 + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (2 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1)) + return m_map.reference(i0, i1); + } + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (2 == Rank) && is_default_map && + is_layout_left && (traits::rank_dynamic == 0)), + reference_type>::type + operator()(const I0& i0, const I1& i1) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1)) + return m_map.m_impl_handle[i0 + m_map.m_impl_offset.m_dim.N0 * i1]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (2 == Rank) && is_default_map && + is_layout_left && (traits::rank_dynamic != 0)), + reference_type>::type + operator()(const I0& i0, const I1& i1) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1)) + return m_map.m_impl_handle[i0 + m_map.m_impl_offset.m_stride * i1]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (2 == Rank) && is_default_map && + is_layout_right && (traits::rank_dynamic == 0)), + reference_type>::type + operator()(const I0& i0, const I1& i1) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1)) + return m_map.m_impl_handle[i1 + m_map.m_impl_offset.m_dim.N1 * i0]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (2 == Rank) && is_default_map && + is_layout_right && (traits::rank_dynamic != 0)), + reference_type>::type + operator()(const I0& i0, const I1& i1) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1)) + return m_map.m_impl_handle[i1 + m_map.m_impl_offset.m_stride * i0]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (2 == Rank) && is_default_map && + is_layout_stride), + reference_type>::type + operator()(const I0& i0, const I1& i1) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1)) + return m_map.m_impl_handle[i0 * m_map.m_impl_offset.m_stride.S0 + + i1 * m_map.m_impl_offset.m_stride.S1]; + } + + //------------------------------ + // Rank 3 + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (3 == Rank) && is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2)]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (3 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2)) + return m_map.reference(i0, i1, i2); + } + + //------------------------------ + // Rank 4 + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (4 == Rank) && + is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, i3)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3)]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (4 == Rank) && + !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, i3)) + return m_map.reference(i0, i1, i2, i3); + } + + //------------------------------ + // Rank 5 + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (5 == Rank) && + is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, i3, i4)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4)]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (5 == Rank) && + !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, i3, i4)) + return m_map.reference(i0, i1, i2, i3, i4); + } + + //------------------------------ + // Rank 6 + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (6 == Rank) && is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, i3, i4, i5)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4, i5)]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (6 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, i3, i4, i5)) + return m_map.reference(i0, i1, i2, i3, i4, i5); + } + + //------------------------------ + // Rank 7 + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (7 == Rank) && is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5, const I6& i6) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4, i5, i6)]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (7 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5, const I6& i6) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6)) + return m_map.reference(i0, i1, i2, i3, i4, i5, i6); + } + + //------------------------------ + // Rank 8 + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (8 == Rank) && is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5, const I6& i6, const I7& i7) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6, i7)) + return m_map + .m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4, i5, i6, i7)]; + } + + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (8 == Rank) && !is_default_map), + reference_type>::type + operator()(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + const I4& i4, const I5& i5, const I6& i6, const I7& i7) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6, i7)) + return m_map.reference(i0, i1, i2, i3, i4, i5, i6, i7); + } #endif - template< class ... Args > + template KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if<( Kokkos::Impl::are_integral::value - && ( 0 == Rank ) - ), reference_type >::type - access( Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,args...) ) - return m_map.reference(); - } + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (0 == Rank)), + reference_type>::type + access(Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, args...)) + return m_map.reference(); + } - template< typename I0 - , class ... Args> - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && ! is_default_map - ), reference_type >::type - access( const I0 & i0, - Args ... args) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,args...) ) - return m_map.reference(i0); - } + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && !is_default_map), + reference_type>::type + access(const I0& i0, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, args...)) + return m_map.reference(i0); + } - template< typename I0 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && is_default_map - && ! is_layout_stride - ), reference_type >::type - access( const I0 & i0 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,args...) ) - return m_map.m_impl_handle[ i0 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && is_default_map && + !is_layout_stride), + reference_type>::type + access(const I0& i0, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, args...)) + return m_map.m_impl_handle[i0]; + } - template< typename I0 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 1 == Rank ) - && is_default_map - && is_layout_stride - ), reference_type >::type - access( const I0 & i0 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset.m_stride.S0 * i0 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION + typename std::enable_if<(Kokkos::Impl::are_integral::value && + (1 == Rank) && is_default_map && + is_layout_stride), + reference_type>::type + access(const I0& i0, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset.m_stride.S0 * i0]; + } - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && ! is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.reference(i0,i1); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + !is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.reference(i0, i1); + } - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_left && ( traits::rank_dynamic == 0 ) - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.m_impl_handle[ i0 + m_map.m_impl_offset.m_dim.N0 * i1 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + is_default_map && is_layout_left && (traits::rank_dynamic == 0)), + reference_type>::type + access(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.m_impl_handle[i0 + m_map.m_impl_offset.m_dim.N0 * i1]; + } - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_left && ( traits::rank_dynamic != 0 ) - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.m_impl_handle[ i0 + m_map.m_impl_offset.m_stride * i1 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + is_default_map && is_layout_left && (traits::rank_dynamic != 0)), + reference_type>::type + access(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.m_impl_handle[i0 + m_map.m_impl_offset.m_stride * i1]; + } - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_right && ( traits::rank_dynamic == 0 ) - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.m_impl_handle[ i1 + m_map.m_impl_offset.m_dim.N1 * i0 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + is_default_map && is_layout_right && (traits::rank_dynamic == 0)), + reference_type>::type + access(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.m_impl_handle[i1 + m_map.m_impl_offset.m_dim.N1 * i0]; + } - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_right && ( traits::rank_dynamic != 0 ) - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.m_impl_handle[ i1 + m_map.m_impl_offset.m_stride * i0 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + is_default_map && is_layout_right && (traits::rank_dynamic != 0)), + reference_type>::type + access(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.m_impl_handle[i1 + m_map.m_impl_offset.m_stride * i0]; + } - template< typename I0 , typename I1 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 2 == Rank ) - && is_default_map - && is_layout_stride - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,args...) ) - return m_map.m_impl_handle[ i0 * m_map.m_impl_offset.m_stride.S0 + - i1 * m_map.m_impl_offset.m_stride.S1 ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (2 == Rank) && + is_default_map && is_layout_stride), + reference_type>::type + access(const I0& i0, const I1& i1, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, args...)) + return m_map.m_impl_handle[i0 * m_map.m_impl_offset.m_stride.S0 + + i1 * m_map.m_impl_offset.m_stride.S1]; + } - //------------------------------ - // Rank 3 + //------------------------------ + // Rank 3 - template< typename I0 , typename I1 , typename I2 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 3 == Rank ) - && is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (3 == Rank) && + is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2)]; + } - template< typename I0 , typename I1 , typename I2 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 3 == Rank ) - && ! is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,args...) ) - return m_map.reference(i0,i1,i2); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && (3 == Rank) && + !is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, args...)) + return m_map.reference(i0, i1, i2); + } - //------------------------------ - // Rank 4 + //------------------------------ + // Rank 4 - template< typename I0 , typename I1 , typename I2 , typename I3 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 4 == Rank ) - && is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (4 == Rank) && is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, i3, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3)]; + } - template< typename I0 , typename I1 , typename I2 , typename I3 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 4 == Rank ) - && ! is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,args...) ) - return m_map.reference(i0,i1,i2,i3); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (4 == Rank) && !is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, const I3& i3, + Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY((m_track, m_map, i0, i1, i2, i3, args...)) + return m_map.reference(i0, i1, i2, i3); + } - //------------------------------ - // Rank 5 + //------------------------------ + // Rank 5 - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 5 == Rank ) - && is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (5 == Rank) && is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, const I3& i3, const I4& i4, + Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4)]; + } - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 5 == Rank ) - && ! is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,args...) ) - return m_map.reference(i0,i1,i2,i3,i4); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (5 == Rank) && !is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, const I3& i3, const I4& i4, + Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, args...)) + return m_map.reference(i0, i1, i2, i3, i4); + } - //------------------------------ - // Rank 6 + //------------------------------ + // Rank 6 - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 6 == Rank ) - && is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4,i5) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (6 == Rank) && is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, const I3& i3, const I4& i4, + const I5& i5, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4, i5)]; + } - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 6 == Rank ) - && ! is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,args...) ) - return m_map.reference(i0,i1,i2,i3,i4,i5); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (6 == Rank) && !is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, const I3& i3, const I4& i4, + const I5& i5, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, args...)) + return m_map.reference(i0, i1, i2, i3, i4, i5); + } - //------------------------------ - // Rank 7 + //------------------------------ + // Rank 7 - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 7 == Rank ) - && is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4,i5,i6) ]; - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (7 == Rank) && is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, const I3& i3, const I4& i4, + const I5& i5, const I6& i6, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6, args...)) + return m_map.m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4, i5, i6)]; + } - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 7 == Rank ) - && ! is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6,args...) ) - return m_map.reference(i0,i1,i2,i3,i4,i5,i6); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (7 == Rank) && !is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, const I3& i3, const I4& i4, + const I5& i5, const I6& i6, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6, args...)) + return m_map.reference(i0, i1, i2, i3, i4, i5, i6); + } - //------------------------------ - // Rank 8 + //------------------------------ + // Rank 8 - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 , typename I7 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 8 == Rank ) - && is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6 , const I7 & i7 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6,i7,args...) ) - return m_map.m_impl_handle[ m_map.m_impl_offset(i0,i1,i2,i3,i4,i5,i6,i7) ]; - } - - template< typename I0 , typename I1 , typename I2 , typename I3 - , typename I4 , typename I5 , typename I6 , typename I7 - , class ... Args > - KOKKOS_FORCEINLINE_FUNCTION - typename std::enable_if< - ( Kokkos::Impl::are_integral::value - && ( 8 == Rank ) - && ! is_default_map - ), reference_type >::type - access( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 - , const I4 & i4 , const I5 & i5 , const I6 & i6 , const I7 & i7 - , Args ... args ) const - { - KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( (m_track,m_map,i0,i1,i2,i3,i4,i5,i6,i7,args...) ) - return m_map.reference(i0,i1,i2,i3,i4,i5,i6,i7); - } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (8 == Rank) && is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, const I3& i3, const I4& i4, + const I5& i5, const I6& i6, const I7& i7, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6, i7, args...)) + return m_map + .m_impl_handle[m_map.m_impl_offset(i0, i1, i2, i3, i4, i5, i6, i7)]; + } + template + KOKKOS_FORCEINLINE_FUNCTION typename std::enable_if< + (Kokkos::Impl::are_integral::value && + (8 == Rank) && !is_default_map), + reference_type>::type + access(const I0& i0, const I1& i1, const I2& i2, const I3& i3, const I4& i4, + const I5& i5, const I6& i6, const I7& i7, Args... args) const { + KOKKOS_IMPL_VIEW_OPERATOR_VERIFY( + (m_track, m_map, i0, i1, i2, i3, i4, i5, i6, i7, args...)) + return m_map.reference(i0, i1, i2, i3, i4, i5, i6, i7); + } #undef KOKKOS_IMPL_VIEW_OPERATOR_VERIFY @@ -1975,546 +1729,522 @@ public: View() : m_track(), m_map() {} KOKKOS_INLINE_FUNCTION - View( const View & rhs ) : m_track( rhs.m_track, traits::is_managed ), m_map( rhs.m_map ) {} + View(const View& rhs) + : m_track(rhs.m_track, traits::is_managed), m_map(rhs.m_map) {} KOKKOS_INLINE_FUNCTION - View( View && rhs ) : m_track( std::move(rhs.m_track) ), m_map( std::move(rhs.m_map) ) {} + View(View&& rhs) + : m_track(std::move(rhs.m_track)), m_map(std::move(rhs.m_map)) {} KOKKOS_INLINE_FUNCTION - View & operator = ( const View & rhs ) { m_track = rhs.m_track ; m_map = rhs.m_map ; return *this ; } + View& operator=(const View& rhs) { + m_track = rhs.m_track; + m_map = rhs.m_map; + return *this; + } KOKKOS_INLINE_FUNCTION - View & operator = ( View && rhs ) { m_track = std::move(rhs.m_track) ; m_map = std::move(rhs.m_map) ; return *this ; } - - + View& operator=(View&& rhs) { + m_track = std::move(rhs.m_track); + m_map = std::move(rhs.m_map); + return *this; + } //---------------------------------------- // Compatible view copy constructor and assignment // may assign unmanaged from managed. - template< class RT , class ... RP > - KOKKOS_INLINE_FUNCTION - View( const View & rhs, - typename std::enable_if::traits , typename traits::specialize >::is_assignable_data_type>::type* = 0 - ) - : m_track( rhs.m_track , traits::is_managed ) - , m_map() - { - typedef typename View::traits SrcTraits ; - typedef Kokkos::Impl::ViewMapping< traits , SrcTraits , typename traits::specialize > Mapping ; - static_assert( Mapping::is_assignable , "Incompatible View copy construction" ); - Mapping::assign( m_map , rhs.m_map , rhs.m_track ); - } + template + KOKKOS_INLINE_FUNCTION View( + const View& rhs, + typename std::enable_if::traits, + typename traits::specialize>::is_assignable_data_type>::type* = 0) + : m_track(rhs.m_track, traits::is_managed), m_map() { + typedef typename View::traits SrcTraits; + typedef Kokkos::Impl::ViewMapping + Mapping; + static_assert(Mapping::is_assignable, + "Incompatible View copy construction"); + Mapping::assign(m_map, rhs.m_map, rhs.m_track); + } - template< class RT , class ... RP > - KOKKOS_INLINE_FUNCTION - typename std::enable_if::traits , typename traits::specialize >::is_assignable_data_type, - View>::type & operator = ( const View & rhs ) - { - typedef typename View::traits SrcTraits ; - typedef Kokkos::Impl::ViewMapping< traits , SrcTraits , typename traits::specialize > Mapping ; - static_assert( Mapping::is_assignable , "Incompatible View copy assignment" ); - Mapping::assign( m_map , rhs.m_map , rhs.m_track ); - m_track.assign( rhs.m_track , traits::is_managed ); - return *this ; - } + template + KOKKOS_INLINE_FUNCTION typename std::enable_if< + Kokkos::Impl::ViewMapping< + traits, typename View::traits, + typename traits::specialize>::is_assignable_data_type, + View>::type& + operator=(const View& rhs) { + typedef typename View::traits SrcTraits; + typedef Kokkos::Impl::ViewMapping + Mapping; + static_assert(Mapping::is_assignable, "Incompatible View copy assignment"); + Mapping::assign(m_map, rhs.m_map, rhs.m_track); + m_track.assign(rhs.m_track, traits::is_managed); + return *this; + } //---------------------------------------- // Compatible subview constructor // may assign unmanaged from managed. - template< class RT , class ... RP , class Arg0 , class ... Args > - KOKKOS_INLINE_FUNCTION - View( const View< RT , RP... > & src_view - , const Arg0 arg0 , Args ... args ) - : m_track( src_view.m_track , traits::is_managed ) - , m_map() - { - typedef View< RT , RP... > SrcType ; + template + KOKKOS_INLINE_FUNCTION View(const View& src_view, const Arg0 arg0, + Args... args) + : m_track(src_view.m_track, traits::is_managed), m_map() { + typedef View SrcType; - typedef Kokkos::Impl::ViewMapping - < void /* deduce destination view type from source view traits */ - , typename SrcType::traits - , Arg0 , Args... > Mapping ; + typedef Kokkos::Impl::ViewMapping + Mapping; - typedef typename Mapping::type DstType ; + typedef typename Mapping::type DstType; - static_assert( Kokkos::Impl::ViewMapping< traits , typename DstType::traits , typename traits::specialize >::is_assignable - , "Subview construction requires compatible view and subview arguments" ); + static_assert( + Kokkos::Impl::ViewMapping::is_assignable, + "Subview construction requires compatible view and subview arguments"); - Mapping::assign( m_map, src_view.m_map, arg0 , args... ); - } + Mapping::assign(m_map, src_view.m_map, arg0, args...); + } //---------------------------------------- // Allocation tracking properties KOKKOS_INLINE_FUNCTION - int use_count() const - { return m_track.use_count(); } + int use_count() const { return m_track.use_count(); } - inline - const std::string label() const - { return m_track.template get_label< typename traits::memory_space >(); } + inline const std::string label() const { + return m_track.template get_label(); + } //---------------------------------------- // Allocation according to allocation properties and array layout - template< class ... P > - explicit inline - View( const Impl::ViewCtorProp< P ... > & arg_prop - , typename std::enable_if< ! Impl::ViewCtorProp< P... >::has_pointer - , typename traits::array_layout - >::type const & arg_layout - ) - : m_track() - , m_map() - { - // Append layout and spaces if not input - typedef Impl::ViewCtorProp< P ... > alloc_prop_input ; + template + explicit inline View( + const Impl::ViewCtorProp& arg_prop, + typename std::enable_if::has_pointer, + typename traits::array_layout>::type const& + arg_layout) + : m_track(), m_map() { + // Append layout and spaces if not input + typedef Impl::ViewCtorProp alloc_prop_input; - // use 'std::integral_constant' for non-types - // to avoid duplicate class error. - typedef Impl::ViewCtorProp - < P ... - , typename std::conditional - < alloc_prop_input::has_label - , std::integral_constant - , typename std::string - >::type - , typename std::conditional - < alloc_prop_input::has_memory_space - , std::integral_constant - , typename traits::device_type::memory_space - >::type - , typename std::conditional - < alloc_prop_input::has_execution_space - , std::integral_constant - , typename traits::device_type::execution_space - >::type - > alloc_prop ; + // use 'std::integral_constant' for non-types + // to avoid duplicate class error. + typedef Impl::ViewCtorProp< + P..., + typename std::conditional, + typename std::string>::type, + typename std::conditional< + alloc_prop_input::has_memory_space, + std::integral_constant, + typename traits::device_type::memory_space>::type, + typename std::conditional< + alloc_prop_input::has_execution_space, + std::integral_constant, + typename traits::device_type::execution_space>::type> + alloc_prop; - static_assert( traits::is_managed - , "View allocation constructor requires managed memory" ); + static_assert(traits::is_managed, + "View allocation constructor requires managed memory"); - if ( alloc_prop::initialize && + if (alloc_prop::initialize && #ifdef KOKKOS_ENABLE_DEPRECATED_CODE - ! alloc_prop::execution_space::is_initialized() + !alloc_prop::execution_space::is_initialized() #else - ! alloc_prop::execution_space::impl_is_initialized() + !alloc_prop::execution_space::impl_is_initialized() #endif - ) { - // If initializing view data then - // the execution space must be initialized. - Kokkos::Impl::throw_runtime_exception("Constructing View and initializing data with uninitialized execution space"); - } - - // Copy the input allocation properties with possibly defaulted properties - alloc_prop prop_copy( arg_prop ); - -//------------------------------------------------------------ -#if defined( KOKKOS_ENABLE_CUDA ) - // If allocating in CudaUVMSpace must fence before and after - // the allocation to protect against possible concurrent access - // on the CPU and the GPU. - // Fence using the trait's executon space (which will be Kokkos::Cuda) - // to avoid incomplete type errors from usng Kokkos::Cuda directly. - if ( std::is_same< Kokkos::CudaUVMSpace , typename traits::device_type::memory_space >::value ) { - typename traits::device_type::memory_space::execution_space().fence(); - } -#endif -//------------------------------------------------------------ - - Kokkos::Impl::SharedAllocationRecord<> * - record = m_map.allocate_shared( prop_copy , arg_layout ); - -//------------------------------------------------------------ -#if defined( KOKKOS_ENABLE_CUDA ) - if ( std::is_same< Kokkos::CudaUVMSpace , typename traits::device_type::memory_space >::value ) { - typename traits::device_type::memory_space::execution_space().fence(); - } -#endif -//------------------------------------------------------------ - - // Setup and initialization complete, start tracking - m_track.assign_allocated_record_to_uninitialized( record ); + ) { + // If initializing view data then + // the execution space must be initialized. + Kokkos::Impl::throw_runtime_exception( + "Constructing View and initializing data with uninitialized " + "execution space"); } + // Copy the input allocation properties with possibly defaulted properties + alloc_prop prop_copy(arg_prop); + +//------------------------------------------------------------ +#if defined(KOKKOS_ENABLE_CUDA) + // If allocating in CudaUVMSpace must fence before and after + // the allocation to protect against possible concurrent access + // on the CPU and the GPU. + // Fence using the trait's executon space (which will be Kokkos::Cuda) + // to avoid incomplete type errors from usng Kokkos::Cuda directly. + if (std::is_same::value) { + typename traits::device_type::memory_space::execution_space().fence(); + } +#endif + //------------------------------------------------------------ + + Kokkos::Impl::SharedAllocationRecord<>* record = + m_map.allocate_shared(prop_copy, arg_layout); + +//------------------------------------------------------------ +#if defined(KOKKOS_ENABLE_CUDA) + if (std::is_same::value) { + typename traits::device_type::memory_space::execution_space().fence(); + } +#endif + //------------------------------------------------------------ + + // Setup and initialization complete, start tracking + m_track.assign_allocated_record_to_uninitialized(record); + } + KOKKOS_INLINE_FUNCTION - void assign_data( pointer_type arg_data ) - { - m_track.clear(); - m_map.assign_data( arg_data ); - } + void assign_data(pointer_type arg_data) { + m_track.clear(); + m_map.assign_data(arg_data); + } // Wrap memory according to properties and array layout - template< class ... P > - explicit KOKKOS_INLINE_FUNCTION - View( const Impl::ViewCtorProp< P ... > & arg_prop - , typename std::enable_if< Impl::ViewCtorProp< P... >::has_pointer - , typename traits::array_layout - >::type const & arg_layout - ) - : m_track() // No memory tracking - , m_map( arg_prop , arg_layout ) - { - static_assert( - std::is_same< pointer_type - , typename Impl::ViewCtorProp< P... >::pointer_type - >::value , - "Constructing View to wrap user memory must supply matching pointer type" ); - } + template + explicit KOKKOS_INLINE_FUNCTION View( + const Impl::ViewCtorProp& arg_prop, + typename std::enable_if::has_pointer, + typename traits::array_layout>::type const& + arg_layout) + : m_track() // No memory tracking + , + m_map(arg_prop, arg_layout) { + static_assert( + std::is_same::pointer_type>::value, + "Constructing View to wrap user memory must supply matching pointer " + "type"); + } // Simple dimension-only layout - template< class ... P > - explicit inline - View( const Impl::ViewCtorProp< P ... > & arg_prop - , typename std::enable_if< ! Impl::ViewCtorProp< P... >::has_pointer - , size_t - >::type const arg_N0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - ) - : View( arg_prop - , typename traits::array_layout - ( arg_N0 , arg_N1 , arg_N2 , arg_N3 - , arg_N4 , arg_N5 , arg_N6 , arg_N7 ) - ) - { + template + explicit inline View( + const Impl::ViewCtorProp& arg_prop, + typename std::enable_if::has_pointer, + size_t>::type const arg_N0 = + KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG) + : View(arg_prop, + typename traits::array_layout(arg_N0, arg_N1, arg_N2, arg_N3, + arg_N4, arg_N5, arg_N6, arg_N7)) { #ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - Impl::runtime_check_rank_host(traits::rank_dynamic, std::is_same::value, arg_N0, arg_N1, arg_N2, arg_N3, - arg_N4, arg_N5, arg_N6, arg_N7, label()); + Impl::runtime_check_rank_host( + traits::rank_dynamic, + std::is_same::value, arg_N0, arg_N1, + arg_N2, arg_N3, arg_N4, arg_N5, arg_N6, arg_N7, label()); #else - Impl::runtime_check_rank_device(traits::rank_dynamic, std::is_same::value, arg_N0, arg_N1, arg_N2, arg_N3, - arg_N4, arg_N5, arg_N6, arg_N7); + Impl::runtime_check_rank_device( + traits::rank_dynamic, + std::is_same::value, arg_N0, arg_N1, + arg_N2, arg_N3, arg_N4, arg_N5, arg_N6, arg_N7); #endif + } - } - - template< class ... P > - explicit KOKKOS_INLINE_FUNCTION - View( const Impl::ViewCtorProp< P ... > & arg_prop - , typename std::enable_if< Impl::ViewCtorProp< P... >::has_pointer - , size_t - >::type const arg_N0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - , const size_t arg_N7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG - ) - : View( arg_prop - , typename traits::array_layout - ( arg_N0 , arg_N1 , arg_N2 , arg_N3 - , arg_N4 , arg_N5 , arg_N6 , arg_N7 ) - ) - { + template + explicit KOKKOS_INLINE_FUNCTION View( + const Impl::ViewCtorProp& arg_prop, + typename std::enable_if::has_pointer, + size_t>::type const arg_N0 = + KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, + const size_t arg_N7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG) + : View(arg_prop, + typename traits::array_layout(arg_N0, arg_N1, arg_N2, arg_N3, + arg_N4, arg_N5, arg_N6, arg_N7)) { #ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - Impl::runtime_check_rank_host(traits::rank_dynamic, std::is_same::value, arg_N0, arg_N1, arg_N2, arg_N3, - arg_N4, arg_N5, arg_N6, arg_N7, label()); + Impl::runtime_check_rank_host( + traits::rank_dynamic, + std::is_same::value, arg_N0, arg_N1, + arg_N2, arg_N3, arg_N4, arg_N5, arg_N6, arg_N7, label()); #else - Impl::runtime_check_rank_device(traits::rank_dynamic, std::is_same::value, arg_N0, arg_N1, arg_N2, arg_N3, - arg_N4, arg_N5, arg_N6, arg_N7); + Impl::runtime_check_rank_device( + traits::rank_dynamic, + std::is_same::value, arg_N0, arg_N1, + arg_N2, arg_N3, arg_N4, arg_N5, arg_N6, arg_N7); #endif - - } + } // Allocate with label and layout - template< typename Label > - explicit inline - View( const Label & arg_label - , typename std::enable_if< - Kokkos::Impl::is_view_label