Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify build system #24

Merged
merged 51 commits into from
Feb 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c320014
Add CUDA Makefile
tomdeakin Feb 23, 2017
c904719
Add OpenCL Makefile
tomdeakin Feb 23, 2017
1d4b809
Remove CMake from project
tomdeakin Feb 23, 2017
436c389
Add OpenMP makefile that targets CPUs and GPUs, with common defaults.
tomdeakin Feb 23, 2017
527a1ed
Rename Kokkos Makefiles
tomdeakin Feb 23, 2017
584e1b2
Change binary name for Kokkos builds
tomdeakin Feb 23, 2017
887ae9b
Add SYCL Makefile
jrprice Feb 23, 2017
ce5fde9
Combine Kokkos CPU and GPU builds
tomdeakin Feb 23, 2017
dde301b
Merge branch 'bugfix/build' of github.com:uob-hpc/gpu-stream into bug…
tomdeakin Feb 23, 2017
07f91e6
Add Makefile for RAJA
tomdeakin Feb 23, 2017
1b573db
Add EXTRA_FLAGS option to build line for custom extra flags
tomdeakin Feb 23, 2017
d3fa527
Add Clang support to OpenMP.make
jrprice Feb 23, 2017
6b26e33
Use $(CFLAGS) in OpenMP build rules
jrprice Feb 23, 2017
d19cf1a
Rename CC and CFLAGS to CXX and CXXFLAGS in OpenMP
jrprice Feb 23, 2017
2d21f69
Add OMP_TARGET_ definitions for other compilers
jrprice Feb 23, 2017
f3e34a5
Add OpenACC Makefile
tomdeakin Feb 23, 2017
488db0e
Remove CMake module
tomdeakin Feb 23, 2017
e926cfd
Remove CMake from gitignore
tomdeakin Feb 23, 2017
472434d
Update gitignore binary names
tomdeakin Feb 23, 2017
0cbf8aa
Add COMPILER option to OpenCL Makefile
tomdeakin Feb 23, 2017
1c31eed
Update README
tomdeakin Feb 23, 2017
6741168
Fix README typo
tomdeakin Feb 23, 2017
2989419
Update README
tomdeakin Feb 23, 2017
54a2a39
Merge branch 'master' into bugfix/build
tomdeakin Feb 23, 2017
f3abd66
Make Kokkos build without intermediate objects
jrprice Feb 23, 2017
cdea91a
Add required ARCH flag for RAJA on GPUs
jrprice Feb 23, 2017
063446b
Add EXTRA_FLAGS to SYCL.make
jrprice Feb 23, 2017
d78baa4
Use CXXFLAGS everywhere for consistency
jrprice Feb 23, 2017
f90afb1
Merge branch 'master' into bugfix/build
jrprice Feb 23, 2017
13f5c83
Add HIP.make with CUDA support
jrprice Feb 23, 2017
b62c935
Use computecpp_info for SYCL device compiler flags
jrprice Feb 23, 2017
b485e77
Add SYCL intermediate outputs to .gitignore
jrprice Feb 23, 2017
e1ea01f
Add -xHOST to Intel for OpenMP
jrprice Feb 24, 2017
cbf15e8
Have -std=c++11 as default flags when COMPILER is not set for ACC, CL…
tomdeakin Feb 24, 2017
761ba2d
Add a clean option to all Makefiles
tomdeakin Feb 24, 2017
10b2376
Add TARGET option to OpenMP Makefile
tomdeakin Feb 24, 2017
282251f
Add options for specific targets in OpenACC.make
jrprice Feb 24, 2017
452804f
Merge branch 'bugfix/build' of github.com:uob-hpc/gpu-stream into bug…
tomdeakin Feb 24, 2017
91131ba
Remove BDW and KNL targets from OpenACC as not yet supported by PGI
tomdeakin Feb 24, 2017
bbdd5b9
Add help message to Kokkos TARGET variable
tomdeakin Feb 24, 2017
3be4ebc
Add help messages to RAJA Makefile
tomdeakin Feb 24, 2017
c470b88
Add compiler help text to OpenACC
tomdeakin Feb 24, 2017
6008f8c
Add intermediate objects to OpenACC clean rule
jrprice Feb 24, 2017
82de818
Add support for Intel as host compiler for OpenCL
jrprice Feb 24, 2017
8fee86a
Add compiler help to OpenCL.make
jrprice Feb 24, 2017
1aec057
Add help messages to OpenMP.make and refactor
jrprice Feb 24, 2017
a7d7998
Use -framework OpenCL on Darwin
jrprice Feb 24, 2017
569cfa1
Make Cray OpenMP flag non-empty to fix error
jrprice Feb 24, 2017
dfe5503
Allow user to override CXX in OpenCL.make
jrprice Feb 24, 2017
050a27c
Add XL compiler support to OpenMP and RAJA makefiles
tomdeakin Feb 24, 2017
2416727
Refactor compiler flag handling in RAJA Makefile
jrprice Feb 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@

gpu-stream-cuda
gpu-stream-ocl
gpu-stream-acc
gpu-stream-omp3
gpu-stream-omp45
gpu-stream-sycl
cuda-stream
ocl-stream
omp-stream
acc-stream
raja-stream
kokkos-stream
sycl-stream
hip-stream

*.o
*.bc
*.sycl
*.tar
*.gz

.DS_Store

CMakeCache.txt
CMakeFiles/
cmake_install.cmake
Makefile
197 changes: 0 additions & 197 deletions CMakeLists.txt

This file was deleted.

8 changes: 8 additions & 0 deletions CUDA.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

cuda-stream: main.cpp CUDAStream.cu
nvcc -std=c++11 -O3 -DCUDA $^ $(EXTRA_FLAGS) -o $@

.PHONY: clean
clean:
rm -f cuda-stream

18 changes: 18 additions & 0 deletions HIP.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

# TODO: HIP with HCC

HIPCC = hipcc

ifndef CUDA_PATH
ifeq (,$(wildcard /usr/local/bin/nvcc))
$(error /usr/local/bin/nvcc not found, set CUDA_PATH instead)
endif
endif

hip-stream: main.cpp HIPStream.cu
$(HIPCC) $(CXXFLAGS) -std=c++11 -DHIP $^ $(EXTRA_FLAGS) -o $@

.PHONY: clean
clean:
rm -f hip-stream

30 changes: 30 additions & 0 deletions Kokkos.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

default: kokkos-stream

include $(KOKKOS_PATH)/Makefile.kokkos

ifndef TARGET
define target_help
Set TARGET to change to offload device. Defaulting to CPU.
Available targets are:
CPU (default)
GPU
endef
$(info $(target_help))
TARGET=CPU
endif

ifeq ($(TARGET), CPU)
TARGET_DEF = -DKOKKOS_TARGET_CPU
else ifeq ($(TARGET), GPU)
CXX = $(NVCC_WRAPPER)
TARGET_DEF =
endif

kokkos-stream: main.cpp KOKKOSStream.cpp $(KOKKOS_CPP_DEPENDS)
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(KOKKOS_LDFLAGS) main.cpp KOKKOSStream.cpp $(KOKKOS_LIBS) -o $@ -DKOKKOS $(TARGET_DEF) -O3 $(EXTRA_FLAGS)

.PHONY: clean
clean:
rm -f kokkos-stream

10 changes: 0 additions & 10 deletions KokkosCPUMakefile

This file was deleted.

11 changes: 0 additions & 11 deletions KokkosMakefile

This file was deleted.

52 changes: 52 additions & 0 deletions OpenACC.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

ifndef COMPILER
define compiler_help
Set COMPILER to ensure correct flags are set.
Available compilers are:
PGI CRAY
endef
$(info $(compiler_help))
endif

COMPILER_ = $(CXX)
COMPILER_PGI = pgc++
COMPILER_CRAY = CC

FLAGS_ = -O3 -std=c++11

FLAGS_PGI = -std=c++11 -O3 -acc
ifeq ($(COMPILER), PGI)
define target_help
Set a TARGET to ensure PGI targets the correct offload device.
Available targets are:
SNB, IVB, HSW
KEPLER, MAXWELL, PASCAL
HAWAII
endef
ifndef TARGET
$(error $(target_help))
endif
TARGET_FLAGS_SNB = -ta=multicore -tp=sandybridge
TARGET_FLAGS_IVB = -ta=multicore -tp=ivybridge
TARGET_FLAGS_HSW = -ta=multicore -tp=haswell
TARGET_FLAGS_KEPLER = -ta=nvidia:cc35
TARGET_FLAGS_MAXWELL = -ta=nvidia:cc50
TARGET_FLAGS_PASCAL = -ta=nvidia:cc60
TARGET_FLAGS_HAWAII = -ta=radeon:hawaii
ifeq ($(TARGET_FLAGS_$(TARGET)),)
$(error $(target_help))
endif

FLAGS_PGI += $(TARGET_FLAGS_$(TARGET))

endif

FLAGS_CRAY = -hstd=c++11
CXXFLAGS = $(FLAGS_$(COMPILER))

acc-stream: main.cpp ACCStream.cpp
$(COMPILER_$(COMPILER)) $(CXXFLAGS) -DACC $^ $(EXTRA_FLAGS) -o $@

.PHONY: clean
clean:
rm -f acc-stream main.o ACCStream.o
Loading