From 8b2b5c855fc4168915ef4833afc66062badbcd6f Mon Sep 17 00:00:00 2001 From: jjwilke Date: Mon, 6 Jan 2020 16:00:18 -0700 Subject: [PATCH] completely remove all ETI scripts and raw Makefiles --- Makefile.kokkos-kernels | 532 ---------- README.md | 22 - example/Makefile | 83 -- example/fenl/Makefile | 94 -- example/wiki/Makefile | 54 - example/wiki/blas/abs/Makefile | 14 - perf_test/Makefile | 129 --- perf_test/sparse/spmv/Makefile | 79 -- scripts/generate_makefile.bash | 510 --------- scripts/generate_specialization.bash | 97 -- scripts/generate_specialization_function.bash | 57 - ...nerate_specialization_function_sparse.bash | 62 -- ...ate_specialization_function_sparse_ml.bash | 64 -- scripts/generate_specialization_spmv.bash | 43 - .../generate_specialization_spmv_type.bash | 48 - scripts/generate_specialization_type.bash | 70 -- .../generate_specialization_type_sparse.bash | 85 -- ...enerate_specialization_type_sparse_ml.bash | 94 -- scripts/test_all_sandia | 970 ------------------ src/Makefile | 99 -- unit_test/Makefile | 511 --------- unit_test/standalone/Makefile | 74 -- 22 files changed, 3791 deletions(-) delete mode 100644 Makefile.kokkos-kernels delete mode 100644 example/Makefile delete mode 100644 example/fenl/Makefile delete mode 100644 example/wiki/Makefile delete mode 100644 example/wiki/blas/abs/Makefile delete mode 100644 perf_test/Makefile delete mode 100644 perf_test/sparse/spmv/Makefile delete mode 100755 scripts/generate_makefile.bash delete mode 100755 scripts/generate_specialization.bash delete mode 100755 scripts/generate_specialization_function.bash delete mode 100755 scripts/generate_specialization_function_sparse.bash delete mode 100755 scripts/generate_specialization_function_sparse_ml.bash delete mode 100755 scripts/generate_specialization_spmv.bash delete mode 100755 scripts/generate_specialization_spmv_type.bash delete mode 100755 scripts/generate_specialization_type.bash delete mode 100755 scripts/generate_specialization_type_sparse.bash delete mode 100755 scripts/generate_specialization_type_sparse_ml.bash delete mode 100755 scripts/test_all_sandia delete mode 100644 src/Makefile delete mode 100644 unit_test/Makefile delete mode 100644 unit_test/standalone/Makefile diff --git a/Makefile.kokkos-kernels b/Makefile.kokkos-kernels deleted file mode 100644 index fa10e08faa..0000000000 --- a/Makefile.kokkos-kernels +++ /dev/null @@ -1,532 +0,0 @@ -# Path settings -KOKKOSKERNELS_PATH ?= ${HOME}/Kokkos/kokkos-kernels -KOKKOS_PATH ?= ${KOKKOSKERNELS_PATH}/../kokkos -KOKKOSKERNELS_INSTALL_PATH ?= ${CURDIR}/install - -# What to instantiate - -# double, float, complex, complex -KOKKOSKERNELS_SCALARS ?= double -KOKKOSKERNELS_LAYOUTS ?= LayoutLeft,LayoutRight -KOKKOSKERNELS_SPACES ?= $(KOKKOS_DEVICES),HostSpace -KOKKOSKERNELS_ORDINALS ?= int,int64_t -KOKKOSKERNELS_OFFSETS ?= int,size_t - -# mkl, blas, yaml, magma -KOKKOSKERNELS_ENABLE_TPLS ?= "" - -# eti-only -KOKKOSKERNELS_OPTIONS ?= "" - -KOKKOSKERNELS_INTERNAL_ENABLE_YAML := $(strip $(shell echo $(KOKKOSKERNELS_ENABLE_TPLS) | grep "yaml" | wc -l)) -KOKKOSKERNELS_INTERNAL_ENABLE_BLAS := $(strip $(shell echo $(KOKKOSKERNELS_ENABLE_TPLS) | grep "blas" | wc -l)) -KOKKOSKERNELS_INTERNAL_ENABLE_MKL := $(strip $(shell echo $(KOKKOSKERNELS_ENABLE_TPLS) | grep "mkl" | wc -l)) -KOKKOSKERNELS_INTERNAL_ENABLE_CUSPARSE := $(strip $(shell echo $(KOKKOSKERNELS_ENABLE_TPLS) | grep "cusparse" | wc -l)) -KOKKOSKERNELS_INTERNAL_ENABLE_CUBLAS := $(strip $(shell echo $(KOKKOSKERNELS_ENABLE_TPLS) | grep "cublas" | wc -l)) -KOKKOSKERNELS_INTERNAL_ENABLE_MAGMA := $(strip $(shell echo $(KOKKOSKERNELS_ENABLE_TPLS) | grep "magma" | wc -l)) - -YAML_PATH ?= ${HOME}/yaml-cpp/install -YAML_LIBS ?= -L${YAML_PATH}/lib -lyaml-cpp - -BLAS_PATH ?= /usr -BLAS_LIBS ?= -L${BLAS_PATH}/lib64 $(BLAS_LIBRARIES) -lgfortran -lgomp - -MKL_PATH ?= ${SEMS_INTEL_ROOT}/mkl -MKL_LIBS ?= -L${MKL_PATH}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl -L${MKL_PATH}/../compiler/lib/intel64 - -MAGMA_PATH ?= ${MAGMADIR} - -default-kokkos-kernels: kokkoskernels-build-lib - echo "Start Build" - - -CXXFLAGS ?= -g -O3 -LINKFLAGS ?= -g -O3 -KOKKOSKERNELS_INTERNAL_LIBRARY = libkokkos_kernels.a -KOKKOSKERNELS_LIBS = -lkokkos_kernels -KOKKOSKERNELS_LDFLAGS = -L./ - -KOKKOSKERNELSCOMMON_CPPFLAGS= -I$(KOKKOSKERNELS_PATH)/src/common -KOKKOSBLAS_CPPFLAGS= -I$(KOKKOSKERNELS_PATH)/src/blas -I$(KOKKOSKERNELS_PATH)/src/blas/impl -KOKKOSSPARSE_CPPFLAGS= -I$(KOKKOSKERNELS_PATH)/src/sparse -I$(KOKKOSKERNELS_PATH)/src/sparse/impl -KOKKOSGRAPH_CPPFLAGS= -I$(KOKKOSKERNELS_PATH)/src/graph -I$(KOKKOSKERNELS_PATH)/src/graph/impl -KOKKOSBATCHED_CPPFLAGS= -I$(KOKKOSKERNELS_PATH)/src/batched - -KOKKOSKERNELS_CPPFLAGS = -I$(KOKKOSKERNELS_PATH)/src -I$(KOKKOSKERNELS_PATH)/src/impl -I$(KOKKOSKERNELS_PATH)/src/impl/tpls $(KOKKOSSPARSE_CPPFLAGS) $(KOKKOSGRAPH_CPPFLAGS) $(KOKKOSKERNELUTILS_CPPFLAGS) $(KOKKOSBLAS_CPPFLAGS) $(KOKKOSBATCHED_CPPFLAGS) $(KOKKOSKERNELSCOMMON_CPPFLAGS) - -KOKKOSKERNELS_LINK_DEPENDS = $(KOKKOSKERNELS_INTERNAL_LIBRARY) - -LINK ?= ${CXX} - -ifndef KOKKOS_CXXFLAGS - include $(KOKKOS_PATH)/Makefile.kokkos -endif - - -#========================================================================= -#==== Generate KokkosKernels_config.h ==================================== -#========================================================================= - -tmp := $(shell echo "/* ---------------------------------------------" > KokkosKernels_config.tmp) -tmp := $(shell echo "Makefile constructed configuration:" >> KokkosKernels_config.tmp) -tmp := $(shell date >> KokkosKernels_config.tmp) -tmp := $(shell echo "----------------------------------------------*/" >> KokkosKernels_config.tmp) -tmp := $(shell echo "\#ifndef KOKKOSKERNELS_CONFIG_H_" >> KokkosKernels_config.tmp) -tmp := $(shell echo "\#define KOKKOSKERNELS_CONFIG_H_" >> KokkosKernels_config.tmp) - - -#==== User-settable options for Fortran mangling macros ================= -#With Makefile build, we rely on users' input - -# default mangling scheme with a single under score -KOKKOSKERNELS_FORTRAN_GLOBAL = name\#\#_ -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_MAGMA}, 1) - MAGMA_FORTRAN_MANGLING = ADD_ -endif - -KOKKOSKERNELS_INTERNAL_OVERRIDE_FORTRAN_MANGLING_WITH_DOUBLE_UNDERSCORES := $(strip $(shell echo $(KOKKOSKERNELS_OPTIONS) | grep "blas-mangle__" | wc -l)) -ifeq ($(KOKKOSKERNELS_INTERNAL_OVERRIDE_FORTRAN_MANGLING_WITH_DOUBLE_UNDERSCORES), 1) - KOKKOSKERNELS_FORTRAN_GLOBAL = name\#\#__ - ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_MAGMA}, 1) - $(error MAGMA does not prefer Fortran mangling with double underscore) - endif -else - KOKKOSKERNELS_INTERNAL_OVERRIDE_FORTRAN_MANGLING_WITH_SINGLE_UNDERSCORE := $(strip $(shell echo $(KOKKOSKERNELS_OPTIONS) | grep "blas-mangle_" | wc -l)) - ifeq ($(KOKKOSKERNELS_INTERNAL_OVERRIDE_FORTRAN_MANGLING_WITH_SINGLE_UNDERSCORE), 1) - KOKKOSKERNELS_FORTRAN_GLOBAL = name\#\#_ - ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_MAGMA}, 1) - MAGMA_FORTRAN_MANGLING = ADD_ - endif - else - KOKKOSKERNELS_INTERNAL_OVERRIDE_FORTRAN_MANGLING_WITH_NO_UNDERSCORE := $(strip $(shell echo $(KOKKOSKERNELS_OPTIONS) | grep "blas-mangle" | wc -l)) - ifeq ($(KOKKOSKERNELS_INTERNAL_OVERRIDE_FORTRAN_MANGLING_WITH_NO_UNDERSCORE), 1) - KOKKOSKERNELS_FORTRAN_GLOBAL = name\#\# - ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_MAGMA}, 1) - MAGMA_FORTRAN_MANGLING = NOCHANGE - endif - endif - endif -endif - -tmp := $(shell echo "" >> KokkosKernels_config.tmp) -tmp := $(shell echo "/* ---------------------------------------------" >> KokkosKernels_config.tmp) -tmp := $(shell echo "Fortran BLAS mangling:" >> KokkosKernels_config.tmp) -tmp := $(shell echo " ---------------------------------------------*/" >> KokkosKernels_config.tmp) -tmp := $(shell echo "\#if !defined(F77_BLAS_MANGLE)" >> KokkosKernels_config.tmp ) -tmp := $(shell echo "\#define F77_BLAS_MANGLE(name,NAME) $(KOKKOSKERNELS_FORTRAN_GLOBAL)" >> KokkosKernels_config.tmp) -tmp := $(shell echo "\#endif" >> KokkosKernels_config.tmp ) - -KOKKOSKERNELS_INTERNAL_TPL_BLAS_RETURN_COMPLEX := $(strip $(shell echo $(KOKKOSKERNELS_OPTIONS) | grep "blas-return-complex" | wc -l)) -ifeq ($(KOKKOSKERNELS_INTERNAL_TPL_BLAS_RETURN_COMPLEX), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_TPL_BLAS_RETURN_COMPLEX" >> KokkosKernels_config.tmp ) -endif - -#==== ETI Macros Scalars ================================================= -KOKKOSKERNELS_INTERNAL_INST_SCALARS = -KOKKOSKERNELS_INTERNAL_INST_DOUBLE=$(strip $(shell echo "$(KOKKOSKERNELS_SCALARS)" | grep "double" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_FLOAT=$(strip $(shell echo "$(KOKKOSKERNELS_SCALARS)" | grep "float" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_COMPLEX_DOUBLE_=$(strip $(shell echo "$(KOKKOSKERNELS_SCALARS)" | grep "complex" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_COMPLEX_FLOAT_=$(strip $(shell echo "$(KOKKOSKERNELS_SCALARS)" | grep "complex" | wc -l)) - -tmp := $(shell echo "" >> KokkosKernels_config.tmp) -tmp := $(shell echo "/* ---------------------------------------------" >> KokkosKernels_config.tmp) -tmp := $(shell echo "ETI Scalar Types:" >> KokkosKernels_config.tmp) -tmp := $(shell echo " ---------------------------------------------*/" >> KokkosKernels_config.tmp) - -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_DOUBLE), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_DOUBLE" >> KokkosKernels_config.tmp ) - KOKKOSKERNELS_INTERNAL_INST_SCALARS += "double" -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_FLOAT), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_FLOAT" >> KokkosKernels_config.tmp ) - KOKKOSKERNELS_INTERNAL_INST_SCALARS += "float" -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_COMPLEX_DOUBLE_), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_COMPLEX_DOUBLE" >> KokkosKernels_config.tmp ) - KOKKOSKERNELS_INTERNAL_INST_SCALARS += "Kokkos::complex" -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_COMPLEX_FLOAT_), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_COMPLEX_FLOAT" >> KokkosKernels_config.tmp ) - KOKKOSKERNELS_INTERNAL_INST_SCALARS += "Kokkos::complex" -endif -tmp := $(shell echo "\#if defined(KOKKOSKERNELS_INST_COMPLEX_DOUBLE)" >> KokkosKernels_config.tmp ) -tmp := $(shell echo "\#define KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_" >> KokkosKernels_config.tmp ) -tmp := $(shell echo "\#endif" >> KokkosKernels_config.tmp ) -tmp := $(shell echo "\#if defined(KOKKOSKERNELS_INST_COMPLEX_FLOAT)" >> KokkosKernels_config.tmp ) -tmp := $(shell echo "\#define KOKKOSKERNELS_INST_KOKKOS_COMPLEX_FLOAT_" >> KokkosKernels_config.tmp ) -tmp := $(shell echo "\#endif" >> KokkosKernels_config.tmp ) - - -#==== ETI Macros ORDINALS ================================================= -KOKKOSKERNELS_INTERNAL_INST_ORDINALS = -KOKKOSKERNELS_INTERNAL_INST_ORDINAL_INT=$(strip $(shell echo "$(KOKKOSKERNELS_ORDINALS)" | grep "int" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_ORDINAL_INT64_T=$(strip $(shell echo "$(KOKKOSKERNELS_ORDINALS)" | grep "int64_t" | wc -l)) - -tmp := $(shell echo "" >> KokkosKernels_config.tmp) -tmp := $(shell echo "/* ---------------------------------------------" >> KokkosKernels_config.tmp) -tmp := $(shell echo "ETI Ordinal Types:" >> KokkosKernels_config.tmp) -tmp := $(shell echo " ---------------------------------------------*/" >> KokkosKernels_config.tmp) - -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_ORDINAL_INT), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_ORDINAL_INT" >> KokkosKernels_config.tmp ) - KOKKOSKERNELS_INTERNAL_INST_ORDINALS += "int" -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_ORDINAL_INT64_T), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_ORDINAL_INT64_T" >> KokkosKernels_config.tmp ) - KOKKOSKERNELS_INTERNAL_INST_ORDINALS += "int64_t" -endif - -#==== ETI Macros OFFSETS ================================================= -KOKKOSKERNELS_INTERNAL_INST_OFFSETS = -KOKKOSKERNELS_INTERNAL_INST_OFFSET_INT=$(strip $(shell echo "$(KOKKOSKERNELS_OFFSETS)" | grep "int" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_OFFSET_SIZE_T=$(strip $(shell echo "$(KOKKOSKERNELS_OFFSETS)" | grep "size_t" | wc -l)) - -tmp := $(shell echo "" >> KokkosKernels_config.tmp) -tmp := $(shell echo "/* ---------------------------------------------" >> KokkosKernels_config.tmp) -tmp := $(shell echo "ETI Offset Types:" >> KokkosKernels_config.tmp) -tmp := $(shell echo " ---------------------------------------------*/" >> KokkosKernels_config.tmp) - -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_OFFSET_INT), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_OFFSET_INT" >> KokkosKernels_config.tmp ) - KOKKOSKERNELS_INTERNAL_INST_OFFSETS += "int" -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_OFFSET_SIZE_T), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_OFFSET_SIZE_T" >> KokkosKernels_config.tmp ) - KOKKOSKERNELS_INTERNAL_INST_OFFSETS += "size_t" -endif - - -#==== ETI Macros Layouts ================================================= - -KOKKOSKERNELS_INTERNAL_INST_LAYOUTLEFT=$(strip $(shell echo $(KOKKOSKERNELS_LAYOUTS) | grep "LayoutLeft" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_LAYOUTRIGHT=$(strip $(shell echo $(KOKKOSKERNELS_LAYOUTS) | grep "LayoutRight" | wc -l)) - -tmp := $(shell echo "" >> KokkosKernels_config.tmp) -tmp := $(shell echo "/* ---------------------------------------------" >> KokkosKernels_config.tmp) -tmp := $(shell echo "ETI Layout Types:" >> KokkosKernels_config.tmp) -tmp := $(shell echo " ---------------------------------------------*/" >> KokkosKernels_config.tmp) - -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_LAYOUTLEFT), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_LAYOUTLEFT" >> KokkosKernels_config.tmp ) -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_LAYOUTRIGHT), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_LAYOUTRIGHT" >> KokkosKernels_config.tmp ) -endif - -#==== ETI Macros ExecutionSpaces ================================================= - -KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_SERIAL=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "Serial" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_OPENMP=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "OpenMP" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_THREADS=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "Pthread" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_CUDA=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "Cuda" | wc -l)) - -tmp := $(shell echo "" >> KokkosKernels_config.tmp) -tmp := $(shell echo "/* ---------------------------------------------" >> KokkosKernels_config.tmp) -tmp := $(shell echo "ETI ExecutionSpace Types:" >> KokkosKernels_config.tmp) -tmp := $(shell echo " ---------------------------------------------*/" >> KokkosKernels_config.tmp) - -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_SERIAL), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_EXECSPACE_SERIAL" >> KokkosKernels_config.tmp ) -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_OPENMP), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_EXECSPACE_OPENMP" >> KokkosKernels_config.tmp ) -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_THREADS), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_EXECSPACE_THREADS" >> KokkosKernels_config.tmp ) -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_CUDA), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_EXECSPACE_CUDA" >> KokkosKernels_config.tmp ) -endif - -#==== ETI Macros MemorySpaces ================================================= - -KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_HOSTSPACE=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "HostSpace" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_HBWSPACE=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "HBWSpace" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDASPACE=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "CudaS" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDAUVMSPACE=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "CudaUS" | wc -l)) -KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDAHOSTPINNEDSPACE=$(strip $(shell echo $(KOKKOSKERNELS_SPACES) | grep "CudaHPS" | wc -l)) - -tmp := $(shell echo "" >> KokkosKernels_config.tmp) -tmp := $(shell echo "/* ---------------------------------------------" >> KokkosKernels_config.tmp) -tmp := $(shell echo "ETI Memory Space Types:" >> KokkosKernels_config.tmp) -tmp := $(shell echo " ---------------------------------------------*/" >> KokkosKernels_config.tmp) - -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_HOSTSPACE), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_MEMSPACE_HOSTSPACE" >> KokkosKernels_config.tmp ) -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_HBWSPACE), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_MEMSPACE_HBWSPACE" >> KokkosKernels_config.tmp ) -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDASPACE), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_MEMSPACE_CUDASPACE" >> KokkosKernels_config.tmp ) -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDAUVMSPACE), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_MEMSPACE_CUDAUVMSPACE" >> KokkosKernels_config.tmp ) -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDAHOSTPINNEDSPACE), 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_MEMSPACE_CUDAHOSTPINNEDSPACE" >> KokkosKernels_config.tmp ) -endif - -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_CUDA), 1) - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDASPACE), 0) - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_MEMSPACE_CUDAUVMSPACE), 0) - tmp := $(shell echo "\#define KOKKOSKERNELS_INST_MEMSPACE_CUDASPACE" >> KokkosKernels_config.tmp ) - endif - endif -endif - - - -#==== Third Party Libraries ================================================= - -tmp := $(shell echo "" >> KokkosKernels_config.tmp) -tmp := $(shell echo "/* ---------------------------------------------" >> KokkosKernels_config.tmp) -tmp := $(shell echo "Third Party Libraries:" >> KokkosKernels_config.tmp) -tmp := $(shell echo " ---------------------------------------------*/" >> KokkosKernels_config.tmp) - -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_YAML}, 1) - KOKKOSKERNELS_CPPFLAGS += -I${YAML_PATH}/include - KOKKOSKERNELS_LIBS += ${YAML_LIBS} - tmp := $(shell echo "\#define KOKKOSKERNELS_ENABLE_TPL_YAML" >> KokkosKernels_config.tmp ) -endif - -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_BLAS}, 1) - KOKKOSKERNELS_LIBS += ${BLAS_LIBS} - tmp := $(shell echo "\#define KOKKOSKERNELS_ENABLE_TPL_BLAS" >> KokkosKernels_config.tmp ) -endif - -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_MKL}, 1) - KOKKOSKERNELS_CPPFLAGS += -I${MKL_PATH}/include - KOKKOSKERNELS_LIBS += ${MKL_LIBS} - - tmp := $(shell echo "\#define KOKKOSKERNELS_ENABLE_TPL_MKL" >> KokkosKernels_config.tmp ) -endif - -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_CUSPARSE}, 1) - KOKKOS_INTERNAL_NVCC_PATH := $(shell which nvcc) - CUDA_PATH ?= $(KOKKOS_INTERNAL_NVCC_PATH:/bin/nvcc=) - KOKKOSKERNELS_CPPFLAGS += -I${CUDA_PATH}/include - KOKKOSKERNELS_LDFLAGS += -L${CUDA_PATH}/lib - KOKKOSKERNELS_LIBS += -lcusparse - - tmp := $(shell echo "\#define KOKKOSKERNELS_ENABLE_TPL_CUSPARSE" >> KokkosKernels_config.tmp ) -endif - -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_CUBLAS}, 1) - KOKKOS_INTERNAL_NVCC_PATH := $(shell which nvcc) - CUDA_PATH ?= $(KOKKOS_INTERNAL_NVCC_PATH:/bin/nvcc=) - KOKKOSKERNELS_CPPFLAGS += -I${CUDA_PATH}/include - KOKKOSKERNELS_LDFLAGS += -L${CUDA_PATH}/lib - KOKKOSKERNELS_LIBS += -lcublas - - tmp := $(shell echo "\#define KOKKOSKERNELS_ENABLE_TPL_CUBLAS" >> KokkosKernels_config.tmp ) -endif - -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_MAGMA}, 1) - KOKKOS_INTERNAL_NVCC_PATH := $(shell which nvcc) - CUDA_PATH ?= $(KOKKOS_INTERNAL_NVCC_PATH:/bin/nvcc=) - KOKKOSKERNELS_CPPFLAGS += -D${MAGMA_FORTRAN_MANGLING} -I${MAGMA_PATH}/include -I${MAGMA_PATH}/sparse/include -I${CUDA_PATH}/include - KOKKOSKERNELS_LDFLAGS += -L${MAGMA_PATH}/lib -L${CUDA_PATH}/lib64 - KOKKOSKERNELS_LIBS += -lmagma_sparse -lmagma -lcublas -lcudart -lcusparse -fopenmp - - tmp := $(shell echo "\#define KOKKOSKERNELS_ENABLE_TPL_MAGMA" >> KokkosKernels_config.tmp ) -endif - - tmp := $(shell echo "\#if defined(KOKKOSKERNELS_ENABLE_TPL_MKL)" >> KokkosKernels_config.tmp ) - tmp := $(shell echo "\#if !defined(KOKKOSKERNELS_ENABLE_TPL_BLAS)" >> KokkosKernels_config.tmp ) - tmp := $(shell echo "\#define KOKKOSKERNELS_ENABLE_TPL_BLAS" >> KokkosKernels_config.tmp ) - tmp := $(shell echo "\#endif" >> KokkosKernels_config.tmp ) - tmp := $(shell echo "\#endif" >> KokkosKernels_config.tmp ) - -#==== Options ================================================= - -tmp := $(shell echo "" >> KokkosKernels_config.tmp) -tmp := $(shell echo "/* ---------------------------------------------" >> KokkosKernels_config.tmp) -tmp := $(shell echo "Optional Settings:" >> KokkosKernels_config.tmp) -tmp := $(shell echo " ---------------------------------------------*/" >> KokkosKernels_config.tmp) - -KOKKOSKERNELS_INTERNAL_ETI_ONLY := $(strip $(shell echo $(KOKKOSKERNELS_OPTIONS) | grep "eti-only" | wc -l)) - -ifeq (${KOKKOSKERNELS_INTERNAL_ETI_ONLY}, 1) - tmp := $(shell echo "\#define KOKKOSKERNELS_ETI_ONLY" >> KokkosKernels_config.tmp ) -endif - -#==== Put in guard for library compilations =========================== -tmp := $(shell echo "" >> KokkosKernels_config.tmp) -tmp := $(shell echo "\#ifndef KOKKOSKERNELS_IMPL_COMPILE_LIBRARY" >> KokkosKernels_config.tmp) -tmp := $(shell echo "\#define KOKKOSKERNELS_IMPL_COMPILE_LIBRARY false" >> KokkosKernels_config.tmp) -tmp := $(shell echo "\#endif " >> KokkosKernels_config.tmp) -tmp := $(shell echo "" >> KokkosKernels_config.tmp) - -#==== Endif the file ================================================= - -tmp := $(shell echo "\#endif // KOKKOSKERNELS_CONFIG_H_" >> KokkosKernels_config.tmp) - -#==== Update the config file if necessary ================================================= - -KOKKOSKERNELS_INTERNAL_LS_CONFIG := $(shell ls KokkosKernels_config.h) -ifeq ($(KOKKOSKERNELS_INTERNAL_LS_CONFIG), KokkosKernels_config.h) - KOKKOSKERNELS_INTERNAL_NEW_CONFIG := $(strip $(shell diff KokkosKernels_config.h KokkosKernels_config.tmp | grep define | wc -l)) -else - KOKKOSKERNELS_INTERNAL_NEW_CONFIG := 1 -endif - -ifneq ($(KOKKOSKERNELS_INTERNAL_NEW_CONFIG), 0) - tmp := $(shell cp KokkosKernels_config.tmp KokkosKernels_config.h) -endif - -#include $(KOKKOSKERNELS_PATH)/Makefile.generate_eti_files - -#------------------------------------------------------------------------- -#-----Add src Files------------------------------------- -#------------------------------------------------------------------------- - -KOKKOSKERNELS_INTERNAL_SRC_BLAS = -KOKKOSKERNELS_INTERNAL_SRC_SPARSE = - -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_SERIAL), 1) - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_DOUBLE), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_dbl*Serial*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_dbl*Serial*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_FLOAT), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_flt*Serial*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_flt*Serial*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_COMPLEX_DOUBLE_), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_Kokkos_cmplx_dbl*Serial*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_Kokkos_cmplx_dbl*Serial*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_COMPLEX_FLOAT_), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_Kokkos_cmplx_flt*Serial*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_Kokkos_cmplx_flt*Serial*.cpp) - endif -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_OPENMP), 1) - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_DOUBLE), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_dbl*OpenMP_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_dbl*OpenMP_*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_FLOAT), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_flt*OpenMP_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_flt*OpenMP_*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_COMPLEX_DOUBLE_), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_Kokkos_cmplx_dbl*OpenMP_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_Kokkos_cmplx_dbl*OpenMP_*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_COMPLEX_FLOAT_), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_Kokkos_cmplx_flt*OpenMP_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_Kokkos_cmplx_flt*OpenMP_*.cpp) - endif -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_THREADS), 1) - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_DOUBLE), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_dbl*Threads_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_dbl*Threads_*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_FLOAT), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_flt*Threads_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_flt*Threads_*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_COMPLEX_DOUBLE_), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_Kokkos_cmplx_dbl*Threads_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_Kokkos_cmplx_dbl*Threads_*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_COMPLEX_FLOAT_), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_Kokkos_cmplx_flt*Threads_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_Kokkos_cmplx_flt*Threads_*.cpp) - endif -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_CUDA), 1) - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_DOUBLE), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_dbl*Cuda_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_dbl*Cuda_*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_FLOAT), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_flt*Cuda_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_flt*Cuda_*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_COMPLEX_DOUBLE_), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_Kokkos_cmplx_dbl*Cuda_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_Kokkos_cmplx_dbl*Cuda_*.cpp) - endif - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_COMPLEX_FLOAT_), 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosBlas*eti_spec_inst_Kokkos_cmplx_flt*Cuda_*.cpp) - KOKKOSKERNELS_INTERNAL_SRC_SPARSE += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_cpp/*/KokkosSparse*eti_spec_inst_Kokkos_cmplx_flt*Cuda_*.cpp) - endif -endif - -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_CUBLAS}, 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += ${KOKKOSKERNELS_PATH}/src/impl/tpls/KokkosBlas_Cuda_tpl.cpp -endif - -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_MAGMA}, 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += ${KOKKOSKERNELS_PATH}/src/impl/tpls/KokkosBlas_Cuda_tpl.cpp -endif - -KOKKOSKERNELS_INTERNAL_ENABLE_HOST_BLAS=0 -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_BLAS}, 1) - KOKKOSKERNELS_INTERNAL_ENABLE_HOST_BLAS=1 -endif -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_MKL}, 1) - KOKKOSKERNELS_INTERNAL_ENABLE_HOST_BLAS=1 -endif -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_HOST_BLAS}, 1) - KOKKOSKERNELS_INTERNAL_SRC_BLAS += ${KOKKOSKERNELS_PATH}/src/impl/tpls/KokkosBlas_Host_tpl.cpp -endif - -KOKKOSKERNELS_INTERNAL_HEADERS = $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/*.hpp) -KOKKOSKERNELS_INTERNAL_HEADERS += $(wildcard ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_hpp/*/*eti_spec*.hpp) - -ifdef KOKKOSKERNELS_INTERNAL_SRC_SPARSE -vpath %.cpp $(sort $(dir $(KOKKOSKERNELS_INTERNAL_SRC_SPARSE))) -vpath %.cpp $(sort $(dir $(KOKKOSKERNELS_INTERNAL_SRC_BLAS))) -endif - -DEPFLAGS = -M - -CP = cp - -ifeq ($(KOKKOS_OS),CYGWIN) - COPY_FLAG = -u -endif -ifeq ($(KOKKOS_OS),Linux) - COPY_FLAG = -u -endif -#ifeq ($(KOKKOS_OS),Darwin) - # If using Homebrew on OSX with the 'coreutils' package installed - # we have a gnu version of cp which has the -u option -# ifeq (,$(wildcard "/usr/local/opt/coreutils/libexec/gnubin/cp")) -# CP = /usr/local/opt/coreutils/libexec/gnubin/cp -# COPY_FLAG = -u -# else -# COPY_FLAG = -# endif -#endif - -KOKKOSKERNELS_INTERNAL_SRC_BLAS_NODIR = $(notdir $(KOKKOSKERNELS_INTERNAL_SRC_BLAS)) -KOKKOSKERNELS_INTERNAL_SRC_SPARSE_NODIR = $(notdir $(KOKKOSKERNELS_INTERNAL_SRC_SPARSE)) -KOKKOSKERNELS_INTERNAL_OBJ_BLAS = $(KOKKOSKERNELS_INTERNAL_SRC_BLAS_NODIR:.cpp=.o) -KOKKOSKERNELS_INTERNAL_OBJ_SPARSE = $(KOKKOSKERNELS_INTERNAL_SRC_SPARSE_NODIR:.cpp=.o) - -KOKKOSKERNELS_CPP_DEPENDS = $(KOKKOSKERNELS_INTERNAL_HEADERS) KokkosKernels_config.h - -KokkosKernels_config.h: - -kokkoskernels-build-lib: $(KOKKOSKERNELS_INTERNAL_LIBRARY) - -$(KOKKOSKERNELS_INTERNAL_LIBRARY): $(KOKKOSKERNELS_INTERNAL_OBJ_SPARSE) $(KOKKOSKERNELS_INTERNAL_OBJ_BLAS) - ar cr ${KOKKOSKERNELS_INTERNAL_LIBRARY} $(KOKKOSKERNELS_INTERNAL_OBJ_SPARSE) $(KOKKOSKERNELS_INTERNAL_OBJ_BLAS) - ranlib ${KOKKOSKERNELS_INTERNAL_LIBRARY} - -kokkoskernels-clean: kokkos-clean - rm -f *.o $(KOKKOSKERNELS_INTERNAL_LIBRARY) KokkosKernels_config.h KokkosKernels_config.tmp - -# Compilation rules - -$(filter %.o,$(KOKKOSKERNELS_INTERNAL_OBJ_BLAS)): %.o:%.cpp $(KOKKOS_CPP_DEPENDS) ${KOKKOSKERNELS_CPP_DEPENDS} KokkosKernels_config.h - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOSKERNELS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $< -$(filter %.o,$(KOKKOSKERNELS_INTERNAL_OBJ_SPARSE)): %.o:%.cpp $(KOKKOS_CPP_DEPENDS) ${KOKKOSKERNELS_CPP_DEPENDS} KokkosKernels_config.h - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOSKERNELS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $< - diff --git a/README.md b/README.md index 0b21333f05..08f80c19d6 100644 --- a/README.md +++ b/README.md @@ -140,28 +140,6 @@ spack diy -u cmake kokkos-kernels@{version} ... specifying the exact version you want to develop and giving any spec options in `...`. This creates a folder `spack-build` where you can `make`. -### Raw Makefiles -1. Modify example/buildlib/compileKokkosKernelsSimple.sh or - example/buildlib/compileKokkosKernels.sh for your environment - and run it to generate the required makefiles. - * `KOKKOS_DEVICES` can be as below. You can remove any backend - that you don't need. If cuda backend is used, CXX compiler should point to `${KOKKOS_PATH}/bin/nvcc_wrapper`. - If you enable `Cuda`, a host space, either `OpenMP` or `Serial` should be enabled. - `KOKKOS_DEVICES=OpenMP,Serial,Cuda` - - * For the best performance give the architecture flag to proper architecture. - e.g. KNLs: `KOKKOS_ARCHS=KNL`, `KOKKOS_ARCHS=HSW`. - If you compile for P100 GPUs with Power8 Processor, give both architectures. - `KOKKOS_ARCHS=Pascal60,Power8` - - For the architecture flags, run below command. - ```` - scripts/generate_makefile.bash --help - ```` - -2. Run `make build-test` to compile the tests. - - ### Trilinos For Trilinos builds with the Cuda backend and complex double enabled with ETI, the cmake option below may need to be set to avoid Error 127 errors: diff --git a/example/Makefile b/example/Makefile deleted file mode 100644 index 45830c1304..0000000000 --- a/example/Makefile +++ /dev/null @@ -1,83 +0,0 @@ - -#======================================================================= -#=================== Settings ========================================== -#======================================================================= - -KOKKOS_PATH ?= ${HOME}/Kokkos/kokkos -KOKKOSKERNELS_PATH ?= ${HOME}/Kokkos/kokkos-kernels -KOKKOSKERNELS_SRC_PATH ?= ${KOKKOSKERNELS_PATH} -GTEST_PATH = ${KOKKOS_PATH}/tpls/gtest - -KOKKOS_DEVICES=OpenMP -KOKKOS_CUDA_OPTIONS=enable_lambda - -KOKKOSKERNELS_SCALARS="'double,complex'" -KOKKOSKERNELS_OPTIONS=eti-only - - -CXX = g++ - -CXXFLAGS = -O3 -g -LINK = ${CXX} -LINKFLAGS = - -DEPFLAGS = -M - -OBJ = -LIB = -lpthread - - -#======================================================================= -#=================== Include Kokkos and KokkosKernels ================== -#======================================================================= - -#include $(KOKKOS_PATH)/Makefile.kokkos -include $(KOKKOSKERNELS_PATH)/Makefile.kokkos-kernels - -#======================================================================= -#=================== Add common source files =========================== -#======================================================================= - -EXECUTABLES = -TEST_HEADERS = -TEST_TARGETS = -TARGETS = - -#======================================================================= -#= Example Directories -#======================================================================= -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/example/hashmap_accumulator/*.hpp) -EXECUTABLES += $(wildcard ${KOKKOSKERNELS_SRC_PATH}/example/hashmap_accumulator/*.cpp) - -#EXECUTABLES += $(wildcard ${KOKKOSKERNELS_SRC_PATH}/example/graph/PartitioningExample.cpp) - -#======================================================================= -#========================== TARGETS ==================================== -#======================================================================= - -vpath %.cpp $(sort $(dir $(EXECUTABLES))) -OBJS = $(notdir $(EXECUTABLES:.cpp=.o)) -TEST_TARGETS = $(notdir $(EXECUTABLES:.cpp=.exe)) - - -#======================================================================= -#=================== Make Rules ======================================== -#======================================================================= - - -clean: kokkos-clean kokkoskernels-clean - rm -f *.o *.exe - -default: $(TEST_TARGETS) - -build: $(TEST_TARGETS) - -%.exe:%.o $(KOKKOS_LINK_DEPENDS) $(KOKKOSKERNELS_LINK_DEPENDS) $(TEST_HEADERS) - $(LINK) $(EXTRA_PATH) $< $(KOKKOSKERNELS_LDFLAGS) $(KOKKOSKERNELS_LIBS) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o $@ - -%.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(KOKKOSKERNELS_CPP_DEPENDS) $(TEST_HEADERS) - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOSKERNELS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(INC) $(CXXFLAGS) $(EXTRA_INC) -I. -c $< -o $(notdir $@) - -#depend: -# makedepend -Y ${EXECUTABLES} $(TEST_HEADERS) -# DO NOT DELETE diff --git a/example/fenl/Makefile b/example/fenl/Makefile deleted file mode 100644 index 37e1935b8c..0000000000 --- a/example/fenl/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -#Settings for what to build -KOKKOS_DEVICES = "Pthread" -KOKKOS_ARCH = "SNB,Kepler35" - -# To enable Trilinos you need to copy KokkosKernels_config.h and KokkosKernels_ETIHelperMacros.h -# from an appropriately configure Trilinos build directory (you don't need to build). -# The rest is accessed from Trilinos source. -BUILD_TRILINOS = 0 -BUILD_CUSPARSE = 0 -BUILD_MKL = 0 - -#Path settings -TRILINOS_PATH = ${HOME}/Trilinos -KOKKOS_PATH = ${HOME}/Kokkos/kokkos -KOKKOS_KERNELS_PATH = ${HOME}/Kokkos/kokkos-kernels - -#MKL_PATH=/home/projects/install/rhel6-x86_64/sems/compiler/intel/16.0.1/base/mkl -#On Sandia Testbeds this should work: -#MKL_PATH=${MKLROOT} -#On Sandia SEMS modules this should work: -MKL_PATH=${SEMS_INTEL_ROOT}/mkl -MKL_LIBS=-L${MKL_PATH}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core - -SRC = $(wildcard ${KOKKOS_KERNELS_PATH}/example/fenl/*.cpp) -HEADERS = $(wildcard ${KOKKOS_KERNELS_PATH}/example/fenl/*.hpp) - -tmp := $(shell echo "\#include" > KokkosKernels_ETIHelperMacros.tmp ) - -KOKKOS_INTERNAL_LS_CONFIG := $(shell ls KokkosKernels_ETIHelperMacros.h) -ifeq ($(KOKKOS_INTERNAL_LS_CONFIG), KokkosKernels_ETIHelperMacros.h) - KOKKOS_INTERNAL_NEW_CONFIG := $(strip $(shell diff KokkosKernels_ETIHelperMacros.h KokkosKernels_ETIHelperMacros.tmp | grep define | wc -l)) -else - KOKKOS_INTERNAL_NEW_CONFIG := 1 -endif - -ifneq ($(KOKKOS_INTERNAL_NEW_CONFIG), 0) - tmp := $(shell cp KokkosKernels_ETIHelperMacros.tmp KokkosKernels_ETIHelperMacros.h) - tmp := $(shell touch KokkosKernels_config.h) -endif - -default: build - echo "Start Build" - -CXXFLAGS = -DMAKE_BUILD -g -O3 -I./converter -I./ -I${KOKKOS_KERNELS_PATH}/example/fenl -I${KOKKOS_KERNELS_PATH}/src -I${KOKKOS_KERNELS_PATH}/src/impl -LINKFLAGS = -O3 -LIB = - -ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES))) -CXX = ${KOKKOS_PATH}/config/nvcc_wrapper -EXE = fenl.cuda -else -CXX = g++ -EXE = fenl.host -endif - -LINK = ${CXX} - -ifeq (${BUILD_MKL}, 1) -CXXFLAGS += -I${MKL_PATH}/include -DHAVE_MKL -mkl -LIB += ${MKL_LIBS} -mkl -endif - -ifeq (${BUILD_TRILINOS}, 1) -CXXFLAGS += -DHAVE_TRILINOS -SRC += $(wildcard ${KOKKOS_KERNELS_PATH}/src/impl/*spmv*.cpp) -endif - - -ifeq (${BUILD_CUSPARSE}, 1) -CXXFLAGS += -I${CUDA_ROOT}/include -DHAVE_CUSPARSE -DKOKKOS_USE_CUSPARSE -LIB += -lcusparse -endif - -vpath %.cpp $(sort $(dir $(SRC))) - -DEPFLAGS = -M - -SRC_NODIR = $(notdir $(SRC)) -OBJ = $(SRC_NODIR:.cpp=.o) - -include $(KOKKOS_PATH)/Makefile.kokkos - -build: $(EXE) - -$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS) - $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE) - -clean: kokkos-clean - rm -f *.o *.cuda *.host KokkosKernels_config.h KokkosKernels_ETIHelperMacros.h - -# Compilation rules - -%.o:%.cpp $(KOKKOS_CPP_DEPENDS) KokkosKernels_config.h KokkosKernels_ETIHelperMacros.h ${HEADERS} - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $< diff --git a/example/wiki/Makefile b/example/wiki/Makefile deleted file mode 100644 index f7c3afc64f..0000000000 --- a/example/wiki/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -KOKKOS_PATH ?= ${HOME}/Kokkos/kokkos -KOKKOSKERNELS_PATH ?= ${HOME}/Kokkos/kokkos-kernels - -# Turn of ETI -KOKKOSKERNELS_SCALARS = - -SRC ?= $(wildcard *.cpp) -HDR ?= $(wildcard *.hpp) - -KOKKOS_DEVICES=OpenMP -KOKKOS_ARCH = "SNB,Kepler35" -KOKKOS_CUDA_OPTIONS=enable_lambda - -default: build - echo "Start Build" - -ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES))) -CXX = ${KOKKOS_PATH}/config/nvcc_wrapper -else -CXX = g++ -endif - -LINK = ${CXX} - -CXXFLAGS = -O3 -g -override CXXFLAGS += -I./ -LINKFLAGS = - -EXE = test.x -DEPFLAGS = -M - -vpath %.cpp $(sort $(dir $(SRC))) - -OBJ = $(notdir $(SRC:.cpp=.o)) -LIB = - -include $(KOKKOS_PATH)/Makefile.kokkos -include ${KOKKOSKERNELS_PATH}/Makefile.kokkos-kernels - -$(warning $(OBJ) $(EXE) $(sort $(dir $(SRC)))) - -build: $(EXE) - -$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS) $(KOKKOSKERNELS_LINK_DEPENDS) - $(LINK) $(KOKKOS_LDFLAGS) $(KOKKOSKERNELS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(KOKKOSKERNELS_LIBS) $(LIB) -o $(EXE) - -clean: kokkos-clean - rm -f *.o *.cuda *.host - -# Compilation rules - -%.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(HDR) - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(KOKKOSKERNELS_CPPFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $< -o $(notdir $@) - diff --git a/example/wiki/blas/abs/Makefile b/example/wiki/blas/abs/Makefile deleted file mode 100644 index 2f7cb9f2d7..0000000000 --- a/example/wiki/blas/abs/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST)))) - -ifndef KOKKOSKERNELS_PATH - KOKKOSKERNELS_PATH = $(MAKEFILE_PATH)../../../.. -endif -ifndef KOKKOS_PATH - KOKKOS_PATH = $(KOKKOSKERNELS_PATH)/../kokkos -endif - -SRC = $(wildcard $(MAKEFILE_PATH)*.cpp) -HDR = $(wildcard $(MAKEFILE_PATH)*.hpp) - -include $(KOKKOSKERNELS_PATH)/example/wiki/Makefile - diff --git a/perf_test/Makefile b/perf_test/Makefile deleted file mode 100644 index 28e1aa0223..0000000000 --- a/perf_test/Makefile +++ /dev/null @@ -1,129 +0,0 @@ -#======================================================================= -#=================== Settings ========================================== -#======================================================================= - -KOKKOS_PATH ?= ${HOME}/Kokkos/kokkos -KOKKOSKERNELS_PATH ?= ${HOME}/Kokkos/kokkos-kernels -KOKKOSKERNELS_SRC_PATH ?= ${KOKKOSKERNELS_PATH} -GTEST_PATH = ${KOKKOS_PATH}/tpls/gtest - -KOKKOS_DEVICES=OpenMP -KOKKOS_CUDA_OPTIONS=enable_lambda - -KOKKOSKERNELS_SCALARS="'double,complex'" -KOKKOSKERNELS_OPTIONS=eti-only - - -CXX = g++ - -CXXFLAGS = -O3 -g -LINK = ${CXX} -LINKFLAGS = - -DEPFLAGS = -M - -OBJ = -LIB = -lpthread - - -#======================================================================= -#=================== Include Kokkos and KokkosKernels ================== -#======================================================================= - -#include $(KOKKOS_PATH)/Makefile.kokkos -include $(KOKKOSKERNELS_PATH)/Makefile.kokkos-kernels - -#======================================================================= -#=================== Add common source files =========================== -#======================================================================= - - -TEST_TARGETS = -TARGETS = - -#======================================================================= -#===================== SPARSE PERF ===================================== -#======================================================================= -INC = -I$(KOKKOSKERNELS_SRC_PATH)/perf_test/ -BLASINC = -I$(KOKKOSKERNELS_SRC_PATH)/perf_test/blas -INC += $(BLASINC) -SPARSEINC = -I$(KOKKOSKERNELS_SRC_PATH)/perf_test/sparse -SPARSEINC += -I$(KOKKOSKERNELS_SRC_PATH)/perf_test/sparse/spmv -INC += $(SPARSEINC) -GRAPHINC = -I$(KOKKOSKERNELS_SRC_PATH)/perf_test/graph -INC += $(GRAPHINC) -COMMONINC = -I$(KOKKOSKERNELS_SRC_PATH)/perf_test/../test_common -INC += $(COMMONINC) - - -TEST_HEADERS = $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/*.hpp) -BLAS_HEADERS = $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/blas/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/blas/*.hpp) - -SPARSE_HEADERS = $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/sparse/*.hpp) -SPARSE_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/sparse/spmv/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/sparse/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/sparse/spmv/*.hpp) -GRAPH_HEADERS = $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/graph/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/graph/*.hpp) -COMMON_HEADERS = $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/../test_common/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/../test_common/*.hpp) - -#removing this for now, as those blas tests have teuchos dependency. -#EXECUTABLES = $(wildcard ${KOKKOSKERNELS_SRC_PATH}/perf_test/blas/*cpp) - -EXECUTABLES += $(wildcard ${KOKKOSKERNELS_SRC_PATH}/perf_test/sparse/*cpp) -EXECUTABLES += $(wildcard ${KOKKOSKERNELS_SRC_PATH}/perf_test/graph/*cpp) -EXECUTABLES += $(wildcard ${KOKKOSKERNELS_SRC_PATH}/perf_test/../test_common/*cpp) - -# Build yaml dependent performance class unit tests -ifeq (${KOKKOSKERNELS_INTERNAL_ENABLE_YAML}, 1) - EXECUTABLES += $(wildcard ${KOKKOSKERNELS_SRC_PATH}/perf_test/performance/*cpp) -endif - - - -#======================================================================= -#===================== BATCHED BLAS/LAPACK PERF ======================== -#======================================================================= - -BATCHEDINC = -I$(KOKKOSKERNELS_SRC_PATH)/perf_test/batched -INC += $(BATCHEDINC) - -BATCHED_HEADERS = $(wildcard $(KOKKOSKERNELS_SRC_PATH)/perf_test/batched/*.hpp) -TEST_HEADERS += $(BATCHED_HEADERS) - -BATCHED_EXECUTABLES = $(wildcard ${KOKKOSKERNELS_SRC_PATH}/perf_test/batched/*cpp) -EXECUTABLES += $(BATCHED_EXECUTABLES) - -#======================================================================= -#===================== TEST TARGETS ==================================== -#======================================================================= - -vpath %.cpp $(sort $(dir $(EXECUTABLES))) -OBJS = $(notdir $(EXECUTABLES:.cpp=.o)) -TEST_TARGETS = $(notdir $(EXECUTABLES:.cpp=.exe)) -#TEST_TARGETS = $(patsubst %.cpp, %.exe, $(EXECUTABLES)) - - -#======================================================================= -#=================== Make Rules ======================================== -#======================================================================= - - -clean: kokkos-clean kokkoskernels-clean - rm -f *.o *.exe - -default: $(TEST_TARGETS) - -build: $(TEST_TARGETS) - -%.exe:%.o $(KOKKOS_LINK_DEPENDS) $(KOKKOSKERNELS_LINK_DEPENDS) $(TEST_HEADERS) - $(LINK) $(EXTRA_PATH) $< $(KOKKOSKERNELS_LDFLAGS) $(KOKKOSKERNELS_LIBS) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(LDLIB) -o $@ - -%.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(KOKKOSKERNELS_CPP_DEPENDS) $(TEST_HEADERS) - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOSKERNELS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(INC) $(CXXFLAGS) $(EXTRA_INC) -I. -c $< -o $(notdir $@) - -#depend: -# makedepend -Y ${EXECUTABLES} $(TEST_HEADERS) -# DO NOT DELETE diff --git a/perf_test/sparse/spmv/Makefile b/perf_test/sparse/spmv/Makefile deleted file mode 100644 index b607dbd6c4..0000000000 --- a/perf_test/sparse/spmv/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -#Settings for what to build -KOKKOS_DEVICES = "OpenMP" -KOKKOS_ARCH = "SNB,Kepler35" - -# To enable Trilinos you need to copy KokkosKernels_config.h and KokkosKernels_ETIHelperMacros.h -# from an appropriately configure Trilinos build directory (you don't need to build). -# The rest is accessed from Trilinos source. -BUILD_KK_KERNELS = 1 -BUILD_CUSPARSE = 0 -BUILD_MKL = 0 - -#Path settings -KOKKOS_PATH = ${HOME}/Kokkos/kokkos -KOKKOS_KERNELS_SRC_PATH = ${HOME}/Kokkos/kokkos-kernels -KOKKOS_KERNELS_INSTALL_PATH = ${HOME}/Kokkos/kokkos-kernels-install - -#MKL_PATH=/home/projects/install/rhel6-x86_64/sems/compiler/intel/16.0.1/base/mkl -#On Sandia Testbeds this should work: -#MKL_PATH=${MKLROOT} -#On Sandia SEMS modules this should work: -MKL_PATH=${SEMS_INTEL_ROOT}/mkl -MKL_LIBS=-L${MKL_PATH}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core - -SRC = ${KOKKOS_KERNELS_SRC_PATH}/perf_test/spmv/test_crsmatrix.cpp -HEADERS = $(wildcard ${KOKKOS_KERNELS_SRC_PATH}/perf_test/spmv/*.hpp) - -default: build - echo "Start Build" - -config_headers: - touch KokkosKernels_ETIHelperMacros.h - touch KokkosKernels_config.h - - -CXXFLAGS = -DMAKE_BUILD -g -O3 -I./converter -I./ -I${KOKKOS_KERNELS_SRC_PATH}/perf_test/spmv -I${KOKKOS_KERNELS_INSTALL_PATH}/include -LINKFLAGS = -O3 -LIB = ${KOKKOS_KERNELS_INSTALL_PATH}/lib/libkokkos_kernels.a - -ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES))) -CXX = ${KOKKOS_PATH}/config/nvcc_wrapper -EXE = test_matvec.cuda -else -CXX = g++ -EXE = test_matvec.host -endif - -LINK = ${CXX} - -ifeq (${BUILD_MKL}, 1) -CXXFLAGS += -I${MKL_PATH}/include -DHAVE_MKL -mkl -LIB += ${MKL_LIBS} -mkl -endif - -ifeq (${BUILD_CUSPARSE}, 1) -CXXFLAGS += -I${CUDA_ROOT}/include -DHAVE_CUSPARSE -DKOKKOS_USE_CUSPARSE -LIB += -lcusparse -endif - -vpath %.cpp $(sort $(dir $(SRC))) - -DEPFLAGS = -M - -SRC_NODIR = $(notdir $(SRC)) -OBJ = $(SRC_NODIR:.cpp=.o) - -include $(KOKKOS_PATH)/Makefile.kokkos - -build: $(EXE) - -$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS) - $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE) - -clean: kokkos-clean - rm -f *.o *.cuda *.host KokkosKernels_config.h KokkosKernels_ETIHelperMacros.h - -# Compilation rules - -%.o:%.cpp $(KOKKOS_CPP_DEPENDS) config_headers ${HEADERS} - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $< diff --git a/scripts/generate_makefile.bash b/scripts/generate_makefile.bash deleted file mode 100755 index c6937ddf40..0000000000 --- a/scripts/generate_makefile.bash +++ /dev/null @@ -1,510 +0,0 @@ -#!/usr/bin/env bash - -KOKKOS_DEVICES="" - -KOKKOS_DO_EXAMPLES="1" - -KOKKOSKERNELS_OPTIONS="eti-only,blas-mangle_" -KOKKOSKERNELS_ENABLE_TPLS="" - -while [[ $# > 0 ]] -do - key="$1" - - case $key in - --kokkoskernels-path*) - KOKKOSKERNELS_PATH="${key#*=}" - ;; - --kokkos-path*) - KOKKOS_PATH="${key#*=}" - ;; - --qthreads-path*) - QTHREADS_PATH="${key#*=}" - ;; - --prefix*) - PREFIX="${key#*=}" - ;; - --with-cuda) - KOKKOS_DEVICES="${KOKKOS_DEVICES},Cuda" - CUDA_PATH_NVCC=`which nvcc` - CUDA_PATH=${CUDA_PATH_NVCC%/bin/nvcc} - ;; - # Catch this before '--with-cuda*' - --with-cuda-options*) - KOKKOS_CUDA_OPT="${key#*=}" - ;; - --with-cuda*) - KOKKOS_DEVICES="${KOKKOS_DEVICES},Cuda" - CUDA_PATH="${key#*=}" - ;; - --with-rocm) - KOKKOS_DEVICES="${KOKKOS_DEVICES},ROCm" - ;; - --with-openmp) - KOKKOS_DEVICES="${KOKKOS_DEVICES},OpenMP" - ;; - --with-pthread) - KOKKOS_DEVICES="${KOKKOS_DEVICES},Pthread" - ;; - --with-serial) - KOKKOS_DEVICES="${KOKKOS_DEVICES},Serial" - ;; - --with-qthreads*) - KOKKOS_DEVICES="${KOKKOS_DEVICES},Qthreads" - if [ -z "$QTHREADS_PATH" ]; then - QTHREADS_PATH="${key#*=}" - fi - ;; - --with-devices*) - DEVICES="${key#*=}" - KOKKOS_DEVICES="${KOKKOS_DEVICES},${DEVICES}" - ;; - --with-gtest*) - GTEST_PATH="${key#*=}" - ;; - --with-hwloc*) - HWLOC_PATH="${key#*=}" - ;; - --with-memkind*) - KOKKOSKERNELS_SPACES="HBWSpace,${KOKKOSKERNELS_SPACES}" - MEMKIND_PATH="${key#*=}" - ;; - --arch*) - KOKKOS_ARCH="${key#*=}" - ;; - --cxxflags*) - CXXFLAGS="${key#*=}" - ;; - --cxxstandard*) - KOKKOS_CXX_STANDARD="${key#*=}" - ;; - --ldflags*) - LDFLAGS="${key#*=}" - ;; - --ldlib*) - LDLIB="${key#*=}" - ;; - --debug|-dbg) - KOKKOS_DEBUG=yes - ;; - --make-j*) - echo "Warning: ${key} is deprecated" - echo "Call make with appropriate -j flag" - ;; - --no-examples) - KOKKOS_DO_EXAMPLES="0" - ;; - --compiler*) - COMPILER="${key#*=}" - CNUM=`which ${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=`which ${COMPILER} | grep ${COMPILER} | wc -l` - if [ ${CNUM} -eq 0 ]; then - echo "Invalid compiler by --compiler command: '${COMPILER}'" - exit - fi - ;; - --with-scalars*) - KOKKOSKERNELS_SCALARS="${key#*=}" - ;; - --with-ordinals*) - KOKKOSKERNELS_ORDINALS="${key#*=}" - ;; - --with-offsets*) - KOKKOSKERNELS_OFFSETS="${key#*=}" - ;; - --with-layouts*) - KOKKOSKERNELS_LAYOUTS="${key#*=}" - ;; - --with-options*) - KOKKOSKERNELS_OPTIONS="${key#*=}" - ;; - --with-tpls*) - KOKKOSKERNELS_ENABLE_TPLS="${key#*=}" - ;; - --with-spaces*) - KOKKOSKERNELS_SPACES="${key#*=}" - ;; - --with-kokkos-options*) - KOKKOS_OPT="${key#*=}" - ;; - --help) - echo "KokkosKernels configure options:" - echo "--kokkoskernels-path=/Path/To/KokkosKernels: Path to the KokkosKernels root directory." - echo "--with-scalars=[SCALARS]: Set scalars to be instantiated." - echo "--with-ordinals=[ORDINALS]: Set ordinals to be instantiated." - echo "--with-offsets=[OFFSETS]: Set offsets to be instantiated." - echo "--with-layouts=[LAYOUTS]: Set layouts to be instantiated (LayoutLeft,LayoutRight)." - echo "--prefix=/Install/Path: Path to install the Kokkos library." - echo "--with-options=[OPT]: Set KokkosKernels Options:" - echo " eti-only: only allow ETI types to be enabled [default]" - echo " manual overriding for fortran blas mangling:" - echo " blas-mangle, blas-mangle_[default], blas-mangle__" - echo " manual overriding for blas complex interface" - echo " blas-return-complex: e.g., ret = zdotc(&N, a, &inc_a, b, &inc_b)" - echo " otherwise, the interface would search zdotc(&ret, &N, a, &inc_a, b, &inc_b)" - echo "--with-tpls=[OPT]: Set KokkosKernels TPLs:" - echo " mkl,blas,cublas,cusparse" - echo "" - echo "Kokkos configure options:" - echo "--kokkos-path=/Path/To/Kokkos: Path to the Kokkos root directory." - echo "--qthreads-path=/Path/To/Qthreads: Path to Qthreads install directory." - echo " Overrides path given by --with-qthreads." - 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-qthreads[=/Path/To/Qthreads]: Enable Qthreads 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 " [ARM]" - echo " ARMv80 = ARMv8.0 Compatible CPU" - echo " ARMv81 = ARMv8.1 Compatible CPU" - echo " ARMv8-ThunderX = ARMv8 Cavium ThunderX CPU" - echo " [IBM]" - 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-kokkos-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 "--make-j=[NUM]: DEPRECATED: call make with appropriate" - echo " -j flag" - exit 0 - ;; - *) - echo "warning: ignoring unknown option $key" - ;; - esac - - shift -done - -# Remove leading ',' from KOKKOS_DEVICES. -KOKKOS_DEVICES=$(echo $KOKKOS_DEVICES | sed 's/^,//') - -# If only Cuda is specified, add Serial to prevent certain linker errors. -# See KokkosKernels Issue #257 for provenance. -if [[ "${KOKKOS_DEVICES}" == "Cuda" ]]; then - KOKKOS_DEVICES="Serial,Cuda" -fi - -# If KOKKOS_PATH undefined, assume parent dir of this script is the KOKKOS_PATH. -if [ -z "$KOKKOSKERNELS_PATH" ]; then - KOKKOSKERNELS_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd ) -else - # Ensure KOKKOS_PATH is abs path - KOKKOSKERNELS_PATH=$( cd $KOKKOSKERNELS_PATH && pwd ) -fi - -if [ "${KOKKOSKERNELS_PATH}" = "${PWD}" ] || [ "${KOKKOSKERNELS_PATH}" = "${PWD}/" ]; then - echo "Running generate_makefile.sh in the KokkosKernels root directory is not allowed" - exit -fi - -KOKKOSKERNELS_SRC_PATH=${KOKKOSKERNELS_PATH} - -if [ -z "$KOKKOS_PATH" ]; then - KOKKOS_PATH=${KOKKOSKERNELS_PATH}/../kokkos -else - # Ensure KOKKOS_PATH is abs path - KOKKOS_PATH=$( cd $KOKKOS_PATH && pwd ) -fi - -#KOKKOS_SETTINGS="KOKKOS_SRC_PATH=${KOKKOS_SRC_PATH}" -#KOKKOS_SETTINGS="KOKKOS_PATH=${KOKKOS_PATH}" - -if [ ${#COMPILER} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} CXX=${COMPILER}" -fi - -if [ ${#KOKKOS_DEVICES} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_DEVICES=${KOKKOS_DEVICES}" -fi - -if [ ${#KOKKOS_ARCH} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_ARCH=${KOKKOS_ARCH}" -fi - -if [ ${#KOKKOS_DEBUG} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_DEBUG=${KOKKOS_DEBUG}" -fi - -if [ ${#CUDA_PATH} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} CUDA_PATH=${CUDA_PATH}" -fi - -if [ ${#CXXFLAGS} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} CXXFLAGS=\"${CXXFLAGS}\"" -fi - -if [ ${#KOKKOS_CXX_STANDARD} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_CXX_STANDARD=\"${KOKKOS_CXX_STANDARD}\"" -fi - -if [ ${#LDFLAGS} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} LDFLAGS=\"${LDFLAGS}\"" -fi - -if [ ${#LDLIB} -gt 0 ]; then - echo "LDLIB: $LDLIB" - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} LDLIB=\"${LDLIB}\"" -fi - -if [ ${#GTEST_PATH} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} GTEST_PATH=${GTEST_PATH}" -else - GTEST_PATH=${KOKKOS_PATH}/tpls/gtest - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} GTEST_PATH=${GTEST_PATH}" -fi - -if [ ${#HWLOC_PATH} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} HWLOC_PATH=${HWLOC_PATH}" - KOKKOS_USE_TPLS="${KOKKOS_USE_TPLS},hwloc" -fi - -if [ ${#MEMKIND_PATH} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} MEMKIND_PATH=${MEMKIND_PATH}" - KOKKOS_USE_TPLS="${KOKKOS_USE_TPLS},experimental_memkind" -fi - -if [ ${#KOKKOS_USE_TPLS} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_USE_TPLS=${KOKKOS_USE_TPLS}" -fi - -if [ ${#QTHREADS_PATH} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} QTHREADS_PATH=${QTHREADS_PATH}" -fi - -if [ ${#KOKKOS_OPT} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_OPTIONS=${KOKKOS_OPT}" -fi - -if [ ${#KOKKOS_CUDA_OPT} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_CUDA_OPTIONS=${KOKKOS_CUDA_OPT}" - if [[ "${KOKKOS_CUDA_OPT}" =~ "force_uvm" ]]; then - KOKKOSKERNELS_SPACES="CudaUVMSpace,${KOKKOSKERNELS_SPACES}" - fi -fi - -if [ ${#KOKKOSKERNELS_SPACES} -gt 0 ]; then - KOKKOSKERNELS_SPACES="${KOKKOSKERNELS_SPACES},${KOKKOS_DEVICES}" - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_SPACES=${KOKKOSKERNELS_SPACES}" -fi - -if [ ${#KOKKOSKERNELS_SCALARS} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_SCALARS=${KOKKOSKERNELS_SCALARS}" -fi - -if [ ${#KOKKOSKERNELS_ORDINALS} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_ORDINALS=${KOKKOSKERNELS_ORDINALS}" -fi - -if [ ${#KOKKOSKERNELS_OFFSETS} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_OFFSETS=${KOKKOSKERNELS_OFFSETS}" -fi - -if [ ${#KOKKOSKERNELS_LAYOUTS} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_LAYOUTS=${KOKKOSKERNELS_LAYOUTS}" -fi - -if [ ${#KOKKOSKERNELS_ENABLE_TPLS} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_ENABLE_TPLS=${KOKKOSKERNELS_ENABLE_TPLS}" -fi - -if [ ${#KOKKOSKERNELS_OPTIONS} -gt 0 ]; then - KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOSKERNELS_OPTIONS=${KOKKOSKERNELS_OPTIONS}" -fi - -KOKKOS_SETTINGS_NO_KOKKOS_PATH="${KOKKOS_SETTINGS}" - -KOKKOSKERNELS_TEST_INSTALL_PATH="${PWD}/install" -if [ ${#PREFIX} -gt 0 ]; then - KOKKOSKERNELS_INSTALL_PATH="${PREFIX}" -else - KOKKOSKERNELS_INSTALL_PATH=${KOKKOSKERNELS_TEST_INSTALL_PATH} -fi - -mkdir -p install -echo "#Makefile to satisfy existence of target kokkos-clean before installing the library" > install/Makefile.kokkos -echo "kokkos-clean:" >> install/Makefile.kokkos -echo "" >> install/Makefile.kokkos -echo "#Makefile to satisfy existence of target kokkos-clean and kokkoskernels-clean before installing the library" > install/Makefile.kokkos-kernels -echo "kokkoskernels-clean:" >> install/Makefile.kokkos-kernels -echo "" >> install/Makefile.kokkos-kernels -echo "kokkos-clean:" >> install/Makefile.kokkos-kernels -echo "" >> install/Makefile.kokkos-kernels -mkdir -p kokkos -mkdir -p src -mkdir -p unit_test -mkdir -p perf_test -mkdir -p example - -KOKKOS_INSTALL_PATH=${PWD}/kokkos/install -KOKKOS_SETTINGS="${KOKKOS_SETTINGS_NO_KOKKOS_PATH} KOKKOS_PATH=${KOKKOS_PATH} PREFIX=${KOKKOS_INSTALL_PATH}" -echo "# KOKKOS_SETTINGS='${KOKKOS_SETTINGS}'" > kokkos/Makefile -echo "" >> kokkos/Makefile -echo "build:" >> kokkos/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOS_PATH}/core/src/Makefile ${KOKKOS_SETTINGS}" >> kokkos/Makefile -echo "" >> kokkos/Makefile -echo "install-lib:" >> kokkos/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOS_PATH}/core/src/Makefile ${KOKKOS_SETTINGS} install" >> kokkos/Makefile -echo "" >> kokkos/Makefile -echo "clean:" >> kokkos/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOS_PATH}/core/src/Makefile ${KOKKOS_SETTINGS} clean" >> kokkos/Makefile - -KOKKOS_SETTINGS="${KOKKOS_SETTINGS_NO_KOKKOS_PATH} KOKKOS_PATH=${KOKKOS_INSTALL_PATH} KOKKOSKERNELS_PATH=${KOKKOSKERNELS_PATH} KOKKOSKERNELS_INSTALL_PATH=${KOKKOSKERNELS_INSTALL_PATH}" -# Generate subdirectory makefiles. -echo "# KOKKOS_SETTINGS='${KOKKOS_SETTINGS}'" > src/Makefile -echo "" >> src/Makefile -echo "build:" >> src/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/src/Makefile ${KOKKOS_SETTINGS}" >> src/Makefile -echo "" >> src/Makefile -echo "install-lib:" >> src/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/src/Makefile ${KOKKOS_SETTINGS} install" >> src/Makefile -echo "" >> src/Makefile -echo "clean:" >> src/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/src/Makefile ${KOKKOS_SETTINGS} clean" >> src/Makefile - -KOKKOS_SETTINGS="${KOKKOS_SETTINGS_NO_KOKKOS_PATH} KOKKOS_PATH=${KOKKOS_INSTALL_PATH} KOKKOSKERNELS_PATH=${KOKKOSKERNELS_INSTALL_PATH} KOKKOSKERNELS_SRC_PATH=${KOKKOSKERNELS_SRC_PATH}" -echo "# KOKKOS_SETTINGS='${KOKKOS_SETTINGS}'" > unit_test/Makefile -echo "" >> unit_test/Makefile -echo "build:" >> unit_test/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/unit_test/Makefile ${KOKKOS_SETTINGS} build" >> unit_test/Makefile -echo "" >> unit_test/Makefile -echo "test: build" >> unit_test/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/unit_test/Makefile ${KOKKOS_SETTINGS} test" >> unit_test/Makefile -echo "" >> unit_test/Makefile -echo "clean:" >> unit_test/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/unit_test/Makefile ${KOKKOS_SETTINGS} clean" >> unit_test/Makefile - -echo "# KOKKOS_SETTINGS='${KOKKOS_SETTINGS}'" > perf_test/Makefile -echo "" >> perf_test/Makefile -echo "build:" >> perf_test/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/perf_test/Makefile ${KOKKOS_SETTINGS} build" >> perf_test/Makefile -echo "" >> perf_test/Makefile -echo "test: build" >> perf_test/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/perf_test/Makefile ${KOKKOS_SETTINGS} test" >> perf_test/Makefile -echo "" >> perf_test/Makefile -echo "clean:" >> perf_test/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/perf_test/Makefile ${KOKKOS_SETTINGS} clean" >> perf_test/Makefile - - -subdir=example -echo "# KOKKOS_SETTINGS='${KOKKOS_SETTINGS}'" > ${subdir}/Makefile -echo "" >> ${subdir}/Makefile -echo "build:" >> ${subdir}/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/${subdir}/Makefile ${KOKKOS_SETTINGS} build" >> ${subdir}/Makefile -echo "" >> ${subdir}/Makefile -echo "test: build" >> ${subdir}/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/${subdir}/Makefile ${KOKKOS_SETTINGS} test" >> ${subdir}/Makefile -echo "" >> ${subdir}/Makefile -echo "clean:" >> ${subdir}/Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/${subdir}/Makefile ${KOKKOS_SETTINGS} clean" >> ${subdir}/Makefile - - -KOKKOS_SETTINGS="${KOKKOS_SETTINGS_NO_KOKKOS_PATH} KOKKOSKERNELS_PATH=${KOKKOSKERNELS_TEST_INSTALL_PATH}" - -KOKKOS_SETTINGS="${KOKKOS_SETTINGS_NO_KOKKOS_PATH} KOKKOS_PATH=${KOKKOS_PATH} KOKKOSKERNELS_PATH=${KOKKOSKERNELS_PATH}" - -# Strip trailing whitespace from KOKKOS_SETTINGS -KOKKOS_SETTINGS="${KOKKOS_SETTINGS%"${KOKKOS_SETTINGS##*[![:space:]]}"}" - -# -# Generate top level directory makefile. -# -echo "Generating Makefiles with options " ${KOKKOS_SETTINGS} -echo "KOKKOS_SETTINGS=${KOKKOS_SETTINGS}" > Makefile - -echo "" >> Makefile -echo "kokkos-lib:" >> Makefile -echo -e "\tcd kokkos && \$(MAKE) install-lib" >> Makefile -echo "" >> Makefile - -echo "kokkoskernels-lib: kokkos-lib" >> Makefile -echo -e "\tcd src && \$(MAKE) build" >> Makefile -echo "" >> Makefile - -echo "install-lib: kokkoskernels-lib" >> Makefile -echo -e "\tcd src && \$(MAKE) install-lib" >> Makefile -echo "" >> Makefile - -echo "build-example: install-lib" >> Makefile -echo -e "\t\$(MAKE) -C example" >> Makefile -echo "" >> Makefile - -echo "build-test: install-lib" >> Makefile -echo -e "\t\$(MAKE) -C unit_test" >> Makefile -echo -e "\t\$(MAKE) -C perf_test" >> Makefile -echo "" >> Makefile - -echo "test: build-test" >> Makefile -echo -e "\t\$(MAKE) -C unit_test test" >> Makefile -#echo -e "\t\$(MAKE) -C perf_test test" >> Makefile -#echo -e "\t\$(MAKE) -C example test" >> Makefile -echo "" >> Makefile - -echo "clean:" >> Makefile -echo -e "\t\$(MAKE) -C unit_test clean" >> Makefile -echo -e "\t\$(MAKE) -C perf_test clean" >> Makefile -echo -e "\t\$(MAKE) -C example clean" >> Makefile -echo -e "\tcd src; \\" >> Makefile -echo -e "\t\$(MAKE) -f ${KOKKOSKERNELS_PATH}/src/Makefile ${KOKKOS_SETTINGS} clean" >> Makefile -echo "" >> Makefile - -echo "build-all: build-test build-example" >> Makefile -echo "" >> Makefile - diff --git a/scripts/generate_specialization.bash b/scripts/generate_specialization.bash deleted file mode 100755 index 5df916aa43..0000000000 --- a/scripts/generate_specialization.bash +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -KOKKOSKERNELS_PATH=$1 -cd ${KOKKOSKERNELS_PATH}/src/impl -mkdir generated_specializations_hpp -mkdir generated_specializations_cpp - -#sgs -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse_ml.bash gauss_seidel_symbolic KokkosSparse_gauss_seidel_symbolic KokkosSparse_gauss_seidel_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse_ml.bash gauss_seidel_numeric KokkosSparse_gauss_seidel_numeric KokkosSparse_gauss_seidel_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse_ml.bash gauss_seidel_apply KokkosSparse_gauss_seidel_apply KokkosSparse_gauss_seidel_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} - - -#spgemm_symbolic -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse_ml.bash spgemm_symbolic KokkosSparse_spgemm_symbolic KokkosSparse_spgemm_symbolic_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} -#spgemm_numeric -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse_ml.bash spgemm_numeric KokkosSparse_spgemm_numeric KokkosSparse_spgemm_numeric_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} - -#trsv -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse.bash trsv KokkosSparse_trsv KokkosSparse_trsv_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} - -#sptrsv -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse.bash sptrsv_solve KokkosSparse_sptrsv_solve KokkosSparse_sptrsv_solve_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse.bash sptrsv_symbolic KokkosSparse_sptrsv_symbolic KokkosSparse_sptrsv_symbolic_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} - -#spmv -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse.bash spmv KokkosSparse_spmv KokkosSparse_spmv_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse.bash spmv KokkosSparse_spmv_mv KokkosSparse_spmv_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} - - -#spmv_struct -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse.bash spmv KokkosSparse_spmv_struct KokkosSparse_spmv_struct_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse.bash spmv KokkosSparse_spmv_mv_struct KokkosSparse_spmv_struct_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} - -#spiluk -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse.bash spiluk_numeric KokkosSparse_spiluk_numeric KokkosSparse_spiluk_numeric_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function_sparse.bash spiluk_symbolic KokkosSparse_spiluk_symbolic KokkosSparse_spiluk_symbolic_spec.hpp KokkosSparse ${KOKKOSKERNELS_PATH} - -#abs -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash abs KokkosBlas1_abs KokkosBlas1_abs_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash abs KokkosBlas1_abs_mv KokkosBlas1_abs_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#axpby -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash axpby KokkosBlas1_axpby KokkosBlas1_axpby_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash axpby KokkosBlas1_axpby_mv KokkosBlas1_axpby_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#dot -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash dot KokkosBlas1_dot KokkosBlas1_dot_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash dot KokkosBlas1_dot_mv KokkosBlas1_dot_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#iamax -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash iamax KokkosBlas1_iamax KokkosBlas1_iamax_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash iamax KokkosBlas1_iamax_mv KokkosBlas1_iamax_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#mult -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash mult KokkosBlas1_mult KokkosBlas1_mult_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash mult KokkosBlas1_mult_mv KokkosBlas1_mult_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#nrm1 -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash nrm1 KokkosBlas1_nrm1 KokkosBlas1_nrm1_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash nrm1 KokkosBlas1_nrm1_mv KokkosBlas1_nrm1_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#nrm2 -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash nrm2 KokkosBlas1_nrm2 KokkosBlas1_nrm2_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash nrm2 KokkosBlas1_nrm2_mv KokkosBlas1_nrm2_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#nrm2w -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash nrm2w KokkosBlas1_nrm2w KokkosBlas1_nrm2w_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash nrm2w KokkosBlas1_nrm2w_mv KokkosBlas1_nrm2w_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#nrminf -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash nrminf KokkosBlas1_nrminf KokkosBlas1_nrminf_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash nrminf KokkosBlas1_nrminf_mv KokkosBlas1_nrminf_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#reciprocal -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash reciprocal KokkosBlas1_reciprocal KokkosBlas1_reciprocal_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash reciprocal KokkosBlas1_reciprocal_mv KokkosBlas1_reciprocal_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#scal -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash scal KokkosBlas1_scal KokkosBlas1_scal_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash scal KokkosBlas1_scal_mv KokkosBlas1_scal_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#sum -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash sum KokkosBlas1_sum KokkosBlas1_sum_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash sum KokkosBlas1_sum_mv KokkosBlas1_sum_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#update -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash update KokkosBlas1_update KokkosBlas1_update_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash update KokkosBlas1_update_mv KokkosBlas1_update_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#gemv -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash gemv KokkosBlas2_gemv KokkosBlas2_gemv_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#gemm -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash gemm KokkosBlas3_gemm KokkosBlas3_gemm_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} - -#gesv -${KOKKOSKERNELS_PATH}/scripts/generate_specialization_function.bash gesv KokkosBlas_gesv KokkosBlas_gesv_spec.hpp KokkosBlas ${KOKKOSKERNELS_PATH} diff --git a/scripts/generate_specialization_function.bash b/scripts/generate_specialization_function.bash deleted file mode 100755 index a9390e044b..0000000000 --- a/scripts/generate_specialization_function.bash +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -Function=$1 #e.g. abs: function name -FunctionExtended=$2 #e.g. KokkosBlas1_abs: prefix for files etc. -MasterHeader=$3 #e.g. Kokkos_Blas1_abs_spec.hpp: where the specialization layer lives -NameSpace=$4 #e.g. KokkosBlas: namespace it lives in -KokkosKernelsPath=$5 - -ScalarList="double float Kokkos::complex Kokkos::complex" -LayoutList="LayoutLeft LayoutRight" -ExecMemSpaceList="Cuda,CudaSpace Cuda,CudaUVMSpace OpenMP,HostSpace Threads,HostSpace Serial,HostSpace OpenMP,Experimental::HBWSpace Threads,Experimental::HBWSpace Serial,Experimental::HBWSpace" - -mkdir generated_specializations_hpp -mkdir generated_specializations_cpp/${Function} -filename_hpp_root=generated_specializations_hpp/${FunctionExtended}_eti_spec -filename_spec_avail_hpp=${filename_hpp_root}_avail.hpp -filename_spec_decl_hpp=${filename_hpp_root}_decl.hpp -Function_UpperCase=`echo ${FunctionExtended} | awk '{print toupper($0)}'` - -# Start eti_spec_avail file: -echo "#ifndef ${Function_UpperCase}_ETI_SPEC_AVAIL_HPP_" > ${filename_spec_avail_hpp} -echo "#define ${Function_UpperCase}_ETI_SPEC_AVAIL_HPP_" >> ${filename_spec_avail_hpp} - -cat ${KokkosKernelsPath}/scripts/header >> ${filename_spec_avail_hpp} - -echo "namespace ${NameSpace} {" >> ${filename_spec_avail_hpp} -echo "namespace Impl {" >> ${filename_spec_avail_hpp} - -# Start eti_spec_decl file: -echo "#ifndef ${Function_UpperCase}_ETI_SPEC_DECL_HPP_" > ${filename_spec_decl_hpp} -echo "#define ${Function_UpperCase}_ETI_SPEC_DECL_HPP_" >> ${filename_spec_decl_hpp} - -cat ${KokkosKernelsPath}/scripts/header >> ${filename_spec_decl_hpp} - -echo "namespace ${NameSpace} {" >> ${filename_spec_decl_hpp} -echo "namespace Impl {" >> ${filename_spec_decl_hpp} - -for Scalar in ${ScalarList}; do -for Layout in ${LayoutList}; do -for ExecMemSpace in ${ExecMemSpaceList}; do - ExecMemSpaceArray=(${ExecMemSpace//,/ }) - ExecSpace=${ExecMemSpaceArray[0]} - MemSpace=${ExecMemSpaceArray[1]} - echo "Generate: " ${FunctionExtended} " " ${Scalar} " " ${Layout} " " ${ExecSpace} " " ${MemSpace} - ${KokkosKernelsPath}/scripts/generate_specialization_type.bash ${Function} ${FunctionExtended} ${Scalar} ${Layout} ${ExecSpace} ${MemSpace} ${MasterHeader} ${NameSpace} ${KokkosKernelsPath} -done -done -done - -echo "} // Impl" >> ${filename_spec_avail_hpp} -echo "} // ${NameSpace}" >> ${filename_spec_avail_hpp} -echo "#endif // ${Function_UpperCase}_ETI_SPEC_AVAIL_HPP_" >> ${filename_spec_avail_hpp} - -echo "} // Impl" >> ${filename_spec_decl_hpp} -echo "} // ${NameSpace}" >> ${filename_spec_decl_hpp} -echo "#endif // ${Function_UpperCase}_ETI_SPEC_DECL_HPP_" >> ${filename_spec_decl_hpp} - diff --git a/scripts/generate_specialization_function_sparse.bash b/scripts/generate_specialization_function_sparse.bash deleted file mode 100755 index 68245479d1..0000000000 --- a/scripts/generate_specialization_function_sparse.bash +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -Function=$1 #e.g. abs: function name -FunctionExtended=$2 #e.g. KokkosBlas1_abs: prefix for files etc. -MasterHeader=$3 #e.g. Kokkos_Blas1_abs_spec.hpp: where the specialization layer lives -NameSpace=$4 #e.g. KokkosBlas: namespace it lives in -KokkosKernelsPath=$5 -OrdinalList="int int64_t" -OffsetList="int size_t" -ScalarList="double float Kokkos::complex Kokkos::complex" -LayoutList="LayoutLeft LayoutRight" -ExecMemSpaceList="Cuda,CudaSpace Cuda,CudaUVMSpace OpenMP,HostSpace Threads,HostSpace Serial,HostSpace OpenMP,Experimental::HBWSpace Threads,Experimental::HBWSpace Serial,Experimental::HBWSpace" - -mkdir generated_specializations_hpp -mkdir generated_specializations_cpp/${Function} -filename_hpp_root=generated_specializations_hpp/${FunctionExtended}_eti_spec -filename_spec_avail_hpp=${filename_hpp_root}_avail.hpp -filename_spec_decl_hpp=${filename_hpp_root}_decl.hpp -Function_UpperCase=`echo ${FunctionExtended} | awk '{print toupper($0)}'` - -# Start eti_spec_avail file: -echo "#ifndef ${Function_UpperCase}_ETI_SPEC_AVAIL_HPP_" > ${filename_spec_avail_hpp} -echo "#define ${Function_UpperCase}_ETI_SPEC_AVAIL_HPP_" >> ${filename_spec_avail_hpp} - -cat ${KokkosKernelsPath}/scripts/header >> ${filename_spec_avail_hpp} - -echo "namespace ${NameSpace} {" >> ${filename_spec_avail_hpp} -echo "namespace Impl {" >> ${filename_spec_avail_hpp} - -# Start eti_spec_decl file: -echo "#ifndef ${Function_UpperCase}_ETI_SPEC_DECL_HPP_" > ${filename_spec_decl_hpp} -echo "#define ${Function_UpperCase}_ETI_SPEC_DECL_HPP_" >> ${filename_spec_decl_hpp} - -cat ${KokkosKernelsPath}/scripts/header >> ${filename_spec_decl_hpp} - -echo "namespace ${NameSpace} {" >> ${filename_spec_decl_hpp} -echo "namespace Impl {" >> ${filename_spec_decl_hpp} - -for Scalar in ${ScalarList}; do -for Layout in ${LayoutList}; do -for ExecMemSpace in ${ExecMemSpaceList}; do -for Offset in ${OffsetList}; do -for Ordinal in ${OrdinalList}; do - ExecMemSpaceArray=(${ExecMemSpace//,/ }) - ExecSpace=${ExecMemSpaceArray[0]} - MemSpace=${ExecMemSpaceArray[1]} - echo "Generate: " ${FunctionExtended} " " ${Scalar} " " ${Layout} " " ${ExecSpace} " " ${MemSpace} " " ${Offset} " " ${Ordinal} - #echo "${KokkosKernelsPath}/scripts/generate_specialization_type_sparse.bash ${Function} ${FunctionExtended} ${Scalar} ${Layout} ${ExecSpace} ${MemSpace} ${Offset} ${Ordinal} ${MasterHeader} ${NameSpace} ${KokkosKernelsPath}" - ${KokkosKernelsPath}/scripts/generate_specialization_type_sparse.bash ${Function} ${FunctionExtended} ${Scalar} ${Layout} ${ExecSpace} ${MemSpace} ${Offset} ${Ordinal} ${MasterHeader} ${NameSpace} ${KokkosKernelsPath} -done -done -done -done -done - -echo "} // Impl" >> ${filename_spec_avail_hpp} -echo "} // ${NameSpace}" >> ${filename_spec_avail_hpp} -echo "#endif // ${Function_UpperCase}_ETI_SPEC_AVAIL_HPP_" >> ${filename_spec_avail_hpp} - -echo "} // Impl" >> ${filename_spec_decl_hpp} -echo "} // ${NameSpace}" >> ${filename_spec_decl_hpp} -echo "#endif // ${Function_UpperCase}_ETI_SPEC_DECL_HPP_" >> ${filename_spec_decl_hpp} diff --git a/scripts/generate_specialization_function_sparse_ml.bash b/scripts/generate_specialization_function_sparse_ml.bash deleted file mode 100755 index ea8667c1a8..0000000000 --- a/scripts/generate_specialization_function_sparse_ml.bash +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -Function=$1 #e.g. abs: function name -FunctionExtended=$2 #e.g. KokkosBlas1_abs: prefix for files etc. -MasterHeader=$3 #e.g. Kokkos_Blas1_abs_spec.hpp: where the specialization layer lives -NameSpace=$4 #e.g. KokkosBlas: namespace it lives in -KokkosKernelsPath=$5 -OrdinalList="int int64_t" -OffsetList="int size_t" -ScalarList="double float Kokkos::complex Kokkos::complex" -LayoutList="LayoutLeft LayoutRight" -ExecMemSpaceList="Cuda,CudaSpace,CudaSpace Cuda,CudaUVMSpace,CudaUVMSpace OpenMP,HostSpace,HostSpace Threads,HostSpace,HostSpace Serial,HostSpace,HostSpace OpenMP,Experimental::HBWSpace,Experimental::HBWSpace Threads,Experimental::HBWSpace,Experimental::HBWSpace Serial,Experimental::HBWSpace,Experimental::HBWSpace Cuda,CudaSpace,CudaHostPinnedSpace Cuda,CudaHostPinnedSpace,CudaHostPinnedSpace Cuda,CudaUVMSpace,CudaHostPinnedSpace OpenMP,Experimental::HBWSpace,HostSpace Threads,Experimental::HBWSpace,HostSpace Serial,Experimental::HBWSpace,HostSpace" - -mkdir generated_specializations_hpp -mkdir generated_specializations_cpp/${Function} -filename_hpp_root=generated_specializations_hpp/${FunctionExtended}_eti_spec -filename_spec_avail_hpp=${filename_hpp_root}_avail.hpp -filename_spec_decl_hpp=${filename_hpp_root}_decl.hpp -Function_UpperCase=`echo ${FunctionExtended} | awk '{print toupper($0)}'` - -# Start eti_spec_avail file: -echo "#ifndef ${Function_UpperCase}_ETI_SPEC_AVAIL_HPP_" > ${filename_spec_avail_hpp} -echo "#define ${Function_UpperCase}_ETI_SPEC_AVAIL_HPP_" >> ${filename_spec_avail_hpp} - -cat ${KokkosKernelsPath}/scripts/header >> ${filename_spec_avail_hpp} - -echo "namespace ${NameSpace} {" >> ${filename_spec_avail_hpp} -echo "namespace Impl {" >> ${filename_spec_avail_hpp} - -# Start eti_spec_decl file: -echo "#ifndef ${Function_UpperCase}_ETI_SPEC_DECL_HPP_" > ${filename_spec_decl_hpp} -echo "#define ${Function_UpperCase}_ETI_SPEC_DECL_HPP_" >> ${filename_spec_decl_hpp} - -cat ${KokkosKernelsPath}/scripts/header >> ${filename_spec_decl_hpp} - -echo "namespace ${NameSpace} {" >> ${filename_spec_decl_hpp} -echo "namespace Impl {" >> ${filename_spec_decl_hpp} - -for Scalar in ${ScalarList}; do -for Layout in ${LayoutList}; do -for ExecMemSpace in ${ExecMemSpaceList}; do -for Offset in ${OffsetList}; do -for Ordinal in ${OrdinalList}; do - ExecMemSpaceArray=(${ExecMemSpace//,/ }) - ExecSpace=${ExecMemSpaceArray[0]} - MemSpace=${ExecMemSpaceArray[1]} - SlowMemSpace=${ExecMemSpaceArray[2]} - echo "Generate: " ${FunctionExtended} " " ${Scalar} " " ${Layout} " " ${ExecSpace} " " ${MemSpace} " " ${SlowMemSpace} " " ${Offset} " " ${Ordinal} " " ${KokkosKernelsPath} - #echo "${KokkosKernelsPath}/scripts/generate_specialization_type_sparse.bash ${Function} ${FunctionExtended} ${Scalar} ${Layout} ${ExecSpace} ${MemSpace} ${Offset} ${Ordinal} ${MasterHeader} ${NameSpace} ${KokkosKernelsPath}" - ${KokkosKernelsPath}/scripts/generate_specialization_type_sparse_ml.bash ${Function} ${FunctionExtended} ${Scalar} ${Layout} ${ExecSpace} ${MemSpace} ${SlowMemSpace} ${Offset} ${Ordinal} ${MasterHeader} ${NameSpace} ${KokkosKernelsPath} -done -done -done -done -done - -echo "} // Impl" >> ${filename_spec_avail_hpp} -echo "} // ${NameSpace}" >> ${filename_spec_avail_hpp} -echo "#endif // ${Function_UpperCase}_ETI_SPEC_AVAIL_HPP_" >> ${filename_spec_avail_hpp} - -echo "} // Impl" >> ${filename_spec_decl_hpp} -echo "} // ${NameSpace}" >> ${filename_spec_decl_hpp} -echo "#endif // ${Function_UpperCase}_ETI_SPEC_DECL_HPP_" >> ${filename_spec_decl_hpp} - diff --git a/scripts/generate_specialization_spmv.bash b/scripts/generate_specialization_spmv.bash deleted file mode 100755 index 1ce0b7c14f..0000000000 --- a/scripts/generate_specialization_spmv.bash +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -Function=$1 #e.g. abs: function name -FunctionExtended=$2 #e.g. KokkosBlas1_impl_MV_abs: prefix for files etc. -MasterHeader=$3 #e.g. Kokkos_Blas1_MV_impl_abs.hpp: where the actual function definition and declaration lives -NameSpace=$4 #e.g. KokkosBlas: namespace it lives in -KokkosKernelsPath=$5 -ScalarList="double float Kokkos::complex Kokkos::complex" -LayoutList="LayoutLeft LayoutRight" -OffsetType="int size_t" -ExecMemSpaceList="Cuda,CudaSpace OpenMP,HostSpace Threads,HostSpace Serial,HostSpace" - -mkdir generated_specializations_hpp/${Function} -mkdir generated_specializations_cpp/${Function} -filename_hpp=generated_specializations_hpp/${FunctionExtended}_decl_specializations.hpp -Function_UpperCase=`echo ${FunctionExtended} | awk '{print toupper($0)}'` - - -echo "#ifndef ${Function_UpperCase}_DECL_SPECIALISATION_HPP_" > ${filename_hpp} -echo "#define ${Function_UpperCase}_DECL_SPECIALISATION_HPP_" >> ${filename_hpp} - -cat ${KokkosKernelsPath}/scripts/header >> ${filename_hpp} - -echo "namespace ${NameSpace} {" >> ${filename_hpp} -echo "namespace Impl {" >> ${filename_hpp} - -for Scalar in ${ScalarList}; do -for Layout in ${LayoutList}; do -for ExecMemSpace in ${ExecMemSpaceList}; do -for Offset in ${OffsetType}; do - ExecMemSpaceArray=(${ExecMemSpace//,/ }) - ExecSpace=${ExecMemSpaceArray[0]} - MemSpace=${ExecMemSpaceArray[1]} - echo "Generate: " ${FunctionExtended} " " ${Scalar} " " ${Layout} " " ${ExecSpace} " " ${MemSpace} " " ${Offset} - ${KokkosKernelsPath}/scripts/generate_specialization_spmv_type.bash ${Function} ${FunctionExtended} ${Scalar} ${Layout} ${ExecSpace} ${MemSpace} ${Offset} ${MasterHeader} ${NameSpace} ${KokkosKernelsPath} -done -done -done -done - -echo "} // Impl" >> ${filename_hpp} -echo "} // ${NameSpace}" >> ${filename_hpp} -echo "#endif // ${Function_UpperCase}_DECL_SPECIALISATION_HPP_" >> ${filename_hpp} diff --git a/scripts/generate_specialization_spmv_type.bash b/scripts/generate_specialization_spmv_type.bash deleted file mode 100755 index fb39148de7..0000000000 --- a/scripts/generate_specialization_spmv_type.bash +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -Function=$1 #e.g. abs: function name -FunctionExtended=$2 #e.g. KokkosBlas1_impl_MV_abs: prefix for files etc. -Scalar=$3 #e.g. double -Layout=$4 #e.g. LayoutLeft -ExecSpace=$5 #e.g. OpenMP -MemSpace=$6 #e.g. HostSpace -OffsetType=$7 -filename_master_hpp=$8 #e.g. Kokkos_Blas1_MV_impl_abs.hpp: where the actual function definition and declaration lives -NameSpace=$9 #e.g. KokkosBlas: namespace it lives in -KokkosKernelsPath=${10} - -Macro=`echo ${FunctionExtended} | awk '{print toupper($0)}'` -Scalar_UpperCase=`echo ${Scalar} | awk '{print toupper($0)}' | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` -Scalar_FileName=`echo ${Scalar} | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` -Layout_UpperCase=`echo ${Layout} | awk '{print toupper($0)}'` -ExecSpace_UpperCase=`echo ${ExecSpace} | awk '{print toupper($0)}'` -MemSpace_UpperCase=`echo ${MemSpace} | awk '{print toupper($0)}'` - -OffsetType_FileName=`echo ${OffsetType} | sed 's|\ |\_|g'` -filename_cpp=generated_specializations_cpp/${Function}/${FunctionExtended}_inst_specialization_${Scalar_FileName}_${OffsetType_FileName}_${Layout}_${ExecSpace}_${MemSpace}.cpp -filename_hpp=generated_specializations_hpp/${FunctionExtended}_decl_specializations.hpp - - -cat ${KokkosKernelsPath}/scripts/header > ${filename_cpp} -echo "" >> ${filename_cpp} -echo "#include \"${filename_master_hpp}\"" >> ${filename_cpp} -echo "" >> ${filename_cpp} -echo "namespace ${NameSpace} {" >> ${filename_cpp} -echo "namespace Impl {" >> ${filename_cpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase})" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_ORDINAL_${MemSpace_UpperCase})" >> ${filename_cpp} - -echo " ${Macro}_DEF(${Scalar}, int, ${OffsetType}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace})" >> ${filename_cpp} -echo "#endif" >> ${filename_cpp} -echo "} // Impl" >> ${filename_cpp} -echo "} // ${NameSpace}" >> ${filename_cpp} - -echo "" >> ${filename_hpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_hpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_hpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_hpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase})" >> ${filename_hpp} -echo " ${Macro}_DECL(${Scalar}, int, ${OffsetType}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace})" >> ${filename_hpp} -echo "#endif" >> ${filename_hpp} diff --git a/scripts/generate_specialization_type.bash b/scripts/generate_specialization_type.bash deleted file mode 100755 index 5122e693e8..0000000000 --- a/scripts/generate_specialization_type.bash +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -Function=$1 #e.g. abs: function name -FunctionExtended=$2 #e.g. KokkosBlas1_impl_MV_abs: prefix for files etc. -Scalar=$3 #e.g. double -Layout=$4 #e.g. LayoutLeft -ExecSpace=$5 #e.g. OpenMP -MemSpace=$6 #e.g. HostSpace -filename_master_hpp=$7 #e.g. Kokkos_Blas1_MV_impl_abs.hpp: where the actual function definition and declaration lives -NameSpace=$8 #e.g. KokkosBlas: namespace it lives in -KokkosKernelsPath=$9 - -# Makes an associative array to map the full scalar name to an abbreviated form -declare -A FilenamesAbbreviationsList=(["double"]="dbl" ["float"]="flt" - ["Kokkos::complex"]="Kokkos::cmplx" - ["Kokkos::complex"]="Kokkos::cmplx" - ["CudaSpace"]="CudaS" ["CudaHostPinnedSpace"]="CudaHPS" - ["CudaUVMSpace"]="CudaUS") - -Macro=`echo ${FunctionExtended} | awk '{print toupper($0)}'` -Scalar_UpperCase=`echo ${Scalar} | awk '{print toupper($0)}' | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` -Scalar_FileName=`echo ${FilenamesAbbreviationsList[${Scalar}]} | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` -Layout_UpperCase=`echo ${Layout} | awk '{print toupper($0)}'` -ExecSpace_UpperCase=`echo ${ExecSpace} | awk '{print toupper($0)}'` - -prefix="Experimental::" -MemSpace_UpperCase=`echo ${MemSpace#$prefix} | awk '{print toupper($0)}'` - -#MemSpace_UpperCase=`echo ${MemSpace} | awk '{print toupper($0)}'` - -if [ -z ${FilenamesAbbreviationsList[${MemSpace}]} ]; then - filename_cpp=generated_specializations_cpp/${Function}/${FunctionExtended}_eti_spec_inst_${Scalar_FileName}_${Layout}_${ExecSpace}_${MemSpace#$prefix}.cpp -else - filename_cpp=generated_specializations_cpp/${Function}/${FunctionExtended}_eti_spec_inst_${Scalar_FileName}_${Layout}_${ExecSpace}_${FilenamesAbbreviationsList[${MemSpace}]#$prefix}.cpp -fi -filename_spec_avail_hpp=generated_specializations_hpp/${FunctionExtended}_eti_spec_avail.hpp -filename_spec_decl_hpp=generated_specializations_hpp/${FunctionExtended}_eti_spec_decl.hpp - - -cat ${KokkosKernelsPath}/scripts/header > ${filename_cpp} -echo "" >> ${filename_cpp} -echo "#define KOKKOSKERNELS_IMPL_COMPILE_LIBRARY true" >> ${filename_cpp} -echo "#include \"KokkosKernels_config.h\"" >> ${filename_cpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase})" >> ${filename_cpp} -echo "#include \"${filename_master_hpp}\"" >> ${filename_cpp} -echo "" >> ${filename_cpp} -echo "namespace ${NameSpace} {" >> ${filename_cpp} -echo "namespace Impl {" >> ${filename_cpp} -echo " ${Macro}_ETI_SPEC_INST(${Scalar}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace})" >> ${filename_cpp} -echo "} // Impl" >> ${filename_cpp} -echo "} // ${NameSpace}" >> ${filename_cpp} -echo "#endif" >> ${filename_cpp} - -echo "" >> ${filename_spec_avail_hpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase})" >> ${filename_spec_avail_hpp} -echo " ${Macro}_ETI_SPEC_AVAIL(${Scalar}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace})" >> ${filename_spec_avail_hpp} -echo "#endif" >> ${filename_spec_avail_hpp} - -echo "" >> ${filename_spec_decl_hpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase})" >> ${filename_spec_decl_hpp} -echo " ${Macro}_ETI_SPEC_DECL(${Scalar}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace})" >> ${filename_spec_decl_hpp} -echo "#endif" >> ${filename_spec_decl_hpp} diff --git a/scripts/generate_specialization_type_sparse.bash b/scripts/generate_specialization_type_sparse.bash deleted file mode 100755 index e8b5dde6a2..0000000000 --- a/scripts/generate_specialization_type_sparse.bash +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash -Function=$1 #e.g. abs: function name -FunctionExtended=$2 #e.g. KokkosBlas1_impl_MV_abs: prefix for files etc. -Scalar=$3 #e.g. double -Layout=$4 #e.g. LayoutLeft -ExecSpace=$5 #e.g. OpenMP -MemSpace=$6 #e.g. HostSpace -OffsetType=$7 -OrdinalType=$8 - -filename_master_hpp=$9 #e.g. Kokkos_Blas1_MV_impl_abs.hpp: where the actual function definition and declaration lives -NameSpace=${10} #e.g. KokkosBlas: namespace it lives in -KokkosKernelsPath=${11} - -# Makes an associative array to map the full scalar name to an abbreviated form -declare -A FilenamesAbbreviationsList=(["double"]="dbl" ["float"]="flt" - ["Kokkos::complex"]="Kokkos::cmplx" - ["Kokkos::complex"]="Kokkos::cmplx" - ["CudaSpace"]="CudaS" ["CudaHostPinnedSpace"]="CudaHPS" - ["CudaUVMSpace"]="CudaUS") - -Macro=`echo ${FunctionExtended} | awk '{print toupper($0)}'` -Scalar_UpperCase=`echo ${Scalar} | awk '{print toupper($0)}' | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` - -Offset_UpperCase=`echo ${OffsetType} | awk '{print toupper($0)}' | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` -Ordinal_UpperCase=`echo ${OrdinalType} | awk '{print toupper($0)}' | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` - -Scalar_FileName=`echo ${FilenamesAbbreviationsList[${Scalar}]} | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` -Layout_UpperCase=`echo ${Layout} | awk '{print toupper($0)}'` -ExecSpace_UpperCase=`echo ${ExecSpace} | awk '{print toupper($0)}'` -prefix="Experimental::" -MemSpace_UpperCase=`echo ${MemSpace#$prefix} | awk '{print toupper($0)}'` - -#MemSpace_UpperCase=`echo ${MemSpace} | awk '{print toupper($0)}'` - -OffsetType_FileName=`echo ${OffsetType} | sed 's|\ |\_|g'` -OrdinalType_FileName=`echo ${OrdinalType} | sed 's|\ |\_|g'` - -if [ -z ${FilenamesAbbreviationsList[${MemSpace}]} ]; then - filename_cpp=generated_specializations_cpp/${Function}/${FunctionExtended}_eti_spec_inst_${Scalar_FileName}_${OffsetType_FileName}_${OrdinalType_FileName}_${Layout}_${ExecSpace}_${MemSpace#$prefix}.cpp -else - filename_cpp=generated_specializations_cpp/${Function}/${FunctionExtended}_eti_spec_inst_${Scalar_FileName}_${OffsetType_FileName}_${OrdinalType_FileName}_${Layout}_${ExecSpace}_${FilenamesAbbreviationsList[${MemSpace}]#$prefix}.cpp -fi -filename_spec_avail_hpp=generated_specializations_hpp/${FunctionExtended}_eti_spec_avail.hpp -filename_spec_decl_hpp=generated_specializations_hpp/${FunctionExtended}_eti_spec_decl.hpp - - -cat ${KokkosKernelsPath}/scripts/header > ${filename_cpp} -echo "" >> ${filename_cpp} -echo "#define KOKKOSKERNELS_IMPL_COMPILE_LIBRARY true" >> ${filename_cpp} -echo "#include \"KokkosKernels_config.h\"" >> ${filename_cpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_ORDINAL_${Ordinal_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_OFFSET_${Offset_UpperCase}) " >> ${filename_cpp} -echo "#include \"${filename_master_hpp}\"" >> ${filename_cpp} -echo "" >> ${filename_cpp} -echo "namespace ${NameSpace} {" >> ${filename_cpp} -echo "namespace Impl {" >> ${filename_cpp} -echo " ${Macro}_ETI_SPEC_INST(${Scalar}, ${OrdinalType}, ${OffsetType}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace})" >> ${filename_cpp} -echo "} // Impl" >> ${filename_cpp} -echo "} // ${NameSpace}" >> ${filename_cpp} -echo "#endif" >> ${filename_cpp} - -echo "" >> ${filename_spec_avail_hpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_ORDINAL_${Ordinal_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_OFFSET_${Offset_UpperCase}) " >> ${filename_spec_avail_hpp} -echo " ${Macro}_ETI_SPEC_AVAIL(${Scalar}, ${OrdinalType}, ${OffsetType}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace})" >> ${filename_spec_avail_hpp} -echo "#endif" >> ${filename_spec_avail_hpp} - -echo "" >> ${filename_spec_decl_hpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_ORDINAL_${Ordinal_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_OFFSET_${Offset_UpperCase}) " >> ${filename_spec_decl_hpp} -echo " ${Macro}_ETI_SPEC_DECL(${Scalar}, ${OrdinalType}, ${OffsetType}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace})" >> ${filename_spec_decl_hpp} -echo "#endif" >> ${filename_spec_decl_hpp} diff --git a/scripts/generate_specialization_type_sparse_ml.bash b/scripts/generate_specialization_type_sparse_ml.bash deleted file mode 100755 index 2799a30ad3..0000000000 --- a/scripts/generate_specialization_type_sparse_ml.bash +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -Function=$1 #e.g. abs: function name -FunctionExtended=$2 #e.g. KokkosBlas1_impl_MV_abs: prefix for files etc. -Scalar=$3 #e.g. double -Layout=$4 #e.g. LayoutLeft -ExecSpace=$5 #e.g. OpenMP -MemSpace=$6 #e.g. HBWSPACE -SlowMemSpace=$7 #e.g. HostSpace -OffsetType=$8 -OrdinalType=$9 - -filename_master_hpp=${10} #e.g. Kokkos_Blas1_MV_impl_abs.hpp: where the actual function definition and declaration lives -NameSpace=${11} #e.g. KokkosBlas: namespace it lives in -KokkosKernelsPath=${12} - -# Makes an associative array to map the full scalar name to an abbreviated form -declare -A FilenamesAbbreviationsList=(["double"]="dbl" ["float"]="flt" - ["Kokkos::complex"]="Kokkos::cmplx" - ["Kokkos::complex"]="Kokkos::cmplx" - ["CudaSpace"]="CudaS" ["CudaHostPinnedSpace"]="CudaHPS" - ["CudaUVMSpace"]="CudaUS") - -Macro=`echo ${FunctionExtended} | awk '{print toupper($0)}'` -Scalar_UpperCase=`echo ${Scalar} | awk '{print toupper($0)}' | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` - -Offset_UpperCase=`echo ${OffsetType} | awk '{print toupper($0)}' | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` -Ordinal_UpperCase=`echo ${OrdinalType} | awk '{print toupper($0)}' | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` - -Scalar_FileName=`echo ${FilenamesAbbreviationsList[${Scalar}]} | sed 's|\:\:|\_|g' | sed 's|<|_|g' | sed 's|>|_|g'` -Layout_UpperCase=`echo ${Layout} | awk '{print toupper($0)}'` -ExecSpace_UpperCase=`echo ${ExecSpace} | awk '{print toupper($0)}'` - -prefix="Experimental::" -echo echo ${MemSpace#$prefix} -echo ${SlowMemSpace#$prefix} -MemSpace_UpperCase=`echo ${MemSpace#$prefix} | awk '{print toupper($0)}'` -SlowMemSpace_UpperCase=`echo ${SlowMemSpace#$prefix} | awk '{print toupper($0)}'` - -#MemSpace_UpperCase=`echo ${MemSpace} | awk '{print toupper($0)}'` -#SlowMemSpace_UpperCase=`echo ${SlowMemSpace} | awk '{print toupper($0)}'` - -OffsetType_FileName=`echo ${OffsetType} | sed 's|\ |\_|g'` -OrdinalType_FileName=`echo ${OrdinalType} | sed 's|\ |\_|g'` - -if [ -z ${FilenamesAbbreviationsList[${MemSpace}]} ]; then - filename_cpp=generated_specializations_cpp/${Function}/${FunctionExtended}_eti_spec_inst_${Scalar_FileName}_${OffsetType_FileName}_${OrdinalType_FileName}_${Layout}_${ExecSpace}_${MemSpace#$prefix}_${SlowMemSpace#$prefix}.cpp -else - filename_cpp=generated_specializations_cpp/${Function}/${FunctionExtended}_eti_spec_inst_${Scalar_FileName}_${OffsetType_FileName}_${OrdinalType_FileName}_${Layout}_${ExecSpace}_${FilenamesAbbreviationsList[${MemSpace}]#$prefix}_${FilenamesAbbreviationsList[${SlowMemSpace}]#$prefix}.cpp -fi -filename_spec_avail_hpp=generated_specializations_hpp/${FunctionExtended}_eti_spec_avail.hpp -filename_spec_decl_hpp=generated_specializations_hpp/${FunctionExtended}_eti_spec_decl.hpp - - -cat ${KokkosKernelsPath}/scripts/header > ${filename_cpp} -echo "" >> ${filename_cpp} -echo "#define KOKKOSKERNELS_IMPL_COMPILE_LIBRARY true" >> ${filename_cpp} -echo "#include \"KokkosKernels_config.h\"" >> ${filename_cpp} -echo "" >> ${filename_cpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${SlowMemSpace_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_ORDINAL_${Ordinal_UpperCase}) \\" >> ${filename_cpp} -echo " && defined (KOKKOSKERNELS_INST_OFFSET_${Offset_UpperCase}) " >> ${filename_cpp} -echo "#include \"${filename_master_hpp}\"" >> ${filename_cpp} -echo "namespace ${NameSpace} {" >> ${filename_cpp} -echo "namespace Impl {" >> ${filename_cpp} -echo " ${Macro}_ETI_SPEC_INST(${Scalar}, ${OrdinalType}, ${OffsetType}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace}, Kokkos::${SlowMemSpace})" >> ${filename_cpp} -echo "} // Impl" >> ${filename_cpp} -echo "} // ${NameSpace}" >> ${filename_cpp} -echo "#endif" >> ${filename_cpp} - -echo "" >> ${filename_spec_avail_hpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${SlowMemSpace_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_ORDINAL_${Ordinal_UpperCase}) \\" >> ${filename_spec_avail_hpp} -echo " && defined (KOKKOSKERNELS_INST_OFFSET_${Offset_UpperCase}) " >> ${filename_spec_avail_hpp} -echo " ${Macro}_ETI_SPEC_AVAIL(${Scalar}, ${OrdinalType}, ${OffsetType}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace}, Kokkos::${SlowMemSpace})" >> ${filename_spec_avail_hpp} -echo "#endif" >> ${filename_spec_avail_hpp} - -echo "" >> ${filename_spec_decl_hpp} -echo "#if defined (KOKKOSKERNELS_INST_${Scalar_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_${Layout_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_EXECSPACE_${ExecSpace_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${MemSpace_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_MEMSPACE_${SlowMemSpace_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_ORDINAL_${Ordinal_UpperCase}) \\" >> ${filename_spec_decl_hpp} -echo " && defined (KOKKOSKERNELS_INST_OFFSET_${Offset_UpperCase}) " >> ${filename_spec_decl_hpp} -echo " ${Macro}_ETI_SPEC_DECL(${Scalar}, ${OrdinalType}, ${OffsetType}, Kokkos::${Layout}, Kokkos::${ExecSpace}, Kokkos::${MemSpace}, Kokkos::${SlowMemSpace})" >> ${filename_spec_decl_hpp} -echo "#endif" >> ${filename_spec_decl_hpp} diff --git a/scripts/test_all_sandia b/scripts/test_all_sandia deleted file mode 100755 index 0f126589cf..0000000000 --- a/scripts/test_all_sandia +++ /dev/null @@ -1,970 +0,0 @@ -#!/bin/bash -e - -# -# Global config -# - -set -o pipefail - -# Determine current machine. - -MACHINE="" -HOSTNAME=$(hostname) -PROCESSOR=`uname -p` - -if [[ "$HOSTNAME" =~ (white|ride).* ]]; then - MACHINE=white - module load git -fi - -if [[ "$HOSTNAME" =~ .*bowman.* ]]; then - MACHINE=bowman - module load git -fi - -if [[ "$HOSTNAME" == *blake* ]]; then - MACHINE=blake - module load git -fi - -if [[ "$HOSTNAME" == apollo\.* ]]; then - MACHINE=apollo -fi - -if [[ "$HOSTNAME" == kokkos-dev-2* ]]; then - MACHINE=kokkos-dev-2 -fi - -if [[ "$HOSTNAME" == may* ]]; then - MACHINE=mayer -# module load git -fi - -if [[ "$HOSTNAME" == cn* ]]; then # Warning: very generic name - MACHINE=mayer -fi - -if [[ "$HOSTNAME" == kokkos-dev\.sandia\.gov* ]]; then - MACHINE=kokkos-dev - echo $MACHINE -fi - -if [ ! -z "$SEMS_MODULEFILES_ROOT" ]; then - if [[ "$MACHINE" = "" ]]; then - MACHINE=sems - module load sems-git - fi -fi - -if [[ "$MACHINE" = "" ]]; then - echo "Unrecognized machine" >&2 - exit 1 -fi - -echo "Running on machine: $MACHINE" - -GCC_BUILD_LIST="OpenMP,Pthread,Serial,OpenMP_Serial,Pthread_Serial" -IBM_BUILD_LIST="OpenMP,Serial,OpenMP_Serial" -ARM_GCC_BUILD_LIST="OpenMP,Serial,OpenMP_Serial" -INTEL_BUILD_LIST="OpenMP,Pthread,Serial,OpenMP_Serial,Pthread_Serial" -CLANG_BUILD_LIST="Pthread,Serial,Pthread_Serial" -CUDA_BUILD_LIST="Cuda_OpenMP,Cuda_Pthread,Cuda_Serial" -CUDA_IBM_BUILD_LIST="Cuda_OpenMP,Cuda_Serial" - -GCC_WARNING_FLAGS="-Werror,-Wall,-Wshadow,-pedantic,-Wsign-compare,-Wtype-limits,-Wignored-qualifiers,-Wempty-body,-Wclobbered,-Wuninitialized" -IBM_WARNING_FLAGS="-Werror,-Wall,-Wshadow,-pedantic,-Wsign-compare,-Wtype-limits,-Wuninitialized" -CLANG_WARNING_FLAGS="-Wall,-Wshadow,-pedantic,-Wsign-compare,-Wtype-limits,-Wuninitialized" -#CLANG_WARNING_FLAGS="-Werror,-Wall,-Wshadow,-pedantic,-Wsign-compare,-Wtype-limits,-Wuninitialized" -INTEL_WARNING_FLAGS="-Werror,-Wall,-Wshadow,-pedantic,-Wsign-compare,-Wtype-limits,-Wuninitialized" -CUDA_WARNING_FLAGS="-Wall,-Wshadow,-pedantic,-Wsign-compare,-Wtype-limits,-Wuninitialized" -PGI_WARNING_FLAGS="" - -# Default. Machine specific can override. -DEBUG=False -ARGS="" -CUSTOM_BUILD_LIST="" -QTHREADS_PATH="" -DRYRUN=False -BUILD_ONLY=False -declare -i NUM_JOBS_TO_RUN_IN_PARALLEL=2 -TEST_SCRIPT=False -SKIP_HWLOC=False -SPOT_CHECK=False - -PRINT_HELP=False -OPT_FLAG="" -CXX_FLAGS_EXTRA="" -LD_FLAGS_EXTRA="" -KOKKOS_OPTIONS="" - -# -# Handle arguments. -# - -while [[ $# > 0 ]] -do - key="$1" - - case $key in - --kokkoskernels-path*) - KOKKOSKERNELS_PATH="${key#*=}" - ;; - --kokkos-path*) - KOKKOS_PATH="${key#*=}" - ;; - --qthreads-path*) - QTHREADS_PATH="${key#*=}" - ;; - --build-list*) - CUSTOM_BUILD_LIST="${key#*=}" - ;; - --debug*) - DEBUG=True - ;; - --build-only*) - BUILD_ONLY=True - ;; - --test-script*) - TEST_SCRIPT=True - ;; - --skip-hwloc*) - SKIP_HWLOC=True - ;; - --num*) - NUM_JOBS_TO_RUN_IN_PARALLEL="${key#*=}" - ;; - --dry-run*) - DRYRUN=True - ;; - --spot-check*) - SPOT_CHECK=True - ;; - --arch*) - ARCH_FLAG="--arch=${key#*=}" - ;; - --opt-flag*) - OPT_FLAG="${key#*=}" - ;; - --with-cuda-options*) - KOKKOS_CUDA_OPTIONS="--with-cuda-options=${key#*=}" - ;; - --with-kokkos-options*) - KOKKOS_OPTIONS="--with-kokkos-options=${key#*=}" - ;; - --cxxflags-extra*) - CXX_FLAGS_EXTRA="${key#*=}" - ;; - --cxxstandard*) - CXX_STANDARD="${key#*=}" - ;; - --ldflags-extra*) - LD_FLAGS_EXTRA="${key#*=}" - ;; - --with-scalars*) - KOKKOSKERNELS_SCALARS="${key#*=}" - ;; - --with-ordinals*) - KOKKOSKERNELS_ORDINALS="${key#*=}" - ;; - --with-offsets*) - KOKKOSKERNELS_OFFSETS="${key#*=}" - ;; - --with-layouts*) - KOKKOSKERNELS_LAYOUTS="${key#*=}" - ;; - --with-tpls*) - KOKKOSKERNELS_ENABLE_TPLS="${key#*=}" - ;; - --help*) - PRINT_HELP=True - ;; - *) - # args, just append - ARGS="$ARGS $1" - ;; - esac - - shift -done - -SCRIPT_KOKKOS_ROOT=$( cd "$( dirname "$0" )" && cd .. && pwd ) - -# Set kokkos path. -if [ -z "$KOKKOSKERNELS_PATH" ]; then - KOKKOSKERNELS_PATH=$SCRIPT_KOKKOS_ROOT -else - # Ensure KOKKOSKERNELS_PATH is abs path. - KOKKOSKERNELS_PATH=$( cd $KOKKOSKERNELS_PATH && pwd ) -fi - -# Set kokkos path. -if [ -z "$KOKKOS_PATH" ]; then - KOKKOS_PATH=$KOKKOSKERNELS_PATH/../kokkos -else - # Ensure KOKKOS_PATH is abs path. - KOKKOS_PATH=$( cd $KOKKOS_PATH && pwd ) -fi - -# -# Machine specific config. -# - -if [ "$MACHINE" = "sems" ]; then - source /projects/sems/modulefiles/utils/sems-modules-init.sh - - # On unnamed sems machines, assume more restricted rhel7 environment - # On rhel7 sems machines gcc/7.3.0, clang/4.0.1, and intel/16.0.3 are missing - # Remove kokkkos-env module use - - BASE_MODULE_LIST="sems-env,sems-/" - CUDA9_MODULE_LIST="sems-env,sems-/,sems-gcc/7.2.0" - SKIP_HWLOC=True - # No sems hwloc module - - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="" - fi - - if [ "$SPOT_CHECK" = "True" ]; then - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/5.3.0 $BASE_MODULE_LIST "OpenMP" g++ $GCC_WARNING_FLAGS" - "gcc/7.2.0 $BASE_MODULE_LIST "Serial" g++ $GCC_WARNING_FLAGS" - "intel/17.0.1 $BASE_MODULE_LIST "OpenMP" icpc $INTEL_WARNING_FLAGS" - "clang/3.9.0 $BASE_MODULE_LIST "Pthread_Serial" clang++ $CLANG_WARNING_FLAGS" - "cuda/9.2 $CUDA9_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - ) - else - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/4.8.4 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/4.9.3 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/5.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/6.1.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/7.2.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "intel/15.0.2 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/16.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/17.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "clang/3.6.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/3.7.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/3.8.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/3.9.0 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "cuda/9.2 $CUDA9_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - ) - fi -elif [ "$MACHINE" = "kokkos-dev" ]; then - source /projects/sems/modulefiles/utils/sems-modules-init.sh - - BASE_MODULE_LIST="sems-env,kokkos-env,kokkos-hwloc/1.10.1/base,sems-/" - CUDA_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/4.8.4,kokkos-hwloc/1.10.1/base" - CUDA8_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/5.3.0,kokkos-hwloc/1.10.1/base" - - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="" - fi - - if [ "$SPOT_CHECK" = "True" ]; then - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/5.3.0 $BASE_MODULE_LIST "Serial" g++ $GCC_WARNING_FLAGS" - "gcc/7.2.0 $BASE_MODULE_LIST "Serial" g++ $GCC_WARNING_FLAGS" - "intel/17.0.1 $BASE_MODULE_LIST "OpenMP" icpc $INTEL_WARNING_FLAGS" - "clang/4.0.1 $BASE_MODULE_LIST "Pthread_Serial" clang++ $CLANG_WARNING_FLAGS" - "cuda/8.0.44 $CUDA8_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - ) - else - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/4.8.4 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/4.9.3 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/5.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/6.1.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/7.2.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "intel/15.0.2 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/16.0.3 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/17.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "clang/3.6.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/3.7.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/3.8.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/3.9.0 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/4.0.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "cuda/7.5.18 $CUDA_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - "cuda/8.0.44 $CUDA8_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - ) - fi -elif [ "$MACHINE" = "kokkos-dev-2" ]; then - source /projects/sems/modulefiles/utils/sems-modules-init.sh - module use /home/projects/x86-64/modulefiles/local - module purge - module load sems-env - module load kokkos-env - - module load sems-git - module load sems-tex - module load sems-cmake/3.12.2 - module load sems-gdb - - SKIP_HWLOC=True - - BASE_MODULE_LIST="sems-env,kokkos-env,kokkos-hwloc/1.10.1/base,sems-/" - GCC91_MODULE_LIST="sems-env,kokkos-env,kokkos-hwloc/1.10.1/base,/" - NVCC_MODULE_LIST="sems-env,kokkos-env,kokkos-hwloc/1.10.1/base,/,sems-gcc/7.3.0" - - CLANG_MODULE_LIST="sems-env,kokkos-env,sems-/,sems-gcc/6.1.0" - CLANG8_MODULE_LIST="sems-env,kokkos-env,/,cuda/10.0" - - BUILD_LIST_CUDA_NVCC="Cuda_Serial,Cuda_Pthread" - BUILD_LIST_CUDA_CLANG="Cuda_Serial,Cuda_OpenMP" - BUILD_LIST_CLANG="Serial,Pthread,OpenMP" - - if [ "$SPOT_CHECK" = "True" ]; then - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/7.3.0 $BASE_MODULE_LIST "OpenMP,Pthread" g++ $GCC_WARNING_FLAGS" - "gcc/9.1 $GCC91_MODULE_LIST "OpenMP,Serial" g++ $GCC_WARNING_FLAGS" - "intel/18.0.5 $BASE_MODULE_LIST "OpenMP" icpc $INTEL_WARNING_FLAGS" - "clang/8.0 $CLANG8_MODULE_LIST "Cuda_OpenMP,Pthread_Serial" clang++ $CLANG_WARNING_FLAGS" - "cuda/10.1 $NVCC_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - ) - else - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("cuda/10.0 $NVCC_MODULE_LIST $BUILD_LIST_CUDA_NVCC $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - "cuda/10.1 $NVCC_MODULE_LIST $BUILD_LIST_CUDA_NVCC $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - "clang/8.0 $CLANG8_MODULE_LIST $BUILD_LIST_CUDA_CLANG clang++ $CUDA_WARNING_FLAGS" - "clang/8.0 $CLANG8_MODULE_LIST $BUILD_LIST_CLANG clang++ $CLANG_WARNING_FLAGS" - "gcc/4.8.4 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/4.9.3 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/5.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/6.1.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/7.2.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/7.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/9.1 $GCC91_MODULE_LIST "OpenMP,Serial" g++ $GCC_WARNING_FLAGS" - "intel/15.0.2 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/16.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/17.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/18.0.5 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/19.0.5 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "clang/3.5.2 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/5.0.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/7.0.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - ) - fi - - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=SNB,Volta70" - fi -elif [ "$MACHINE" = "white" ]; then - source /etc/profile.d/modules.sh - SKIP_HWLOC=True - export SLURM_TASKS_PER_NODE=32 - - BASE_MODULE_LIST="/" - IBM_MODULE_LIST="/xl/,gcc/7.2.0" - CUDA_MODULE_LIST="/,gcc/7.2.0,ibm/xl/16.1.0" - CUDA10_MODULE_LIST="/,gcc/7.4.0,ibm/xl/16.1.0" - - module load netlib/3.8.0/gcc - export BLAS_LIBRARIES="${BLAS_ROOT}/lib/libblas.a ${BLAS_ROOT}/lib/liblapack.a" - # blas is compiled by gcc so use single underscore and power8 use return complex - KOKKOS_OPTIONS="eti-only,blas-mangle_,blas-return-complex" - - # Don't do pthread on white. - GCC_BUILD_LIST="OpenMP,Serial,OpenMP_Serial" - - if [ "$SPOT_CHECK" = "True" ]; then - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/6.4.0 $BASE_MODULE_LIST "OpenMP_Serial" g++ $GCC_WARNING_FLAGS" - "gcc/7.2.0 $BASE_MODULE_LIST $IBM_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/7.4.0 $BASE_MODULE_LIST "OpenMP" g++ $GCC_WARNING_FLAGS" - "ibm/16.1.0 $IBM_MODULE_LIST "Serial" xlC $IBM_WARNING_FLAGS" - "cuda/9.2.88 $CUDA_MODULE_LIST "Cuda_OpenMP" ${KOKKOS_PATH}/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - "cuda/10.0.130 $CUDA10_MODULE_LIST "Cuda_Serial" ${KOKKOS_PATH}/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - ) - else - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/6.4.0 $BASE_MODULE_LIST $IBM_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/7.2.0 $BASE_MODULE_LIST $IBM_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/7.4.0 $BASE_MODULE_LIST $IBM_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "ibm/16.1.0 $IBM_MODULE_LIST $IBM_BUILD_LIST xlC $IBM_WARNING_FLAGS" - "ibm/16.1.1 $IBM_MODULE_LIST $IBM_BUILD_LIST xlC $IBM_WARNING_FLAGS" - "cuda/9.2.88 $CUDA_MODULE_LIST $CUDA_IBM_BUILD_LIST ${KOKKOS_PATH}/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - "cuda/10.0.130 $CUDA10_MODULE_LIST $CUDA_IBM_BUILD_LIST ${KOKKOS_PATH}/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - ) - fi - - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=Power8,Kepler37" - fi - -elif [ "$MACHINE" = "bowman" ]; then - source /etc/profile.d/modules.sh - SKIP_HWLOC=True - export SLURM_TASKS_PER_NODE=32 - - BASE_MODULE_LIST="/compilers/" - - OLD_INTEL_BUILD_LIST="Pthread,Serial,Pthread_Serial" - - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("intel/16.4.258 $BASE_MODULE_LIST $OLD_INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/17.2.174 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/18.2.199 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - ) - - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=KNL" - fi - -elif [ "$MACHINE" = "mayer" ]; then - SKIP_HWLOC=True - export SLURM_TASKS_PER_NODE=96 - - BASE_MODULE_LIST="/" - ARM_MODULE_LIST="/compilers/" - - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gnu7/7.2.0 $BASE_MODULE_LIST $ARM_GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "arm/19.2.0 $ARM_MODULE_LIST $ARM_GCC_BUILD_LIST armclang++ $CLANG_WARNING_FLAGS" - ) - - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=ARMv8-TX2" - fi - -elif [ "$MACHINE" = "blake" ]; then - source /etc/profile.d/modules.sh - SKIP_HWLOC=True - export SLURM_TASKS_PER_NODE=32 - - BASE_MODULE_LIST="/,openblas" - BASE_MODULE_LIST_INTEL="/compilers/,openblas" - - BLAS_PATH=${BLAS_ROOT} - if [ "$SPOT_CHECK" = "True" ]; then - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/7.2.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "intel/18.1.163 $BASE_MODULE_LIST_INTEL $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - ) - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=SKX" - fi - else - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/4.9.3 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/5.5.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/6.4.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/7.2.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/8.1.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "intel/18.1.163 $BASE_MODULE_LIST_INTEL $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "pgi/18.7.0 $BASE_MODULE_LIST $GCC_BUILD_LIST pgc++ $PGI_WARNING_FLAGS" - ) - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=SNB" - fi - fi - -elif [ "$MACHINE" = "apollo" ]; then - source /projects/sems/modulefiles/utils/sems-modules-init.sh - module use /home/projects/modulefiles/local/x86-64 - module load kokkos-env - - module load sems-git - module load sems-tex - module load sems-cmake/3.5.2 - module load sems-gdb - - SKIP_HWLOC=True - - BASE_MODULE_LIST="sems-env,kokkos-env,kokkos-hwloc/1.10.1/base,sems-/" - CUDA_MODULE_LIST="sems-env,kokkos-env,kokkos-/,sems-gcc/5.3.0,kokkos-hwloc/1.10.1/base" - CUDA10_MODULE_LIST="sems-env,kokkos-env,/,sems-gcc/6.1.0,kokkos-hwloc/1.10.1/base,magma" - - CLANG_MODULE_LIST="sems-env,kokkos-env,/,cuda/9.0.69" - CLANG7_MODULE_LIST="sems-env,kokkos-env,/,cuda/9.1" - NVCC_MODULE_LIST="sems-env,kokkos-env,/,sems-gcc/5.3.0" - - BUILD_LIST_CUDA_NVCC="Cuda_Serial,Cuda_OpenMP" - BUILD_LIST_CUDA_CLANG="Cuda_Serial,Cuda_Pthread" - BUILD_LIST_CLANG="Serial,Pthread,OpenMP" - - if [ "$SPOT_CHECK" = "True" ]; then - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("gcc/4.8.4 $BASE_MODULE_LIST "OpenMP,Pthread" g++ $GCC_WARNING_FLAGS" - "gcc/5.3.0 $BASE_MODULE_LIST "Serial" g++ $GCC_WARNING_FLAGS" - "intel/16.0.1 $BASE_MODULE_LIST "OpenMP" icpc $INTEL_WARNING_FLAGS" - "clang/3.9.0 $BASE_MODULE_LIST "Pthread_Serial" clang++ $CLANG_WARNING_FLAGS" - "clang/6.0 $CLANG_MODULE_LIST "Cuda_Pthread" clang++ $CUDA_WARNING_FLAGS" - "cuda/9.1 $CUDA_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - "cuda/10.0 $CUDA10_MODULE_LIST "Cuda_OpenMP" ${KOKKOS_PATH}/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - ) - else - # Format: (compiler module-list build-list exe-name warning-flag) - COMPILERS=("cuda/9.1 $CUDA_MODULE_LIST $BUILD_LIST_CUDA_NVCC $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS" - "clang/6.0 $CLANG_MODULE_LIST $BUILD_LIST_CUDA_CLANG clang++ $CUDA_WARNING_FLAGS" - "clang/7.0 $CLANG7_MODULE_LIST $BUILD_LIST_CUDA_CLANG clang++ $CUDA_WARNING_FLAGS" - "clang/3.9.0 $CLANG_MODULE_LIST $BUILD_LIST_CLANG clang++ $CLANG_WARNING_FLAGS" - "gcc/4.8.4 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/4.9.3 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/5.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "gcc/6.1.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS" - "intel/15.0.2 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/16.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "intel/17.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS" - "clang/3.5.2 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - "clang/3.6.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS" - ) - fi - - if [ -z "$ARCH_FLAG" ]; then - ARCH_FLAG="--arch=SNB,Volta70" - fi - -else - echo "Unhandled machine $MACHINE" >&2 - exit 1 -fi - -export OMP_NUM_THREADS=4 - -declare -i NUM_RESULTS_TO_KEEP=7 - -RESULT_ROOT_PREFIX=TestAll - -if [ "$PRINT_HELP" = "True" ]; then - echo "test_all_sandia :" - echo "" - echo "OPTIONS: list of flag options for non-default testing" - echo "" - echo "--kokkoskernels-path=/Path/To/Kokkos: Path to the KokkosKernels root directory" - echo " Defaults to root repo containing this script" - echo "--kokkos-path=/Path/To/Kokkos: Path to the Kokkos root directory" - echo " Defaults to KokkosKernelsPath/../kokkos" - echo "" - echo "--debug: Run tests in debug. Defaults to False" - echo "--test-script: Test this script, not Kokkos" - echo "--skip-hwloc: Do not do hwloc tests" - echo "--num=N: Number of jobs to run in parallel" - echo "--spot-check: Minimal test set to issue pull request" - echo "--dry-run: Just print what would be executed" - echo "--build-only: Just do builds, don't run anything" - echo "" - echo "--arch=ARCHITECTURE: overwrite architecture flags" - echo "" - echo "--with-kokkos-options=OPT: set KOKKOS_OPTIONS" - echo "--with-cuda-options=OPT: set KOKKOS_CUDA_OPTIONS" - echo "" - echo "--opt-flag=FLAG: Optimization flag (default: -O3)" - echo "--cxxflags-extra=FLAG(S): append extra flags to cxxflags" - echo "--ldflags-extra=FLAG(S): append extra ldflags to ldflags" - echo "--cxxstandard=STD: set KOKKOS_CXX_STANDARD" - echo "" - echo "--with-scalars=SCALARS: set KOKKOSKERNELS_SCALARS" - echo " Provide a comma-separated list scalar types" - echo " Valid items:" - echo " float, complex, double, complex" - echo " Example: SCALARS='double,\"complex\\"'" - echo "" - echo "--with-ordinals=ORDS: set KOKKOSKERNELS_ORDINALS" - echo " Provide a comma-separated list ordinal types" - echo " Valid items:" - echo " int, int64_t" - echo "" - echo "--with-offsets=OFFS: set KOKKOSKERNELS_OFFSETS" - echo " Provide a comma-separated list offset types" - echo " Valid items:" - echo " int, size_t" - echo "" - echo "--with-layouts=LAYOUTS: set KOKKOSKERNELS_LAYOUTS" - echo " Provide a comma-separated list layouts" - echo " Valid items:" - echo " LayoutLeft,LayoutRight" - echo "" - echo "--build-list=BUILD,BUILD,BUILD..." - echo " Provide a comma-separated list of builds instead of running all builds" - echo " Valid items:" - echo " OpenMP, Pthread, Qthreads, Serial, OpenMP_Serial, Pthread_Serial" - echo " Qthreads_Serial, Cuda_OpenMP, Cuda_Pthread, Cuda_Serial" - echo "" - - echo "ARGS: list of expressions matching compilers to test" - echo " supported compilers sems" - for COMPILER_DATA in "${COMPILERS[@]}"; do - ARR=($COMPILER_DATA) - COMPILER=${ARR[0]} - echo " $COMPILER" - done - echo "" - - echo "Examples:" - echo " Run all tests" - echo " % test_all_sandia" - echo "" - echo " Run all gcc tests" - echo " % test_all_sandia gcc" - echo "" - echo " Run all gcc/4.8.4 and all intel tests" - echo " % test_all_sandia gcc/4.8.4 intel" - echo "" - echo " Run all tests in debug" - echo " % test_all_sandia --debug" - echo "" - echo " Run gcc/4.8.4 and only do OpenMP and OpenMP_Serial builds" - echo " % test_all_sandia gcc/4.8.4 --build-list=OpenMP,OpenMP_Serial" - echo "" - echo "If you want to kill the tests, do:" - echo " hit ctrl-z" - echo " % kill -9 %1" - echo - exit 0 -fi - -# Set build type. -if [ "$DEBUG" = "True" ]; then - BUILD_TYPE=debug -else - BUILD_TYPE=release -fi - -# If no args provided, do all compilers. -if [ -z "$ARGS" ]; then - ARGS='?' -fi - -# Process args to figure out which compilers to test. -COMPILERS_TO_TEST="" - -for ARG in $ARGS; do - for COMPILER_DATA in "${COMPILERS[@]}"; do - ARR=($COMPILER_DATA) - COMPILER=${ARR[0]} - - if [[ "$COMPILER" = $ARG* ]]; then - if [[ "$COMPILERS_TO_TEST" != *${COMPILER}* ]]; then - COMPILERS_TO_TEST="$COMPILERS_TO_TEST $COMPILER" - else - echo "Tried to add $COMPILER twice" - fi - fi - done -done - -# Check if Qthreads build requested. -HAVE_QTHREADS_BUILD="False" -if [ -n "$CUSTOM_BUILD_LIST" ]; then - if [[ "$CUSTOM_BUILD_LIST" = *Qthreads* ]]; then - HAVE_QTHREADS_BUILD="True" - fi -else - for COMPILER_DATA in "${COMPILERS[@]}"; do - ARR=($COMPILER_DATA) - BUILD_LIST=${ARR[2]} - if [[ "$BUILD_LIST" = *Qthreads* ]]; then - HAVE_QTHREADS_BUILD="True" - fi - done -fi - -# Ensure Qthreads path is set if Qthreads build is requested. -if [ "$HAVE_QTHREADS_BUILD" = "True" ]; then - if [ -z "$QTHREADS_PATH" ]; then - echo "Need to supply Qthreads path (--qthreads-path) when testing Qthreads backend." >&2 - exit 1 - else - # Strip trailing slashes from path. - QTHREADS_PATH=$(echo $QTHREADS_PATH | sed 's/\/*$//') - fi -fi - -# -# Functions. -# - -# get_compiler_name -get_compiler_name() { - echo $1 | cut -d/ -f1 -} - -# get_compiler_version -get_compiler_version() { - echo $1 | cut -d/ -f2 -} - -# Do not call directly. -get_compiler_data() { - local compiler=$1 - local item=$2 - local compiler_name=$(get_compiler_name $compiler) - local compiler_vers=$(get_compiler_version $compiler) - - local compiler_data - for compiler_data in "${COMPILERS[@]}" ; do - local arr=($compiler_data) - - if [ "$compiler" = "${arr[0]}" ]; then - echo "${arr[$item]}" | tr , ' ' | sed -e "s//$compiler_name/g" -e "s//$compiler_vers/g" - return 0 - fi - done - - # Not found. - echo "Unreconized compiler $compiler" >&2 - exit 1 -} - -# -# For all getters, usage: -# - -get_compiler_modules() { - get_compiler_data $1 1 -} - -get_compiler_build_list() { - get_compiler_data $1 2 -} - -get_compiler_exe_name() { - get_compiler_data $1 3 -} - -get_compiler_warning_flags() { - get_compiler_data $1 4 -} - -run_cmd() { - echo "RUNNING: $*" - if [ "$DRYRUN" != "True" ]; then - eval "$* 2>&1" - fi -} - -# report_and_log_test_results -report_and_log_test_result() { - # Use sane var names. - local success=$1; local desc=$2; local comment=$3; - - if [ "$success" = "0" ]; then - echo " PASSED $desc" - echo $comment > $PASSED_DIR/$desc - else - # For failures, comment should be the name of the phase that failed. - echo " FAILED $desc" >&2 - echo $comment > $FAILED_DIR/$desc - cat ${desc}.${comment}.log - fi -} - -setup_env() { - local compiler=$1 - local compiler_modules=$(get_compiler_modules $compiler) - - module purge - - local mod - for mod in $compiler_modules; do - echo "Loading module $mod" - module load $mod 2>&1 - # It is ridiculously hard to check for the success of a loaded - # module. Module does not return error codes and piping to grep - # causes module to run in a subshell. - module list 2>&1 | grep "$mod" >& /dev/null || return 1 - done - - return 0 -} - -# single_build_and_test -single_build_and_test() { - # Use sane var names. - local compiler=$1; local build=$2; local build_type=$3; - - # Set up env. - mkdir -p $ROOT_DIR/$compiler/"${build}-$build_type" - cd $ROOT_DIR/$compiler/"${build}-$build_type" - local desc=$(echo "${compiler}-${build}-${build_type}" | sed 's:/:-:g') - setup_env $compiler >& ${desc}.configure.log || { report_and_log_test_result 1 ${desc} configure && return 0; } - - # Set up flags. - local compiler_warning_flags=$(get_compiler_warning_flags $compiler) - local compiler_exe=$(get_compiler_exe_name $compiler) - - if [[ "$build_type" = hwloc* ]]; then - local extra_args=--with-hwloc=$(dirname $(dirname $(which hwloc-info))) - fi - - if [[ "$build" = *Qthreads* ]]; then - if [[ "$build_type" = hwloc* ]]; then - local extra_args="$extra_args --qthreads-path=${QTHREADS_PATH}_hwloc" - else - local extra_args="$extra_args --qthreads-path=$QTHREADS_PATH" - fi - fi - - if [[ "$OPT_FLAG" = "" ]]; then - OPT_FLAG="-O3" - fi - - if [[ "$build_type" = *debug* ]]; then - local extra_args="$extra_args --debug" - local cxxflags="-g $compiler_warning_flags" - local ldflags="-g" - else - local cxxflags="$OPT_FLAG $compiler_warning_flags" - local ldflags="${OPT_FLAG}" - fi - - local cxxflags="${cxxflags} ${CXX_FLAGS_EXTRA}" - local ldflags="${ldflags} ${LD_FLAGS_EXTRA}" - - local cxx_standard="${CXX_STANDARD}" - - if [[ "$KOKKOS_CUDA_OPTIONS" != "" ]]; then - local extra_args="$extra_args $KOKKOS_CUDA_OPTIONS" - fi - if [[ "$KOKKOS_OPTIONS" != "" ]]; then - local extra_args="$extra_args $KOKKOS_OPTIONS" - fi - - echo " Starting job $desc" - - local comment="no_comment" - - # Keep variable wrapped in single quotes so complex passed correctly to generate_makefile - local kk_scalars=\'${KOKKOSKERNELS_SCALARS}\' - - if [ "$TEST_SCRIPT" = "True" ]; then - local rand=$[ 1 + $[ RANDOM % 10 ]] - sleep $rand - - if [ $rand -gt 5 ]; then - run_cmd ls fake_problem >& ${desc}.configure.log || { report_and_log_test_result 1 $desc configure && return 0; } - fi - else - run_cmd ${KOKKOSKERNELS_PATH}/scripts/generate_makefile.bash --with-devices=$build $ARCH_FLAG --compiler=$(which $compiler_exe) --cxxflags=\"$cxxflags\" --cxxstandard=\"$cxx_standard\" --ldflags=\"$ldflags\" $extra_args --kokkos-path=${KOKKOS_PATH} --kokkoskernels-path=${KOKKOSKERNELS_PATH} --with-scalars=$kk_scalars --with-ordinals=${KOKKOSKERNELS_ORDINALS} --with-offsets=${KOKKOSKERNELS_OFFSETS} --with-layouts=${KOKKOSKERNELS_LAYOUTS} --with-tpls=${KOKKOSKERNELS_ENABLE_TPLS} &>> ${desc}.configure.log || { report_and_log_test_result 1 ${desc} configure && return 0; } - local -i build_start_time=$(date +%s) - run_cmd make -j 32 build-test >& ${desc}.build.log || { report_and_log_test_result 1 ${desc} build && return 0; } - local -i build_end_time=$(date +%s) - comment="build_time=$(($build_end_time-$build_start_time))" - - if [[ "$BUILD_ONLY" == False ]]; then - run_cmd make test >& ${desc}.test.log || { report_and_log_test_result 1 ${desc} test && return 0; } - local -i run_end_time=$(date +%s) - comment="$comment run_time=$(($run_end_time-$build_end_time))" - fi - fi - - report_and_log_test_result 0 $desc "$comment" - - return 0 -} - -# wait_for_jobs -wait_for_jobs() { - local -i max_jobs=$1 - local -i num_active_jobs=$(jobs | wc -l) - while [ $num_active_jobs -ge $max_jobs ] - do - sleep 1 - num_active_jobs=$(jobs | wc -l) - jobs >& /dev/null - done -} - -# run_in_background -run_in_background() { - local compiler=$1 - - local -i num_jobs=$NUM_JOBS_TO_RUN_IN_PARALLEL - # Don't override command line input. - # if [[ "$BUILD_ONLY" == True ]]; then - # num_jobs=8 - # else - if [[ "$compiler" == cuda* ]]; then - num_jobs=1 - fi - # fi - wait_for_jobs $num_jobs - - single_build_and_test $* & -} - -# build_and_test_all -build_and_test_all() { - # Get compiler data. - local compiler=$1 - if [ -z "$CUSTOM_BUILD_LIST" ]; then - local compiler_build_list=$(get_compiler_build_list $compiler) - else - local compiler_build_list=$(echo "$CUSTOM_BUILD_LIST" | tr , ' ') - fi - - # Do builds. - local build - for build in $compiler_build_list - do - run_in_background $compiler $build $BUILD_TYPE - - # If not cuda, do a hwloc test too. - if [[ "$compiler" != cuda* && "$SKIP_HWLOC" == False ]]; then - run_in_background $compiler $build "hwloc-$BUILD_TYPE" - fi - done - - return 0 -} - -get_test_root_dir() { - local existing_results=$(find . -maxdepth 1 -name "$RESULT_ROOT_PREFIX*" | sort) - local -i num_existing_results=$(echo $existing_results | tr ' ' '\n' | wc -l) - local -i num_to_delete=${num_existing_results}-${NUM_RESULTS_TO_KEEP} - - if [ $num_to_delete -gt 0 ]; then - /bin/rm -rf $(echo $existing_results | tr ' ' '\n' | head -n $num_to_delete) - fi - - echo $(pwd)/${RESULT_ROOT_PREFIX}_$(date +"%Y-%m-%d_%H.%M.%S") -} - -wait_summarize_and_exit() { - wait_for_jobs 1 - - echo "#######################################################" - echo "PASSED TESTS" - echo "#######################################################" - - local passed_test - for passed_test in $(\ls -1 $PASSED_DIR | sort) - do - echo $passed_test $(cat $PASSED_DIR/$passed_test) - done - - echo "#######################################################" - echo "FAILED TESTS" - echo "#######################################################" - - local failed_test - local -i rv=0 - for failed_test in $(\ls -1 $FAILED_DIR | sort) - do - echo $failed_test "("$(cat $FAILED_DIR/$failed_test)" failed)" - rv=$rv+1 - done - - exit $rv -} - -# -# Main. -# - -ROOT_DIR=$(get_test_root_dir) -mkdir -p $ROOT_DIR -cd $ROOT_DIR - -PASSED_DIR=$ROOT_DIR/results/passed -FAILED_DIR=$ROOT_DIR/results/failed -mkdir -p $PASSED_DIR -mkdir -p $FAILED_DIR - -echo "Going to test compilers: " $COMPILERS_TO_TEST -for COMPILER in $COMPILERS_TO_TEST; do - echo "Testing compiler $COMPILER" - build_and_test_all $COMPILER -done - -wait_summarize_and_exit diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index f8604193b1..0000000000 --- a/src/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -#======================================================================= -#=================== Settings ========================================== -#======================================================================= - -ifndef KOKKOSKERNELS_PATH - MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) - KOKKOSKERNELS_PATH = $(subst Makefile.minimal,,$(MAKEFILE_PATH)).. -endif - -KOKKOS_PATH = ${KOKKOSKERNELS_PATH}/../kokkos - - -KOKKOS_DEVICES=OpenMP - -KOKKOSKERNELS_SCALARS="'double,complex'" -KOKKOSKERNELS_OPTIONS=eti-only - -ifndef PREFIX - PREFIX = ${CURDIR}/install -endif -KOKKOSKERNELS_INSTALL_PATH = ${PREFIX} - -default: build - -CXX = g++ - -CXXFLAGS = -O3 -g -LINK = ${CXX} -LINKFLAGS = - -DEPFLAGS = -M - -OBJ = -LIB = -lpthread - - -#======================================================================= -#=================== Include Kokkos and KokkosKernels ================== -#======================================================================= - -include $(KOKKOSKERNELS_PATH)/Makefile.kokkos-kernels - -kokkoskernels-install: kokkoskernels-build-lib - mkdir -p $(KOKKOSKERNELS_INSTALL_PATH) - mkdir -p $(KOKKOSKERNELS_INSTALL_PATH)/include - mkdir -p $(KOKKOSKERNELS_INSTALL_PATH)/lib - echo "# KokkosKernels Settings" > $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_PATH = ${KOKKOSKERNELS_INSTALL_PATH}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_CPPFLAGS = -I$(KOKKOSKERNELS_INSTALL_PATH)/include $(KOKKOSKERNELS_CPPFLAGS)" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_LDFLAGS = -L$(KOKKOSKERNELS_INSTALL_PATH)/lib $(KOKKOSKERNELS_LDFLAGS)" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_LIBS = $(KOKKOSKERNELS_LIBS)" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_LINK_DEPENDS = $(KOKKOSKERNELS_INSTALL_PATH)/lib/$(KOKKOSKERNELS_LINK_DEPENDS)" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "# KokkosKernels Internal Settings" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_INTERNAL_ETI_ONLY = ${KOKKOSKERNELS_INTERNAL_ETI_ONLY}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_CUDA = ${KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_CUDA}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_OPENMP = ${KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_OPENMP}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_SERIAL = ${KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_SERIAL}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_THREADS = ${KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_THREADS}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_ROCM = ${KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_ROCM}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "# Kokkos Settings Used for KokkosKernels Compilation" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_PATH ?= ${KOKKOS_PATH}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_OS ?= ${KOKKOS_OS}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_CXXFLAGS ?= $(KOKKOS_CXXFLAGS)" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_CPPFLAGS ?= $(KOKKOS_CPPFLAGS)" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_LDFLAGS ?= $(KOKKOS_LDFLAGS)" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_LIBS ?= $(KOKKOS_LIBS)" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_LINK_DEPENDS ?= $(KOKKOS_LINK_DEPENDS)" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "# Kokkos Internal Settings" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_INTERNAL_USE_CUDA = ${KOKKOS_INTERNAL_USE_CUDA}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_INTERNAL_USE_OPENMP = ${KOKKOS_INTERNAL_USE_OPENMP}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_INTERNAL_USE_SERIAL = ${KOKKOS_INTERNAL_USE_SERIAL}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_INTERNAL_USE_PTHREADS = ${KOKKOS_INTERNAL_USE_PTHREADS}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "KOKKOS_INTERNAL_USE_ROCM = ${KOKKOS_INTERNAL_USE_ROCM}" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "# Fake target" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - echo "libkokkos_kernels.a:" >> $(KOKKOSKERNELS_INSTALL_PATH)/Makefile.kokkos-kernels - $(CP) $(COPY_FLAG) KokkosKernels_config.h $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/impl/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/blas/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/blas/impl/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/batched/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/sparse/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/sparse/impl/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/graph/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/graph/impl/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/common/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) -r ${KOKKOSKERNELS_PATH}/src/impl/generated_specializations_hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) ${KOKKOSKERNELS_PATH}/src/impl/tpls/*.hpp $(KOKKOSKERNELS_INSTALL_PATH)/include - $(CP) $(COPY_FLAG) $(KOKKOSKERNELS_INTERNAL_LIBRARY) $(KOKKOSKERNELS_INSTALL_PATH)/lib - -build: kokkoskernels-build-lib - -install: kokkoskernels-install - -clean: kokkoskernels-clean kokkos-clean - rm -f *.o -# rm -f *.o $(KOKKOSKERNELS_INTERNAL_LIBRARY) KokkosKernels_config.h KokkosKernels_config.tmp KokkosCore_config.h KokkosCore_config.tmp - diff --git a/unit_test/Makefile b/unit_test/Makefile deleted file mode 100644 index 89ab51a4c3..0000000000 --- a/unit_test/Makefile +++ /dev/null @@ -1,511 +0,0 @@ - -#======================================================================= -#=================== Settings ========================================== -#======================================================================= - -KOKKOS_PATH ?= ${HOME}/Kokkos/kokkos -KOKKOS_SRC_PATH ?= ${KOKKOS_PATH} -KOKKOSKERNELS_PATH ?= ${HOME}/Kokkos/kokkos-kernels -KOKKOSKERNELS_SRC_PATH ?= ${KOKKOSKERNELS_PATH} -GTEST_PATH ?= ${KOKKOS_SRC_PATH}/tpls/gtest - -KOKKOS_DEVICES=OpenMP -KOKKOS_CUDA_OPTIONS=enable_lambda - -KOKKOSKERNELS_SCALARS="'double,complex'" -KOKKOSKERNELS_OPTIONS=eti-only - -default: build - -ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES))) -CXX = ${KOKKOS_PATH}/config/nvcc_wrapper -else -CXX = g++ -endif - -CXXFLAGS = -O3 -g -LINK = ${CXX} -LINKFLAGS = - -DEPFLAGS = -M - -OBJ = -LIB = -lpthread - - -#======================================================================= -#=================== Include Kokkos and KokkosKernels ================== -#======================================================================= - -#include $(KOKKOS_PATH)/Makefile.kokkos -include $(KOKKOSKERNELS_PATH)/Makefile.kokkos-kernels - -#======================================================================= -#=================== Add common source files =========================== -#======================================================================= - -INC = -I${GTEST_PATH} -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/ -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/blas -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/sparse -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/graph -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/../test_common -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/batched - - - - -vpath %.cpp ${KOKKOSKERNELS_SRC_PATH}/unit_test - -TEST_HEADERS = $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/blas/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/sparse/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/graph/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/../test_common/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/batched/*.hpp) - - - -TEST_TARGETS = -TARGETS = - -#======================================================================= -#=================== OpenMP BACKEND ==================================== -#======================================================================= - -vpath %.cpp ${KOKKOSKERNELS_SRC_PATH}/unit_test/openmp -ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1) - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_OPENMP), 1) - KOKKOSKERNELS_INTERNAL_TEST_OPENMP = 1 - else - ifeq ($(KOKKOSKERNELS_INTERNAL_ETI_ONLY), 1) - KOKKOSKERNELS_INTERNAL_TEST_OPENMP = 0 - else - KOKKOSKERNELS_INTERNAL_TEST_OPENMP = 1 - endif - endif -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_TEST_OPENMP), 1) - INC += -I${KOKKOSKERNELS_SRC_PATH}/unit_test/openmp - OBJ_OPENMP = Test_Main.o gtest-all.o - OBJ_OPENMP += Test_OpenMP_Blas1_abs.o - OBJ_OPENMP += Test_OpenMP_Blas1_team_abs.o - OBJ_OPENMP += Test_OpenMP_Blas1_asum.o - OBJ_OPENMP += Test_OpenMP_Blas1_axpby.o - OBJ_OPENMP += Test_OpenMP_Blas1_team_axpby.o - OBJ_OPENMP += Test_OpenMP_Blas1_axpy.o - OBJ_OPENMP += Test_OpenMP_Blas1_team_axpy.o - OBJ_OPENMP += Test_OpenMP_Blas1_dot.o - OBJ_OPENMP += Test_OpenMP_Blas1_team_dot.o - OBJ_OPENMP += Test_OpenMP_Blas1_iamax.o - OBJ_OPENMP += Test_OpenMP_Blas1_mult.o - OBJ_OPENMP += Test_OpenMP_Blas1_team_mult.o - OBJ_OPENMP += Test_OpenMP_Blas1_nrm1.o - OBJ_OPENMP += Test_OpenMP_Blas1_nrm2.o - OBJ_OPENMP += Test_OpenMP_Blas1_team_nrm2.o - OBJ_OPENMP += Test_OpenMP_Blas1_nrm2_squared.o - OBJ_OPENMP += Test_OpenMP_Blas1_nrminf.o - OBJ_OPENMP += Test_OpenMP_Blas1_reciprocal.o - OBJ_OPENMP += Test_OpenMP_Blas1_scal.o - OBJ_OPENMP += Test_OpenMP_Blas1_team_scal.o - OBJ_OPENMP += Test_OpenMP_Blas1_sum.o - OBJ_OPENMP += Test_OpenMP_Blas1_update.o - OBJ_OPENMP += Test_OpenMP_Blas1_team_update.o - OBJ_OPENMP += Test_OpenMP_Blas2_gemv.o - OBJ_OPENMP += Test_OpenMP_Blas2_team_gemv.o - OBJ_OPENMP += Test_OpenMP_Blas3_gemm.o - OBJ_OPENMP += Test_OpenMP_Blas3_trsm.o - OBJ_OPENMP += Test_OpenMP_Blas_gesv.o - OBJ_OPENMP += Test_OpenMP_Sparse_spmv.o - OBJ_OPENMP += Test_OpenMP_Sparse_trsv.o - OBJ_OPENMP += Test_OpenMP_Sparse_sptrsv.o - OBJ_OPENMP += Test_OpenMP_Sparse_spiluk.o - OBJ_OPENMP += Test_OpenMP_Sparse_spgemm.o - OBJ_OPENMP += Test_OpenMP_Sparse_spadd.o - OBJ_OPENMP += Test_OpenMP_Sparse_gauss_seidel.o - OBJ_OPENMP += Test_OpenMP_Sparse_block_gauss_seidel.o - OBJ_OPENMP += Test_OpenMP_Sparse_CrsMatrix.o - OBJ_OPENMP += Test_OpenMP_Sparse_findRelOffset.o - OBJ_OPENMP += Test_OpenMP_Sparse_replaceSumIntoLonger.o - OBJ_OPENMP += Test_OpenMP_Sparse_replaceSumInto.o - OBJ_OPENMP += Test_OpenMP_Graph_graph_color.o - OBJ_OPENMP += Test_OpenMP_Graph_graph_color_deterministic.o - OBJ_OPENMP += Test_OpenMP_Graph_graph_color_d2.o - OBJ_OPENMP += Test_OpenMP_Common_ArithTraits.o - OBJ_OPENMP += Test_OpenMP_Common_set_bit_count.o - OBJ_OPENMP += Test_OpenMP_Common_Sorting.o -# OBJ_OPENMP += Test_OpenMP_Common_float128.o - # Real - OBJ_OPENMP += Test_OpenMP_Batched_SerialMatUtil_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialGemm_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialTrsm_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialLU_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialGemv_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialTrsv_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamMatUtil_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamGemm_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamTrsm_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamLU_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamGemv_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamTrsv_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialInverseLU_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamInverseLU_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialSolveLU_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamSolveLU_Real.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialEigendecomposition_Real.o - # Complex - OBJ_OPENMP += Test_OpenMP_Batched_SerialMatUtil_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialGemm_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialTrsm_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialLU_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialGemv_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialTrsv_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamMatUtil_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamGemm_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamTrsm_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamLU_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamGemv_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamTrsv_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialInverseLU_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamInverseLU_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_SerialSolveLU_Complex.o - OBJ_OPENMP += Test_OpenMP_Batched_TeamSolveLU_Complex.o - # Vector - OBJ_OPENMP += Test_OpenMP_Batched_VectorArithmatic.o - OBJ_OPENMP += Test_OpenMP_Batched_VectorMath.o - OBJ_OPENMP += Test_OpenMP_Batched_VectorRelation.o - OBJ_OPENMP += Test_OpenMP_Batched_VectorLogical.o - OBJ_OPENMP += Test_OpenMP_Batched_VectorMisc.o - OBJ_OPENMP += Test_OpenMP_Batched_VectorView.o - TARGETS += KokkosKernels_UnitTest_OpenMP - TEST_TARGETS += test-openmp -endif - -KokkosKernels_UnitTest_OpenMP: $(OBJ_OPENMP) $(KOKKOS_LINK_DEPENDS) $(KOKKOSKERNELS_LINK_DEPENDS) $(TEST_HEADERS) - $(LINK) $(EXTRA_PATH) $(OBJ_OPENMP) $(KOKKOSKERNELS_LDFLAGS) $(KOKKOSKERNELS_LIBS) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosKernels_UnitTest_OpenMP - -test-openmp: KokkosKernels_UnitTest_OpenMP - ./KokkosKernels_UnitTest_OpenMP - -#======================================================================= -#=================== Cuda BACKEND ==================================== -#======================================================================= - -vpath %.cpp ${KOKKOSKERNELS_SRC_PATH}/unit_test/cuda -ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1) - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_CUDA), 1) - KOKKOSKERNELS_INTERNAL_TEST_CUDA = 1 - else - ifeq ($(KOKKOSKERNELS_INTERNAL_ETI_ONLY), 1) - KOKKOSKERNELS_INTERNAL_TEST_CUDA = 0 - else - KOKKOSKERNELS_INTERNAL_TEST_CUDA = 1 - endif - endif -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_TEST_CUDA), 1) - INC += -I${KOKKOSKERNELS_SRC_PATH}/unit_test/cuda - OBJ_CUDA = Test_Main.o gtest-all.o - OBJ_CUDA += Test_Cuda_Blas1_abs.o - OBJ_CUDA += Test_Cuda_Blas1_team_abs.o - OBJ_CUDA += Test_Cuda_Blas1_asum.o - OBJ_CUDA += Test_Cuda_Blas1_axpby.o - OBJ_CUDA += Test_Cuda_Blas1_team_axpby.o - OBJ_CUDA += Test_Cuda_Blas1_axpy.o - OBJ_CUDA += Test_Cuda_Blas1_team_axpy.o - OBJ_CUDA += Test_Cuda_Blas1_dot.o - OBJ_CUDA += Test_Cuda_Blas1_team_dot.o - OBJ_CUDA += Test_Cuda_Blas1_iamax.o - OBJ_CUDA += Test_Cuda_Blas1_mult.o - OBJ_CUDA += Test_Cuda_Blas1_team_mult.o - OBJ_CUDA += Test_Cuda_Blas1_nrm1.o - OBJ_CUDA += Test_Cuda_Blas1_nrm2.o - OBJ_CUDA += Test_Cuda_Blas1_team_nrm2.o - OBJ_CUDA += Test_Cuda_Blas1_nrm2_squared.o - OBJ_CUDA += Test_Cuda_Blas1_nrminf.o - OBJ_CUDA += Test_Cuda_Blas1_reciprocal.o - OBJ_CUDA += Test_Cuda_Blas1_scal.o - OBJ_CUDA += Test_Cuda_Blas1_team_scal.o - OBJ_CUDA += Test_Cuda_Blas1_sum.o - OBJ_CUDA += Test_Cuda_Blas1_update.o - OBJ_CUDA += Test_Cuda_Blas1_team_update.o - OBJ_CUDA += Test_Cuda_Blas2_gemv.o - OBJ_CUDA += Test_Cuda_Blas2_team_gemv.o - OBJ_CUDA += Test_Cuda_Blas3_gemm.o #Not yet ready need to figure out how to handle CUBLAS - OBJ_CUDA += Test_Cuda_Blas3_trsm.o - OBJ_CUDA += Test_Cuda_Blas_gesv.o - OBJ_CUDA += Test_Cuda_Sparse_spmv.o - #OBJ_CUDA += Test_Cuda_Sparse_trsv.o #removing trsv from cuda unit test as it runs only sequential. - OBJ_CUDA += Test_Cuda_Sparse_sptrsv.o - OBJ_CUDA += Test_Cuda_Sparse_spiluk.o - OBJ_CUDA += Test_Cuda_Sparse_spgemm.o - OBJ_CUDA += Test_Cuda_Sparse_spadd.o - OBJ_CUDA += Test_Cuda_Sparse_gauss_seidel.o - OBJ_CUDA += Test_Cuda_Sparse_block_gauss_seidel.o - OBJ_CUDA += Test_Cuda_Sparse_CrsMatrix.o - #OBJ_CUDA += Test_Cuda_Sparse_findRelOffset.o #removing findRelOffset from cuda test as the implementation is sequential. - OBJ_CUDA += Test_Cuda_Sparse_replaceSumIntoLonger.o - OBJ_CUDA += Test_Cuda_Sparse_replaceSumInto.o - OBJ_CUDA += Test_Cuda_Graph_graph_color.o - OBJ_CUDA += Test_Cuda_Graph_graph_color_deterministic.o - OBJ_CUDA += Test_Cuda_Graph_graph_color_d2.o - OBJ_CUDA += Test_Cuda_Common_ArithTraits.o - OBJ_CUDA += Test_Cuda_Common_set_bit_count.o - OBJ_CUDA += Test_Cuda_Common_Sorting.o - # Real - OBJ_CUDA += Test_Cuda_Batched_SerialMatUtil_Real.o - OBJ_CUDA += Test_Cuda_Batched_SerialGemm_Real.o - OBJ_CUDA += Test_Cuda_Batched_SerialTrsm_Real.o - OBJ_CUDA += Test_Cuda_Batched_SerialLU_Real.o - OBJ_CUDA += Test_Cuda_Batched_SerialGemv_Real.o - OBJ_CUDA += Test_Cuda_Batched_SerialTrsv_Real.o - OBJ_CUDA += Test_Cuda_Batched_TeamMatUtil_Real.o - OBJ_CUDA += Test_Cuda_Batched_TeamGemm_Real.o - OBJ_CUDA += Test_Cuda_Batched_TeamTrsm_Real.o - OBJ_CUDA += Test_Cuda_Batched_TeamLU_Real.o - OBJ_CUDA += Test_Cuda_Batched_TeamGemv_Real.o - OBJ_CUDA += Test_Cuda_Batched_TeamTrsv_Real.o - OBJ_CUDA += Test_Cuda_Batched_SerialInverseLU_Real.o - OBJ_CUDA += Test_Cuda_Batched_TeamInverseLU_Real.o - OBJ_CUDA += Test_Cuda_Batched_SerialSolveLU_Real.o - OBJ_CUDA += Test_Cuda_Batched_TeamSolveLU_Real.o - OBJ_CUDA += Test_Cuda_Batched_SerialEigendecomposition_Real.o - # Complex - OBJ_CUDA += Test_Cuda_Batched_SerialMatUtil_Complex.o - OBJ_CUDA += Test_Cuda_Batched_SerialGemm_Complex.o - OBJ_CUDA += Test_Cuda_Batched_SerialTrsm_Complex.o - OBJ_CUDA += Test_Cuda_Batched_SerialLU_Complex.o - OBJ_CUDA += Test_Cuda_Batched_SerialGemv_Complex.o - OBJ_CUDA += Test_Cuda_Batched_SerialTrsv_Complex.o - OBJ_CUDA += Test_Cuda_Batched_TeamMatUtil_Complex.o - OBJ_CUDA += Test_Cuda_Batched_TeamGemm_Complex.o - OBJ_CUDA += Test_Cuda_Batched_TeamTrsm_Complex.o - OBJ_CUDA += Test_Cuda_Batched_TeamLU_Complex.o - OBJ_CUDA += Test_Cuda_Batched_TeamGemv_Complex.o - OBJ_CUDA += Test_Cuda_Batched_TeamTrsv_Complex.o - OBJ_CUDA += Test_Cuda_Batched_SerialInverseLU_Complex.o - OBJ_CUDA += Test_Cuda_Batched_TeamInverseLU_Complex.o - OBJ_CUDA += Test_Cuda_Batched_SerialSolveLU_Complex.o - OBJ_CUDA += Test_Cuda_Batched_TeamSolveLU_Complex.o - TARGETS += KokkosKernels_UnitTest_Cuda - TEST_TARGETS += test-cuda -endif - -KokkosKernels_UnitTest_Cuda: $(OBJ_CUDA) $(KOKKOS_LINK_DEPENDS) $(KOKKOSKERNELS_LINK_DEPENDS) $(TEST_HEADERS) - $(LINK) $(EXTRA_PATH) $(OBJ_CUDA) $(KOKKOSKERNELS_LDFLAGS) $(KOKKOSKERNELS_LIBS) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosKernels_UnitTest_Cuda - -test-cuda: KokkosKernels_UnitTest_Cuda - ./KokkosKernels_UnitTest_Cuda - -#======================================================================= -#=================== Serial BACKEND ==================================== -#======================================================================= - -vpath %.cpp ${KOKKOSKERNELS_SRC_PATH}/unit_test/serial -ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1) - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_SERIAL), 1) - KOKKOSKERNELS_INTERNAL_TEST_SERIAL = 1 - else - ifeq ($(KOKKOSKERNELS_INTERNAL_ETI_ONLY), 1) - KOKKOSKERNELS_INTERNAL_TEST_SERIAL = 0 - else - KOKKOSKERNELS_INTERNAL_TEST_SERIAL = 1 - endif - endif -endif - -ifeq ($(KOKKOSKERNELS_INTERNAL_TEST_SERIAL), 1) - INC += -I${KOKKOSKERNELS_SRC_PATH}/unit_test/serial - OBJ_SERIAL = Test_Main.o gtest-all.o - OBJ_SERIAL += Test_Serial_Blas1_abs.o - OBJ_SERIAL += Test_Serial_Blas1_team_abs.o - OBJ_SERIAL += Test_Serial_Blas1_asum.o - OBJ_SERIAL += Test_Serial_Blas1_axpby.o - OBJ_SERIAL += Test_Serial_Blas1_team_axpby.o - OBJ_SERIAL += Test_Serial_Blas1_axpy.o - OBJ_SERIAL += Test_Serial_Blas1_team_axpy.o - OBJ_SERIAL += Test_Serial_Blas1_dot.o - OBJ_SERIAL += Test_Serial_Blas1_team_dot.o - OBJ_SERIAL += Test_Serial_Blas1_iamax.o - OBJ_SERIAL += Test_Serial_Blas1_mult.o - OBJ_SERIAL += Test_Serial_Blas1_team_mult.o - OBJ_SERIAL += Test_Serial_Blas1_nrm1.o - OBJ_SERIAL += Test_Serial_Blas1_nrm2.o - OBJ_SERIAL += Test_Serial_Blas1_team_nrm2.o - OBJ_SERIAL += Test_Serial_Blas1_nrm2_squared.o - OBJ_SERIAL += Test_Serial_Blas1_nrminf.o - OBJ_SERIAL += Test_Serial_Blas1_reciprocal.o - OBJ_SERIAL += Test_Serial_Blas1_scal.o - OBJ_SERIAL += Test_Serial_Blas1_team_scal.o - OBJ_SERIAL += Test_Serial_Blas1_sum.o - OBJ_SERIAL += Test_Serial_Blas1_update.o - OBJ_SERIAL += Test_Serial_Blas1_team_update.o - OBJ_SERIAL += Test_Serial_Blas2_gemv.o - OBJ_SERIAL += Test_Serial_Blas2_team_gemv.o - OBJ_SERIAL += Test_Serial_Blas3_gemm.o - OBJ_SERIAL += Test_Serial_Blas3_trsm.o - OBJ_SERIAL += Test_Serial_Blas_gesv.o - OBJ_SERIAL += Test_Serial_Sparse_spmv.o - OBJ_SERIAL += Test_Serial_Sparse_trsv.o - OBJ_SERIAL += Test_Serial_Sparse_sptrsv.o - OBJ_SERIAL += Test_Serial_Sparse_spiluk.o - OBJ_SERIAL += Test_Serial_Sparse_spgemm.o - OBJ_SERIAL += Test_Serial_Sparse_spadd.o - OBJ_SERIAL += Test_Serial_Sparse_gauss_seidel.o - OBJ_SERIAL += Test_Serial_Sparse_block_gauss_seidel.o - OBJ_SERIAL += Test_Serial_Sparse_CrsMatrix.o - OBJ_SERIAL += Test_Serial_Sparse_findRelOffset.o - OBJ_SERIAL += Test_Serial_Sparse_replaceSumIntoLonger.o - OBJ_SERIAL += Test_Serial_Sparse_replaceSumInto.o - OBJ_SERIAL += Test_Serial_Graph_graph_color.o - OBJ_SERIAL += Test_Serial_Graph_graph_color_deterministic.o - OBJ_SERIAL += Test_Serial_Graph_graph_color_d2.o - OBJ_SERIAL += Test_Serial_Common_ArithTraits.o - OBJ_SERIAL += Test_Serial_Common_set_bit_count.o -# OBJ_SERIAL += Test_Serial_Common_float128.o - OBJ_SERIAL += Test_Serial_Common_Sorting.o - # Real - OBJ_SERIAL += Test_Serial_Batched_SerialMatUtil_Real.o - OBJ_SERIAL += Test_Serial_Batched_SerialGemm_Real.o - OBJ_SERIAL += Test_Serial_Batched_SerialTrsm_Real.o - OBJ_SERIAL += Test_Serial_Batched_SerialLU_Real.o - OBJ_SERIAL += Test_Serial_Batched_SerialGemv_Real.o - OBJ_SERIAL += Test_Serial_Batched_SerialTrsv_Real.o - OBJ_SERIAL += Test_Serial_Batched_TeamMatUtil_Real.o - OBJ_SERIAL += Test_Serial_Batched_TeamGemm_Real.o - OBJ_SERIAL += Test_Serial_Batched_TeamTrsm_Real.o - OBJ_SERIAL += Test_Serial_Batched_TeamLU_Real.o - OBJ_SERIAL += Test_Serial_Batched_TeamGemv_Real.o - OBJ_SERIAL += Test_Serial_Batched_TeamTrsv_Real.o - OBJ_SERIAL += Test_Serial_Batched_SerialInverseLU_Real.o - OBJ_SERIAL += Test_Serial_Batched_TeamInverseLU_Real.o - OBJ_SERIAL += Test_Serial_Batched_SerialSolveLU_Real.o - OBJ_SERIAL += Test_Serial_Batched_TeamSolveLU_Real.o - OBJ_SERIAL += Test_Serial_Batched_SerialEigendecomposition_Real.o - # Complex - OBJ_SERIAL += Test_Serial_Batched_SerialMatUtil_Complex.o - OBJ_SERIAL += Test_Serial_Batched_SerialGemm_Complex.o - OBJ_SERIAL += Test_Serial_Batched_SerialTrsm_Complex.o - OBJ_SERIAL += Test_Serial_Batched_SerialLU_Complex.o - OBJ_SERIAL += Test_Serial_Batched_SerialGemv_Complex.o - OBJ_SERIAL += Test_Serial_Batched_SerialTrsv_Complex.o - OBJ_SERIAL += Test_Serial_Batched_TeamMatUtil_Complex.o - OBJ_SERIAL += Test_Serial_Batched_TeamGemm_Complex.o - OBJ_SERIAL += Test_Serial_Batched_TeamTrsm_Complex.o - OBJ_SERIAL += Test_Serial_Batched_TeamLU_Complex.o - OBJ_SERIAL += Test_Serial_Batched_TeamGemv_Complex.o - OBJ_SERIAL += Test_Serial_Batched_TeamTrsv_Complex.o - OBJ_SERIAL += Test_Serial_Batched_SerialInverseLU_Complex.o - OBJ_SERIAL += Test_Serial_Batched_TeamInverseLU_Complex.o - OBJ_SERIAL += Test_Serial_Batched_SerialSolveLU_Complex.o - OBJ_SERIAL += Test_Serial_Batched_TeamSolveLU_Complex.o - # Vector - OBJ_SERIAL += Test_Serial_Batched_VectorArithmatic.o - OBJ_SERIAL += Test_Serial_Batched_VectorMath.o - OBJ_SERIAL += Test_Serial_Batched_VectorRelation.o - OBJ_SERIAL += Test_Serial_Batched_VectorLogical.o - OBJ_SERIAL += Test_Serial_Batched_VectorMisc.o - OBJ_SERIAL += Test_Serial_Batched_VectorView.o - TARGETS += KokkosKernels_UnitTest_Serial - TEST_TARGETS += test-serial -endif - -KokkosKernels_UnitTest_Serial: $(OBJ_SERIAL) $(KOKKOS_LINK_DEPENDS) $(KOKKOSKERNELS_LINK_DEPENDS) $(TEST_HEADERS) - $(LINK) $(EXTRA_PATH) $(OBJ_SERIAL) $(KOKKOSKERNELS_LDFLAGS) $(KOKKOSKERNELS_LIBS) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosKernels_UnitTest_Serial - -test-serial: KokkosKernels_UnitTest_Serial - ./KokkosKernels_UnitTest_Serial - -#======================================================================= -#=================== Threads BACKEND =================================== -#======================================================================= - -vpath %.cpp ${KOKKOSKERNELS_SRC_PATH}/unit_test/threads -ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1) - ifeq ($(KOKKOSKERNELS_INTERNAL_INST_EXECSPACE_THREADS), 1) - KOKKOSKERNELS_INTERNAL_TEST_THREADS = 1 - else - ifeq ($(KOKKOSKERNELS_INTERNAL_ETI_ONLY), 1) - KOKKOSKERNELS_INTERNAL_TEST_THREADS = 0 - else - KOKKOSKERNELS_INTERNAL_TEST_THREADS = 1 - endif - endif -endif -ifeq ($(KOKKOSKERNELS_INTERNAL_TEST_THREADS), 1) - INC += -I${KOKKOSKERNELS_SRC_PATH}/unit_test/threads - OBJ_THREADS = Test_Main.o gtest-all.o - OBJ_THREADS += Test_Threads_Blas1_abs.o - OBJ_THREADS += Test_Threads_Blas1_team_abs.o - OBJ_THREADS += Test_Threads_Blas1_asum.o - OBJ_THREADS += Test_Threads_Blas1_axpby.o - OBJ_THREADS += Test_Threads_Blas1_team_axpby.o - OBJ_THREADS += Test_Threads_Blas1_axpy.o - OBJ_THREADS += Test_Threads_Blas1_team_axpy.o - OBJ_THREADS += Test_Threads_Blas1_dot.o - OBJ_THREADS += Test_Threads_Blas1_team_dot.o - OBJ_THREADS += Test_Threads_Blas1_iamax.o - OBJ_THREADS += Test_Threads_Blas1_mult.o - OBJ_THREADS += Test_Threads_Blas1_team_mult.o - OBJ_THREADS += Test_Threads_Blas1_nrm1.o - OBJ_THREADS += Test_Threads_Blas1_nrm2.o - OBJ_THREADS += Test_Threads_Blas1_team_nrm2.o - OBJ_THREADS += Test_Threads_Blas1_nrm2_squared.o - OBJ_THREADS += Test_Threads_Blas1_nrminf.o - OBJ_THREADS += Test_Threads_Blas1_reciprocal.o - OBJ_THREADS += Test_Threads_Blas1_scal.o - OBJ_THREADS += Test_Threads_Blas1_team_scal.o - OBJ_THREADS += Test_Threads_Blas1_sum.o - OBJ_THREADS += Test_Threads_Blas1_update.o - OBJ_THREADS += Test_Threads_Blas1_team_update.o - OBJ_THREADS += Test_Threads_Blas2_gemv.o - OBJ_THREADS += Test_Threads_Blas2_team_gemv.o - OBJ_THREADS += Test_Threads_Blas3_gemm.o - OBJ_THREADS += Test_Threads_Blas3_trsm.o - OBJ_THREADS += Test_Threads_Blas_gesv.o - OBJ_THREADS += Test_Threads_Sparse_spmv.o - OBJ_THREADS += Test_Threads_Sparse_trsv.o - OBJ_THREADS += Test_Threads_Sparse_sptrsv.o - OBJ_THREADS += Test_Threads_Sparse_spiluk.o - OBJ_THREADS += Test_Threads_Sparse_spgemm.o - OBJ_THREADS += Test_Threads_Sparse_spadd.o - OBJ_THREADS += Test_Threads_Sparse_gauss_seidel.o - OBJ_THREADS += Test_Threads_Sparse_block_gauss_seidel.o - OBJ_THREADS += Test_Threads_Sparse_findRelOffset.o - OBJ_THREADS += Test_Threads_Sparse_replaceSumIntoLonger.o - OBJ_THREADS += Test_Threads_Sparse_replaceSumInto.o - OBJ_THREADS += Test_Threads_Sparse_CrsMatrix.o - OBJ_THREADS += Test_Threads_Graph_graph_color.o - OBJ_THREADS += Test_Threads_Graph_graph_color_deterministic.o - OBJ_THREADS += Test_Threads_Graph_graph_color_d2.o - OBJ_THREADS += Test_Threads_Common_ArithTraits.o - OBJ_THREADS += Test_Threads_Common_set_bit_count.o - OBJ_THREADS += Test_Threads_Common_Sorting.o -# OBJ_THREADS += Test_Threads_Common_float128.o - TARGETS += KokkosKernels_UnitTest_Threads - TEST_TARGETS += test-threads -endif - -KokkosKernels_UnitTest_Threads: $(OBJ_THREADS) $(KOKKOS_LINK_DEPENDS) $(KOKKOSKERNELS_LINK_DEPENDS) $(TEST_HEADERS) - $(LINK) $(EXTRA_PATH) $(OBJ_THREADS) $(KOKKOSKERNELS_LDFLAGS) $(KOKKOSKERNELS_LIBS) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosKernels_UnitTest_Threads - -test-threads: KokkosKernels_UnitTest_Threads - ./KokkosKernels_UnitTest_Threads - -#======================================================================= -#=================== Make Rules ======================================== -#======================================================================= - -test: $(TEST_TARGETS) - -build: $(TARGETS) - -clean: kokkos-clean kokkoskernels-clean - rm -f *.o - -# Compilation rules - -%.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(KOKKOSKERNELS_CPP_DEPENDS) $(TEST_HEADERS) - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOSKERNELS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(INC) $(CXXFLAGS) $(EXTRA_INC) -c $< - -gtest-all.o:$(GTEST_PATH)/gtest/gtest-all.cc - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(INC) $(CXXFLAGS) $(EXTRA_INC) -c $(GTEST_PATH)/gtest/gtest-all.cc diff --git a/unit_test/standalone/Makefile b/unit_test/standalone/Makefile deleted file mode 100644 index d6d7d96758..0000000000 --- a/unit_test/standalone/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -KOKKOS_PATH = ${HOME}/Kokkos/kokkos -KOKKOS_SRC_PATH = ${KOKKOS_PATH} -KOKKOSKERNELS_PATH = ${HOME}/Kokkos/kokkos-kernels -KOKKOSKERNELS_SRC_PATH = ${KOKKOSKERNELS_PATH} -GTEST_PATH = ${KOKKOS_SRC_PATH}/tpls/gtest - -KOKKOS_DEVICES = "OpenMP" -KOKKOS_ARCH = "SNB,Volta70" - -KOKKOSKERNELS_SCALARS = - -SRC = $(wildcard *.cpp) -HDR = $(wildcard *.hpp) -KOKKOS_DEVICES=OpenMP -KOKKOS_CUDA_OPTIONS=enable_lambda - -default: build - echo "Start Build" - -ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES))) -CXX = ${KOKKOS_PATH}/bin/nvcc_wrapper -else -CXX = g++ -endif - -CXXFLAGS = -O3 -g -LINK = ${CXX} -LINKFLAGS = -EXE = test.exe - -DEPFLAGS = -M - -OBJ = $(SRC:.cpp=.o) -LIB = - -OBJ += gtest-all.o - -INC = -I${GTEST_PATH} -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/ -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/blas -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/sparse -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/graph -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/../test_common -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/batched -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/cuda -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/serial -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/threads -INC += -I$(KOKKOSKERNELS_SRC_PATH)/unit_test/openmp - -TEST_HEADERS = $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/blas/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/sparse/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/graph/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/../test_common/*.hpp) -TEST_HEADERS += $(wildcard $(KOKKOSKERNELS_SRC_PATH)/unit_test/batched/*.hpp) - -include $(KOKKOS_PATH)/Makefile.kokkos -include ${KOKKOSKERNELS_PATH}/Makefile.kokkos-kernels - -build: $(EXE) - -$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS) $(KOKKOSKERNELS_LINK_DEPENDS) - $(LINK) $(KOKKOS_LDFLAGS) $(KOKKOSKERNELS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(KOKKOSKERNELS_LIBS) $(LIB) -o $(EXE) - - -clean: kokkos-clean - rm -f *.o *.cuda *.host - -# Compilation rules - -%.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(HDR) - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(KOKKOSKERNELS_CPPFLAGS) $(INC) -c $< - -gtest-all.o:$(GTEST_PATH)/gtest/gtest-all.cc - $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(INC) $(CXXFLAGS) -c $(GTEST_PATH)/gtest/gtest-all.cc