<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 4, 2018 at 2:42 PM, Blaise A Bourdin <span dir="ltr"><<a href="mailto:bourdin@lsu.edu" target="_blank">bourdin@lsu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Is SETERRQ still available in fortran? I notice that it is not used in any of the example, but the man page still mentions fortran. Using it in a fortran code leads to compiler errors.<br>
Am I doing something wrong?<br></blockquote><div><br></div><div>I see it here:</div><div><br></div><div>  <a href="https://bitbucket.org/petsc/petsc/src/c925fbded0167f274f0216824a05edb59a5721f5/include/petsc/finclude/petscsys.h?at=master&fileviewer=file-view-default#petscsys.h-197">https://bitbucket.org/petsc/petsc/src/c925fbded0167f274f0216824a05edb59a5721f5/include/petsc/finclude/petscsys.h?at=master&fileviewer=file-view-default#petscsys.h-197</a></div><div><br></div><div>I think its complaining about the 'return;endif'</div><div><br></div><div>  Matt</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
MacBookGray:F90 $ cat TestSETERRQ.F90<br>
Program TestSETERRQ<br>
#include <petsc/finclude/petsc.h><br>
   Use petsc<br>
<br>
   Implicit NONE<br>
   PetscInt           :: ierr<br>
   Character(len=256) :: IOBuffer<br>
<br>
   Call PetscInitialize(PETSC_NULL_<wbr>CHARACTER, ierr);CHKERRA(ierr)<br>
   write(IOBuffer,'("This is a test ierr = ",I2,"\n")') ierr<br>
   SETERRQ(PETSC_COMM_SELF,PETSC_<wbr>ERR_FILE_UNEXPECTED,IOBuffer)<br>
   call foo()<br>
   Call PetscFinalize(ierr)<br>
Contains<br>
    subroutine foo()<br>
       Character(len=256) :: IOBuffer<br>
<br>
       write(IOBuffer,'("This is a test ierr = ",I2,"\n")') 42<br>
       SETERRQ(PETSC_COMM_SELF,PETSC_<wbr>ERR_FILE_UNEXPECTED,IOBuffer)<br>
    end subroutine foo<br>
End Program TestSETERRQ<br>
<br>
MacBookGray:F90 $ make -f makefile.TestSETERRQ TestSETERRQ<br>
mpif90 -c -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g    -I/opt/HPC/petsc-next/include -I/opt/HPC/petsc-next/Darwin-<wbr>gcc7.2-g/include -I/opt/X11/include    -o TestSETERRQ.o TestSETERRQ.F90<br>
TestSETERRQ.F90:11:61:<br>
<br>
    SETERRQ(PETSC_COMM_SELF,PETSC_<wbr>ERR_FILE_UNEXPECTED,IOBuffer)<br>
                                                             1<br>
Error: Expecting END PROGRAM statement at (1)<br>
TestSETERRQ.F90:19:65:<br>
<br>
        SETERRQ(PETSC_COMM_SELF,PETSC_<wbr>ERR_FILE_UNEXPECTED,IOBuffer)<br>
                                                                 1<br>
Error: Expecting END SUBROUTINE statement at (1)<br>
make: [TestSETERRQ.o] Error 1 (ignored)<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
Blaise<br>
<br>
--<br>
Department of Mathematics and Center for Computation & Technology<br>
Louisiana State University, Baton Rouge, LA 70803, USA<br>
Tel. <a href="tel:%2B1%20%28225%29%20578%201612" value="+12255781612">+1 (225) 578 1612</a>, Fax  <a href="tel:%2B1%20%28225%29%20578%204276" value="+12255784276">+1 (225) 578 4276</a> <a href="http://www.math.lsu.edu/~bourdin" rel="noreferrer" target="_blank">http://www.math.lsu.edu/~<wbr>bourdin</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>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</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>