1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598
|
<html>
<head> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/makefile.html" />
<title></title>
<meta name="generator" content="c2html 0.9.4">
<meta name="date" content="2021-03-03T22:25:30+00:00">
</head>
<body bgcolor="#FFFFFF">
<div id="version" align=right><b>petsc-3.14.5 2021-03-03</b></div>
<div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.14.5 v3.14.5 makefile.html "><small>Report Typos and Errors</small></a></div>
<pre width="80"><font color="#A020F0">#</font>
<font color="#A020F0"># This is the makefile for compiling PETSc. See</font>
<font color="#A020F0"># http://www.mcs.anl.gov/petsc/documentation/installation.html for directions on installing PETSc.</font>
<font color="#A020F0"># See also conf for additional commands.</font>
<font color="#A020F0">#</font>
<strong><font color="#FF0000">ALL:</font></strong> all
LOCDIR = ./
DIRS = src include tutorials interfaces share/petsc/matlab
CFLAGS =
FFLAGS =
CPPFLAGS =
FPPFLAGS =
<font color="#A020F0"># next line defines PETSC_DIR and PETSC_ARCH if they are not set</font>
include ././${PETSC_ARCH}/lib/petsc/conf/petscvariables
include ${PETSC_DIR}/lib/petsc/conf/variables
include ${PETSC_DIR}/lib/petsc/conf/rules
include ${PETSC_DIR}/lib/petsc/conf/test.common
<font color="#A020F0"># This makefile contains a lot of PHONY targets with improperly specified prerequisites</font>
<font color="#A020F0"># where correct execution instead depends on the targets being processed in the correct</font>
<font color="#A020F0"># order. This is gross, but this makefile doesn't really do any work. Sub-makes still</font>
<font color="#A020F0"># benefit from parallelism.</font>
.NOTPARALLEL:
OMAKE_SELF = $(OMAKE) -f makefile
OMAKE_SELF_PRINTDIR = $(OMAKE_PRINTDIR) -f makefile
<font color="#A020F0">#</font>
<font color="#A020F0"># Basic targets to build PETSc libraries.</font>
<font color="#A020F0">#</font>
<strong><font color="#FF0000">all:</font></strong>
+@${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} chk_petscdir chk_upgrade | tee ${PETSC_ARCH}/lib/petsc/conf/make.log
@ln -sf ${PETSC_ARCH}/lib/petsc/conf/make.log make.log
+@${OMAKE_SELF_PRINTDIR} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} all-local 2>&1 | tee -a ${PETSC_ARCH}/lib/petsc/conf/make.log;
@egrep '(out of memory allocating.*after a total of|gfortran: fatal error: Killed signal terminated program f951)' ${PETSC_ARCH}/lib/petsc/conf/make.log | tee ${PETSC_ARCH}/lib/petsc/conf/memoryerror.log > /dev/null
@egrep -i <font color="#666666">"( error | error: |no such file or directory)"</font> ${PETSC_ARCH}/lib/petsc/conf/make.log | tee ${PETSC_ARCH}/lib/petsc/conf/error.log > /dev/null
+@<font color="#4169E1">if</font> test -s ${PETSC_ARCH}/lib/petsc/conf/memoryerror.log; then \
printf ${PETSC_TEXT_HILIGHT}<font color="#666666">"**************************ERROR*************************************\n"</font> 2>&1 | tee -a ${PETSC_ARCH}/lib/petsc/conf/make.log; \
echo <font color="#666666">" Error during compile, you need to increase the memory allocated to the VM and rerun "</font> 2>&1 | tee -a ${PETSC_ARCH}/lib/petsc/conf/make.log; \
printf <font color="#666666">"********************************************************************"</font>${PETSC_TEXT_NORMAL}<font color="#666666">"\n"</font> 2>&1 | tee -a ${PETSC_ARCH}/lib/petsc/conf/make.log;\
elif test -s ${PETSC_ARCH}/lib/petsc/conf/error.log; then \
printf ${PETSC_TEXT_HILIGHT}<font color="#666666">"**************************ERROR*************************************\n"</font> 2>&1 | tee -a ${PETSC_ARCH}/lib/petsc/conf/make.log; \
echo <font color="#666666">" Error during compile, check ${PETSC_ARCH}/lib/petsc/conf/make.log"</font> 2>&1 | tee -a ${PETSC_ARCH}/lib/petsc/conf/make.log; \
echo <font color="#666666">" Send it and ${PETSC_ARCH}/lib/petsc/conf/configure.log to petsc-maint@mcs.anl.gov"</font> 2>&1 | tee -a ${PETSC_ARCH}/lib/petsc/conf/make.log;\
printf <font color="#666666">"********************************************************************"</font>${PETSC_TEXT_NORMAL}<font color="#666666">"\n"</font> 2>&1 | tee -a ${PETSC_ARCH}/lib/petsc/conf/make.log;\
<font color="#4169E1">else</font> \
${OMAKE_SELF} print_mesg_after_build PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} 2>&1 | tee -a ${PETSC_ARCH}/lib/petsc/conf/make.log ;\
fi #solaris make likes to print the whole command that gave error. So split this up into the smallest chunk below
@echo <font color="#666666">"Finishing make run at `date +'%a, %d %b %Y %H:%M:%S %z'`"</font> >> ${PETSC_ARCH}/lib/petsc/conf/make.log
@<font color="#4169E1">if</font> test -s ${PETSC_ARCH}/lib/petsc/conf/error.log; then exit 1; fi
all-local: info libs matlabbin mpi4py-build petsc4py-build libmesh-build mfem-build slepc-build hpddm-build amrex-build bamg-build
<font color="#A020F0">#</font>
<font color="#A020F0"># Prints information about the system and version of PETSc being compiled</font>
<font color="#A020F0">#</font>
<strong><font color="#FF0000">info:</font></strong>
-@echo <font color="#666666">"=========================================="</font>
-@echo <font color="#666666">" "</font>
-@echo <font color="#666666">"See documentation/faq.html and documentation/bugreporting.html"</font>
-@echo <font color="#666666">"for help with installation problems. Please send EVERYTHING"</font>
-@echo <font color="#666666">"printed out below when reporting problems. Please check the"</font>
-@echo <font color="#666666">"mailing list archives and consider subscribing."</font>
-@echo <font color="#666666">" "</font>
-@echo <font color="#666666">" http://www.mcs.anl.gov/petsc/miscellaneous/mailing-lists.html"</font>
-@echo <font color="#666666">" "</font>
-@echo <font color="#666666">"=========================================="</font>
-@echo Starting make run on `hostname` at `date +'%a, %d %b %Y %H:%M:%S %z'`
-@echo Machine characteristics: `uname -a`
-@echo <font color="#666666">"-----------------------------------------"</font>
-@echo <font color="#666666">"Using PETSc directory: ${PETSC_DIR}"</font>
-@echo <font color="#666666">"Using PETSc arch: ${PETSC_ARCH}"</font>
-@echo <font color="#666666">"-----------------------------------------"</font>
-@grep <font color="#666666">"define <a href="ROOT/docs/manualpages/Sys/PETSC_VERSION.html#PETSC_VERSION">PETSC_VERSION</a>"</font> ${PETSC_DIR}/include/petscversion.h | ${SED} <font color="#666666">"s/........//"</font>
-@echo <font color="#666666">"-----------------------------------------"</font>
-@echo <font color="#666666">"Using configure Options: ${CONFIGURE_OPTIONS}"</font>
-@echo <font color="#666666">"Using configuration flags:"</font>
-@grep <font color="#666666">"\#define "</font> ${PETSCCONF_H}
-@echo <font color="#666666">"-----------------------------------------"</font>
-@echo <font color="#666666">"Using C compile: ${PETSC_CCOMPILE_SINGLE}"</font>
-@<font color="#4169E1">if</font> [ <font color="#666666">"${MPICC_SHOW}"</font> != <font color="#666666">""</font> ]; then \
printf <font color="#666666">"mpicc -show: %b\n"</font> <font color="#666666">"${MPICC_SHOW}"</font>;\
fi; \
printf <font color="#666666">"C compiler version: %b\n"</font> <font color="#666666">"${C_VERSION}"</font>; \
<font color="#4169E1">if</font> [ <font color="#666666">"${CXX}"</font> != <font color="#666666">""</font> ]; then \
echo <font color="#666666">"Using C++ compile: ${PETSC_CXXCOMPILE_SINGLE}"</font>;\
<font color="#4169E1">if</font> [ <font color="#666666">"${MPICXX_SHOW}"</font> != <font color="#666666">""</font> ]; then \
printf <font color="#666666">"mpicxx -show: %b\n"</font> <font color="#666666">"${MPICXX_SHOW}"</font>; \
fi;\
printf <font color="#666666">"C++ compiler version: %b\n"</font> <font color="#666666">"${Cxx_VERSION}"</font>; \
fi
-@<font color="#4169E1">if</font> [ <font color="#666666">"${FC}"</font> != <font color="#666666">""</font> ]; then \
echo <font color="#666666">"Using Fortran compile: ${PETSC_FCOMPILE_SINGLE}"</font>;\
<font color="#4169E1">if</font> [ <font color="#666666">"${MPIFC_SHOW}"</font> != <font color="#666666">""</font> ]; then \
printf <font color="#666666">"mpif90 -show: %b\n"</font> <font color="#666666">"${MPIFC_SHOW}"</font>; \
fi; \
printf <font color="#666666">"Fortran compiler version: %b\n"</font> <font color="#666666">"${FC_VERSION}"</font>; \
fi
-@<font color="#4169E1">if</font> [ <font color="#666666">"${CUDAC}"</font> != <font color="#666666">""</font> ]; then \
echo <font color="#666666">"Using CUDA compile: ${PETSC_CUCOMPILE_SINGLE}"</font>;\
fi
-@<font color="#4169E1">if</font> [ <font color="#666666">"${CLANGUAGE}"</font> = <font color="#666666">"CXX"</font> ]; then \
echo <font color="#666666">"Using C++ compiler to compile PETSc"</font>;\
fi
-@echo <font color="#666666">"-----------------------------------------"</font>
-@echo <font color="#666666">"Using C/C++ linker: ${PCC_LINKER}"</font>
-@echo <font color="#666666">"Using C/C++ flags: ${PCC_LINKER_FLAGS}"</font>
-@<font color="#4169E1">if</font> [ <font color="#666666">"${FC}"</font> != <font color="#666666">""</font> ]; then \
echo <font color="#666666">"Using Fortran linker: ${FC_LINKER}"</font>;\
echo <font color="#666666">"Using Fortran flags: ${FC_LINKER_FLAGS}"</font>;\
fi
-@echo <font color="#666666">"-----------------------------------------"</font>
-@echo <font color="#666666">"Using system modules: ${LOADEDMODULES}"</font>
-@<font color="#4169E1">if</font> [ <font color="#666666">"${MPI_IS_MPIUNI}"</font> = <font color="#666666">"1"</font> ]; then \
echo Using mpi.h: mpiuni; \
<font color="#4169E1">else</font> \
TESTDIR=`mktemp -q -d -t petscmpi-XXXXXXXX` && \
echo '#include <mpi.h>' > $${TESTDIR}/mpitest.c && \
BUF=`${CPP} ${PETSC_CPPFLAGS} ${PETSC_CC_INCLUDES} $${TESTDIR}/mpitest.c |grep 'mpi\.h' | ( head -1 ; cat > /dev/null )` && \
echo Using mpi.h: $${BUF}; ${RM} -rf $${TESTDIR}; \
fi
-@echo <font color="#666666">"-----------------------------------------"</font>
-@echo <font color="#666666">"Using libraries: ${PETSC_LIB}"</font>
-@echo <font color="#666666">"------------------------------------------"</font>
-@echo <font color="#666666">"Using mpiexec: ${MPIEXEC}"</font>
-@echo <font color="#666666">"------------------------------------------"</font>
-@echo <font color="#666666">"Using MAKE: $(MAKE)"</font>
-@echo <font color="#666666">"Using MAKEFLAGS: -j$(MAKE_NP) -l$(MAKE_LOAD) $(MAKEFLAGS)"</font>
-@echo <font color="#666666">"=========================================="</font>
<font color="#A020F0">#</font>
<font color="#A020F0"># Build MatLab binaries</font>
<font color="#A020F0">#</font>
<strong><font color="#FF0000">matlabbin:</font></strong>
-@<font color="#4169E1">if</font> [ <font color="#666666">"${MATLAB_MEX}"</font> != <font color="#666666">""</font> -a <font color="#666666">"${MATLAB_SOCKET}"</font> != <font color="#666666">""</font> -a <font color="#666666">"${PETSC_SCALAR}"</font> = <font color="#666666">"real"</font> -a <font color="#666666">"${PETSC_PRECISION}"</font> = <font color="#666666">"double"</font> ]; then \
echo <font color="#666666">"BEGINNING TO COMPILE MATLAB INTERFACE"</font>; \
<font color="#4169E1">if</font> [ ! -d <font color="#666666">"${PETSC_DIR}/${PETSC_ARCH}/lib/petsc"</font> ] ; then ${MKDIR} ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc; fi; \
<font color="#4169E1">if</font> [ ! -d <font color="#666666">"${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/matlab"</font> ] ; then ${MKDIR} ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/matlab; fi; \
cd src/sys/classes/viewer/impls/socket/matlab && ${OMAKE_SELF} matlabcodes PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR}; \
echo <font color="#666666">"========================================="</font>; \
fi
<font color="#A020F0">#</font>
<font color="#A020F0"># Builds PETSc check examples for a given architecture</font>
<font color="#A020F0">#</font>
<strong><font color="#FF0000">check_install:</font></strong> check
<strong><font color="#FF0000">check:</font></strong>
-+@${OMAKE_SELF} PATH=<font color="#666666">"${PETSC_DIR}/${PETSC_ARCH}/lib:${PATH}"</font> PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} check_build 2>&1 | tee ./${PETSC_ARCH}/lib/petsc/conf/check.log
<strong><font color="#FF0000">checkx:</font></strong>
-@${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} checkx_build 2>&1 | tee ./${PETSC_ARCH}/lib/petsc/conf/checkx.log
<strong><font color="#FF0000">check_build:</font></strong>
-@echo <font color="#666666">"Running check examples to verify correct installation"</font>
-@echo <font color="#666666">"Using PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}"</font>
+@cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} clean-legacy
+@cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} testex19
+@<font color="#4169E1">if</font> [ <font color="#666666">"${HYPRE_LIB}"</font> != <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_WITH_BATCH}"</font> = <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_SCALAR}"</font> = <font color="#666666">"real"</font> ]; then \
cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} DIFF=${PETSC_DIR}/lib/petsc/bin/petscdiff runex19_hypre; \
fi;
+@<font color="#4169E1">if</font> [ <font color="#666666">"${CUDA_LIB}"</font> != <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_WITH_BATCH}"</font> = <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_SCALAR}"</font> = <font color="#666666">"real"</font> ]; then \
cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} DIFF=${PETSC_DIR}/lib/petsc/bin/petscdiff runex19_cuda; \
fi;
+@<font color="#4169E1">if</font> [ <font color="#666666">"${KOKKOS_LIB}"</font> != <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_WITH_BATCH}"</font> = <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_SCALAR}"</font> = <font color="#666666">"real"</font> ] && [ <font color="#666666">"${PETSC_PRECISION}"</font> = <font color="#666666">"double"</font> ]; then \
cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} DIFF=${PETSC_DIR}/lib/petsc/bin/petscdiff runex3_kokkos; \
fi;
+@<font color="#4169E1">if</font> [ <font color="#666666">"${MUMPS_LIB}"</font> != <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_WITH_BATCH}"</font> = <font color="#666666">""</font> ]; then \
cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} DIFF=${PETSC_DIR}/lib/petsc/bin/petscdiff runex19_fieldsplit_mumps; \
fi;
+@<font color="#4169E1">if</font> [ <font color="#666666">"${SUPERLU_DIST_LIB}"</font> != <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_WITH_BATCH}"</font> = <font color="#666666">""</font> ]; then \
cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} DIFF=${PETSC_DIR}/lib/petsc/bin/petscdiff runex19_superlu_dist; \
fi;
+@<font color="#4169E1">if</font> [ <font color="#666666">"${HDF5_LIB}"</font> != <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_WITH_BATCH}"</font> = <font color="#666666">""</font> ]; then \
cd src/vec/vec/tests >/dev/null; \
${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} clean-legacy; \
${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ex47.PETSc DIFF=${PETSC_DIR}/lib/petsc/bin/petscdiff runex47; \
${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} clean-legacy; \
fi;
+@<font color="#4169E1">if</font> [ <font color="#666666">"${AMREX_LIB}"</font> != <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_WITH_BATCH}"</font> = <font color="#666666">""</font> ]; then \
echo <font color="#666666">"Running testamres examples to verify correct installation"</font>;\
echo <font color="#666666">"Using PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}"</font>;\
cd src/ksp/ksp/tutorials/amrex >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} clean-legacy;\
${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} testamrex;\
fi;
+@<font color="#4169E1">if</font> ( [ <font color="#666666">"${ML_LIB}"</font> != <font color="#666666">""</font> ] || [ <font color="#666666">"${TRILINOS_LIB}"</font> != <font color="#666666">""</font> ] ) && [ <font color="#666666">"${PETSC_WITH_BATCH}"</font> = <font color="#666666">""</font> ]; then \
cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} DIFF=${PETSC_DIR}/lib/petsc/bin/petscdiff runex19_ml; \
fi;
+@<font color="#4169E1">if</font> [ <font color="#666666">"${SUITESPARSE_LIB}"</font> != <font color="#666666">""</font> ] && [ <font color="#666666">"${PETSC_WITH_BATCH}"</font> = <font color="#666666">""</font> ]; then \
cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} DIFF=${PETSC_DIR}/lib/petsc/bin/petscdiff runex19_suitesparse; \
fi;
+@cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ex19.rm
+@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC4PY}"</font> = <font color="#666666">"yes"</font> ]; then \
cd src/ksp/ksp/tutorials >/dev/null; \
${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} clean-legacy; \
${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} testex100; \
${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} clean-legacy; \
fi;
+@egrep <font color="#666666">"^#define PETSC_HAVE_FORTRAN 1"</font> ${PETSCCONF_H} | tee .ftn.log > /dev/null; \
<font color="#4169E1">if</font> test -s .ftn.log; then \
cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} testex5f; \
fi; ${RM} .ftn.log;
+@egrep <font color="#666666">"^#define PETSC_HAVE_MATLAB_ENGINE 1"</font> ${PETSCCONF_H} | tee .ftn.log > /dev/null; \
<font color="#4169E1">if</font> test -s .ftn.log; then \
cd src/vec/vec/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} testex31; \
fi; ${RM} .ftn.log;
+@cd src/snes/tutorials >/dev/null; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} clean-legacy
-@echo <font color="#666666">"Completed test examples"</font>
<strong><font color="#FF0000">checkx_build:</font></strong>
-@echo <font color="#666666">"Running graphics check example to verify correct X11 installation"</font>
-@echo <font color="#666666">"Using PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}"</font>
@cd src/snes/tutorials; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} clean-legacy
@cd src/snes/tutorials; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} testxex19
@cd src/snes/tutorials; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} clean-legacy
-@echo <font color="#666666">"Completed graphics check example"</font>
<strong><font color="#FF0000">check_usermakefile:</font></strong>
-@echo <font color="#666666">"Testing compile with user makefile"</font>
-@echo <font color="#666666">"Using PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}"</font>
@cd src/snes/tutorials; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} -f ${PETSC_DIR}/share/petsc/Makefile.user ex19
@egrep <font color="#666666">"^#define PETSC_HAVE_FORTRAN 1"</font> ${PETSCCONF_H} | tee .ftn.log > /dev/null; \
<font color="#4169E1">if</font> test -s .ftn.log; then \
cd src/snes/tutorials; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} -f ${PETSC_DIR}/share/petsc/Makefile.user ex5f; \
fi; ${RM} .ftn.log;
@cd src/snes/tutorials; ${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} clean-legacy
-@echo <font color="#666666">"Completed compile with user makefile"</font>
<font color="#A020F0"># Compare ABI/API of two versions of PETSc library with the old one defined by PETSC_{DIR,ARCH}_ABI_OLD</font>
<strong><font color="#FF0000">abitest:</font></strong>
@<font color="#4169E1">if</font> [ <font color="#666666">"${PETSC_DIR_ABI_OLD}"</font> = <font color="#666666">""</font> ] || [ <font color="#666666">"${PETSC_ARCH_ABI_OLD}"</font> = <font color="#666666">""</font> ]; \
then printf <font color="#666666">"You must set environment variables PETSC_DIR_ABI_OLD and PETSC_ARCH_ABI_OLD to run abitest\n"</font>; \
exit 1; \
fi;
-@echo <font color="#666666">"Comparing ABI/API of the following two PETSc versions (you must have already configured and built them using GCC and with -g):"</font>
-@echo <font color="#666666">"========================================================================================="</font>
-@echo <font color="#666666">" Old: PETSC_DIR_ABI_OLD = ${PETSC_DIR_ABI_OLD}"</font>
-@echo <font color="#666666">" PETSC_ARCH_ABI_OLD = ${PETSC_ARCH_ABI_OLD}"</font>
-@pushd ${PETSC_DIR_ABI_OLD} >> /dev/null ; echo <font color="#666666">" Branch = "</font>`git rev-parse --abbrev-ref HEAD`
-@echo <font color="#666666">" New: PETSC_DIR = ${PETSC_DIR}"</font>
-@echo <font color="#666666">" PETSC_ARCH = ${PETSC_ARCH}"</font>
-@echo <font color="#666666">" Branch = "</font>`git rev-parse --abbrev-ref HEAD`
-@echo <font color="#666666">"========================================================================================="</font>
-@$(PYTHON) ${PETSC_DIR}/lib/petsc/bin/maint/abicheck.py -old_dir ${PETSC_DIR_ABI_OLD} -old_arch ${PETSC_ARCH_ABI_OLD} -new_dir ${PETSC_DIR} -new_arch ${PETSC_ARCH} -report_format html
<font color="#A020F0"># Compare ABI/API of current PETSC_ARCH/PETSC_DIR with a previous branch</font>
<strong><font color="#FF0000">abitestcomplete:</font></strong>
-@<font color="#4169E1">if</font> [[ -f <font color="#666666">"${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/configure.log"</font> ]]; then \
OPTIONS=`grep -h -m 1 <font color="#666666">"Configure Options: "</font> ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/configure.log | sed <font color="#666666">"s!Configure Options: --configModules=PETSc.Configure --optionsModule=config.compilerOptions!!g"</font>` ;\
echo $${OPTIONS} ;\
fi ; \
<font color="#4169E1">if</font> [[ <font color="#666666">"${PETSC_DIR_ABI_OLD}"</font> != <font color="#666666">""</font> ]]; then \
PETSC_DIR_OLD=${PETSC_DIR_ABI_OLD}; \
<font color="#4169E1">else</font> \
PETSC_DIR_OLD=${PETSC_DIR}/../petsc-abi; \
fi ; \
echo <font color="#666666">"================================================================================================="</font> ;\
echo <font color="#666666">"Doing ABI/API comparison between"</font> ${branch} <font color="#666666">" and "</font> `git rev-parse --abbrev-ref HEAD` <font color="#666666">"using "</font> $${OPTIONS} ;\
echo <font color="#666666">"================================================================================================="</font> ;\
<font color="#4169E1">if</font> [[ ! -d $${PETSC_DIR_OLD} ]]; then \
git clone ${PETSC_DIR} $${PETSC_DIR_OLD} ; \
<font color="#4169E1">else</font> \
cd $${PETSC_DIR_OLD} ; \
git pull ; \
fi ; \
cd $${PETSC_DIR_OLD} ; \
git checkout ${branch} ; \
PETSC_DIR=`pwd` PETSC_ARCH=arch-branch-`git rev-parse ${branch}` ./configure $${OPTIONS} ; \
PETSC_DIR=`pwd` PETSC_ARCH=arch-branch-`git rev-parse ${branch}` make all test ; \
cd ${PETSC_DIR} ; \
./configure $${OPTIONS}; \
make all test ; \
PETSC_DIR_ABI_OLD=$${PETSC_DIR_OLD} PETSC_ARCH_ABI_OLD=arch-branch-`git rev-parse ${branch}` make abitest
<font color="#A020F0"># Deletes PETSc libraries</font>
<strong><font color="#FF0000">deletelibs:</font></strong>
-${RM} -rf ${PETSC_LIB_DIR}/libpetsc*.*
<strong><font color="#FF0000">deletemods:</font></strong>
-${RM} -f ${PETSC_DIR}/${PETSC_ARCH}/include/petsc*.mod
<strong><font color="#FF0000">allclean:</font></strong>
-@${OMAKE} -f gmakefile clean
<strong><font color="#FF0000">clean:</font></strong>: allclean
<strong><font color="#FF0000">distclean:</font></strong> chk_petscdir
@<font color="#4169E1">if</font> [ -f ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/reconfigure-${PETSC_ARCH}.py ]; then \
echo <font color="#666666">"*** Preserving ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/reconfigure-${PETSC_ARCH}.py in ${PETSC_DIR} ***"</font>; \
mv -f ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/reconfigure-${PETSC_ARCH}.py ${PETSC_DIR}/; fi
@echo <font color="#666666">"*** Deleting all build files in ${PETSC_DIR}/${PETSC_ARCH} ***"</font>
-${RM} -rf ${PETSC_DIR}/${PETSC_ARCH}/
<font color="#A020F0">#</font>
<strong><font color="#FF0000">reconfigure:</font></strong>
@unset MAKEFLAGS && ${PYTHON} ${PETSC_ARCH}/lib/petsc/conf/reconfigure-${PETSC_ARCH}.py
<font color="#A020F0">#</font>
<strong><font color="#FF0000">install:</font></strong>
@${PYTHON} ./config/install.py -destDir=${DESTDIR}
+${OMAKE_SELF} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} mpi4py-install petsc4py-install libmesh-install mfem-install slepc-install hpddm-install amrex-install bamg-install
<strong><font color="#FF0000">mpistreams:</font></strong>
+@cd src/benchmarks/streams; ${OMAKE_SELF} PATH=<font color="#666666">"${PETSC_DIR}/${PETSC_ARCH}/lib:${PATH}"</font> PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} mpistreams
<strong><font color="#FF0000">mpistream:</font></strong>
+@cd src/benchmarks/streams; ${OMAKE_SELF} PATH=<font color="#666666">"${PETSC_DIR}/${PETSC_ARCH}/lib:${PATH}"</font> PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} mpistream
<strong><font color="#FF0000">openmpstreams:</font></strong>
+@cd src/benchmarks/streams; ${OMAKE_SELF} PATH=<font color="#666666">"${PETSC_DIR}/${PETSC_ARCH}/lib:${PATH}"</font> PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} openmpstreams
<strong><font color="#FF0000">openmpstream:</font></strong>
+@cd src/benchmarks/streams; ${OMAKE_SELF} PATH=<font color="#666666">"${PETSC_DIR}/${PETSC_ARCH}/lib:${PATH}"</font> PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} openmpstream
<font color="#A020F0"># for legacy reasons</font>
<strong><font color="#FF0000">stream:</font></strong> mpistream
<strong><font color="#FF0000">streams:</font></strong> mpistreams
<font color="#A020F0"># ------------------------------------------------------------------</font>
<font color="#A020F0">#</font>
<font color="#A020F0"># All remaining actions are intended for PETSc developers only.</font>
<font color="#A020F0"># PETSc users should not generally need to use these commands.</font>
<font color="#A020F0">#</font>
<font color="#A020F0"># See the users manual for how the tags files may be used from Emacs and Vi/Vim</font>
<font color="#A020F0">#</font>
<strong><font color="#FF0000">alletags:</font></strong>
-@${PYTHON} lib/petsc/bin/maint/generateetags.py
-@find config -type f -name <font color="#666666">"*.py"</font> |grep -v SCCS | xargs etags -o TAGS_PYTHON
<font color="#A020F0"># obtain gtags from https://www.gnu.org/software/global/</font>
<strong><font color="#FF0000">allgtags:</font></strong>
-@find ${PETSC_DIR}/include ${PETSC_DIR}/src -regex '\(.*makefile\|.*\.\(cc\|hh\|cpp\|cxx\|C\|hpp\|c\|h\|cu\|m\)$$\)' | grep -v ftn-auto | gtags -f -
<strong><font color="#FF0000">allfortranstubs:</font></strong>
-@${RM} -rf ${PETSC_ARCH}/include/petsc/finclude/ftn-auto<font color="#B22222">/*-tmpdir
@${PYTHON} lib/petsc/bin/maint/generatefortranstubs.py ${BFORT} ${VERBOSE}
-@${PYTHON} lib/petsc/bin/maint/generatefortranstubs.py -merge ${VERBOSE}
-@${RM} -rf ${PETSC_ARCH}/include/petsc/finclude/ftn-auto/*-tmpdir
deletefortranstubs:
-@find . -type d -name ftn-auto | xargs rm -rf
# Builds all the documentation - should be done every night
alldoc: allcite allpdf sphinx-docs-all alldoc1 alldoc2 docsetdate
# Build just citations
allcite: chk_loc deletemanualpages
-${PYTHON} lib/petsc/bin/maint/countpetsccits.py
-${OMAKE_SELF} ACTION=manualpages_buildcite tree_basic LOC=${LOC}
-@sed -e s%man+../%man+manualpages/% ${LOC}/docs/manualpages/manualpages.cit > ${LOC}/docs/manualpages/htmlmap
-@cat ${PETSC_DIR}/src/docs/mpi.www.index >> ${LOC}/docs/manualpages/htmlmap
# Build just TAO PDF manual + prerequisites
allpdf: chk_loc allcite
-cd src/docs/tao_tex/manual; ${OMAKE_SELF} manual.pdf LOC=${LOC}
# Build just manual pages + prerequisites
allmanpages: chk_loc allcite
-${OMAKE_SELF} ACTION=manualpages tree_basic LOC=${LOC}
# Build just manual examples + prerequisites
allmanexamples: chk_loc allmanpages
-${OMAKE_SELF} ACTION=manexamples tree_basic LOC=${LOC}
# Build everything that goes into 'doc' dir except html sources
alldoc1: chk_loc chk_concepts_dir allcite allmanpages allmanexamples
-${OMAKE_SELF} manimplementations LOC=${LOC}
-${PYTHON} lib/petsc/bin/maint/wwwindex.py ${PETSC_DIR} ${LOC}
-${OMAKE_SELF} ACTION=getexlist tree_basic LOC=${LOC}
-${OMAKE_SELF} ACTION=exampleconcepts tree_basic LOC=${LOC}
-${PYTHON} lib/petsc/bin/maint/helpindex.py ${PETSC_DIR} ${LOC}
# Builds .html versions of the source
# html overwrites some stuff created by update-docs - hence this is done later.
alldoc2: chk_loc allcite
-${OMAKE_SELF} ACTION=html PETSC_DIR=${PETSC_DIR} alltree LOC=${LOC}
-${PYTHON} lib/petsc/bin/maint/update-docs.py ${PETSC_DIR} ${LOC}
#
# Makes links for all manual pages in $LOC/docs/manualpages/all
allman:
@cd ${LOC}/docs/manualpages; rm -rf all ; mkdir all ; find * -type d -wholename all -prune -o -name index.html -prune -o -type f -name \*.html -exec ln -s -f ../{} all \;
DOCSETDATE_PRUNE_LIST=-o -type f -wholename share/petsc/saws/linearsolveroptions.html -prune -o -type f -wholename tutorials/HandsOnExercise.html -prune -o -type f -wholename tutorials/TAOHandsOnExercise.html -prune
# modify all generated html files and add in version number, date, canonical URL info.
docsetdate: chk_petscdir
@echo "Updating generated html files with petsc version, date, canonical URL info";\
version_release=`grep '^#define PETSC_VERSION_RELEASE ' include/petscversion.h |tr -s ' ' | cut -d ' ' -f 3`; \
version_major=`grep '^#define PETSC_VERSION_MAJOR ' include/petscversion.h |tr -s ' ' | cut -d ' ' -f 3`; \
version_minor=`grep '^#define PETSC_VERSION_MINOR ' include/petscversion.h |tr -s ' ' | cut -d ' ' -f 3`; \
version_subminor=`grep '^#define PETSC_VERSION_SUBMINOR ' include/petscversion.h |tr -s ' ' | cut -d ' ' -f 3`; \
if [ $${version_release} = 0 ]; then \
petscversion=petsc-master; \
export petscversion; \
elif [ $${version_release} = 1 ]; then \
petscversion=petsc-$${version_major}.$${version_minor}.$${version_subminor}; \
export petscversion; \
else \
echo "Unknown PETSC_VERSION_RELEASE: $${version_release}"; \
exit; \
fi; \
datestr=`git log -1 --pretty=format:%ci | cut -d ' ' -f 1`; \
export datestr; \
gitver=`git describe --match "v*"`; \
export gitver; \
find * -type d -wholename src/docs/website \
-prune -o -type d -wholename src/benchmarks/results \
-prune -o -type d -wholename config/BuildSystem/docs/website \
-prune -o -type d -wholename include/web \
-prune -o -type d -wholename 'arch-*' \
-prune -o -type d -wholename lib/petsc/bin/maint \
-prune -o -type d -wholename externalpackages \
-prune ${DOCSETDATE_PRUNE_LIST} -o -type f -name \*.html \
-exec perl -pi -e 's^(<body.*>)^$$1\n <div id=\"version\" align=right><b>$$ENV{petscversion} $$ENV{datestr}</b></div>\n <div id="bugreport" align=right><a href="mailto:petsc-maint\@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: $$ENV{petscversion} $$ENV{gitver} {} "><small>Report Typos and Errors</small></a></div>^i' {} \; \
-exec perl -pi -e 's^(<head>)^$$1 <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/{}" />^i' {} \; ; \
echo "Done fixing version number, date, canonical URL info"
# Use Sphinx to build some documentation. This uses Python's venv, which should
# behave similarly to what happens on e.g. ReadTheDocs. You may prefer to use
# your own Python environment and directly build the Sphinx docs by using
# the makefile in ${PETSC_SPHINX_ROOT}, paying attention to the requirements.txt
# there.
PETSC_SPHINX_ROOT=src/docs/sphinx_docs
PETSC_SPHINX_ENV=${PETSC_ARCH}/sphinx_docs_env
PETSC_SPHINX_DEST=docs/sphinx_docs
sphinx-docs-all: sphinx-docs-manual sphinx-docs-html
sphinx-docs-html: chk_loc allcite sphinx-docs-env
@. ${PETSC_SPHINX_ENV}/bin/activate && ${OMAKE} -C ${PETSC_SPHINX_ROOT} \
BUILDDIR=${LOC}/${PETSC_SPHINX_DEST} html
sphinx-docs-manual: chk_loc sphinx-docs-env
@. ${PETSC_SPHINX_ENV}/bin/activate && ${OMAKE} -C ${PETSC_SPHINX_ROOT} \
BUILDDIR=${LOC}/${PETSC_SPHINX_DEST} latexpdf
@mv ${LOC}/${PETSC_SPHINX_DEST}/latex/manual.pdf ${LOC}/docs/manual.pdf
@${RM} -rf ${LOC}/${PETSC_SPHINX_DEST}/latex
sphinx-docs-env: sphinx-docs-check-python sphinx-docs-check-rsvg-convert
@if [ ! -d "${PETSC_SPHINX_ENV}" ]; then \
${PYTHON} -m venv ${PETSC_SPHINX_ENV}; \
. ${PETSC_SPHINX_ENV}/bin/activate; \
pip install -r ${PETSC_SPHINX_ROOT}/requirements.txt; \
fi
sphinx-docs-check-rsvg-convert:
@if ! command -v rsvg-convert 2>&1 > /dev/null; then \
printf "rsvg-convert is required for the sphinxcontrib-svg2pdfconverter extension for the Sphinx docs\n"; \
false; \
fi
sphinx-docs-check-python:
@${PYTHON} -c 'import sys; sys.exit(sys.version_info[:2] < (3,3))' || \
(printf 'Working Python 3.3 or later is required to build the Sphinx docs in a virtual environment\nTry e.g.\n make ... PYTHON=python3\n' && false)
sphinx-docs-clean: chk_loc
${RM} -rf ${PETSC_SPHINX_ENV}
${RM} -rf ${LOC}/${PETSC_SPHINX_DEST}
alldocclean: deletemanualpages allcleanhtml sphinx-docs-clean
# Deletes man pages (HTML version)
deletemanualpages: chk_loc
-@if [ -d ${LOC} -a -d ${LOC}/docs/manualpages ]; then \
find ${LOC}/docs/manualpages -type f -name "*.html" -exec ${RM} {} \; ;\
${RM} ${LOC}/docs/exampleconcepts ;\
${RM} ${LOC}/docs/manualpages/manualpages.cit ;\
${PYTHON} lib/petsc/bin/maint/update-docs.py ${PETSC_DIR} ${LOC} clean;\
fi
allcleanhtml:
-${OMAKE_SELF} ACTION=cleanhtml PETSC_DIR=${PETSC_DIR} alltree
chk_concepts_dir: chk_loc
@if [ ! -d "${LOC}/docs/manualpages/concepts" ]; then \
echo Making directory ${LOC}/docs/manualpages/concepts for library; ${MKDIR} ${LOC}/docs/manualpages/concepts; fi
# Builds simple html versions of the source without links into the $PETSC_ARCH/obj directory, used by make mergecov
srchtml:
-${OMAKE_SELF} ACTION=simplehtml PETSC_DIR=${PETSC_DIR} alltree_src
###########################################################
# targets to build distribution and update docs
###########################################################
# Creates ${HOME}/petsc.tar.gz [and petsc-lite.tar.gz]
dist:
${PETSC_DIR}/lib/petsc/bin/maint/builddist ${PETSC_DIR} master
# This target works only if you can do 'ssh petsc@login.mcs.anl.gov'
# also copy the file over to ftp site.
web-snapshot:
@if [ ! -f "${HOME}/petsc-master.tar.gz" ]; then \
echo "~/petsc-master.tar.gz missing! cannot update petsc-master snapshot on mcs-web-site"; \
else \
echo "updating petsc-master snapshot on mcs-web-site"; \
tmpdir=`mktemp -d -t petsc-doc.XXXXXXXX`; \
cd $${tmpdir}; tar -xzf ${HOME}/petsc-master.tar.gz; \
/usr/bin/rsync -e ssh -az --delete $${tmpdir}/petsc-master/ \
petsc@login.mcs.anl.gov:/mcs/web/research/projects/petsc/petsc-master ;\
/bin/cp -f /home/petsc/petsc-master.tar.gz /mcs/ftp/pub/petsc/petsc-master.tar.gz;\
${RM} -rf $${tmpdir} ;\
fi
# build the tarfile - and then update petsc-master snapshot on mcs-web-site
update-web-snapshot: dist web-snapshot
# This target updates website main pages
update-web:
@cd ${PETSC_DIR}/src/docs; make PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} bib2html; \
/usr/bin/rsync -az -C --exclude=documentation/index.html \
--exclude=documentation/installation.html --exclude=download/index.html \
${PETSC_DIR}/src/docs/website/ petsc@login.mcs.anl.gov:/mcs/web/research/projects/petsc
@cd ${PETSC_DIR}/src/docs/tex; /usr/bin/rsync -az petscapp.bib petsc.bib petsc@login.mcs.anl.gov:/mcs/web/research/projects/petsc/publications
###########################################################
#
# See script for details
#
gcov:
@$(PYTHON) ${PETSC_DIR}/lib/petsc/bin/maint/gcov.py --run_gcov --petsc_arch ${PETSC_ARCH}
mergegcov:
@$(PYTHON) ${PETSC_DIR}/lib/petsc/bin/maint/gcov.py --merge_gcov --petsc_arch ${PETSC_ARCH} --merge_branch `lib/petsc/bin/maint/check-merge-branch.sh`
########################
#
# Create the include dependency graph (requires graphviz to be available)
#
includegraph:
-@${PETSC_DIR}/src/contrib/style/include-graph.sh includegraph.pdf
-@echo Include dependency graph written to includegraph.pdf
#
# -------------------------------------------------------------------------------
#
# Some macros to check if the fortran interface is up-to-date.
#
countfortranfunctions:
-@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \
cut -d'(' -f1 | tr -s ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \
sed "s/_$$//" | sort > /tmp/countfortranfunctions
countcfunctions:
-@grep PETSC_EXTERN ${PETSC_DIR}/include/*.h | grep "(" | tr -s ' ' | \
cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' | \
tr 'A-Z' 'a-z' | sort | uniq > /tmp/countcfunctions
difffortranfunctions: countfortranfunctions countcfunctions
-@echo -------------- Functions missing in the fortran interface ---------------------
-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2
-@echo ----------------- Functions missing in the C interface ------------------------
-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2
-@${RM} /tmp/countcfunctions /tmp/countfortranfunctions
checkbadfortranstubs:
-@echo "========================================="
-@echo "Functions with <a href="ROOT/docs/manualpages/Sys/MPI_Comm.html#MPI_Comm">MPI_Comm</a> as an Argument"
-@echo "========================================="
-@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep '<a href="ROOT/docs/manualpages/Sys/MPI_Comm.html#MPI_Comm">MPI_Comm</a>' | \
tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3
-@echo "========================================="
-@echo "Functions with a String as an Argument"
-@echo "========================================="
-@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \
tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3
-@echo "========================================="
-@echo "Functions with Pointers to PETSc Objects as Argument"
-@echo "========================================="
-@cd ${PETSC_DIR}/src/fortran/auto; \
_p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \
cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \
sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \
for OBJ in $$_p_OBJ; do \
grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \
cut -d'(' -f1 | cut -d' ' -f1,3; \
done
checkpackagetests:
-@echo "Missing package tests"
-@cat config/examples/*.py > configexamples; pushd config/BuildSystem/config/packages/; packages=`ls *.py | sed "s/\\.py//g"`;popd; for i in $${packages}; do j=`echo $${i} | tr '[:upper:]' '[:lower:]'`; printf $${j} ; egrep "(with-$${j}|download-$${j})" configexamples | grep -v "=0" | wc -l ; done
-@echo "Missing download package tests"
-@cat config/examples/*.py > configexamples; pushd config/BuildSystem/config/packages/; packages=`grep -l "download " *.py | sed "s/\\.py//g"`;popd; for i in $${packages}; do j=`echo $${i} | tr '[:upper:]' '[:lower:]'`; printf $${j} ; egrep "(download-$${j})" configexamples | grep -v "=0" | wc -l ; done
.PHONY: info info_h all deletelibs allclean update \
alletags etags etags_complete etags_noexamples etags_makefiles etags_examples etags_fexamples alldoc allmanualpages \
allhtml allcleanhtml countfortranfunctions \
start_configure configure_petsc configure_clean matlabbin install
</pre>
</body>
</html>
|