Dear Hong, Thanks for your reply. In the modified mumps.c, I replaced zmumps_c.h with cmumps_c.h because I want to use a single precision complex mumps in my double-precision PETSC application. In my PETSC application (double precision real and complex versions), I want to always call a single-precision MUMPS. My understanding is that mumps.c is designed so that a single precision PETSC application should use a single-precision MUMPS; a double-precision PETSC should use a double-precision MUMPS. I am looking for a way for my double-precision PETSC application to use a single precision MUMPS. Is it possible for a user to slightly modify mumps.c and use a single-precision MUMPS in double-precision PETSC? Do I have to make extra changes beyond the definition parts in mumps.c? In advance, thanks for your kind help.
Best, Evan On Sun, Jun 7, 2015 at 9:55 AM, Hong <hzh...@mcs.anl.gov> wrote: > 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 <eva...@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 <bsm...@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 <eva...@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 >>> >>> >> >