On Wed, Sep 20, 2017 at 6:26 AM, Gilles Gouaillardet < gilles.gouaillar...@gmail.com> wrote:
> On Tue, Sep 19, 2017 at 11:58 AM, Jeff Hammond <jeff.scie...@gmail.com> > wrote: > > > Fortran is a legit problem, although if somebody builds a standalone > Fortran > > 2015 implementation of the MPI interface, it would be decoupled from the > MPI > > library compilation. > > Is this even doable without making any assumptions? > Fortran 2015 and MPI 3.1 implies a very large number of assumptions already. What beyond this do you think needs to be assumed? > For example, how should the MPI C library handle MPI_INTEGER if the > datatype size if it is not known at build time? > One could convert from INTEGER to integer(c_int) in Fortran code, at which point the conversion to C would be trivial (and safe). If you wanted to be defensive against 64-bit INTEGER, then you'd convert from INTEGER to integer(c_int64_t) and handle the large count on the C side using the techniques demonstrated by the BigMPI project. If we end up standardizing some of the large-count fixes proposed by BigMPI, then these two scenarios would degenerate to just converting INTEGER to integer(kind=MPI_COUNT_KIND) and calling the large-count C function. > it is likely to be 4 (most common case), but might be 8 (if the > infamous -i8 option, or its equivalent, is used) > > I assume that anyone who is using Fortran 2003 or later has the good sense to never use compiler flags to change the size of the INTEGER type, because this is evil. Jeff > Cheers, > > Gilles > _______________________________________________ > users mailing list > users@lists.open-mpi.org > https://lists.open-mpi.org/mailman/listinfo/users > -- Jeff Hammond jeff.scie...@gmail.com http://jeffhammond.github.io/
_______________________________________________ users mailing list users@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/users