[petsc-users] about speed
Satish Balay
balay at mcs.anl.gov
Mon Jul 26 16:15:30 CDT 2010
Perhaps you missed a step here. After 'configure' you shoud do 'make
all' to rebuild the PETSc libraries.
Then you should try 'make test' to verify the build.
After that - attempt to build your code.
satish
On Mon, 26 Jul 2010, Xuan YU wrote:
>
> On Jul 26, 2010, at 3:53 PM, Barry Smith wrote:
>
> >
> > ./configure an optimized version of PETSc (that is with the ./configure
> > flag of --with-debugging=0)
>
> ./configure --with -debugging=0
> it says I should config/configure.py --with-mpi=0 --with-debugging=no
> --download-f-blas-lapack=1
> so I did this.
>
> When I compile my code again, I got:
>
> gcc -Wall -Wwrite-strings -Wno-strict-aliasing -O -o pihm pihm.o f.o
> read_alloc.o initialize.o is_sm_et.o update.o print.o
> -Wl,-rpath,/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib
> -L/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -lpetsc -lX11
> -Wl,-rpath,/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib
> -L/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -lflapack -lfblas
> -lm -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -ldl -lgcc_s -lgfortran -lm -lm
> -ldl -lgcc_s -ldl
> /usr/bin/ld: cannot find -lpetsc
> collect2: ld returned 1 exit status
>
>
>
>
> > and run with -log_summary to get a summary of where it is spending the time.
>
>
>
>
> > This will give you a better idea of why it is taking so long.
> >
> > Barry
> >
> > On Jul 26, 2010, at 2:49 PM, Xuan YU wrote:
> >
> > > Hi,
> > >
> > > I am using TS solving a nonlinear problem. I created an approximate data
> > > structure for Jacobian matrix to be used with matcoloring, my
> > > MatFDColoringView is like this:
> > > <Picture 1.png>
> > >
> > > But the speed of code is too slow than what I expected. Only 10 time step
> > > costs 11seconds!
> > >
> > > What's wrong with my code? How can I speed up?
> > >
> > > Thanks!
> > >
> > > This is the ts_view result.
> > >
> > > TS Object:
> > > type: beuler
> > > maximum steps=100
> > > maximum time=10
> > > total number of nonlinear solver iterations=186
> > > total number of linear solver iterations=423
> > > SNES Object:
> > > type: ls
> > > line search variant: SNESLineSearchCubic
> > > alpha=0.0001, maxstep=1e+08, minlambda=1e-12
> > > maximum iterations=50, maximum function evaluations=10000
> > > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08
> > > total number of linear solver iterations=1
> > > total number of function evaluations=19
> > > KSP Object:
> > > type: gmres
> > > GMRES: restart=30, using Classical (unmodified) Gram-Schmidt
> > > Orthogonalization with no iterative refinement
> > > GMRES: happy breakdown tolerance 1e-30
> > > maximum iterations=10000, initial guess is zero
> > > tolerances: relative=1e-05, absolute=1e-50, divergence=10000
> > > left preconditioning
> > > using PRECONDITIONED norm type for convergence test
> > > PC Object:
> > > type: ilu
> > > ILU: out-of-place factorization
> > > 0 levels of fill
> > > tolerance for zero pivot 1e-12
> > > using diagonal shift to prevent zero pivot
> > > matrix ordering: natural
> > > factor fill ratio given 1, needed 1
> > > Factored matrix follows:
> > > Matrix Object:
> > > type=seqaij, rows=1838, cols=1838
> > > package used to perform factorization: petsc
> > > total: nonzeros=8464, allocated nonzeros=8464
> > > total number of mallocs used during MatSetValues calls =0
> > > not using I-node routines
> > > linear system matrix = precond matrix:
> > > Matrix Object:
> > > type=seqaij, rows=1838, cols=1838
> > > total: nonzeros=8464, allocated nonzeros=9745
> > > total number of mallocs used during MatSetValues calls =37
> > > not using I-node routines
> > >
> > >
> > > Xuan YU
> > > xxy113 at psu.edu
> > >
> > >
> > >
> > >
> >
> >
>
> Xuan YU (俞烜)
> xxy113 at psu.edu
>
>
>
>
More information about the petsc-users
mailing list