[petsc-dev] DMViewFromOptions() in fortran

Barry Smith bsmith at mcs.anl.gov
Tue Mar 25 20:22:10 CDT 2014


On Mar 25, 2014, at 7:43 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Tue, Mar 25, 2014 at 5:37 PM, Adrian Croucher <a.croucher at auckland.ac.nz> wrote:
> It looks like the fortran interface to DMViewFromOptions() is missing- on linking, I get an error "undefined reference to `dmviewfromoptions_'".
> 
> If that's the case, is there any chance an interface could be added?
> 
> Its a little weird. The function is defined by
> 
>   PETSC_STATIC_INLINE PetscErrorCode DMViewFromOptions(DM A,const char prefix[],const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,prefix,name);}
> 
> so I think it might be better to just call the PetscObject version from Fortran.

   They all have character string options thus need to have custom fortran stubs written for them

Request-assigned: someone   write custom stubs for XXXViewSetFromOptions()

>  
> Or alternatively, is there any other way of viewing a DMPlex that's been distributed using DMPlexDistribute()? DMView just seems to give me the cell counts as if the DMPlex was still all on rank 0. There doesn't seem to be anything in the docs about DMViewFromOptions() yet, so I'm just guessing what it's for from the examples.
> 
> No, there is another problem here. DMViewFromOptions() just calls DMView(). Are you sure the viewer was using PETSC_COMM_WORLD?
> 
> Can you run an example, like SNES ex12, and give -dm_view in parallel?
> 
>   Thanks,
> 
>      Matt
>  
> Thanks!
> 
> Cheers, Adrian
> 
> -- 
> Dr Adrian Croucher
> Department of Engineering Science
> University of Auckland
> New Zealand
> tel 64-9-373-7599 ext 84611
> 
> 
> 
> 
> -- 
> 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




More information about the petsc-dev mailing list