1*843ae28eSBarry Smith# $Id: makefile,v 1.313 2000/08/16 19:17:47 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 1261523587SBarry Smith 133677444aSSatish Balay# 143677444aSSatish Balay# Basic targets to build PETSc libraries. 15fa527775SLois Curfman McInnes# all : builds the c, fortran, and f90 libraries 16eb15d327SBarry Smithall : info info_h chkpetsc_dir deletelibs build_c build_fortran shared 17efd74e9bSBarry Smith# 18fa527775SLois Curfman McInnes# Prints information about the system and version of PETSc being compiled 19efd74e9bSBarry Smith# 20efd74e9bSBarry Smithinfo: 21efd74e9bSBarry Smith -@echo "==========================================" 2211b6dc0cSBarry Smith -@echo " " 23d76296fbSBarry Smith -@echo "See docs/troubleshooting.html and docs/bugreporting.html" 24d76296fbSBarry Smith -@echo "for help with installation problems. Please send EVERYTHING" 25d76296fbSBarry Smith -@echo "printed out below when reporting problems" 2611b6dc0cSBarry Smith -@echo " " 2711b6dc0cSBarry Smith -@echo "To subscribe to the PETSc users mailing list, send mail to " 2811b6dc0cSBarry Smith -@echo "majordomo@mcs.anl.gov with the message: " 2911b6dc0cSBarry Smith -@echo "subscribe petsc-users" 3011b6dc0cSBarry Smith -@echo " " 31d76296fbSBarry Smith -@echo "==========================================" 321d91fb6eSBarry Smith -@echo On `date` on `hostname` 3330fdcc7aSBarry Smith -@echo Machine characteristics: `uname -a` 34efd74e9bSBarry Smith -@echo "-----------------------------------------" 3567b024f7SSatish Balay -@echo "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS}" 36c20d8eedSBarry Smith -@if [ -n "${C_CCV}" -a "${C_CCV}" != "unknown" ] ; then \ 379a43e735SSatish Balay echo "C Compiler version:" ; ${C_CCV} ; fi 38c20d8eedSBarry Smith -@if [ -n "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ] ; then \ 399a43e735SSatish Balay echo "C++ Compiler version:" ; ${CXX_CCV} ; fi 4067b024f7SSatish Balay -@echo "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}" 4188b81347SBarry Smith -@if [ -n "${C_FCV}" -a "${C_FCV}" != "unknown" ] ; then \ 4288b81347SBarry Smith echo "Fortran Compiler version:" ; ${C_FCV} ; fi 4347794344SBarry Smith -@echo "-----------------------------------------" 44579ddc58SSatish Balay -@grep PETSC_VERSION_NUMBER include/petscversion.h | ${SED} "s/........//" 45f265ae5cSBarry Smith -@echo "-----------------------------------------" 46d77bb2e1SSatish Balay -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 4747794344SBarry Smith -@echo "-----------------------------------------" 48e0e703c1SSatish Balay -@echo "Using configuration flags:" 4904d10f81SBarry Smith -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 5047794344SBarry Smith -@echo "-----------------------------------------" 51d77bb2e1SSatish Balay -@echo "Using include paths: ${PETSC_INCLUDE}" 5247794344SBarry Smith -@echo "-----------------------------------------" 53d77bb2e1SSatish Balay -@echo "Using PETSc directory: ${PETSC_DIR}" 54d77bb2e1SSatish Balay -@echo "Using PETSc arch: ${PETSC_ARCH}" 55efd74e9bSBarry Smith -@echo "------------------------------------------" 56d77bb2e1SSatish Balay -@echo "Using C linker: ${CLINKER}" 57d77bb2e1SSatish Balay -@echo "Using Fortran linker: ${FLINKER}" 58f2b01315SBarry Smith -@echo "Using libraries: ${PETSC_LIB}" 59efd74e9bSBarry Smith -@echo "==========================================" 60b8d81f61SBarry Smith# 61b8d81f61SBarry Smith# 62b8d81f61SBarry SmithMINFO = ${PETSC_DIR}/bmake/${PETSC_ARCH}/petscmachineinfo.h 63b8d81f61SBarry Smithinfo_h: 64ddbfe947SBarry Smith -@$(RM) -f MINFO ${MINFO} 65c5e9c7dfSBarry Smith -@echo "static char *petscmachineinfo = \" " >> MINFO 6634a92de5SBarry Smith -@echo "Libraries compiled on `date` on `hostname` " >> MINFO 67c5e9c7dfSBarry Smith -@echo Machine characteristics: `uname -a` "" >> MINFO 68c5e9c7dfSBarry Smith -@echo "-----------------------------------------" >> MINFO 69c5e9c7dfSBarry Smith -@echo "Using C compiler: ${CC} ${COPTFLAGS} ${CCPPFLAGS} " >> MINFO 70b8d81f61SBarry Smith -@if [ "${C_CCV}" -a "${C_CCV}" != "unknown" ] ; then \ 719a43e735SSatish Balay echo "C Compiler version:" >> MINFO ; ${C_CCV} >> MINFO 2>&1; fi 72b8d81f61SBarry Smith -@if [ "${CXX_CCV}" -a "${CXX_CCV}" != "unknown" ] ; then \ 739a43e735SSatish Balay echo "C++ Compiler version:" >> MINFO; ${CXX_CCV} >> MINFO 2>&1 ; fi 74c5e9c7dfSBarry Smith -@echo "Using Fortran compiler: ${FC} ${FOPTFLAGS} ${FCPPFLAGS}" >> MINFO 75b8d81f61SBarry Smith -@if [ "${C_FCV}" -a "${C_FCV}" != "unknown" ] ; then \ 76c5e9c7dfSBarry Smith echo "Fortran Compiler version:" >> MINFO ; ${C_FCV} >> MINFO 2>&1 ; fi 77c5e9c7dfSBarry Smith -@echo "-----------------------------------------" >> MINFO 78c5e9c7dfSBarry Smith -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" >> MINFO 79c5e9c7dfSBarry Smith -@echo "-----------------------------------------" >> MINFO 80c5e9c7dfSBarry Smith -@echo "Using configuration flags:" >> MINFO 81c5e9c7dfSBarry Smith -@echo "-----------------------------------------" >> MINFO 82c5e9c7dfSBarry Smith -@echo "Using include paths: ${PETSC_INCLUDE}" >> MINFO 83c5e9c7dfSBarry Smith -@echo "-----------------------------------------" >> MINFO 84c5e9c7dfSBarry Smith -@echo "Using PETSc directory: ${PETSC_DIR}" >> MINFO 85c5e9c7dfSBarry Smith -@echo "Using PETSc arch: ${PETSC_ARCH}" >> MINFO 86c5e9c7dfSBarry Smith -@echo "------------------------------------------" >> MINFO 87c5e9c7dfSBarry Smith -@echo "Using C linker: ${CLINKER}" >> MINFO 88c5e9c7dfSBarry Smith -@echo "Using Fortran linker: ${FLINKER}" >> MINFO 89579ddc58SSatish Balay -@cat MINFO | ${SED} -e 's/$$/ \\n\\/' > ${MINFO} 90c5e9c7dfSBarry Smith -@echo "Using libraries: ${PETSC_LIB} \"; " >> ${MINFO} 91a21fb8cbSBarry Smith -@chmod g+w ${MINFO} 929c0905fcSSatish Balay -@$(RM) MINFO 933677444aSSatish Balay# 94fa527775SLois Curfman McInnes# Builds the PETSc libraries 95fa527775SLois Curfman McInnes# This target also builds fortran77 and f90 interface 96fa527775SLois Curfman McInnes# files. (except compiling *.F files) 973677444aSSatish Balay# 9860262a0eSSatish Balaybuild_c: 99efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" 10047794344SBarry Smith -@echo "=========================================" 10175198762SBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree 102c1959989SSatish Balay ${RANLIB} ${PDIR}/*.a 103d77bb2e1SSatish Balay -@chmod g+w ${PDIR}/*.a 1040b3634f8SBarry Smith -@echo "Completed building libraries" 10547794344SBarry Smith -@echo "=========================================" 1060b3634f8SBarry Smith 10735ca7349SBarry Smith# 10828881d8bSBarry Smith# Builds PETSc Fortran source 10911b6ed10SLois Curfman McInnes# Note: libfast cannot run on .F files on certain machines, so we 1109984b5c5SSatish Balay# use libf to compile the fortran source files. 111fa527775SLois Curfman McInnes# 11260262a0eSSatish Balaybuild_fortran: 11328881d8bSBarry Smith -@echo "BEGINNING TO COMPILE FORTRAN SOURCE" 11447794344SBarry Smith -@echo "=========================================" 115b16a3bb1SBarry Smith -@cd src/fortran/custom; \ 11628881d8bSBarry Smith ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libf clean 117971c2310SBarry Smith -@cd src/fortran/kernels; \ 1184a903031SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} libf clean 1199984b5c5SSatish Balay ${RANLIB} ${PDIR}/libpetscfortran.a 120d08da015SSatish Balay ${RANLIB} ${PDIR}/libpetsc.a 121d77bb2e1SSatish Balay -@chmod g+w ${PDIR}/*.a 12228881d8bSBarry Smith -@echo "Completed compiling Fortran source" 123971c2310SBarry Smith -@echo "=========================================" 124971c2310SBarry Smith 125efd74e9bSBarry Smithpetscblas: info chkpetsc_dir 126d77bb2e1SSatish Balay -${RM} -f ${PDIR}/libpetscblas.* 127efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE C VERSION OF BLAS AND LAPACK" 12866341c5dSSatish Balay -@echo "=========================================" 1296685cf94SSatish Balay -@cd src/blaslapack/c; \ 130d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree 131d77bb2e1SSatish Balay ${RANLIB} ${PDIR}/libpetscblas.a 132d77bb2e1SSatish Balay -@chmod g+w ${PDIR}/*.a 133229e8d5cSBarry Smith -@echo "Completed compiling C version of BLAS and LAPACK" 13466341c5dSSatish Balay -@echo "=========================================" 1358744090aSBarry Smith# 1363677444aSSatish Balay# Builds PETSc test examples for a given BOPT and architecture 1378744090aSBarry Smith# 1383677444aSSatish Balaytestexamples: info chkopts 1393677444aSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES" 1403677444aSSatish Balay -@echo "Due to different numerical round-off on certain" 1413677444aSSatish Balay -@echo "machines some of the numbers may not match exactly." 1423677444aSSatish Balay -@echo "=========================================" 1438744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_1 tree 1443677444aSSatish Balay -@echo "Completed compiling and running test examples" 1453677444aSSatish Balay -@echo "=========================================" 1463677444aSSatish Balaytestfortran: info chkopts 1473677444aSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES" 1483677444aSSatish Balay -@echo "=========================================" 1493677444aSSatish Balay -@echo "Due to different numerical round-off on certain" 1503677444aSSatish Balay -@echo "machines or the way Fortran formats numbers" 1513677444aSSatish Balay -@echo "some of the results may not match exactly." 1523677444aSSatish Balay -@echo "=========================================" 1538744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_3 tree 1543677444aSSatish Balay -@echo "Completed compiling and running Fortran test examples" 1553677444aSSatish Balay -@echo "=========================================" 15601c5c36fSSatish Balaytestexamples_uni: info chkopts 15701c5c36fSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES" 15801c5c36fSSatish Balay -@echo "Due to different numerical round-off on certain" 15901c5c36fSSatish Balay -@echo "machines some of the numbers may not match exactly." 16001c5c36fSSatish Balay -@echo "=========================================" 1618744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_4 tree 16201c5c36fSSatish Balay -@echo "Completed compiling and running uniprocessor test examples" 16301c5c36fSSatish Balay -@echo "=========================================" 1643677444aSSatish Balaytestfortran_uni: info chkopts 1653677444aSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN EXAMPLES" 1663677444aSSatish Balay -@echo "Due to different numerical round-off on certain" 1673677444aSSatish Balay -@echo "machines some of the numbers may not match exactly." 1683677444aSSatish Balay -@echo "=========================================" 1698744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_9 tree 1703677444aSSatish Balay -@echo "Completed compiling and running uniprocessor fortran test examples" 1713677444aSSatish Balay -@echo "=========================================" 17211b6dc0cSBarry Smithmatlabcodes: 17311b6dc0cSBarry Smith -@echo "BEGINNING TO COMPILE MATLAB INTERFACE" 17411b6dc0cSBarry Smith -@cd src/sys/src/viewer/impls/socket/matlab; ${OMAKE} BOPT=g matlabcodes PETSC_ARCH=${PETSC_ARCH} 175ad96cc0dSLois Curfman McInnes 176f3eacedaSSatish Balay# Ranlib on the libraries 1778c37ef55SBarry Smithranlib: 178d77bb2e1SSatish Balay ${RANLIB} ${PDIR}/*.a 17961523587SBarry Smith 18011b6ed10SLois Curfman McInnes# Deletes PETSc libraries 181f3eacedaSSatish Balaydeletelibs: chkopts_basic 182d77bb2e1SSatish Balay -${RM} -f ${PDIR}/* 183d44968ceSBarry Smith 1843677444aSSatish Balay 1853677444aSSatish Balay# ------------------------------------------------------------------ 1863677444aSSatish Balay# 1873677444aSSatish Balay# All remaining actions are intended for PETSc developers only. 1883677444aSSatish Balay# PETSc users should not generally need to use these commands. 1893677444aSSatish Balay# 1903677444aSSatish Balay 19165783a8cSBarry Smith# To access the tags in EMACS, type M-x visit-tags-table and specify 19265783a8cSBarry Smith# the file petsc/TAGS. 19365783a8cSBarry Smith# 1) To move to where a PETSc function is defined, enter M-. and the 19465783a8cSBarry Smith# function name. 19565783a8cSBarry Smith# 2) To search for a string and move to the first occurrence, 19665783a8cSBarry Smith# use M-x tags-search and the string. 1977acb7333SLois Curfman McInnes# To locate later occurrences, use M-, 19811b6ed10SLois Curfman McInnes# Builds all etags files 19911b6ed10SLois Curfman McInnesalletags: 20001c05c5cSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags 20109f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_complete 20209f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_noexamples 20309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_examples 20409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_makefiles 20511b6ed10SLois Curfman McInnes# Builds the basic etags file. This should be employed by most users. 20620563c6bSBarry Smithetags: 20709f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS 20809f7043eSSatish Balay -touch ${TAGSDIR}/TAGS 20909f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcec alltree 21009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourceh alltree 21109f7043eSSatish Balay -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcef alltree 21209f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesc alltree 21309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesf alltree 21409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesch alltree 21509f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesfh alltree 21609f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_makefile alltree 21709f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS etags_bmakefiles 21855194d7eSSatish Balay -chmod g+w TAGS 21929cdf679SBarry Smith# Builds complete etags list; only for PETSc developers. 22029cdf679SBarry Smithetags_complete: 22109f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_COMPLETE 22209f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_COMPLETE 22309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcec alltree 22409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourceh alltree 22509f7043eSSatish Balay -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcef alltree 22609f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesc alltree 22709f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesf alltree 22809f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesch alltree 22909f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesfh alltree 23009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_makefile alltree 23109f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE etags_bmakefiles 23209f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_docs alltree 23309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_scripts alltree 23455194d7eSSatish Balay -chmod g+w TAGS_COMPLETE 23511b6ed10SLois Curfman McInnes# Builds the etags file that excludes the examples directories 236bfce26a3SBarry Smithetags_noexamples: 23709f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_NO_EXAMPLES 23809f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_NO_EXAMPLES 23909f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcec alltree 24009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourceh alltree 24109f7043eSSatish Balay -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcef alltree 24209f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_makefile alltree 24309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES etags_bmakefiles 24409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_docs alltree 24555194d7eSSatish Balay -chmod g+w TAGS_NO_EXAMPLES 24611b6ed10SLois Curfman McInnes# Builds the etags file for makefiles 247b16a3bb1SBarry Smithetags_makefiles: 2487e0368d4SSatish Balay -${RM} ${TAGSDIR}/TAGS_MAKEFILES 2497e0368d4SSatish Balay -touch ${TAGSDIR}/TAGS_MAKEFILES 2507e0368d4SSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES ACTION=etags_makefile alltree 2517e0368d4SSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES etags_bmakefiles 2527e0368d4SSatish Balay -chmod g+w TAGS_MAKEFILES 253dc80aa23SSatish Balay# Builds the etags file for examples 254dc80aa23SSatish Balayetags_examples: 25509f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_EXAMPLES 25609f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_EXAMPLES 25709f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesc alltree 25809f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesch alltree 25909f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesf alltree 26009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 26155194d7eSSatish Balay -chmod g+w TAGS_EXAMPLES 2622176044fSSatish Balayetags_fexamples: 26309f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_FEXAMPLES 26409f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_FEXAMPLES 26509f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_FEXAMPLES ACTION=etags_examplesf alltree 26609f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 2672176044fSSatish Balay -chmod g+w TAGS_FEXAMPLES 268b38bb785SSatish Balay# 269f20f7ba3SSatish Balay# These are here for the target allci and allco, and etags 2703677444aSSatish Balay# 271b38bb785SSatish Balay 272f0475f33SSatish BalayBMAKEFILES = bmake/common* bmake/*/base bmake/*/base_variables bmake/*/base.site \ 273b8adb7afSBarry Smith bmake/*/petscconf.h bmake/*/petscfix.h bmake/win32/makefile.dos bin/config/base*.in \ 274b8adb7afSBarry Smith bmake/*/buildtest 2752f1ebae6SLois Curfman McInnesDOCS = bmake/readme bmake/petscconf.defs 27657c4596dSSatish BalaySCRIPTS = maint/addlinks maint/builddist maint/buildlinks maint/wwwman \ 27757c4596dSSatish Balay maint/xclude maint/crontab \ 27857c4596dSSatish Balay maint/autoftp include/foldinclude/generateincludes 27911b6ed10SLois Curfman McInnes 2807f52c680SSatish Balay# Builds all the documentation - should be done every night 2817f52c680SSatish Balayalldoc: allmanpages 282e15d8129SBarry Smith cd docs/tex/manual; ${OMAKE} manual.dvi manual.ps manual.html splitmanual.html 2837f52c680SSatish Balay 2842496ca06SSatish Balay# Deletes man pages (HTML version) 2852496ca06SSatish Balaydeletemanualpages: 286ba79c590SSatish Balay ${RM} -f ${PETSC_DIR}/docs/manualpages/*/*.html \ 28745f11a08SBarry Smith ${PETSC_DIR}/docs/manualpages/manualpages.cit 2882496ca06SSatish Balay 2892496ca06SSatish Balay# Deletes man pages (LaTeX version) 2902496ca06SSatish Balaydeletelatexpages: 2912496ca06SSatish Balay ${RM} -f ${PETSC_DIR}/docs/tex/rsum/*sum*.tex 2922496ca06SSatish Balay 29311b6ed10SLois Curfman McInnes# Builds all versions of the man pages 29431ef0484SBarry Smithallmanpages: allmanualpages 295981c4779SBarry Smithallmanualpages: deletemanualpages 2967c922b88SBarry Smith -${OMAKE} ACTION=manualpages_buildcite ttree 2977c922b88SBarry Smith -${OMAKE} ACTION=manualpages ttree 298dfd40236SSatish Balay -maint/wwwindex.py ${PETSC_DIR} 299981c4779SBarry Smith -maint/examplesindex.tcl 300f8cfbf3fSSatish Balay -maint/htmlkeywords.tcl 301ba79c590SSatish Balay -@chmod g+w docs/manualpages/*/*.html 302e01137a2SSatish Balay 303416022c9SBarry Smithalllatexpages: deletelatexpages 3047c922b88SBarry Smith -${OMAKE} ACTION=latexpages ttree 30551c61065SBarry Smith -@chmod g+w docs/tex/rsum/* 306416022c9SBarry Smith 30711b6ed10SLois Curfman McInnes# Builds Fortran stub files 30811b6ed10SLois Curfman McInnesallfortranstubs: 30926cd32c0SSatish Balay -@include/foldinclude/generateincludes 310d77bb2e1SSatish Balay -@${RM} -f src/fortran/auto/*.c 3117c922b88SBarry Smith -${OMAKE} ACTION=fortranstubs ttree 312b9917d27SSatish Balay -@cd src/fortran/auto; ${OMAKE} fixfortran 3130a0eb2c5SBarry Smith chmod g+w src/fortran/auto/*.c 314f6ff2982SSatish Balay 315d55938c2SBarry Smithallci: 316f20f7ba3SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=ci alltree 317b951964fSBarry Smith 318d55938c2SBarry Smithallco: 319f20f7ba3SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=co alltree 320d55938c2SBarry Smith 321b334301eSBarry Smith# 322b334301eSBarry Smith# The commands below are for generating ADIC versions of the code; 323b334301eSBarry Smith# they are not currently used. 324b334301eSBarry Smith# 3255eea60f9SBarry Smithalladicignore: 326d77bb2e1SSatish Balay -@${RM} ${PDIR}/adicignore 327d77bb2e1SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore tree 3285eea60f9SBarry Smith 3295eea60f9SBarry Smithalladic: 330d18b0ea7SBarry Smith -@echo "Beginning to compile ADIC source code in all directories" 33167b024f7SSatish Balay -@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}" 332d18b0ea7SBarry Smith -@echo "=========================================" 33347794344SBarry Smith -@cd include ; \ 33467b024f7SSatish Balay ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petsc.h 335d77bb2e1SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 33647794344SBarry Smith -@cd src/inline ; \ 337d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic 33877ed5343SBarry Smith -@cd src/blaslapack ; \ 339d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 3406e81b665SBarry Smith 34147794344SBarry Smithalladiclib: 342d18b0ea7SBarry Smith -@echo "Beginning to compile ADIC libraries in all directories" 343d77bb2e1SSatish Balay -@echo "Using compiler: ${CC} ${COPTFLAGS}" 344d18b0ea7SBarry Smith -@echo "-----------------------------------------" 345d77bb2e1SSatish Balay -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 346d18b0ea7SBarry Smith -@echo "-----------------------------------------" 347e0e703c1SSatish Balay -@echo "Using configuration flags:" 348e0e703c1SSatish Balay -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 349d18b0ea7SBarry Smith -@echo "-----------------------------------------" 350d77bb2e1SSatish Balay -@echo "Using include paths: ${PETSC_INCLUDE}" 351d18b0ea7SBarry Smith -@echo "-----------------------------------------" 352d77bb2e1SSatish Balay -@echo "Using PETSc directory: ${PETSC_DIR}" 353d77bb2e1SSatish Balay -@echo "Using PETSc arch: ${PETSC_ARCH}" 354d18b0ea7SBarry Smith -@echo "=========================================" 355d77bb2e1SSatish Balay -@${RM} -f ${PDIR}/*adic.a 356d77bb2e1SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 35777ed5343SBarry Smith -@cd src/blaslapack ; \ 358d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 3597e351921SBarry Smith -@cd src/adic/src ; \ 360d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib 3615eea60f9SBarry Smith 3629e417c50SSatish Balay# ------------------------------------------------------------------------------- 3639e417c50SSatish Balay# 3649e417c50SSatish Balay# Some macros to check if the fortran interface is up-to-date. 3659e417c50SSatish Balay# 3669e417c50SSatish Balaycountfortranfunctions: 367d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 36885c7cd6cSSatish Balay cut -d'(' -f1 | tr -s ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 3699e417c50SSatish Balay sed "s/_$$//" | sort > /tmp/countfortranfunctions 370b334301eSBarry Smith 3719e417c50SSatish Balaycountcfunctions: 37285c7cd6cSSatish Balay -@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s ' ' | \ 37385c7cd6cSSatish Balay cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' | \ 3749e417c50SSatish Balay tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 3759e417c50SSatish Balay 3769e417c50SSatish Balaydifffortranfunctions: countfortranfunctions countcfunctions 3779e417c50SSatish Balay -@echo -------------- Functions missing in the fortran interface --------------------- 3789e417c50SSatish Balay -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 3799e417c50SSatish Balay -@echo ----------------- Functions missing in the C interface ------------------------ 3809e417c50SSatish Balay -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 381d77bb2e1SSatish Balay -@${RM} /tmp/countcfunctions /tmp/countfortranfunctions 382b334301eSBarry Smith 3833f4c9a3aSSatish Balaycheckbadfortranstubs: 3843f4c9a3aSSatish Balay -@echo "=========================================" 3853f4c9a3aSSatish Balay -@echo "Functions with MPI_Comm as an Argument" 3863f4c9a3aSSatish Balay -@echo "=========================================" 387d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 38885c7cd6cSSatish Balay tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 3893f4c9a3aSSatish Balay -@echo "=========================================" 3903f4c9a3aSSatish Balay -@echo "Functions with a String as an Argument" 3913f4c9a3aSSatish Balay -@echo "=========================================" 392d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 39385c7cd6cSSatish Balay tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 3943f4c9a3aSSatish Balay -@echo "=========================================" 3953f4c9a3aSSatish Balay -@echo "Functions with Pointers to PETSc Objects as Argument" 3963f4c9a3aSSatish Balay -@echo "=========================================" 397d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran/auto; \ 39885c7cd6cSSatish Balay _p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \ 39985c7cd6cSSatish Balay cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ 4003f4c9a3aSSatish Balay sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 4013f4c9a3aSSatish Balay for OBJ in $$_p_OBJ; do \ 40285c7cd6cSSatish Balay grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \ 4033f4c9a3aSSatish Balay cut -d'(' -f1 | cut -d' ' -f1,3; \ 4043f4c9a3aSSatish Balay done 4053677444aSSatish Balay# Builds noise routines (not yet publically available) 4063677444aSSatish Balay# Note: libfast cannot run on .F files on certain machines, so we 4073677444aSSatish Balay# use lib and check for errors here. 4083677444aSSatish Balaynoise: info chkpetsc_dir 4093677444aSSatish Balay -@echo "Beginning to compile noise routines" 4103677444aSSatish Balay -@echo "=========================================" 4113677444aSSatish Balay -@cd src/snes/interface/noise; \ 4123677444aSSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 4133677444aSSatish Balay grep -v clog trashz | grep -v "information sections" | \ 4143677444aSSatish Balay egrep -i '(Error|warning|Can)' >> /dev/null;\ 4153677444aSSatish Balay if [ "$$?" != 1 ]; then \ 4163677444aSSatish Balay cat trashz ; fi; ${RM} trashz 4173677444aSSatish Balay ${RANLIB} ${PDIR}/libpetscsnes.a 4183677444aSSatish Balay -@chmod g+w ${PDIR}/libpetscsnes.a 4193677444aSSatish Balay -@echo "Completed compiling noise routines" 4203677444aSSatish Balay -@echo "=========================================" 4213677444aSSatish Balay 4224556b810SBarry Smith# 4234556b810SBarry Smith# Automatically generates PETSc exercises in html from the tutorial examples. 4244556b810SBarry Smith# The introduction for each section is obtained from docs/manualpages/bop.${MANSEC} 4254556b810SBarry Smith# The list of exercises from TUTORIALS in each directories makefile 4264556b810SBarry Smith# DO NOT EDIT the pageform.txt or *.htm files generated since they will be automatically replaced. 4274556b810SBarry Smith# The pagemaker rule is in the file bmake/common (at the bottom) 4284556b810SBarry Smith# 429*843ae28eSBarry Smith# Eventually the line below will replace the two cd in the rule below, it is just this way now for speed 43097e8d271SBarry Smith# -@${OMAKE} PETSC_DIR=${PETSC_DIR} pagemaker 431*843ae28eSBarry Smith# 43297e8d271SBarry Smithexercises: 43397e8d271SBarry Smith -@echo "=========================================" 43497e8d271SBarry Smith -@echo "Generating HTML tutorial exercises" 43597e8d271SBarry Smith -@rm -f docs/pageform.txt 43697e8d271SBarry Smith -@echo "title=\"PETSc Exercises\"" > docs/pageform.txt 43797e8d271SBarry Smith -@echo "access_title=Exercise Sections" >> docs/pageform.txt 43897e8d271SBarry Smith -@echo "access_format=short" >> pageform.txt 43997e8d271SBarry Smith -@echo "startpage=../exercises/introduction.htm" >> docs/pageform.txt 44097e8d271SBarry Smith -@echo "NONE title=\"Introduction\" command=link src=../exercises/introduction.htm" >> docs/pageform.txt 44197e8d271SBarry Smith -@echo "Generating HTML for individual directories" 44297e8d271SBarry Smith -@echo "=========================================" 44397e8d271SBarry Smith cd src/vec/examples/tutorials; ${OMAKE} PETSC_DIR=${PETSC_DIR} pagemaker 44497e8d271SBarry Smith cd src/snes/examples/tutorials; ${OMAKE} PETSC_DIR=${PETSC_DIR} pagemaker 44597e8d271SBarry Smith -@echo "Completed HTML for individual directories" 44697e8d271SBarry Smith -@echo "NONE title=\"<HR>\" " >> docs/pageform.txt; 44797e8d271SBarry Smith -@echo "NONE title=\"PETSc Documentation\" command=link src=../index.html target=replace" >> docs/pageform.txt 44897e8d271SBarry Smith /home/MPI/class/mpiexmpl/maint/makepage.new -pageform=docs/pageform.txt -access_extra=/dev/null -outdir=docs/exercises 44997e8d271SBarry Smith -@echo "=========================================" 45097e8d271SBarry Smith 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 466