Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93762085
Makefile.GPU.intel
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Dec 1, 07:12
Size
2 KB
Mime Type
text/x-makefile
Expires
Tue, Dec 3, 07:12 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22700316
Attached To
R1448 Lenstool-HPC
Makefile.GPU.intel
View Options
PROGRAM_NAME := Lenstool_HPC
#
all: $(PROGRAM_NAME) $(PROGRAM_NAME_GPU)
#CXX=g++ -lm -ffast-math -ftree-loop-vectorize
CXX=icpc
#
program_CXX_SRCS := $(wildcard *.cpp)
program_CXX_OBJS := ${program_CXX_SRCS:.cpp=.o}
#
program_C_SRCS := $(wildcard *.c)
program_C_OBJS := ${program_C_SRCS:.c=.o}
#
program_CU_SRCS := $(wildcard *.cu)
program_CU_OBJS := ${program_CU_SRCS:.cu=.cu.o}
#
#
program_INCLUDE_DIRS := . /usr/local/cuda/include/ #C++ Include directories
program_INCLUDE_DIRS += $(CFITSIO_ROOT)/include
program_INCLUDE_DIRS += $(LENSTOOL_ROOT)/include
program_INCLUDE_DIRS += $(LENSTOOL_ROOT)/liblt
program_INCLUDE_DIRS += $(GSL_ROOT)/include
program_INCLUDE_DIRS += $(LENSTOOLHPC_ROOT)/src
program_INCLUDE_DIRS += $(CUDAROOT)/include
#
# libs
#
program_INCLUDE_LIBS += $(CFITSIO_ROOT)/lib #Include libraries
program_INCLUDE_LIBS += $(LENSTOOL_ROOT)/src
program_INCLUDE_LIBS += $(LENSTOOL_ROOT)/liblt
program_INCLUDE_LIBS += $(LENSTOOLHPC_ROOT)/src
program_INCLUDE_LIBS += $(GSL_ROOT)/lib
program_INCLUDE_LIBS += $(WCSTOOL_ROOT)
program_INCLUDE_LIBS += $(CUDAROOT)/lib64
#
#
# Compiler flags
CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir))
CPPFLAGS += $(foreach includelib,$(program_INCLUDE_LIBS),-L$(includelib))
ifeq ($(LENSTOOL_DEBUG),true)
CPPFLAGS += -D__WITH_LENSTOOL
endif
#CPPFLAGS += -D__WITH_LENSTOOL
CPPFLAGS += -D__WITH_GPU
CPPFLAGS += -qopenmp -g -O3 -Wall -pedantic
CPPFLAGS += -fPIC
CPPFLAGS += -D_double
#
#LDFLAGS := -llenstool -llenstoolhpc -llenstoolhpc_GPU -llt -lcfitsio -lwcs -lgsl -lgslcblas #Do not keep lenstool for the float calculation, it creates conflictinthe structure.h file
LDFLAGS := -llenstoolhpc -llenstoolhpc_GPU -llt -lcfitsio -lwcs -lgsl -lgslcblas #Do not keep lenstool for the float calculation, it creates conflictinthe structure.h file
LDFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir))
LDFLAGS += $(foreach includelib,$(program_INCLUDE_LIBS),-L$(includelib))
LDFLAGS += -qopenmp
NVFLAGS := -O3 -ccbin icpc -Xcompiler '-Wall -fPIC' -D__WITH_LENSTOOL
NVFLAGS += -D_double
NVFLAGS += -gencode arch=compute_60,code=sm_60
#
NVFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir))
NVFLAGS += $(foreach includelib,$(program_INCLUDE_LIBS),-L$(includelib))
#
NVLDFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir))
NVLDFLAGS += $(foreach includelib,$(program_INCLUDE_LIBS),-L$(includelib))
NVLDFLAGS += -lcudart -lcudadevrt
#
#NVLDFLAGS += $(LDFLAGS)
#
#LDFLAGS += -qopenmp
#
#
GPU_OBJECTS = $(program_CU_OBJS)
CPU_OBJECTS = $(program_CXX_OBJS) $(program_C_OBJS)
#
%.cu.o: %.cu #%.cuh
nvcc $(NVFLAGS) -o $@ -c $<
#
%.cpp: %.cpp %.h
$(CXX) -o $@ $< $(CPPFLAGS) -llt
#
$(PROGRAM_NAME): $(CPU_OBJECTS)
icpc -o $@ $(program_CXX_OBJS) $(program_C_OBJS) $(LDFLAGS)
clean:
@- $(RM) $(PROGRAM_NAME) $(OBJECTS) *~ *.o *.optrpt
distclean: clean
.PHONY: all clean distclean
Event Timeline
Log In to Comment