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 9V ?= 0 10QUIET = $(shell [ "$(V)" = "0" ] && echo @) 11 12ex55: ex55k.o 13 14#------------------------------------------------------------------------- 15ifeq ($(PETSC_PRECISION),__fp16) 16 TESTEX19OUT = output/ex19_fp16.testout 17else 18 TESTEX19OUT = output/ex19_1.testout 19endif 20 21# these tests are used by the makefile in PETSC_DIR for basic tests of the install and should not be removed 22testex5f: ex5f.PETSc 23 -${QUIET}${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex5f -snes_rtol 1e-4 > ex5f.tmp 2>&1; 24 -${QUIET}${DIFF} output/ex5f_1.testout ex5f.tmp > ex5f.dtmp; 25 -@if [ ! -s ex5f.dtmp ]; then \ 26 echo "Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process"; \ 27 else \ 28 echo "Possible error running Fortran example src/snes/tutorials/ex5f with 1 MPI process"; \ 29 echo "See https://petsc.org/release/faq/";\ 30 cat ex5f.tmp; \ 31 touch ../../../check_error;\ 32 fi; \ 33 ${RM} -f ex5f.tmp ex5f.dtmp; 34testex19: ex19.PETSc 35 -${QUIET}${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19.tmp 2>&1; 36 -${QUIET}${DIFF} ${TESTEX19OUT} ex19.tmp > ex19.dtmp; 37 -@if [ ! -s ex19.dtmp ]; then \ 38 echo "C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process"; \ 39 else \ 40 echo "Possible error running C/C++ src/snes/tutorials/ex19 with 1 MPI process"; \ 41 echo "See https://petsc.org/release/faq/";\ 42 cat ex19.tmp;\ 43 touch ../../../check_error;\ 44 fi; \ 45 ${RM} -f ex19.tmp ex19.dtmp; 46testex19_mpi: 47 -${QUIET}${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres -snes_type newtontrdc > ex19.tmp 2>&1; 48 -${QUIET}${DIFF} ${TESTEX19OUT} ex19.tmp > ex19.dtmp; 49 -@if [ ! -s ex19.dtmp ]; then \ 50 echo "C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes"; \ 51 else \ 52 echo "Possible error running C/C++ src/snes/tutorials/ex19 with 2 MPI processes"; \ 53 echo "See https://petsc.org/release/faq/";\ 54 cat ex19.tmp; \ 55 touch ../../../check_error;\ 56 fi; \ 57 ${RM} -f ex19.tmp ex19.dtmp; 58#use unpreconditioned norm because HYPRE device installations use different AMG parameters 59runex19_hypre: 60 -${QUIET}${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19.tmp 2>&1; 61 -${QUIET}${DIFF} output/ex19_hypre.out ex19.tmp > ex19.dtmp; 62 -@if [ ! -s ex19.dtmp ]; then \ 63 echo "C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE"; \ 64 else \ 65 printf "${PWD}\nPossible problem with ex19 running with HYPRE, diffs above\n=========================================\n";\ 66 touch ../../../check_error;\ 67 fi; \ 68 ${RM} -f ex19.tmp ex19.dtmp; 69runex19_hypre_cuda: 70 -${QUIET}${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.tmp; 71 -${QUIET}${DIFF} output/ex19_hypre.out ex19.tmp > ex19.dtmp; 72 -@if [ ! -s ex19.dtmp ]; then \ 73 echo "C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE/CUDA"; \ 74 else \ 75 printf "${PWD}\nPossible problem with ex19 running with HYPRE/CUDA, diffs above\n=========================================\n"; \ 76 touch ../../../check_error;\ 77 fi; \ 78 ${RM} -f ex19.tmp ex19.dtmp; 79runex19_hypre_hip: 80 -${QUIET}${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -dm_vec_type hip -dm_mat_type aijhipsparse -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19.tmp; 81 -${QUIET}${DIFF} output/ex19_hypre.out ex19.tmp > ex19.dtmp; 82 -@if [ ! -s ex19.dtmp ]; then \ 83 echo "C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE/HIP"; \ 84 else \ 85 printf "${PWD}\nPossible problem with ex19 running with HYPRE/HIP, diffs above\n=========================================\n";\ 86 touch ../../../check_error;\ 87 fi; \ 88 ${RM} -f ex19.tmp ex19.dtmp; 89runex19_cuda: 90 -${QUIET}${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.tmp; 91 -${QUIET}${DIFF} output/ex19_cuda_1.out ex19.tmp > ex19.dtmp; 92 -@if [ ! -s ex19.dtmp ]; then \ 93 echo "C/C++ example src/snes/tutorials/ex19 run successfully with CUDA"; \ 94 else \ 95 printf "${PWD}\nPossible problem with ex19 running with CUDA, diffs above\n=========================================\n"; \ 96 touch ../../../check_error;\ 97 fi; \ 98 ${RM} -f ex19.tmp ex19.dtmp; 99runex19_hip: 100 -${QUIET}${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -snes_monitor -dm_mat_type mpiaijhipsparse -dm_vec_type hip -pc_type gamg -ksp_monitor -mg_levels_ksp_max_it 1 > ex19.tmp; 101 -${QUIET}${DIFF} output/ex19_hip_1.out ex19.tmp > ex19.dtmp; 102 -@if [ ! -s ex19.dtmp ]; then \ 103 echo "C/C++ example src/snes/tutorials/ex19 run successfully with HIP"; \ 104 else \ 105 printf "${PWD}\nPossible problem with ex19 running with HIP, diffs above\n=========================================\n"; \ 106 touch ../../../check_error;\ 107 fi; \ 108 ${RM} -f ex19.tmp ex19.dtmp; 109runex19_ml: 110 -${QUIET}${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type ml > ex19.tmp; 111 -${QUIET}${DIFF} output/ex19_ml.out ex19.tmp > ex19.dtmp; 112 -@if [ ! -s ex19.dtmp ]; then \ 113 echo "C/C++ example src/snes/tutorials/ex19 run successfully with ML"; \ 114 else \ 115 printf "${PWD}\nPossible problem with ex19 running with ML, diffs above\n=========================================\n"; \ 116 touch ../../../check_error;\ 117 fi; \ 118 ${RM} -f ex19.tmp ex19.dtmp; 119runex19_fieldsplit_mumps: 120 -${QUIET}${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.tmp; 121 -${QUIET}${DIFF} output/ex19_fieldsplit_5.out ex19.tmp > ex19.dtmp; 122 -@if [ ! -s ex19.dtmp ]; then \ 123 echo "C/C++ example src/snes/tutorials/ex19 run successfully with MUMPS"; \ 124 else \ 125 printf "${PWD}\nPossible problem with ex19 running with MUMPS, diffs above\n=========================================\n";\ 126 touch ../../../check_error;\ 127 fi; \ 128 ${RM} -f ex19.tmp ex19.dtmp; 129runex19_superlu_dist: 130 -${QUIET}${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; 131 -${QUIET}${DIFF} output/ex19_superlu.out ex19.tmp > ex19.dtmp; 132 -@if [ ! -s ex19.dtmp ]; then \ 133 echo "C/C++ example src/snes/tutorials/ex19 run successfully with SuperLU_DIST"; \ 134 else \ 135 printf "${PWD}\nPossible problem with ex19 running with SuperLU_DIST, diffs above\n=========================================\n"; \ 136 touch ../../../check_error;\ 137 fi; \ 138 ${RM} -f ex19.tmp ex19.dtmp; 139runex19_suitesparse: 140 -${QUIET}${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type lu -pc_factor_mat_solver_type umfpack > ex19.tmp; 141 -${QUIET}${DIFF} output/ex19_suitesparse.out ex19.tmp > ex19.dtmp; 142 -@if [ ! -s ex19.dtmp ]; then \ 143 echo "C/C++ example src/snes/tutorials/ex19 run successfully with SuiteSparse"; \ 144 else \ 145 printf "${PWD}\nPossible problem with ex19 running with SuiteSparse, diffs above\n=========================================\n"; \ 146 touch ../../../check_error;\ 147 fi; \ 148 ${RM} -f ex19.tmp ex19.dtmp; 149runex3k_kokkos: ex3k.PETSc 150 -${QUIET}KOKKOS_DISABLE_WARNINGS=1 ${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex3k -view_initial -dm_vec_type kokkos -dm_mat_type aijkokkos -use_gpu_aware_mpi 0 -snes_monitor > ex3k.tmp; 151 -${QUIET}${DIFF} output/ex3k_1.out ex3k.tmp > ex3k.dtmp; 152 -@if [ ! -s ex3k.dtmp ]; then \ 153 echo "C/C++ example src/snes/tutorials/ex3k run successfully with Kokkos Kernels"; \ 154 else \ 155 printf "${PWD}\nPossible problem with ex3k running with Kokkos Kernels, diffs above\n=========================================\n"; \ 156 touch ../../../check_error;\ 157 fi; \ 158 ${RM} -f ex3k.tmp ex3k.dtmp; 159