1*beb1b3a5SBarry Smith# $Id: makefile,v 1.320 2000/09/15 16:57:57 balay 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 1209984b5c5SSatish Balay ${RANLIB} ${PDIR}/libpetscfortran.a 121d08da015SSatish Balay ${RANLIB} ${PDIR}/libpetsc.a 122d77bb2e1SSatish Balay -@chmod g+w ${PDIR}/*.a 12328881d8bSBarry Smith -@echo "Completed compiling Fortran source" 124971c2310SBarry Smith -@echo "=========================================" 125971c2310SBarry Smith 126efd74e9bSBarry Smithpetscblas: info chkpetsc_dir 127d77bb2e1SSatish Balay -${RM} -f ${PDIR}/libpetscblas.* 128efd74e9bSBarry Smith -@echo "BEGINNING TO COMPILE C VERSION OF BLAS AND LAPACK" 12966341c5dSSatish Balay -@echo "=========================================" 1306685cf94SSatish Balay -@cd src/blaslapack/c; \ 131d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=libfast tree 132d77bb2e1SSatish Balay ${RANLIB} ${PDIR}/libpetscblas.a 133d77bb2e1SSatish Balay -@chmod g+w ${PDIR}/*.a 134229e8d5cSBarry Smith -@echo "Completed compiling C version of BLAS and LAPACK" 13566341c5dSSatish Balay -@echo "=========================================" 1368744090aSBarry Smith# 1373677444aSSatish Balay# Builds PETSc test examples for a given BOPT and architecture 1388744090aSBarry Smith# 1393677444aSSatish Balaytestexamples: info chkopts 1403677444aSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN TEST EXAMPLES" 1413677444aSSatish Balay -@echo "Due to different numerical round-off on certain" 1423677444aSSatish Balay -@echo "machines some of the numbers may not match exactly." 1433677444aSSatish Balay -@echo "=========================================" 1448744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_1 tree 1453677444aSSatish Balay -@echo "Completed compiling and running test examples" 1463677444aSSatish Balay -@echo "=========================================" 1473677444aSSatish Balaytestfortran: info chkopts 1483677444aSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN FORTRAN TEST EXAMPLES" 1493677444aSSatish Balay -@echo "=========================================" 1503677444aSSatish Balay -@echo "Due to different numerical round-off on certain" 1513677444aSSatish Balay -@echo "machines or the way Fortran formats numbers" 1523677444aSSatish Balay -@echo "some of the results may not match exactly." 1533677444aSSatish Balay -@echo "=========================================" 1548744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_3 tree 1553677444aSSatish Balay -@echo "Completed compiling and running Fortran test examples" 1563677444aSSatish Balay -@echo "=========================================" 15701c5c36fSSatish Balaytestexamples_uni: info chkopts 15801c5c36fSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR EXAMPLES" 15901c5c36fSSatish Balay -@echo "Due to different numerical round-off on certain" 16001c5c36fSSatish Balay -@echo "machines some of the numbers may not match exactly." 16101c5c36fSSatish Balay -@echo "=========================================" 1628744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_4 tree 16301c5c36fSSatish Balay -@echo "Completed compiling and running uniprocessor test examples" 16401c5c36fSSatish Balay -@echo "=========================================" 1653677444aSSatish Balaytestfortran_uni: info chkopts 1663677444aSSatish Balay -@echo "BEGINNING TO COMPILE AND RUN TEST UNI-PROCESSOR FORTRAN EXAMPLES" 1673677444aSSatish Balay -@echo "Due to different numerical round-off on certain" 1683677444aSSatish Balay -@echo "machines some of the numbers may not match exactly." 1693677444aSSatish Balay -@echo "=========================================" 1708744090aSBarry Smith -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=testexamples_9 tree 1713677444aSSatish Balay -@echo "Completed compiling and running uniprocessor fortran test examples" 1723677444aSSatish Balay -@echo "=========================================" 17311b6dc0cSBarry Smithmatlabcodes: 17411b6dc0cSBarry Smith -@echo "BEGINNING TO COMPILE MATLAB INTERFACE" 17511b6dc0cSBarry Smith -@cd src/sys/src/viewer/impls/socket/matlab; ${OMAKE} BOPT=g matlabcodes PETSC_ARCH=${PETSC_ARCH} 176ad96cc0dSLois Curfman McInnes 177f3eacedaSSatish Balay# Ranlib on the libraries 1788c37ef55SBarry Smithranlib: 179d77bb2e1SSatish Balay ${RANLIB} ${PDIR}/*.a 18061523587SBarry Smith 18111b6ed10SLois Curfman McInnes# Deletes PETSc libraries 182f3eacedaSSatish Balaydeletelibs: chkopts_basic 183d77bb2e1SSatish Balay -${RM} -f ${PDIR}/* 184d44968ceSBarry Smith 1853677444aSSatish Balay 1863677444aSSatish Balay# ------------------------------------------------------------------ 1873677444aSSatish Balay# 1883677444aSSatish Balay# All remaining actions are intended for PETSc developers only. 1893677444aSSatish Balay# PETSc users should not generally need to use these commands. 1903677444aSSatish Balay# 1913677444aSSatish Balay 19265783a8cSBarry Smith# To access the tags in EMACS, type M-x visit-tags-table and specify 19365783a8cSBarry Smith# the file petsc/TAGS. 19465783a8cSBarry Smith# 1) To move to where a PETSc function is defined, enter M-. and the 19565783a8cSBarry Smith# function name. 19665783a8cSBarry Smith# 2) To search for a string and move to the first occurrence, 19765783a8cSBarry Smith# use M-x tags-search and the string. 1987acb7333SLois Curfman McInnes# To locate later occurrences, use M-, 19911b6ed10SLois Curfman McInnes# Builds all etags files 20011b6ed10SLois Curfman McInnesalletags: 20101c05c5cSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags 20209f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_complete 20309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_noexamples 20409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_examples 20509f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSDIR=${PETSC_DIR} etags_makefiles 20611b6ed10SLois Curfman McInnes# Builds the basic etags file. This should be employed by most users. 20720563c6bSBarry Smithetags: 20809f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS 20909f7043eSSatish Balay -touch ${TAGSDIR}/TAGS 21009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcec alltree 21109f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourceh alltree 21209f7043eSSatish Balay -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_sourcef alltree 21309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesc alltree 21409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesf alltree 21509f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesch alltree 21609f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_examplesfh alltree 21709f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS ACTION=etags_makefile alltree 21809f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS etags_bmakefiles 21955194d7eSSatish Balay -chmod g+w TAGS 22029cdf679SBarry Smith# Builds complete etags list; only for PETSc developers. 22129cdf679SBarry Smithetags_complete: 22209f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_COMPLETE 22309f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_COMPLETE 22409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcec alltree 22509f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourceh alltree 22609f7043eSSatish Balay -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_sourcef alltree 22709f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesc alltree 22809f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesf alltree 22909f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesch alltree 23009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_examplesfh alltree 23109f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_makefile alltree 23209f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE etags_bmakefiles 23309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_docs alltree 23409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_COMPLETE ACTION=etags_scripts alltree 23555194d7eSSatish Balay -chmod g+w TAGS_COMPLETE 23611b6ed10SLois Curfman McInnes# Builds the etags file that excludes the examples directories 237bfce26a3SBarry Smithetags_noexamples: 23809f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_NO_EXAMPLES 23909f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_NO_EXAMPLES 24009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcec alltree 24109f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourceh alltree 24209f7043eSSatish Balay -cd src/fortran; ${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_sourcef alltree 24309f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_makefile alltree 24409f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES etags_bmakefiles 24509f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_NO_EXAMPLES ACTION=etags_docs alltree 24655194d7eSSatish Balay -chmod g+w TAGS_NO_EXAMPLES 24711b6ed10SLois Curfman McInnes# Builds the etags file for makefiles 248b16a3bb1SBarry Smithetags_makefiles: 2497e0368d4SSatish Balay -${RM} ${TAGSDIR}/TAGS_MAKEFILES 2507e0368d4SSatish Balay -touch ${TAGSDIR}/TAGS_MAKEFILES 2517e0368d4SSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES ACTION=etags_makefile alltree 2527e0368d4SSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_MAKEFILES etags_bmakefiles 2537e0368d4SSatish Balay -chmod g+w TAGS_MAKEFILES 254dc80aa23SSatish Balay# Builds the etags file for examples 255dc80aa23SSatish Balayetags_examples: 25609f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_EXAMPLES 25709f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_EXAMPLES 25809f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesc alltree 25909f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesch alltree 26009f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesf alltree 26109f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 26255194d7eSSatish Balay -chmod g+w TAGS_EXAMPLES 2632176044fSSatish Balayetags_fexamples: 26409f7043eSSatish Balay -${RM} ${TAGSDIR}/TAGS_FEXAMPLES 26509f7043eSSatish Balay -touch ${TAGSDIR}/TAGS_FEXAMPLES 26609f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_FEXAMPLES ACTION=etags_examplesf alltree 26709f7043eSSatish Balay -${OMAKE} PETSC_DIR=${PETSC_DIR} TAGSFILE=${TAGSDIR}/TAGS_EXAMPLES ACTION=etags_examplesfh alltree 2682176044fSSatish Balay -chmod g+w TAGS_FEXAMPLES 269b38bb785SSatish Balay# 270f20f7ba3SSatish Balay# These are here for the target allci and allco, and etags 2713677444aSSatish Balay# 272b38bb785SSatish Balay 273f0475f33SSatish BalayBMAKEFILES = bmake/common* bmake/*/base bmake/*/base_variables bmake/*/base.site \ 274b8adb7afSBarry Smith bmake/*/petscconf.h bmake/*/petscfix.h bmake/win32/makefile.dos bin/config/base*.in \ 275b8adb7afSBarry Smith bmake/*/buildtest 2762f1ebae6SLois Curfman McInnesDOCS = bmake/readme bmake/petscconf.defs 27757c4596dSSatish BalaySCRIPTS = maint/addlinks maint/builddist maint/buildlinks maint/wwwman \ 27857c4596dSSatish Balay maint/xclude maint/crontab \ 27957c4596dSSatish Balay maint/autoftp include/foldinclude/generateincludes 28011b6ed10SLois Curfman McInnes 2817f52c680SSatish Balay# Builds all the documentation - should be done every night 282074fadd8SSatish Balayalldoc: allmanualpages 283e15d8129SBarry Smith cd docs/tex/manual; ${OMAKE} manual.dvi manual.ps manual.html splitmanual.html 2847f52c680SSatish Balay 2852496ca06SSatish Balay# Deletes man pages (HTML version) 2862496ca06SSatish Balaydeletemanualpages: 287ba79c590SSatish Balay ${RM} -f ${PETSC_DIR}/docs/manualpages/*/*.html \ 28845f11a08SBarry Smith ${PETSC_DIR}/docs/manualpages/manualpages.cit 2892496ca06SSatish Balay 29011b6ed10SLois Curfman McInnes# Builds all versions of the man pages 291981c4779SBarry Smithallmanualpages: deletemanualpages 2927c922b88SBarry Smith -${OMAKE} ACTION=manualpages_buildcite ttree 2937c922b88SBarry Smith -${OMAKE} ACTION=manualpages ttree 294dfd40236SSatish Balay -maint/wwwindex.py ${PETSC_DIR} 295baa90677SBarry Smith -${OMAKE} ACTION=manexamples tree 296*beb1b3a5SBarry Smith -${OMAKE} manconcepts 297*beb1b3a5SBarry Smith -${OMAKE} ACTION=exampleconcepts tree 298ba79c590SSatish Balay -@chmod g+w docs/manualpages/*/*.html 299e01137a2SSatish Balay 30011b6ed10SLois Curfman McInnes# Builds Fortran stub files 30111b6ed10SLois Curfman McInnesallfortranstubs: 30226cd32c0SSatish Balay -@include/foldinclude/generateincludes 303d77bb2e1SSatish Balay -@${RM} -f src/fortran/auto/*.c 3047c922b88SBarry Smith -${OMAKE} ACTION=fortranstubs ttree 305b9917d27SSatish Balay -@cd src/fortran/auto; ${OMAKE} fixfortran 3060a0eb2c5SBarry Smith chmod g+w src/fortran/auto/*.c 307f6ff2982SSatish Balay 308d55938c2SBarry Smithallci: 309f20f7ba3SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=ci alltree 310b951964fSBarry Smith 311d55938c2SBarry Smithallco: 312f20f7ba3SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=co alltree 313d55938c2SBarry Smith 314791d64f4SSatish Balay# usage make allrcslabel NEW_RCS_LABEL=v_2_0_28 315791d64f4SSatish Balayallrcslabel: 316791d64f4SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} NEW_RCS_LABEL=${NEW_RCS_LABEL} ACTION=rcslabel alltree 317b334301eSBarry Smith# 318b334301eSBarry Smith# The commands below are for generating ADIC versions of the code; 319b334301eSBarry Smith# they are not currently used. 320b334301eSBarry Smith# 3215eea60f9SBarry Smithalladicignore: 322d77bb2e1SSatish Balay -@${RM} ${PDIR}/adicignore 323d77bb2e1SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adicignore tree 3245eea60f9SBarry Smith 3255eea60f9SBarry Smithalladic: 326d18b0ea7SBarry Smith -@echo "Beginning to compile ADIC source code in all directories" 32767b024f7SSatish Balay -@echo "Using ADIC compiler: ${ADIC_CC} ${CCPPFLAGS}" 328d18b0ea7SBarry Smith -@echo "=========================================" 32947794344SBarry Smith -@cd include ; \ 33067b024f7SSatish Balay ${ADIC_CC} -s -f 1 ${CCPPFLAGS} petsc.h 331d77bb2e1SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 33247794344SBarry Smith -@cd src/inline ; \ 333d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} adic 33477ed5343SBarry Smith -@cd src/blaslapack ; \ 335d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adic tree 3366e81b665SBarry Smith 33747794344SBarry Smithalladiclib: 338d18b0ea7SBarry Smith -@echo "Beginning to compile ADIC libraries in all directories" 339d77bb2e1SSatish Balay -@echo "Using compiler: ${CC} ${COPTFLAGS}" 340d18b0ea7SBarry Smith -@echo "-----------------------------------------" 341d77bb2e1SSatish Balay -@echo "Using PETSc flags: ${PETSCFLAGS} ${PCONF}" 342d18b0ea7SBarry Smith -@echo "-----------------------------------------" 343e0e703c1SSatish Balay -@echo "Using configuration flags:" 344e0e703c1SSatish Balay -@grep "define " bmake/${PETSC_ARCH}/petscconf.h 345d18b0ea7SBarry Smith -@echo "-----------------------------------------" 346d77bb2e1SSatish Balay -@echo "Using include paths: ${PETSC_INCLUDE}" 347d18b0ea7SBarry Smith -@echo "-----------------------------------------" 348d77bb2e1SSatish Balay -@echo "Using PETSc directory: ${PETSC_DIR}" 349d77bb2e1SSatish Balay -@echo "Using PETSc arch: ${PETSC_ARCH}" 350d18b0ea7SBarry Smith -@echo "=========================================" 351d77bb2e1SSatish Balay -@${RM} -f ${PDIR}/*adic.a 352d77bb2e1SSatish Balay -@${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 35377ed5343SBarry Smith -@cd src/blaslapack ; \ 354d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} ACTION=adiclib tree 3557e351921SBarry Smith -@cd src/adic/src ; \ 356d77bb2e1SSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib 3575eea60f9SBarry Smith 3589e417c50SSatish Balay# ------------------------------------------------------------------------------- 3599e417c50SSatish Balay# 3609e417c50SSatish Balay# Some macros to check if the fortran interface is up-to-date. 3619e417c50SSatish Balay# 3629e417c50SSatish Balaycountfortranfunctions: 363d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran; egrep '^void' custom/*.c auto/*.c | \ 36485c7cd6cSSatish Balay cut -d'(' -f1 | tr -s ' ' | cut -d' ' -f2 | uniq | egrep -v "(^$$|Petsc)" | \ 3659e417c50SSatish Balay sed "s/_$$//" | sort > /tmp/countfortranfunctions 366b334301eSBarry Smith 3679e417c50SSatish Balaycountcfunctions: 36885c7cd6cSSatish Balay -@ grep extern ${PETSC_DIR}/include/*.h *.h | grep "(" | tr -s ' ' | \ 36985c7cd6cSSatish Balay cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' | \ 3709e417c50SSatish Balay tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions 3719e417c50SSatish Balay 3729e417c50SSatish Balaydifffortranfunctions: countfortranfunctions countcfunctions 3739e417c50SSatish Balay -@echo -------------- Functions missing in the fortran interface --------------------- 3749e417c50SSatish Balay -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 3759e417c50SSatish Balay -@echo ----------------- Functions missing in the C interface ------------------------ 3769e417c50SSatish Balay -@diff /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 377d77bb2e1SSatish Balay -@${RM} /tmp/countcfunctions /tmp/countfortranfunctions 378b334301eSBarry Smith 3793f4c9a3aSSatish Balaycheckbadfortranstubs: 3803f4c9a3aSSatish Balay -@echo "=========================================" 3813f4c9a3aSSatish Balay -@echo "Functions with MPI_Comm as an Argument" 3823f4c9a3aSSatish Balay -@echo "=========================================" 383d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'MPI_Comm' | \ 38485c7cd6cSSatish Balay tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 3853f4c9a3aSSatish Balay -@echo "=========================================" 3863f4c9a3aSSatish Balay -@echo "Functions with a String as an Argument" 3873f4c9a3aSSatish Balay -@echo "=========================================" 388d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran/auto; grep '^void' *.c | grep 'char \*' | \ 38985c7cd6cSSatish Balay tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3 3903f4c9a3aSSatish Balay -@echo "=========================================" 3913f4c9a3aSSatish Balay -@echo "Functions with Pointers to PETSc Objects as Argument" 3923f4c9a3aSSatish Balay -@echo "=========================================" 393d77bb2e1SSatish Balay -@cd ${PETSC_DIR}/src/fortran/auto; \ 39485c7cd6cSSatish Balay _p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \ 39585c7cd6cSSatish Balay cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ 3963f4c9a3aSSatish Balay sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ 3973f4c9a3aSSatish Balay for OBJ in $$_p_OBJ; do \ 39885c7cd6cSSatish Balay grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \ 3993f4c9a3aSSatish Balay cut -d'(' -f1 | cut -d' ' -f1,3; \ 4003f4c9a3aSSatish Balay done 4013677444aSSatish Balay# Builds noise routines (not yet publically available) 4023677444aSSatish Balay# Note: libfast cannot run on .F files on certain machines, so we 4033677444aSSatish Balay# use lib and check for errors here. 4043677444aSSatish Balaynoise: info chkpetsc_dir 4053677444aSSatish Balay -@echo "Beginning to compile noise routines" 4063677444aSSatish Balay -@echo "=========================================" 4073677444aSSatish Balay -@cd src/snes/interface/noise; \ 4083677444aSSatish Balay ${OMAKE} BOPT=${BOPT} PETSC_ARCH=${PETSC_ARCH} lib > trashz 2>&1; \ 4093677444aSSatish Balay grep -v clog trashz | grep -v "information sections" | \ 4103677444aSSatish Balay egrep -i '(Error|warning|Can)' >> /dev/null;\ 4113677444aSSatish Balay if [ "$$?" != 1 ]; then \ 4123677444aSSatish Balay cat trashz ; fi; ${RM} trashz 4133677444aSSatish Balay ${RANLIB} ${PDIR}/libpetscsnes.a 4143677444aSSatish Balay -@chmod g+w ${PDIR}/libpetscsnes.a 4153677444aSSatish Balay -@echo "Completed compiling noise routines" 4163677444aSSatish Balay -@echo "=========================================" 4173677444aSSatish Balay 4184556b810SBarry Smith# 4194556b810SBarry Smith# Automatically generates PETSc exercises in html from the tutorial examples. 420b6ea66eeSBarry Smith# 421b6ea66eeSBarry Smith# The introduction for each section is obtained from docs/manualpages/bop.${MANSEC} is under RCS and may be edited 422b6ea66eeSBarry Smith# (used also in introductions to the manual pages) 423b6ea66eeSBarry Smith# The overall introduction is in docs/exercises/introduction.html and is under RCS and may be edited 424b6ea66eeSBarry Smith# The list of exercises is from TUTORIALS in each directory's makefile 425b6ea66eeSBarry Smith# 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# 429843ae28eSBarry 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 431843ae28eSBarry 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 438*beb1b3a5SBarry Smith -@echo "access_format=short" >> docs/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 "=========================================" 443*beb1b3a5SBarry Smith -@${OMAKE} PETSC_DIR=${PETSC_DIR} ACTION=pagemaker tree 44497e8d271SBarry Smith -@echo "Completed HTML for individual directories" 44597e8d271SBarry Smith -@echo "NONE title=\"<HR>\" " >> docs/pageform.txt; 44697e8d271SBarry Smith -@echo "NONE title=\"PETSc Documentation\" command=link src=../index.html target=replace" >> docs/pageform.txt 44797e8d271SBarry Smith /home/MPI/class/mpiexmpl/maint/makepage.new -pageform=docs/pageform.txt -access_extra=/dev/null -outdir=docs/exercises 44897e8d271SBarry Smith -@echo "=========================================" 44997e8d271SBarry Smith 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 465