<div dir="ltr"><div>When I try to make ex29 in the directory /petsc-3.7.3/petsc/src/ts/examples/tutorials/,  it shows following errors. It seems that we need to  define Mat J (or other names)  instead of Mat I). Thanks!</div><div><br></div><div><br></div><div><div><font size="1">/Users/lulu/petsc/petsc-3.7.3/petsc/src/ts/examples/tutorials/ex29.c:42:18: error: </font></div><div><font size="1">      expected identifier or '('</font></div><div><font size="1"> <b> Mat            I;</b></font></div><div><font size="1">/usr/include/complex.h:42:11: note: expanded from macro 'I'</font></div><div><font size="1">#define I _Complex_I</font></div><div><font size="1">          ^</font></div><div><font size="1">/usr/include/complex.h:40:21: note: expanded from macro '_Complex_I'</font></div><div><font size="1">#define _Complex_I (__extension__ 1.0iF)</font></div><div><font size="1">                    ^</font></div><div><font size="1">/Users/lulu/petsc/petsc-3.7.3/petsc/src/ts/examples/tutorials/ex29.c:42:18: error: </font></div><div><font size="1">      expected ')'</font></div><div><font size="1">/usr/include/complex.h:42:11: note: expanded from macro 'I'</font></div><div><font size="1">#define I _Complex_I</font></div><div><font size="1">          ^</font></div><div><font size="1">/usr/include/complex.h:40:21: note: expanded from macro '_Complex_I'</font></div><div><font size="1">#define _Complex_I (__extension__ 1.0iF)</font></div><div><font size="1">                    ^</font></div><div><font size="1">/Users/lulu/petsc/petsc-3.7.3/petsc/src/ts/examples/tutorials/ex29.c:42:18: note: </font></div><div><font size="1">      to match this '('</font></div><div><font size="1">/usr/include/complex.h:42:11: note: expanded from macro 'I'</font></div><div><font size="1">#define I _Complex_I</font></div><div><font size="1">          ^</font></div><div><font size="1">/usr/include/complex.h:40:20: note: expanded from macro '_Complex_I'</font></div><div><font size="1">#define _Complex_I (__extension__ 1.0iF)</font></div><div><font size="1">                   ^</font></div><div><font size="1">/Users/lulu/petsc/petsc-3.7.3/petsc/src/ts/examples/tutorials/ex29.c:58:41: error: </font></div><div><font size="1">      cannot take the address of an rvalue of type '_Complex float'</font></div><div><font size="1">  ierr = DMCreateInterpolation(cdmc,cdm,&I,&vscale);CHKERRQ(ierr);</font></div><div><font size="1">                                        ^~</font></div><div><font size="1">/Users/lulu/petsc/petsc-3.7.3/petsc/src/ts/examples/tutorials/ex29.c:59:22: error: </font></div><div><font size="1">      passing '_Complex float' to parameter of incompatible type 'Mat'</font></div><div><font size="1">      (aka 'struct _p_Mat *')</font></div><div><font size="1">  ierr = MatRestrict(I,c,cc);CHKERRQ(ierr);</font></div><div><font size="1">                     ^</font></div><div><font size="1">/usr/include/complex.h:42:11: note: expanded from macro 'I'</font></div><div><font size="1">#define I _Complex_I</font></div><div><font size="1">          ^~~~~~~~~~</font></div><div><font size="1">/usr/include/complex.h:40:20: note: expanded from macro '_Complex_I'</font></div><div><font size="1">#define _Complex_I (__extension__ 1.0iF)</font></div><div><font size="1">                   ^~~~~~~~~~~~~~~~~~~~~</font></div><div><font size="1">/Users/lulu/petsc/petsc-3.7.3/petsc/include/petscmat.h:557:44: note: passing</font></div><div><font size="1">      argument to parameter here</font></div><div><font size="1">PETSC_EXTERN PetscErrorCode MatRestrict(Mat,Vec,Vec);</font></div><div><font size="1">                                           ^</font></div><div><font size="1">/Users/lulu/petsc/petsc-3.7.3/petsc/src/ts/examples/tutorials/ex29.c:62:21: error: </font></div><div><font size="1">      cannot take the address of an rvalue of type '_Complex float'</font></div><div><font size="1">  ierr = MatDestroy(&I);CHKERRQ(ierr);</font></div><div><font size="1">                    ^~</font></div><div><font size="1">5 errors generated.</font></div><div><font size="1">make: *** [ex29.o] Error 1</font></div></div>
</div>

<br>
<div><hr></div><font face="Arial" size="1">This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.</font>