[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what's the difference between PetscViewerASCIIOpen() and PetscViewerBinaryOpen()?
- To: petsc-users@xxxxxxxxxxx
- Subject: Re: what's the difference between PetscViewerASCIIOpen() and PetscViewerBinaryOpen()?
- From: "Matthew Knepley" <knepley@xxxxxxxxx>
- Date: Tue, 22 Jan 2008 21:25:43 -0600
- 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=F3rq7Z4GNnyZOwykWeU55OGbv2RUMIEHX9AmrnOTgnc=; b=VBTxRy3MJ3rZRjhkdQjda4WY7a0jXNb/DtMfPt8mqQ3DgjDlsp1gSeAGX67IBc0f409NRqdPIoICLI0n4E20LyT7Q1A1UNjBmVXCiDq9gBL4DTXTys3OJ9+zuVRr/ZLapHITUrNVRcjze3SJIhHPNVgEIxsNMqyx6R0HwtkSWz4=
- 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=UC0URBNZPS4K3J+sTi92G71MYDBcNHicg9QkXDmqRmpdeQxiStyVTHn5ADMxljJVhlPxGYRjCVrMaYFT+kV1ltLaat0bDaGdvGC1+FAM8rATGMRaJLogHolihaAtXJH5CFLk3L+bdLsCk4ThhqDZR7fAbCWWu7L8/omUmAedRck=
- In-reply-to: <7ff0ee010801221850h4a4161efu6ec3190f3525346d@mail.gmail.com>
- References: <7ff0ee010801221850h4a4161efu6ec3190f3525346d@mail.gmail.com>
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
On Jan 22, 2008 8:50 PM, Yujie <recrusader@xxxxxxxxx> wrote:
> Hi everyone:
>
> #include "petsc.h"
> PetscErrorCode PetscViewerASCIIOpen(MPI_Comm comm,const char
> name[],PetscViewer *lab)
>
> #include "petsc.h"
> PetscErrorCode PetscViewerBinaryOpen(MPI_Comm comm,const char
> name[],PetscFileMode type,PetscViewer *binv)
>
> if the difference between them is that one for ASCII output and the other
> for Binary output, why are there different parameters?
It is historical. If you want to be generic, you should use
PetscViewerCreate()
PetscViewerSetType()
PetscViewerFileSetMode()
PetscViewerFileSetName()
which can create both.
> The speed to output matrix is very fast when I use PetscViewerBinaryOpen.
> However, when I use PetscViewerASCIIOpen, I can't get the matrix output. the
> code always is running and it has taken about one day! what's the problem?
> thank you.
ASCII files do not make sense for large matrices. You should use binary files.
Matt
> Regards,
> Yujie
>
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener