<div dir="ltr">I'm not sure where we are.  My code works on Edison but fails on OSX.  Should I call PetscInitializeFortran?  I do not have a C main.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 31, 2015 at 12:14 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
PetscErrorCode PetscInitializeFortran(void)<br>
{<br>
  MPI_Fint c1=0,c2=0;<br>
<br>
  if (PETSC_COMM_WORLD) c1 =  MPI_Comm_c2f(PETSC_COMM_WORLD);<br>
  c2 =  MPI_Comm_c2f(PETSC_COMM_SELF);<br>
  petscsetcommonblock_(&c1,&c2);<br>
<br>
Note that this routine is called automatically by the Fortran petscinitialize function.<br>
<span class="HOEnZb"><font color="#888888"><br>
  Barry<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Mar 31, 2015, at 10:19 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
><br>
> On Tue, Mar 31, 2015 at 10:13 AM, Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:<br>
> No, I don't have a C main program (like the doc says).<br>
><br>
> I can see COMM_WORLD set in the Fortran initialize wrapper, but where is COMM_SELF set?<br>
><br>
>    MAtt<br>
><br>
> On Tue, Mar 31, 2015 at 11:05 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
> On Tue, Mar 31, 2015 at 5:44 AM, Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:<br>
> I'm finding that my fortran code on OSX has PETSC_COMM_SELF == 0.<br>
><br>
> I can not find where PETSC_COMM_SELF is created.<br>
><br>
> Its set in PetscInitializeFortran(). Did you call that?<br>
><br>
>   Matt<br>
><br>
><br>
> Mark<br>
><br>
><br>
><br>
> --<br>
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
> -- Norbert Wiener<br>
><br>
><br>
><br>
><br>
> --<br>
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
> -- Norbert Wiener<br>
<br>
</div></div></blockquote></div><br></div>