<br><font size=2 face="sans-serif">The reason I was asking about this is that in a previous version of PETSc (2.3.2p10) we had had to modify petscdef.h in order to comply with our code. Indeed our code is written mainly in Fortran77 with its own memory manager (it is 20 years old) and to take full advantage of architectures with a lot of memory we need to compile it with -i8 option (intel compiler syntax) so that integers are 64bits wide. We use PETSc as a solver with this code.</font>
<br><font size=2 face="sans-serif">So PETSc was first compiled separetely in standard 32 bits mode, then the PETSc Fortran interface to our code was compiled with the options -i8 and it was messy (we encountered errors during initialization in MPI).</font>
<br><font size=2 face="sans-serif">Recently we updated to the latest 2.3.3 version and found out that you had updated petscdef.h so that it defines correctly integer*4 and integer*8 when necessary. We didn't modify anything this time and it seems to work OK. I looked closely at petscdef.h and saw that these two lines were the only ones left as "integer", that's why I asked the question.</font>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>owner-petsc-dev@mcs.anl.gov</b></font>
<p><font size=1 face="sans-serif">07/04/2008 17:02</font>
<br><font size=1 face="sans-serif">Veuillez répondre à petsc-dev</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> Pour : petsc-dev@mcs.anl.gov</font>
<br><font size=1 face="sans-serif"> cc : (ccc : Thomas DE-SOZA/RETD/EDFGDF/FR)</font>
<br><font size=1 face="sans-serif"> Objet : Re: Fortran integer declaration in petscdef.h</font></table>
<br>
<br>
<br><font size=2 face="Courier New">On Mon, 7 Apr 2008, Thomas DE-SOZA wrote:<br>
<br>
> Hi,<br>
> <br>
> I was wondering if in $PETSC_DIR/include/finclude/petscdef.h :<br>
> <br>
> 50 #if defined(PETSC_HAVE_MPIUNI)<br>
> 51 #define MPI_Comm PetscFortranInt<br>
> 52 #define PetscMPIInt PetscFortranInt<br>
> 53 #else<br>
> 54 #define MPI_Comm integer<br>
> 55 #define PetscMPIInt integer<br>
> 56 #endif<br>
> <br>
> the integer declaration should not be changed to something dependent on <br>
> PETSC_SIZEOF_INT. <br>
<br>
Hmm - not sure I understand this.<br>
<br>
MPI standard defines MPI_Comm on fortran side as integer. So the lines<br>
54, 55 are correct.<br>
<br>
Wrt MPIUNI - it doesn't attempt to comply with MPI standard. The<br>
correct MPI compliant software for np=1 is MPICH. [MPIUNI defaults to<br>
using a datatype equivalent to C integer for convinence]<br>
<br>
Satish<br>
<br>
</font>
<br>
<br>