1*971c2310SBarry Smith# $Id: makefile,v 1.186 1997/09/17 04:31:45 bsmith Exp bsmith $ 211b6ed10SLois Curfman McInnes# 3cfd69a58SBarry Smith# This is the makefile for installing PETSc. See the file 4cfd69a58SBarry Smith# Installation for directions on installing PETSc. 5cfd69a58SBarry Smith# See also bmake/common for additional commands. 611b6ed10SLois Curfman McInnes# 711b6ed10SLois Curfman McInnes 8ab94cc7aSSatish BalayCFLAGS = 961523587SBarry SmithSOURCEC = 1061523587SBarry SmithSOURCEF = 115eea60f9SBarry SmithDOCS = Changes Machines Readme maint/addlinks \ 1243a90d84SBarry Smith maint/builddist FAQ Installation BugReporting\ 13deb7fc1cSBarry Smith maint/buildlinks maint/wwwman maint/xclude maint/crontab\ 14630a6785SBarry Smith bmake/common bmake/*/base* maint/autoftp docs/www/sec/* \ 15630a6785SBarry Smith include/finclude/generateincludes bin/petscviewinfo.text \ 16630a6785SBarry Smith bin/petscoptsinfo.text 1761523587SBarry SmithOBJSC = 1861523587SBarry SmithOBJSF = 1961523587SBarry SmithLIBBASE = libpetscvec 20b16a3bb1SBarry SmithDIRS = src include docs 2161523587SBarry Smith 224e627d3aSBarry Smithinclude $(PETSC_DIR)/bmake/$(PETSC_ARCH)/base 2361523587SBarry Smith 2411b6ed10SLois Curfman McInnes# Builds PETSc libraries for a given BOPT and architecture 257857610eSBarry Smithall: chkpetsc_dir 26511caf8eSSatish Balay -$(RM) -f $(PDIR)/* 270b3634f8SBarry Smith -@echo "Beginning to compile libraries in all directories" 281d91fb6eSBarry Smith -@echo On `date` on `hostname` 2930fdcc7aSBarry Smith -@echo Machine characteristics: `uname -a` 3047794344SBarry Smith -@echo "Using compiler: $(CC) $(COPTFLAGS)" 3181eac796SBarry Smith -@if [ "$(CCV)" != "unknown" ] ; then \ 32376ee591SBarry Smith echo "Compiler version:" ; \ 33376ee591SBarry Smith $(CCV) ; fi 3447794344SBarry Smith -@echo "-----------------------------------------" 35b14e8f29SBarry Smith -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 3647794344SBarry Smith -@echo "-----------------------------------------" 37b14e8f29SBarry Smith -@echo "Using configuration flags: $(CONF)" 3847794344SBarry Smith -@echo "-----------------------------------------" 39b14e8f29SBarry Smith -@echo "Using include paths: $(PETSC_INCLUDE)" 4047794344SBarry Smith -@echo "-----------------------------------------" 41c2c9bc36SBarry Smith -@echo "Using PETSc directory: $(PETSC_DIR)" 42c2c9bc36SBarry Smith -@echo "Using PETSc arch: $(PETSC_ARCH)" 4347794344SBarry Smith -@echo "=========================================" 44e35bd481SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 45f3848965SBarry Smith ACTION=libfast tree 46f88f42abSSatish Balay -@cd $(PETSC_DIR)/src/sys/src ; \ 47f88f42abSSatish Balay $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) rs6000_time 484e04c1a0SBarry Smith $(RANLIB) $(PDIR)/*.a 490be1b381SSatish Balay -@chmod g+w $(PDIR)/*.a 500b3634f8SBarry Smith -@echo "Completed building libraries" 5147794344SBarry Smith -@echo "=========================================" 520b3634f8SBarry Smith 530b3634f8SBarry Smith# Builds PETSc test examples for a given BOPT and architecture 54a9369724SSatish Balaytestexamples: chkopts 550b3634f8SBarry Smith -@echo "Beginning to compile and run test examples" 561d91fb6eSBarry Smith -@echo On `date` on `hostname` 57f9c6b2e1SBarry Smith -@echo Machine characteristics: `uname -a` 5847794344SBarry Smith -@echo "Using compiler: $(CC) $(COPTFLAGS)" 5947794344SBarry Smith -@echo "-----------------------------------------" 60b14e8f29SBarry Smith -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 6147794344SBarry Smith -@echo "-----------------------------------------" 62b14e8f29SBarry Smith -@echo "Using include paths: $(PETSC_INCLUDE)" 6347794344SBarry Smith -@echo "-----------------------------------------" 64c2c9bc36SBarry Smith -@echo "Using PETSc directory: $(PETSC_DIR)" 65c2c9bc36SBarry Smith -@echo "Using PETSc arch: $(PETSC_ARCH)" 66c2c9bc36SBarry Smith -@echo "------------------------------------------" 679c69534bSBarry Smith -@echo "Using linker: $(CLINKER)" 689c69534bSBarry Smith -@echo "Using libraries: $(PETSC_LIB)" 690b3634f8SBarry Smith -@echo "------------------------------------------" 70eb817c50SBarry Smith -@echo "Due to different numerical round-off on certain" 71eb817c50SBarry Smith -@echo "machines some of the numbers may not match exactly." 7247794344SBarry Smith -@echo "=========================================" 730b3634f8SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 740b3634f8SBarry Smith ACTION=testexamples_1 tree 750b3634f8SBarry Smith -@echo "Completed compiling and running test examples" 7647794344SBarry Smith -@echo "=========================================" 770b3634f8SBarry Smith 780b3634f8SBarry Smith# Builds PETSc test examples for a given BOPT and architecture 79a9369724SSatish Balaytestexamples_uni: chkopts 808475343bSBarry Smith -@echo "Beginning to compile and run uniprocessor test examples" 811d91fb6eSBarry Smith -@echo On `date` on `hostname` 82f4ccad53SBarry Smith -@echo Machine characteristics: `uname -a` 8347794344SBarry Smith -@echo "Using compiler: $(CC) $(COPTFLAGS)" 848475343bSBarry Smith -@echo "Using linker: $(CLINKER)" 8547794344SBarry Smith -@echo "------------------------------------------" 86b14e8f29SBarry Smith -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 8747794344SBarry Smith -@echo "------------------------------------------" 88b14e8f29SBarry Smith -@echo "Using include paths: $(PETSC_INCLUDE)" 8947794344SBarry Smith -@echo "------------------------------------------" 90d6db1478SLois Curfman McInnes -@echo "Using PETSc directory: $(PETSC_DIR)" 91d6db1478SLois Curfman McInnes -@echo "Using PETSc arch: $(PETSC_ARCH)" 92d6db1478SLois Curfman McInnes -@echo "------------------------------------------" 93d6db1478SLois Curfman McInnes -@echo "Using linker: $(CLINKER)" 948475343bSBarry Smith -@echo "Using libraries: $(PETSC_LIB)" 958475343bSBarry Smith -@echo "------------------------------------------" 968475343bSBarry Smith -@echo "Due to different numerical round-off on certain" 978475343bSBarry Smith -@echo "machines some of the numbers may not match exactly." 9847794344SBarry Smith -@echo "=========================================" 998475343bSBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 1008475343bSBarry Smith ACTION=testexamples_4 tree 1018475343bSBarry Smith -@echo "Completed compiling and running uniprocessor test examples" 10247794344SBarry Smith -@echo "=========================================" 1038475343bSBarry Smith 10435ca7349SBarry Smith# 10511b6ed10SLois Curfman McInnes# Builds PETSc Fortran interface libary 10611b6ed10SLois Curfman McInnes# Note: libfast cannot run on .F files on certain machines, so we 10735ca7349SBarry Smith# use lib and check for errors here. 10883f0b094SBarry Smithfortran: chkpetsc_dir 109727c161cSBarry Smith -$(RM) -f $(PDIR)/libpetscfortran.* 1100b3634f8SBarry Smith -@echo "Beginning to compile Fortran interface library" 1111d91fb6eSBarry Smith -@echo On `date` on `hostname` 112f4ccad53SBarry Smith -@echo Machine characteristics: `uname -a` 11326de76a5SSatish Balay -@echo "Using Fortran compiler: $(FC) $(FFLAGS) $(FOPTFLAGS)" 11447794344SBarry Smith -@echo "Using C/C++ compiler: $(CC) $(COPTFLAGS)" 11547794344SBarry Smith -@echo "------------------------------------------" 116fc939babSLois Curfman McInnes -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 11747794344SBarry Smith -@echo "------------------------------------------" 118fc939babSLois Curfman McInnes -@echo "Using configuration flags: $(CONF)" 11947794344SBarry Smith -@echo "------------------------------------------" 120fc939babSLois Curfman McInnes -@echo "Using include paths: $(PETSC_INCLUDE)" 12147794344SBarry Smith -@echo "------------------------------------------" 122d6db1478SLois Curfman McInnes -@echo "Using PETSc directory: $(PETSC_DIR)" 123d6db1478SLois Curfman McInnes -@echo "Using PETSc arch: $(PETSC_ARCH)" 12447794344SBarry Smith -@echo "=========================================" 125b16a3bb1SBarry Smith -@cd src/fortran/custom; \ 12635ca7349SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \ 12735ca7349SBarry Smith grep -v clog trashz | grep -v "information sections" | \ 12835ca7349SBarry Smith egrep -i '(Error|warning|Can)' >> /dev/null;\ 12935ca7349SBarry Smith if [ "$$?" != 1 ]; then \ 13035ca7349SBarry Smith cat trashz ; fi; $(RM) trashz 131b16a3bb1SBarry Smith -@cd src/fortran/auto; \ 13235ca7349SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) libfast 13383f0b094SBarry Smith $(RANLIB) $(PDIR)/libpetscfortran.a 1340be1b381SSatish Balay -@chmod g+w $(PDIR)/*.a 1350b3634f8SBarry Smith -@echo "Completed compiling Fortran interface library" 13647794344SBarry Smith -@echo "=========================================" 13783f0b094SBarry Smith 138*971c2310SBarry Smith# 139*971c2310SBarry Smith# Builds PETSc Fortran kernels; some numerical kernels have 140*971c2310SBarry Smith# a Fortran version that may give better performance on certain 141*971c2310SBarry Smith# machines. It always gives better performance for complex numbers. 142*971c2310SBarry Smithfortrankernels: chkpetsc_dir 143*971c2310SBarry Smith -$(RM) -f $(PDIR)/libpetsckernels.* 144*971c2310SBarry Smith -@echo "Beginning to compile Fortran kernels library" 145*971c2310SBarry Smith -@echo On `date` on `hostname` 146*971c2310SBarry Smith -@echo Machine characteristics: `uname -a` 147*971c2310SBarry Smith -@echo "Using Fortran compiler: $(FC) $(FFLAGS) $(FOPTFLAGS)" 148*971c2310SBarry Smith -@echo "------------------------------------------" 149*971c2310SBarry Smith -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 150*971c2310SBarry Smith -@echo "------------------------------------------" 151*971c2310SBarry Smith -@echo "Using configuration flags: $(CONF)" 152*971c2310SBarry Smith -@echo "------------------------------------------" 153*971c2310SBarry Smith -@echo "Using PETSc directory: $(PETSC_DIR)" 154*971c2310SBarry Smith -@echo "Using PETSc arch: $(PETSC_ARCH)" 155*971c2310SBarry Smith -@echo "=========================================" 156*971c2310SBarry Smith -@cd src/fortran/kernels; \ 157*971c2310SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib 158*971c2310SBarry Smith -@chmod g+w $(PDIR)/*.a 159*971c2310SBarry Smith -@echo "Completed compiling Fortran kernels library" 160*971c2310SBarry Smith -@echo "=========================================" 161*971c2310SBarry Smith 162727c161cSBarry Smith# Builds PETSc test examples for a given BOPT and architecture 163a9369724SSatish Balaytestfortran: chkopts 164727c161cSBarry Smith -@echo "Beginning to compile and run Fortran test examples" 1651d91fb6eSBarry Smith -@echo On `date` on `hostname` 166f4ccad53SBarry Smith -@echo Machine characteristics: `uname -a` 167727c161cSBarry Smith -@echo "Using compiler: $(FC) $(FFLAGS) $(FOPTFLAGS)" 168727c161cSBarry Smith -@echo "Using linker: $(FLINKER)" 169727c161cSBarry Smith -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 17047794344SBarry Smith -@echo "------------------------------------------" 171727c161cSBarry Smith -@echo "Using PETSc directory: $(PETSC_DIR)" 172727c161cSBarry Smith -@echo "Using PETSc arch: $(PETSC_ARCH)" 173727c161cSBarry Smith -@echo "------------------------------------------" 174727c161cSBarry Smith -@echo "Using linker: $(FLINKER)" 175727c161cSBarry Smith -@echo "Using libraries: $(PETSC_FORTRAN_LIB) $(PETSC_LIB)" 17647794344SBarry Smith -@echo "=========================================" 177e4ef9893SBarry Smith -@echo "Due to different numerical round-off on certain" 178e4ef9893SBarry Smith -@echo "machines or the way Fortran formats numbers" 179e4ef9893SBarry Smith -@echo "some of the results may not match exactly." 180e4ef9893SBarry Smith -@echo "=========================================" 181e4ef9893SBarry Smith -@echo "On some machines you may get messages of the form" 182e4ef9893SBarry Smith -@echo "PetscScalarAddressToFortran:C and Fortran arrays are" 183e4ef9893SBarry Smith -@echo "not commonly aligned or are too far apart to be indexed" 184e4ef9893SBarry Smith -@echo "by an integer. Locations: C xxxc Fortran xxxf" 185e4ef9893SBarry Smith -@echo "Locations/sizeof(Scalar): C yyc Fortran yyf" 186e4ef9893SBarry Smith -@echo "This indicates that you may not be able to use the" 187e4ef9893SBarry Smith -@echo "PETSc routines VecGetArray() and MatGetArray() from Fortran" 188e4ef9893SBarry Smith -@echo "=========================================" 189727c161cSBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) \ 190727c161cSBarry Smith ACTION=testexamples_3 tree 191727c161cSBarry Smith -@echo "Completed compiling and running Fortran test examples" 19247794344SBarry Smith -@echo "=========================================" 193b1f85764SBarry Smith# 194b1f85764SBarry Smith# Builds PETSc Fortran90 interface libary 195b1f85764SBarry Smith# Note: libfast cannot run on .F files on certain machines, so we 196b1f85764SBarry Smith# use lib and check for errors here. 197b1f85764SBarry Smith# Note: F90 interface currently only supported in NAG F90 compiler 198d7f8d646SSatish Balayfortran90: chkpetsc_dir fortran 199b1f85764SBarry Smith -@echo "Beginning to compile Fortran90 interface library" 2001d91fb6eSBarry Smith -@echo On `date` on `hostname` 201f4ccad53SBarry Smith -@echo Machine characteristics: `uname -a` 202b1f85764SBarry Smith -@echo "Using Fortran compiler: $(FC) $(FFLAGS) $(FOPTFLAGS)" 203b1f85764SBarry Smith -@echo "Using C/C++ compiler: $(CC) $(COPTFLAGS)" 204b1f85764SBarry Smith -@echo "------------------------------------------" 205b1f85764SBarry Smith -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 206b1f85764SBarry Smith -@echo "------------------------------------------" 207b1f85764SBarry Smith -@echo "Using configuration flags: $(CONF)" 208b1f85764SBarry Smith -@echo "------------------------------------------" 209b1f85764SBarry Smith -@echo "Using include paths: $(PETSC_INCLUDE)" 210b1f85764SBarry Smith -@echo "------------------------------------------" 211b1f85764SBarry Smith -@echo "Using PETSc directory: $(PETSC_DIR)" 212b1f85764SBarry Smith -@echo "Using PETSc arch: $(PETSC_ARCH)" 213b1f85764SBarry Smith -@echo "=========================================" 214b1f85764SBarry Smith -@cd src/fortran/f90; \ 215b1f85764SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \ 216b1f85764SBarry Smith grep -v clog trashz | grep -v "information sections" | \ 217b1f85764SBarry Smith egrep -i '(Error|warning|Can)' >> /dev/null;\ 218b1f85764SBarry Smith if [ "$$?" != 1 ]; then \ 219b1f85764SBarry Smith cat trashz ; fi; $(RM) trashz 220b1f85764SBarry Smith $(RANLIB) $(PDIR)/libpetscfortran.a 2210be1b381SSatish Balay -@chmod g+w $(PDIR)/*.a 222b1f85764SBarry Smith -@echo "Completed compiling Fortran90 interface library" 223b1f85764SBarry Smith -@echo "=========================================" 224b1f85764SBarry Smith 225ad96cc0dSLois Curfman McInnes# Builds noise routines (not yet publically available) 226ad96cc0dSLois Curfman McInnes# Note: libfast cannot run on .F files on certain machines, so we 227ad96cc0dSLois Curfman McInnes# use lib and check for errors here. 228ad96cc0dSLois Curfman McInnesnoise: chkpetsc_dir 229ad96cc0dSLois Curfman McInnes -@echo "Beginning to compile noise routines" 230ad96cc0dSLois Curfman McInnes -@echo "Using Fortran compiler: $(FC) $(FFLAGS) $(FOPTFLAGS)" 231ad96cc0dSLois Curfman McInnes -@echo "Using C/C++ compiler: $(CC) $(COPTFLAGS)" 232ad96cc0dSLois Curfman McInnes -@echo "------------------------------------------" 233ad96cc0dSLois Curfman McInnes -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 234ad96cc0dSLois Curfman McInnes -@echo "------------------------------------------" 235ad96cc0dSLois Curfman McInnes -@echo "Using configuration flags: $(CONF)" 236ad96cc0dSLois Curfman McInnes -@echo "------------------------------------------" 237ad96cc0dSLois Curfman McInnes -@echo "Using include paths: $(PETSC_INCLUDE)" 238ad96cc0dSLois Curfman McInnes -@echo "------------------------------------------" 239ad96cc0dSLois Curfman McInnes -@echo "Using PETSc directory: $(PETSC_DIR)" 240ad96cc0dSLois Curfman McInnes -@echo "Using PETSc arch: $(PETSC_ARCH)" 241ad96cc0dSLois Curfman McInnes -@echo "=========================================" 242ad96cc0dSLois Curfman McInnes -@cd src/snes/interface/noise; \ 243ad96cc0dSLois Curfman McInnes $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib > trashz 2>&1; \ 244ad96cc0dSLois Curfman McInnes grep -v clog trashz | grep -v "information sections" | \ 245ad96cc0dSLois Curfman McInnes egrep -i '(Error|warning|Can)' >> /dev/null;\ 246ad96cc0dSLois Curfman McInnes if [ "$$?" != 1 ]; then \ 247ad96cc0dSLois Curfman McInnes cat trashz ; fi; $(RM) trashz 248ad96cc0dSLois Curfman McInnes $(RANLIB) $(PDIR)/libpetscsnes.a 249ad96cc0dSLois Curfman McInnes -@chmod g+w $(PDIR)/libpetscsnes.a 250ad96cc0dSLois Curfman McInnes -@echo "Completed compiling noise routines" 251ad96cc0dSLois Curfman McInnes -@echo "=========================================" 252ad96cc0dSLois Curfman McInnes 25366341c5dSSatish Balaypetscblas: chkpetsc_dir 25466341c5dSSatish Balay -$(RM) -f $(PDIR)/libpetscblas.* 255229e8d5cSBarry Smith -@echo "Beginning to compile C version of BLAS and LAPACK" 25666341c5dSSatish Balay -@echo On `date` on `hostname` 257f4ccad53SBarry Smith -@echo Machine characteristics: `uname -a` 25866341c5dSSatish Balay -@echo "Using C/C++ compiler: $(CC) $(COPTFLAGS)" 25966341c5dSSatish Balay -@echo "------------------------------------------" 26066341c5dSSatish Balay -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 26166341c5dSSatish Balay -@echo "------------------------------------------" 26266341c5dSSatish Balay -@echo "Using configuration flags: $(CONF)" 26366341c5dSSatish Balay -@echo "------------------------------------------" 26466341c5dSSatish Balay -@echo "Using include paths: $(PETSC_INCLUDE)" 26566341c5dSSatish Balay -@echo "------------------------------------------" 26666341c5dSSatish Balay -@echo "Using PETSc directory: $(PETSC_DIR)" 26766341c5dSSatish Balay -@echo "Using PETSc arch: $(PETSC_ARCH)" 26866341c5dSSatish Balay -@echo "=========================================" 26966341c5dSSatish Balay -@cd src/adic/blas; \ 27066341c5dSSatish Balay $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) libfast 27166341c5dSSatish Balay -@cd src/adic/lapack; \ 27266341c5dSSatish Balay $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=libfast tree 27366341c5dSSatish Balay $(RANLIB) $(PDIR)/libpetscblas.a 27466341c5dSSatish Balay -@chmod g+w $(PDIR)/*.a 275229e8d5cSBarry Smith -@echo "Completed compiling C version of BLAS and LAPACK" 27666341c5dSSatish Balay -@echo "=========================================" 27766341c5dSSatish Balay 278ad96cc0dSLois Curfman McInnes 2798c37ef55SBarry Smithranlib: 2804e04c1a0SBarry Smith $(RANLIB) $(PDIR)/*.a 28161523587SBarry Smith 28211b6ed10SLois Curfman McInnes# Deletes PETSc libraries 28361523587SBarry Smithdeletelibs: 2844e04c1a0SBarry Smith -$(RM) -f $(PDIR)/*.a $(PDIR)/complex/* $(PDIR)/c++/* 285d44968ceSBarry Smith 28611b6ed10SLois Curfman McInnes# Deletes man pages (HTML version) 287b346654fSBarry Smithdeletewwwpages: 288dea827f2SLois Curfman McInnes $(RM) -f $(PETSC_DIR)/docs/www/man*/* $(PETSC_DIR)/docs/www/www.cit \ 289dea827f2SLois Curfman McInnes $(PETSC_DIR)/docs/www/man*.html 290b346654fSBarry Smith 29111b6ed10SLois Curfman McInnes# Deletes man pages (LaTeX version) 292b346654fSBarry Smithdeletelatexpages: 2937857610eSBarry Smith $(RM) -f $(PETSC_DIR)/docs/tex/rsum/*sum*.tex 29420563c6bSBarry Smith 2957acb7333SLois Curfman McInnes# To access the tags in emacs, type M-x visit-tags-table and specify 2967acb7333SLois Curfman McInnes# the file petsc/TAGS. Then, to move to where a PETSc function is 2977acb7333SLois Curfman McInnes# defined, enter M-. and the function name. To search for a string 2987acb7333SLois Curfman McInnes# and move to the first occurrence, use M-x tags-search and the string. 2997acb7333SLois Curfman McInnes# To locate later occurrences, use M-, 3007acb7333SLois Curfman McInnes 301b38bb785SSatish BalayTAGS_INCLUDE_FILES = include/*.h include/pinclude/*.h include/FINCLUDE/*.h 302b38bb785SSatish BalayTAGS_BMAKE_FILES = bmake/common bmake/*/base* 303b38bb785SSatish BalayTAGS_EXAMPLE_FILES = src/*/examples/*/*.[c,h,F,f] src/*/examples/*/*/*.[c,h,F,f] \ 304b38bb785SSatish Balay src/benchmarks/*.c src/contrib/*/examples/*/*.[c,h,F,f] 305b38bb785SSatish BalayTAGS_DOC_FILES = docs/tex/manual/routin.tex docs/tex/manual/manual.tex \ 306b38bb785SSatish Balay docs/tex/manual/manual_tex.tex docs/tex/manual/intro.tex \ 307b38bb785SSatish Balay docs/tex/manual/part1.tex docs/tex/manual/part2.tex 3084431cf12SSatish BalayTAGS_SRC_FILES = src/*/*.[c,h] src/*/interface/*.[c,h] src/*/src/*.[c,h] \ 309b38bb785SSatish Balay src/*/utils/*.[c,h] \ 310b38bb785SSatish Balay src/*/impls/*.[c,h] src/*/impls/*/*.[c,h] src/*/impls/*/*/*.[c,h] \ 311b334301eSBarry Smith src/gvec/impls/*/*/*/*/*.[c,h] src/contrib/*/*.[c,h] \ 312b334301eSBarry Smith src/contrib/*/src/*.[c,h] src/fortran/custom/*.[c,h,F] 313b38bb785SSatish BalayTAGS_MAKEFILE_FILES = include/makefile include/*/makefile \ 314b38bb785SSatish Balay makefile \ 315b38bb785SSatish Balay src/makefile src/*/makefile src/*/src/makefile \ 316b38bb785SSatish Balay src/*/interface/makefile \ 317b38bb785SSatish Balay src/*/utils/makefile \ 318b38bb785SSatish Balay src/*/impls/makefile src/*/impls/*/makefile src/*/impls/*/*/makefile \ 319b38bb785SSatish Balay src/*/examples/makefile src/*/examples/*/makefile src/*/examples/*/*/makefile \ 320b38bb785SSatish Balay src/gvec/impls/*/*/*/*/makefile src/gvec/impls/*/*/*/makefile \ 321b38bb785SSatish Balay src/fortran/*/makefile \ 322b38bb785SSatish Balay src/contrib/*/makefile src/contrib/*/src/makefile \ 323b38bb785SSatish Balay src/contrib/*/examples/makefile src/contrib/*/examples/*/makefile \ 324b38bb785SSatish Balay docs/makefile 325b38bb785SSatish Balay 32611b6ed10SLois Curfman McInnes# Builds all etags files 32711b6ed10SLois Curfman McInnesalletags: 3289ae7ee0fSLois Curfman McInnes -make etags_complete 32911b6ed10SLois Curfman McInnes -make etags 33011b6ed10SLois Curfman McInnes -make etags_noexamples 33111b6ed10SLois Curfman McInnes -make etags_makefiles 33211b6ed10SLois Curfman McInnes 33311b6ed10SLois Curfman McInnes# Builds the basic etags file. This should be employed by most users. 33420563c6bSBarry Smithetags: 335edd2f0e1SBarry Smith $(RM) TAGS 336b38bb785SSatish Balay etags -f TAGS $(TAGS_INCLUDE_FILES) 337b38bb785SSatish Balay etags -a -f TAGS $(TAGS_SRC_FILES) 338b38bb785SSatish Balay etags -a -f TAGS $(TAGS_EXAMPLE_FILES) 339b38bb785SSatish Balay etags -a -f TAGS $(TAGS_MAKEFILE_FILES) 340b38bb785SSatish Balay etags -a -f TAGS $(TAGS_BMAKE_FILES) 34128988994SBarry Smith chmod g+w TAGS 342bfce26a3SBarry Smith 34329cdf679SBarry Smith# Builds complete etags list; only for PETSc developers. 34429cdf679SBarry Smithetags_complete: 34529cdf679SBarry Smith $(RM) TAGS_COMPLETE 3469ca56a1bSSatish Balay etags -f TAGS_COMPLETE $(TAGS_SRC_FILES) 3479ca56a1bSSatish Balay etags -a -f TAGS_COMPLETE $(TAGS_INCLUDE_FILES) 348b38bb785SSatish Balay etags -a -f TAGS_COMPLETE $(TAGS_EXAMPLE_FILES) 349b38bb785SSatish Balay etags -a -f TAGS_COMPLETE $(TAGS_MAKEFILE_FILES) 350b38bb785SSatish Balay etags -a -f TAGS_COMPLETE $(TAGS_BMAKE_FILES) 351b38bb785SSatish Balay etags -a -f TAGS_COMPLETE $(TAGS_DOC_FILES) 35229cdf679SBarry Smith chmod g+w TAGS_COMPLETE 35329cdf679SBarry Smith 35411b6ed10SLois Curfman McInnes# Builds the etags file that excludes the examples directories 355bfce26a3SBarry Smithetags_noexamples: 356bfce26a3SBarry Smith $(RM) TAGS_NO_EXAMPLES 3579ca56a1bSSatish Balay etags -f TAGS_NO_EXAMPLES $(TAGS_SRC_FILES) 3589ca56a1bSSatish Balay etags -a -f TAGS_NO_EXAMPLES $(TAGS_INCLUDE_FILES) 359b38bb785SSatish Balay etags -a -f TAGS_NO_EXAMPLES $(TAGS_MAKEFILE_FILES) 360b38bb785SSatish Balay etags -a -f TAGS_NO_EXAMPLES $(TAGS_BMAKE_FILES) 361b38bb785SSatish Balay etags -a -f TAGS_NO_EXAMPLES $(TAGS_DOC_FILES) 362bfce26a3SBarry Smith chmod g+w TAGS_NO_EXAMPLES 363b16a3bb1SBarry Smith 36411b6ed10SLois Curfman McInnes# Builds the etags file for makefiles 365b16a3bb1SBarry Smithetags_makefiles: 366b16a3bb1SBarry Smith $(RM) TAGS_MAKEFILES 367b38bb785SSatish Balay etags -f TAGS_MAKEFILES $(TAGS_MAKEFILE_FILES) 368b38bb785SSatish Balay etags -a -f TAGS_MAKEFILES $(TAGS_BMAKE_FILES) 369b16a3bb1SBarry Smith chmod g+w TAGS_MAKEFILES 37011b6ed10SLois Curfman McInnes 371b38bb785SSatish Balay# 372b38bb785SSatish Balay# ctags builds the tags file required for VI. 373b38bb785SSatish Balay# To use the tags file do the following: 374b38bb785SSatish Balay# 1. within vi invole the command - :set tags=/home/bsmith/petsc/tags 375b38bb785SSatish Balay# or add the command to your ~/.exrc file - set tags=/home/bsmith/petsc/tags 376b38bb785SSatish Balay# 2. now to go to a tag do - :tag TAGNAME for eg - :tag MatCreate 377b38bb785SSatish Balay# 378b38bb785SSatish Balayctags: 379b38bb785SSatish Balay $(RM) tags 380b8319b70SSatish Balay ctags -w -f tags $(TAGS_INCLUDE_FILES) 381b8319b70SSatish Balay ctags -w -a -f tags $(TAGS_SRC_FILES) 382b38bb785SSatish Balay ctags -w -a -f tags $(TAGS_EXAMPLE_FILES) 383b38bb785SSatish Balay ctags -w -a -f tags $(TAGS_MAKEFILE_FILES) 384b38bb785SSatish Balay ctags -w -a -f tags $(TAGS_BMAKE_FILES) 385b38bb785SSatish Balay chmod g+w tags 386b38bb785SSatish Balay 38711b6ed10SLois Curfman McInnes# ------------------------------------------------------------------ 38811b6ed10SLois Curfman McInnes# 38911b6ed10SLois Curfman McInnes# All remaining actions are intended for PETSc developers only. 39011b6ed10SLois Curfman McInnes# PETSc users should not generally need to use these commands. 39111b6ed10SLois Curfman McInnes# 39211b6ed10SLois Curfman McInnes 39311b6ed10SLois Curfman McInnes# Builds all versions of the man pages 394956e605aSBarry Smithallmanpages: allwwwpages alllatexpages 395dea827f2SLois Curfman McInnesallwwwpages: deletewwwpages 396299192b9SLois Curfman McInnes -make ACTION=wwwpages_buildcite tree 397c3e30b67SBarry Smith -cd src/fortran/custom; make wwwpages_buildcite 398c3e30b67SBarry Smith -cd src/fortran/custom; make wwwpages 399dea827f2SLois Curfman McInnes -make ACTION=wwwpages tree 400dea827f2SLois Curfman McInnes -maint/wwwman 4019921e35aSSatish Balay -maint/examplesindex.tcl -www 402f8cfbf3fSSatish Balay -maint/htmlkeywords.tcl 40351c61065SBarry Smith -@chmod g+w docs/www/man*/* 404e01137a2SSatish Balay 405e01137a2SSatish Balay#This is similar to allwwwpages except -www -> -wwwhome 406e01137a2SSatish Balay#The wwwmanpages built this way can pe placed at PETSc Home Page 407e01137a2SSatish Balayallwwwhomepages: deletewwwpages 408e01137a2SSatish Balay -make ACTION=wwwpages_buildcite tree 409e01137a2SSatish Balay -cd src/fortran/custom; make wwwpages_buildcite 410e01137a2SSatish Balay -cd src/fortran/custom; make wwwpages 411e01137a2SSatish Balay -make ACTION=wwwpages tree 412e01137a2SSatish Balay -maint/wwwman 413e01137a2SSatish Balay -maint/examplesindex.tcl -wwwhome 41484047b72SSatish Balay -maint/htmlkeywords.tcl -wwwhome 415e01137a2SSatish Balay -@chmod g+w docs/www/man*/* 416e01137a2SSatish Balay 417416022c9SBarry Smithalllatexpages: deletelatexpages 418416022c9SBarry Smith -make ACTION=latexpages tree 419c3e30b67SBarry Smith -cd src/fortran/custom; make latexpages 42051c61065SBarry Smith -@chmod g+w docs/tex/rsum/* 421416022c9SBarry Smith 42211b6ed10SLois Curfman McInnes# Builds Fortran stub files 42311b6ed10SLois Curfman McInnesallfortranstubs: 42435aab85fSBarry Smith -@include/finclude/generateincludes 4250a0eb2c5SBarry Smith -@$(RM) -f src/fortran/auto/*.c 42611b6ed10SLois Curfman McInnes -make ACTION=fortranstubs tree 4270a0eb2c5SBarry Smith chmod g+w src/fortran/auto/*.c 428f6ff2982SSatish Balay 429d55938c2SBarry Smithallci: 430d55938c2SBarry Smith -@cd src/fortran/custom ; $(OMAKE) BOPT=$(BOPT) ci 431b951964fSBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=ci tree 432b951964fSBarry Smith 433d55938c2SBarry Smithallco: 434d55938c2SBarry Smith -@cd src/fortran/custom ; $(OMAKE) BOPT=$(BOPT) co 435d55938c2SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=co tree 436d55938c2SBarry Smith 437b334301eSBarry Smith# 438b334301eSBarry Smith# The commands below are for generating ADIC versions of the code; 439b334301eSBarry Smith# they are not currently used. 440b334301eSBarry Smith# 441b334301eSBarry SmithCFLAGS = $(CPPFLAGS) $(CONF) 4425eea60f9SBarry Smithalladicignore: 4435eea60f9SBarry Smith -@$(RM) $(PDIR)/adicignore 4445eea60f9SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adicignore tree 4455eea60f9SBarry Smith 4465eea60f9SBarry Smithalladic: 447d18b0ea7SBarry Smith -@echo "Beginning to compile ADIC source code in all directories" 448d18b0ea7SBarry Smith -@echo "Using ADIC compiler: $(ADIC_CC) $(CFLAGS)" 449d18b0ea7SBarry Smith -@echo "=========================================" 45047794344SBarry Smith -@cd include ; \ 451f218b1c0SBarry Smith $(ADIC_CC) -s -f 1 $(CFLAGS) petsc.h 452ba8edd79SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adic tree 45347794344SBarry Smith -@cd src/inline ; \ 45447794344SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) adic 4557e351921SBarry Smith -@cd src/adic/blas ; \ 4567e351921SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) adic 4577e351921SBarry Smith -@cd src/adic/lapack ; \ 458e1063516SSatish Balay $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adic tree 4596e81b665SBarry Smith 46047794344SBarry Smithalladiclib: 461d18b0ea7SBarry Smith -@echo "Beginning to compile ADIC libraries in all directories" 462d18b0ea7SBarry Smith -@echo "Using compiler: $(CC) $(COPTFLAGS)" 463d18b0ea7SBarry Smith -@echo "-----------------------------------------" 464d18b0ea7SBarry Smith -@echo "Using PETSc flags: $(PETSCFLAGS) $(PCONF)" 465d18b0ea7SBarry Smith -@echo "-----------------------------------------" 466d18b0ea7SBarry Smith -@echo "Using configuration flags: $(CONF)" 467d18b0ea7SBarry Smith -@echo "-----------------------------------------" 468d18b0ea7SBarry Smith -@echo "Using include paths: $(PETSC_INCLUDE)" 469d18b0ea7SBarry Smith -@echo "-----------------------------------------" 470d18b0ea7SBarry Smith -@echo "Using PETSc directory: $(PETSC_DIR)" 471d18b0ea7SBarry Smith -@echo "Using PETSc arch: $(PETSC_ARCH)" 472d18b0ea7SBarry Smith -@echo "=========================================" 473f218b1c0SBarry Smith -@$(RM) -f $(PDIR)/*adic.a 47447794344SBarry Smith -@$(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adiclib tree 4757e351921SBarry Smith -@cd src/adic/blas ; \ 4767e351921SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) adiclib 4777e351921SBarry Smith -@cd src/adic/lapack ; \ 478e1063516SSatish Balay $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) ACTION=adiclib tree 4797e351921SBarry Smith -@cd src/adic/src ; \ 480cb3b3f49SBarry Smith $(OMAKE) BOPT=$(BOPT) PETSC_ARCH=$(PETSC_ARCH) lib 4815eea60f9SBarry Smith 4829e417c50SSatish Balay# ------------------------------------------------------------------------------- 4839e417c50SSatish Balay# 4849e417c50SSatish Balay# Some macros to check if the fortran interface is up-to-date. 4859e417c50SSatish Balay# 4869e417c50SSatish Balaycountfortranfunctions: 4879e417c50SSatish Balay -@cd $(PETSC_DIR)/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 4889e417c50SSatish Balay cut -d'(' -f1 | tr -s '' ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 4899e417c50SSatish Balay sed "s/_$$//" | sort > /tmp/countfortranfunctions 490b334301eSBarry Smith 4919e417c50SSatish Balaycountcfunctions: 4929e417c50SSatish Balay -@ grep extern $(PETSC_DIR)/include/*.h *.h | grep "(" | tr -s '' ' ' | \ 4939e417c50SSatish Balay cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '' '\012' | \ 4949e417c50SSatish Balay tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 4959e417c50SSatish Balay 4969e417c50SSatish Balaydifffortranfunctions: countfortranfunctions countcfunctions 4979e417c50SSatish Balay -@echo -------------- Functions missing in the fortran interface --------------------- 4989e417c50SSatish Balay -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 4999e417c50SSatish Balay -@echo ----------------- Functions missing in the C interface ------------------------ 5009e417c50SSatish Balay -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 5019e417c50SSatish Balay -@$(RM) /tmp/countcfunctions /tmp/countfortranfunctions 502b334301eSBarry Smith 5033f4c9a3aSSatish Balaycheckbadfortranstubs: 5043f4c9a3aSSatish Balay -@echo "=========================================" 5053f4c9a3aSSatish Balay -@echo "Functions with MPI_Comm as an Argument" 5063f4c9a3aSSatish Balay -@echo "=========================================" 5073f4c9a3aSSatish Balay -@cd $(PETSC_DIR)/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 5083f4c9a3aSSatish Balay tr -s '' ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 5093f4c9a3aSSatish Balay -@echo "=========================================" 5103f4c9a3aSSatish Balay -@echo "Functions with a String as an Argument" 5113f4c9a3aSSatish Balay -@echo "=========================================" 5123f4c9a3aSSatish Balay -@cd $(PETSC_DIR)/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 5133f4c9a3aSSatish Balay tr -s '' ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 5143f4c9a3aSSatish Balay -@echo "=========================================" 5153f4c9a3aSSatish Balay -@echo "Functions with Pointers to PETSc Objects as Argument" 5163f4c9a3aSSatish Balay -@echo "=========================================" 5173f4c9a3aSSatish Balay -@cd $(PETSC_DIR)/src/fortran/auto; \ 5183f4c9a3aSSatish Balay _p_OBJ=`grep _p_ $(PETSC_DIR)/include/*.h | tr -s '' ' ' | \ 5193f4c9a3aSSatish Balay cut -d' ' -f 3 | tr -s '' '\012' | grep -v '{' | cut -d'*' -f1 | \ 5203f4c9a3aSSatish Balay sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 5213f4c9a3aSSatish Balay for OBJ in $$_p_OBJ; do \ 5223f4c9a3aSSatish Balay grep "$$OBJ \*" *.c | tr -s '' ' ' | tr -s ':' ' ' | \ 5233f4c9a3aSSatish Balay cut -d'(' -f1 | cut -d' ' -f1,3; \ 5243f4c9a3aSSatish Balay done 525