1-include ../../../petscdir.mk 2 3LOCDIR = src/snes/tutorials/ 4MANSEC = SNES 5EXAMPLESMATLAB = ex5m.m ex29view.m 6DIRS = ex10d network 7CLEANFILES = ex5f90t 8 9include ${PETSC_DIR}/lib/petsc/conf/variables 10include ${PETSC_DIR}/lib/petsc/conf/rules 11 12#------------------------------------------------------------------------- 13 14# these tests are used by the makefile in PETSC_DIR for basic tests of the install and should not be removed 15testex5f: ex5f.PETSc 16 @if [ "${PETSC_WITH_BATCH}" != "" ]; then \ 17 echo "Running with batch filesystem; to test run src/snes/tutorials/ex5f with" ; \ 18 echo "your systems batch system"; \ 19 elif [ "${MPIEXEC}" = "/bin/false" ]; then \ 20 echo "*mpiexec not found*. Please run src/snes/tutorials/ex5f manually"; \ 21 elif [ -f ex5f ]; then \ 22 ${MPIEXEC} -n 1 ./ex5f > ex5f_1.tmp 2>&1; \ 23 if (${DIFF} output/ex5f_1.testout ex5f_1.tmp > /dev/null 2>&1) then \ 24 echo "Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process"; \ 25 else echo "Possible error running Fortran example src/snes/tutorials/ex5f with 1 MPI process"; \ 26 echo "See http://www.mcs.anl.gov/petsc/documentation/faq.html";\ 27 cat ex5f_1.tmp; fi; \ 28 ${RM} -f ex5f_1.tmp ;\ 29 ${MAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ex5f.rm; fi 30 31testex19: ex19.PETSc 32 -@if [ "${PETSC_WITH_BATCH}" != "" ]; then \ 33 echo "Running with batch filesystem; to test run src/snes/tutorials/ex19 with" ; \ 34 echo "your systems batch system"; \ 35 elif [ "${MPIEXEC}" = "/bin/false" ]; then \ 36 echo "*mpiexec not found*. Please run src/snes/tutorials/ex19 manually"; \ 37 elif [ -f ex19 ]; then \ 38 ${MPIEXEC} -n 1 ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19_1.tmp 2>&1; \ 39 if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \ 40 echo "C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process"; \ 41 else echo "Possible error running C/C++ src/snes/tutorials/ex19 with 1 MPI process"; \ 42 echo "See http://www.mcs.anl.gov/petsc/documentation/faq.html";\ 43 cat ex19_1.tmp; fi; \ 44 if [ ! "${MPI_IS_MPIUNI}" ]; then \ 45 ${MPIEXEC} -n 2 ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19_1.tmp 2>&1; \ 46 if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \ 47 echo "C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes"; \ 48 else echo "Possible error running C/C++ src/snes/tutorials/ex19 with 2 MPI processes"; \ 49 echo "See http://www.mcs.anl.gov/petsc/documentation/faq.html";\ 50 cat ex19_1.tmp; fi; fi; \ 51 ${RM} -f ex19_1.tmp; fi 52#use unpreconditioned norm because HYPRE device installations use different AMG parameters 53runex19_hypre: 54 -@${MPIEXEC} -n 2 ./ex19 -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \ 55 if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \ 56 echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre"; \ 57 else printf "${PWD}\nPossible problem with ex19 running with hypre, diffs above\n=========================================\n"; fi; \ 58 ${RM} -f ex19_1.tmp 59runex19_hypre_cuda: 60 -@${MPIEXEC} -n 2 ./ex19 -dm_vec_type cuda -dm_mat_type aijcusparse -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \ 61 if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \ 62 echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre/cuda"; \ 63 else printf "${PWD}\nPossible problem with ex19 running with hypre, diffs above\n=========================================\n"; fi; \ 64 ${RM} -f ex19_1.tmp 65runex19_hypre_hip: 66 -@${MPIEXEC} -n 2 ./ex19 -dm_vec_type hip -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -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/hip"; \ 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 -pc_gamg_esteig_ksp_max_it 10 -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