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