Re: [OMPI users] Q: Fortran, MPI_VERSION and #defines

2016-03-21 Thread Jeff Hammond
On Mon, Mar 21, 2016 at 1:37 PM, Brian Dobbins wrote: > > Hi Jeff, > > On Mon, Mar 21, 2016 at 2:18 PM, Jeff Hammond > wrote: > >> You can consult http://meetings.mpi-forum.org/mpi3-impl-status-Mar15.pdf >> to see the status of all implementations

Re: [OMPI users] Q: Fortran, MPI_VERSION and #defines

2016-03-21 Thread Brian Dobbins
Hi Dave, With which compiler, and even optimized? > > $ `mpif90 --showme` --version | head -n1 > GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17) > $ cat a.f90 > use mpi > if (mpi_version == 3) call undefined() > print *, mpi_version > end > $ mpif90 a.f90 && ./a.out >

Re: [OMPI users] Q: Fortran, MPI_VERSION and #defines

2016-03-21 Thread Dave Love
Brian Dobbins writes: > Hi everyone, > > This isn't really a problem, per se, but rather a search for a more > elegant solution. It also isn't specific to OpenMPI, but I figure the > experience and knowledge of people here made it a suitable place to ask: It's also not

Re: [OMPI users] Q: Fortran, MPI_VERSION and #defines

2016-03-21 Thread Brian Dobbins
Hi Jeff, On Mon, Mar 21, 2016 at 2:18 PM, Jeff Hammond wrote: > You can consult http://meetings.mpi-forum.org/mpi3-impl-status-Mar15.pdf > to see the status of all implementations w.r.t. MPI-3 as of one year ago. > Thank you - that's something I was curious about, and

Re: [OMPI users] Q: Fortran, MPI_VERSION and #defines

2016-03-21 Thread Jeff Hammond
The better solution is just to require MPI-3. It is available everywhere except Blue Gene/Q at this point, and it is better to putting the burden of ensuring MPI-3 is installed on the system to your users than doing horrible gymnastics to support ancient MPI libraries. You can consult

Re: [OMPI users] Q: Fortran, MPI_VERSION and #defines

2016-03-21 Thread Jeff Hammond
Call MPI from C code, where you will have all the preprocessor support you need. Wrap that C code with Fortran 2003 ISO_C_BINDING. If you don't have neighborhood collectives from MPI-3, you can implement them using MPI-1 yourself in the interface between your Fortran code and MPI C bindings.

[OMPI users] Q: Fortran, MPI_VERSION and #defines

2016-03-21 Thread Brian Dobbins
Hi everyone, This isn't really a problem, per se, but rather a search for a more elegant solution. It also isn't specific to OpenMPI, but I figure the experience and knowledge of people here made it a suitable place to ask: I'm working on some code that'll be used and downloaded by others