1
1
Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
George Bosilca
9738ee7784 Add the logicalx types to fortran.
This commit was SVN r18066.
2008-04-02 06:34:46 +00:00
Ralph Castain
d70e2e8c2b Merge the ORTE devel branch into the main trunk. Details of what this means will be circulated separately.
Remains to be tested to ensure everything came over cleanly, so please continue to withhold commits a little longer

This commit was SVN r17632.
2008-02-28 01:57:57 +00:00
Brian Barrett
2b8af283de Add ability to completely turn off MPI one-sided support, so that users
can experiment with using ROMIO directly.

This commit was SVN r15922.
2007-08-18 21:35:51 +00:00
Rainer Keller
8d24934a80 - Add the missing parts: add MPI_REAL2 to the end of the list
of Fortran datatypes (mpif-common.h) and the list of registered
   datatypes: MOOG(REAL2).
   Configure and Compilation with ia32/gcc just finished, naturally
   without real2.

This commit was SVN r15137.
2007-06-19 20:41:28 +00:00
Jeff Squyres
321af727c0 Add external support for MPI_2COMPLEX and MPI_2DOUBLE_COMPLEX. The
machinery was already there; we were just missing the INTEGER's for
them in mpi.f and the #define's for them in mpi.h.

This commit was SVN r13432.
2007-02-01 19:37:38 +00:00
Jeff Squyres
860788ff8f Fixes trac:389
Make the Fortran MPI_MAX_DATAREP_STRING follow the same convention as
the rest of the Fortran constants -- be one less than the C constant
of the same name.

This commit was SVN r11842.

The following Trac tickets were found above:
  Ticket 389 --> https://svn.open-mpi.org/trac/ompi/ticket/389
2006-09-27 11:24:36 +00:00
Jeff Squyres
7515e8b234 Fix a typo caught by MTT.
This commit was SVN r11450.
2006-08-27 15:43:27 +00:00
Brian Barrett
6e390155a1 * Add constants related to one-sided support that were missing from the
fortran include files

This commit was SVN r11416.
2006-08-24 21:14:05 +00:00
Jeff Squyres
918d1e018f Un-friggen' believable. The values for MPI_WIN_BASE, MPI_WIN_SIZE,
and MPI_WIN_DISP_UNIT were off by one from their C counterparts.

This fixes trac:304.

This commit was SVN r11385.

The following Trac tickets were found above:
  Ticket 304 --> https://svn.open-mpi.org/trac/ompi/ticket/304
2006-08-24 03:33:35 +00:00
Jeff Squyres
520147f209 Clean up the Fortran MPI sentinel values per problem reported on the
users mailing list:

  http://www.open-mpi.org/community/lists/users/2006/07/1680.php

Warning: this log message is not for the weak.  Read at your own
risk.

The problem was that we had several variables in Fortran common blocks
of various types, but their C counterparts were all of a type
equivalent to a fortran double complex.  This didn't seem to matter
for the compilers that we tested, but we never tested static builds
(which is where this problem seems to occur, at least with the Intel
compiler: the linker compilains that the variable in the common block
in the user's .o file was of one size/alignment but the one in the C
library was a different size/alignment).

So this patch fixes the sizes/types of the Fortran common block
variables and their corresponding C instantiations to be of the same
sizes/types. 

But wait, there's more.

We recently introduced a fix for the OSX linker where some C versions
of the fortran common block variables (e.g.,
_ompi_fortran_status_ignore) were not being found when linking
ompi_info (!).  Further research shows that the code path for
ompi_info to require ompi_fortran_status_ignore is, unfortunately,
necessary (a quirk of how various components pull in different
portions of the code base -- nothing in ompi_info itself requires
fortran or MPI knowledge, of course).

Hence, the real problem was that there was no code path from ompi_info
to the portion of the code base where the C globals corresponding to
the Fortran common block variables were instantiated.  This is because
the OSX linker does not automatically pull in .o files that only
contain unintialized global variables; the OSX linker typically only
pulls in a .o file from a library if it either has a function that is
used or have a global variable that is initialized (that's the short
version; lots of details and corner cases omitted).  Hence, we changed
the global C variables corresponding to the fortran common blocks to
be initialized, thereby causing the OSX linker to pull them in
automatically -- problem solved.  At the same time, we moved the
constants to another .c file with a function, just for good measure.

However, this didn't really solve the problem:

1. The function in the file with the C versions of the fortran common
   block variables (ompi/mpi/f77/test_constants_f.c) did not have a
   code path that was reachable from ompi_info, so the only reason
   that the constants were found (on OSX) was because they were
   initialized in the global scope (i.e., causing the OSX compiler to
   pull in that .o file).

2. Initializing these variable in the global scope causes problems for
   some linkers where -- once all the size/type problems mentioned
   above were fixed -- the alignments of fortran common blocks and C
   global variables do not match (even though the types of the Fortran
   and C variables match -- wow!).  Hence, initializing the C
   variables would not necessarily match the alignment of what Fortran
   expected, and the linker would issue a warning (i.e., the alignment
   warnings referenced in the original post).

The solution is two-fold:

1. Move the Fortran variables from test_constants_f.c to
   ompi/mpi/runtime/ompi_mpi_init.c where there are other global
   constants that *are* initialized (that had nothing to do with
   fortran, so the alignment issues described above are not a factor),
   and therefore all linkers (including the OSX linker) will pull in
   this .o file and find all the symbols that it needs.

2. Do not initialize the C variables corresponding to the Fortran
   common blocks in the global scope.  Indeed, never initialize them
   at all (because we never need their *values* - we only check for
   their *locations*).  Since nothing is ever written to these
   variables (particularly in the global scope), the linker does not
   see any alignment differences during initialization, but does make
   both the C and Fortran variables have the same addresses (this
   method has been working in LAM/MPI for over a decade).

There were some comments here in the OMPI code base and in the LAM
code base that stated/implied that C variables corresponding to
Fortran common blocks had to have the same alignment as the Fortran
common blocks (i.e., 16).  There were attempts in both code bases to
ensure that this was true.  However, the attempts were wrong (in both
code bases), and I have now read enough Fortran compiler documentation
to convince myself that matching alignments is not required (indeed,
it's beyond our control).  As long as C variables corresponding to
Fortran common blocks are not initialized in the global scope, the
linker will "figure it out" and adjust the alignment to whatever is
required (i.e., the greater of the alignments).  Specifically (to
counter comments that no longer exist in the OMPI code base but still
exist in the LAM code base):

- there is no need to make attempts to specially align C variables
  corresponding to Fortran common blocks
- the types and sizes of C variables corresponding to Fortran common
  blocks should match, but do not need to be on any particular
  alignment 

Finally, as a side effect of this effort, I found a bunch of
inconsistencies with the intent of status/array_of_statuses
parameters.  For all the functions that I modified they should be
"out" (not inout).

This commit was SVN r11057.
2006-07-31 15:07:09 +00:00
Jeff Squyres
720f38efc5 Fix for MPI_WTICK / MPI_WTIME F90 bindings issue. The previous hope
was that declaring the type of MPI_WTICK and MPI_TIME in mpif-common.h
would allow the F90 bindings to call through to the back end f77
function and have the right return type.  But upon reflection, that's
silly -- we were just declaring the variables MPI_WTICK and MPI_WTIME
that were of type double precision.  Duh.

So add some fixed (non-generated) wrapper F90 functions to call the
back-end *C* MPI_WTICK and MPI_TIME functions (vs. the back end *F77*
functions).  We have to call the back-end C functions because there's
a name conflict if we try to call the back-end F77 functions -- for
the same reasons that we can't "implicitly" define MPI_WTIME and
MPI_WTICK in the f90 module, we can't call such an implicitly-defined
function.  So we had to add new back-end C functions that are directly
callable from Fortran, the easiest implementation of which was to
provide 4 one-line functions for each (rather than muck around with
weak symbols).

This commit was SVN r10448.
2006-06-21 13:44:20 +00:00
Jeff Squyres
02d8a46d5f Fix for ticket #89.
* Change the type of Fortan's MPI_STATUSES_IGNORE to double complex
so that it will never possibly be mistaken for a real status (i.e.,
integer(MPI_STATUS_SIZE)), particularly in the F90 bindings.  See
comment in mpif-common.h explaining this (analogous argument to
MPI_ARGVS_NULL for MPI_COMM_SPAWN_MULTIPLE).
 * Add second interfaces for the following functions that take a double
complex (i.e., MPI_STATUSES_IGNORE).  This required adding the second
interface in mpi-f90-interfaces.h[.sh] and then generating new wrapper
functions to call the back-end F77 function for each of these four, so
we added 4 new files in ompi/mpi/f90/scripts/ and updated the various
Makefile.am's to match:
   * MPI_TESTALL
   * MPI_TESTSOME
   * MPI_WAITALL
   * MPI_WAITSOME

The XSL is now not in sync with the scripts.  Although I suppose that
that is becoming less and less important (because it does not impact
the end user at all -- to be 100% explicit, no release should ever be
held up because the XSL is out of sync), but it will probably be
important when we go to fix the "large" interface; so it's still worth
fixing... for now...

This commit was SVN r10281.
2006-06-09 23:40:20 +00:00
Jeff Squyres
5f356edb64 Bring over changes from the /tmp/fortran-stuff series:
- Make the F90 bindings compile and link properly with gfortran 4.0,
  4.1, Intel 9.0, PGI 6.1, Sun (don't know version offhand -- the most
  current as of this writing, I think), and NAG 5.2, although some
  have limitations (e.g., NAG can't seem to handle the medium and
  large sizes)
- Building the F90 "small" module size is now the default, even for
  developers
- Split up mpif.h into multiple files because parts of it were toxic
  to the F90 bindings
- Properly specify unsized/unshaped arrays to make the bindings work
  on all known compilers
- Make ompi_info show Fortran 90 bindings size
- XML somewhat lags the generated scripts as of this commit, but
  functionality was my main goal -- the XML can be updated later (if
  at all).

This commit was SVN r10118.
2006-05-30 14:37:41 +00:00