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