how to set values of petsc matrix into double precision?

xiaoyin ji sapphire.jxy at gmail.com
Tue Jun 9 16:27:22 CDT 2009


Hi,

Thanks for the help with Makefile for multiple files in PETSc, I've
also found a way that works for me, simply add these two libs:

LIBSCOMP = -I/gpfs_irving/irving/xji/petsc-3.0.0-p5/linux-gnu-c-debug/include
-I/gpfs_irving/irving/xji/petsc-3.0.0-p5/include -I/usr/X11R6/include

LIBSLINK = -Wl,-rpath,/gpfs_irving/irving/xji/petsc-3.0.0-p5/linux-gnu-c-debug/lib
-L/gpfs_irving/irving/xji/petsc-3.0.0-p5/linux-gnu-c-debug/lib
-lpetscts -lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec
-lpetsc -L/usr/X11R6/lib -lX11 -llapack -lblas
-L/usr/local/intel/mpich-1.2.7p1/linux86/9.1/lib -ldl -lmpich
-lpthread -lrt -L/usr/local/intel/cc/9.1.045/lib
-L/usr/lib/gcc/i386-redhat-linux/3.4.6 -limf -lipgo -lgcc_s -lirc
-lirc_s -lmpichf90 -L/usr/local/intel/fc/9.1.040/lib -lifport -lifcore
-lm -lm -ldl -lmpich -lpthread -lrt -limf -lipgo -lgcc_s -lirc -lirc_s
-ldl

LIBSCOMP is for compiling .F90 files into .o and LIBSLINK is for
linking .o files into single executable. I did not use "include
${PETSC_DIR}/conf/base"


Now I came up with this new problem, I could not find the way to let
petsc mat store double precision values. I used double precision value
in MatSetValue() but the MatView showed the stored data to be single
precision. I've also tried to recompile petsc as:

./config/configure.py --with-precision=double

which didnot work for me.

Thanks very much.

Xiaoyin Ji

----------------------------------------------

Xiaoyin Ji
Graduate Student
Department of Materials Science and Engineering
North Carolina State University


More information about the petsc-users mailing list