Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2721 | Rev 2752 |
|---|---|
# |
# |
# This is the makefile for installing SLEPc. See the Users Manual |
# This is the makefile for installing SLEPc. See the Users Manual |
# for directions on installing SLEPc. |
# for directions on installing SLEPc. |
# |
# |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
# SLEPc - Scalable Library for Eigenvalue Problem Computations |
# SLEPc - Scalable Library for Eigenvalue Problem Computations |
# Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain |
# Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain |
# |
# |
# This file is part of SLEPc. |
# This file is part of SLEPc. |
# |
# |
# SLEPc is free software: you can redistribute it and/or modify it under the |
# SLEPc is free software: you can redistribute it and/or modify it under the |
# terms of version 3 of the GNU Lesser General Public License as published by |
# terms of version 3 of the GNU Lesser General Public License as published by |
# the Free Software Foundation. |
# the Free Software Foundation. |
# |
# |
# SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
# SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY |
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
# more details. |
# more details. |
# |
# |
# You should have received a copy of the GNU Lesser General Public License |
# You should have received a copy of the GNU Lesser General Public License |
# along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
# along with SLEPc. If not, see <http://www.gnu.org/licenses/>. |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
# |
# |
ALL: all |
ALL: all |
LOCDIR = . |
LOCDIR = . |
DIRS = src include docs |
DIRS = src include docs |
# Include the rest of makefiles |
# Include the rest of makefiles |
include ${SLEPC_DIR}/conf/slepc_common |
include ${SLEPC_DIR}/conf/slepc_common |
# |
# |
# Basic targets to build SLEPc library |
# Basic targets to build SLEPc library |
all: |
all: |
@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} chkpetsc_dir |
@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} chkpetsc_dir |
@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} chkslepc_dir |
@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} chkslepc_dir |
@if [ "${SLEPC_BUILD_USING_CMAKE}" != "" ]; then \ |
@if [ "${SLEPC_BUILD_USING_CMAKE}" != "" ]; then \ |
echo "=========================================="; \ |
echo "=========================================="; \ |
echo "Building SLEPc using CMake with ${MAKE_NP} build threads"; \ |
echo "Building SLEPc using CMake with ${MAKE_NP} build threads"; \ |
echo "Using SLEPC_DIR=${SLEPC_DIR}, PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}"; \ |
echo "Using SLEPC_DIR=${SLEPC_DIR}, PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}"; \ |
echo "=========================================="; \ |
echo "=========================================="; \ |
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all-cmake; \ |
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all-cmake; \ |
else \ |
else \ |
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all-legacy; \ |
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all-legacy; \ |
fi |
fi |
-@egrep -i "( error | error: |no such file or directory)" ${PETSC_ARCH}/conf/make.log > /dev/null; if [ "$$?" = "0" ]; then \ |
-@egrep -i "( error | error: |no such file or directory)" ${PETSC_ARCH}/conf/make.log > /dev/null; if [ "$$?" = "0" ]; then \ |
echo "********************************************************************"; \ |
echo "********************************************************************"; \ |
echo " Error during compile, check ${PETSC_ARCH}/conf/make.log"; \ |
echo " Error during compile, check ${PETSC_ARCH}/conf/make.log"; \ |
echo " Send all contents of ${PETSC_ARCH}/conf to slepc-maint@grycap.upv.es";\ |
echo " Send all contents of ${PETSC_ARCH}/conf to slepc-maint@grycap.upv.es";\ |
echo "********************************************************************"; \ |
echo "********************************************************************"; \ |
exit 1; \ |
exit 1; \ |
elif [ "${SLEPC_DESTDIR}" = "${SLEPC_DIR}/${PETSC_ARCH}" ]; then \ |
elif [ "${SLEPC_DESTDIR}" = "${SLEPC_DIR}/${PETSC_ARCH}" ]; then \ |
echo "Now to check if the library is working do: make test";\ |
echo "Now to check if the library is working do: make test";\ |
echo "=========================================";\ |
echo "=========================================";\ |
else \ |
else \ |
echo "Now to install the library do:";\ |
echo "Now to install the library do:";\ |
echo "make SLEPC_DIR=${PWD} PETSC_DIR=${PETSC_DIR} PETSC_ARCH=arch-installed-petsc install";\ |
echo "make SLEPC_DIR=${PWD} PETSC_DIR=${PETSC_DIR} PETSC_ARCH=arch-installed-petsc install";\ |
echo "=========================================";\ |
echo "=========================================";\ |
fi |
fi |
all-cmake: |
all-cmake: |
@${OMAKE} -j ${MAKE_NP} -C ${PETSC_ARCH} VERBOSE=1 2>&1 | tee ${PETSC_ARCH}/conf/make.log \ |
@${OMAKE} -j ${MAKE_NP} -C ${PETSC_ARCH} VERBOSE=1 2>&1 | tee ${PETSC_ARCH}/conf/make.log \ |
| egrep -v '( --check-build-system |cmake -E | -o CMakeFiles/slepc[[:lower:]]*.dir/| -o lib/libslepc|CMakeFiles/slepc[[:lower:]]*\.dir/(build|depend|requires)|-f CMakeFiles/Makefile2|Dependee .* is newer than depender |provides\.build. is up to date)' |
| egrep -v '( --check-build-system |cmake -E | -o CMakeFiles/slepc[[:lower:]]*.dir/| -o lib/libslepc|CMakeFiles/slepc[[:lower:]]*\.dir/(build|depend|requires)|-f CMakeFiles/Makefile2|Dependee .* is newer than depender |provides\.build. is up to date)' |
all-legacy: |
all-legacy: |
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all_build 2>&1 | tee ${PETSC_ARCH}/conf/make.log |
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all_build 2>&1 | tee ${PETSC_ARCH}/conf/make.log |
all_build: chk_petsc_dir chk_slepc_dir chklib_dir info deletelibs deletemods build slepc_shared slepc4py_noinstall |
all_build: chk_petsc_dir chk_slepc_dir chklib_dir info deletelibs deletemods build slepc_shared slepc4py_noinstall |
# |
# |
# Prints information about the system and version of SLEPc being compiled |
# Prints information about the system and version of SLEPc being compiled |
# |
# |
info: |
info: |
-@echo "==========================================" |
-@echo "==========================================" |
-@echo On `date` on `hostname` |
-@echo On `date` on `hostname` |
-@echo Machine characteristics: `uname -a` |
-@echo Machine characteristics: `uname -a` |
-@echo "-----------------------------------------" |
-@echo "-----------------------------------------" |
-@echo "Using SLEPc directory: ${SLEPC_DIR}" |
-@echo "Using SLEPc directory: ${SLEPC_DIR}" |
-@echo "Using PETSc directory: ${PETSC_DIR}" |
-@echo "Using PETSc directory: ${PETSC_DIR}" |
-@echo "Using PETSc arch: ${PETSC_ARCH}" |
-@echo "Using PETSc arch: ${PETSC_ARCH}" |
-@echo "-----------------------------------------" |
-@echo "-----------------------------------------" |
-@grep "define SLEPC_VERSION" ${SLEPC_DIR}/include/slepcversion.h | ${SED} "s/........//" |
-@grep "define SLEPC_VERSION" ${SLEPC_DIR}/include/slepcversion.h | ${SED} "s/........//" |
-@echo "-----------------------------------------" |
-@echo "-----------------------------------------" |
-@grep "define PETSC_VERSION" ${PETSC_DIR}/include/petscversion.h | ${SED} "s/........//" |
-@grep "define PETSC_VERSION" ${PETSC_DIR}/include/petscversion.h | ${SED} "s/........//" |
-@echo "-----------------------------------------" |
-@echo "-----------------------------------------" |
-@echo "Using PETSc configure options:" ${CONFIGURE_OPTIONS} |
-@echo "Using PETSc configure options:" ${CONFIGURE_OPTIONS} |
-@echo "Using SLEPc configuration flags:" |
-@echo "Using SLEPc configuration flags:" |
-@cat ${SLEPC_DIR}/${PETSC_ARCH}/conf/slepcvariables |
-@cat ${SLEPC_DIR}/${PETSC_ARCH}/conf/slepcvariables |
-@grep "\#define " ${SLEPC_DIR}/${PETSC_ARCH}/include/slepcconf.h |
-@grep "\#define " ${SLEPC_DIR}/${PETSC_ARCH}/include/slepcconf.h |
-@echo "Using PETSc configuration flags:" |
-@echo "Using PETSc configuration flags:" |
-@if [ "${PETSC_ARCH}" != "arch-installed-petsc" ]; then \ |
-@if [ "${PETSC_ARCH}" != "arch-installed-petsc" ]; then \ |
grep "\#define " ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h; \ |
grep "\#define " ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h; \ |
else \ |
else \ |
grep "\#define " ${PETSC_DIR}/include/petscconf.h; \ |
grep "\#define " ${PETSC_DIR}/include/petscconf.h; \ |
fi |
fi |
-@echo "-----------------------------------------" |
-@echo "-----------------------------------------" |
-@echo "Using include paths: ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES}" |
-@echo "Using include paths: ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES}" |
-@echo "------------------------------------------" |
-@echo "------------------------------------------" |
-@echo "Using C/C++ compiler: ${PCC} ${PCC_FLAGS} ${COPTFLAGS} ${CFLAGS}" |
-@echo "Using C/C++ compiler: ${PCC} ${PCC_FLAGS} ${COPTFLAGS} ${CFLAGS}" |
-@if [ "${FC}" != "" ]; then \ |
-@if [ "${FC}" != "" ]; then \ |
echo "Using Fortran include/module paths: ${PETSC_FC_INCLUDES}";\ |
echo "Using Fortran include/module paths: ${PETSC_FC_INCLUDES}";\ |
echo "Using Fortran compiler: ${FC} ${FC_FLAGS} ${FFLAGS} ${FPP_FLAGS}";\ |
echo "Using Fortran compiler: ${FC} ${FC_FLAGS} ${FFLAGS} ${FPP_FLAGS}";\ |
fi |
fi |
-@echo "-----------------------------------------" |
-@echo "-----------------------------------------" |
-@echo "Using C/C++ linker: ${PCC_LINKER}" |
-@echo "Using C/C++ linker: ${PCC_LINKER}" |
-@echo "Using C/C++ flags: ${PCC_LINKER_FLAGS}" |
-@echo "Using C/C++ flags: ${PCC_LINKER_FLAGS}" |
-@if [ "${FC}" != "" ]; then \ |
-@if [ "${FC}" != "" ]; then \ |
echo "Using Fortran linker: ${FC_LINKER}";\ |
echo "Using Fortran linker: ${FC_LINKER}";\ |
echo "Using Fortran flags: ${FC_LINKER_FLAGS}";\ |
echo "Using Fortran flags: ${FC_LINKER_FLAGS}";\ |
fi |
fi |
-@echo "-----------------------------------------" |
-@echo "-----------------------------------------" |
-@echo "Using library: ${SLEPC_LIB}" |
-@echo "Using library: ${SLEPC_LIB}" |
-@echo "------------------------------------------" |
-@echo "------------------------------------------" |
-@echo "Using mpiexec: ${MPIEXEC}" |
-@echo "Using mpiexec: ${MPIEXEC}" |
-@echo "==========================================" |
-@echo "==========================================" |
# |
# |
# Builds the SLEPc library |
# Builds the SLEPc library |
# |
# |
build: |
build: |
-@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" |
-@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" |
-@echo "=========================================" |
-@echo "=========================================" |
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} ACTION=libfast slepc_tree |
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} ACTION=libfast slepc_tree |
-@${RANLIB} ${SLEPC_LIB_DIR}/*.${AR_LIB_SUFFIX} > tmpf 2>&1 ; ${GREP} -v "has no symbols" tmpf; ${RM} tmpf; |
-@${RANLIB} ${SLEPC_LIB_DIR}/*.${AR_LIB_SUFFIX} > tmpf 2>&1 ; ${GREP} -v "has no symbols" tmpf; ${RM} tmpf; |
-@echo "Completed building libraries" |
-@echo "Completed building libraries" |
-@echo "=========================================" |
-@echo "=========================================" |
# Simple test examples for checking a correct installation |
# Simple test examples for checking a correct installation |
test: |
test: |
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} test_build 2>&1 | tee ./${PETSC_ARCH}/conf/test.log |
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} test_build 2>&1 | tee ./${PETSC_ARCH}/conf/test.log |
test_build: |
test_build: |
-@echo "Running test examples to verify correct installation" |
-@echo "Running test examples to verify correct installation" |
-@echo "Using SLEPC_DIR=${SLEPC_DIR}, PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}" |
-@echo "Using SLEPC_DIR=${SLEPC_DIR}, PETSC_DIR=${PETSC_DIR} and PETSC_ARCH=${PETSC_ARCH}" |
@cd src/eps/examples/tests; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} testtest10 |
@cd src/eps/examples/tests; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} testtest10 |
@if [ "${FC}" != "" ]; then cd src/eps/examples/tests; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} testtest7f; fi; |
@if [ "${FC}" != "" ]; then cd src/eps/examples/tests; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} testtest7f; fi; |
-@if [ "${BLOPEX_LIB}" != "" ]; then cd src/eps/examples/tests; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} testtest5_blopex; fi; |
-@if [ "${BLOPEX_LIB}" != "" ]; then cd src/eps/examples/tests; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} testtest5_blopex; fi; |
-@echo "Completed test examples" |
-@echo "Completed test examples" |
# Builds SLEPc test examples for C |
# Builds SLEPc test examples for C |
testexamples: info |
testexamples: info |
-@echo "BEGINNING TO COMPILE AND RUN SLEPc TEST EXAMPLES" |
-@echo "BEGINNING TO COMPILE AND RUN SLEPc TEST EXAMPLES" |
-@echo "Due to different numerical round-off on certain" |
-@echo "Due to different numerical round-off on certain" |
-@echo "machines some of the numbers may not match exactly." |
-@echo "machines some of the numbers may not match exactly." |
-@echo "=========================================" |
-@echo "=========================================" |
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} \ |
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} \ |
ACTION=testexamples_C slepc_tree |
ACTION=testexamples_C slepc_tree |
-@echo "Completed compiling and running test examples" |
-@echo "Completed compiling and running test examples" |
-@echo "=========================================" |
-@echo "=========================================" |
# Builds SLEPc test examples for Fortran |
# Builds SLEPc test examples for Fortran |
testfortran: info |
testfortran: info |
-@echo "BEGINNING TO COMPILE AND RUN SLEPc FORTRAN TEST EXAMPLES" |
-@echo "BEGINNING TO COMPILE AND RUN SLEPc FORTRAN TEST EXAMPLES" |
-@echo "=========================================" |
-@echo "=========================================" |
-@echo "Due to different numerical round-off on certain" |
-@echo "Due to different numerical round-off on certain" |
-@echo "machines or the way Fortran formats numbers" |
-@echo "machines or the way Fortran formats numbers" |
-@echo "some of the results may not match exactly." |
-@echo "some of the results may not match exactly." |
-@echo "=========================================" |
-@echo "=========================================" |
-@if [ "${FC}" != "" ]; then \ |
-@if [ "${FC}" != "" ]; then \ |
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} \ |
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} \ |
ACTION=testexamples_Fortran slepc_tree ; \ |
ACTION=testexamples_Fortran slepc_tree ; \ |
echo "Completed compiling and running Fortran test examples"; \ |
echo "Completed compiling and running Fortran test examples"; \ |
else \ |
else \ |
echo "Error: No FORTRAN compiler available"; \ |
echo "Error: No FORTRAN compiler available"; \ |
fi |
fi |
-@echo "=========================================" |
-@echo "=========================================" |
# Test BLOPEX use |
# Test BLOPEX use |
testblopex: |
testblopex: |
-@echo "BEGINNING TO COMPILE AND RUN SLEPc BLOPEX TEST EXAMPLES" |
-@echo "BEGINNING TO COMPILE AND RUN SLEPc BLOPEX TEST EXAMPLES" |
-@echo "=========================================" |
-@echo "=========================================" |
-@echo "Due to different numerical round-off on certain" |
-@echo "Due to different numerical round-off on certain" |
-@echo "machines some of the results may not match exactly." |
-@echo "machines some of the results may not match exactly." |
-@echo "=========================================" |
-@echo "=========================================" |
-@if [ "${BLOPEX_LIB}" != "" ]; then \ |
-@if [ "${BLOPEX_LIB}" != "" ]; then \ |
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} \ |
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} \ |
ACTION=testexamples_BLOPEX slepc_tree ; \ |
ACTION=testexamples_BLOPEX slepc_tree ; \ |
echo "Completed compiling and running BLOPEX test examples"; \ |
echo "Completed compiling and running BLOPEX test examples"; \ |
else \ |
else \ |
echo "Error: SLEPc has not been configured with BLOPEX"; \ |
echo "Error: SLEPc has not been configured with BLOPEX"; \ |
fi |
fi |
-@echo "=========================================" |
-@echo "=========================================" |
# Ranlib on the library |
# Ranlib on the library |
ranlib: |
ranlib: |
${RANLIB} ${SLEPC_LIB_DIR}/*.${AR_LIB_SUFFIX} |
${RANLIB} ${SLEPC_LIB_DIR}/*.${AR_LIB_SUFFIX} |
# Deletes SLEPc library |
# Deletes SLEPc library |
deletelibs: |
deletelibs: |
-${RM} -r ${SLEPC_LIB_DIR}/libslepc*.* |
-${RM} -r ${SLEPC_LIB_DIR}/libslepc*.* |
deletemods: |
deletemods: |
-${RM} -f ${SLEPC_DIR}/${PETSC_ARCH}/include/slepc*.mod |
-${RM} -f ${SLEPC_DIR}/${PETSC_ARCH}/include/slepc*.mod |
# Cleans up build |
# Cleans up build |
allclean: deletelibs deletemods |
allclean: deletelibs deletemods |
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} ACTION=clean slepc_tree |
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} ACTION=clean slepc_tree |
# |
# |
# Check if PETSC_DIR variable specified is valid |
# Check if PETSC_DIR variable specified is valid |
# |
# |
chk_petsc_dir: |
chk_petsc_dir: |
@if [ ! -f ${PETSC_DIR}/include/petscversion.h ]; then \ |
@if [ ! -f ${PETSC_DIR}/include/petscversion.h ]; then \ |
echo "Incorrect PETSC_DIR specified: ${PETSC_DIR}!"; \ |
echo "Incorrect PETSC_DIR specified: ${PETSC_DIR}!"; \ |
echo "You need to use / to separate directories, not \\!"; \ |
echo "You need to use / to separate directories, not \\!"; \ |
echo "Aborting build"; \ |
echo "Aborting build"; \ |
false; fi |
false; fi |
# |
# |
# Check if SLEPC_DIR variable specified is valid |
# Check if SLEPC_DIR variable specified is valid |
# |
# |
chk_slepc_dir: |
chk_slepc_dir: |
@if [ ! -f ${SLEPC_DIR}/include/slepcversion.h ]; then \ |
@if [ ! -f ${SLEPC_DIR}/include/slepcversion.h ]; then \ |
echo "Incorrect SLEPC_DIR specified: ${SLEPC_DIR}!"; \ |
echo "Incorrect SLEPC_DIR specified: ${SLEPC_DIR}!"; \ |
echo "You need to use / to separate directories, not \\!"; \ |
echo "You need to use / to separate directories, not \\!"; \ |
echo "Aborting build"; \ |
echo "Aborting build"; \ |
false; fi |
false; fi |
# |
# |
# Install relevant files in the prefix directory |
# Install relevant files in the prefix directory |
# |
# |
install: |
install: |
-@if [ "${PETSC_ARCH}" = "" ]; then \ |
-@if [ "${PETSC_ARCH}" = "" ]; then \ |
echo "PETSC_ARCH is undefined";\ |
echo "PETSC_ARCH is undefined";\ |
elif [ "${SLEPC_DESTDIR}" = "${SLEPC_DIR}/${PETSC_ARCH}" ]; then \ |
elif [ "${SLEPC_DESTDIR}" = "${SLEPC_DIR}/${PETSC_ARCH}" ]; then \ |
echo "Install directory is current directory; nothing needs to be done";\ |
echo "Install directory is current directory; nothing needs to be done";\ |
else \ |
else \ |
echo Installing SLEPc at ${SLEPC_DESTDIR};\ |
echo Installing SLEPc at ${SLEPC_DESTDIR};\ |
if [ ! -d `dirname ${SLEPC_DESTDIR}` ]; then \ |
if [ ! -d `dirname ${SLEPC_DESTDIR}` ]; then \ |
${MKDIR} `dirname ${SLEPC_DESTDIR}` ; \ |
${MKDIR} `dirname ${SLEPC_DESTDIR}` ; \ |
fi;\ |
fi;\ |
if [ ! -d ${SLEPC_DESTDIR} ]; then \ |
if [ ! -d ${SLEPC_DESTDIR} ]; then \ |
${MKDIR} ${SLEPC_DESTDIR} ; \ |
${MKDIR} ${SLEPC_DESTDIR} ; \ |
fi;\ |
fi;\ |
if [ ! -d ${SLEPC_DESTDIR}/include ]; then \ |
if [ ! -d ${SLEPC_DESTDIR}/include ]; then \ |
${MKDIR} ${SLEPC_DESTDIR}/include ; \ |
${MKDIR} ${SLEPC_DESTDIR}/include ; \ |
fi;\ |
fi;\ |
cp -f include/*.h ${SLEPC_DESTDIR}/include;\ |
cp -f include/*.h ${SLEPC_DESTDIR}/include;\ |
cp -f ${PETSC_ARCH}/include/*.h ${SLEPC_DESTDIR}/include;\ |
cp -f ${PETSC_ARCH}/include/*.h ${SLEPC_DESTDIR}/include;\ |
if [ -f ${PETSC_ARCH}/include/slepceps.mod ]; then \ |
if [ -f ${PETSC_ARCH}/include/slepceps.mod ]; then \ |
cp -f ${PETSC_ARCH}/include/*.mod ${SLEPC_DESTDIR}/include;\ |
cp -f ${PETSC_ARCH}/include/*.mod ${SLEPC_DESTDIR}/include;\ |
fi;\ |
fi;\ |
if [ ! -d ${SLEPC_DESTDIR}/include/finclude ]; then \ |
if [ ! -d ${SLEPC_DESTDIR}/include/finclude ]; then \ |
${MKDIR} ${SLEPC_DESTDIR}/include/finclude ; \ |
${MKDIR} ${SLEPC_DESTDIR}/include/finclude ; \ |
fi;\ |
fi;\ |
cp -f include/finclude/*.h* ${SLEPC_DESTDIR}/include/finclude;\ |
cp -f include/finclude/*.h* ${SLEPC_DESTDIR}/include/finclude;\ |
if [ -d include/finclude/ftn-auto ]; then \ |
if [ -d include/finclude/ftn-auto ]; then \ |
if [ ! -d ${SLEPC_DESTDIR}/include/finclude/ftn-auto ]; then \ |
if [ ! -d ${SLEPC_DESTDIR}/include/finclude/ftn-auto ]; then \ |
${MKDIR} ${SLEPC_DESTDIR}/include/finclude/ftn-auto ; \ |
${MKDIR} ${SLEPC_DESTDIR}/include/finclude/ftn-auto ; \ |
fi;\ |
fi;\ |
cp -f include/finclude/ftn-auto/*.h90 ${SLEPC_DESTDIR}/include/finclude/ftn-auto;\ |
cp -f include/finclude/ftn-auto/*.h90 ${SLEPC_DESTDIR}/include/finclude/ftn-auto;\ |
fi;\ |
fi;\ |
if [ ! -d ${SLEPC_DESTDIR}/include/finclude/ftn-custom ]; then \ |
if [ ! -d ${SLEPC_DESTDIR}/include/finclude/ftn-custom ]; then \ |
${MKDIR} ${SLEPC_DESTDIR}/include/finclude/ftn-custom ; \ |
${MKDIR} ${SLEPC_DESTDIR}/include/finclude/ftn-custom ; \ |
fi;\ |
fi;\ |
cp -f include/finclude/ftn-custom/*.h90 ${SLEPC_DESTDIR}/include/finclude/ftn-custom;\ |
cp -f include/finclude/ftn-custom/*.h90 ${SLEPC_DESTDIR}/include/finclude/ftn-custom;\ |
if [ ! -d ${SLEPC_DESTDIR}/include/private ]; then \ |
if [ ! -d ${SLEPC_DESTDIR}/include/private ]; then \ |
${MKDIR} ${SLEPC_DESTDIR}/include/private ; \ |
${MKDIR} ${SLEPC_DESTDIR}/include/private ; \ |
fi;\ |
fi;\ |
cp -f include/private/*.h ${SLEPC_DESTDIR}/include/private;\ |
cp -f include/private/*.h ${SLEPC_DESTDIR}/include/private;\ |
if [ ! -d ${SLEPC_DESTDIR}/conf ]; then \ |
if [ ! -d ${SLEPC_DESTDIR}/conf ]; then \ |
${MKDIR} ${SLEPC_DESTDIR}/conf ; \ |
${MKDIR} ${SLEPC_DESTDIR}/conf ; \ |
fi;\ |
fi;\ |
for dir in bin bin/matlab bin/matlab/classes bin/matlab/classes/examples \ |
for dir in bin bin/matlab bin/matlab/classes bin/matlab/classes/examples \ |
bin/matlab/classes/examples/tutorials; \ |
bin/matlab/classes/examples/tutorials; \ |
do \ |
do \ |
if [ ! -d ${SLEPC_DESTDIR}/$$dir ]; then ${MKDIR} ${SLEPC_DESTDIR}/$$dir; fi;\ |
if [ ! -d ${SLEPC_DESTDIR}/$$dir ]; then ${MKDIR} ${SLEPC_DESTDIR}/$$dir; fi;\ |
done; \ |
done; \ |
for dir in bin/matlab/classes bin/matlab/classes/examples/tutorials; \ |
for dir in bin/matlab/classes bin/matlab/classes/examples/tutorials; \ |
do \ |
do \ |
cp -f $$dir/*.m ${SLEPC_DESTDIR}/$$dir;\ |
cp -f $$dir/*.m ${SLEPC_DESTDIR}/$$dir;\ |
done; \ |
done; \ |
cp -f bin/matlab/classes/slepcmatlabheader.h ${SLEPC_DESTDIR}/bin/matlab/classes;\ |
cp -f bin/matlab/classes/slepcmatlabheader.h ${SLEPC_DESTDIR}/bin/matlab/classes;\ |
cp -f conf/slepc_* ${SLEPC_DESTDIR}/conf;\ |
cp -f conf/slepc_* ${SLEPC_DESTDIR}/conf;\ |
cp -f ${PETSC_ARCH}/conf/slepcvariables ${SLEPC_DESTDIR}/conf;\ |
cp -f ${PETSC_ARCH}/conf/slepcvariables ${SLEPC_DESTDIR}/conf;\ |
cp -f ${PETSC_ARCH}/conf/slepcrules ${SLEPC_DESTDIR}/conf;\ |
cp -f ${PETSC_ARCH}/conf/slepcrules ${SLEPC_DESTDIR}/conf;\ |
if [ ! -d ${SLEPC_DESTDIR}/lib ]; then \ |
if [ ! -d ${SLEPC_DESTDIR}/lib ]; then \ |
${MKDIR} ${SLEPC_DESTDIR}/lib ; \ |
${MKDIR} ${SLEPC_DESTDIR}/lib ; \ |
fi;\ |
fi;\ |
if [ -d ${PETSC_ARCH}/lib ]; then \ |
if [ -d ${PETSC_ARCH}/lib ]; then \ |
cp -f ${PETSC_ARCH}/lib/*.${AR_LIB_SUFFIX} ${SLEPC_DESTDIR}/lib;\ |
cp -f ${PETSC_ARCH}/lib/*.${AR_LIB_SUFFIX} ${SLEPC_DESTDIR}/lib;\ |
${RANLIB} ${SLEPC_DESTDIR}/lib/*.${AR_LIB_SUFFIX} ;\ |
${RANLIB} ${SLEPC_DESTDIR}/lib/*.${AR_LIB_SUFFIX} ;\ |
${OMAKE} PETSC_DIR=${PETSC_DIR} PETSC_ARCH="" SLEPC_DIR=${SLEPC_DESTDIR} OTHERSHAREDLIBS="${PETSC_LIB}" shared; \ |
${OMAKE} PETSC_DIR=${PETSC_DIR} PETSC_ARCH="" SLEPC_DIR=${SLEPC_DESTDIR} OTHERSHAREDLIBS="${PETSC_KSP_LIB} ${SLEPC_EXTERNAL_LIB}" shared; \ |
${OMAKE} PETSC_DIR=${PETSC_DIR} PETSC_ARCH="" SLEPC_DIR=${SLEPC_DESTDIR} slepc4py; \ |
${OMAKE} PETSC_DIR=${PETSC_DIR} PETSC_ARCH="" SLEPC_DIR=${SLEPC_DESTDIR} slepc4py; \ |
fi;\ |
echo "====================================";\ |
echo "====================================";\ |
echo "It is usable with SLEPC_DIR=${SLEPC_DESTDIR} PETSC_DIR=${PETSC_DIR} [and no more PETSC_ARCH].";\ |
echo "Install complete.";\ |
echo "make SLEPC_DIR=${SLEPC_DESTDIR} PETSC_DIR=${PETSC_DIR} test";\ |
echo "It is usable with SLEPC_DIR=${SLEPC_DESTDIR} PETSC_DIR=${PETSC_DIR} [and no more PETSC_ARCH].";\ |
fi; |
echo "Run the following to verify the install (in current directory):";\ |
# ------------------------------------------------------------------ |
echo "make SLEPC_DIR=${SLEPC_DESTDIR} PETSC_DIR=${PETSC_DIR} test";\ |
# All remaining actions are intended for SLEPc developers only. |
echo "====================================";\ |
# |
fi; |
# Builds all the documentation |
# ------------------------------------------------------------------ |
alldoc1: chk_loc deletemanualpages |
# |
-@sed -e s%man+../%man+manualpages/% ${LOC}/docs/manualpages/manualpages.cit > ${LOC}/docs/manualpages/htmlmap |
# All remaining actions are intended for SLEPc developers only. |
-${OMAKE} ACTION=slepc_manualpages tree_basic LOC=${LOC} |
# SLEPc users should not generally need to use these commands. |
-${OMAKE} ACTION=slepc_manexamples tree_basic LOC=${LOC} |
# |
# Builds .html versions of the source |
-${OMAKE} ACTION=slepc_html PETSC_DIR=${PETSC_DIR} alltree LOC=${LOC} |
|
# Builds all the documentation |
|
alldoc: alldoc1 alldoc2 |
alldocclean: deletemanualpages allcleanhtml |
-@if [ -d ${LOC} -a -d ${LOC}/docs/manualpages ]; then \ |
|
# Build everything that goes into 'doc' dir except html sources |
${RM} ${LOC}/docs/manualpages/manualpages.cit ;\ |
alldoc1: chk_loc deletemanualpages |
allcleanhtml: |
-${OMAKE} ACTION=manualpages_buildcite tree_basic LOC=${LOC} |
|
-@sed -e s%man+../%man+manualpages/% ${LOC}/docs/manualpages/manualpages.cit > ${LOC}/docs/manualpages/htmlmap |
allfortranstubs: |
-@cat ${PETSC_DIR}/src/docs/mpi.www.index >> ${LOC}/docs/manualpages/htmlmap |
deletefortranstubs: |
-${OMAKE} ACTION=slepc_manualpages tree_basic LOC=${LOC} |
|
-${PYTHON} ${PETSC_DIR}/bin/maint/wwwindex.py ${SLEPC_DIR} ${LOC} |
# |
-${OMAKE} ACTION=slepc_manexamples tree_basic LOC=${LOC} |
# |
-@for D in `find ${SLEPC_DIR}/src -name ftn-auto` \ |
|
# Builds .html versions of the source |
egrep '^void' *.c | \ |
alldoc2: chk_loc |
sed "s/_$$//"; done | sort > /tmp/countfortranfunctions |
-${OMAKE} ACTION=slepc_html PETSC_DIR=${PETSC_DIR} alltree LOC=${LOC} |
countcfunctions: |
cp ${LOC}/docs/manual.htm ${LOC}/docs/index.html |
xargs grep extern | grep "(" | tr -s ' ' | \ |
tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions |
|
# Deletes documentation |
difffortranfunctions: countfortranfunctions countcfunctions |
alldocclean: deletemanualpages allcleanhtml |
-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 |
deletemanualpages: chk_loc |
-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 |
-@if [ -d ${LOC} -a -d ${LOC}/docs/manualpages ]; then \ |
|
find ${LOC}/docs/manualpages -type f -name "*.html" -exec ${RM} {} \; ;\ |
-@echo "=========================================" |
${RM} ${LOC}/docs/manualpages/manualpages.cit ;\ |
-@echo "=========================================" |
fi |
grep '^void' *.c | grep 'MPI_Comm' | \ |
allcleanhtml: |
-@echo "=========================================" |
-${OMAKE} ACTION=cleanhtml PETSC_DIR=${PETSC_DIR} alltree |
-@echo "=========================================" |
grep '^void' *.c | grep 'char \*' | \ |
|
# Builds Fortran stub files |
-@echo "=========================================" |
allfortranstubs: |
-@echo "=========================================" |
-@${PYTHON} ${SLEPC_DIR}/config/generatefortranstubs.py ${BFORT} |
cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ |
deletefortranstubs: |
_p_OBJS=`grep _p_ ${SLEPC_DIR}/include/*.h | tr -s ' ' | \ |
-@find . -type d -name ftn-auto | xargs rm -rf |
sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ |
for OBJ in $$_p_OBJ $$_p_OBJS; do \ |
|
# ------------------------------------------------------------------------------- |
cut -d'(' -f1 | cut -d' ' -f1,4; \ |
# |
|
# Some macros to check if the Fortran interface is up-to-date. |
alletags: |
# |
-@find config -type f -name "*.py" |grep -v SCCS | xargs etags -o TAGS_PYTHON |
countfortranfunctions: |
|
-@for D in `find ${SLEPC_DIR}/src -name ftn-auto` \ |
|
`find ${SLEPC_DIR}/src -name ftn-custom`; do cd $$D; \ |
|
egrep '^void' *.c | \ |
|
cut -d'(' -f1 | tr -s ' ' | cut -d' ' -f3 | uniq | egrep -v "(^$$|Petsc)" | \ |
|
sed "s/_$$//"; done | sort > /tmp/countfortranfunctions |
|
countcfunctions: |
|
-@ ls ${SLEPC_DIR}/include/*.h | grep -v slepcblaslapack.h | \ |
|
xargs grep extern | grep "(" | tr -s ' ' | \ |
|
cut -d'(' -f1 | cut -d' ' -f3 | grep -v "\*" | tr -s '\012' | \ |
|
tr 'A-Z' 'a-z' | sort > /tmp/countcfunctions |
|
difffortranfunctions: countfortranfunctions countcfunctions |
|
-@echo -------------- Functions missing in the Fortran interface --------------------- |
|
-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^<" | cut -d' ' -f2 |
|
-@echo ----------------- Functions missing in the C interface ------------------------ |
|
-@${DIFF} /tmp/countcfunctions /tmp/countfortranfunctions | grep "^>" | cut -d' ' -f2 |
|
-@${RM} /tmp/countcfunctions /tmp/countfortranfunctions |
|
checkbadfortranstubs: |
|
-@echo "=========================================" |
|
-@echo "Functions with MPI_Comm as an Argument" |
|
-@echo "=========================================" |
|
-@for D in `find ${SLEPC_DIR}/src -name ftn-auto`; do cd $$D; \ |
|
grep '^void' *.c | grep 'MPI_Comm' | \ |
|
tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3; done |
|
-@echo "=========================================" |
|
-@echo "Functions with a String as an Argument" |
|
-@echo "=========================================" |
|
-@for D in `find ${SLEPC_DIR}/src -name ftn-auto`; do cd $$D; \ |
|
grep '^void' *.c | grep 'char \*' | \ |
|
tr -s ' ' | tr -s ':' ' ' |cut -d'(' -f1 | cut -d' ' -f1,3; done |
|
-@echo "=========================================" |
|
-@echo "Functions with Pointers to PETSc Objects as Argument" |
|
-@echo "=========================================" |
|
-@_p_OBJ=`grep _p_ ${PETSC_DIR}/include/*.h | tr -s ' ' | \ |
|
cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ |
|
sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ |
|
_p_OBJS=`grep _p_ ${SLEPC_DIR}/include/*.h | tr -s ' ' | \ |
|
cut -d' ' -f 3 | tr -s '\012' | grep -v '{' | cut -d'*' -f1 | \ |
|
sed "s/_p_//g" | tr -s '\012 ' ' *|' ` ; \ |
|
for D in `find ${SLEPC_DIR}/src -name ftn-auto`; do cd $$D; \ |
|
for OBJ in $$_p_OBJ $$_p_OBJS; do \ |
|
grep "$$OBJ \*" *.c | tr -s ' ' | tr -s ':' ' ' | \ |
|
cut -d'(' -f1 | cut -d' ' -f1,4; \ |
|
done; done |
|
# Generate tags with PETSc's script |
|
alletags: |
|
-@${PYTHON} ${PETSC_DIR}/bin/maint/generateetags.py |
|
-@find config -type f -name "*.py" |grep -v SCCS | xargs etags -o TAGS_PYTHON |
|