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

380 Коммитов

Автор SHA1 Сообщение Дата
Rainer Keller
c8668ef83f - Get rid of unused variables / set but never used warnings.
This commit was SVN r14762.
2007-05-24 18:57:51 +00:00
Ralph Castain
fa5a40070d Test the return status code from comm_dyn_start_processes - if we see an error, then let's report it and not continue on with the comm_spawn procedure!
This commit was SVN r14699.
2007-05-18 20:22:32 +00:00
Jeff Squyres
86f48bf0d7 Fix ordering of dimensions for status arrays. Thanks to Randy Bramley
for noticing the problem.

This commit was SVN r14591.
2007-05-05 05:02:02 +00:00
Sven Stork
a04c8eb39a - Bring over the visibility feature, for a finer symbol export control
via the visibility feature that is provided by some compilers.

  Per default this feature is disabled, to enable it you need to
  configure with --enable-visibility and obviously you need a compiler
  with visibility support. Please refer to the wiki for more information.
  https://svn.open-mpi.org/trac/ompi/wiki/Visibility

This commit was SVN r14582.
2007-05-04 09:03:37 +00:00
Sven Stork
fe3b08004e - export symbols that are needed by the fortran libs
This commit was SVN r14527.
2007-04-26 09:34:41 +00:00
Mohamad Chaarawi
bfaf9d4a12 Added new module for intercomm collectives. This will require an
autogen.

This commit was SVN r14149.
2007-03-27 02:06:42 +00:00
Jeff Squyres
3e2031e0e3 Finally commit something that has been sitting around in one of my
development trees since last year (had to wait for some intel tests to
run yesterday, so I finally took the time to finish this work):

 * Improve MPI API argument checking by also checking for NULL values
   (especially helps when invalid Fortran MPI handles are passed,
   because the various MPI_*f2c functions are supposed to return an
   "invalid" MPI handle [meaning NULL] when this happens).  So now
   OMPI will generate an MPI exception rather than a segv.
 * Removed a few redundant DATATYPE_NULL checks.
 * Also check for some other forms of "invalid" handles (e.g., already
   been freed, etc.) in some cases.  We could probably be a bit more
   stringent in this regard if we really wanted to.
 * Change MPI_Get_processor_name to zero out the string up to
   MPI_MAX_PROCESSOR_NAME characters, because the MPI spec says that
   the string must be at least that long.  We were already passing
   that length to gethostname(), anyway.

This commit was SVN r14100.
2007-03-21 11:10:42 +00:00
Josh Hursey
dadca7da88 Merging in the jjhursey-ft-cr-stable branch (r13912 : HEAD).
This merge adds Checkpoint/Restart support to Open MPI. The initial
frameworks and components support a LAM/MPI-like implementation.

This commit follows the risk assessment presented to the Open MPI core
development group on Feb. 22, 2007.

This commit closes trac:158

More details to follow.

This commit was SVN r14051.

The following SVN revisions from the original message are invalid or
inconsistent and therefore were not cross-referenced:
  r13912

The following Trac tickets were found above:
  Ticket 158 --> https://svn.open-mpi.org/trac/ompi/ticket/158
2007-03-16 23:11:45 +00:00
Jeff Squyres
266e805427 * Update parameter checking per MPI-1:2.4.1 and MPI-1:5.4.1 -- also
return an error if MPI_COMM_NULL is used.  
 * Minor style fixes.

This commit was SVN r14041.
2007-03-16 13:09:49 +00:00
Brian Barrett
e926bed69f Implement MPI_TYPE_CREATE_DARRAY function. Works with MPICH2 darray-pack
test, Sun's darray test, and an internal LANL test code.  I would not
assume it will work properly on other codes, as I'm still not sure I
completely understand what the standard says this function is supposed to
do.

Refs trac:65

This commit was SVN r13967.

The following Trac tickets were found above:
  Ticket 65 --> https://svn.open-mpi.org/trac/ompi/ticket/65
2007-03-08 16:33:08 +00:00
George Bosilca
4b63631535 Allow correct duplication for MPI_UB and MPI_LB. The problem is that we cannot
create a duplicate type, because any duplicate type lose the PREDEFINED flag.
An MPI_LB (respectively MPI_UB) without the PREDEFINED tag is useless, as it's
not the a marker anymore. The solution is to return the same pointer, but once
the reference count has been increased. In order for this to work, I allowed
the destruction to check for the reference count of an object before complaining
about destroying a predefined type.

This fixed ticket #317.

This commit was SVN r13942.
2007-03-06 18:21:49 +00:00
Tim Prins
74555cda51 - Re-enable MPI_Comm_spawn_multiple from singletons. It has been working for a while, but the check was never removed.
- Coding standardize some code
- Remove now unused help message

This commit was SVN r13858.
2007-02-28 22:09:30 +00:00
Jeff Squyres
b7b893b771 Need to EXTRA_DIST README.txt so that it gets included in the tarball;
the *_DATA files are not automatically picked up for inclusion into
the tarball.

This commit was SVN r13667.
2007-02-15 16:21:25 +00:00
Jeff Squyres
dd35fb73ff * Fix some "MPI:Exception" typos (needs 2 :'s)
* Update exactly how we handle MPI exceptions, particularly with
   respect to MPI-1 section 3.2.5, and how error handlers are only
   invoked for the ''first'' request that generates an exception.
 * Update the "see also" section to be consistent across all 8
   MPI_Test* and MPI_Wait* functions.
 * Fixes trac:560

This commit was SVN r13619.

The following Trac tickets were found above:
  Ticket 560 --> https://svn.open-mpi.org/trac/ompi/ticket/560
2007-02-12 18:08:42 +00:00
Jeff Squyres
260f1fd468 Fixes trac:817
The C++ bindings were not tracking keyvals properly -- they were
freeing some internal meta data when Free_keyval() was called, not
when the keyval was actually destroyed (keyvals are refcounted in the
C layer, just like all other MPI objects, because they can live for
long after their corresponding Free call is invoked).  This commit
fixes this problem and several other things:

 * Add infrastructure on the ompi_attribute_keyval_t for an "extra"
   destructor pointer that will be invoked during the "real"
   constructor (i.e., when OBJ_RELEASE puts the refcount to 0).  This
   allows calling back into the C++ layer to release meta data
   associated with the keyval.
 * Adjust all cases where keyvals are created to pass in relevant
   destructors (NULL or the C++ destructor).
 * Do essentially the same for MPI::Comm, MPI::Win, and MPI:Datatype:
   * Move several functions out of the .cc file into the _inln.h file
     since they no longer require locks
   * Make the 4 Create_keyval() functions call a common back-end
     keyval creation function that does the Right Thing depending on
     whether C or C++ function pointers were used for the keyval
     functions.  The back-end function does not call the corresponding
     C MPI_*_create_keyval function, but rather does the work itself
     so that it can associate a "destructor" callback for the C++
     bindings for when the keyval is actually destroyed.
   * Change a few type names to be more indicative of what they are
     (mostly dealing with keyvals [not "keys"]).
 * Add the 3 missing bindings for MPI::Comm::Create_keyval().
 * Remove MPI::Comm::comm_map (and associated types) because it's no
   longer necessary in the intercepts -- it was a by-product of being
   a portable C++ bindings layer.  Now we can just query the C layer
   directly to figure out what type a communicator is.  This solves
   some logistics / callback issues, too.
 * Rename several types, variables, and fix many comments in the
   back-end C attribute implementation to make the names really
   reflect what they are (keyvals vs. attributes).  The previous names
   heavily overloaded the name "key" and were ''extremely''
   confusing.

This commit was SVN r13565.

The following Trac tickets were found above:
  Ticket 817 --> https://svn.open-mpi.org/trac/ompi/ticket/817
2007-02-08 23:50:04 +00:00
George Bosilca
eaa164d52f Don't check for the DT_FLAG_DATA. It is never set. This was intended to be
a protection against creating subarrays with MPI_LB and MPI_UB. But, I don't
think the MPI standard state anything about this.

This commit was SVN r13504.
2007-02-06 03:58:24 +00:00
Karen Norteman
410f657d07 Fixes trac:876
This commit was SVN r13502.

The following Trac tickets were found above:
  Ticket 876 --> https://svn.open-mpi.org/trac/ompi/ticket/876
2007-02-05 22:26:02 +00:00
Terry Dontje
244fb76002 This commit fixes trac:856.
This commit was SVN r13464.

The following Trac tickets were found above:
  Ticket 856 --> https://svn.open-mpi.org/trac/ompi/ticket/856
2007-02-02 12:48:26 +00:00
Karen Norteman
59cc09fd1a Fixes trac:850, updates man pages
This commit was SVN r13456.

The following Trac tickets were found above:
  Ticket 850 --> https://svn.open-mpi.org/trac/ompi/ticket/850
2007-02-01 21:57:48 +00:00
Karen Norteman
4dc71969b1 trac bug 850
This commit was SVN r13452.
2007-02-01 21:29:06 +00:00
Karen Norteman
f545127e7d trac bug 850
This commit was SVN r13451.
2007-02-01 21:28:22 +00:00
Karen Norteman
984d764259 trac bug 850
This commit was SVN r13450.
2007-02-01 21:27:38 +00:00
Karen Norteman
8dd7e175cd trac bug 850
This commit was SVN r13449.
2007-02-01 21:26:59 +00:00
Karen Norteman
47a3f7f760 trac bug 850
This commit was SVN r13448.
2007-02-01 21:26:18 +00:00
Karen Norteman
40eeeaef39 trac bug 850
This commit was SVN r13447.
2007-02-01 21:25:35 +00:00
Karen Norteman
e304eec9dc trac bug 850
This commit was SVN r13446.
2007-02-01 21:24:37 +00:00
Karen Norteman
8a627e8957 trac bug 850
This commit was SVN r13445.
2007-02-01 21:23:54 +00:00
Karen Norteman
25b153848d trac bug 850
This commit was SVN r13444.
2007-02-01 21:23:13 +00:00
Karen Norteman
0c30c74b0a trac bug 850
This commit was SVN r13443.
2007-02-01 21:22:34 +00:00
Karen Norteman
7a60f878a9 trac bug 850
This commit was SVN r13442.
2007-02-01 21:21:43 +00:00
Karen Norteman
11b91057ec trac bug 850
This commit was SVN r13441.
2007-02-01 21:21:00 +00:00
Karen Norteman
180ff99233 trac bug 850
This commit was SVN r13440.
2007-02-01 21:20:14 +00:00
Karen Norteman
a8b066798a trac bug 850
This commit was SVN r13439.
2007-02-01 21:19:08 +00:00
Karen Norteman
e13398b68d trac bug 850
This commit was SVN r13438.
2007-02-01 21:16:43 +00:00
Karen Norteman
cea22389bb trac bug 850
This commit was SVN r13437.
2007-02-01 21:15:43 +00:00
Pak Lui
01c45b9637 * should fix the uninitialized function pointers. This is the patch to the
patch in r13391

This commit was SVN r13411.

The following SVN revision numbers were found above:
  r13391 --> open-mpi/ompi@289fbd08de
2007-02-01 05:07:53 +00:00
Pak Lui
289fbd08de * Fix the MPI::Datatype::Create_keyval() & MPI::Win::Create_keyval()
not being able to take C function pointers for either of the 
	copy or the delete fn. Fix by overloading the Create_keyval methods. 
    Fix trac #737, #738. Reviewed by jsquyres.
  *	A couple of cxx tests in ompi-tests (winkeyval.cc & typekeyval.cc) 
	will be re-enabled to regression test for this fix.

This commit was SVN r13391.
2007-01-31 15:00:41 +00:00
Jeff Squyres
a45e8bea05 Fixes trac:830. Put in argument checking for MPI_INIT_THREAD.
This commit was SVN r13353.

The following Trac tickets were found above:
  Ticket 830 --> https://svn.open-mpi.org/trac/ompi/ticket/830
2007-01-29 21:56:15 +00:00
Jeff Squyres
61bc9fed3c Duh. Free the temp array when we're done with it. While we're making
this switch, use a clear variable name, too.

This commit was SVN r13347.
2007-01-29 19:04:57 +00:00
Jeff Squyres
e6a0069e95 Fix from an as-yet uncommitted test that Pak will commit shortly.
Found another places that we were incorrectly casting a C++ MPI handle
array to the corresponding C array type and hoping for the best (which
won't work at all).  This commit fixes things so that we now do the
proper conversion between C<-->C++ handles.

This commit was SVN r13346.
2007-01-29 18:44:46 +00:00
Rainer Keller
ca35881cd0 - Minor bugfixes and removed compiler warnings
This commit was SVN r13343.
2007-01-28 19:52:09 +00:00
Jeff Squyres
b9120aed6d Always make sure to create $(includedir)/openmpi, even if we were
configured with --disable-mpi-cxx so that the default -I flags in the
wrapper compilers don't point to a directory that doesn't exist.
Thanks to Martin Audet for identifying the problem.

This commit was SVN r13296.
2007-01-25 01:59:22 +00:00
Rainer Keller
3f397f3848 - Do not convert the cart_comm -- its intent is out.
This commit was SVN r13224.
2007-01-21 13:00:23 +00:00
Rainer Keller
125ba1acfa - Reduce the amount of warnings with -Wshadow -- mainly due to
usage of index and abs in inline-fcts in header files.

This commit was SVN r13217.
2007-01-19 19:48:06 +00:00
Rolf vandeVaart
6a260e4a9a Fix two problems. For MPI_Buffer_detach, do not attempt to
return the buffer address from Fortran. It is not expected
behavior.  For MPI_Buffer_attach, adjust the address of
the buffer handed in so it is always aligned.  

Refs trac:750
Buffer detach reviewed by Jeff Squyres
Buffer attach alignment reviewed by George Bosilca

This commit was SVN r13205.

The following Trac tickets were found above:
  Ticket 750 --> https://svn.open-mpi.org/trac/ompi/ticket/750
2007-01-18 23:32:39 +00:00
Jeff Squyres
53c4bcccd5 Fix a problem noted by Tim Campbell: the type of the first parameter
to the F90 binding for MPI_INITIALIZED was wrong (should have been
logical, not integer).

Fixes trac:782.

This commit was SVN r13170.

The following Trac tickets were found above:
  Ticket 782 --> https://svn.open-mpi.org/trac/ompi/ticket/782
2007-01-17 22:44:47 +00:00
Jeff Squyres
a3aae09ca3 Since we've found a few MPI_Fint/MPI_Aint problems in the F77 bindings
recently, I went through and took a closer look this afternoon and
fixed a bunch more places where this problem occurred.

This commit was SVN r13166.
2007-01-17 22:17:34 +00:00
Jeff Squyres
9073b9cd3c Ensure to use datatype_index consistently. Only a problem for
compilers where the MPI_Fint representation is not the same as int,
but still...

This commit was SVN r13141.
2007-01-17 12:34:30 +00:00
Brian Barrett
32bdc47816 Fix a number of places where MPI_Fint was used where the standard specifies
MPI_Aint.  On 64-bit big endian machines, these can have some unpleasent
issues.

Refs trac:734

This commit was SVN r13140.

The following Trac tickets were found above:
  Ticket 734 --> https://svn.open-mpi.org/trac/ompi/ticket/734
2007-01-17 06:41:53 +00:00
Jeff Squyres
fbeaf0919d Fixes trac:732.
The 2nd parameter in MPI_WIN_CREATE is actually an address integer,
not a regular integer.  The F77 prototype for this function was wrong,
causing Bad Things on some 64 bit platforms (on other 64 bit
platforms, we just got lucky).

This commit was SVN r13133.

The following Trac tickets were found above:
  Ticket 732 --> https://svn.open-mpi.org/trac/ompi/ticket/732
2007-01-16 22:22:08 +00:00
Brian Barrett
ba8c8ce92c Improve checking of origin and target datatypes when using MPI_ACCUMULATE
to pass some of the tests provided by Sun.  These will, of course, greatly
slow down calls to MPI_ACCUMULATE, but there's no way to pass the test
suite without them :/.

Refs trac:760

This commit was SVN r13117.

The following Trac tickets were found above:
  Ticket 760 --> https://svn.open-mpi.org/trac/ompi/ticket/760
2007-01-14 21:42:25 +00:00
George Bosilca
53d87897c8 Once we start the C requests we have to put back their f_to_c index
in the fortran array, as we might get new C requests from the startall
function.

This commit was SVN r13079.
2007-01-11 08:39:42 +00:00
Pak Lui
ff1dd4f16d * fixes ticket #730 for supporting both of the pre-errata argument set and
post-errata argument set of MPI::Win::Get_attr

This commit was SVN r13063.
2007-01-10 16:41:21 +00:00
Pak Lui
de51464aad * fix #730 for removing an extra argument from MPI::Win::Get_attr as being
corrected in the MPI 2.0 errata.
 * initialized some variables to make our sensitive sun compiler not to 
   not warn about them when user apps are compiling.

This commit was SVN r13058.
2007-01-09 23:48:39 +00:00
George Bosilca
e72b0c1044 Some compilers (VC) don't like conversions between int and bool.
This commit was SVN r13043.
2007-01-08 22:00:49 +00:00
Jeff Squyres
1bdf883277 Oops --- don't need those header files.
This commit was SVN r13000.
2007-01-05 00:08:16 +00:00
Jeff Squyres
fc3637a7c6 Take out the checks for NULL and STATUS[ES]_IGNORE -- it turns out
that a) STATUS[ES]_IGNORE *is* NULL, and b) ROMIO blindly sends its
status through to STATUS_SET_ELEMENTS, even if the status is IGNORE.
So we have some legal cases where IGNORE can be passed through here.

Well, that's what we get for trying to do good error checking.  :-(

This commit was SVN r12999.
2007-01-04 23:03:36 +00:00
Jeff Squyres
75df4ca602 Minor fixes for MPI-level aborting:
- Fix some fpritnf's in ompi_mpi_abort() that incorrectly assumed that
  we were always being invoked from MPI_ABORT (ompi_mpi_abort() may be
  invoked from a bunch of different places)
- Also try to opal_backtrace_print() if opal_bactrace_buffer() is not
  supported. 
- Print a message in MPI_ABORT if we're aborting.

This commit was SVN r12998.
2007-01-04 22:30:28 +00:00
Jeff Squyres
ea2d49e55d Because of r12712, we actually need to allocate one ''more'' item than
the value of __n holds.  This is not a problem in the first case
because sizeof(int) == sizeof(MPI_Flogical), so no alloc is actually
performed (which is most compilers, and why we haven't been bitten by
this yet).  But the second case -- where sizeof(int) !=
sizeof(MPI_Flogical) -- is definitely a problem and needs the "+1" in
the alloc, or Bad Things will happen.

This commit was SVN r12953.

The following SVN revision numbers were found above:
  r12712 --> open-mpi/ompi@3e11c76d4c
2007-01-02 16:16:29 +00:00
Brian Barrett
1ba97181dc A number of MPI-2 compliance fixes for the C++ bindings:
* Added Create_errhandler for MPI::File
  * Make errors_throw_exceptions a first-class predefined exception
    handler, and make it work for Comm, File, and Win
  * Deal with error handlers and attributes for Files, Types, and Wins
    like we do with Comms - can't just cast the callbacks from C++
    signatures to C signatures.  Callbacks will then fire with the
    C object, not the C++ object.  That's bad.

Refs trac:455

This commit was SVN r12945.

The following Trac tickets were found above:
  Ticket 455 --> https://svn.open-mpi.org/trac/ompi/ticket/455
2006-12-30 23:41:42 +00:00
Edgar Gabriel
dc532577db Adding more accurate checking of the input parameters for the
add_error_class and add_error_code files. Also fixed the update of the
lastusedcode attribute, all of work according to my tests pretty fine.

Please note: the testcode attached to the bug 683 still reports some bugs. I
am however pretty sure that the testcode is wrong at that points:
 - the standard says that the attribute MPI_LASTUSEDCODE has to be updated for
 a new error_class or a new error_code. The test currently assumes, that only
 the add_error_code call changes the attribute value.
 - you have to comment out the two lines 73 and 74 in order to make the
 test finish, since these lines check for the error string of non-existent
 codes.
- line 126 the error-string of MPI_ERR_ARG is not "invalid argument" but a
little bit more, so the test thinks the output is wrong. So probably the test
has to be update to match the according error string of MPI_ERR_ARG.

Fixes trac:682

This commit was SVN r12913.

The following Trac tickets were found above:
  Ticket 682 --> https://svn.open-mpi.org/trac/ompi/ticket/682
2006-12-21 19:36:31 +00:00
Rainer Keller
b99e5a71d1 - Help message in case of MPI-application with two init or
calling init functions after finalize.

This commit was SVN r12858.
2006-12-14 19:58:04 +00:00
Dan Lacher
e3f749acc4 Ticket: #673
Submitted by: Dan Lacher

This commit was SVN r12844.
2006-12-13 20:01:16 +00:00
Jeff Squyres
c7282855e7 Fixes trac:659
This commit fixes several aspects regarding MPI conformance of requests.

 * Eliminate the last argument of ompi_errhandler_request_invoke(); we
   ''always'' want to invoke the back-end exception handler with the
   real error code.
 * Make it clear in comments that we only invoke the ''first''
   exception in a given array of requests, even if there's more than
   one request with a non-MPI_SUCCESS value for MPI_ERROR.
 * Defer the freeing of requests upon exception in the back-end
   functions to MPI_WAIT* and MPI_TEST* until later; the requests are
   kept so that we know what handler to invoke when we actually invoke
   the exception.  After figuring that out, ''then'' we free requests
   with pending exceptions on them.
 * Clean up return codes from the back-end MPI_TEST* and MPI_WAIT*
   functions.
 * Slightly modify ompi_errcode_get_mpi_code() to return unity if it
   receives an MPI error code (vs. an OMPI error code).

This commit was SVN r12810.

The following Trac tickets were found above:
  Ticket 659 --> https://svn.open-mpi.org/trac/ompi/ticket/659
2006-12-09 14:20:08 +00:00
Edgar Gabriel
1359ba9b13 Rewriting much of the errorcode and errorclass code, since
- we have to be able to attach a string to an error class, not just to an
 error code
 - according to MPI-2 the attribute MPI_LASTUSEDCODE has to be updated
  everytime you add a new code or a new class. Thus, you have to have single
  list for both. 

Thus, we got rid of the error_class structure. In the error-code structure, we
can distinguish whether we are dealing with an error code or an error class by
looking at the err->code element of the structure. In case its value is
MPI_UNDEFINED, the according entry is a class, else it is an error code. All
predefined error codes have the code and the class field set to the same
value.

The test MPI_Add_error_class1 passes now.

Fixes trac:418

This commit was SVN r12764.

The following Trac tickets were found above:
  Ticket 418 --> https://svn.open-mpi.org/trac/ompi/ticket/418
2006-12-05 19:07:02 +00:00
Brian Barrett
657168a74c A couple of Window related error handling cleanups:
* Always invoke the error handler on MPI_COMM_WORLD for
    invalid windows (except in win_create, which should 
    instead be on the given communicator).
  * Allow get_errhandler in addition to set_errhandler
    on MPI_WIN_NULL

Refs trac:647

This commit was SVN r12718.

The following Trac tickets were found above:
  Ticket 647 --> https://svn.open-mpi.org/trac/ompi/ticket/647
2006-12-01 20:05:06 +00:00
Bill D'Amico
3e11c76d4c Fixes trac:482
OMPI_ARRAY_INT_2_LOGICAL had an array bounds error - fixed this and the
analogous error in OMPI_ARRAY_LOGICAL_2_INT.

This commit was SVN r12712.

The following Trac tickets were found above:
  Ticket 482 --> https://svn.open-mpi.org/trac/ompi/ticket/482
2006-11-30 19:48:18 +00:00
Jeff Squyres
384caeacf4 More fixes similar to r12684 -- fix bad lvalues in assignments for the
case where sizeof(INTEGER) > sizeof(int).

This commit was SVN r12707.

The following SVN revision numbers were found above:
  r12684 --> open-mpi/ompi@e2c605f32a
2006-11-30 16:41:56 +00:00
Jeff Squyres
e2c605f32a Fix a problem cited by Pierre-Matthieu Anglade: some typos in the code
path in the MPI F77 API functions where sizeof(int) != sizeof(INTEGER).

This commit was SVN r12684.
2006-11-28 12:21:42 +00:00
Brian Barrett
63e5668e29 Number of one-sided fixes:
* use one-sided datatype check instead of send/receive and check both
    the origin and target datatypes
  * allow error handler to be set on MPI_WIN_NULL, per standard
  * Allow recursive calls into the pt2pt osc component's progress
    function
  * Fix an uninitialized variable problem in the unlock header

This commit was SVN r12667.
2006-11-27 03:22:44 +00:00
Jeff Squyres
922f335678 Fixes trac:624
Ensure that the new predefined MPI-2 attribute callback functions take
the proper types (INTEGER, kind=MPI_ADDRESS_KIND instead of just
INTEGER).

This commit was SVN r12639.

The following Trac tickets were found above:
  Ticket 624 --> https://svn.open-mpi.org/trac/ompi/ticket/624
2006-11-21 13:54:13 +00:00
Jeff Squyres
8a08b092f6 Check to see if we need to do anything. If we don't (i.e., if all the
rcounts are 0), then just return MPI_SUCCESS.

This commit was SVN r12525.
2006-11-09 23:21:34 +00:00
Jeff Squyres
0a28212392 This is a workaround to bug in the Intel C++ compiler, version 9.1
(all versions up to and including 20060925).  The issue has been
reported to Intel, along with a small [non-MPI] test program that
reproduces the problem (the test program and the OMPI C++ bindings
work fine with Intel C++ 9.0 and many other C++ compilers).

In short, a static initializer for a global variable (i.e., its
constructor is fired before main()) that takes as an argument a
reference to a typedef'd type will simply get the wrong value in the
argument.  Specifically:

{{{
namespace MPI {
    Intracomm COMM_WORLD(MPI_COMM_WORLD);
}
}}}

The constructor for MPI::Intracomm should get the value of
&ompi_mpi_comm_world.  It does not; it seems to get a random value.

As mandated by MPI-2, annex B.13.4, for C/C++ interoperability, the
prototype for this constructor is:

{{{
class Intracomm {
public:
    Intracomm(const MPI_Comm& data);
};
}}}

Experiments with icpc 9.1/20060925 have shown that removing the
reference from the prototype makes it work (!).  After lots of
discussions about this issue with a C++ expert (Doug Gregor from IU),
we decided the following (cut-n-paste from an e-mail):

-----
> So here's my question: given that OMPI's MPI_<CLASS> types are all
> pointers, is there any legal MPI program that adheres to the above
> bindings that would fail to compile or work properly if we simply
> removed the "&" from the second binding, above?

I don't know of any way that a program could detect this change. FWIW,
the C++ committee has agreed that implementation of the C++ standard
library are allowed to decide arbitrarily between const& and by-value.
If they don't care, MPI users won't care.

When you remove the '&', I suggest also removing the "const". It is
redundant, but can trigger some strange name mangling in Sun's C++
compiler.
-----

So with this change:

 * we now work again with the Intel 9.1 compiler
 * our C++ bindings do not exactly conform to the MPI-2 spec, but
   valid/legal MPI C++ apps cannot tell the difference (i.e., the
   functionality is the same)

This commit was SVN r12514.
2006-11-09 17:34:12 +00:00
George Bosilca
eab1776e9a Explicit casts for our friendly Windows environment...
This commit was SVN r12496.
2006-11-08 17:02:46 +00:00
Jeff Squyres
31e8f510fe After review with Rolf, decided to be a bit more safe and instead of
assigning status._cancelled, call MPI_STATUS_SET_CANCELLED.

This commit was SVN r12471.
2006-11-07 20:49:31 +00:00
Jeff Squyres
25dab9700f * Add some error checking to GET_ELEMENTS and STATUS_SET_CANCELLED
* Move the check for STATUS_IGNORE in STATUS_SET_ELEMENTS up into the
   error checking block

This commit was SVN r12460.
2006-11-07 02:47:35 +00:00
Jeff Squyres
6e1729cb93 Fixes trac:580
* Add MPI::Status methods Set_elements() and Set_cancelled()
 * Added a bunch of comments in various places in the MPI C++ bindings
   implementatio just to explain what's going on (because C++ can hide
   a lot from you)
 * Insert C++ callbacks for the MPI_Grequest callback functions
   registered by MPI::Grequest::Start().  These callbacks keep a
   little meta-data (created by Grequest::Start()) that allow the
   proper callback signatures from C (i.e., from ompi_grequest_<foo>()
   in libmpi.a -- C code), translate arguments as required, and then
   invoke the callbacks with proper C++ signatures (i.e., call
   user-defined callbacks with C++ function signatures).

This commit was SVN r12446.

The following Trac tickets were found above:
  Ticket 580 --> https://svn.open-mpi.org/trac/ompi/ticket/580
2006-11-06 18:42:00 +00:00
Jeff Squyres
bc93583184 Fix the SIZEOF implementation for complex's. We want to output the
size of the complex type as determined by configure; not the size of
the next larger complex type (i.e., a complex*N is 2 real*(N/2)'s, not
2 real*N's).

This commit was SVN r12421.
2006-11-03 15:52:46 +00:00
Jeff Squyres
431f940a52 Fixes trac:496
* Add some more error checking to GREQUEST_START
 * Move the error checking in GREQUEST_COMPLETE up to inside the
   MPI_PARAM_CHECK block, where it belongs
 * Invoke the gen request query_fn in all the Right spots (per MPI-2:8.2)
 * Distinguish between grequests created from C and Fortran
 * Use the OBJ system to reference count to release the grequest at
   the Right time and invoke the grequest free_fn properly (see
   lengthy comment in grequest.c above the destructor)
 * Have ompi_grequest_complete() call ompi_request_complete() rather
   than [poorly] copy the contents of ompi_request_complete()
 * Fix Fortran function callback pointer typedefs to use proper
   Fortran types
 * Edit ompi_request_test* and ompi_request_wait* to properly handle
   generalized requests.  This adds an "if" statement in the critical
   path for all the back-end test* and wait* functions :-(,
   but fortunately George took out two "if" statements from the
   critical path last week.  So we're still ahead.  :-)
 * Move ompi_request_test() out of request.h and into request.c (all
   other test* and wait* functions were already in the .c file -- and
   ompi_request_test() was too long to be statically inlined anyway)

This commit was SVN r12402.

The following Trac tickets were found above:
  Ticket 496 --> https://svn.open-mpi.org/trac/ompi/ticket/496
2006-11-02 03:34:53 +00:00
Jeff Squyres
2f936c4597 Fixes trac:549
Had group discussion about this on the weekly call.  The decision was
that we should pass the real error code to the back-end exception
handler because it's pretty useless to pass MPI_ERR_IN_STATUS to the
back-end exception handler (because exception handlers don't have
access to the request or the status - this has potential issues for
fault tolerance kinds of scenarios).  So in TESTALL, TESTSOME,
WAITALL, and WAITSOME, we examine the error code and if it's not
MPI_SUCCESS, return MPI_ERR_IN_STATUS.

This commit was SVN r12389.

The following Trac tickets were found above:
  Ticket 549 --> https://svn.open-mpi.org/trac/ompi/ticket/549
2006-11-01 19:31:43 +00:00
George Bosilca
a711a58410 Add a function to handle the MPI_Status_set_elements correctly. The current
implementation was just wrong !!!

This commit was SVN r12380.
2006-10-31 23:02:42 +00:00
Jeff Squyres
63155bca09 Refs trac:496
Have no idea why this function always returns a failure.  It should
always return SUCCESS (provided the status is value).

This commit was SVN r12364.

The following Trac tickets were found above:
  Ticket 496 --> https://svn.open-mpi.org/trac/ompi/ticket/496
2006-10-30 22:44:23 +00:00
Jeff Squyres
0b2616173a Fixes trac:549
* For MPI_TEST, MPI_TESTANY, MPI_WAIT, and MPI_WAITANY (i.e., the
   TEST/WAIT functions that return up to exactly one completed
   request), return the actual error code.
 * For MPI_TESTALL, MPI_TESTSOME, MPI_WAITALL, MPI_WAITSOME, (i.e.,
   the TEST/WAIT functions that can return more than one completed
   request), return MPI_ERR_IN_STATUS.

This commit was SVN r12355.

The following Trac tickets were found above:
  Ticket 549 --> https://svn.open-mpi.org/trac/ompi/ticket/549
2006-10-30 19:50:09 +00:00
Jeff Squyres
2de51fca63 Need to return the error code.
This commit was SVN r12351.
2006-10-30 14:15:44 +00:00
Jeff Squyres
020efdf1f9 Refs trac:250
This commit essentially caches the invoking comm/win/file on the
ompi_request_t. This, paired with the req_type field, allows us to
retrieve the invoking MPI object and invoke the proper errhandler.

The patch is missing most updates for the MPI-2 one-sided stuff (i.e.,
the patch mainly fixes comms and files); I didn't really understand
that code and didn't want to hazard trying to figure it out when Brian
can probably do it much more quickly.

So #250 will still stay open, pending MPI-2 one-sided updates for this
stuff.

This commit was SVN r12339.

The following Trac tickets were found above:
  Ticket 250 --> https://svn.open-mpi.org/trac/ompi/ticket/250
2006-10-27 12:35:27 +00:00
Jeff Squyres
e02114dcf3 Fixes trac:529.
* Create a new request type: NOOP (described below)
 * For all MPI_*_INIT functions, OBJ_NEW an ompi_request_t and set its
   type to NOOP
 * Ensure that the NOOP requests are OBJ_RELEASE'd when they are done
 * MPI_START looks at the request type; if NOOP, just return success. If
   not, call the PML start() function
 * MPI_STARTALL always pass the entire array of requests back to the PML
   (see next point)
 * Make the PMLs only process PML requests (i.e., ignore/skip anything
   that isn't of type PML -- such as the NOOP requests)
 * Add a little more param error checking in STARTALL

This commit was SVN r12338.

The following Trac tickets were found above:
  Ticket 529 --> https://svn.open-mpi.org/trac/ompi/ticket/529
2006-10-27 12:32:36 +00:00
George Bosilca
126a68dc9a Big datatype commit. Remove all unused features of the datatype engine. As the memory
allocation logic is completely done outside the data-type engine (in the PML) there is
no need for any special case inside the data-type engine. There is less arguments for
the ompi_convertor_pack and ompi_convertor_unpack as well (the last field free_after is
not required anymore as there is no memory allocated in the engine itself). This change
affect all components using datatypes. I test most of them, but it might happens that I
miss some ... If it's the case please let me know (don't shoot the pianist!!).

This commit was SVN r12331.
2006-10-26 23:11:26 +00:00
Sven Stork
5861ed865d - Add parameter checking as required by the standard.
This commit was SVN r12318.
2006-10-26 09:18:21 +00:00
Sven Stork
9024c5be4b - Fix wrong error values.
This commit was SVN r12317.
2006-10-26 08:26:03 +00:00
George Bosilca
2d17f0fa9d First step on supporting full external32 conversion on both operations
pack and unpack.

This commit was SVN r12299.
2006-10-25 14:33:06 +00:00
Rolf vandeVaart
272f766c5f Fix for ticket #219 MPI::Grequest is missing from C++ API. I did the initial implementation and Jeff fixed it up. Passes a new test in trunk/simple/basic/cxx/grequest.cc.
This commit was SVN r12264.
2006-10-23 20:17:30 +00:00
George Bosilca
06563b5dec Last set of explicit conversions. We are now close to the zero warnings on
all platforms. The only exceptions (and I will not deal with them
anytime soon) are on Windows:
- the write functions which require the length to be an int when it's
  a size_t on all UNIX variants.
- all iovec manipulation functions where the iov_len is again an int
  when it's a size_t on most of the UNIXes.
As these only happens on Windows, so I think we're set for now :)

This commit was SVN r12215.
2006-10-20 03:57:44 +00:00
George Bosilca
c9da782804 Keep only one function to get the size of a datatype.
This commit was SVN r12170.
2006-10-18 17:33:01 +00:00
George Bosilca
8852c00c36 Look like a big commit but in fact it address only one issue. The way we're working with
size and diplacement of data-type. After this patch all data can contain size_t bytes
and the displacements are defined as ptrdiff_t. All of the files I was able to compile
have been modified to match this requirement.

This commit was SVN r12146.
2006-10-17 20:20:58 +00:00
George Bosilca
e116a37482 My last commit was wrong. Here is the correct version.
This commit was SVN r12131.
2006-10-17 02:45:03 +00:00
George Bosilca
01f5b4007b Check the count. It has to be a positive number.
This commit was SVN r12130.
2006-10-17 02:40:17 +00:00
Jeff Squyres
0ebe687ed8 Refs trac:502, #503. This commit as a result of review of r12122.
* Update comments in some MPI_FILE_* functions to reflect that the
   MPI specs have different page numbers in the ps and pdf (woof!).
 * Update comments to say "Retain" where we meant retain (not "return)
 * Add a check in MPI_ERRHANDLER_FREE to raise an MPI exception if the
   user attempts to free an intrinsic errhandler *and* the refcount is
   1 (meaning that it would actually free the intrinsic).  This
   protects erroneous programs from segv'ing.
 * Remove lengthy comment from comm_get_errhandler.c which is no
   longer valid (because of the MPI-2 errata that says that users *do*
   have to call MPI_ERRHANDLER_FREE).

This commit was SVN r12128.

The following SVN revision numbers were found above:
  r12122 --> open-mpi/ompi@407b3cb788

The following Trac tickets were found above:
  Ticket 502 --> https://svn.open-mpi.org/trac/ompi/ticket/502
2006-10-17 00:18:35 +00:00
Brian Barrett
fdc8f69b84 * need to include iostream as well as stdio.h when doing the tricks with
MPI::SEEK_* because iostreams (well, ios_base, but I don't think that
    should be included directly) can use SEEK_* as values in an enum, which
    means that 'const int' is bad for them.
  * Remove now useless comments in the cxx example programs
  * include iostream after mpi.h so that our examples work with other MPI
    implementations that don't try to be as friendly with the constants.

Refs trac:387

This commit was SVN r12125.

The following Trac tickets were found above:
  Ticket 387 --> https://svn.open-mpi.org/trac/ompi/ticket/387
2006-10-16 14:20:31 +00:00
Jeff Squyres
407b3cb788 Fix some problems with errhandlers:
* Fix MPI-2 page number in comments for a specific reference in the
   spec
 * Allow getting/setting the errhandler on MPI_FILE_NULL
 * Allow freeing of intrinsic errhandlers, per MPI-2 errata (if you GET
   an errhandler on a communicator, you must be able to FREE it, even
   if it's an intrinsic).

Thanks to Lisandro Dalcin for reporting these problems.

This commit was SVN r12122.
2006-10-16 12:58:40 +00:00
Brian Barrett
e7a7a64e4c Implement MPI::SEEK_{SET, END, POS} for the C++ bindings, working around
some issues with the C #defines SEEK_{SET, END, POS}.  The workaround
involves some hackery that should work in almost every common use case
for the C stdio constants (and all the legal issues of the MPI constants).
The one issue is that the C stdio constants are now const ints instead
of #defines, which means that #ifdef checks will fail for the constants.

Behavior can be disabled at either configure time or build time.

Refs trac:387

This commit was SVN r12121.

The following Trac tickets were found above:
  Ticket 387 --> https://svn.open-mpi.org/trac/ompi/ticket/387
2006-10-15 23:50:24 +00:00