1-include ../../../petscdir.mk 2CFLAGS = 3FFLAGS = 4CPPFLAGS = 5FPPFLAGS = 6LOCDIR = src/snes/tutorials/ 7MANSEC = SNES 8EXAMPLESC = ex1.c ex2.c ex3.c ex5.c ex6.c ex9.c \ 9 ex12.c ex14.c ex15.c ex17.c ex18.c ex19.c ex21.c ex22.c \ 10 ex25.c ex28.c ex30.c ex33.c \ 11 ex35.c ex42.c ex46.c ex48.c \ 12 ex56.c ex58.c ex59.c \ 13 ex62.c ex70.c ex77.c ex78.c \ 14 ex47cu.cu 15EXAMPLESF = ex1f.F90 ex5f.F90 ex5f90.F90 ex5f90t.F90 ex40f90.F90 ex73f90t.F90 16EXAMPLESCH = 17EXAMPLESFH = ex5f.h 18EXAMPLESMATLAB = ex5m.m ex61genm.m ex61m.m 19DIRS = ex10d network 20CLEANFILES = ex5f90t 21 22include ${PETSC_DIR}/lib/petsc/conf/variables 23include ${PETSC_DIR}/lib/petsc/conf/rules 24 25#------------------------------------------------------------------------- 26 27# these tests are used by the makefile in PETSC_DIR for basic tests of the install and should not be removed 28testex5f: ex5f.PETSc 29 @if [ "${PETSC_WITH_BATCH}" != "" ]; then \ 30 echo "Running with batch filesystem; to test run src/snes/tutorials/ex5f with" ; \ 31 echo "your systems batch system"; \ 32 elif [ "${MPIEXEC}" = "/bin/false" ]; then \ 33 echo "*mpiexec not found*. Please run src/snes/tutorials/ex5f manually"; \ 34 elif [ -f ex5f ]; then \ 35 ${MPIEXEC} -n 1 ./ex5f > ex5f_1.tmp 2>&1; \ 36 if (${DIFF} output/ex5f_1.testout ex5f_1.tmp > /dev/null 2>&1) then \ 37 echo "Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process"; \ 38 else echo "Possible error running Fortran example src/snes/tutorials/ex5f with 1 MPI process"; \ 39 echo "See http://www.mcs.anl.gov/petsc/documentation/faq.html";\ 40 cat ex5f_1.tmp; fi; \ 41 ${RM} -f ex5f_1.tmp ;\ 42 ${MAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ex5f.rm; fi 43 44testex19: ex19.PETSc 45 -@if [ "${PETSC_WITH_BATCH}" != "" ]; then \ 46 echo "Running with batch filesystem; to test run src/snes/tutorials/ex19 with" ; \ 47 echo "your systems batch system"; \ 48 elif [ "${MPIEXEC}" = "/bin/false" ]; then \ 49 echo "*mpiexec not found*. Please run src/snes/tutorials/ex19 manually"; \ 50 elif [ -f ex19 ]; then \ 51 ${MPIEXEC} -n 1 ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19_1.tmp 2>&1; \ 52 if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \ 53 echo "C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process"; \ 54 else echo "Possible error running C/C++ src/snes/tutorials/ex19 with 1 MPI process"; \ 55 echo "See http://www.mcs.anl.gov/petsc/documentation/faq.html";\ 56 cat ex19_1.tmp; fi; \ 57 if [ ! "${MPI_IS_MPIUNI}" ]; then \ 58 ${MPIEXEC} -n 2 ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19_1.tmp 2>&1; \ 59 if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \ 60 echo "C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes"; \ 61 else echo "Possible error running C/C++ src/snes/tutorials/ex19 with 2 MPI processes"; \ 62 echo "See http://www.mcs.anl.gov/petsc/documentation/faq.html";\ 63 cat ex19_1.tmp; fi; fi; \ 64 ${RM} -f ex19_1.tmp; fi 65runex19_hypre: 66 -@${MPIEXEC} -n 2 ./ex19 -da_refine 3 -snes_monitor_short -pc_type hypre > ex19_1.tmp 2>&1; \ 67 if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \ 68 echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre"; \ 69 else printf "${PWD}\nPossible problem with ex19 running with hypre, diffs above\n=========================================\n"; fi; \ 70 ${RM} -f ex19_1.tmp 71runex19_cuda: 72 -@${MPIEXEC} -n 1 ./ex19 -snes_monitor -dm_mat_type seqaijcusparse -dm_vec_type seqcuda -pc_type gamg -ksp_monitor -mg_levels_ksp_max_it 3 > ex19_1.tmp 2>&1; \ 73 if (${DIFF} output/ex19_cuda_1.out ex19_1.tmp) then \ 74 echo "C/C++ example src/snes/tutorials/ex19 run successfully with cuda"; \ 75 else printf "${PWD}\nPossible problem with ex19 running with cuda, diffs above\n=========================================\n"; fi; \ 76 ${RM} -f ex19_1.tmp 77runex19_ml: 78 -@${MPIEXEC} -n 2 ./ex19 -da_refine 3 -snes_monitor_short -pc_type ml > ex19_1.tmp 2>&1; \ 79 if (${DIFF} output/ex19_ml.out ex19_1.tmp) then \ 80 echo "C/C++ example src/snes/tutorials/ex19 run successfully with ml"; \ 81 else printf "${PWD}\nPossible problem with ex19 running with ml, diffs above\n=========================================\n"; fi; \ 82 ${RM} -f ex19_1.tmp 83runex19_fieldsplit_mumps: 84 -@${MPIEXEC} -n 2 ./ex19 -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type SCHUR -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -fieldsplit_0_pc_type lu -fieldsplit_1_pc_type lu -snes_monitor_short -ksp_monitor_short -fieldsplit_0_pc_factor_mat_solver_type mumps -fieldsplit_1_pc_factor_mat_solver_type mumps > ex19_6.tmp 2>&1; \ 85 if (${DIFF} output/ex19_fieldsplit_5.out ex19_6.tmp) then \ 86 echo "C/C++ example src/snes/tutorials/ex19 run successfully with mumps"; \ 87 else printf "${PWD}\nPossible problem with ex19 running with mumps, diffs above\n=========================================\n"; fi; \ 88 ${RM} -f ex19_6.tmp 89runex19_superlu_dist: 90 -@${MPIEXEC} -n 1 ./ex19 -da_grid_x 20 -da_grid_y 20 -pc_type lu -pc_factor_mat_solver_type superlu_dist > ex19.tmp 2>&1; \ 91 if (${DIFF} output/ex19_superlu.out ex19.tmp) then \ 92 echo "C/C++ example src/snes/tutorials/ex19 run successfully with superlu_dist"; \ 93 else printf "${PWD}\nPossible problem with ex19 running with superlu_dist, diffs above\n=========================================\n"; fi; \ 94 ${RM} -f ex19.tmp 95runex19_suitesparse: 96 -@${MPIEXEC} -n 1 ./ex19 -da_refine 3 -snes_monitor_short -pc_type lu -pc_factor_mat_solver_type umfpack > ex19_1.tmp 2>&1; \ 97 if (${DIFF} output/ex19_suitesparse.out ex19_1.tmp) then \ 98 echo "C/C++ example src/snes/tutorials/ex19 run successfully with suitesparse"; \ 99 else printf "${PWD}\nPossible problem with ex19 running with suitesparse, diffs above\n=========================================\n"; fi; \ 100 ${RM} -f ex19_1.tmp 101runex3k_kokkos: ex3k.PETSc 102 -@export OMP_PROC_BIND=false && ${MPIEXEC} -n 2 ./ex3k -view_initial -dm_vec_type kokkos -dm_mat_type aijkokkos -use_gpu_aware_mpi 0 -snes_monitor > ex3k_1.tmp 2>&1 103 -@if (${DIFF} output/ex3k_1.out ex3k_1.tmp) then \ 104 echo "C/C++ example src/snes/tutorials/ex3k run successfully with kokkos-kernels"; \ 105 else printf "${PWD}\nPossible problem with ex3k running with kokkos-kernels, diffs above\n=========================================\n"; \ 106 fi; \ 107 ${RM} -f ex3k_1.tm 108 109include ${PETSC_DIR}/lib/petsc/conf/test 110