git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7317 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2011-12-08 23:12:19 +00:00
parent 96e9210c16
commit 4a2feb25b2
11 changed files with 47 additions and 12 deletions

View File

@ -1,4 +1,4 @@
OCL = $(OCL_CPP) $(OCL_PREC) -DUSE_OPENCL OCL = $(OCL_CPP) $(OCL_PREC) $(OCL_TUNE) -DUSE_OPENCL
OCL_LIB = $(LIB_DIR)/libgpu.a OCL_LIB = $(LIB_DIR)/libgpu.a
# Headers for Geryon # Headers for Geryon
UCL_H = $(wildcard ./geryon/ucl*.h) UCL_H = $(wildcard ./geryon/ucl*.h)

View File

@ -3,7 +3,7 @@
------------------- -------------------
W. Michael Brown (ORNL) W. Michael Brown (ORNL)
Class for acceleration of the cg/cmm/cut pair style Class for acceleration of the lj/sdk/cut pair style
__________________________________________________________________________ __________________________________________________________________________
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)

View File

@ -3,7 +3,7 @@
// ------------------- // -------------------
// W. Michael Brown (ORNL) // W. Michael Brown (ORNL)
// //
// Device code for acceleration of the cg/cmm/cut pair style // Device code for acceleration of the lj/sdk pair style
// //
// __________________________________________________________________________ // __________________________________________________________________________
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) // This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)

View File

@ -3,7 +3,7 @@
------------------- -------------------
W. Michael Brown (ORNL) W. Michael Brown (ORNL)
Class for acceleration of the cg/cmm/cut pair style Class for acceleration of the lj/sdk pair style
__________________________________________________________________________ __________________________________________________________________________
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)

View File

@ -3,7 +3,7 @@
------------------- -------------------
W. Michael Brown (ORNL) W. Michael Brown (ORNL)
Functions for LAMMPS access to cg/cmm/cut pair acceleration routines Functions for LAMMPS access to lj/sdk pair acceleration routines
__________________________________________________________________________ __________________________________________________________________________
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
@ -42,7 +42,7 @@ int cmm_gpu_init(const int ntypes, double **cutsq, int **cg_types,
int gpu_rank=CMMMF.device->gpu_rank(); int gpu_rank=CMMMF.device->gpu_rank();
int procs_per_gpu=CMMMF.device->procs_per_gpu(); int procs_per_gpu=CMMMF.device->procs_per_gpu();
CMMMF.device->init_message(screen,"cg/cmm",first_gpu,last_gpu); CMMMF.device->init_message(screen,"lj/sdk",first_gpu,last_gpu);
bool message=false; bool message=false;
if (CMMMF.device->replica_me()==0 && screen) if (CMMMF.device->replica_me()==0 && screen)

View File

@ -3,7 +3,7 @@
------------------- -------------------
W. Michael Brown (ORNL) W. Michael Brown (ORNL)
Class for acceleration of the cg/cmm/coul/long pair style Class for acceleration of the lj/sdk/coul/long pair style
__________________________________________________________________________ __________________________________________________________________________
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)

View File

@ -3,7 +3,7 @@
// ------------------- // -------------------
// W. Michael Brown (ORNL) // W. Michael Brown (ORNL)
// //
// Device code for acceleration of the cg/cmm/coul/long pair style // Device code for acceleration of the lj/sdk/coul/long pair style
// //
// __________________________________________________________________________ // __________________________________________________________________________
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) // This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)

View File

@ -3,7 +3,7 @@
------------------- -------------------
W. Michael Brown (ORNL) W. Michael Brown (ORNL)
Class for acceleration of the cg/cmm/coul/long pair style Class for acceleration of the lj/sdk/coul/long pair style
__________________________________________________________________________ __________________________________________________________________________
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)

View File

@ -3,7 +3,7 @@
------------------- -------------------
W. Michael Brown (ORNL) W. Michael Brown (ORNL)
Functions for LAMMPS access to cg/cmm/coul/long acceleration functions Functions for LAMMPS access to lj/sdk/coul/long acceleration functions
__________________________________________________________________________ __________________________________________________________________________
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
@ -44,7 +44,7 @@ int cmml_gpu_init(const int ntypes, double **cutsq, int **cg_type,
int gpu_rank=CMMLMF.device->gpu_rank(); int gpu_rank=CMMLMF.device->gpu_rank();
int procs_per_gpu=CMMLMF.device->procs_per_gpu(); int procs_per_gpu=CMMLMF.device->procs_per_gpu();
CMMLMF.device->init_message(screen,"cg/cmm/coul/long",first_gpu,last_gpu); CMMLMF.device->init_message(screen,"lj/sdk/coul/long",first_gpu,last_gpu);
bool message=false; bool message=false;
if (CMMLMF.device->replica_me()==0 && screen) if (CMMLMF.device->replica_me()==0 && screen)

View File

@ -84,10 +84,17 @@ inline std::ostream & operator<<(std::ostream &out, const _lgpu_double4 &v) {
enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE}; enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE};
// OCL_VENDOR: preprocessor define for hardware
// specific sizes of OpenCL kernel related constants
#ifdef FERMI_OCL #ifdef FERMI_OCL
#define OCL_VENDOR "FERMI_OCL" #define OCL_VENDOR "FERMI_OCL"
#endif #endif
#ifdef CYPRESS_OCL
#define OCL_VENDOR "CYPRESS_OCL"
#endif
#ifndef OCL_VENDOR #ifndef OCL_VENDOR
#define OCL_VENDOR "GENERIC_OCL" #define OCL_VENDOR "GENERIC_OCL"
#endif #endif

View File

@ -175,7 +175,7 @@ typedef struct _double4 double4;
#endif #endif
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
// FERMI OPENCL DEFINITIONS // NVIDIA FERMI OPENCL DEFINITIONS
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
#ifdef FERMI_OCL #ifdef FERMI_OCL
@ -202,6 +202,34 @@ typedef struct _double4 double4;
#endif #endif
// -------------------------------------------------------------------------
// AMD CYPRESS OPENCL DEFINITIONS
// -------------------------------------------------------------------------
#ifdef CYPRESS_OCL
#define USE_OPENCL
#define fast_mul(X,Y) (X)*(Y)
#define ARCH 0
#define DRIVER 0
#define MEM_THREADS 32
#define THREADS_PER_ATOM 4
#define THREADS_PER_CHARGE 8
#define BLOCK_PAIR 128
#define MAX_SHARED_TYPES 8
#define BLOCK_NBOR_BUILD 64
#define BLOCK_BIO_PAIR 64
#define WARP_SIZE 64
#define PPPM_BLOCK_1D 64
#define BLOCK_CELL_2D 8
#define BLOCK_CELL_ID 128
#define MAX_BIO_SHARED_TYPES 128
#pragma OPENCL EXTENSION cl_khr_fp64: enable
#endif
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
// GENERIC OPENCL DEFINITIONS // GENERIC OPENCL DEFINITIONS
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------