Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] MPI_File_get_size fails for files > 2 GB in Fortran
From: George Bosilca (bosilca_at_[hidden])
Date: 2010-12-20 14:36:21


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_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 this by removing the cast to MPI_Fint in
> the function mpi_file_get_size_ in ompi/mpi/f77/file_get_size_f.c.
>
> Changing:
> *size = (MPI_Fint) c_size;
>
> To:
>
> *size = c_size;
>
>
> But my guess is that this is not a proper fix.
>
> There are a few other suspicious casts to MPI_Fint in the f77
> directory too that probably cause similar problems:
>
> $ $ grep \(MPI_Fint\) *.c
> address_f.c: *address = (MPI_Fint) addr;
> file_get_position_f.c: *offset = (MPI_Fint) c_offset;
> file_get_position_shared_f.c: *offset = (MPI_Fint) c_offset;
> file_get_size_f.c: *size = (MPI_Fint) c_size;
> file_get_view_f.c: *disp = (MPI_Fint) c_disp;
> type_extent_f.c: *extent = (MPI_Fint)c_extent;
>
>
> I can also fix this problem by compiling OpenMPI with
> the flag -i8, but promoting all Fortran INTEGERs to 8-bytes
> does not seem correct either.
>
> So - is this a configuration problem, a compile problem.
> a source code bug, or what? Is there an MPI_FOffsetint
> and/or MPI_FAddressint type that should be used
> in these casts?
>
>
> Regards,
> --
> Bill
>
> William L. George
> National Institute of Standards and Technology
> ITL - Applied and Computational Mathematics Division, Stop 8911
> 100 Bureau Drive
> Gaithersburg, MD 20899-8911
>
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel