Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78703803
gridcomm_kokkos.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 22, 12:25
Size
2 KB
Mime Type
text/x-c
Expires
Sat, Aug 24, 12:25 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
20063998
Attached To
rLAMMPS lammps
gridcomm_kokkos.h
View Options
/* -*- 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.
------------------------------------------------------------------------- */
#ifndef LMP_GRIDCOMM_KOKKOS_H
#define LMP_GRIDCOMM_KOKKOS_H
#include "pointers.h"
#include "kokkos_type.h"
#ifdef FFT_SINGLE
typedef float FFT_SCALAR;
#define MPI_FFT_SCALAR MPI_FLOAT
#else
typedef double FFT_SCALAR;
#define MPI_FFT_SCALAR MPI_DOUBLE
#endif
namespace LAMMPS_NS {
template<class DeviceType>
class GridCommKokkos : protected Pointers {
public:
typedef DeviceType device_type;
typedef ArrayTypes<DeviceType> AT;
GridCommKokkos(class LAMMPS *, MPI_Comm, int, int,
int, int, int, int, int, int,
int, int, int, int, int, int,
int, int, int, int, int, int);
GridCommKokkos(class LAMMPS *, MPI_Comm, int, int,
int, int, int, int, int, int,
int, int, int, int, int, int,
int, int, int, int, int, int,
int, int, int, int, int, int);
~GridCommKokkos();
void ghost_notify();
int ghost_overlap();
void setup();
void forward_comm(class KSpace *, int);
void reverse_comm(class KSpace *, int);
double memory_usage();
private:
int me;
int nforward,nreverse;
MPI_Comm gridcomm;
MPI_Request request;
// in = inclusive indices of 3d grid chunk that I own
// out = inclusive indices of 3d grid chunk I own plus ghosts I use
// proc = 6 neighbor procs that surround me
// ghost = # of my owned grid planes needed from me
// by each of 6 neighbor procs to become their ghost planes
int inxlo,inxhi,inylo,inyhi,inzlo,inzhi;
int outxlo,outxhi,outylo,outyhi,outzlo,outzhi;
int outxlo_max,outxhi_max,outylo_max,outyhi_max,outzlo_max,outzhi_max;
int procxlo,procxhi,procylo,procyhi,proczlo,proczhi;
int ghostxlo,ghostxhi,ghostylo,ghostyhi,ghostzlo,ghostzhi;
int nbuf;
//FFT_SCALAR *buf1,*buf2;
DAT::tdual_FFT_SCALAR_1d k_buf1;
DAT::tdual_FFT_SCALAR_1d k_buf2;
struct Swap {
int sendproc; // proc to send to for forward comm
int recvproc; // proc to recv from for forward comm
int npack; // # of datums to pack
int nunpack; // # of datums to unpack
//int *packlist; // 3d array offsets to pack
//int *unpacklist; // 3d array offsets to unpack
};
DAT::tdual_int_2d k_packlist;
DAT::tdual_int_2d k_unpacklist;
int nswap;
Swap *swap;
int indices(DAT::tdual_int_2d &, int, int, int, int, int, int, int);
};
}
#endif
Event Timeline
Log In to Comment