2 # /**-------------------------------------------------------------------**
4 # **-------------------------------------------------------------------**
6 # **-------------------------------------------------------------------**
7 # ** First version: march 6th 2003 **
8 # **-------------------------------------------------------------------**/
10 # makefile for checking.
12 #/*****************************************************************************
13 # * CLooG : the Chunky Loop Generator (experimental) *
14 # *****************************************************************************
16 # * Copyright (C) 2003 Cedric Bastoul *
18 # * This is free software; you can redistribute it and/or modify it under the *
19 # * terms of the GNU General Public License as published by the Free Software *
20 # * Foundation; either version 2 of the License, or (at your option) any *
23 # * This software is distributed in the hope that it will be useful, but *
24 # * WITHOUT ANY WARRANTY; without even the implied warranty of *
25 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
26 # * Public License for more details. *
28 # * You should have received a copy of the GNU General Public License along *
29 # * with software; if not, write to the Free Software Foundation, Inc., *
30 # * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
32 # * CLooG, the Chunky Loop Generator *
33 # * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
34 # * This file has been written with the help of the Bart Kienhuis's checking *
35 # * makefile for PipLib. *
37 # *****************************************************************************/
98 square+triangle-1-1-2-3 \
109 ./non_optimal/nul_complex1 \
110 ./non_optimal/usvd_e_t \
111 ./non_optimal/youcef \
112 ./reservoir/cholesky2 \
113 ./reservoir/fusion1 \
114 ./reservoir/fusion2 \
115 ./reservoir/jacobi2 \
116 ./reservoir/jacobi3 \
117 ./reservoir/lim-lam1 \
118 ./reservoir/lim-lam2 \
119 ./reservoir/lim-lam3 \
120 ./reservoir/lim-lam4 \
121 ./reservoir/lim-lam5 \
122 ./reservoir/lim-lam6 \
123 ./reservoir/liu-zhuge1 \
124 ./reservoir/loechner3 \
125 ./reservoir/loechner4 \
126 ./reservoir/loechner5 \
127 ./reservoir/mg-interp2 \
128 ./reservoir/mg-interp \
129 ./reservoir/mg-psinv \
130 ./reservoir/mg-resid \
131 ./reservoir/mg-rprj3 \
132 ./reservoir/pingali1 \
133 ./reservoir/pingali2 \
134 ./reservoir/pingali3 \
135 ./reservoir/pingali4 \
136 ./reservoir/pingali5 \
137 ./reservoir/pingali6 \
139 ./reservoir/tang-xue1 \
145 CLOOGTEST_FORTRAN = \
151 CLOOGTEST_STRIDED = \
162 @echo " /*-----------------------------------------------*"
163 @echo " * Generate files *"
164 @echo " *-----------------------------------------------*/"
165 for x in $(CLOOGTEST_C) ; do \
166 echo "Generate $$x.c" ; \
167 cloog $$x.cloog -o $$x.c ; \
169 for x in $(CLOOGTEST_FORTRAN) ; do \
170 echo "Generate $$x.f" ; \
171 cloog $$x.cloog -o $$x.f ; \
175 @echo " /*-----------------------------------------------*"
176 @echo " * Checking files by Valgrind *"
177 @echo " *-----------------------------------------------*/"
178 for x in $(CLOOGTEST_C) ; do \
179 echo "Valgrinding $$x.c" ; \
180 valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \
182 for x in $(CLOOGTEST_FORTRAN) ; do \
183 echo "Valgrinding $$x.f" ; \
184 valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \
188 @echo " /*-----------------------------------------------*"
189 @echo " * Testing CLooG *"
190 @echo " *-----------------------------------------------*/"
192 echo "--- Testing C files..." ; \
193 for x in $(CLOOGTEST_C) ; do \
194 echo "Verify file $$x" ; \
195 $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog > ttemp ; \
196 diff -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \
198 if [ "$$result" -ne "0" ] ; then \
199 echo "!!! Error: $$x is not the same" ; \
200 failedtest=`expr $$failedtest + 1` ; \
202 echo "$$x passed" ; \
205 echo "--- Testing FORTRAN files..." ; \
206 for x in $(CLOOGTEST_FORTRAN) ; do \
207 echo "Verify file $$x" ; \
208 $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog > ttemp ; \
209 diff -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.f ; \
211 if [ "$$result" -ne "0" ] ; then \
212 echo "!!! Error: $$x is not the same" ; \
213 failedtest=`expr $$failedtest + 1` ; \
215 echo "$$x passed" ; \
218 echo "--- Testing STRIDED files..." ; \
219 for x in $(CLOOGTEST_STRIDED) ; do \
220 echo "Verify file $$x" ; \
221 $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \
222 -strides 1 > ttemp ; \
223 diff -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \
225 if [ "$$result" -ne "0" ] ; then \
226 echo "!!! Error: $$x is not the same" ; \
227 failedtest=`expr $$failedtest + 1` ; \
229 echo "$$x passed" ; \
232 echo "--- Testing SPECIAL OPTIONS files..." ; \
233 echo "Verify file vasilache (-f 8 -l 9)" ; \
235 $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \
236 -f 8 -l 9 > ttemp ; \
237 diff -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \
239 if [ "$$result" -ne "0" ] ; then \
240 echo "!!! Error: $$x is not the same" ; \
241 failedtest=`expr $$failedtest + 1` ; \
243 echo "$$x passed" ; \
245 echo "Verify file merge (-f -1)" ; \
247 $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \
249 diff -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \
251 if [ "$$result" -ne "0" ] ; then \
252 echo "!!! Error: $$x is not the same" ; \
253 failedtest=`expr $$failedtest + 1` ; \
255 echo "$$x passed" ; \
257 echo "Verify file equality (-f -1 -l 2 -override)" ; \
259 $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \
260 -f -1 -l 2 -override > ttemp ; \
261 diff -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \
263 if [ "$$result" -ne "0" ] ; then \
264 echo "!!! Error: $$x is not the same" ; \
265 failedtest=`expr $$failedtest + 1` ; \
267 echo "$$x passed" ; \
269 echo "Verify file equality (-f -1 -l 4 -esp 1 -override)" ; \
271 $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \
272 -f -1 -l 4 -esp 1 -override > ttemp ; \
273 diff -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \
275 if [ "$$result" -ne "0" ] ; then \
276 echo "!!! Error: $$x is not the same" ; \
277 failedtest=`expr $$failedtest + 1` ; \
279 echo "$$x passed" ; \
282 if [ $$failedtest != 0 ] ; then \
283 echo "$$failedtest tests failed" ; \
285 echo "CLooG works correctly :-) !" ; \