Réf. : Re: Réf. : Re: Fortran integer declaration in petscdef.h
Thomas DE-SOZA
thomas.de-soza at edf.fr
Mon Apr 7 11:49:22 CDT 2008
I absolutely agree with you, the -i8 stuff is tricky. We use it since our
build system is not as sophisticated as the one for PETSc. Moreover it's
sometimes difficult to find a particular library with a 64bits integer
interface (for example, the Intel MKL BLAS didn't have such an interface
until recent releases and the provided MPI implementation for our cluster
doesn't either).
Anyway thanks for your explanation.
Thomas
owner-petsc-dev at mcs.anl.gov
07/04/2008 18:15
Veuillez répondre à petsc-dev
Pour : petsc-dev at mcs.anl.gov
cc : (ccc : Thomas DE-SOZA/RETD/EDFGDF/FR)
Objet : Re: Réf. : Re: Fortran integer declaration in petscdef.h
On Mon, 7 Apr 2008, Thomas DE-SOZA wrote:
> 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.
> 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).
> 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.
Yeah - we take care of the PETSc parts to be -i8 neutral - but leave
the MPI part unchanged . All this -i8 stuff is tricky - and it breaks
c/fortran interoperability. Its fine as long as its used in
*fortran-only* world.
If you need -i8 - ideally you should compile everything - MPI, PETSc
etc with this option. But I'm not sure if MPI part would work
properly..
If we set MPI_Comm to integer*4 in petscdef.h - and a fortran user
uses integer [intead of MPI_Comm] in his part of MPI code [which would
be valid usage as per MPI standard] - things will break with -i8.
Satish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20080407/d6186747/attachment.html>
More information about the petsc-dev
mailing list