1*b6c2a3c7SBarry Smith# $Id: makefile,v 1.321 2000/09/19 21:05:18 bsmith Exp bsmith $ 211b6ed10SLois Curfman McInnes# 3cfd69a58SBarry Smith# This is the makefile for installing PETSc. See the file 47fc3c18eSBarry Smith# docs/installation.html for directions on installing PETSc. 5cfd69a58SBarry Smith# See also bmake/common for additional commands. 611b6ed10SLois Curfman McInnes# 7716b9c40SSatish BalayALL: all 811b6ed10SLois Curfman McInnes 9b16a3bb1SBarry SmithDIRS = src include docs 1061523587SBarry Smith 11d77bb2e1SSatish Balayinclude ${PETSC_DIR}/bmake/${PETSC_ARCH}/base 121d1367b7SBarry Smithinclude ${PETSC_DIR}/bmake/common_test 1361523587SBarry Smith 143677444aSSatish Balay# 153677444aSSatish Balay# Basic targets to build PETSc libraries. 16fa527775SLois Curfman McInnes# all : builds the c, fortran, and f90 libraries 17eb15d327SBarry Smithall : info info_h chkpetsc_dir deletelibs build_c build_fortran shared 18efd74e9bSBarry Smith# 19fa527775SLois Curfman McInnes# Prints information about the system and version of PETSc being compiled 20efd74e9bSBarry Smith# 21efd74e9bSBarry Smithinfo: 22efd74e9bSBarry Smith -@echo "==========================================" 2311b6dc0cSBarry Smith -@echo " " 24d76296fbSBarry Smith -@echo "See docs/troubleshooting.html and docs/bugreporting.html" 25d76296fbSBarry Smith -@echo "for help with installation problems. Please send EVERYTHING" 26d76296fbSBarry Smith -@echo "printed out below when reporting problems" 2711b6dc0cSBarry Smith -@echo " " 2811b6dc0cSBarry Smith -@echo "To subscribe to the PETSc users mailing list, send mail to " 2911b6dc0cSBarry Smith -@echo "majordomo@mcs.anl.gov with the message: " 3011b6dc0cSBarry Smith -@echo "subscribe petsc-users" 3111b6dc0cSBarry Smith -@echo " " 32d76296fbSBarry Smith -@echo "==========================================" 331d91fb6eSBarry Smith -@echo On `date` on `hostname` 3430fdcc7aSBarry Smith -@echo Machine characteristics: `uname -a` 35efd74e9bSBarry Smith -@echo "-----------------------------------------" 3667b024f7SSatish Balay -@echo "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS}" 37c20d8eedSBarry Smith -@if [ -n "${C_CCV}" -a "${C_CCV}" != "unknown" ] ; then \ 389a43e735SSatish Balay echo "C Compiler version:" ; ${C_CCV} ; fi 39c20d8eedSBarry Smith -@if [ -n "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ] ; then \ 409a43e735SSatish Balay echo "C++ Compiler version:" ; ${CXX_CCV} ; fi 4167b024f7SSatish Balay -@echo "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}" 4288b81347SBarry Smith -@if [ -n "${C_FCV}" -a "${C_FCV}" != "unknown" ] ; then \ 4388b81347SBarry Smith echo "Fortran Compiler version:" ; ${C_FCV} ; fi 4447794344SBarry Smith -@echo "-----------------------------------------" 45f209c26bSSatish Balay -@grep PETSC_VERSION_NUMBER ${PETSC_DIR}/include/petscversion.h | ${SED} "s/........//" 46f265ae5cSBarry Smith -@echo "-----------------------------------------" 47d77bb2e1SSatish Balay -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 4847794344SBarry Smith -@echo "-----------------------------------------" 49e0e703c1SSatish Balay -@echo "Using configuration flags:" 50f209c26bSSatish Balay -@grep "define " ${PETSC_DIR}/bmake/${PETSC_ARCH}/petscconf.h 5147794344SBarry Smith -@echo "-----------------------------------------" 52d77bb2e1SSatish Balay -@echo "Using include paths: ${PETSC_INCLUDE}" 5347794344SBarry Smith -@echo "-----------------------------------------" 54d77bb2e1SSatish Balay -@echo "Using PETSc directory: ${PETSC_DIR}" 55d77bb2e1SSatish Balay -@echo "Using PETSc arch: ${PETSC_ARCH}" 56efd74e9bSBarry Smith -@echo "------------------------------------------" 57d77bb2e1SSatish Balay -@echo "Using C linker: ${CLINKER}" 58d77bb2e1SSatish Balay -@echo "Using Fortran linker: ${FLINKER}" 59f2b01315SBarry Smith -@echo "Using libraries: ${PETSC_LIB}" 60efd74e9bSBarry Smith -@echo "==========================================" 61b8d81f61SBarry Smith# 62b8d81f61SBarry Smith# 63b8d81f61SBarry SmithMINFO = ${PETSC_DIR}/bmake/${PETSC_ARCH}/petscmachineinfo.h 64b8d81f61SBarry Smithinfo_h: 65ddbfe947SBarry Smith -@$(RM) -f MINFO ${MINFO} 66c5e9c7dfSBarry Smith -@echo "static char *petscmachineinfo = \" " >> MINFO 6734a92de5SBarry Smith -@echo "Libraries compiled on `date` on `hostname` " >> MINFO 68c5e9c7dfSBarry Smith -@echo Machine characteristics: `uname -a` "" >> MINFO 69c5e9c7dfSBarry Smith -@echo "-----------------------------------------" >> MINFO 70c5e9c7dfSBarry Smith -@echo "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS} " >> MINFO 71b8d81f61SBarry Smith -@if [ "${C_CCV}" -a "${C_CCV}" != "unknown" ] ; then \ 729a43e735SSatish Balay echo "C Compiler version:" >> MINFO ; ${C_CCV} >> MINFO 2>&1; fi 73b8d81f61SBarry Smith -@if [ "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ] ; then \ 749a43e735SSatish Balay echo "C++ Compiler version:" >> MINFO; ${CXX_CCV} >> MINFO 2>&1 ; fi 75c5e9c7dfSBarry Smith -@echo "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}" >> MINFO 76b8d81f61SBarry Smith -@if [ "${C_FCV}" -a "${C_FCV}" != "unknown" ] ; then \ 77c5e9c7dfSBarry Smith echo "Fortran Compiler version:" >> MINFO ; ${C_FCV} >> MINFO 2>&1 ; fi 78c5e9c7dfSBarry Smith -@echo "-----------------------------------------" >> MINFO 79c5e9c7dfSBarry Smith -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" >> MINFO 80c5e9c7dfSBarry Smith -@echo "-----------------------------------------" >> MINFO 81c5e9c7dfSBarry Smith -@echo "Using configuration flags:" >> MINFO 82c5e9c7dfSBarry Smith -@echo "-----------------------------------------" >> MINFO 83c5e9c7dfSBarry Smith -@echo "Using include paths: ${PETSC_INCLUDE}" >> MINFO 84c5e9c7dfSBarry Smith -@echo "-----------------------------------------" >> MINFO 85c5e9c7dfSBarry Smith -@echo "Using PETSc directory: ${PETSC_DIR}" >> MINFO 86c5e9c7dfSBarry Smith -@echo "Using PETSc arch: ${PETSC_ARCH}" >> MINFO 87c5e9c7dfSBarry Smith -@echo "------------------------------------------" >> MINFO 88c5e9c7dfSBarry Smith -@echo "Using C linker: ${CLINKER}" >> MINFO 89c5e9c7dfSBarry Smith -@echo "Using Fortran linker: ${FLINKER}" >> MINFO 90579ddc58SSatish Balay -@cat MINFO | ${SED} -e 's/$$/ \\n\\/' > ${MINFO} 91c5e9c7dfSBarry Smith -@echo "Using libraries: ${PETSC_LIB} \"; " >> ${MINFO} 92a21fb8cbSBarry Smith -@chmod g+w ${MINFO} 939c0905fcSSatish Balay -@$(RM) MINFO 943677444aSSatish Balay# 95fa527775SLois Curfman McInnes# Builds the PETSc libraries 96fa527775SLois Curfman McInnes# This target also builds fortran77 and f90 interface 97fa527775SLois Curfman McInnes# files. (except compiling *.F files) 983677444aSSatish Balay# 9960262a0eSSatish Balaybuild_c: 100efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" 10147794344SBarry Smith -@echo "=========================================" 10275198762SBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree 103c1959989SSatish Balay ${RANLIB} ${PDIR}/*.a 104d77bb2e1SSatish Balay -@chmod g+w ${PDIR}/*.a 1050b3634f8SBarry Smith -@echo "Completed building libraries" 10647794344SBarry Smith -@echo "=========================================" 1070b3634f8SBarry Smith 10835ca7349SBarry Smith# 10928881d8bSBarry Smith# Builds PETSc Fortran source 11011b6ed10SLois Curfman McInnes# Note: libfast cannot run on .F files on certain machines, so we 1119984b5c5SSatish Balay# use libf to compile the fortran source files. 112fa527775SLois Curfman McInnes# 11360262a0eSSatish Balaybuild_fortran: 11428881d8bSBarry Smith -@echo "BEGINNING TO COMPILE FORTRAN SOURCE" 11547794344SBarry Smith -@echo "=========================================" 116b16a3bb1SBarry Smith -@cd src/fortran/custom; \ 11728881d8bSBarry Smith ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libf clean 118971c2310SBarry Smith -@cd src/fortran/kernels; \ 1194a903031SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libf clean 120*b6c2a3c7SBarry Smith -@cd src/mat/impls/aij/seq; \ 121*b6c2a3c7SBarry Smith ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libf clean 1229984b5c5SSatish Balay ${RANLIB} ${PDIR}/libpetscfortran.a 123d08da015SSatish Balay ${RANLIB} ${PDIR}/libpetsc.a 124d77bb2e1SSatish Balay -@chmod g+w ${PDIR}/*.a 12528881d8bSBarry Smith -@echo "Completed compiling Fortran source" 126971c2310SBarry Smith -@echo "=========================================" 127971c2310SBarry Smith 128efd74e9bSBarry Smithpetscblas: info chkpetsc_dir 129d77bb2e1SSatish Balay -${RM} -f ${PDIR}/libpetscblas.* 130efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE C VERSION OF BLAS AND LAPACK" 13166341c5dSSatish Balay -@echo "=========================================" 1326685cf94SSatish Balay -@cd src/blaslapack/c; \ 133d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree 134d77bb2e1SSatish Balay ${RANLIB} ${PDIR}/libpetscblas.a 135d77bb2e1SSatish Balay -@chmod g+w ${PDIR}/*.a 136229e8d5cSBarry Smith -@echo "Completed compiling C version of BLAS and LAPACK" 13766341c5dSSatish Balay -@echo "=========================================" 1388744090aSBarry Smith# 1393677444aSSatish Balay# Builds PETSc test examples for a given BOPT and architecture 1408744090aSBarry Smith# 1413677444aSSatish Balaytestexamples: info chkopts 1423677444aSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES" 1433677444aSSatish Balay -@echo "Due to different numerical round-off on certain" 1443677444aSSatish Balay -@echo "machines some of the numbers may not match exactly." 1453677444aSSatish Balay -@echo "=========================================" 1468744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_1 tree 1473677444aSSatish Balay -@echo "Completed compiling and running test examples" 1483677444aSSatish Balay -@echo "=========================================" 1493677444aSSatish Balaytestfortran: info chkopts 1503677444aSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES" 1513677444aSSatish Balay -@echo "=========================================" 1523677444aSSatish Balay -@echo "Due to different numerical round-off on certain" 1533677444aSSatish Balay -@echo "machines or the way Fortran formats numbers" 1543677444aSSatish Balay -@echo "some of the results may not match exactly." 1553677444aSSatish Balay -@echo "=========================================" 1568744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_3 tree 1573677444aSSatish Balay -@echo "Completed compiling and running Fortran test examples" 1583677444aSSatish Balay -@echo "=========================================" 15901c5c36fSSatish Balaytestexamples_uni: info chkopts 16001c5c36fSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES" 16101c5c36fSSatish Balay -@echo "Due to different numerical round-off on certain" 16201c5c36fSSatish Balay -@echo "machines some of the numbers may not match exactly." 16301c5c36fSSatish Balay -@echo "=========================================" 1648744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_4 tree 16501c5c36fSSatish Balay -@echo "Completed compiling and running uniprocessor test examples" 16601c5c36fSSatish Balay -@echo "=========================================" 1673677444aSSatish Balaytestfortran_uni: info chkopts 1683677444aSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN EXAMPLES" 1693677444aSSatish Balay -@echo "Due to different numerical round-off on certain" 1703677444aSSatish Balay -@echo "machines some of the numbers may not match exactly." 1713677444aSSatish Balay -@echo "=========================================" 1728744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_9 tree 1733677444aSSatish Balay -@echo "Completed compiling and running uniprocessor fortran test examples" 1743677444aSSatish Balay -@echo "=========================================" 17511b6dc0cSBarry Smithmatlabcodes: 17611b6dc0cSBarry Smith -@echo "BEGINNING TO COMPILE MATLAB INTERFACE" 17711b6dc0cSBarry Smith -@cd src/sys/src/viewer/impls/socket/matlab; ${OMAKE} BOPT=g matlabcodes PETSC_ARCH=${PETSC_ARCH} 178ad96cc0dSLois Curfman McInnes 179f3eacedaSSatish Balay# Ranlib on the libraries 1808c37ef55SBarry Smithranlib: 181d77bb2e1SSatish Balay ${RANLIB} ${PDIR}/*.a 18261523587SBarry Smith 18311b6ed10SLois Curfman McInnes# Deletes PETSc libraries 184f3eacedaSSatish Balaydeletelibs: chkopts_basic 185d77bb2e1SSatish Balay -${RM} -f ${PDIR}/* 186d44968ceSBarry Smith 1873677444aSSatish Balay 1883677444aSSatish Balay# ------------------------------------------------------------------ 1893677444aSSatish Balay# 1903677444aSSatish Balay# All remaining actions are intended for PETSc developers only. 1913677444aSSatish Balay# PETSc users should not generally need to use these commands. 1923677444aSSatish Balay# 1933677444aSSatish Balay 19465783a8cSBarry Smith# To access the tags in EMACS, type M-x visit-tags-table and specify 19565783a8cSBarry Smith# the file petsc/TAGS. 19665783a8cSBarry Smith# 1) To move to where a PETSc function is defined, enter M-. and the 19765783a8cSBarry Smith# function name. 19865783a8cSBarry Smith# 2) To search for a string and move to the first occurrence, 19965783a8cSBarry Smith# use M-x tags-search and the string. 2007acb7333SLois Curfman McInnes# To locate later occurrences, use M-, 20111b6ed10SLois Curfman McInnes# Builds all etags files 20211b6ed10SLois Curfman McInnesalletags: 20301c05c5cSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags 20409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_complete 20509f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_noexamples 20609f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_examples 20709f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_makefiles 20811b6ed10SLois Curfman McInnes# Builds the basic etags file. This should be employed by most users. 20920563c6bSBarry Smithetags: 21009f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS 21109f7043eSSatish Balay -touch ${TAGSDIR}/TAGS 21209f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcec alltree 21309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourceh alltree 21409f7043eSSatish Balay -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcef alltree 21509f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesc alltree 21609f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesf alltree 21709f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesch alltree 21809f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesfh alltree 21909f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_makefile alltree 22009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS etags_bmakefiles 22155194d7eSSatish Balay -chmod g+w TAGS 22229cdf679SBarry Smith# Builds complete etags list; only for PETSc developers. 22329cdf679SBarry Smithetags_complete: 22409f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_COMPLETE 22509f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_COMPLETE 22609f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcec alltree 22709f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourceh alltree 22809f7043eSSatish Balay -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcef alltree 22909f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesc alltree 23009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesf alltree 23109f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesch alltree 23209f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesfh alltree 23309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_makefile alltree 23409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE etags_bmakefiles 23509f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_docs alltree 23609f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_scripts alltree 23755194d7eSSatish Balay -chmod g+w TAGS_COMPLETE 23811b6ed10SLois Curfman McInnes# Builds the etags file that excludes the examples directories 239bfce26a3SBarry Smithetags_noexamples: 24009f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_NO_EXAMPLES 24109f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_NO_EXAMPLES 24209f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcec alltree 24309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourceh alltree 24409f7043eSSatish Balay -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcef alltree 24509f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_makefile alltree 24609f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES etags_bmakefiles 24709f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_docs alltree 24855194d7eSSatish Balay -chmod g+w TAGS_NO_EXAMPLES 24911b6ed10SLois Curfman McInnes# Builds the etags file for makefiles 250b16a3bb1SBarry Smithetags_makefiles: 2517e0368d4SSatish Balay -${RM} ${TAGSDIR}/TAGS_MAKEFILES 2527e0368d4SSatish Balay -touch ${TAGSDIR}/TAGS_MAKEFILES 2537e0368d4SSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES ACTION=etags_makefile alltree 2547e0368d4SSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES etags_bmakefiles 2557e0368d4SSatish Balay -chmod g+w TAGS_MAKEFILES 256dc80aa23SSatish Balay# Builds the etags file for examples 257dc80aa23SSatish Balayetags_examples: 25809f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_EXAMPLES 25909f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_EXAMPLES 26009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesc alltree 26109f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesch alltree 26209f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesf alltree 26309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 26455194d7eSSatish Balay -chmod g+w TAGS_EXAMPLES 2652176044fSSatish Balayetags_fexamples: 26609f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_FEXAMPLES 26709f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_FEXAMPLES 26809f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_FEXAMPLES ACTION=etags_examplesf alltree 26909f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 2702176044fSSatish Balay -chmod g+w TAGS_FEXAMPLES 271b38bb785SSatish Balay# 272f20f7ba3SSatish Balay# These are here for the target allci and allco, and etags 2733677444aSSatish Balay# 274b38bb785SSatish Balay 275f0475f33SSatish BalayBMAKEFILES = bmake/common* bmake/*/base bmake/*/base_variables bmake/*/base.site \ 276b8adb7afSBarry Smith bmake/*/petscconf.h bmake/*/petscfix.h bmake/win32/makefile.dos bin/config/base*.in \ 277b8adb7afSBarry Smith bmake/*/buildtest 2782f1ebae6SLois Curfman McInnesDOCS = bmake/readme bmake/petscconf.defs 27957c4596dSSatish BalaySCRIPTS = maint/addlinks maint/builddist maint/buildlinks maint/wwwman \ 28057c4596dSSatish Balay maint/xclude maint/crontab \ 28157c4596dSSatish Balay maint/autoftp include/foldinclude/generateincludes 28211b6ed10SLois Curfman McInnes 2837f52c680SSatish Balay# Builds all the documentation - should be done every night 284074fadd8SSatish Balayalldoc: allmanualpages 285e15d8129SBarry Smith cd docs/tex/manual; ${OMAKE} manual.dvi manual.ps manual.html splitmanual.html 2867f52c680SSatish Balay 2872496ca06SSatish Balay# Deletes man pages (HTML version) 2882496ca06SSatish Balaydeletemanualpages: 289ba79c590SSatish Balay ${RM} -f ${PETSC_DIR}/docs/manualpages/*/*.html \ 29045f11a08SBarry Smith ${PETSC_DIR}/docs/manualpages/manualpages.cit 2912496ca06SSatish Balay 29211b6ed10SLois Curfman McInnes# Builds all versions of the man pages 293981c4779SBarry Smithallmanualpages: deletemanualpages 2947c922b88SBarry Smith -${OMAKE} ACTION=manualpages_buildcite ttree 2957c922b88SBarry Smith -${OMAKE} ACTION=manualpages ttree 296dfd40236SSatish Balay -maint/wwwindex.py ${PETSC_DIR} 297baa90677SBarry Smith -${OMAKE} ACTION=manexamples tree 298beb1b3a5SBarry Smith -${OMAKE} manconcepts 299beb1b3a5SBarry Smith -${OMAKE} ACTION=exampleconcepts tree 300ba79c590SSatish Balay -@chmod g+w docs/manualpages/*/*.html 301e01137a2SSatish Balay 30211b6ed10SLois Curfman McInnes# Builds Fortran stub files 30311b6ed10SLois Curfman McInnesallfortranstubs: 30426cd32c0SSatish Balay -@include/foldinclude/generateincludes 305d77bb2e1SSatish Balay -@${RM} -f src/fortran/auto/*.c 3067c922b88SBarry Smith -${OMAKE} ACTION=fortranstubs ttree 307b9917d27SSatish Balay -@cd src/fortran/auto; ${OMAKE} fixfortran 3080a0eb2c5SBarry Smith chmod g+w src/fortran/auto/*.c 309f6ff2982SSatish Balay 310d55938c2SBarry Smithallci: 311f20f7ba3SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=ci alltree 312b951964fSBarry Smith 313d55938c2SBarry Smithallco: 314f20f7ba3SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=co alltree 315d55938c2SBarry Smith 316791d64f4SSatish Balay# usage make allrcslabel NEW_RCS_LABEL=v_2_0_28 317791d64f4SSatish Balayallrcslabel: 318791d64f4SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} NEW_RCS_LABEL=${NEW_RCS_LABEL} ACTION=rcslabel alltree 319b334301eSBarry Smith# 320b334301eSBarry Smith# The commands below are for generating ADIC versions of the code; 321b334301eSBarry Smith# they are not currently used. 322b334301eSBarry Smith# 3235eea60f9SBarry Smithalladicignore: 324d77bb2e1SSatish Balay -@${RM} ${PDIR}/adicignore 325d77bb2e1SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore tree 3265eea60f9SBarry Smith 3275eea60f9SBarry Smithalladic: 328d18b0ea7SBarry Smith -@echo "Beginning to compile ADIC source code in all directories" 32967b024f7SSatish Balay -@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}" 330d18b0ea7SBarry Smith -@echo "=========================================" 33147794344SBarry Smith -@cd include ; \ 33267b024f7SSatish Balay ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petsc.h 333d77bb2e1SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 33447794344SBarry Smith -@cd src/inline ; \ 335d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic 33677ed5343SBarry Smith -@cd src/blaslapack ; \ 337d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 3386e81b665SBarry Smith 33947794344SBarry Smithalladiclib: 340d18b0ea7SBarry Smith -@echo "Beginning to compile ADIC libraries in all directories" 341d77bb2e1SSatish Balay -@echo "Using compiler: ${CC} ${COPTFLAGS}" 342d18b0ea7SBarry Smith -@echo "-----------------------------------------" 343d77bb2e1SSatish Balay -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 344d18b0ea7SBarry Smith -@echo "-----------------------------------------" 345e0e703c1SSatish Balay -@echo "Using configuration flags:" 346e0e703c1SSatish Balay -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 347d18b0ea7SBarry Smith -@echo "-----------------------------------------" 348d77bb2e1SSatish Balay -@echo "Using include paths: ${PETSC_INCLUDE}" 349d18b0ea7SBarry Smith -@echo "-----------------------------------------" 350d77bb2e1SSatish Balay -@echo "Using PETSc directory: ${PETSC_DIR}" 351d77bb2e1SSatish Balay -@echo "Using PETSc arch: ${PETSC_ARCH}" 352d18b0ea7SBarry Smith -@echo "=========================================" 353d77bb2e1SSatish Balay -@${RM} -f ${PDIR}/*adic.a 354d77bb2e1SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 35577ed5343SBarry Smith -@cd src/blaslapack ; \ 356d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 3577e351921SBarry Smith -@cd src/adic/src ; \ 358d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib 3595eea60f9SBarry Smith 3609e417c50SSatish Balay# ------------------------------------------------------------------------------- 3619e417c50SSatish Balay# 3629e417c50SSatish Balay# Some macros to check if the fortran interface is up-to-date. 3639e417c50SSatish Balay# 3649e417c50SSatish Balaycountfortranfunctions: 365d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 36685c7cd6cSSatish Balay cut -d'(' -f1 | tr -s ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 3679e417c50SSatish Balay sed "s/_$$//" | sort > /tmp/countfortranfunctions 368b334301eSBarry Smith 3699e417c50SSatish Balaycountcfunctions: 37085c7cd6cSSatish Balay -@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s ' ' | \ 37185c7cd6cSSatish Balay cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' | \ 3729e417c50SSatish Balay tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 3739e417c50SSatish Balay 3749e417c50SSatish Balaydifffortranfunctions: countfortranfunctions countcfunctions 3759e417c50SSatish Balay -@echo -------------- Functions missing in the fortran interface --------------------- 3769e417c50SSatish Balay -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 3779e417c50SSatish Balay -@echo ----------------- Functions missing in the C interface ------------------------ 3789e417c50SSatish Balay -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 379d77bb2e1SSatish Balay -@${RM} /tmp/countcfunctions /tmp/countfortranfunctions 380b334301eSBarry Smith 3813f4c9a3aSSatish Balaycheckbadfortranstubs: 3823f4c9a3aSSatish Balay -@echo "=========================================" 3833f4c9a3aSSatish Balay -@echo "Functions with MPI_Comm as an Argument" 3843f4c9a3aSSatish Balay -@echo "=========================================" 385d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 38685c7cd6cSSatish Balay tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 3873f4c9a3aSSatish Balay -@echo "=========================================" 3883f4c9a3aSSatish Balay -@echo "Functions with a String as an Argument" 3893f4c9a3aSSatish Balay -@echo "=========================================" 390d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 39185c7cd6cSSatish Balay tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 3923f4c9a3aSSatish Balay -@echo "=========================================" 3933f4c9a3aSSatish Balay -@echo "Functions with Pointers to PETSc Objects as Argument" 3943f4c9a3aSSatish Balay -@echo "=========================================" 395d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran/auto; \ 39685c7cd6cSSatish Balay _p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \ 39785c7cd6cSSatish Balay cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ 3983f4c9a3aSSatish Balay sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 3993f4c9a3aSSatish Balay for OBJ in $$_p_OBJ; do \ 40085c7cd6cSSatish Balay grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \ 4013f4c9a3aSSatish Balay cut -d'(' -f1 | cut -d' ' -f1,3; \ 4023f4c9a3aSSatish Balay done 4033677444aSSatish Balay# Builds noise routines (not yet publically available) 4043677444aSSatish Balay# Note: libfast cannot run on .F files on certain machines, so we 4053677444aSSatish Balay# use lib and check for errors here. 4063677444aSSatish Balaynoise: info chkpetsc_dir 4073677444aSSatish Balay -@echo "Beginning to compile noise routines" 4083677444aSSatish Balay -@echo "=========================================" 4093677444aSSatish Balay -@cd src/snes/interface/noise; \ 4103677444aSSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 4113677444aSSatish Balay grep -v clog trashz | grep -v "information sections" | \ 4123677444aSSatish Balay egrep -i '(Error|warning|Can)' >> /dev/null;\ 4133677444aSSatish Balay if [ "$$?" != 1 ]; then \ 4143677444aSSatish Balay cat trashz ; fi; ${RM} trashz 4153677444aSSatish Balay ${RANLIB} ${PDIR}/libpetscsnes.a 4163677444aSSatish Balay -@chmod g+w ${PDIR}/libpetscsnes.a 4173677444aSSatish Balay -@echo "Completed compiling noise routines" 4183677444aSSatish Balay -@echo "=========================================" 4193677444aSSatish Balay 4204556b810SBarry Smith# 4214556b810SBarry Smith# Automatically generates PETSc exercises in html from the tutorial examples. 422b6ea66eeSBarry Smith# 423b6ea66eeSBarry Smith# The introduction for each section is obtained from docs/manualpages/bop.${MANSEC} is under RCS and may be edited 424b6ea66eeSBarry Smith# (used also in introductions to the manual pages) 425b6ea66eeSBarry Smith# The overall introduction is in docs/exercises/introduction.html and is under RCS and may be edited 426b6ea66eeSBarry Smith# The list of exercises is from TUTORIALS in each directory's makefile 427b6ea66eeSBarry Smith# 4284556b810SBarry Smith# DO NOT EDIT the pageform.txt or *.htm files generated since they will be automatically replaced. 4294556b810SBarry Smith# The pagemaker rule is in the file bmake/common (at the bottom) 4304556b810SBarry Smith# 431843ae28eSBarry Smith# Eventually the line below will replace the two cd in the rule below, it is just this way now for speed 43297e8d271SBarry Smith# -@${OMAKE} PETSC_DIR=${PETSC_DIR} pagemaker 433843ae28eSBarry Smith# 43497e8d271SBarry Smithexercises: 43597e8d271SBarry Smith -@echo "=========================================" 43697e8d271SBarry Smith -@echo "Generating HTML tutorial exercises" 43797e8d271SBarry Smith -@rm -f docs/pageform.txt 43897e8d271SBarry Smith -@echo "title=\"PETSc Exercises\"" > docs/pageform.txt 43997e8d271SBarry Smith -@echo "access_title=Exercise Sections" >> docs/pageform.txt 440beb1b3a5SBarry Smith -@echo "access_format=short" >> docs/pageform.txt 44197e8d271SBarry Smith -@echo "startpage=../exercises/introduction.htm" >> docs/pageform.txt 44297e8d271SBarry Smith -@echo "NONE title=\"Introduction\" command=link src=../exercises/introduction.htm" >> docs/pageform.txt 44397e8d271SBarry Smith -@echo "Generating HTML for individual directories" 44497e8d271SBarry Smith -@echo "=========================================" 445beb1b3a5SBarry Smith -@${OMAKE} PETSC_DIR=${PETSC_DIR} ACTION=pagemaker tree 44697e8d271SBarry Smith -@echo "Completed HTML for individual directories" 44797e8d271SBarry Smith -@echo "NONE title=\"<HR>\" " >> docs/pageform.txt; 44897e8d271SBarry Smith -@echo "NONE title=\"PETSc Documentation\" command=link src=../index.html target=replace" >> docs/pageform.txt 44997e8d271SBarry Smith /home/MPI/class/mpiexmpl/maint/makepage.new -pageform=docs/pageform.txt -access_extra=/dev/null -outdir=docs/exercises 45097e8d271SBarry Smith -@echo "=========================================" 45197e8d271SBarry Smith 45297e8d271SBarry Smith 45397e8d271SBarry Smith 45497e8d271SBarry Smith 45597e8d271SBarry Smith 45697e8d271SBarry Smith 45797e8d271SBarry Smith 45897e8d271SBarry Smith 45997e8d271SBarry Smith 46097e8d271SBarry Smith 46197e8d271SBarry Smith 46297e8d271SBarry Smith 46397e8d271SBarry Smith 46497e8d271SBarry Smith 46597e8d271SBarry Smith 46697e8d271SBarry Smith 467