2010-11-23 08:40:35 +08:00
|
|
|
# /* ----------------------------------------------------------------------
|
2011-12-02 23:51:43 +08:00
|
|
|
# Generic Linux Makefile for CUDA
|
|
|
|
# - Change CUDA_ARCH for your GPU
|
2010-11-23 08:40:35 +08:00
|
|
|
# ------------------------------------------------------------------------- */
|
|
|
|
|
2013-05-31 04:04:31 +08:00
|
|
|
# which file will be copied to Makefile.lammps
|
|
|
|
|
|
|
|
EXTRAMAKE = Makefile.lammps.standard
|
|
|
|
|
2016-06-18 07:07:24 +08:00
|
|
|
ifeq($(CUDA_HOME),)
|
2010-11-23 08:40:35 +08:00
|
|
|
CUDA_HOME = /usr/local/cuda
|
2016-06-18 07:07:24 +08:00
|
|
|
endif
|
|
|
|
|
2010-11-23 08:40:35 +08:00
|
|
|
NVCC = nvcc
|
|
|
|
|
2011-10-08 07:52:06 +08:00
|
|
|
# Tesla CUDA
|
|
|
|
CUDA_ARCH = -arch=sm_21
|
2011-05-19 04:03:24 +08:00
|
|
|
# newer CUDA
|
2011-10-08 07:52:06 +08:00
|
|
|
#CUDA_ARCH = -arch=sm_13
|
2011-05-19 04:03:24 +08:00
|
|
|
# older CUDA
|
|
|
|
#CUDA_ARCH = -arch=sm_10 -DCUDA_PRE_THREE
|
2016-06-18 07:07:24 +08:00
|
|
|
CUDA_ARCH = -arch=sm_35
|
2011-05-19 04:03:24 +08:00
|
|
|
|
2014-01-29 08:07:38 +08:00
|
|
|
# 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
|
2014-01-26 07:53:12 +08:00
|
|
|
|
|
|
|
CUDA_PRECISION = -D_SINGLE_DOUBLE
|
2014-01-29 08:07:38 +08:00
|
|
|
|
2010-11-23 08:40:35 +08:00
|
|
|
CUDA_INCLUDE = -I$(CUDA_HOME)/include
|
|
|
|
CUDA_LIB = -L$(CUDA_HOME)/lib64
|
2014-01-26 07:53:12 +08:00
|
|
|
CUDA_OPTS = -DUNIX -O3 -Xptxas -v --use_fast_math $(LMP_INC)
|
2010-11-23 08:40:35 +08:00
|
|
|
|
2016-06-18 07:07:24 +08:00
|
|
|
CUDR_CPP = mpic++ -DMPI_GERYON -DUCL_NO_EXIT -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1 -fPIC
|
2014-01-26 07:53:12 +08:00
|
|
|
CUDR_OPTS = -O2 $(LMP_INC) # -xHost -no-prec-div -ansi-alias
|
2010-11-23 08:40:35 +08:00
|
|
|
|
|
|
|
BIN_DIR = ./
|
2011-01-12 23:24:04 +08:00
|
|
|
OBJ_DIR = ./
|
2010-11-23 08:40:35 +08:00
|
|
|
LIB_DIR = ./
|
|
|
|
AR = ar
|
|
|
|
BSH = /bin/sh
|
|
|
|
|
2012-01-31 08:55:55 +08:00
|
|
|
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
2012-01-25 23:31:54 +08:00
|
|
|
|
2010-11-23 08:40:35 +08:00
|
|
|
include Nvidia.makefile
|
|
|
|
|