[petsc-users] Calling single-precision MUMPS from PETSC
Hong
hzhang at mcs.anl.gov
Sun Jun 7 11:55:36 CDT 2015
Evan,
The data types are defined as
s: single real
d: double real
c: single complex
z: double complex
see
https://books.google.com/books?id=4E9PY7NT8a0C&pg=PA22&lpg=PA22&dq=SDCZ+data+type&source=bl&ots=rd44BVkxjc&sig=KGxae_a5N54KD-AbO9CBnOE53CA&hl=en&sa=X&ei=IXJ0VeG7CNX-yQSujoOQCg&ved=0CDEQ6AEwAw#v=onepage&q=SDCZ%20data%20type&f=false_
Our mumps interface uses these definitions.
I do not understand why you suggest replacing z to c for double complex:
#if defined(PETSC_USE_COMPLEX)
#if defined(PETSC_USE_REAL_SINGLE)
#include <cmumps_c.h>
#else
//#include <zmumps_c.h> // old
#include <cmumps_c.h> // new
#endif
and replacing d to s for double real:
#if defined(PETSC_USE_REAL_SINGLE)
#include <smumps_c.h>
#else
//#include <dmumps_c.h> // old
#include <smumps_c.h> // new
#endif
Hong
On Fri, Jun 5, 2015 at 6:26 PM, Evan Um <evanum at gmail.com> wrote:
> Dear Barry and PETSC users,
>
> I am revisiting a problem about how to call a single precision MUMPS from
> double precision real/complex PETSC. After taking a look at mumps.c, I feel
> that the following changes (attached) can make it possible to always call a
> single precision MUMPS from PETSC. The change is basically to replace
> double precision MUMPS and their associated types with corresponding single
> ones. If someone already has some experience about this work, could you
> comment on the change? In advance, I appreciate your help.
>
> Best,
> Evan
>
> On Wed, Oct 22, 2014 at 1:36 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>>
>> There is no support for this. You can only call single precision MUMPS
>> from single precision PETSc and double precision MUMPS from double
>> precision PETSc.
>>
>> You could try to hack the interface that calls MUMPS from PETSc to
>> use the single precision version but we don’t support that.
>> src/mat/impls/aij/mpi/mumps/mumps.c
>>
>> Barry
>>
>> > On Oct 22, 2014, at 3:29 PM, Evan Um <evanum at gmail.com> wrote:
>> >
>> > Dear PETSC users,
>> >
>> > When MUMPS is used inside PETSC, The default MUMPS driver seems to be
>> double-precision MUMPS (i.e. DMUMPS). To reduce memory costs, I want to
>> test a single-precision MUMPS (SMUMPS) from PETSC. Does anyone know how to
>> switch from double to single-precision MUMPS inside PETSC? In advance,
>> thanks for your comments.
>> >
>> > Regards,
>> > Evan
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150607/3d8d3486/attachment.html>
More information about the petsc-users
mailing list