[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PETSc + HYPRE
- To: petsc-users@xxxxxxxxxxx
- Subject: Re: PETSc + HYPRE
- From: "Lisandro Dalcin" <dalcinl@xxxxxxxxx>
- Date: Tue, 15 Apr 2008 11:52:03 -0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=RbGJh9lJ3TYRCuzqpfOizIu9sobBmfm7VqzNsViF7IY=; b=ByEBYfmTFuZM1ZbfLkfTa6U5qoMKzo8D/uxiDUsmlij4s3MwJVcCoXR8u9S9YGxjtYpK/M/LbS0hE3UhEsXo40gq+srWh4v2U9cUa1sZrwqiDGG4gPFCfeLsT5KMuoih43Dr0BUl7ExU0bxjIpgG+nvpwis/M8+mokzyAwulH64=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HAwyNqyVhojB3cKsTFgS07PmatoQw21fU0Qwzg7Dh5vVixa9eGtFl2I0X7cOVpt7kWRRNsryyPVyxEZdez8b7/Yu9FvaTQD1Op6VpOr0a062tNGJEhLawcCy23BvK1TGtgD369bcWs+HsCVwZNZmm/vYDAk/z6wlIKyvHxRas2k=
- In-reply-to: <7d6158b80804150722p49687acdpca3e571b05679026@mail.gmail.com>
- References: <7d6158b80804150722p49687acdpca3e571b05679026@mail.gmail.com>
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
Do not create the PC !!
Create first the KSP, next do KSPGetPC, and then configure the PC
On 4/15/08, Márcio Ricardo Pivello <pivello@xxxxxxxxx> wrote:
> Hi, I want to use hypre preconditioners coupled with PETSc, but so far I
> have not succeeded. Here's what I've done:
>
> Firstly I create the preconditioner:
>
>
> Mat A_Par(NSubSteps)
> Vec Unk_Par(NSubSteps)
> Vec B_Load_Par(NSubSteps)
> KSP KspSolv
> ---> PC precond
>
> ******************************
>
> Later in the code I set the preconditioner type and create the Krylov
> solver:
>
> ----> call PCSetType(precond,'hypre',iError)
> ----> call PCHYPRESetType(precond,'boomeramg',iError)
> ----> call KSPCreate (PETSC_COMM_WORLD, KspSolv, iError)
> ----> call KSPSetFromOptions (KspSolv, iError)
> call KSPSetOperators (KspSolv, A_Par(nstp), A_Par(nstp),
> SAME_NONZERO_PATTERN, iError)
> call KSPSolve (KspSolv, B_Load_Par(nstp), Unk_Par(nstp), iError)
>
>
> ***************************
>
> Then, when I run the program I put the following options in the command
> line:
>
> mpirun -np 2 /home/mpivello/bin/SolverGP.x -pc_type hypre -pc_hypre_type
> boomeramg -pc_hypre_boomeramg_sweep_all true -pc_hypre_boomeramg_grid_sweeps
> 1 -pc_hypre_boomeramg_strong_threshold 0.9
> -pc_hypre_boomeramg_max_iter 5
> -pc_hypre_boomeramg_coarsen_type modifiedRuge-Stueben -f0
> dummy.tmp 2>&1 -ksp_gmres_restart 200 -ksp_max_it 3000 -ksp_rtol 1.0e-10
> -ksp_atol 1.0e-15 -ksp_monitor -log_summary < /dev/null > run.parallel.log &
>
> But this proceeding is not working. What am I doing wrong?
>
> Thanks in advance
>
> Márcio Ricardo
>
>
>
>
>
--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594