xref: /petsc/src/sys/tests/makefile (revision 379be9a103f8c7ff69d1ba10dd6cb4d786eb7335)
1cdb0f33dSPierre Jolivet-include ../../../petscdir.mk
2f97672e5SBarry Smith
3c4762a1bSJed BrownLOCDIR          = src/sys/tests/
4c4762a1bSJed BrownMANSEC          = Sys
5c4762a1bSJed Brown
6c4762a1bSJed Browninclude ${PETSC_DIR}/lib/petsc/conf/variables
7c4762a1bSJed Browninclude ${PETSC_DIR}/lib/petsc/conf/rules
8c4762a1bSJed Browninclude ${PETSC_DIR}/lib/petsc/conf/test
9b6efb0a5SBarry Smith
10b6efb0a5SBarry Smithtestex55:
11b6efb0a5SBarry Smith	-@if [ "${PETSC_WITH_BATCH}" != "" ]; then \
12b6efb0a5SBarry Smith           echo "Running with batch filesystem; to test run src/sys/tests/ex55.py with" ; \
13b6efb0a5SBarry Smith           echo "your systems batch system"; \
14b6efb0a5SBarry Smith        elif [ "${MPIEXEC}" = "/bin/false" ]; then \
15b6efb0a5SBarry Smith           echo "*mpiexec not found*. Please run src/sys/tests/ex55.py manually"; \
16b6efb0a5SBarry Smith	else \
17504e95faSBarry Smith           export PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}${PETSC_MPI4PY_PYTHONPATH}; \
18504e95faSBarry Smith           echo "Using PYTHONPATH=$${PYTHONPATH} to locate mpi4py for test"; \
19*379be9a1SSatish Balay           ${MPIEXEC} -n 2 ${PYTHON_EXE} ./ex55.py > ex55_1.tmp  2>&1;\
20b6efb0a5SBarry Smith	   if (${DIFF} output/ex55_1.testout ex55_1.tmp > /dev/null 2>&1) then \
21b6efb0a5SBarry Smith           echo "C/C++ mpi4py python example src/sys/tests/ex55.py run successfully with 2 MPI process"; \
22b6efb0a5SBarry Smith	   else echo "Possible error running Python src/sys/tests/ex55.py with 2 MPI processes"; \
23d30b464cSBarry Smith           echo "See https://petsc.org/release/faq/";\
24b6efb0a5SBarry Smith           cat ex55_1.tmp; fi; \
25b6efb0a5SBarry Smith        ${RM} -f ex55.tmp; fi
26