1# $Id: makefile,v 1.237 1998/04/24 20:00:01 balay Exp balay $ 2# 3# This is the makefile for installing PETSc. See the file 4# Installation 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,f90 libraries 16# fortran : builds the fortran libary 17# f90 : builds the fortran and the f90 libraries. 18# 19all : info chkpetsc_dir deletelibs build_kernels build_c \ 20 shared build_fortran build_fortran90 21fortran : info chkpetsc_dir build_fortran 22fortran90 : fortran build_fortran90 23 24# 25# Prints information about the system and PETSc being compiled 26# 27info: 28 -@echo "==========================================" 29 -@echo On `date` on `hostname` 30 -@echo Machine characteristics: `uname -a` 31 -@echo "-----------------------------------------" 32 -@echo "Using C compiler: ${CC} ${COPTFLAGS}" 33 -@if [ -n "${CCV}" -a "${CCV}" != "unknown" ] ; then \ 34 echo "Compiler version:" `${CCV}` ; fi 35 -@echo "Using Fortran compiler: ${FC} ${FFLAGS} ${FOPTFLAGS}" 36 -@echo "-----------------------------------------" 37 -@grep PETSC_VERSION_NUMBER include/petsc.h | sed "s/........//" 38 -@echo "-----------------------------------------" 39 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 40 -@echo "-----------------------------------------" 41 -@echo "Using configuration flags:" 42 -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 43 -@echo "-----------------------------------------" 44 -@echo "Using include paths: ${PETSC_INCLUDE}" 45 -@echo "-----------------------------------------" 46 -@echo "Using PETSc directory: ${PETSC_DIR}" 47 -@echo "Using PETSc arch: ${PETSC_ARCH}" 48 -@echo "------------------------------------------" 49 -@echo "Using C linker: ${CLINKER}" 50 -@echo "Using libraries: ${PETSC_LIB}" 51 -@echo "Using Fortran linker: ${FLINKER}" 52 -@echo "Using Fortran libraries: ${PETSC_FORTRAN_LIB}" 53 -@echo "==========================================" 54 55# 56# Build the PETSc libraries 57# 58build_c: 59 -@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" 60 -@echo "=========================================" 61 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 62 ACTION=libfast tree 63 -@cd ${PETSC_DIR}/src/sys/src ; \ 64 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} rs6000_time 65 ${RANLIB} ${PDIR}/*.a 66 -@chmod g+w ${PDIR}/*.a 67 -@echo "Completed building libraries" 68 -@echo "=========================================" 69 70# 71# Builds PETSc Fortran interface libary 72# Note: libfast cannot run on .F files on certain machines, so we 73# use lib and check for errors here. 74 75build_fortran: 76 -@echo "BEGINNING TO COMPILE FORTRAN INTERFACE LIBRARY" 77 -@echo "=========================================" 78 -${RM} -f ${PDIR}/libpetscfortran.* 79 -@cd src/fortran/auto; \ 80 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libfast 81 -@cd src/fortran/custom; \ 82 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 83 grep -v clog trashz | grep -v "information sections" | \ 84 egrep -i '(Error|warning|Can)' >> /dev/null;\ 85 if [ "$$?" != 1 ]; then \ 86 cat trashz ; fi; ${RM} trashz 87 ${RANLIB} ${PDIR}/libpetscfortran.a 88 -@chmod g+w ${PDIR}/*.a 89 -@echo "Completed compiling Fortran interface library" 90 -@echo "=========================================" 91 92# 93# Builds PETSc Fortran90 interface libary 94# Note: F90 interface currently supported in NAG, IRIX, IBM F90 compilers. 95# 96build_fortran90: 97 -@echo "BEGINNING TO COMPILE FORTRAN90 INTERFACE LIBRARY" 98 -@echo "=========================================" 99 -@cd src/fortran/f90; \ 100 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 101 grep -v clog trashz | grep -v "information sections" | \ 102 egrep -i '(Error|warning|Can)' >> /dev/null;\ 103 if [ "$$?" != 1 ]; then \ 104 cat trashz ; fi; ${RM} trashz 105 ${RANLIB} ${PDIR}/libpetscfortran.a 106 -@chmod g+w ${PDIR}/*.a 107 -@echo "Completed compiling Fortran90 interface library" 108 -@echo "=========================================" 109 110# 111# Builds PETSc Fortran kernels; some numerical kernels have 112# a Fortran version that may give better performance on certain 113# machines. These always provide better performance for complex numbers. 114# 115fortrankernels: chkpetsc_dir 116 -${RM} -f ${PDIR}/libpetsckernels.* 117 -@echo "BEGINNING TO COMPILE FORTRAN KERNELS LIBRARY" 118 -@echo "=========================================" 119 -@cd src/fortran/kernels; \ 120 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib 121 -@chmod g+w ${PDIR}/*.a 122 -@echo "Completed compiling Fortran kernels library" 123 -@echo "=========================================" 124 125# If fortrankernels are used, build them. 126build_kernels: 127 -@kernel_var=`echo "${PETSCFLAGS}" | sed 's/-DUSE_FORTRAN_KERNELS//g'`; \ 128 if [ "${PETSCFLAGS}" != "$$kernel_var" ] ; then \ 129 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} fortrankernels; fi 130 131petscblas: info chkpetsc_dir 132 -${RM} -f ${PDIR}/libpetscblas.* 133 -@echo "BEGINNING TO COMPILE C VERSION OF BLAS AND LAPACK" 134 -@echo "=========================================" 135 -@cd src/adic/blas; \ 136 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libfast 137 -@cd src/adic/lapack; \ 138 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree 139 ${RANLIB} ${PDIR}/libpetscblas.a 140 -@chmod g+w ${PDIR}/*.a 141 -@echo "Completed compiling C version of BLAS and LAPACK" 142 -@echo "=========================================" 143 144 145# Builds PETSc test examples for a given BOPT and architecture 146testexamples: info chkopts 147 -@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES" 148 -@echo "Due to different numerical round-off on certain" 149 -@echo "machines some of the numbers may not match exactly." 150 -@echo "=========================================" 151 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 152 ACTION=testexamples_1 tree 153 -@echo "Completed compiling and running test examples" 154 -@echo "=========================================" 155 156# Builds PETSc test examples for a given BOPT and architecture 157testfortran: info chkopts 158 -@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES" 159 -@echo "=========================================" 160 -@echo "Due to different numerical round-off on certain" 161 -@echo "machines or the way Fortran formats numbers" 162 -@echo "some of the results may not match exactly." 163 -@echo "=========================================" 164 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 165 ACTION=testexamples_3 tree 166 -@echo "Completed compiling and running Fortran test examples" 167 -@echo "=========================================" 168 169# Builds PETSc test examples for a given BOPT and architecture 170testexamples_uni: info chkopts 171 -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES" 172 -@echo "Due to different numerical round-off on certain" 173 -@echo "machines some of the numbers may not match exactly." 174 -@echo "=========================================" 175 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 176 ACTION=testexamples_4 tree 177 -@echo "Completed compiling and running uniprocessor test examples" 178 -@echo "=========================================" 179testfortran_uni: info chkopts 180 -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN EXAMPLES" 181 -@echo "Due to different numerical round-off on certain" 182 -@echo "machines some of the numbers may not match exactly." 183 -@echo "=========================================" 184 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} \ 185 ACTION=testexamples_9 tree 186 -@echo "Completed compiling and running uniprocessor fortran test examples" 187 -@echo "=========================================" 188 189# Ranlib on the libraries 190ranlib: 191 ${RANLIB} ${PDIR}/*.a 192 193# Deletes PETSc libraries 194deletelibs: chkopts_basic 195 -${RM} -f ${PDIR}/* 196 197 198# ------------------------------------------------------------------ 199# 200# All remaining actions are intended for PETSc developers only. 201# PETSc users should not generally need to use these commands. 202# 203 204 205# To access the tags in EMACS, type M-x visit-tags-table and specify 206# the file petsc/TAGS. 207# 1) To move to where a PETSc function is defined, enter M-. and the 208# function name. 209# 2) To search for a string and move to the first occurrence, 210# use M-x tags-search and the string. 211# To locate later occurrences, use M-, 212 213TAGS_INCLUDE_FILES = include/*.h include/pinclude/*.h bmake/*/petscconf.h \ 214 include/finclude/*.h 215TAGS_BMAKE_FILES = bmake/common bmake/*/base* 216TAGS_EXAMPLE_FILES = src/*/examples/*/*.[c,h,F,f] src/*/examples/*/*/*.[c,h,F,f] \ 217 src/benchmarks/*.c src/contrib/*/examples/*/*.[c,h,F,f]\ 218 src/fortran/f90/tests/*.[c,h,F,f] 219TAGS_FEXAMPLE_FILES = src/*/examples/*/*.[F,f] src/*/examples/*/*/*.[F,f] \ 220 src/contrib/*/examples/*/*.[F,f]\ 221 src/fortran/f90/tests/*.[F,f] 222TAGS_DOC_FILES = docs/tex/manual/routin.tex docs/tex/manual/manual.tex \ 223 docs/tex/manual/manual_tex.tex docs/tex/manual/intro.tex \ 224 docs/tex/manual/part1.tex docs/tex/manual/part2.tex 225TAGS_SRC_FILES = src/*/*.[c,h] src/*/interface/*.[c,h] src/*/src/*.[c,h] \ 226 src/*/utils/*.[c,h] \ 227 src/*/impls/*.[c,h] src/*/impls/*/*.[c,h] src/*/impls/*/*/*.[c,h] \ 228 src/snes/interface/noise/*.[c,F,h] src/gvec/impls/*/*/*/*/*.[c,h] \ 229 src/contrib/*/*.[c,h] \ 230 src/contrib/*/src/*.[c,h] src/fortran/custom/*.[c,h,F] \ 231 src/fortran/kernels/*.[c,h,F] \ 232 src/fortran/f90/*.[c,h,F] src/fortran/f90/*/*.[c,h,F] \ 233 src/adic/blas/*.c src/lapack/src[1,2,3]/*.c 234TAGS_MAKEFILE_FILES = include/makefile include/*/makefile \ 235 makefile \ 236 src/makefile src/*/makefile src/*/src/makefile \ 237 src/*/interface/makefile \ 238 src/*/utils/makefile \ 239 src/*/impls/makefile src/*/impls/*/makefile src/*/impls/*/*/makefile \ 240 src/snes/interface/noise/makefile src/*/examples/makefile \ 241 src/*/examples/*/makefile src/*/examples/*/*/makefile \ 242 src/gvec/impls/*/*/*/*/makefile src/gvec/impls/*/*/*/makefile \ 243 src/fortran/*/makefile src/fortran/f90/*/makefile \ 244 src/contrib/*/makefile src/contrib/*/src/makefile \ 245 src/contrib/*/examples/makefile src/contrib/*/examples/*/makefile \ 246 src/contrib/sif/*/makefile docs/makefile src/adic/*/makefile \ 247 src/adic/lapack/*/makefile 248 249# Builds all etags files 250alletags: 251 -make etags_complete 252 -make etags 253 -make etags_noexamples 254 -make etags_examples 255 -make etags_makefiles 256 -make ctags 257 258# Builds the basic etags file. This should be employed by most users. 259etags: 260 -${RM} TAGS 261 -etags -f TAGS ${TAGS_INCLUDE_FILES} 262 -etags -a -f TAGS ${TAGS_SRC_FILES} 263 -etags -a -f TAGS ${TAGS_EXAMPLE_FILES} 264 -etags -a -f TAGS ${TAGS_MAKEFILE_FILES} 265 -etags -a -f TAGS ${TAGS_BMAKE_FILES} 266 -chmod g+w TAGS 267 268# Builds complete etags list; only for PETSc developers. 269etags_complete: 270 -${RM} TAGS_COMPLETE 271 -etags -f TAGS_COMPLETE ${TAGS_SRC_FILES} 272 -etags -a -f TAGS_COMPLETE ${TAGS_INCLUDE_FILES} 273 -etags -a -f TAGS_COMPLETE ${TAGS_EXAMPLE_FILES} 274 -etags -a -f TAGS_COMPLETE ${TAGS_MAKEFILE_FILES} 275 -etags -a -f TAGS_COMPLETE ${TAGS_BMAKE_FILES} 276 -etags -a -f TAGS_COMPLETE ${TAGS_DOC_FILES} 277 -chmod g+w TAGS_COMPLETE 278 279# Builds the etags file that excludes the examples directories 280etags_noexamples: 281 -${RM} TAGS_NO_EXAMPLES 282 -etags -f TAGS_NO_EXAMPLES ${TAGS_SRC_FILES} 283 -etags -a -f TAGS_NO_EXAMPLES ${TAGS_INCLUDE_FILES} 284 -etags -a -f TAGS_NO_EXAMPLES ${TAGS_MAKEFILE_FILES} 285 -etags -a -f TAGS_NO_EXAMPLES ${TAGS_BMAKE_FILES} 286 -etags -a -f TAGS_NO_EXAMPLES ${TAGS_DOC_FILES} 287 -chmod g+w TAGS_NO_EXAMPLES 288 289# Builds the etags file for makefiles 290etags_makefiles: 291 -${RM} TAGS_MAKEFILES 292 -etags -f TAGS_MAKEFILES ${TAGS_MAKEFILE_FILES} 293 -etags -a -f TAGS_MAKEFILES ${TAGS_BMAKE_FILES} 294 -chmod g+w TAGS_MAKEFILES 295 296# Builds the etags file for examples 297etags_examples: 298 -${RM} TAGS_EXAMPLES 299 -etags -f TAGS_EXAMPLES ${TAGS_EXAMPLE_FILES} 300 -chmod g+w TAGS_EXAMPLES 301etags_fexamples: 302 -${RM} TAGS_FEXAMPLES 303 -etags -f TAGS_FEXAMPLES ${TAGS_FEXAMPLE_FILES} 304 -chmod g+w TAGS_FEXAMPLES 305 306# 307# To use the tags file from VI do the following: 308# 1. within vi invoke the command - :set tags=/home/bsmith/petsc/vitags 309# or add the command to your ~/.exrc file - set tags=/home/bsmith/petsc/vitags 310# 2. now to go to a tag do - :tag TAGNAME for eg - :tag MatCreate 311# 312ctags: 313 -${RM} vitags 314 -ctags -w -f vitags ${TAGS_INCLUDE_FILES} 315 -ctags -w -a -f vitags ${TAGS_SRC_FILES} 316 -ctags -w -a -f vitags ${TAGS_EXAMPLE_FILES} 317 -ctags -w -a -f vitags ${TAGS_MAKEFILE_FILES} 318 -ctags -w -a -f vitags ${TAGS_BMAKE_FILES} 319 -chmod g+w vitags 320# 321# These are here for the target allci and allco 322# 323 324DOCS = maint/addlinks maint/builddist \ 325 maint/buildlinks maint/wwwman maint/xclude maint/crontab\ 326 bmake/common bmake/*/base* maint/autoftp docs/manualpages/sec/* \ 327 include/foldinclude/generateincludes bin/petscviewinfo.text \ 328 bin/petscoptsinfo.text bmake/*/petscconf.h 329 330# Deletes man pages (HTML version) 331deletemanualpages: 332 ${RM} -f ${PETSC_DIR}/docs/manualpages/man*/* \ 333 ${PETSC_DIR}/docs/manualpages/man?.html \ 334 ${PETSC_DIR}/docs/manualpages/manualpages.cit 335 336# Deletes man pages (LaTeX version) 337deletelatexpages: 338 ${RM} -f ${PETSC_DIR}/docs/tex/rsum/*sum*.tex 339 340# Builds all versions of the man pages 341allmanpages: allmanualpages alllatexpages 342allmanualpages: deletemanualpages 343 -make ACTION=manualpages_buildcite tree 344 -cd src/fortran/custom; make manualpages_buildcite 345 -cd src/fortran/custom; make manualpages 346 -make ACTION=manualpages tree 347 -maint/wwwman ${PETSC_DIR} 348 -maint/examplesindex.tcl 349 -maint/htmlkeywords.tcl 350 -@chmod g+w docs/manualpages/man*/* 351 352alllatexpages: deletelatexpages 353 -make ACTION=latexpages tree 354 -cd src/fortran/custom; make latexpages 355 -@chmod g+w docs/tex/rsum/* 356 357# Builds Fortran stub files 358allfortranstubs: 359 -@include/foldinclude/generateincludes 360 -@${RM} -f src/fortran/auto/*.c 361 -make ACTION=fortranstubs tree 362 -@cd src/fortran/auto; ${OMAKE} -f makefile fixfortran 363 chmod g+w src/fortran/auto/*.c 364 365allci: 366 -@cd src/fortran/custom ; ${OMAKE} BOPT=${BOPT} ci 367 -@cd src/fortran/f90 ; ${OMAKE} BOPT=${BOPT} ci 368 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=ci tree 369 370allco: 371 -@cd src/fortran/custom ; ${OMAKE} BOPT=${BOPT} co 372 -@cd src/fortran/f90 ; ${OMAKE} BOPT=${BOPT} co 373 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=co tree 374 375# 376# The commands below are for generating ADIC versions of the code; 377# they are not currently used. 378# 379CFLAGS = ${CPPFLAGS} 380alladicignore: 381 -@${RM} ${PDIR}/adicignore 382 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore tree 383 384alladic: 385 -@echo "Beginning to compile ADIC source code in all directories" 386 -@echo "Using ADIC compiler: ${ADIC_CC} ${CFLAGS}" 387 -@echo "=========================================" 388 -@cd include ; \ 389 ${ADIC_CC} -s -f 1 ${CFLAGS} petsc.h 390 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 391 -@cd src/inline ; \ 392 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic 393 -@cd src/adic/blas ; \ 394 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic 395 -@cd src/adic/lapack ; \ 396 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 397 398alladiclib: 399 -@echo "Beginning to compile ADIC libraries in all directories" 400 -@echo "Using compiler: ${CC} ${COPTFLAGS}" 401 -@echo "-----------------------------------------" 402 -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 403 -@echo "-----------------------------------------" 404 -@echo "Using configuration flags:" 405 -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 406 -@echo "-----------------------------------------" 407 -@echo "Using include paths: ${PETSC_INCLUDE}" 408 -@echo "-----------------------------------------" 409 -@echo "Using PETSc directory: ${PETSC_DIR}" 410 -@echo "Using PETSc arch: ${PETSC_ARCH}" 411 -@echo "=========================================" 412 -@${RM} -f ${PDIR}/*adic.a 413 -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 414 -@cd src/adic/blas ; \ 415 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adiclib 416 -@cd src/adic/lapack ; \ 417 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 418 -@cd src/adic/src ; \ 419 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib 420 421# ------------------------------------------------------------------------------- 422# 423# Some macros to check if the fortran interface is up-to-date. 424# 425countfortranfunctions: 426 -@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 427 cut -d'(' -f1 | tr -s '' ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 428 sed "s/_$$//" | sort > /tmp/countfortranfunctions 429 430countcfunctions: 431 -@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s '' ' ' | \ 432 cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '' '\012' | \ 433 tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 434 435difffortranfunctions: countfortranfunctions countcfunctions 436 -@echo -------------- Functions missing in the fortran interface --------------------- 437 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 438 -@echo ----------------- Functions missing in the C interface ------------------------ 439 -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 440 -@${RM} /tmp/countcfunctions /tmp/countfortranfunctions 441 442checkbadfortranstubs: 443 -@echo "=========================================" 444 -@echo "Functions with MPI_Comm as an Argument" 445 -@echo "=========================================" 446 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 447 tr -s '' ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 448 -@echo "=========================================" 449 -@echo "Functions with a String as an Argument" 450 -@echo "=========================================" 451 -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 452 tr -s '' ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 453 -@echo "=========================================" 454 -@echo "Functions with Pointers to PETSc Objects as Argument" 455 -@echo "=========================================" 456 -@cd ${PETSC_DIR}/src/fortran/auto; \ 457 _p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s '' ' ' | \ 458 cut -d' ' -f 3 | tr -s '' '\012' | grep -v '{' | cut -d'*' -f1 | \ 459 sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 460 for OBJ in $$_p_OBJ; do \ 461 grep "$$OBJ \*" *.c | tr -s '' ' ' | tr -s ':' ' ' | \ 462 cut -d'(' -f1 | cut -d' ' -f1,3; \ 463 done 464# Builds noise routines (not yet publically available) 465# Note: libfast cannot run on .F files on certain machines, so we 466# use lib and check for errors here. 467noise: info chkpetsc_dir 468 -@echo "Beginning to compile noise routines" 469 -@echo "=========================================" 470 -@cd src/snes/interface/noise; \ 471 ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 472 grep -v clog trashz | grep -v "information sections" | \ 473 egrep -i '(Error|warning|Can)' >> /dev/null;\ 474 if [ "$$?" != 1 ]; then \ 475 cat trashz ; fi; ${RM} trashz 476 ${RANLIB} ${PDIR}/libpetscsnes.a 477 -@chmod g+w ${PDIR}/libpetscsnes.a 478 -@echo "Completed compiling noise routines" 479 -@echo "=========================================" 480 481