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