Subversion Repositories slepc-dev

Rev

Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2356 jroman 1
#
2
#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3
#  SLEPc - Scalable Library for Eigenvalue Problem Computations
2575 eromero 4
#  Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain
2356 jroman 5
#
6
#  This file is part of SLEPc.
7
#
8
#  SLEPc is free software: you can redistribute it and/or modify it under  the
9
#  terms of version 3 of the GNU Lesser General Public License as published by
10
#  the Free Software Foundation.
11
#
12
#  SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
13
#  WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
14
#  FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
15
#  more details.
16
#
17
#  You  should have received a copy of the GNU Lesser General  Public  License
18
#  along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
19
#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20
#
21
 
2362 jroman 22
CFLAGS     =
2356 jroman 23
FFLAGS     =
24
CPPFLAGS   =
25
FPPFLAGS   =
26
LOCDIR     = src/eps/examples/tests/
2523 jroman 27
EXAMPLESC  = test1.c test2.c test3.c test4.c test5.c test6.c
2535 jroman 28
EXAMPLESF  = test7f.F
2356 jroman 29
MANSEC     = EPS
2535 jroman 30
TESTS      = test1 test2 test3 test4 test5 test6 test7f
2356 jroman 31
 
2387 jroman 32
TESTEXAMPLES_C       = test1.PETSc runtest1_1 test1.rm \
2397 eromero 33
                       test2.PETSc runtest2_1 test2.rm \
2492 jroman 34
                       test3.PETSc runtest3_1 test3.rm \
35
                       test4.PETSc runtest4_1 test4.rm \
2523 jroman 36
                       test5.PETSc runtest5_1 test5.rm \
2551 eromero 37
                       test6.PETSc runtest6_1 test6.rm \
38
                       test8.PETSc runtest8_1 test8.rm \
39
                       test9.PETSc runtest9_1 test9.rm \
40
                       test10.PETSc runtest10_1 test10.rm \
41
                       test11.PETSc runtest11_1 test11.rm
2535 jroman 42
TESTEXAMPLES_FORTRAN = test7f.PETSc runtest7f_1 test7f.rm
2509 jroman 43
TESTEXAMPLES_BLOPEX  = test5.PETSc runtest5_blopex test5.rm
2496 jroman 44
 
2356 jroman 45
include ${SLEPC_DIR}/conf/slepc_common
46
 
2362 jroman 47
test1: test1.o chkopts
48
	-${CLINKER} -o test1 test1.o ${SLEPC_LIB}
49
	${RM} test1.o
2356 jroman 50
 
2387 jroman 51
test2: test2.o chkopts
52
	-${CLINKER} -o test2 test2.o ${SLEPC_LIB}
53
	${RM} test2.o
54
 
55
test3: test3.o chkopts
56
	-${CLINKER} -o test3 test3.o ${SLEPC_LIB}
57
	${RM} test3.o
58
 
2451 eromero 59
test4: test4.o chkopts
60
	-${CLINKER} -o test4 test4.o ${SLEPC_LIB}
61
	${RM} test4.o
62
 
2492 jroman 63
test5: test5.o chkopts
64
	-${CLINKER} -o test5 test5.o ${SLEPC_LIB}
65
	${RM} test5.o
66
 
2523 jroman 67
test6: test6.o chkopts
68
	-${CLINKER} -o test6 test6.o ${SLEPC_LIB}
69
	${RM} test6.o
70
 
2535 jroman 71
test7f: test7f.o chkopts
72
	-${FLINKER} -o test7f test7f.o ${SLEPC_LIB}
73
	${RM} test7f.o
74
 
2551 eromero 75
test8: test8.o chkopts
76
	-${CLINKER} -o test8 test8.o ${SLEPC_LIB}
77
	${RM} test8.o
78
 
79
test9: test9.o chkopts
80
	-${CLINKER} -o test9 test9.o ${SLEPC_LIB}
81
	${RM} test9.o
82
 
83
test10: test10.o chkopts
84
	-${CLINKER} -o test10 test10.o ${SLEPC_LIB}
85
	${RM} test10.o
86
 
87
test11: test11.o chkopts
88
	-${CLINKER} -o test11 test11.o ${SLEPC_LIB}
89
	${RM} test11.o
90
 
2356 jroman 91
#------------------------------------------------------------------------------------
2496 jroman 92
EPSALL = krylovschur arnoldi lanczos gd jd
93
EPSNS  = krylovschur arnoldi gd jd
2558 eromero 94
 
2551 eromero 95
TESTCODE = \
96
	[ x${SAVE_OUTPUT} = xyes ] && cp $${test}.tmp output/$${test}.out; \
97
	${DIFF} output/$${test}.out $${test}.tmp || \
98
	echo "Possible problem with $${test}, diffs above"; \
99
	${RM} -f $${test}.tmp
100
 
2362 jroman 101
runtest1_1:
2551 eromero 102
	-@test=test1_1; \
2496 jroman 103
	for eps in ${EPSALL}; do \
2551 eromero 104
	   echo "eps type $$eps"; \
2543 eromero 105
	   if [ "$$eps" = "lanczos" ]; then EXTRA="-eps_lanczos_reorthog full"; else EXTRA=""; fi; \
2551 eromero 106
	   ${MPIEXEC} -np 1 ./test1 -eps_type $$eps -eps_nev 4 $$EXTRA -eps_terse 2>&1; \
107
	done > $${test}.tmp; \
108
	${TESTCODE}
2362 jroman 109
 
2387 jroman 110
runtest2_1:
2551 eromero 111
	-@test=test2_1; \
2496 jroman 112
	for eps in ${EPSALL}; do \
2551 eromero 113
	   echo "eps type $$eps"; \
2557 eromero 114
	   if [ $$eps = arnoldi -o $$eps = lanczos ]; then EXTRA="-eps_ncv 15"; else EXTRA=""; fi; \
2552 eromero 115
	   ${MPIEXEC} -np 1 ./test2 -eps_type $$eps -eps_nev 4 -eps_terse $$EXTRA 2>&1;    \
2551 eromero 116
	done > $${test}.tmp; \
117
	${TESTCODE}
2387 jroman 118
 
119
runtest3_1:
2551 eromero 120
	-@test=test3_1; \
2496 jroman 121
	for eps in ${EPSALL}; do \
2551 eromero 122
	   echo "eps type $$eps"; \
123
	   ${MPIEXEC} -np 1 ./test3 -eps_type $$eps -eps_nev 4 -eps_terse 2>&1;    \
124
	done > $${test}.tmp; \
125
	${TESTCODE}
2387 jroman 126
 
2451 eromero 127
runtest4_1:
2551 eromero 128
	-@test=test4_1; \
2496 jroman 129
	for eps in ${EPSALL}; do \
2551 eromero 130
	   echo "eps type $$eps"; \
131
	   ${MPIEXEC} -np 1 ./test4 -type $$eps -eps_terse 2>&1;    \
132
	done > $${test}.tmp; \
133
	${TESTCODE}
2451 eromero 134
 
2492 jroman 135
runtest5_1:
2551 eromero 136
	-@test=test5_1; \
2496 jroman 137
	for eps in ${EPSNS}; do \
2492 jroman 138
	   echo "eps type $$eps" >> test5_1.tmp; \
2516 jroman 139
	   ${MPIEXEC} -np 1 ./test5 -eps_type $$eps -eps_nev 4 -eps_terse >> test5_1.tmp 2>&1;    \
2492 jroman 140
	done; \
2540 jroman 141
	if (${GREP} USE_COMPLEX ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h > /dev/null 2>&1) then \
2551 eromero 142
	  [ x${SAVE_OUTPUT} = xyes ] && cp test5_1.tmp output/test5_1_complex.out; \
2540 jroman 143
	  if (${DIFF} output/test5_1_complex.out test5_1.tmp) then true; \
144
	  else echo "Possible problem with test5_1, diffs above"; fi; \
145
	else \
2551 eromero 146
	  [ x${SAVE_OUTPUT} = xyes ] && cp test5_1.tmp output/test5_1.out; \
2540 jroman 147
	  if (${DIFF} output/test5_1.out test5_1.tmp) then true; \
148
	  else echo "Possible problem with test5_1, diffs above"; fi; \
149
	fi; \
2492 jroman 150
	${RM} -f test5_1.tmp
151
 
2496 jroman 152
runtest5_blopex:
2531 jroman 153
	-@${MPIEXEC} -np 1 ./test5 -symm -eps_type blopex -eps_nev 4 -eps_terse > test5_blopex.tmp 2>&1; \
2496 jroman 154
	if (${DIFF} output/test5_blopex.out test5_blopex.tmp) then true; \
155
	else echo "Possible problem with test5_blopex, diffs above"; fi; \
156
	${RM} -f test5_blopex.tmp;
2523 jroman 157
 
2531 jroman 158
testtest5_blopex: test5.PETSc
159
	@if [ "${PETSC_WITH_BATCH}" != "" -o "${MPIEXEC}" = "/bin/false" ]; then \
160
           echo "Skipping BLOPEX test"; \
161
	elif [ -f test5 ]; then \
162
           ${MPIEXEC} -np 1 ./test5 -symm -eps_type blopex -eps_nev 4 -eps_terse > test5_blopex.tmp 2>&1; \
163
	   if (${DIFF} output/test5_blopex.out test5_blopex.tmp > /dev/null 2>&1) then \
164
           echo "BLOPEX example src/eps/examples/tests/test5 run successfully with 1 MPI process"; \
165
	   else echo "Possible error running BLOPEX src/eps/examples/tests/test5 with 1 MPI process"; \
166
           cat test5_blopex.tmp; fi; \
167
           ${RM} -f test5_blopex.tmp; \
168
           ${MAKE} SLEPC_ARCH=${SLEPC_ARCH} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} test5.rm ; fi
169
 
2523 jroman 170
runtest6_1:
2551 eromero 171
	-@test=test6_1; \
2523 jroman 172
	for eps in ${EPSNS}; do \
2551 eromero 173
	   echo "eps type $$eps"; \
174
	   ${MPIEXEC} -np 1 ./test6 -eps_type $$eps -eps_nev 4 -eps_terse 2>&1;    \
175
	done > $${test}.tmp; \
176
	${TESTCODE}
2523 jroman 177
 
2535 jroman 178
runtest7f_1:
2570 eromero 179
	-@test=test7f_1; \
180
	${MPIEXEC} -np 1 ./test7f -eps_nev 4 -eps_terse > $${test}.tmp 2>&1; \
181
	${TESTCODE}
2535 jroman 182
 
183
testtest7f: test7f.PETSc
2562 eromero 184
	@ok=0; if [ "${PETSC_WITH_BATCH}" != "" ]; then \
2535 jroman 185
	   echo "Running with batch filesystem; to test run src/eps/examples/tests/test7f " ; \
186
	   echo "with your systems batch system"; \
187
        elif [ "${MPIEXEC}" = "/bin/false" ]; then \
188
           echo "*mpiexec not found*. Please run src/eps/examples/tests/test7f manually"; \
189
	elif [ -f test7f ]; then \
190
           ${MPIEXEC} -np 1 ./test7f -eps_nev 4 -eps_terse > test7f_1.tmp 2>&1; \
191
	   if (${DIFF} output/test7f_1.out test7f_1.tmp > /dev/null 2>&1) then \
192
           echo "Fortran example src/eps/examples/tests/test7f run successfully with 1 MPI process"; \
193
	   else echo "Possible error running Fortran src/eps/examples/tests/test7f with 1 MPI process"; \
2562 eromero 194
           cat test7f_1.tmp; ok=1; fi; \
2535 jroman 195
           ${RM} -f test7f_1.tmp; \
2562 eromero 196
           ${MAKE} SLEPC_ARCH=${SLEPC_ARCH} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} test7f.rm ; \
197
	else ok=1; fi; \
198
	exit $$ok
2535 jroman 199
 
2551 eromero 200
runtest8_1:
201
	-@test=test8_1; \
202
	for eps in ${EPSALL}; do \
203
	   echo "eps type $$eps"; \
204
	   ${MPIEXEC} -np 1 ./test8 -eps_type $$eps -eps_nev 4 -eps_terse 2>&1; \
205
	done > $${test}.tmp; \
206
	${TESTCODE}
2535 jroman 207
 
2551 eromero 208
runtest9_1:
209
	-@test=test9_1; \
210
	for eps in ${EPSNS}; do \
211
	   echo "eps type $$eps"; \
2558 eromero 212
	   ${MPIEXEC} -np 1 ./test9 -eps_type $$eps -eps_nev 4 -eps_terse $$EXTRA 2>&1; \
2551 eromero 213
	done > $${test}.tmp;\
214
	${TESTCODE}
215
 
216
runtest10_1:
217
	-@test=test10_1; \
218
	for eps in ${EPSALL}; do \
219
	   echo "eps type $$eps"; \
2558 eromero 220
	   ${MPIEXEC} -np 1 ./test10 -eps_type $$eps -eps_nev 4 -m 11 -eps_terse 2>&1; \
2551 eromero 221
	done > $${test}.tmp;\
222
	${TESTCODE}
223
 
224
runtest11_1:
225
	-@test=test11_1; \
226
	for eps in ${EPSNS}; do \
227
	   echo "eps type $$eps"; \
2558 eromero 228
	   if [ $$eps = krylovschur -o $$eps = arnoldi ]; then EXTRA="-st_shift 0.5 -st_type sinvert"; else EXTRA=""; fi; \
2552 eromero 229
	   ${MPIEXEC} -np 1 ./test11 -eps_type $$eps -eps_nev 4 -eps_terse $$EXTRA 2>&1; \
2551 eromero 230
	done > $${test}.tmp;\
231
	${TESTCODE}