Subversion Repositories slepc-dev

Compare Revisions

Ignore whitespace Rev 2474 → Rev 2475

/trunk/config/configure.py
320,32 → 320,23
slepc4py.Install()
slepc4py.addMakeRule(slepcrules,prefixdir,prefixinstall,getslepc4py)
 
# Finish with configuration files
slepcvars.close()
slepcrules.close()
slepcconf.write('#endif\n')
slepcconf.close()
cmake.write('set (SLEPC_PACKAGE_LIBS "${ARPACK_LIB}" "${BLZPACK_LIB}" "${TRLAN_LIB}" "${PRIMME_LIB}")\n')
cmake.write('set (SLEPC_PACKAGE_INCLUDES "${PRIMME_INCLUDE}")\n')
cmake.write('find_library (PETSC_LIB petsc HINTS ${PETSc_BINARY_DIR}/lib )\n')
cmake.close()
 
# Make Fortran stubs if necessary
if subversion:
import generatefortranstubs
generatefortranstubs.main(petscconf.BFORT)
 
# CMake stuff
if sys.version_info >= (2,5) and not petscconf.ISINSTALL:
cmake.write('set (SLEPC_PACKAGE_LIBS "${ARPACK_LIB}" "${BLZPACK_LIB}" "${TRLAN_LIB}" "${PRIMME_LIB}")\n')
cmake.write('set (SLEPC_PACKAGE_INCLUDES "${PRIMME_INCLUDE}")\n')
cmake.write('find_library (PETSC_LIB petsc HINTS ${PETSc_BINARY_DIR}/lib )\n')
cmake.close()
cmakeok = False
if sys.version_info >= (2,5) and not petscconf.ISINSTALL and petscconf.BUILD_USING_CMAKE:
import cmakegen
try:
cmakegen.main(slepcdir,petscdir,petscarch=petscconf.ARCH)
except (OSError), e:
log.Exit('ERROR: Generating CMakeLists.txt failed:\n' + str(e))
 
# In a prefix-based PETSc installation we skip the last CMake step
cmakeok = False
if sys.version_info >= (2,5) and not petscconf.ISINSTALL:
import cmakeboot
try:
cmakeok = cmakeboot.main(slepcdir,petscdir,petscarch=petscconf.ARCH,log=log)
357,7 → 348,15
for f in ['build.log','build.log.bkp','RDict.log']:
try: os.remove(f)
except OSError: pass
if cmakeok:
slepcvars.write('SLEPC_BUILD_USING_CMAKE = 1\n')
 
# Finish with configuration files
slepcvars.close()
slepcrules.close()
slepcconf.write('#endif\n')
slepcconf.close()
 
# Print summary
log.Println('')
log.Println('='*79)
397,10 → 396,9
log.Println('PLEASE reconfigure and recompile PETSc with a full LAPACK implementation')
print
print 'xxx'+'='*73+'xxx'
print ' Configure stage complete. Now build the SLEPc library with:'
if cmakeok: buildtype = 'cmake'
else: buildtype = 'legacy'
print ' Configure stage complete. Now build the SLEPc library with ('+buildtype+' build):'
print ' make SLEPC_DIR=$PWD PETSC_DIR='+petscdir+' PETSC_ARCH='+petscconf.ARCH
if cmakeok:
print ' or (experimental with cmake):'
print ' make -j4 -C '+archdir
print 'xxx'+'='*73+'xxx'
print
/trunk/config/petscconf.py
23,7 → 23,7
import sys
 
def Load(petscdir):
global ARCH,DIR,MAKE,SCALAR,PRECISION,ISINSTALL,DESTDIR,BFORT,TEST_RUNS,CC,CC_FLAGS,AR,AR_FLAGS,AR_LIB_SUFFIX,RANLIB,IND64
global ARCH,DIR,MAKE,SCALAR,PRECISION,ISINSTALL,DESTDIR,BFORT,TEST_RUNS,CC,CC_FLAGS,AR,AR_FLAGS,AR_LIB_SUFFIX,RANLIB,IND64,BUILD_USING_CMAKE
if 'PETSC_ARCH' in os.environ:
ISINSTALL = 0
36,6 → 36,7
PETSCVARIABLES = os.sep.join([petscdir,'conf','petscvariables'])
PETSCCONF_H = os.sep.join([petscdir,'include','petscconf.h'])
 
BUILD_USING_CMAKE = 0
try:
f = open(PETSCVARIABLES)
for l in f.readlines():
66,6 → 67,8
AR_LIB_SUFFIX = v
elif k == 'RANLIB':
RANLIB = v
elif k == 'PETSC_BUILD_USING_CMAKE':
BUILD_USING_CMAKE = v
f.close()
except:
sys.exit('ERROR: PETSc is not configured for architecture ' + ARCH)
/trunk/makefile
34,7 → 34,12
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} chkslepc_dir
-@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all_build 2>&1 | tee ${PETSC_ARCH}/conf/make.log
@if [ "${SLEPC_BUILD_USING_CMAKE}" != "" ]; then \
echo "Building SLEPc using CMake with ${MAKE_NP} build threads"; \
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all-cmake; \
else \
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} SLEPC_DIR=${SLEPC_DIR} all-legacy; \
fi
-@egrep -i "( error | error:)" ${PETSC_ARCH}/conf/make.log > /dev/null; if [ "$$?" = "0" ]; then \
echo "********************************************************************"; \
echo " Error during compile, check ${PETSC_ARCH}/conf/make.log"; \
50,6 → 55,13
echo "=========================================";\
fi
all-cmake:
@${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/petsc[[:lower:]]*.dir/| -o lib/libpetsc|CMakeFiles/petsc[[:lower:]]*\.dir/(build|depend|requires)|-f CMakeFiles/Makefile2|Dependee .* is newer than depender |provides\.build. is up to date)'
 
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
 
all_build: chk_petsc_dir chk_slepc_dir chklib_dir info deletelibs deletemods build shared_nomesg slepc4py_noinstall
#
# Prints information about the system and version of SLEPc being compiled