← Back to team overview

dolfin team mailing list archive

Re: Brave souls wanted - Testing SCons build of DOLFIN

 

On Dec 1, 2007 3:19 PM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
>
>
> Matthew Knepley wrote:
> > On Dec 1, 2007 2:34 PM, Åsmund Ødegård <aasmund@xxxxxxxxx> wrote:
> >>
> >> On Nov 30, 2007 6:08 PM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
> >>> To get the flags right for MPI, the test in petsc.py should use mpicc
> >>> (or mpicxx) if PETSc has been compiled using MPI, instead of g++.
> >>>
> >> You're right - I haven't tought about that. Unfortunately, pkg-config which
> >> we use quite heavily does not really supports the concept of telling about
> >> compilers, so I have to find some clever way to deal with this issue :-)
> >
> > You can read this info out of PETSc:
> >
> >   1) make getincludedirs, make getlinklibs
> >
>
> I recall that we had this before, but the problem was that "make
> getincludedirs" and  "make getlinklibs" return other things (like
> UMFPACK include files if PETSc has been configured to download and use
> UMFPACK). This caused problems when DOLFIN wanted to use a system
> installed version of UMFPACK.
>
>
> > or
> >
> >   2) Loading up the pickled Python dict and reading the flags out of
> > the MPI in particular
> >
>
> How would we do this?

Here is a simple script:

#!/usr/bin/env python
import os, sys

sys.path.insert(0, os.path.join(os.environ['PETSC_DIR'], 'python'))
sys.path.insert(0, os.path.join(os.environ['PETSC_DIR'], 'python',
'BuildSystem'))

import script

class ConfigReader(script.Script):
  def __init__(self):
    import RDict
    import os

    argDB = RDict.RDict(None, None, 0, 0)
    argDB.saveFilename = os.path.join(os.environ['PETSC_DIR'],
os.environ['PETSC_ARCH'], 'conf', 'RDict.db')
    argDB.load()
    script.Script.__init__(self, argDB = argDB)
    return

  def run(self):
    self.setup()
    framework = self.loadConfigure()
    mpi = framework.require('config.packages.MPI', None)
    print mpi.include, mpi.lib
    return

if __name__ == '__main__':
  print 'Starting'
  ConfigReader().run()
  print 'Ending'

   Matt

> Garth
>
>
> >    Matt
> >
> >> Thanks for testing!
> >>
> >>> Garth
> >>>
> >>>
> >>>
> >>>
> >>> Garth N. Wells wrote:
> >>>> Åsmund Ødegård wrote:
> >>>>> On Nov 30, 2007 5:32 PM, Garth N. Wells <gnw20@xxxxxxxxx
> >>>>> <mailto: gnw20@xxxxxxxxx>> wrote:
> >>>>>
> >>>>>     [snip]
> >>>>>      >
> >>>>>      > Usually, you should set what you used as prefix when installing
> >>>>>     umfpack.
> >>>>>      >
> >>>>>
> >>>>>     I'm using Ubuntu 7.10 with the libsuitespare-dev package. The
> >> header
> >>>>>     files are located under
> >>>>>
> >>>>>       /usr/include/suitesparse
> >>>>>
> >>>>>     "suitesparse" needs to be added to
> >>>>>
> >>>>>       ./simula-scons/scons/pkgconfiggenerator/umfpack.py
> >>>>>
> >>>>>
> >>>>> Thanks Garth. I thought that was already in there, but obviously it
> >>>>> wasn't. Added upstream now.
> >>>>>
> >>>> I'm also having a problem with petsc.py. I'm still trying to figure it
> >>>> out, but it appears to be related to the location of the MPI header
> >> files.
> >>>> Garth
> >>>>
> >>>>
> >>>>> --
> >>>>> [simula.research laboratory]
> >>>>>                 Åsmund Ødegård
> >>>>>                 IT-Manager
> >>>>>                 phone: +4790069915
> >>>>>                 http://www.simula.no/ <http://www.simula.no/>
> >>>>
> >>>> _______________________________________________
> >>>> DOLFIN-dev mailing list
> >>>> DOLFIN-dev@xxxxxxxxxx
> >>>> http://www.fenics.org/mailman/listinfo/dolfin-dev
> >>>>
> >>> --
> >>>
> >>>
> >>>
> >>>
> >>> Dr Garth N Wells
> >>> Department of Engineering
> >>> University of Cambridge
> >>> Trumpington Street
> >>> Cambridge CB2 1PZ
> >>> United Kingdom
> >>>
> >>> tel.   +44 1223 3 32743
> >>> fax.   +44 1223 3 32662
> >>> e-mail gnw20@xxxxxxxxx
> >>>
> >>>
> >>
> >>
> >> --
> >> [simula.research laboratory]
> >>                  Åsmund Ødegård
> >>                  IT-Manager
> >>                  phone: +4790069915
> >>                  http://www.simula.no/
> >> _______________________________________________
> >> DOLFIN-dev mailing list
> >> DOLFIN-dev@xxxxxxxxxx
> >> http://www.fenics.org/mailman/listinfo/dolfin-dev
> >>
> >>
> >
> >
> >
>
> --
>
> Dr Garth N Wells
> Department of Engineering
> University of Cambridge
> Trumpington Street
> Cambridge CB2 1PZ
> United Kingdom
>
> tel.   +44 1223 3 32743
> fax.   +44 1223 3 32662
> e-mail gnw20@xxxxxxxxx
>
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener


References