[petsc-dev] Petsc configuration

Barry Smith bsmith at mcs.anl.gov
Sat Sep 21 10:26:52 CDT 2013


On Sep 21, 2013, at 9:32 AM, Jose David Bermeol <jbermeol at purdue.edu> wrote:

> Hi, I've been cheking your configuration strategy,and I have one question, if I add the flag --with-package-dir=$LOCATION. Petsc is going to look in the folders $LOCATION/lib and $LOCATION/include. How could I change that such that it search the library in a set of folders inside $LOCATION/lib?? 
> 
> Thanks. 

   The class you are writing in cPardiso.py  is a subclass of PETSc.package.NewPackage  

   class Configure(PETSc.package.NewPackage):

    which is a subclass of BuildSystem.config.Package which is defined in config/BuildSystem/config/Package.py 

    thus you can overwrite any data/method in these classes by simply putting your modified data/method into your cPardiso.py

    1) If you want to look in only ONE or TWO locations inside the package-dir directory somewhere you can just reset 

    self.libdir           = 'lib'     # location of libraries in the package directory tree
    self.altlibdir        = 'lib64'   # alternate location of libraries in the package directory tree

     2) If you have a big list of possible places to check we don't have a way to simply provide them all but you can provide your own 

  def generateGuesses(self):

    Just copy the one from Package.py and edit it as needed; note lots of ours are for cases you do not care have (--download and pkg-config) etc and you can just strip that out of your version so your version will likely end up being only a few lines.

   Barry








More information about the petsc-dev mailing list