[cig-commits] commit: Do not look for petsc arch if it is already found. Also settle for only finding libpetsc (3.1) rather than libpetscsnes etc (3.0)
Mercurial
hg at geodynamics.org
Mon Dec 19 02:50:48 PST 2011
changeset: 156:6807b751b5ee
tag: tip
user: Walter Landry <wlandry at caltech.edu>
date: Mon Dec 19 02:50:49 2011 -0800
files: packages/PETSc.py
description:
Do not look for petsc arch if it is already found. Also settle for only finding libpetsc (3.1) rather than libpetscsnes etc (3.0)
diff -r 453cfd1b6f80 -r 6807b751b5ee packages/PETSc.py
--- a/packages/PETSc.py Sat Nov 26 20:51:10 2011 -0800
+++ b/packages/PETSc.py Mon Dec 19 02:50:49 2011 -0800
@@ -42,16 +42,17 @@ class PETSc(Package):
petscconf = None
# Try looking for it the PETSc 3 uninstalled way.
- try:
- items = os.listdir(loc[0])
- for i in items:
- i = os.path.join(loc[0], i)
- if os.path.isdir(i):
- if os.path.exists(os.path.join(i, 'conf', 'petscvariables')):
- self.arch = os.path.basename(i)
- break
- except:
- pass
+ if not self.arch:
+ try:
+ items = os.listdir(loc[0])
+ for i in items:
+ i = os.path.join(loc[0], i)
+ if os.path.isdir(i):
+ if os.path.exists(os.path.join(i, 'conf', 'petscvariables')):
+ self.arch = os.path.basename(i)
+ break
+ except:
+ pass
# If we were able to find a architecture.
if self.arch is not None:
@@ -80,6 +81,9 @@ class PETSc(Package):
libs = ['petscsnes', 'petscksp', 'petscdm',
'petscmat', 'petscvec', 'petsc']
lib_types = self.find_libraries(loc[2], libs)
+ if lib_types is None:
+ libs = ['petsc']
+ lib_types = self.find_libraries(loc[2], libs)
if lib_types is not None:
# Add basic environment.
More information about the CIG-COMMITS
mailing list