1# $Id: makefile,v 1.309 2000/06/11 14:29:59 bsmith Exp balay $ 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 137# Builds PETSc test examples for a given BOPT and architecture 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} \ 144 ACTION=testexamples_1 tree 145 -@echo "Completed compiling and running test examples" 146 -@echo "=========================================" 147 148# Builds PETSc test examples for a given BOPT and architecture 149testfortran: info chkopts 150 -@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES" 151 -@echo "=========================================" 152 -@echo "Due to different numerical round-off on certain" 153 -@echo "machines or the way Fortran formats numbers" 154 -@echo "some of the results may not match exactly." 155 -@echo "=========================================" 156 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 157 ACTION=testexamples_3 tree 158 -@echo "Completed compiling and running Fortran test examples" 159 -@echo "=========================================" 160 161# Builds PETSc test examples for a given BOPT and architecture 162testexamples_uni: info chkopts 163 -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES" 164 -@echo "Due to different numerical round-off on certain" 165 -@echo "machines some of the numbers may not match exactly." 166 -@echo "=========================================" 167 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 168 ACTION=testexamples_4 tree 169 -@echo "Completed compiling and running uniprocessor test examples" 170 -@echo "=========================================" 171testfortran_uni: info chkopts 172 -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN EXAMPLES" 173 -@echo "Due to different numerical round-off on certain" 174 -@echo "machines some of the numbers may not match exactly." 175 -@echo "=========================================" 176 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 177 ACTION=testexamples_9 tree 178 -@echo "Completed compiling and running uniprocessor fortran test examples" 179 -@echo "=========================================" 180matlabcodes: 181 -@echo "BEGINNING TO COMPILE MATLAB INTERFACE" 182 -@cd src/sys/src/viewer/impls/socket/matlab; ${OMAKE} BOPT=g matlabcodes PETSC_ARCH=${PETSC_ARCH} 183 184# Ranlib on the libraries 185ranlib: 186 ${RANLIB} ${PDIR}/*.a 187 188# Deletes PETSc libraries 189deletelibs: chkopts_basic 190 -${RM} -f ${PDIR}/* 191 192 193# ------------------------------------------------------------------ 194# 195# All remaining actions are intended for PETSc developers only. 196# PETSc users should not generally need to use these commands. 197# 198 199# To access the tags in EMACS, type M-x visit-tags-table and specify 200# the file petsc/TAGS. 201# 1) To move to where a PETSc function is defined, enter M-. and the 202# function name. 203# 2) To search for a string and move to the first occurrence, 204# use M-x tags-search and the string. 205# To locate later occurrences, use M-, 206# Builds all etags files 207alletags: 208 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags 209 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_complete 210 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_noexamples 211 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_examples 212 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_makefiles 213# Builds the basic etags file. This should be employed by most users. 214etags: 215 -${RM} ${TAGSDIR}/TAGS 216 -touch ${TAGSDIR}/TAGS 217 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcec alltree 218 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourceh alltree 219 -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcef alltree 220 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesc alltree 221 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesf alltree 222 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesch alltree 223 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesfh alltree 224 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_makefile alltree 225 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS etags_bmakefiles 226 -chmod g+w TAGS 227# Builds complete etags list; only for PETSc developers. 228etags_complete: 229 -${RM} ${TAGSDIR}/TAGS_COMPLETE 230 -touch ${TAGSDIR}/TAGS_COMPLETE 231 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcec alltree 232 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourceh alltree 233 -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcef alltree 234 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesc alltree 235 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesf alltree 236 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesch alltree 237 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesfh alltree 238 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_makefile alltree 239 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE etags_bmakefiles 240 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_docs alltree 241 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_scripts alltree 242 -chmod g+w TAGS_COMPLETE 243# Builds the etags file that excludes the examples directories 244etags_noexamples: 245 -${RM} ${TAGSDIR}/TAGS_NO_EXAMPLES 246 -touch ${TAGSDIR}/TAGS_NO_EXAMPLES 247 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcec alltree 248 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourceh alltree 249 -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcef alltree 250 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_makefile alltree 251 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES etags_bmakefiles 252 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_docs alltree 253 -chmod g+w TAGS_NO_EXAMPLES 254# Builds the etags file for makefiles 255etags_makefiles: 256 -${RM} ${TAGSDIR}/TAGS_MAKEFILES 257 -touch ${TAGSDIR}/TAGS_MAKEFILES 258 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES ACTION=etags_makefile alltree 259 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES etags_bmakefiles 260 -chmod g+w TAGS_MAKEFILES 261# Builds the etags file for examples 262etags_examples: 263 -${RM} ${TAGSDIR}/TAGS_EXAMPLES 264 -touch ${TAGSDIR}/TAGS_EXAMPLES 265 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesc alltree 266 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesch alltree 267 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesf alltree 268 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 269 -chmod g+w TAGS_EXAMPLES 270etags_fexamples: 271 -${RM} ${TAGSDIR}/TAGS_FEXAMPLES 272 -touch ${TAGSDIR}/TAGS_FEXAMPLES 273 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_FEXAMPLES ACTION=etags_examplesf alltree 274 -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 275 -chmod g+w TAGS_FEXAMPLES 276# 277# These are here for the target allci and allco, and etags 278# 279 280BMAKEFILES = bmake/common* bmake/*/base bmake/*/base_variables bmake/*/base.site \ 281 bmake/*/petscconf.h bmake/*/petscfix.h bmake/win32/makefile.dos bin/config/base*.in \ 282 bmake/*/buildtest 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 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} 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