Complex matrices with UMFPACK

Christophe Geuzaine geuzaine at acm.caltech.edu
Wed Jun 6 05:20:35 CDT 2007


Barry,

Attached is a new version of the "umfpack.c" interface, which brings
support for complex arithmetic and 64 bit addressing to the UMFPACK LU
solvers:

- complex arithmetic support is achieved by using a new UMFPACK feature
introduced in UMFACK 4.4, which allows to pass complex matrices directly
in packed format, with real and imaginary parts interleaved. This allows
to use complex matrices in UMFPACK without copying data around (this was
impossible with UMPACK <= 4.3, as these versions required passing real
and imaginary parts separately);

- 64 bit addressing is achieved by switching to the "long" version of
the UMFPACK API, where all integers are replaced by "UF_long"s. This
does not change anything on 32 bit architectures, but allows to
manipulate >2Gb matrices on 64 bit machines.

Notes:

1) This new version has only been tested with the latest version of
UMFPACK (version 5.1). Everything should work with UMFPACK >= 4.4, but
complex matrices will *not* work with UMFPACK <= 4.3.

2) To enable complex UMFPACK matrices one needs to remove the
"#requiresscalar real" directive in
"src/mat/impls/aij/seq/umfpack/makefile" and add "self.complex = 1" in
the "Configure" class in "python/PETSc/packages/UMFPACK.py".

3) If you integrate these changes in the official PETSc tree, you should
probably also upgrade "python/PETSc/packages/UMFPACK.py" to download
UMFPACK 5.1 instead of UMFPACK 4.3 (and fix any related configuration
magic...).


Cheers,

Christophe


Barry Smith wrote:
> 
> 
>    Christophe,
> 
>     We didn't plan to do it, but if UMFPACK supports complex
> numbers by compiling in C++ it should be trivial to add.
> Just edit src/mat/impls/aij/seq/makefile remove the
> rule at the top that requires real and see what happens
> when you compile in that directory. You may have to make some
> minor changes to the file to get it working. Properly completely
> the job also requires some changes to python/Petsc/packages/umfpack.py
> 
>    Good luck,
> 
>   If UMFPACK supports complex by some non-standard extension
> of C for the complex data type (like gnu gcc provides) it will
> not be so simple because we don't currently PETSc working this way.
> Actually a user was going to add this support but we haven't
> heard back. It may have been too difficult.
> 
>    Barry
> 
> 
> On Sun, 25 Jun 2006, Christophe Geuzaine wrote:
> 
>>
>> Just a quick question: are there any plans to support complex matrices
>> with UMFPACK in the (relatively near) future? If not, how hard do you
>> think it would be to extend the current integration of UMFPACK to deal
>> with complex numbers?
>>
>> Many thanks for all your work on PETSc: it's proven a very useful and
>> reliable tool over the years!
>>
>> Best,
>>
>> Christophe
>>
>>
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: umfpack.c
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20070606/ec08abf2/attachment.c>


More information about the petsc-dev mailing list