1# $Id: makefile,v 1.297 1999/12/22 06:32:59 bsmith Exp bsmith $ 2# 3# This is the makefile for installing PETSc. See the file 4# docs/installation.html for directions on installing PETSc. 5# See also bmake/common for additional commands. 6# 7ALL: all 8 9DIRS = src include docs 10 11include ${PETSC_DIR}/bmake/${PETSC_ARCH}/base 12 13# 14# Basic targets to build PETSc libraries. 15# all : builds the c, fortran, and f90 libraries 16all : info info_h chkpetsc_dir deletelibs build_c build_fortran shared 17# 18# Prints information about the system and version of PETSc being compiled 19# 20info: 21 -@echo "==========================================" 22 -@echo " " 23 -@echo "See docs/troubleshooting.html and docs/bugreporting.html" 24 -@echo "for help with installation problems. Please send EVERYTHING" 25 -@echo "printed out below when reporting problems" 26 -@echo " " 27 -@echo "To subscribe to the PETSc users mailing list, send mail to " 28 -@echo "majordomo@mcs.anl.gov with the message: " 29 -@echo "subscribe petsc-users" 30 -@echo " " 31 -@echo "==========================================" 32 -@echo On `date` on `hostname` 33 -@echo Machine characteristics: `uname -a` 34 -@echo "-----------------------------------------" 35 -@echo "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS}" 36 -@if [ -n "${C_CCV}" -a "${C_CCV}" != "unknown" ] ; then \ 37 echo "C Compiler version:" ; ${C_CCV} ; fi 38 -@if [ -n "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ] ; then \ 39 echo "C++ Compiler version:" ; ${CXX_CCV} ; fi 40 -@echo "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}" 41 -@if [ -n "${C_FCV}" -a "${C_FCV}" != "unknown" ] ; then \ 42 echo "Fortran Compiler version:" ; ${C_FCV} ; fi 43 -@echo "-----------------------------------------" 44 -@grep PETSC_VERSION_NUMBER include/petsc.h | sed "s/........//" 45 -@echo "-----------------------------------------" 46 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 47 -@echo "-----------------------------------------" 48 -@echo "Using configuration flags:" 49 -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 50 -@echo "-----------------------------------------" 51 -@echo "Using include paths: ${PETSC_INCLUDE}" 52 -@echo "-----------------------------------------" 53 -@echo "Using PETSc directory: ${PETSC_DIR}" 54 -@echo "Using PETSc arch: ${PETSC_ARCH}" 55 -@echo "------------------------------------------" 56 -@echo "Using C linker: ${CLINKER}" 57 -@echo "Using Fortran linker: ${FLINKER}" 58 -@echo "Using libraries: ${PETSC_LIB}" 59 -@echo "==========================================" 60# 61# 62MINFO = ${PETSC_DIR}/bmake/${PETSC_ARCH}/petscmachineinfo.h 63info_h: 64 -@$(RM) -f MINFO 65 -@echo "static char *petscmachineinfo = \" " >> MINFO 66 -@echo "Libraries compiled on `date` on `hostname` " >> MINFO 67 -@echo Machine characteristics: `uname -a` "" >> MINFO 68 -@echo "-----------------------------------------" >> MINFO 69 -@echo "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS} " >> MINFO 70 -@if [ "${C_CCV}" -a "${C_CCV}" != "unknown" ] ; then \ 71 echo "C Compiler version:" >> MINFO ; ${C_CCV} >> MINFO 2>&1; fi 72 -@if [ "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ] ; then \ 73 echo "C++ Compiler version:" >> MINFO; ${CXX_CCV} >> MINFO 2>&1 ; fi 74 -@echo "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}" >> MINFO 75 -@if [ "${C_FCV}" -a "${C_FCV}" != "unknown" ] ; then \ 76 echo "Fortran Compiler version:" >> MINFO ; ${C_FCV} >> MINFO 2>&1 ; fi 77 -@echo "-----------------------------------------" >> MINFO 78 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" >> MINFO 79 -@echo "-----------------------------------------" >> MINFO 80 -@echo "Using configuration flags:" >> MINFO 81 -@echo "-----------------------------------------" >> MINFO 82 -@echo "Using include paths: ${PETSC_INCLUDE}" >> MINFO 83 -@echo "-----------------------------------------" >> MINFO 84 -@echo "Using PETSc directory: ${PETSC_DIR}" >> MINFO 85 -@echo "Using PETSc arch: ${PETSC_ARCH}" >> MINFO 86 -@echo "------------------------------------------" >> MINFO 87 -@echo "Using C linker: ${CLINKER}" >> MINFO 88 -@echo "Using Fortran linker: ${FLINKER}" >> MINFO 89 -@cat MINFO | sed -e 's/$$/ \\n\\/' > ${MINFO} 90 -@echo "Using libraries: ${PETSC_LIB} \"; " >> ${MINFO} 91 $(RM) MINFO 92# 93# Builds the PETSc libraries 94# This target also builds fortran77 and f90 interface 95# files. (except compiling *.F files) 96# 97build_c: 98 -@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" 99 -@echo "=========================================" 100 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree 101 -@cd ${PETSC_DIR}/src/sys/src/time ; \ 102 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} rs6000_asmtime 103 ${RANLIB} ${PDIR}/*.a 104 -@chmod g+w ${PDIR}/*.a 105 -@echo "Completed building libraries" 106 -@echo "=========================================" 107 108# 109# Builds PETSc Fortran source 110# Note: libfast cannot run on .F files on certain machines, so we 111# use libf to compile the fortran source files. 112# 113build_fortran: 114 -@echo "BEGINNING TO COMPILE FORTRAN SOURCE" 115 -@echo "=========================================" 116 -@cd src/fortran/custom; \ 117 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libf clean 118 -@cd src/fortran/kernels; \ 119 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libf clean 120 ${RANLIB} ${PDIR}/libpetscfortran.a 121 ${RANLIB} ${PDIR}/libpetsc.a 122 -@chmod g+w ${PDIR}/*.a 123 -@echo "Completed compiling Fortran source" 124 -@echo "=========================================" 125 126petscblas: info chkpetsc_dir 127 -${RM} -f ${PDIR}/libpetscblas.* 128 -@echo "BEGINNING TO COMPILE C VERSION OF BLAS AND LAPACK" 129 -@echo "=========================================" 130 -@cd src/blaslapack; \ 131 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree 132 ${RANLIB} ${PDIR}/libpetscblas.a 133 -@chmod g+w ${PDIR}/*.a 134 -@echo "Completed compiling C version of BLAS and LAPACK" 135 -@echo "=========================================" 136 137 138# Builds PETSc test examples for a given BOPT and architecture 139testexamples: info chkopts 140 -@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES" 141 -@echo "Due to different numerical round-off on certain" 142 -@echo "machines some of the numbers may not match exactly." 143 -@echo "=========================================" 144 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 145 ACTION=testexamples_1 tree 146 -@echo "Completed compiling and running test examples" 147 -@echo "=========================================" 148 149# Builds PETSc test examples for a given BOPT and architecture 150testfortran: info chkopts 151 -@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES" 152 -@echo "=========================================" 153 -@echo "Due to different numerical round-off on certain" 154 -@echo "machines or the way Fortran formats numbers" 155 -@echo "some of the results may not match exactly." 156 -@echo "=========================================" 157 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 158 ACTION=testexamples_3 tree 159 -@echo "Completed compiling and running Fortran test examples" 160 -@echo "=========================================" 161 162# Builds PETSc test examples for a given BOPT and architecture 163testexamples_uni: info chkopts 164 -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES" 165 -@echo "Due to different numerical round-off on certain" 166 -@echo "machines some of the numbers may not match exactly." 167 -@echo "=========================================" 168 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 169 ACTION=testexamples_4 tree 170 -@echo "Completed compiling and running uniprocessor test examples" 171 -@echo "=========================================" 172testfortran_uni: info chkopts 173 -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN EXAMPLES" 174 -@echo "Due to different numerical round-off on certain" 175 -@echo "machines some of the numbers may not match exactly." 176 -@echo "=========================================" 177 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 178 ACTION=testexamples_9 tree 179 -@echo "Completed compiling and running uniprocessor fortran test examples" 180 -@echo "=========================================" 181matlabcodes: 182 -@echo "BEGINNING TO COMPILE MATLAB INTERFACE" 183 -@cd src/sys/src/viewer/impls/socket/matlab; ${OMAKE} BOPT=g matlabcodes PETSC_ARCH=${PETSC_ARCH} 184 185# Ranlib on the libraries 186ranlib: 187 ${RANLIB} ${PDIR}/*.a 188 189# Deletes PETSc libraries 190deletelibs: chkopts_basic 191 -${RM} -f ${PDIR}/* 192 193 194# ------------------------------------------------------------------ 195# 196# All remaining actions are intended for PETSc developers only. 197# PETSc users should not generally need to use these commands. 198# 199 200# To access the tags in EMACS, type M-x visit-tags-table and specify 201# the file petsc/TAGS. 202# 1) To move to where a PETSc function is defined, enter M-. and the 203# function name. 204# 2) To search for a string and move to the first occurrence, 205# use M-x tags-search and the string. 206# To locate later occurrences, use M-, 207# Builds all etags files 208alletags: 209 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags 210 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_complete 211 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_noexamples 212 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_examples 213 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_makefiles 214# Builds the basic etags file. This should be employed by most users. 215etags: 216 -${RM} ${TAGSDIR}/TAGS 217 -touch ${TAGSDIR}/TAGS 218 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcec alltree 219 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourceh alltree 220 -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcef alltree 221 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesc alltree 222 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesf alltree 223 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesch alltree 224 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesfh alltree 225 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_makefile alltree 226 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS etags_bmakefiles 227 -chmod g+w TAGS 228# Builds complete etags list; only for PETSc developers. 229etags_complete: 230 -${RM} ${TAGSDIR}/TAGS_COMPLETE 231 -touch ${TAGSDIR}/TAGS_COMPLETE 232 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcec alltree 233 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourceh alltree 234 -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcef alltree 235 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesc alltree 236 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesf alltree 237 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesch alltree 238 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesfh alltree 239 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_makefile alltree 240 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE etags_bmakefiles 241 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_docs alltree 242 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_scripts alltree 243 -chmod g+w TAGS_COMPLETE 244# Builds the etags file that excludes the examples directories 245etags_noexamples: 246 -${RM} ${TAGSDIR}/TAGS_NO_EXAMPLES 247 -touch ${TAGSDIR}/TAGS_NO_EXAMPLES 248 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcec alltree 249 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourceh alltree 250 -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcef alltree 251 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_makefile alltree 252 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES etags_bmakefiles 253 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_docs alltree 254 -chmod g+w TAGS_NO_EXAMPLES 255# Builds the etags file for makefiles 256etags_makefiles: 257 -${RM} ${TAGSDIR}/TAGS_MAKEFILES 258 -touch ${TAGSDIR}/TAGS_MAKEFILES 259 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES ACTION=etags_makefile alltree 260 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES etags_bmakefiles 261 -chmod g+w TAGS_MAKEFILES 262# Builds the etags file for examples 263etags_examples: 264 -${RM} ${TAGSDIR}/TAGS_EXAMPLES 265 -touch ${TAGSDIR}/TAGS_EXAMPLES 266 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesc alltree 267 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesch alltree 268 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesf alltree 269 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 270 -chmod g+w TAGS_EXAMPLES 271etags_fexamples: 272 -${RM} ${TAGSDIR}/TAGS_FEXAMPLES 273 -touch ${TAGSDIR}/TAGS_FEXAMPLES 274 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_FEXAMPLES ACTION=etags_examplesf alltree 275 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 276 -chmod g+w TAGS_FEXAMPLES 277# 278# These are here for the target allci and allco, and etags 279# 280 281BMAKEFILES = bmake/common* bmake/*/base bmake/*/base_variables bmake/*/base.site \ 282 bmake/*/petscconf.h bmake/*/petscfix.h bmake/win32/makefile.dos bin/config/base*.in 283DOCS = bmake/readme bmake/petscconf.defs 284SCRIPTS = maint/addlinks maint/builddist maint/buildlinks maint/wwwman \ 285 maint/xclude maint/crontab \ 286 maint/autoftp include/foldinclude/generateincludes 287 288# Builds all the documentation - should be done every night 289alldoc: allmanpages 290 cd docs/tex/manual; ${OMAKE} manual.dvi manual.ps manual.html splitmanual.html 291 292# Deletes man pages (HTML version) 293deletemanualpages: 294 ${RM} -f ${PETSC_DIR}/docs/manualpages/*/*.html \ 295 ${PETSC_DIR}/docs/manualpages/manualpages.cit 296 297# Deletes man pages (LaTeX version) 298deletelatexpages: 299 ${RM} -f ${PETSC_DIR}/docs/tex/rsum/*sum*.tex 300 301# Builds all versions of the man pages 302allmanpages: allmanualpages alllatexpages 303allmanualpages: deletemanualpages 304 -${OMAKE} ACTION=manualpages_buildcite ttree 305 -${OMAKE} ACTION=manualpages ttree 306 -maint/wwwindex.py ${PETSC_DIR} 307 -maint/examplesindex.tcl 308 -maint/htmlkeywords.tcl 309 -@chmod g+w docs/manualpages/*/*.html 310 311alllatexpages: deletelatexpages 312 -${OMAKE} ACTION=latexpages ttree 313 -@chmod g+w docs/tex/rsum/* 314 315# Builds Fortran stub files 316allfortranstubs: 317 -@include/foldinclude/generateincludes 318 -@${RM} -f src/fortran/auto/*.c 319 -${OMAKE} ACTION=fortranstubs ttree 320 -@cd src/fortran/auto; ${OMAKE} -f makefile fixfortran 321 chmod g+w src/fortran/auto/*.c 322 323allci: 324 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=ci alltree 325 326allco: 327 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=co alltree 328 329# 330# The commands below are for generating ADIC versions of the code; 331# they are not currently used. 332# 333alladicignore: 334 -@${RM} ${PDIR}/adicignore 335 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore tree 336 337alladic: 338 -@echo "Beginning to compile ADIC source code in all directories" 339 -@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}" 340 -@echo "=========================================" 341 -@cd include ; \ 342 ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petsc.h 343 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 344 -@cd src/inline ; \ 345 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic 346 -@cd src/blaslapack ; \ 347 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 348 349alladiclib: 350 -@echo "Beginning to compile ADIC libraries in all directories" 351 -@echo "Using compiler: ${CC} ${COPTFLAGS}" 352 -@echo "-----------------------------------------" 353 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 354 -@echo "-----------------------------------------" 355 -@echo "Using configuration flags:" 356 -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 357 -@echo "-----------------------------------------" 358 -@echo "Using include paths: ${PETSC_INCLUDE}" 359 -@echo "-----------------------------------------" 360 -@echo "Using PETSc directory: ${PETSC_DIR}" 361 -@echo "Using PETSc arch: ${PETSC_ARCH}" 362 -@echo "=========================================" 363 -@${RM} -f ${PDIR}/*adic.a 364 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 365 -@cd src/blaslapack ; \ 366 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 367 -@cd src/adic/src ; \ 368 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib 369 370# ------------------------------------------------------------------------------- 371# 372# Some macros to check if the fortran interface is up-to-date. 373# 374countfortranfunctions: 375 -@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 376 cut -d'(' -f1 | tr -s ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 377 sed "s/_$$//" | sort > /tmp/countfortranfunctions 378 379countcfunctions: 380 -@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s ' ' | \ 381 cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' | \ 382 tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 383 384difffortranfunctions: countfortranfunctions countcfunctions 385 -@echo -------------- Functions missing in the fortran interface --------------------- 386 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 387 -@echo ----------------- Functions missing in the C interface ------------------------ 388 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 389 -@${RM} /tmp/countcfunctions /tmp/countfortranfunctions 390 391checkbadfortranstubs: 392 -@echo "=========================================" 393 -@echo "Functions with MPI_Comm as an Argument" 394 -@echo "=========================================" 395 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 396 tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 397 -@echo "=========================================" 398 -@echo "Functions with a String as an Argument" 399 -@echo "=========================================" 400 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 401 tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 402 -@echo "=========================================" 403 -@echo "Functions with Pointers to PETSc Objects as Argument" 404 -@echo "=========================================" 405 -@cd ${PETSC_DIR}/src/fortran/auto; \ 406 _p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \ 407 cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ 408 sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 409 for OBJ in $$_p_OBJ; do \ 410 grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \ 411 cut -d'(' -f1 | cut -d' ' -f1,3; \ 412 done 413# Builds noise routines (not yet publically available) 414# Note: libfast cannot run on .F files on certain machines, so we 415# use lib and check for errors here. 416noise: info chkpetsc_dir 417 -@echo "Beginning to compile noise routines" 418 -@echo "=========================================" 419 -@cd src/snes/interface/noise; \ 420 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 421 grep -v clog trashz | grep -v "information sections" | \ 422 egrep -i '(Error|warning|Can)' >> /dev/null;\ 423 if [ "$$?" != 1 ]; then \ 424 cat trashz ; fi; ${RM} trashz 425 ${RANLIB} ${PDIR}/libpetscsnes.a 426 -@chmod g+w ${PDIR}/libpetscsnes.a 427 -@echo "Completed compiling noise routines" 428 -@echo "=========================================" 429 430