Commit 48b031a6 authored by Drew Parsons's avatar Drew Parsons

New upstream version 3.11.3+dfsg1

parent 7a677579

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -302,12 +302,10 @@ class Configure(script.Script):
# Preprocessor, Compiler, and Linker Operations
def pushLanguage(self, language):
if language == 'C++': language = 'Cxx'
self.logPrint('Pushing language '+language)
self.language.append(language)
return self.language[-1]
def popLanguage(self):
self.logPrint('Popping language '+self.language[-1])
self.language.pop()
return self.language[-1]
......@@ -457,7 +455,7 @@ class Configure(script.Script):
f = open(self.compilerSource, 'w')
f.write(self.getCode(codeStr))
f.close()
(out, err, ret) = Configure.executeShellCommand(command, checkCommand = report, timeout = timeout, log = self.log, lineLimit = 100000)
(out, err, ret) = Configure.executeShellCommand(command, checkCommand = report, timeout = timeout, log = self.log, logOutputflg = False, lineLimit = 100000)
if self.cleanup:
for filename in [self.compilerDefines, self.compilerFixes, self.compilerSource]:
if os.path.isfile(filename): os.remove(filename)
......
......@@ -24,6 +24,7 @@ class Configure(config.base.Configure):
self.fmainlibs = []
self.clibs = []
self.cxxlibs = []
self.cxxCompileC = False
self.cRestrict = ' '
self.cxxRestrict = ' '
self.cxxdialect = ''
......@@ -426,18 +427,18 @@ class Configure(config.base.Configure):
cxxObj = self.framework.getCompilerObject('Cxx')
oldExt = cxxObj.sourceExtension
cxxObj.sourceExtension = self.framework.getCompilerObject('C').sourceExtension
success=0
for flag in ['', '-+', '-x cxx -tlocal', '-Kc++']:
try:
self.setCompilers.addCompilerFlag(flag, body = 'class somename { int i; };')
success=1
self.cxxCompileC = True
break
except RuntimeError:
pass
if success==0:
for flag in ['-TP','-P']:
if not self.cxxCompileC:
for flag in ['-x c++', '-TP','-P']:
try:
self.setCompilers.addCompilerFlag(flag, body = 'class somename { int i; };', compilerOnly = 1)
self.cxxCompileC = True
break
except RuntimeError:
pass
......
......@@ -413,6 +413,7 @@ class Framework(config.base.Configure, script.LanguageProcessor):
if output.find('warning #264: floating-point value does not fit in required floating-point type') >= 0: return output
if output.find('warning: ISO C90 does not support') >= 0: return output
if output.find('warning: ISO C does not support') >= 0: return output
if output.find('warning #2650: attributes ignored here') >= 0: return output
if output.find('Warning: attribute visibility is unsupported and will be skipped') >= 0: return output
if output.find('(E) Invalid statement found within an interface block. Executable statement, statement function or syntax error encountered.') >= 0: return output
elif self.argDB['ignoreCompileOutput']:
......
......@@ -213,6 +213,13 @@ class Package(config.base.Configure):
if cflags.find(flag) >=0: return flag
return ''
def getDebugFlags(self,cflags):
outflags = []
for flag in cflags.split():
if flag in ['-g','-g3','-Z7']:
outflags.append(flag)
return ' '.join(outflags)
def getWindowsNonOptFlags(self,cflags):
outflags = []
for flag in cflags.split():
......@@ -356,7 +363,7 @@ class Package(config.base.Configure):
def generateGuesses(self):
d = self.checkDownload()
if d:
if not self.liblist or self.builtafterpetsc :
if not self.liblist or not self.liblist[0] or self.builtafterpetsc :
yield('Download '+self.PACKAGE, d, [], self.getIncludeDirs(d, self.includedir))
for libdir in [self.libdir, self.altlibdir]:
libdirpath = os.path.join(d, libdir)
......@@ -394,6 +401,9 @@ class Package(config.base.Configure):
fakeExternalPackagesDir+' is reserved for --download-package scratch space. \n'+
'Do not install software in this location nor use software in this directory.')
if not self.liblist or not self.liblist[0]:
yield('User specified root directory '+self.PACKAGE, d, [], self.getIncludeDirs(d, self.includedir))
for libdir in [self.libdir, self.altlibdir]:
libdirpath = os.path.join(d, libdir)
if not os.path.isdir(libdirpath):
......@@ -409,7 +419,7 @@ class Package(config.base.Configure):
raise RuntimeError('--with-'+self.package+'-dir='+self.argDB['with-'+self.package+'-dir']+' did not work')
if 'with-'+self.package+'-include' in self.argDB and not 'with-'+self.package+'-lib' in self.argDB:
if self.liblist[0]:
if self.liblist and self.liblist[0]:
raise RuntimeError('If you provide --with-'+self.package+'-include you must also supply with-'+self.package+'-lib\n')
if 'with-'+self.package+'-lib' in self.argDB and not 'with-'+self.package+'-include' in self.argDB:
if self.includes:
......@@ -418,7 +428,7 @@ class Package(config.base.Configure):
raise RuntimeError('Use --with-'+self.package+'-include; not --with-'+self.package+'-include-dir')
if 'with-'+self.package+'-include' in self.argDB or 'with-'+self.package+'-lib' in self.argDB:
if self.liblist[0]:
if self.liblist and self.liblist[0]:
libs = self.argDB['with-'+self.package+'-lib']
slibs = str(self.argDB['with-'+self.package+'-lib'])
else:
......@@ -575,7 +585,7 @@ class Package(config.base.Configure):
raise RuntimeError('Unable to locate commit: '+self.gitcommit+' in repository: '+self.packageDir+'.\n If its a remote branch- use: origin/'+self.gitcommit)
if self.gitcommit != 'HEAD':
try:
config.base.Configure.executeShellCommand([self.sourceControl.git, 'stash'], cwd=self.packageDir, log = self.log)
config.base.Configure.executeShellCommand([self.sourceControl.git, '-c', 'user.name=petsc-configure', '-c', 'user.email=petsc@configure', 'stash'], cwd=self.packageDir, log = self.log)
config.base.Configure.executeShellCommand([self.sourceControl.git, 'clean', '-f', '-d', '-x'], cwd=self.packageDir, log = self.log)
except:
raise RuntimeError('Unable to run git stash/clean in repository: '+self.packageDir+'.\nPerhaps its a git error!')
......
......@@ -211,6 +211,7 @@ class Configure(config.package.Package):
# If using 64 bit indices then look for 64 bit integer MKL
if self.defaultIndexSize == 64: ILP64 = '_ilp64'
else: ILP64 = '_lp64'
ILP64 = '_lp64'
# Look for Multi-Threaded MKL for MKL_C/Pardiso
useCPardiso=0
......@@ -260,7 +261,8 @@ class Configure(config.package.Package):
if not os.path.exists(os.path.join(dir,libdir)):
self.logPrint('MKL Path not found.. skipping: '+os.path.join(dir,libdir))
else:
yield ('User specified MKL11/12 Linux64', None, [os.path.join(dir,libdir,'libmkl_intel'+ILP64+'.a'),'mkl_sequential','mkl_core','pthread'])
yield ('User specified MKL11+ Linux64', None, [os.path.join(dir,libdir,'libmkl_intel'+ILP64+'.a'),'mkl_sequential','mkl_core','mkl_def','pthread'])
yield ('User specified MKL11+ Mac-64', None, [os.path.join(dir,libdir,'libmkl_intel'+ILP64+'.a'),'mkl_sequential','mkl_core','pthread'])
# Older Linux MKL checks
yield ('User specified MKL Linux lib dir', None, [os.path.join(dir, 'libmkl_lapack.a'), 'mkl', 'guide', 'pthread'])
for libdir in ['32','64','em64t']:
......@@ -466,8 +468,9 @@ class Configure(config.package.Package):
break
if not found:
raise RuntimeError('Unable to find MKL include directory. Please source the mklvars-script to set up the MKL environment.\n')
self.logPrint('MKL include path set to ' + str(self.include))
self.logPrint('Unable to find MKL include directory!')
else:
self.logPrint('MKL include path set to ' + str(self.include))
self.logWrite(self.libraries.restoreLog())
return
......@@ -622,7 +625,7 @@ class Configure(config.package.Package):
} else {
sdotresult = '''+self.mangleBlasNoPrefix('sdot')+'''((const int*)&ione1,x1,(const int*)&ione1,x1,(const int*)&ione1);
}
fprintf(output, "--known-sdot-returns-doubl=%d",sdotresult != 9);\n'''
fprintf(output, "--known-sdot-returns-double=%d",sdotresult != 9);\n'''
result = self.runTimeTest('known-sdot-returns-double',includes,body,self.dlib,nobatch=1)
if result:
self.log.write('Checking for sdot return double: result ' +str(result)+'\n')
......
......@@ -6,7 +6,7 @@ class Configure(config.package.Package):
self.gitcommit = 'v5.1.2-p2'
self.download = ['git://https://bitbucket.org/petsc/pkg-mumps.git',
'https://bitbucket.org/petsc/pkg-mumps/get/'+self.gitcommit+'.tar.gz']
self.downloaddirnames = ['petsc-pkg-mumps']
self.downloaddirnames = ['petsc-pkg-mumps','MUMPS']
self.liblist = [['libcmumps.a','libdmumps.a','libsmumps.a','libzmumps.a','libmumps_common.a','libpord.a'],
['libcmumps.a','libdmumps.a','libsmumps.a','libzmumps.a','libmumps_common.a','libpord.a','libpthread.a'],
['libcmumps.a','libdmumps.a','libsmumps.a','libzmumps.a','libmumps_common.a','libpord.a','libmpiseq.a'],
......
import config.package
class Configure(config.package.GNUPackage):
def __init__(self, framework):
config.package.GNUPackage.__init__(self, framework)
self.includes = ['']
self.includedir = ''
self.libdir = ''
self.useddirectly = 0
return
def configureLibrary(self):
try:
import numpy
except:
raise RuntimeError('Could not find numpy, either fix PYTHONPATH and rerun or install it')
return
......@@ -46,6 +46,7 @@ class Configure(config.package.CMakePackage):
args.append('-DCMAKE_DISABLE_FIND_PACKAGE_OpenMP=TRUE')
args.append('-DUSE_XSDK_DEFAULTS=YES')
args.append('-DTPL_BLAS_LIBRARIES="'+self.libraries.toString(self.blasLapack.dlib)+'"')
args.append('-DTPL_LAPACK_LIBRARIES="'+self.libraries.toString(self.blasLapack.dlib)+'"')
if self.parmetis.found:
args.append('-DTPL_PARMETIS_INCLUDE_DIRS="'+';'.join(self.parmetis.dinclude)+'"')
args.append('-DTPL_PARMETIS_LIBRARIES="'+self.libraries.toString(self.parmetis.dlib)+'"')
......
......@@ -50,7 +50,11 @@ class Configure(config.package.GNUPackage):
try:
self.logPrintBox('Compiling Ctetgen; this may take several minutes')
# uses the regular PETSc library builder and then moves result
output,err,ret = config.package.GNUPackage.executeShellCommand(self.make.make+' PETSC_DIR='+self.petscdir.dir+' clean lib',timeout=1000, log = self.log, cwd=self.packageDir)
# turn off any compiler optimizations as they may break CTETGEN
self.setCompilers.pushLanguage('C')
cflags = self.checkNoOptFlag()+' '+self.getSharedFlag(self.setCompilers.getCompilerFlags())+' '+self.getPointerSizeFlag(self.setCompilers.getCompilerFlags())+' '+self.getWindowsNonOptFlags(self.setCompilers.getCompilerFlags())+' '+self.getDebugFlags(self.setCompilers.getCompilerFlags())
self.setCompilers.popLanguage()
output,err,ret = config.package.GNUPackage.executeShellCommand(self.make.make+' PETSC_DIR='+self.petscdir.dir+' clean lib PCC_FLAGS="'+cflags+'"',timeout=1000, log = self.log, cwd=self.packageDir)