[mpich-discuss] Fortran integer support 4/8-bytes
Jeff Hammond
jhammond at alcf.anl.gov
Fri Jun 8 07:27:29 CDT 2012
Yeah, but this (64-bit API with internal truncation in MPI) is fine
for most codes. Basically, Fortran programmers are lazy and don't
specific integer sizes explicitly. If the app requires more than
32-bits anywhere, then the whole app has to be modified to use 64-bit
integers, including MPI. This was a huge pain for me on Blue Gene/P
with NWChem and it was too painful to fix it, so I just could not run
some modules with more than 2 GB of data.
Of course, the right way to write Fortran would be to use INTEGER*4
for all MPI arguments instead of assuming INTEGER is 4-bytes, or in
F90+, something like INTEGER(KIND=FOR_MPI_BINDINGS) and
INTEGER(KIND=FOR_INDEXING_BIG_ARRAYS), <trolling> but if one is that
intelligent, one is probably not using Fortran at all </trolling> :-)
Jeff
On Fri, Jun 8, 2012 at 2:13 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Fri, Jun 8, 2012 at 4:30 AM, Reuti <reuti at staff.uni-marburg.de> wrote:
>>
>> Aha, I thought the supported data types were meant.
>>
>> For a Fortran integer 64 interface I had to compile a special version for
>> an application called Dirac:
>>
>>
>> http://wiki.chem.vu.nl/dirac/index.php/How_to_build_MPI_libraries_for_64-bit_integers
>
>
> But this only changes the size of Fortran integer. It doesn't change C int
> and in practice, the Fortran bindings call C bindings that use C int, so
> larger values would be truncated. So you can get 8-byte integers in Fortran
> if you're determined, but it doesn't circumvent the 2^31 limit.
>
> "Do these permit values greater than what is representable in a 4-byte
> integer or does the lower level implementation in C preclude the use
> of arguments greater than 2^31?"
>
> _______________________________________________
> mpich-discuss mailing list mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
--
Jeff Hammond
Argonne Leadership Computing Facility
University of Chicago Computation Institute
jhammond at alcf.anl.gov / (630) 252-5381
http://www.linkedin.com/in/jeffhammond
https://wiki.alcf.anl.gov/parts/index.php/User:Jhammond
More information about the mpich-discuss
mailing list