← Back to team overview

dolfin team mailing list archive

Re: Problems with compiling DOLFIN on Redhat

 

That looks right. It says alireza and not daan.

Then I would be *very* surprised if dolfin-config is not correct also.

Check the dolfin-config (in the same directory). It should contain the
correct paths.

Then runnin dolfin-config --cflags must also return the correct path.
Go to src/config and do

    ./dolfin-config --cflags

I'd be very surprised if it doesn't return the correct path.

Then go to another directory and do

    ./dolfin-config --cflags

If that does not also return the correct path, then the dolfin-config
in your PATH must be the wrong dolfin-config.

Maybe dolfin-config has been installed somewhere else in your PATH?

Type

    echo $PATH

then check if dolfin-config is in any of the directories.

/Anders


On Fri, Apr 07, 2006 at 07:34:55PM -0700, Alireza Forghani wrote:
>    Hi Anders,
> 
>    this is the content of var.tmp it looks right:
> 
>    COMPILER="libtool --silent --mode=compile --tag CXX g++"
>    LINKER="libtool --silent --mode=link --tag CXX g++"
>    CFLAGS="-I../../src/kernel/common -I../../src/kernel/fem
>    -I../../src/kernel/form -I../../src/kernel/function -I../../src/kernel/io
>    -I../../src/kernel/la -I../../src/kernel/main -I../../src/kernel/math
>    -I../../src/kernel/mesh -I../../src/kernel/nls -I../../src/kernel/ode
>    -I../../src/kernel/pde -I../../src/kernel/quadrature
>    -I../../src/kernel/parameter -I../../src/kernel/log
>    -I/data/alireza/petsc-2.3.1-p11
>    -I/data/alireza/petsc-2.3.1-p11/bmake/linux-gnu-c-real-debug
>    -I/data/alireza/petsc-2.3.1-p11/include
>    -I/data/alireza/petsc-2.3.1-p11/externalpackages/mpich2-1.0.3/linux-gnu-c-real-debug/include
>    -I/usr/local/mpich/default/include -I/usr/include/libxml2
>    -I../../src/modules/elasticity  -I../../src/modules/elasticity-updated
>    -I../../src/modules/convdiff  -I../../src/modules/navierstokes
>    -I../../src/modules/poisson  -I../../src/modules/stokes
>    -I../../src/modules/heat   -I../../src/kernel/common
>    -I../../src/kernel/fem -I../../src/kernel/form -I../../src/kernel/function
>    -I../../src/kernel/io -I../../src/kernel/la -I../../src/kernel/main
>    -I../../src/kernel/math -I../../src/kernel/mesh -I../../src/kernel/nls
>    -I../../src/kernel/ode -I../../src/kernel/pde
>    -I../../src/kernel/quadrature -I../../src/kernel/parameter
>    -I../../src/kernel/log  -I/data/alireza/petsc-2.3.1-p11
>    -I/data/alireza/petsc-2.3.1-p11/bmake/linux-gnu-c-real-debug
>    -I/data/alireza/petsc-2.3.1-p11/include
>    -I/data/alireza/petsc-2.3.1-p11/externalpackages/mpich2-1.0.3/linux-gnu-c-real-debug/include
>    -I/usr/local/mpich/default/include -I/usr/include/libxml2
>    -I../../src/modules/"
>    LIBS="-ldolfin -lncurses
>    -Wl,-rpath,/data/alireza/petsc-2.3.1-p11/lib/linux-gnu-c-real-debug
>    -Wl,-rpath,/data/alireza/petsc-2.3.1-p11/lib/linux-gnu-c-real-debug
>    -L/data/alireza/petsc-2.3.1-p11/lib/linux-gnu-c-real-debug -lpetscts
>    -lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc
>    -Wl,-rpath,/data/alireza/petsc-2.3.1-p11/externalpackages/mpich2-1.0.3/linux-gnu-c-real-debug/lib
>    -L/data/alireza/petsc-2.3.1-p11/externalpackages/mpich2-1.0.3/linux-gnu-c-real-debug/lib
>    -lmpich -lnsl -lrt -L/usr/X11R6/lib -lX11
>    -Wl,-rpath,/data/alireza/petsc-2.3.1-p11/externalpackages/fblaslapack/linux-gnu-c-real-debug
>    -L/data/alireza/petsc-2.3.1-p11/externalpackages/fblaslapack/linux-gnu-c-real-debug
>    -lflapack
>    -Wl,-rpath,/data/alireza/petsc-2.3.1-p11/externalpackages/fblaslapack/linux-gnu-c-real-debug
>    -L/data/alireza/petsc-2.3.1-p11/externalpackages/fblaslapack/linux-gnu-c-real-debug
>    -lfblas -lm -Wl,-rpath,/usr/lib/gcc-lib/i386-redhat-linux/3.2.2
>    -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2
>    -Wl,-rpath,/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../..
>    -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../.. -ldl -lgcc_eh -lg2c
>    -lm -Wl,-rpath,/usr/lib/gcc-lib/i386-redhat-linux/3.2.2
>    -Wl,-rpath,/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../.. -lm -lgcc_s
>    -Wl,-rpath,/usr/lib/gcc-lib/i386-redhat-linux/3.2.2
>    -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2
>    -Wl,-rpath,/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../..
>    -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../.. -ldl -lgcc_eh -ldl
>    -L/usr/lib -lxml2 -lz -lm"
>    PACKAGE="dolfin"
>    VERSION="0.6.1"
>    PREFIX="/data/alireza/dolfin-0.6.1/local"
>    PYTHON_CPPFLAGS=""
> 
>    Alireza
> 
>    Anders Logg wrote:
> 
>  ok, that looks right.
> 
>  The next step is to check the contents of the file
> 
>      src/config/var.tmp
> 
>  which is created when dolfin-config.
> 
>  If that file has the correct flags then dolfin-config should also spit
>  out the correct flags. If not, we can check why.
> 
>  If var.tmp does not contain the correct flags, I will also know what
>  to check next...
> 
>  /Anders
> 
> 
>  On Fri, Apr 07, 2006 at 04:21:59PM -0700, Alireza Forghani wrote:
> 
> 
>  I got:
> 
>  [alireza@master dolfin-0.6.1]$ make -s -C $PETSC_DIR getincludedirs
>  PETSC_DIR=$PETSC_DIR
>  -I/data/alireza/petsc-2.3.1-p11
>  -I/data/alireza/petsc-2.3.1-p11/bmake/linux-gnu-c-real-debug
>  -I/data/alireza/petsc-2.3.1-p11/include
>  -I/data/alireza/petsc-2.3.1-p11/externalpackages/mpich2-1.0.3/linux-gnu-c-real-debug/include
> 
>  Alireza
> 
>  Anders Logg wrote:
> 
> 
>  What do you get when you type
> 
>     make -s -C $PETSC_DIR getincludedirs PETSC_DIR=$PETSC_DIR
> 
>  ?
> 
>  This is the command run by configure to find out the PETSc flags.
> 
>  /Anders
> 
>  On Fri, Apr 07, 2006 at 03:15:26PM -0700, Alireza Forghani wrote:
> 
> 
> 
>  I downloaded and installed locally but problem remains.
>  when I type "dolfin-config --cflags"
> 
>  it returns:
> 
>  -I/usr/local/include -I../../src/kernel/common -I../../src/kernel/fem
>  -I../../src/kernel/form -I../../src/kernel/function
>  -I../../src/kernel/io -I../../src/kernel/la -I../../src/kernel/main
>  -I../../src/kernel/math -I../../src/kernel/mesh -I../../src/kernel/nls
>  -I../../src/kernel/ode -I../../src/kernel/pde
>  -I../../src/kernel/quadrature -I../../src/kernel/parameter
>  -I../../src/kernel/log -I/data/daan/FeNics/petsc-2.3.1-p2
>  -I/data/daan/FeNics/petsc-2.3.1-p2/bmake/linux-gnu-intel
>  -I/data/daan/FeNics/petsc-2.3.1-p2/include
>  -I/data/daan/FeNics/petsc-2.3.1-p2/include/mpiuni
>  -I/usr/local/mpich/default/include -I/usr/include/libxml2
>  -I../../src/modules/elasticity -I../../src/modules/elasticity-updated
>  -I../../src/modules/convdiff -I../../src/modules/navierstokes
>  -I../../src/modules/poisson -I../../src/modules/stokes
>  -I../../src/modules/heat -I../../src/kernel/common
>  -I../../src/kernel/fem -I../../src/kernel/form
>  -I../../src/kernel/function -I../../src/kernel/io -I../../src/kernel/la
>  -I../../src/kernel/main -I../../src/kernel/math -I../../src/kernel/mesh
>  -I../../src/kernel/nls -I../../src/kernel/ode -I../../src/kernel/pde
>  -I../../src/kernel/quadrature -I../../src/kernel/parameter
>  -I../../src/kernel/log -I/data/daan/FeNics/petsc-2.3.1-p2
>  -I/data/daan/FeNics/petsc-2.3.1-p2/bmake/linux-gnu-intel
>  -I/data/daan/FeNics/petsc-2.3.1-p2/include
>  -I/data/daan/FeNics/petsc-2.3.1-p2/include/mpiuni
>  -I/usr/local/mpich/default/include -I/usr/include/libxml2
>  -I../../src/modules/
> 
> 
>  also "dolfin-config --libs" returns:
> 
>  -I/usr/local/include -I../../src/kernel/common -I../../src/kernel/fem
>  -I../../src/kernel/form -I../../src/kernel/function
>  -I../../src/kernel/io -I../../src/kernel/la -I../../src/kernel/main
>  -I../../src/kernel/math -I../../src/kernel/mesh -I../../src/kernel/nls
>  -I../../src/kernel/ode -I../../src/kernel/pde
>  -I../../src/kernel/quadrature -I../../src/kernel/parameter
>  -I../../src/kernel/log -I/data/daan/FeNics/petsc-2.3.1-p2
>  -I/data/daan/FeNics/petsc-2.3.1-p2/bmake/linux-gnu-intel
>  -I/data/daan/FeNics/petsc-2.3.1-p2/include
>  -I/data/daan/FeNics/petsc-2.3.1-p2/include/mpiuni
>  -I/usr/local/mpich/default/include -I/usr/include/libxml2
>  -I../../src/modules/elasticity -I../../src/modules/elasticity-updated
>  -I../../src/modules/convdiff -I../../src/modules/navierstokes
>  -I../../src/modules/poisson -I../../src/modules/stokes
>  -I../../src/modules/heat -I../../src/kernel/common
>  -I../../src/kernel/fem -I../../src/kernel/form
>  -I../../src/kernel/function -I../../src/kernel/io -I../../src/kernel/la
>  -I../../src/kernel/main -I../../src/kernel/math -I../../src/kernel/mesh
>  -I../../src/kernel/nls -I../../src/kernel/ode -I../../src/kernel/pde
>  -I../../src/kernel/quadrature -I../../src/kernel/parameter
>  -I../../src/kernel/log -I/data/daan/FeNics/petsc-2.3.1-p2
>  -I/data/daan/FeNics/petsc-2.3.1-p2/bmake/linux-gnu-intel
>  -I/data/daan/FeNics/petsc-2.3.1-p2/include
>  -I/data/daan/FeNics/petsc-2.3.1-p2/include/mpiuni
>  -I/usr/local/mpich/default/include -I/usr/include/libxml2
>  -I../../src/modules/
> 
>  As you see every thing related to PETSC is assigned to "/data/daan...."
>  instead of "data/alireza/PETSC...."
> 
> 
>  Alireza Forghani wrote:
> 
> 
> 
>  Hi Garth,
> 
>  I did:
> 
>  [alireza@master alireza]$ env |grep PETSC_DIR
>  PETSC_DIR=/data/alireza/petsc-2.3.1-p11
> 
>  It might be because I haven't installed MPI on my account and didn't
>  disable it during configuration of MPI. may be it uses MPI of another
>  account?
> 
>  Alireza
> 
>  ------------------------
>  Date: Fri, 07 Apr 2006 21:25:12 +0200
>  From: "Garth N. Wells" [1]<g.n.wells@xxxxxxxxxx>
>  Subject: Re: [DOLFIN-dev] Problems with compiling DOLFIN on Redhat
>  To: Discussion of DOLFIN development [2]<dolfin-dev@xxxxxxxxxx>
>  Message-ID: [3]<1144437912.8606.2.camel@localhost.localdomain>
>  Content-Type: text/plain
> 
>  What do you see if you do
> 
> 
> 
> 
>  env | grep PETSC_DIR ?
> 
> 
> 
>  Garth
> 
> 
>  On Fri, 2006-04-07 at 10:22 -0700, Alireza Forghani wrote:
> 
> 
> 
> 
>  Hi Anders,
> 
> 
> 
>  Configuration says:
>  using PETSC_DIR=/data/alireza/petsc-2.3.1-p11
> 
> 
> 
>  disabling compilation of PyDOLFIN
>  checking for configarch... yes
> 
> 
> 
>  but exactly after that when I try to compile demo the error appears:
> 
> 
> 
>  /data/daan/FeNics/petsc-2.3.1-p2: Permission denied
> 
> 
> 
>  /data/daan/FeNics/petsc-2.3.1-p2/bmake/linux-gnu-intel: Permission
> 
> 
> 
>  denied
> 
> 
> 
>  /data/daan/FeNics/petsc-2.3.1-p2/include: Permission denied
>  /data/daan/FeNics/petsc-2.3.1-p2/include/mpiuni: Permission denied
>  /data/daan/FeNics/petsc-2.3.1-p2: Permission denied
>  /data/daan/FeNics/petsc-2.3.1-p2/bmake/linux-gnu-intel: Permission
> 
> 
> 
>  denied
> 
> 
> 
>  /data/daan/FeNics/petsc-2.3.1-p2/include: Permission denied
>  /data/daan/FeNics/petsc-2.3.1-p2/include/mpiuni: Permission denied
>  make[3]: *** [main.o] Error 1
> 
> 
> 
>  As you see it tries to use another library.
>  I also used:
>  export PATH="data/alireza/dolfin0.6.1/local/bin:$PATH"
>  and these are what exactly PETSc says after configuration:
> 
> 
> 
> 
>  =================================================================================
> 
> 
> 
> 
>              Configuring PETSc to compile on your
> 
> 
> 
>  system                         >
>  =================================================================================
> 
> 
>  Compilers:
> 
> 
> 
>   C Compiler:         mpicc  -fPIC -Wall -Wshadow -Wwrite-strings
> 
> 
> 
>  -fomit-frame-pointer -g3 >   Fortran Compiler:   mpif77  -fPIC -Wall
>  -g  > Linkers:
> 
> 
> 
>   Shared linker:   mpicc  -shared  -fPIC -Wall -Wshadow
> 
> 
> 
>  -Wwrite-strings -fomit-frame-pointer -g3 >   Dynamic linker:   mpicc
>  -shared  -fPIC -Wall -Wshadow -Wwrite-strings -fomit-frame-pointer
>  -g3 > PETSc:
> 
> 
> 
>   **
>   ** Before running "make" your PETSC_ARCH must be specified with:
>   **  ** setenv PETSC_ARCH linux-gnu-c-real-debug (csh/tcsh)
>   **  ** PETSC_ARCH=linux-gnu-c-real-debug; export PETSC_ARCH
> 
> 
> 
>  (sh/bash)
> 
> 
> 
>   **
>   PETSC_DIR: /data/alireza/petsc-2.3.1-p11
>   **
>   ** Now build and test the libraries with "make all test"
>   **
>   Scalar type:real
>   Clanguage: C
>  MPI:
>   PETSc shared libraries: disabled
>   PETSc dynamic libraries: disabled
>  X11:
>   Includes: ['-I/usr/X11R6/include']
>   Library: ['-L/usr/X11R6/lib -lX11']
>  BLAS/LAPACK:
> 
> 
> 
>  -Wl,-rpath,/data/alireza/petsc-2.3.1-p11/externalpackages/fblaslapack/linux-gnu-c-real-debug
>  -L/data/alireza/petsc-2.3.1-p11/externalpackages/fblaslapack/linux-gnu-c-real-debug
>  -lflapack
>  -Wl,-rpath,/data/alireza/petsc-2.3.1-p11/externalpackages/fblaslapack/linux-gnu-c-real-debug
>  -L/data/alireza/petsc-2.3.1-p11/externalpackages/fblaslapack/linux-gnu-c-real-debug
>  -lfblas
> 
> 
> 
>  Thank You,
> 
> 
> 
>  Alireza
> 
> 
> 
>  _______________________________________________
>  DOLFIN-dev mailing list
>  [4]DOLFIN-dev@xxxxxxxxxx
>  [5]http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> 
> 
> 
> 
>  _______________________________________________
>  DOLFIN-dev mailing list
>  [6]DOLFIN-dev@xxxxxxxxxx
>  [7]http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> 
> 
> 
> 
> 
> 
> 
>  _______________________________________________
>  DOLFIN-dev mailing list
>  [8]DOLFIN-dev@xxxxxxxxxx
>  [9]http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> 
> 
> 
> 
> 
> References
> 
>    Visible links
>    1. mailto:g.n.wells@xxxxxxxxxx
>    2. mailto:dolfin-dev@xxxxxxxxxx
>    3. mailto:1144437912.8606.2.camel@localhost.localdomain
>    4. mailto:DOLFIN-dev@xxxxxxxxxx
>    5. http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
>    6. mailto:DOLFIN-dev@xxxxxxxxxx
>    7. http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
>    8. mailto:DOLFIN-dev@xxxxxxxxxx
>    9. http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev

> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev


-- 
Anders Logg
Research Assistant Professor
Toyota Technological Institute at Chicago
http://www.tti-c.org/logg/



References