petsc I/O

Barry Smith bsmith at mcs.anl.gov
Wed Sep 13 18:11:25 CDT 2006


   PetscSynchronizedFGets() then all processes use sscanf()

    Good luck,

     Barry

You won't need any
if (rank == 0) code


On Wed, 13 Sep 2006, Matt Funk wrote:

> Hi,
>
> i need to read in an input file. So to open my file i use PETSCFOpen which
> works fine. But then my problems begin ... :)
>
> I guess i need to tell only the first proc in the communicator to fscan. But
> is there a PETSC function that returns me the processor id?
>
> And when i read the parameters in on the first proc i need to broadcast them
> to the other procs. Does PETSC have anything for this?
>
>
> thanks
> mat
>
>
> On Wednesday 13 September 2006 11:32, Yaron Kretchmer wrote:
>> Yes, this is possible. This is how we use PETSc.
>>
>> Yaron
>>
>> On 9/13/06, Randall Mackie <randy at geosystem.us> wrote:
>>> This may be a silly question, but is it possible to compile my PETSc
>>> program and build a static
>>> binary that will run on another cluster, or is it necessary to recompile
>>> my program on each
>>> cluster on which I want to run it?
>>>
>>> Randy
>>>
>>> --
>>> Randall Mackie
>>> GSY-USA, Inc.
>>> PMB# 643
>>> 2261 Market St.,
>>> San Francisco, CA 94114-1600
>>> Tel (415) 469-8649
>>> Fax (415) 469-5044
>>>
>>> California Registered Geophysicist
>>> License No. GP 1034
>
>




More information about the petsc-users mailing list