forked from ROCm/hcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
222 lines (167 loc) · 4.6 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# General Makefile containing all the necessary compiler flags for the tests
# modify CC and CFLAGS for OpenMP C compilers
# modify FC and FFLAGS for OpenMP Fortran compilers
# Content:
#########################################################
# 1. Basic usage
# 2. General testsuite settings
# 3. Compiler selection and Flags
#########################################################
#########################################################
# 1. Basic usage
#########################################################
# make ctest generate c test "ctest"
# make ftest generate fortran test "ftest"
# make clean removes all sources and binaries
# make cleanall removes sources,binaries and logfiles
#########################################################
# 2. General testsuite settings
#########################################################
# For general testsuite settings see the configuration file
# ompts.conf
#########################################################
# 3. Compiler selection and Flags
#########################################################
# GNU Compiler
CC = clang
CFLAGS = -fopenmp -lm -O3
CFLAGS = -fopenmp -lm -O3
FC = gfortran
FFLAGS = -fopenmp -lm
FFLAGS = -fopenmp -lm -O3
# Fujitsu Compilers:
#CC = fcc
#CFLAGS = -KOMP,fast_GP2=2
#FC=frt
#FFLAGS=-KOMP,fast_GP2=2 -w -Am -X9 -Fixed
# PGI compilers
#CC = pgcc
#CFLAGS = -mp
#CFLAGS = -mp -DVERBOSE
#CFLAGS = -fast -mp
#FC = pgf90
#FFLAGS = -fast -mp
#FFLAGS = -mp -g
# Intel compilers:
#CC = icc
#CFLAGS = -O3 -ip -openmp
#CFLAGS = -Wall -O0 -openmp
#CFLAGS = -openmp -lm
#CFLAGS = -openmp -lm -DVERBOSE
#FC = ifort
#FFLAGS = -openmp -lm -fpp
# Omni compilers:
#CC = ompcc
#CFLAGS = -O3 -lm
# Assure compilers:
#CC = assurec
#CFLAGS = -O3 -WApname=project -DUSE_ASSURE=1
#FC =
#FFLAGS =
# NEC:
#CC = c++
#CC = sxc++
#CFLAGS = -Popenmp
#FC=sxf90
#FFLAGS= -Popenmp
# Hitachi:
#CC = xcc
#CFLAGS = -O4 -pvec +Op -parallel -omp
#FC =
#FFLAGS =
# SGI:
#CC = cc
#CFLAGS = -mp -lm
#FC =
#FFLAGS =
# IBM compilers:
#CC = xlc_r
#CFLAGS = -qsmp=omp -lm
#FC=xlf90_r
#FFLAGS=-qsmp=omp -qfixed=132 -qlanglvl=extended
# SUN compilers
#CC = cc
#CFLAGS = -fast -xopenmp -lm
#FC =f90
#FFLAGS = -xopenmp -fast -lm
# open64 compilers
# remark: -I. was a workaround because the installation came without omp.h file
#CC = opencc
#CFLAGS = -O0 -openmp -lm -I. -lomp -lpthread
#CFLAGS = -O0 -openmp -lm -I /home/matthew/opt/usr/include -lpthread
#CFLAGS = -openmp -lm
#FC = openf90
#FFLAGS = -O0 -openmp -lm -lomp -lpthread
#Pathscale Compiler
#CC = pathcc
#CFLAGS = -mp -Ofast -lm
#FC=pathf90
#FFLAGS= -mp -Ofast -lm
#OpenUH Compiler
#CC = uhcc
#CFLAGS = -mp
#FC = uhf90
#FFLAGS = -mp
#########################################################################
help:
@echo "OpenMP Validation Suite, v3.0"
@echo "(C) University of Stuttgart, University of Houston"
@echo ""
@echo "Do make [rule], where rule may be one of:"
@echo " ctest"
@echo " Build and run the OpenMP/C validation tests."
@echo " ftest"
@echo " Build and run the OpenMP/Fortran validation tests."
@echo " print_compile_options"
@echo " Display the default compiler and compiler options being tested"
@echo " cleansrcs"
@echo " Remove sources generated from the templates"
@echo " cleanbins"
@echo " Remove executables from bin/ directory"
@echo " cleanouts"
@echo " Remove all *.out files from bin/ directory"
@echo " cleanlogs"
@echo " Remove all *.log files from bin/ directory"
@echo " clean"
@echo " Remove all sources and executables from bin/ directory"
@echo " cleanall"
@echo " Remove the entire bin/ directory"
omp_my_sleep:
mkdir -p bin/c
cp omp_my_sleep.h bin/c/
omp_testsuite: omp_testsuite.h
mkdir -p bin/c
cp omp_testsuite.h bin/c/
omp_testsuite.h: ompts-c.conf c/*
./ompts_makeHeader.pl -f=ompts-c.conf -t=c
.c.o: omp_testsuite omp_my_sleep
$(CC) $(CFLAGS) -c $<
ctest: omp_my_sleep omp_testsuite
./runtest.pl --lang=c testlist-c.txt
ftest:
mkdir -p bin/fortran
cp omp_testsuite.f bin/fortran
cp omp_my_sleep.f bin/fortran
./runtest.pl --lang=fortran testlist-f.txt
print_compile_options:
@echo "-------------------"
@echo "C compiler"
@echo "-------------------"
@echo "compilation: $(CC) $(CFLAGS)"
@$(CC) --version
@echo "-------------------"
@echo "Fortran compiler"
@echo "-------------------"
@echo "compilation: $(FC) $(FFLAGS)"
@$(FC) --version
cleansrcs:
find bin/ -iname "*.[cf]" -exec rm {} \;
cleanbins:
find bin/ -perm /a+x -type f -exec rm {} \;
cleanouts:
find bin/ -iname "*.out" -exec rm {} \;
cleanlogs:
find bin/ -iname "*.log" -exec rm {} \;
clean: cleansrcs cleanbins
cleanall:
rm -rf bin/