Re: [OMPI devel] MPI_File_get_size fails for files > 2 GB in Fortran

2010-12-20 Thread William George
Edgar Gabriel wrote: well, to contradict my own position from previously, this function was part of the MPI-2 specification, and the only interfaces published for this function were C, C++ and F90. Not sure what this means for f90 applications however. Thanks Edgar I assume you meant "Not sur

Re: [OMPI devel] MPI_File_get_size fails for files > 2 GB in Fortran

2010-12-20 Thread Edgar Gabriel
well, to contradict my own position from previously, this function was part of the MPI-2 specification, and the only interfaces published for this function were C, C++ and F90. Not sure what this means for f90 applications however. Thanks Edgar On 12/20/2010 3:59 PM, N.M. Maclaren wrote: > On Dec

Re: [OMPI devel] MPI_File_get_size fails for files > 2 GB in Fortran

2010-12-20 Thread N.M. Maclaren
On Dec 20 2010, George Bosilca wrote: There is a hint for F77 users at the bottom of the page. It suggests to use INTEGER*MPI_OFFSET_KIND as type for the SIZE. I guess if we cast it correctly, and the users follow the MPI specification, this should work. Please tell me you are joking? No, th

Re: [OMPI devel] MPI_File_get_size fails for files > 2 GB in Fortran

2010-12-20 Thread George Bosilca
There is a hint for F77 users at the bottom of the page. It suggests to use INTEGER*MPI_OFFSET_KIND as type for the SIZE. I guess if we cast it correctly, and the users follow the MPI specification, this should work. george. On Dec 20, 2010, at 15:04 , Edgar Gabriel wrote: > well, but that i

Re: [OMPI devel] MPI_File_get_size fails for files > 2 GB in Fortran

2010-12-20 Thread Edgar Gabriel
well, but that is fortran90, bot f77 On 12/20/2010 1:55 PM, George Bosilca wrote: > Not really. The Fortran prototype from our man page is: > > INCLUDE ’mpif.h’ > MPI_FILE_GET_SIZE(FH, SIZE, IERROR) > INTEGER FH, ERROR > INTEGER(KIND=MPI_OFFSET_KIND) SIZE > > So the size is of t

Re: [OMPI devel] MPI_File_get_size fails for files > 2 GB in Fortran

2010-12-20 Thread George Bosilca
Not really. The Fortran prototype from our man page is: INCLUDE ’mpif.h’ MPI_FILE_GET_SIZE(FH, SIZE, IERROR) INTEGER FH, ERROR INTEGER(KIND=MPI_OFFSET_KIND) SIZE So the size is of type MPI_OFSET_KIND which is INTEGER*8 (signed). There is still a mismatch between of C and the For

Re: [OMPI devel] MPI_File_get_size fails for files > 2 GB in Fortran

2010-12-20 Thread Edgar Gabriel
well, but the f77 interface defines that to be an integer, unless you want to change the fortran API, you will have to map it to an MPI_Fint in my opinion. Edgar On 12/20/2010 1:36 PM, George Bosilca wrote: > Nice catch. The sizes are MPI_Offset in C, and therefore we should not cast > them as M

Re: [OMPI devel] MPI_File_get_size fails for files > 2 GB in Fortran

2010-12-20 Thread George Bosilca
Nice catch. The sizes are MPI_Offset in C, and therefore we should not cast them as MPI_Fint. I'll take a look, but I doubt it will be before next year. Meanwhile, patches are always welcomed. george. On Dec 20, 2010, at 10:59 , William George wrote: > > In Fortran, calls to MPI_File_get_si

[OMPI devel] MPI_File_get_size fails for files > 2 GB in Fortran

2010-12-20 Thread William George
In Fortran, calls to MPI_File_get_size return a negative value when the file is larger that 2GB. I am using Open MPI 1.4.3 on an x86_64 system. This happens with OpenMPI compiled with Intel compilers or GCC, so I don't think it has anything to do with the particular compiler in use. I can fix