This looks fine. Are you going to backout the other change then?<br><br><div class="gmail_quote">On Thu, Oct 25, 2012 at 7:39 PM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@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">Sorry - I meant to use PETSC_HAVE_COMPLEX [not PETSC_USE_COMPLEX].<br>
<br>
The primary change I intended is:<br>
>>>><br>
diff --git a/src/sys/objects/pinit.c b/src/sys/objects/pinit.c<br>
--- a/src/sys/objects/pinit.c<br>
+++ b/src/sys/objects/pinit.c<br>
@@ -711,7 +711,7 @@<br>
 #endif<br>
   }<br>
<br>
-#if !defined(PETSC_HAVE_MPI_C_DOUBLE_COMPLEX)<br>
+#if defined(PETSC_HAVE_COMPLEX) && !defined(PETSC_HAVE_MPI_C_DOUBLE_COMPLEX)<br>
   ierr = MPI_Type_contiguous(2,MPI_DOUBLE,&MPIU_C_DOUBLE_COMPLEX);CHKERRQ(ierr);<br>
   ierr = MPI_Type_commit(&MPIU_C_DOUBLE_COMPLEX);CHKERRQ(ierr);<br>
   ierr = MPI_Type_contiguous(2,MPI_FLOAT,&MPIU_C_COMPLEX);CHKERRQ(ierr);<br>
asterix:/home/balay/spetsc><br>
<<<<br>
But I figured that flag could be used for PETSC_i part of the code anyway.<br>
[the PETSC_i part of the logic should be equivalent after this change].<br>
<br>
So if its ok - I'll push:<br>
<br>
>>>>>><br>
asterix:/home/balay/spetsc>hg diff<br>
diff --git a/src/sys/objects/pinit.c b/src/sys/objects/pinit.c<br>
--- a/src/sys/objects/pinit.c<br>
+++ b/src/sys/objects/pinit.c<br>
@@ -702,7 +702,7 @@<br>
      shared libraries the constructors for global variables<br>
      are not called; at least on IRIX.<br>
   */<br>
-#if defined(PETSC_USE_COMPLEX)<br>
+#if defined(PETSC_HAVE_COMPLEX)<br>
   {<br>
 #if defined(PETSC_CLANGUAGE_CXX)<br>
     PetscComplex ic(0.0,1.0);<br>
@@ -718,7 +718,7 @@<br>
   ierr = MPI_Type_contiguous(2,MPI_FLOAT,&MPIU_C_COMPLEX);CHKERRQ(ierr);<br>
   ierr = MPI_Type_commit(&MPIU_C_COMPLEX);CHKERRQ(ierr);<br>
 #endif<br>
-#endif /* PETSC_USE_COMPLEX */<br>
+#endif /* PETSC_HAVE_COMPLEX */<br>
<br>
   /*<br>
      Create the PETSc MPI reduction operator that sums of the first<br>
asterix:/home/balay/spetsc><br>
<<<<<<<<<<br>
<span class="HOEnZb"><font color="#888888"><br>
Satish<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Thu, 25 Oct 2012, Jed Brown wrote:<br>
<br>
> I don't want this.<br>
><br>
> <a href="https://bitbucket.org/petsc/petsc-dev/changeset/3e5bdcc83cd970452d0648da9955f789cc574198" target="_blank">https://bitbucket.org/petsc/petsc-dev/changeset/3e5bdcc83cd970452d0648da9955f789cc574198</a><br>
><br>
><br>
> The whole reason I added PetscComplex rather than just using PetscScalar is<br>
> that I wanted to use complex numbers for method design (polynomial<br>
> optimization and time integration). What was the actual problem? If<br>
> Microsoft has broken C99, then PETSC_HAVE_C99_COMPLEX should not be defined.<br>
><br>
<br>
</div></div></blockquote></div><br>