Lines Matching +full:linux +full:- +full:hip +full:- +full:double

7 - Formatted comments at the bottom of the tutorials and test source files that describes the tests …
8 - The *test generator* (`config/gmakegentest.py`) that parses the tutorial and test source files an…
10 - The *PETSc test harness* that consists of makefile and shell scripts that runs the executables wi…
35 args: -debug -fields v1,v2,v3
38 args: -foo bar
44 - A single shell script
46 - A single makefile
48 - An output file that represents the *expected results*. It is also possible -- though unusual -- t…
50 - Two or more command tests, usually:
52 - one or more `mpiexec` tests that run the executable
53 - one or more `diff` tests to compare output with the expected result
61 mpiexec -n 1 ../ex1 1> ex1.tmp 2> ex1.err
62 diff ex1.tmp output/ex1.out 1> diff-ex1.tmp 2> diff-ex1.err
86 - as minimal as possible with the simplest test requiring only one keyword,
87 - independent of the filename such that a file can be renamed without rewriting the tests, and
88 - intuitive.
96 - **testset** or **test**: (*Required*)
98 - At the top level either a single test or a test set must be
99 specified. All other keywords are sub-entries of this keyword.
101 - **suffix**: (*Optional*; *Default:* `suffix=""`)
103 - The test name is given by `testname = basestring` if the suffix
106 - This can be specified only for top level test nodes.
108 - **output_file**: (*Optional*; *Default:*
111 - A reference file with the *expected output from the test run*,
113 - This file is described relative to the source directory of the
117 - **nsize**: (*Optional*; *Default:* `nsize=1`)
119 - This integer is passed to mpiexec; i.e., `mpiexec -n nsize`
121 - **args**: (*Optional*; *Default:* `""`)
123 - These arguments are passed to the executable.
125 - **diff_args**: (*Optional*; *Default:* `""`)
127 - These arguments are passed to the `lib/petsc/bin/petscdiff` script that
128 is used in the diff part of the test. For example, `-j` enables testing
131 - **TODO**: (*Optional*; *Default:* `False`)
133 - Setting this Boolean to True will tell the test to appear in the
136 - A runscript will be generated and can easily be modified by hand
139 - **filter**: (*Optional*; *Default:* `""`)
141 - Sometimes only a subset of the output is meant to be tested
145 - The value of this is the command to be run, for example,
146 `grep foo` or `sort -nr`.
147 - **NOTE: this method of testing error output is NOT recommended. See section on**
152 - **filter_output**: (*Optional*; *Default:* `""`)
154 - Sometimes filtering the output file is useful for standardizing
161 - **localrunfiles**: (*Optional*; *Default:* `""`)
163 - Some tests
165 Files in this (space-delimited) list will be copied over to the
169 - The copying is done by the test generator and not by creating
172 - **temporaries**: (*Optional*; *Default:* `""`)
174 - Some tests produce temporary files that are read by the filter
176 Files in this (space-delimited) list will cleared before
179 - **requires**: (*Optional*; *Default:* `""`)
181 - This is a space-delimited list of run requirements (not build
183 - In general, the language supports `and` and `not` constructs
185 - MPIUNI should work for all -n 1 examples so this need not be in
187 - Some tests require matrices or meshes contained in the
191 - Packages are indicated with lower-case specification, for example,
193 - Any defined variable in petscconf.h can be specified with the
195 - Any definition of the form `PETSC_HAVE_FOO` can just use
196 `requires: foo` similar to how third-party packages are handled.
198 - **timeoutfactor**: (*Optional*; *Default:* `"1"`)
200 - This parameter allows you to extend the default timeout for an
203 - Tests are limited to a set time that is found at the top of
207 - **env**: (*Optional*; *Default:* `env=""`)
209 - Allows you to set environment variables for the test. Values are copied verbatim to
212 - Variables defined within `env:` blocks are expanded and processed by the shell that
217 - Defining the `env:` keyword more than once is allowed. Subsequent declarations are
238 - Variables defined in an `env:` block are evaluated by the runscript in the order in
273 - **for loops**: Specifying `{{list of values}}` will generate a loop over
274 an enclosed space-delimited list of values.
279 args: -matload_block_size {{2 3}shared output}
282 Here the output for each `-matload_block_size` value is assumed to be
288 args: -matload_block_size {{2 3}separate output}
305 args: -petsc_ci_portable_error_output -error_output_stdout
310 - `-petsc_ci_portable_error_output`: Strips system or configuration-specific information
313 - Removes all path components except the file name from the traceback
314 - Removes line and column numbers from the traceback
315 - Removes PETSc version information
316 - Removes `configure` options used
317 - Removes system name
318 - Removes hostname
319 - Removes date
325 **gracefully** exit where possible. For single-ranked runs this means returning with
326 exit-code `0` and calling `MPI_Finalize()` instead of `MPI_Abort()`. Multi-rank
330 - `-error_output_stdout`: Forces `SETERRQ()` and friends to dump error messages to
332 sub-directive under `filter:`) also works it appears to be unstable under heavy
338 When writing ASCII output that may be not portable, so one wants `-petsc_ci_portable_error_output` …
358 create `a_b_tutorials-ex1` test that requires only one
377 args: -t 2 -pc_type jacobi -ksp_monitor_short -ksp_type gmres
378 args: -ksp_gmres_cgs_refinement_type refine_always -s2_ksp_type bcgs
379 args: -s2_pc_type jacobi -s2_ksp_monitor_short
385 `a_b_tutorials-ex1` and `a_b_tutorials-ex1_1`.
394 args: -f0 ${DATAFILESPATH}/matrices/poisson1
395 args: -ksp_type cg -pc_type icc -pc_factor_levels 2
398 args: -mat_type seqsbaij
410 args: -f0 ${DATAFILESPATH}/matrices/medium
411 args: -ksp_type bicg
414 args: -pc_type lu
427 args: -f ${DATAFILESPATH}/matrices/small -mat_type aij
432 args: -f ${DATAFILESPATH}/matrices/small
433 args: -mat_type baij -matload_block_size {{2 3}shared output}
447 args: -f ${DATAFILESPATH}/matrices/small -mat_type baij
449 args: -matload_block_size 2
451 args: -matload_block_size 3
462 args: -f0 ${DATAFILESPATH}/matrices/poisson1
463 args: -ksp_type cg -pc_type icc
464 args: -pc_factor_levels {{0 2 4}separate output}
467 args: -mat_type seqsbaij
472 - `runex10_19_pc_factor_levels-0.sh`
473 - `runex10_19_pc_factor_levels-2.sh`
474 - `runex10_19_pc_factor_levels-4.sh`
483 - **requires:** (*Optional*; *Default:* `""`)
485 - Same as the runtime requirements (for example, can include
488 1. Precision types: `single`, `double`, `quad`, `int32`
491 - In addition, `TODO` is available to allow you to skip the build
494 - **depends:** (*Optional*; *Default:* `""`)
496 - List any dependencies required to compile the file
520 $ make help-test
536 :::{figure} /images/developers/test-artifacts.png
545 $ make print-test test-fail=1
551 $ make print-test test-fail=1 | tr ' ' '\n' | sort
566 TEST arch-ci-linux-uni-pkgs/tests/counts/vec_is_sf_tests-ex1_basic_1.counts
569 The string `vec_is_sf_tests-ex1_basic_1` gives the following information:
571 - The file generating the tests is found in `$PETSC_DIR/src/vec/is/sf/tests/ex1.c`
572 - The makefile target for the *test* is `vec_is_sf_tests-ex1_basic_1`
573 - The makefile target for the *executable* is `$PETSC_ARCH/tests/vec/is/sf/tests/ex1`
574 - The shell script running the test is located at: `$PETSC_DIR/$PETSC_ARCH/tests/vec/is/sf/tests/ru…
588 $ ./runex1_basic_1.sh -h
592 -a <args> ......... Override default arguments
593 -c ................ Cleanup (remove generated files)
594 -C ................ Compile
595 -d ................ Launch in debugger
596 -e <args> ......... Add extra arguments to default
597 -f ................ force attempt to run test that would otherwise be skipped
598 -h ................ help: print this message
599 -n <integer> ...... Override the number of processors to use
600 -j ................ Pass -j to petscdiff (just use diff)
601 -J <arg> .......... Pass -J to petscdiff (just use diff with arg)
602 -m ................ Update results using petscdiff
603 -M ................ Update alt files using petscdiff
604 -o <arg> .......... Output format: 'interactive', 'err_only'
605 -p ................ Print command: Print first command and exit
606 -t ................ Override the default timeout (default=60 sec)
607 -U ................ run cUda-memcheck
608 -V ................ run Valgrind
609 -v ................ Verbose: Print commands
612 We will be using the `-C`, `-V`, and `-p` flags.
618 $ runex1_basic_1.sh -C
621 $ runex1_basic_1.sh -m # If need to update results
623 $ runex1_basic_1.sh -V # Make sure valgrind clean
625 $ git commit -a
629 In this case, you can use the `-p` flag to print just the first
635 $ runex1_basic_1.sh -p
643 $ make help-test
645 /usr/bin/gmake --no-print-directory test <options>
649 REPLACE=1 Replace the output in PETSC_DIR source tree (-m to test scripts)
651 ALT=1 Replace 'alt' output in PETSC_DIR source tree (-M to test scripts)
652 DIFF_NUMBERS=1 Diff the numbers in the output (-j to test scripts and petscdiff)
653 …CUDAMEMCHECK=1 Execute the tests using CUDA "compute-sanitizer --tool memcheck" (-U to test scr…
656 cuda-memcheck and compute-sanitizer are supported)
657 VALGRIND=1 Execute the tests using valgrind (-V to test scripts)
658 DEBUG=1 Launch tests in the debugger (-d to the scripts)
667 OPTIONS='<args>' Override options to scripts (-a to test scripts)
668 EXTRA_OPTIONS='<args>' Add options to scripts (-e to test scripts)
671 …ilt test to the macOS firewall list to prevent popups. Configure --with-macos-firewall-rules to ma…
675 /usr/bin/gmake --no-print-directory test search='sys*ex2*'
677 /usr/bin/gmake --no-print-directory test s='sys*ex2*'
679 /usr/bin/gmake --no-print-directory test s='src/sys/tests/'
681 /usr/bin/gmake --no-print-directory test s='src/sys/tests/ex1.c'
684 /usr/bin/gmake --no-print-directory test query='requires' queryval='*MPI_PROCESS_SHARED_MEMORY*'
686 /usr/bin/gmake --no-print-directory test q='requires' qv='*MPI_PROCESS_SHARED_MEMORY*'
688 /usr/bin/gmake --no-print-directory test s='src/sys/tests/' searchin='*options*'
690 To re-run the last tests which failed:
691 /usr/bin/gmake --no-print-directory test test-fail='1'
694 /usr/bin/gmake --no-print-directory print-test search=sys*
697 /usr/bin/gmake --no-print-directory ${PETSC_ARCH}/tests/sys/tests/ex1
704 $ make test search=vec_is_sf_tests-ex1_basic_1
712 $ make vec_is_sf_tests-ex1_basic_1 PRINTONLY=1
716 $ /scratch/kruger/contrib/petsc-mpich-cxx/bin/mpiexec -n 1 arch-mpich-cxx-py3/tests/vec/is/sf/tests…
719 $ git commit -a
724 For forming a search, it is recommended to always use `print-test` instead of
729 - `search` (or `s`)
731 - Searches based on name of test target (see above)
733 - Use the familiar glob syntax (like the Unix `ls` command). Example:
736 $ make print-test search='vec_is*ex1*basic*1'
742 $ make print-test s='vec_is*ex1*basic*1'
745 - It also takes full paths. Examples:
748 $ make print-test s='src/vec/is/tests/ex1.c'
752 $ make print-test s='src/dm/impls/plex/tests/'
756 $ make print-test s='src/dm/impls/plex/tests/ex1.c'
759 - `query` and `queryval` (or `q` and `qv`)
761 - `query` corresponds to test harness keyword, `queryval` to the value. Example:
764 $ make print-test query='suffix' queryval='basic_1'
767 - Invokes `config/query_tests.py` to query the tests (see
768 `config/query_tests.py --help` for more information).
770 - See below for how to use as it has many features
772 - `searchin` (or `i`)
774 - Filters results of above searches. Example:
777 $ make print-test s='src/dm/impls/plex/tests/ex1.c' i='*refine_overlap_2d*'
782 - `gmakesearch`
784 - Use GNU make's own filter capability.
786 - Fast, but requires knowing GNU make regex syntax which uses `%` instead of `*`
788 - Also very limited (cannot use two `%`'s for example)
790 - Example:
796 - `gmakesearchin`
798 - Use GNU make's own filter capability to search in previous results. Example:
804 ### Query-based searching
809 $ make print-test query='suffix' queryval='basic_1'
813 $ make print-test query='requires' queryval='cuda'
817 $ make print-test query='requires' queryval='defined(PETSC_HAVE_MPI_GPU_AWARE)'
821 $ make print-test query='requires' queryval='*GPU_AWARE*'
826 - Example:
829 $ make print-test query='name' queryval='vec_is*ex1*basic*1'
832 - This can be combined with union/intersect queries as discussed below
837 args: -ksp_monitor_short -pc_type ml -ksp_max_it 3
848 - Numbers (see `ksp_max_it` above), but floats are ignored as well.
849 - Loops: `args: -pc_fieldsplit_diag_use_amat {{0 1}}` gives `pc_fieldsplit_diag_use_amat` as the se…
850 - Input files: `-f *`
855 $ make print-test query='args' queryval='ksp_monitor'
859 $ make print-test query='args' queryval='*monitor*'
863 $ make print-test query='args' queryval='pc_type ml'
872 - All examples using `cuda` and all examples using `hip`:
875 $ make print-test query='requires,requires' queryval='cuda,hip'
877 $ make print-test query='requires%AND%requires' queryval='cuda%AND%hip'
880 - Examples that require both triangle and ctetgen (intersection of tests)
883 $ make print-test query='requires|requires' queryval='ctetgen,triangle'
885 $ make print-test query='requires%OR%requires' queryval='ctetgen%AND%triangle'
888 - Tests that require either `ctetgen` or `triangle`
891 $ make print-test query='requires,requires' queryval='ctetgen,triangle'
893 $ make print-test query='requires%AND%requires' queryval='ctetgen%AND%triangle'
896 - Find `cuda` examples in the `dm` package.
899 $ make print-test query='requires|name' queryval='cuda,dm*'
901 $ make print-test query='requires%OR%name' queryval='cuda%AND%dm*'
907 $ make print-test query='requires' queryval='ctetgen' | tr ' ' '\n' | wc -l
909 $ make print-test query='requires' queryval='triangle' | tr ' ' '\n' | wc -l
911 $ make print-test query='requires,requires' queryval='ctetgen,triangle' | tr ' ' '\n' | wc -l
913 $ make print-test query='requires|requires' queryval='ctetgen,triangle' | tr ' ' '\n' | wc -l
923 query='requires,requires|args' queryval='cuda,hip,*log*'
925 query='requires%AND%requires%OR%args' queryval='cuda%AND%hip%AND%*log*'
931 requires:cuda && (requires:hip || args:*log*)
965 TEST arch-osx-pkgs-opt-new/tests/counts/ksp_ksp_tests-ex9_1.counts
966 …ok ksp_ksp_tests-ex9_1+pc_fieldsplit_diag_use_amat-0_pc_fieldsplit_diag_use_amat-0_pc_fieldsplit_t…
967 …not ok diff-ksp_ksp_tests-ex9_1+pc_fieldsplit_diag_use_amat-0_pc_fieldsplit_diag_use_amat-0_pc_fie…
968 …ok ksp_ksp_tests-ex9_1+pc_fieldsplit_diag_use_amat-0_pc_fieldsplit_diag_use_amat-0_pc_fieldsplit_t…
972 In this case, the trick is to use the verbose option, `V=1` (or for the shell script workflows, `-v…
977 arch-osx-pkgs-opt-new/tests/ksp/ksp/tests/runex9_1.sh -v
978-ex9_1+pc_fieldsplit_diag_use_amat-0_pc_fieldsplit_diag_use_amat-0_pc_fieldsplit_type-additive # m…
986 $ make test s='src/ksp/ksp/tests/ex9.c' i='*1' v=1 | grep 'not ok' | cut -d# -f2
987 mpiexec -n 1 ../ex9 -ksp_converged_reason -ksp_error_if_not_converged -pc_fieldsplit_diag_use_ama…
1006 A dictionary will be pretty-printed. From this dictionary printout, any
1014 …compliant with the [Test Anything Protocol (TAP)](https://testanything.org/tap-specification.html).
1029 args: -f ${DATAFILESPATH}/matrices/small -mat_type {{aij baij sbaij}} -matload_block_size {{2 3}}
1036 ok 1 In mat...tests: "./ex138 -f ${DATAFILESPATH}/matrices/small -mat_type aij -matload_block_size …
1037 ok 2 In mat...tests: "Diff of ./ex138 -f ${DATAFILESPATH}/matrices/small -mat_type aij -matload_blo…
1038 ok 3 In mat...tests: "./ex138 -f ${DATAFILESPATH}/matrices/small -mat_type aij -matload_block_size …
1039 ok 4 In mat...tests: "Diff of ./ex138 -f ${DATAFILESPATH}/matrices/small -mat_type aij -matload_blo…
1040 ok 5 In mat...tests: "./ex138 -f ${DATAFILESPATH}/matrices/small -mat_type baij -matload_block_size…
1041 ok 6 In mat...tests: "Diff of ./ex138 -f ${DATAFILESPATH}/matrices/small -mat_type baij -matload_bl…
1044 ok 11 In mat...tests: "./ex138 -f ${DATAFILESPATH}/matrices/small -mat_type saij -matload_block_siz…
1045 ok 12 In mat...tests: "Diff of ./ex138 -f ${DATAFILESPATH}/matrices/small -mat_type aij -matload_bl…
1050 Most of the requirements for being TAP-compliant lie in the shell
1060 petsc_testrun 'diff ex1.tmp output/ex1.out' diff-ex1.tmp diff-ex1.err
1076 ok 7 ./ex3 -f /matrices/small -mat_type aij -matload_block_size 2
1078 ok 9 ./ex3 -f /matrices/small -mat_type aij -matload_block_size 3
1080 ok 11 ./ex3 -f /matrices/small -mat_type baij -matload_block_size 2
1082 ok 13 ./ex3 -f /matrices/small -mat_type baij -matload_block_size 3
1084 ok 15 ./ex3 -f /matrices/small -mat_type sbaij -matload_block_size 2
1086 ok 17 ./ex3 -f /matrices/small -mat_type sbaij -matload_block_size 3
1108 $ config/report_tests.py -h
1114 $ config/report_tests.py -t 5