← Back to team overview

dolfin team mailing list archive

Re: UMFpack

 

These are the values of some internal variables in umfpack.py:
compiler: g++ 
cflags: -I/home/rfarahi/math/UMFPACK/Include -I/home/rfarahi/math/AMD/Include -I/home/rfarahi/math/UFconfig
linker: g++ 
libs: -L/usr/lib -lblas -L/home/rfarahi/math/UMFPACK/Lib -lumfpack -L/home/rfarahi/math/AMD/Lib -lamd 

So, the actual command lines for the test part of umfpack.py are as follows:
g++ -I/home/rfarahi/math/UMFPACK/Include -I/home/rfarahi/math/AMD/Include -I/home/rfarahi/math/UFconfig -c test.cpp
g++ -L/usr/lib -lblas -L/home/rfarahi/math/UMFPACK/Lib -lumfpack -L/home/rfarahi/math/AMD/Lib -lamd test.o

I have run them directly, and this the log:
[rfarahi@alteran pkgconfiggenerators]$ g++ -I/home/rfarahi/math/UMFPACK/Include -I/home/rfarahi/math/AMD/Include -I/home/rfarahi/math/UFconfig -c test.cpp
[rfarahi@alteran pkgconfiggenerators]$ g++ -L/usr/lib -lblas -L/home/rfarahi/math/UMFPACK/Lib -lumfpack -L/home/rfarahi/math/AMD/Lib -lamd test.o
test.o(.text+0x49): In function `main':
: undefined reference to `umfpack_di_symbolic'
test.o(.text+0x70): In function `main':
: undefined reference to `umfpack_di_numeric'
test.o(.text+0x7f): In function `main':
: undefined reference to `umfpack_di_free_symbolic'
test.o(.text+0xae): In function `main':
: undefined reference to `umfpack_di_solve'
test.o(.text+0xbd): In function `main':
: undefined reference to `umfpack_di_free_numeric'
collect2: ld returned 1 exit status

And this linking error results in the GetATLASDir error. Although, it is related to UMFPack lib.
Any advice?

Reza

----- Original Message ----
From: Reza Farrahi Moghaddam <imriss@xxxxxxxxx>
To: dolfin mailing list <dolfin-dev@xxxxxxxxxx>
Sent: Thursday, April 24, 2008 2:27:07 PM
Subject: Re: [DOLFIN-dev] UMFpack


Here are two tests. 
 
[rfarahi@alteran pkgconfiggenerators]$ export UMFPACK_DIR=/home/rfarahi/math/UMFPACK
[rfarahi@alteran pkgconfiggenerators]$ export AMD_DIR=/home/rfarahi/math/AMD
[rfarahi@alteran pkgconfiggenerators]$ export UFCONFIG_DIR=/home/rfarahi/math/UFconfig
[rfarahi@alteran pkgconfiggenerators]$ python umfpack.py
** Warning **
pkg-config files may be generated in the directory:
 /home/rfarahi/math/dolfin-hg/dolfin/scons/simula-scons/simula_scons/pkgconfiggenerators.
Consider updating your PKG_CONFIG_PATH variable with this directoy.
Traceback (most recent call last):
  File "umfpack.py", line 323, in <module>
    generatePkgConf(directory=".")
  File "umfpack.py", line 309, in generatePkgConf
    version, libs, cflags = pkgTests(sconsEnv=sconsEnv)
  File "umfpack.py", line 230, in pkgTests
    cflags = pkgCflags(sconsEnv=sconsEnv)
  File "umfpack.py", line 197, in pkgCflags
    cflags += " -I%s" % getUFconfigIncDir(sconsEnv)
  File "umfpack.py", line 103, in getUFconfigIncDir
    filename="UFconfig.h", what="includes", package="UFconfig")
  File "umfpack.py", line 43, in find_dependency_file
    raise UnableToFindPackage(package)
NameError: global name 'UnableToFindPackage' is not defined

[rfarahi@alteran pkgconfiggenerators]$ export UMFPACK_DIR=/home/rfarahi/math
[rfarahi@alteran pkgconfiggenerators]$ export AMD_DIR=/home/rfarahi/math
[rfarahi@alteran pkgconfiggenerators]$ export UFCONFIG_DIR=/home/rfarahi/math
[rfarahi@alteran pkgconfiggenerators]$ python umfpack.py
** Warning **
pkg-config files may be generated in the directory:
 /home/rfarahi/math/dolfin-hg/dolfin/scons/simula-scons/simula_scons/pkgconfiggenerators.
Consider updating your PKG_CONFIG_PATH variable with this directoy.
Traceback (most recent call last):
  File "umfpack.py", line 323, in <module>
    generatePkgConf(directory=".")
  File "umfpack.py", line 309, in generatePkgConf
    version, libs, cflags = pkgTests(sconsEnv=sconsEnv)
  File "umfpack.py", line 285, in pkgTests
    "variable ATLAS_DIR if this is wrong.\n") % getATLASDir()
NameError: global name 'getATLASDir' is not defined


Currently, I don't use atlas. 
These are BLAS configurations for UFconfig (in UFconfig.mk):
 
# This is probably slow ... it might connect to the Standard Reference BLAS:
BLAS =-L/usr/lib/gcc/i386-redhat-linux/4.1.0 -lblas -lgfortran -lgfortranbegin
LAPACK = -llapack

----- Original Message ----
From: Johannes Ring <johannr@xxxxxxxxx>
To: Reza Farrahi Moghaddam <imriss@xxxxxxxxx>
Cc: dolfin mailing list <dolfin-dev@xxxxxxxxxx>
Sent: Thursday, April 24, 2008 1:23:17 PM
Subject: Re: [DOLFIN-dev] UMFpack

On Thu, April 24, 2008 Reza Farrahi Moghaddam wrote:
> Hi Johannes,
>
> This is the result.
>
> [rfarahi@alteran pkgconfiggenerators]$ pwd
> /home/rfarahi/math/dolfin-hg/dolfin/scons/simula-scons/simula_scons/pkgconfiggenerators
> [rfarahi@alteran pkgconfiggenerators]$ python umfpack.py
> ** Warning **
> pkg-config files may be generated in the directory:
>  /home/rfarahi/math/dolfin-hg/dolfin/scons/simula-scons/simula_scons/pkgconfiggenerators.
> Consider updating your PKG_CONFIG_PATH variable with this directoy.
> Traceback (most recent call last):
>  File "umfpack.py", line 323, in <module>
>    generatePkgConf(directory=".")
>  File "umfpack.py", line 309, in generatePkgConf
>    version, libs, cflags = pkgTests(sconsEnv=sconsEnv)
>  File "umfpack.py", line 230, in pkgTests
>    cflags = pkgCflags(sconsEnv=sconsEnv)
>  File "umfpack.py", line 193, in pkgCflags
>    cflags = "-I%s" % getUmfpackIncDir(sconsEnv)
>  File "umfpack.py", line 142, in getUmfpackIncDir
>    return getUmfpackDirs(sconsEnv)[0]
>  File "umfpack.py", line 134, in getUmfpackDirs
>    filename="umfpack.h", what="includes", package="UMFPACK")
>  File "umfpack.py", line 43, in find_dependency_file
>    raise UnableToFindPackage(package)
> NameError: global name 'UnableToFindPackage' is not defined

This NameError is a bug (fixed in the latest commit), but not the reason
for the script to fail. Can you try to run the script one more time? This
time you should define three environment variables: UMFPACK_DIR, AMD_DIR,
and UFCONFIG_DIR. For example

export UMFPACK_DIR=/home/rfarahi/math/UMFPACK
export AMD_DIR=/home/rfarahi/math/AMD
export UFCONFIG_DIR=/home/rfarahi/math/UFconfig

or perhaps like this:

export UMFPACK_DIR=/home/rfarahi/math
export AMD_DIR=/home/rfarahi/math
export UFCONFIG_DIR=/home/rfarahi/math

Then run umfpack.py again and reply with failure or success.

Johannes

> [rfarahi@alteran pkgconfiggenerators]$ ls
> boost.py                  hypre.py          numpy.py  python.pyc
> superlu.py
> boost.pyc                __init__.py      numpy.pyc  scotch.py
> trilinos.py
> commonPkgConfigUtils.py  __init__.pyc      petsc.py  scotch.pyc
> trilinos.pyc
> commonPkgConfigUtils.pyc  install_packages  petsc.pyc  slepc.py
> umfpack.py
> dolfin.py                numeric.py        python.py  slepc.pyc
> umfpack.pyc
>
> Also, here is the list of UMFPACK directory (Include sub-directory):
>
> [rfarahi@alteran Include]$ pwd
> /home/rfarahi/math/UMFPACK/Include
> [rfarahi@alteran Include]$ ls
> umfpack_col_to_triplet.h  umfpack.h                umfpack_report_perm.h
>      umfpack_symbolic.h
> umfpack_defaults.h        umfpack_load_numeric.h
> umfpack_report_status.h    umfpack_tictoc.h
> umfpack_free_numeric.h    umfpack_load_symbolic.h
> umfpack_report_symbolic.h  umfpack_timer.h
> umfpack_free_symbolic.h    umfpack_numeric.h
> umfpack_report_triplet.h  umfpack_transpose.h
> umfpack_get_determinant.h  umfpack_qsymbolic.h
> umfpack_report_vector.h    umfpack_triplet_to_col.h
> umfpack_get_lunz.h        umfpack_report_control.h
> umfpack_save_numeric.h    umfpack_wsolve.h
> umfpack_get_numeric.h      umfpack_report_info.h
> umfpack_save_symbolic.h
> umfpack_get_symbolic.h    umfpack_report_matrix.h  umfpack_scale.h
> umfpack_global.h          umfpack_report_numeric.h  umfpack_solve.h
>
> Thanks,
> Reza
>
> ----- Original Message ----
> From: Johannes Ring <johannr@xxxxxxxxx>
> To: Reza Farrahi Moghaddam <imriss@xxxxxxxxx>
> Cc: dolfin mailing list <dolfin-dev@xxxxxxxxxx>
> Sent: Thursday, April 24, 2008 11:42:09 AM
> Subject: Re: [DOLFIN-dev] UMFpack
>
> Hi Reza,
>
> there is a script 'umfpack.py' under the
> scons/simula-scons/simula_scons/pkgconfiggenerators/ subfolder. Can you
> run that script manually and reply with any error messages?
>
> Johannes
>
> On Thu, April 24, 2008 Reza Farrahi Moghaddam wrote:
>> I am using dolfin 0.7.2
>>
>> I am trying to switch to the latest version (using hg clone ...). My
>> system is CentOS 4.4 (final), and I have installed UMFapck and AMD
>> locally
>> in the following directories: /home/rfarahi/math/UMFPACK,
>> /home/rfarahi/math/AMD and /home/rfarahi/math/UFconfig
>>
>> But, it seems scons cannot see the umfpack lib. Am I missing something?
>>
>> I have the same problem with the boost lib.
>>
>> Here is the log:
>> [rfarahi@alteran dolfin]$ pwd
>> /home/rfarahi/math/dolfin-hg/dolfin
>>
>> scons winUmfpackDir=/home/rfarahi/math
>> prefix=/home/rfarahi/math/dolfin-hg/linux-opt --help Umfpack=1 install
>> withBoostDir=/usr/local/include/boost-1_35
>>
>>
>> scons: Reading SConscript files ...
>> Using options from scons/options.cache
>> Checking for numpy-1... yes
>> Checking for scotch... no (pkg-config file not found)
>>  Trying to generate pkg-config file for scotch... failed
>> Checking for trilinos... no (pkg-config file not found)
>>  Trying to generate pkg-config file for trilinos... failed
>> Checking for ufc-1... yes
>> Checking for umfpack... no (pkg-config file not found)
>>  Trying to generate pkg-config file for umfpack... failed
>> Checking for python-2... yes
>> Checking for petsc... no (pkg-config file not found)
>>  Trying to generate pkg-config file for petsc... failed
>> Checking for gts... yes
>> Checking for boost... no (pkg-config file not found)
>>  Trying to generate pkg-config file for boost... failed
>> Checking for slepc... no (pkg-config file not found)
>>  Trying to generate pkg-config file for slepc... failed
>> Checking for libxml-2.0... yes
>> Resolving compiler... done
>> Warning: Unknown dependency package: boost
>> Enabling compilation of PyDOLFIN
>> scons: warning: The env.Copy() method is deprecated; use the env.Clone()
>> method instead.
>> File "/home/rfarahi/math/dolfin-hg/dolfin/dolfin/SConscript", line 91,
>> in
>> <module>
>> scons: done reading SConscript files.
>> prefix: Installation prefix ( /path/to/prefix )
>>    default: /usr/local
>>    actual: /home/rfarahi/math/dolfin-hg/linux-opt
>> binDir: Binary installation directory ( /path/to/binDir )
>>    default: /home/rfarahi/math/dolfin-hg/linux-opt/bin
>>    actual: /home/rfarahi/math/dolfin-hg/linux-opt/bin
>> libDir: Library installation directory ( /path/to/libDir )
>>    default: /home/rfarahi/math/dolfin-hg/linux-opt/lib
>>    actual: /home/rfarahi/math/dolfin-hg/linux-opt/lib
>> pkgConfDir: Directory for installation of pkg-config files (
>> /path/to/pkgConfDir )
>>    default: /home/rfarahi/math/dolfin-hg/linux-opt/lib/pkgconfig
>>    actual: /home/rfarahi/math/dolfin-hg/linux-opt/lib/pkgconfig
>> includeDir: C/C++ header installation directory ( /path/to/includeDir )
>>    default: /home/rfarahi/math/dolfin-hg/linux-opt/include
>>    actual: /home/rfarahi/math/dolfin-hg/linux-opt/include
>> pythonModuleDir: Python module installation directory (
>> /path/to/pythonModuleDir )
>>    default:
>> /home/rfarahi/math/dolfin-hg/linux-opt/lib/python2.5/site-packages
>>    actual:
>> /home/rfarahi/math/dolfin-hg/linux-opt/lib/python2.5/site-packages
>> pythonExtDir: Python extension module installation directory (
>> /path/to/pythonExtDir )
>>    default:
>> /home/rfarahi/math/dolfin-hg/linux-opt/lib/python2.5/site-packages
>>    actual:
>> /home/rfarahi/math/dolfin-hg/linux-opt/lib/python2.5/site-packages
>> enableDebug: Build with debug information (yes|no)
>>    default: 1
>>    actual: True
>> enableDebugUblas: Add some extra Ublas debug information (yes|no)
>>    default: 0
>>    actual: False
>> enableOptimize: Compile with optimization (yes|no)
>>    default: 0
>>    actual: False
>> enableDocs: Build documentation (yes|no)
>>    default: 0
>>    actual: False
>> enableDemos: Build demos (yes|no)
>>    default: 0
>>    actual: False
>> enableTests: Build tests (yes|no)
>>    default: 0
>>    actual: False
>> enableProjectionLibrary: Enable projection library (yes|no)
>>    default: 0
>>    actual: False
>> enableMpi: Compile with support for MPI (yes|no)
>>    default: yes
>>    actual: True
>> enablePetsc: Compile with support for PETSc linear algebra (yes|no)
>>    default: yes
>>    actual: True
>> enableSlepc: Compile with support for SLEPc (yes|no)
>>    default: yes
>>    actual: True
>> enableScotch: Compile with support for SCOTCH graph partitioning
>> (yes|no)
>>    default: yes
>>    actual: True
>> enableGts: Compile with support for GTS (yes|no)
>>    default: yes
>>    actual: True
>> enableUmfpack: Compile with support for UMFPACK (yes|no)
>>    default: yes
>>    actual: True
>> enableTrilinos: Compile with support for Trilinos (yes|no)
>>    default: yes
>>    actual: True
>> enablePydolfin: Compile the python wrappers of Dolfin (yes|no)
>>    default: yes
>>    actual: True
>> withPetscDir: Specify path to PETSc ( /path/to/withPetscDir )
>>    default: None
>>    actual: None
>> withSlepcDir: Specify path to SLEPc ( /path/to/withSlepcDir )
>>    default: None
>>    actual: None
>> withScotchDir: Specify path to SCOTCH ( /path/to/withScotchDir )
>>    default: None
>>    actual: None
>> withUmfpackDir: Specify path to UMFPACK ( /path/to/withUmfpackDir )
>>    default: None
>>    actual: /home/rfarahi/math
>> withTrilinosDir: Specify path to Trilinos ( /path/to/withTrilinosDir )
>>    default: None
>>    actual: None
>> withBoostDir: Specify path to Boost ( /path/to/withBoostDir )
>>    default: None
>>    actual: /usr/local/include/boost-1_35
>> cacheOptions: Cache command-line options for later invocations (yes|no)
>>    default: 1
>>    actual: True
>> veryClean: Remove the sconsign file during clean, must be set during
>> regular build (yes|no)
>>    default: 0
>>    actual: False
>> customCxxFlags: Customize compilation of C++ code
>>    default:
>>    actual:
>> SSLOG: Set Simula scons log file
>>    default: /home/rfarahi/math/dolfin-hg/dolfin/scons/simula_scons.log
>>    actual: /home/rfarahi/math/dolfin-hg/dolfin/scons/simula_scons.log
>> Use scons -H for help about command-line options.
>>
>>
>>      __________________________________________________________________
>> Looking for the perfect gift? Give the gift of Flickr!
>>
>> http://www.flickr.com/gift/_______________________________________________
>> DOLFIN-dev mailing list
>> DOLFIN-dev@xxxxxxxxxx
>> http://www.fenics.org/mailman/listinfo/dolfin-dev
>>
>
>
>      __________________________________________________________________
> Be smarter than spam. See how smart SpamGuard is at giving junk email the
> boot with the All-new Yahoo! Mail.  Click on Options in Mail and switch to
> New Mail today or register for free at
> http://mail.yahoo.ca_______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>








Looking for the perfect gift? Give the gift of Flickr!


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

Follow ups