-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·53 lines (39 loc) · 1.46 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
COMP = CC
CFLAGS = -std=c++11 -fopenmp --rocm-path=${ROCM_PATH} -x hip
#------
#=== Additiona flags for compililation at specific systems in ORNL
#-- For spock, bones. Use:
#CFLAGSADD = -D__HIP_ARCH_GFX908__=1 --offload-arch=gfx908
#-- For borg,crusher,frontier. Use:
#CFLAGSADD = -D__HIP_ARCH_GFX90A__=1 --offload-arch=gfx90a
#=== Additional flags for compilation at specific systems in Pawsey
#-- For mulan. Use:
#CFLAGSADD = -D__HIP_ARCH_GFX908__=1 --offload-arch=gfx908
#-- For joey,setonix. Use:
CFLAGSADD = -D__HIP_ARCH_GFX90A__=1 --offload-arch=gfx90a
#=== Additional flags for compilation at specific systems in CSC
#-- For Lumi. Use:
#CFLAGSADD = -D__HIP_ARCH_GFX90A__=1 --offload-arch=gfx90a
#=== Additional flags for testing
#-- For Testing. Use:
#CFLAGSADD =
# Add flags or throw error if cluster has not been identified
ifndef CFLAGSADD
$(error Please set CFLAGSADD for the compilation host)
else
CFLAGS += $(CFLAGSADD)
endif
LFLAGS = -fopenmp --rocm-path=${ROCM_PATH}
INCLUDES = -I${ROCM_PATH}/include
LIBRARIES = -L${ROCM_PATH}/lib -lamdhip64
hello_jobstep: hello_jobstep.o
${COMP} ${LFLAGS} ${LIBRARIES} hello_jobstep.o -o hello_jobstep
hello_jobstep.o: hello_jobstep.cpp
${COMP} ${CFLAGS} ${INCLUDES} -c hello_jobstep.cpp
hello_nompi: hello_nompi.o
${COMP} ${LFLAGS} ${LIBRARIES} hello_nompi.o -o hello_nompi
hello_nompi.o: hello_nompi.cpp
${COMP} ${CFLAGS} ${INCLUDES} -c hello_nompi.cpp
.PHONY: clean
clean:
rm -f hello_jobstep hello_nompi *.o