1-include ../../../petscdir.mk 2 3MANSEC = SNES 4EXAMPLESMATLAB = ex5m.m ex29view.m 5DIRS = ex10d network 6CLEANFILES = ex5f90t 7 8include ${PETSC_DIR}/lib/petsc/conf/variables 9include ${PETSC_DIR}/lib/petsc/conf/rules 10 11ex55: ex55.o ex55k.o 12 13#------------------------------------------------------------------------- 14 15# these tests are used by the makefile in PETSC_DIR for basic tests of the install and should not be removed 16testex5f: ex5f.PETSc 17 -@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex5f -snes_rtol 1e-4 > ex5f_1.tmp 2>&1; \ 18 if (${DIFF} output/ex5f_1.testout ex5f_1.tmp > /dev/null 2>&1) then \ 19 echo "Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process"; \ 20 else \ 21 echo "Possible error running Fortran example src/snes/tutorials/ex5f with 1 MPI process"; \ 22 echo "See https://petsc.org/release/faq/";\ 23 cat ex5f_1.tmp; \ 24 touch ../../../check_error;\ 25 fi; \ 26 ${RM} -f ex5f_1.tmp ;\ 27 ${MAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ex5f.rm; 28testex19: ex19.PETSc 29 -@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19_1.tmp 2>&1; \ 30 if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \ 31 echo "C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process"; \ 32 else \ 33 echo "Possible error running C/C++ src/snes/tutorials/ex19 with 1 MPI process"; \ 34 echo "See https://petsc.org/release/faq/";\ 35 cat ex19_1.tmp;\ 36 touch ../../../check_error;\ 37 fi;\ 38 ${RM} -f ex19_1.tmp; 39testex19_mpi: 40 -@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19_1.tmp 2>&1; \ 41 if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \ 42 echo "C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes"; \ 43 else \ 44 echo "Possible error running C/C++ src/snes/tutorials/ex19 with 2 MPI processes"; \ 45 echo "See https://petsc.org/release/faq/";\ 46 cat ex19_1.tmp; \ 47 touch ../../../check_error;\ 48 fi;\ 49 ${RM} -f ex19_1.tmp; 50#use unpreconditioned norm because HYPRE device installations use different AMG parameters 51runex19_hypre: 52 -@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \ 53 if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \ 54 echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre"; \ 55 else \ 56 printf "${PWD}\nPossible problem with ex19 running with hypre, diffs above\n=========================================\n";\ 57 touch ../../../check_error;\ 58 fi; \ 59 ${RM} -f ex19_1.tmp 60runex19_hypre_cuda: 61 -@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./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; \ 62 if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \ 63 echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre/cuda"; \ 64 else \ 65 printf "${PWD}\nPossible problem with ex19 running with hypre/cuda, diffs above\n=========================================\n"; \ 66 touch ../../../check_error;\ 67 fi; \ 68 ${RM} -f ex19_1.tmp 69runex19_hypre_hip: 70 -@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -dm_vec_type hip -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \ 71 if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \ 72 echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre/hip"; \ 73 else \ 74 printf "${PWD}\nPossible problem with ex19 running with hypre/hip, diffs above\n=========================================\n";\ 75 touch ../../../check_error;\ 76 fi; \ 77 ${RM} -f ex19_1.tmp 78runex19_cuda: 79 -@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./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; \ 80 if (${DIFF} output/ex19_cuda_1.out ex19_1.tmp) then \ 81 echo "C/C++ example src/snes/tutorials/ex19 run successfully with cuda"; \ 82 else \ 83 printf "${PWD}\nPossible problem with ex19 running with cuda, diffs above\n=========================================\n"; \ 84 touch ../../../check_error;\ 85 fi; \ 86 ${RM} -f ex19_1.tmp 87runex19_ml: 88 -@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type ml > ex19_1.tmp 2>&1; \ 89 if (${DIFF} output/ex19_ml.out ex19_1.tmp) then \ 90 echo "C/C++ example src/snes/tutorials/ex19 run successfully with ml"; \ 91 else \ 92 printf "${PWD}\nPossible problem with ex19 running with ml, diffs above\n=========================================\n"; \ 93 touch ../../../check_error;\ 94 fi; \ 95 ${RM} -f ex19_1.tmp 96runex19_fieldsplit_mumps: 97 -@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./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; \ 98 if (${DIFF} output/ex19_fieldsplit_5.out ex19_6.tmp) then \ 99 echo "C/C++ example src/snes/tutorials/ex19 run successfully with mumps"; \ 100 else \ 101 printf "${PWD}\nPossible problem with ex19 running with mumps, diffs above\n=========================================\n";\ 102 touch ../../../check_error;\ 103 fi; \ 104 ${RM} -f ex19_6.tmp 105runex19_superlu_dist: 106 -@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_grid_x 20 -da_grid_y 20 -pc_type lu -pc_factor_mat_solver_type superlu_dist > ex19.tmp 2>&1; \ 107 if (${DIFF} output/ex19_superlu.out ex19.tmp) then \ 108 echo "C/C++ example src/snes/tutorials/ex19 run successfully with superlu_dist"; \ 109 else \ 110 printf "${PWD}\nPossible problem with ex19 running with superlu_dist, diffs above\n=========================================\n"; \ 111 touch ../../../check_error;\ 112 fi; \ 113 ${RM} -f ex19.tmp 114runex19_suitesparse: 115 -@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type lu -pc_factor_mat_solver_type umfpack > ex19_1.tmp 2>&1; \ 116 if (${DIFF} output/ex19_suitesparse.out ex19_1.tmp) then \ 117 echo "C/C++ example src/snes/tutorials/ex19 run successfully with suitesparse"; \ 118 else \ 119 printf "${PWD}\nPossible problem with ex19 running with suitesparse, diffs above\n=========================================\n"; \ 120 touch ../../../check_error;\ 121 fi; \ 122 ${RM} -f ex19_1.tmp 123runex3k_kokkos: ex3k.PETSc 124 -@OMP_PROC_BIND=false ${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex3k -view_initial -dm_vec_type kokkos -dm_mat_type aijkokkos -use_gpu_aware_mpi 0 -snes_monitor > ex3k_1.tmp 2>&1 ;\ 125 if (${DIFF} output/ex3k_1.out ex3k_1.tmp) then \ 126 echo "C/C++ example src/snes/tutorials/ex3k run successfully with kokkos-kernels"; \ 127 else \ 128 printf "${PWD}\nPossible problem with ex3k running with kokkos-kernels, diffs above\n=========================================\n"; \ 129 touch ../../../check_error;\ 130 fi; \ 131 ${RM} -f ex3k_1.tmp 132 133