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