petsc4py fails to configure with my own lapack/blas

Barry Smith bsmith at mcs.anl.gov
Thu Jun 4 21:33:36 CDT 2009


    This is a petsc-maint at mcs.anl.gov request, I am sending it over  
there and removing from the petsc-users list. Please respond only to  
the petsc-maint at mcs.anl.gov list

    Back to the original problem using the BLAS/LAPACK you provided.  
It has nothing to do with petsc4py

     The FOTRAN compiler your mpif90 is using is gfortran (from the  
configure.log Driving: /usr/bin/gfortran ) but the Fortran compiler  
used to build your blas/lapack libraries is
g95 (from the log file xerbla.f:(.text+0x1b): undefined reference to  
`_g95_get_ioparm')

     You cannot do this. You need to either
1) build your MPI to use g95 or
2) build your BLAS/LAPACK with gfortran
then run PETSc's config/configure.py again.

    Barry

Best would be to totally remove g95 from your machine then this kind  
of problem would not happen.

On Jun 4, 2009, at 5:00 PM, Ondrej Certik wrote:

> Hi,
>
> I am trying to build petsc-3.0.0 inside Sage, for which I want it to
> use Sage's lapack and blas.
>
> Here is what I do:
>
> ./configure --prefix="$SAGE_LOCAL"
> --with-blas-lapack-dir="$SAGE_LOCAL/lib" --CFLAGS="-fPIC"
> --CXXFLAGS="-fPIC"
>
> (The -fPIC flags are necessary, otherwise petsc4py fails to build on
> 64bit when linking with petsc -- that might be another bug)
>
> When I execute the above line, I get:
>
> *********************************************************************************
>         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log
> for details):
> ---------------------------------------------------------------------------------------
> You set a value for --with-blas-lapack-dir=<dir>, but
> /home/ondrej/ext/spd-3.4.2spd3-ubuntu-64bit/local/lib cannot be used
> *********************************************************************************
>
>
> and a configure.log is attached. I also tried:
>
> ./configure --prefix="$SAGE_LOCAL"
> --with-lapack-lib="$SAGE_LOCAL/lib/liblapack.a"
> --with-blas-lib="$SAGE_LOCAL/lib/libblas.a" --CFLAGS="-fPIC"
> --CXXFLAGS="-fPIC"
>
> but I got the same result. So as a workaround, I configure it with:
>
> ./configure --prefix="$SAGE_LOCAL" --with-blas-lapack-dir="/usr/lib"
> --CFLAGS="-fPIC" --CXXFLAGS="-fPIC"
>
> which works fine, petsc4py also installs fine, but unfortunately it
> doesn't import:
>
> http://code.google.com/p/femhub/issues/detail?id=30
>
> which I suspect is due to the wrong lapack and blas during petsc build
> (but I may be wrong, maybe it's another bug).
>
>
> Does anyone knows what else I can try to get it to work?
>
> Thanks,
> Ondrej
> <configure.log>



More information about the petsc-users mailing list