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

404 Коммитов

Автор SHA1 Сообщение Дата
Rainer Keller
56f3d59f2a - Coverity issues 939, 940, 941:
Event uninit_use_in_call: Using uninitialized value "tag" in call to
   function "(ompi_dpm).connect_accept" and others
   The tag is set and used in get_rport only on root...

This commit was SVN r17972.
2008-03-26 08:09:11 +00:00
Ralph Castain
90107f3c14 Fix an issue with comm_spawn over who sent/recv first in the modex. The modex assumes that the first name on the list is the "root" that will serve as the allgather collector/distributor. The dpm was putting that entity last, which forced us to pre-inform the parent procs of the child proc's contact info since the parent was trying to send to the child.
Clarify the setting of send_first in the mpi bindings (trivial, i know, but helpful)

Remove the extra xcast of child contact info to the parent job.

This commit was SVN r17952.
2008-03-25 14:57:34 +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
Josh Hursey
134684d096 A compiler warning fix.
This commit was SVN r17539.
2008-02-21 14:28:08 +00:00
Josh Hursey
99144db970 Improve checkpoint/restart support by allowing a checkpoint to progress when the process is *not* in the MPI library. This involves creating a separate thread for polling for a checkpoint request. This thread is active when the MPI process is not in the MPI library, and paused when the MPI process is in the library.
Some MPI C interface files saw some spacing changes to conform to the coding standards of Open MPI.

Changed MPI C interface files to use {{{OPAL_CR_ENTER_LIBRARY()}}} and {{{OPAL_CR_EXIT_LIBRARY()}}} instead of just {{{OPAL_CR_TEST_CHECKPOINT_READY()}}}. This will allow the checkpoint/restart system more flexibility in how it is to behave.

Fixed the configure check for {{{--enable-ft-thread}}} so it has a know dependance on {{{--enable-mpi-thread}}} (and/or {{{--enable-progress-thread}}}).

Added a line for Checkpoint/Restart support to {{{ompi_info}}}.

Added some options to choose at runtime whether or not to use the checkpoint polling thread. By default, if the user asked for it to be compiled in, then it is used. But some users will want the ability to toggle its use at runtime.

There are still some places for improvement, but the feature works correctly. As always with Checkpoint/Restart, it is compiled out unless explicitly asked for at configure time. Further, if it was configured in, then it is not used unless explicitly asked for by the user at runtime.

This commit was SVN r17516.
2008-02-19 22:15:52 +00:00
Rainer Keller
9cd2c6f48b - Instead of calling RUNNING_ON_VALGRIND,
implement specific function, thereby
   removing bogus requirement on valgrind/valgrind.h
   dough...
 - Call specific function runindebugger() before
   doing expensive checks on each component of struct.
 - Get rid of void* warnings..

This commit was SVN r17438.
2008-02-12 20:37:51 +00:00
Shiqing Fan
54c7b71cfd Use the correct way of including memchecker.h, which will work with '--with-devel-headers'.
This commit was SVN r17435.
2008-02-12 18:01:17 +00:00
Shiqing Fan
f5792bbda5 merging the memchecker into trunk.
This commit was SVN r17424.
2008-02-12 08:46:27 +00:00
Dan Lacher
98f70d6318 Convert the C++ Comm, Datatype and Winn keyval creation and intercept callbacks
to *not* use the STL as well as removing the STL use from the error handler
routines.  This was removing the STL from the C++ bindings (Solaris has 2
versions of the STL; if OMPI uses one and an MPI application wants to use
another, Bad Things happen).

The main idea is to wrap up the C++ callback function pointers and the user's
extra_state into our own struct that is passed as the extra_state to the C
keyval registration along with the intercept routines in intercepts.cc. When the
C++ intercepts are activated, they unwrap the user's callback and extra state
and call them.

This commit was SVN r17409.
2008-02-10 19:29:25 +00:00
George Bosilca
13de3420ab As the receive buffer is only significant at root, limit the
check only where it makes sense.

This commit was SVN r17366.
2008-02-04 01:44:41 +00:00
Rainer Keller
2b4975de8e - In case of MPI_REQUEST_NULL, set the *status to the empty_status,
by copying structure:

   psendrecv.c:81
   4e7:   cmpl   $0x0,0x34(%ebp)           4e7:   cmpl   $0x0,0x34(%ebp)
   4eb:   je     51e <PMPI_Sendrecv+0x51e> 4eb:   je     517 <PMPI_Sendrecv+0x517>
   psendrecv.c:85
   4ed:   mov    0x34(%ebp),%eax           4ed:   mov    0x34(%ebp),%edx
   4f0:   movl   $0xfffffffe,(%eax)        4f0:   mov    0x38,%eax
   psendrecv.c:86                          4f5:   mov    %eax,(%edx)
   4f6:   mov    0x34(%ebp),%eax           4f7:   mov    0x3c,%eax
   4f9:   movl   $0xffffffff,0x4(%eax)     4fc:   mov    %eax,0x4(%edx)
   psendrecv.c:87                          4ff:   mov    0x40,%eax
   500:   mov    0x34(%ebp),%eax           504:   mov    %eax,0x8(%edx)
   503:   movl   $0x0,0x8(%eax)            507:   mov    0x44,%eax
   psendrecv.c:88                          50c:   mov    %eax,0xc(%edx)
   50a:   mov    0x34(%ebp),%eax           50f:   mov    0x48,%eax
   50d:   movl   $0x0,0xc(%eax)            514:   mov    %eax,0x10(%edx)
   psendrecv.c:89
   514:   mov    0x34(%ebp),%eax
   517:   movl   $0x0,0x10(%eax)
   psendrecv.c:91

This commit was SVN r17230.
2008-01-25 12:58:59 +00:00
George Bosilca
25814c07e0 Update the checks in the reduce family collectives.
This commit was SVN r17096.
2008-01-09 20:40:57 +00:00
George Bosilca
906e8bf1d1 Replace the ompi_pointer_array with opal_pointer_array. The next step
(sometimes after the merge with the ORTE branch), the opal_pointer_array
will became the only pointer_array implementation (the orte_pointer_array
will be removed).

This commit was SVN r17007.
2007-12-21 06:02:00 +00:00
Jeff Squyres
b9106a0d25 Back out r16836 and put in a big comment why.
This commit was SVN r16872.

The following SVN revision numbers were found above:
  r16836 --> open-mpi/ompi@6b9048fc6d
2007-12-06 18:45:21 +00:00
Edgar Gabriel
6b9048fc6d check for MPI_GROUP_EMPTY before freeing a group.
fixes: 1110

This commit was SVN r16836.
2007-12-04 16:13:27 +00:00
Jeff Squyres
cf98657adb * Clean up a little #if logic in MPI_WTICK / MPI_WTIME
* Update MPI_WTICK / MPI_WTIME man pages:
   * Fix C++ declarations
   * Note that we may use better than gettimeofday() on some platforms
 * Add "MPI_WTIME support" ("options:mpi-wtime") flag in ompi_info
   output indicating whether we use "native" or "gettimeofday" for
   MPI_WTIME

This commit was SVN r16774.
2007-11-26 18:23:53 +00:00
Ethan Mallove
005652c9d4 * Embed ident strings into the Open MPI libraries using one of the following
methods (in order of precedence):
  1. #pragma ident <ident string> (e.g., Intel and Sun)
  1. #ident <ident string> (e.g., GCC)
  1. static const char ident[] = <ident string> (all others)
By default, the ident string used is the standard Open MPI version string. Only
the following libraries will get the embedded version strings (e.g., DSOs will
not):
  * libmpi.so
  * libmpi_cxx.so
  * libmpi_f77.so
  * libopen-pal.so
  * libopen-rte.so
* Added two new configure options:
  * `--with-package-name="STRING"` (defaults to "Open MPI username@hostname
    Distribution"). `STRING` is displayed by `ompi_info` next to the "Package"
    heading.
  * `--with-ident-string="STRING"` (defaults to the standard Open MPI version
    string - e.g., X.Y.Zr######). `%VERSION%` will expand to the Open MPI
    version string if it is supplied to this configure option.

This commit was SVN r16644.
2007-11-03 02:40:22 +00:00
Josh Hursey
7437f37e96 This commit contains the following:
* Fix some missing includes in a few places.
 * Add the cr_request() functionality to the BLCR CRS component.
   We are now dependent upon the 0.6.* series of BLCR.
 * Made the CR notification mechanism a registered function.
   This way we can have an OPAL-only version and it can be replaced at
   runtime with the ORTE version.
 * Add a 'opal_cr_allow_opal_only' parameter that will enable OPAL-only
   CR functionality when the user wants it. Default: Disabled.
 * Fix the placement of a checkpoint request check in MPI_Init
 * Pull the OPAL notification mechanism into the SnapC framework.
   * We no longer fork/exec the 'opal-checkpoint' command for local
   checkpointing, the Local coordinator in the orted does this directly.
   * The Local and Application coordinator talk together bypassing the OPAL
   notifiation mechanism.
   * Optimized the Local <-> App Coordinator communication.
   * Improved the structure used to track vpid_snapshots in the local coord.
 * Fix a race condition in which an application under heavy communication load
   may produce an inconsistent global checkpoint.

This commit was SVN r16389.
2007-10-08 20:53:02 +00:00
Andrew Friedley
069e6dc4a0 Fix a bug introduced when the collective selection logic was changed to allow for a different component to be used for each collective.
Passing the barrier module to the bcast function is a bad idea when barrier is using a different component from bcast..

This commit was SVN r16212.
2007-09-25 17:09:52 +00:00
Tim Prins
4033a40e4e Coding standards...
This commit was SVN r16118.
2007-09-13 14:00:59 +00:00
George Bosilca
bfb4ddc3e2 Coverty: remove dead code.
This commit was SVN r16106.
2007-09-12 17:56:33 +00:00
George Bosilca
8622beda54 This commit should fix the issues with ticket 1065. Now, we correctly
duplicate the MPI_UB and MPI_LB datatypes.

This commit was SVN r16083.
2007-09-10 22:13:42 +00:00
George Bosilca
756eee571e Fix Coverty #24. This test didn't make sense in this branch of the if.
This commit was SVN r16001.
2007-08-29 02:02:19 +00:00
Jeff Squyres
f08cce16db Fix Coverity CID 468: remove unused variable.
This commit was SVN r15996.
2007-08-29 01:21:17 +00:00
Jeff Squyres
b69c7688a0 Fix Coverity defect 676: possible NULL dereference in an error
condition.

This commit was SVN r15956.
2007-08-25 12:17:02 +00:00
Brian Barrett
af4e86c25f Update collectives selection logic to allow for multiple components to be
used at nce (up to one unique collective module per collective function).
Matches r15795:15921 of the tmp/bwb-coll-select branch

This commit was SVN r15924.

The following SVN revisions from the original message are invalid or
inconsistent and therefore were not cross-referenced:
  r15795
  r15921
2007-08-19 03:37:49 +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
Mohamad Chaarawi
8c458b0ee7 removing unused variables, that cause warnings..
This commit was SVN r15791.
2007-08-07 15:13:46 +00:00
Mohamad Chaarawi
59a7bf8a9f Merging in the Sparse Groups..
This commit includes config changes..

This commit was SVN r15764.
2007-08-04 00:41:26 +00:00
Shiqing Fan
0f468f3668 - Remove the solution and project files, will commit them later.
This commit was SVN r15705.
2007-07-31 17:07:02 +00:00
Sven Stork
27422e05ac - add parameter check for NULL pointer
This commit was SVN r15697.
2007-07-31 09:01:39 +00:00
Sven Stork
80cdafb8f4 - remove dead code found by coverity
This commit was SVN r15685.
2007-07-30 15:36:00 +00:00
Sven Stork
855434de59 - fixes several coverty issues
- add missing initialisation for variables
  - use strncpy instead of strcpy

This commit was SVN r15683.
2007-07-30 14:44:37 +00:00
Jeff Squyres
327576b2a3 Fix incorrect behavior noted by Lisandro Dalcini: when MPI_COMM_SELF is
passed to MPI_COMM_FREE, it invoked the error handler on
MPI_COMM_WORLD, not on MPI_COMM_FREE.  This commit changes the
behavior: if MPI_COMM_SELF is passed to MPI_COMM_FREE, we invoke the
error handler on MPI_COMM_SELF (not MPI_COMM_WORLD).  Fixes trac:1109.

This commit was SVN r15682.

The following Trac tickets were found above:
  Ticket 1109 --> https://svn.open-mpi.org/trac/ompi/ticket/1109
2007-07-30 13:01:33 +00:00
Shiqing Fan
4d7b349cdb - Add VC8 solution and project files.
- If one wants to use this solution, remember to unload the project 'orte-restart' which is currently not working for Windows.

This commit was SVN r15680.
2007-07-30 11:05:34 +00:00
Rainer Keller
1dbbfc04b7 - Rename rank to tmp_rank to get rid of warning
This commit was SVN r15672.
2007-07-29 12:56:02 +00:00
Rainer Keller
bb2d0b45cd - Coverity CID37: if requests == NULL, do not deref requests[i] for
multi-completion calls. Therefore reorder tests where appropriate.
 - Always check for NULL-pointers (flag, index, completed) (yes, we
   use them in the underlying ompi_request_* functions.
 - Break early, if a NULL-request is found

This commit was SVN r15671.
2007-07-29 12:54:21 +00:00
Rainer Keller
4ff78f8e2d - Coverity: Just as init.c -- we do not have a communicator yet;
so do not use OMPI_ERRHANDLER_RETURN which dereferences NULL...

This commit was SVN r15670.
2007-07-29 11:47:19 +00:00
Jeff Squyres
71d6c5b811 Arf. Remove a debugging printf. Thanks to Christian for noticing...
This commit was SVN r15605.
2007-07-25 11:00:18 +00:00
Jeff Squyres
e80b7e9dde If MPI_ALLOC_MEM is invoked with a 0 sized request, return NULL. If
MPI_FREE_MEM is invoked with NULL, return success.

Fixes trac:1101.

This commit was SVN r15593.

The following Trac tickets were found above:
  Ticket 1101 --> https://svn.open-mpi.org/trac/ompi/ticket/1101
2007-07-25 01:00:30 +00:00
Shiqing Fan
efa74f7bfe The label name "ERROR" is defined as a flag in Visual Studio platformSDK. Using "ERROR" as a label causes conflicts. Changing it into lowercase will solve the problem.
This commit was SVN r14869.
2007-06-05 14:32:27 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
14f338b7df Fix for lock/unlock epoch issues. Previously, we did not handle the case
where a window was in both the passive and active side of a lock sequence.

Refs trac:488

This commit was SVN r12112.

The following Trac tickets were found above:
  Ticket 488 --> https://svn.open-mpi.org/trac/ompi/ticket/488
2006-10-12 22:52:13 +00:00
Ralph Castain
1f7a5da3ce Bring singleton comm_spawn online.
This commit was SVN r12081.
2006-10-10 23:59:48 +00:00
Jeff Squyres
e08c6e81f5 * Fixes trac:338: Only look at root-significant values at the root (e.g.,
recvbuf in MPI_GATHER).
 * Minor style updates (constants on the left of == and !=)
 * Fix a minor buglet that crept in r11904: had a recvbuf where it
   should have been recvcount.  Thankfully, this would have only
   affected erroneous programs.  ;-)

This commit was SVN r11980.

The following SVN revision numbers were found above:
  r11904 --> open-mpi/ompi@17539dc154

The following Trac tickets were found above:
  Ticket 338 --> https://svn.open-mpi.org/trac/ompi/ticket/338
2006-10-04 22:36:01 +00:00
Jeff Squyres
17539dc154 Fixes trac:430. Fix a few places where optimization checking conflicted
with the use of MPI_IN_PLACE, and make some optimization checks more
correct.  Thanks to Lisandro Dalcin for reporting the problems.

This commit was SVN r11904.

The following Trac tickets were found above:
  Ticket 430 --> https://svn.open-mpi.org/trac/ompi/ticket/430
2006-09-29 22:49:04 +00:00
Edgar Gabriel
4dafe7ce0d The length of the ranks-arrays can be longer than the size of the according
groups. And zero is also an acceptable value according to the MPI spec.

Fixes trac:428

This commit was SVN r11841.

The following Trac tickets were found above:
  Ticket 428 --> https://svn.open-mpi.org/trac/ompi/ticket/428
2006-09-27 11:02:47 +00:00
Jeff Squyres
afa7f53d43 Refs trac:429.
Tweak a comment to match the code.

This commit was SVN r11839.

The following Trac tickets were found above:
  Ticket 429 --> https://svn.open-mpi.org/trac/ompi/ticket/429
2006-09-27 00:04:24 +00:00
Jeff Squyres
13d5e5aab4 Refs trac:429
Fixes simple off-by-one error in the error check for
MPI_INFO_GET_NTHKEY. 

This commit was SVN r11838.

The following Trac tickets were found above:
  Ticket 429 --> https://svn.open-mpi.org/trac/ompi/ticket/429
2006-09-26 23:36:22 +00:00
Brian Barrett
58dce54513 don't use macro or it will try to use the (now destroyed) MPI_COMM_WORLD,
which isn't going to work well

Refs trac:419

This commit was SVN r11822.

The following Trac tickets were found above:
  Ticket 419 --> https://svn.open-mpi.org/trac/ompi/ticket/419
2006-09-26 15:56:51 +00:00
Jeff Squyres
a822c34ebf Ralf W. categorically told me that this kind of statement in
Makefile.am's is from a very old Automake bug which has long-since
been fixed.  Since we require very recent versions of AM, we don't
need these anymore.

This commit was SVN r11774.
2006-09-25 14:28:04 +00:00
Sven Stork
72bf1e4a25 - add parameter checks for standard compliance
This commit was SVN r11610.
2006-09-11 10:23:35 +00:00
Brian Barrett
e0555889a9 * RMA_SYNC is a more appropriate error message for these than RmA_CONFLICT
* Print a warning error message if a target is not in an exposure epoch
    and an update is received.  This results in the app continuing with
    that call having never happened, rather than evil hangs.

refs trac:325

This commit was SVN r11514.

The following Trac tickets were found above:
  Ticket 325 --> https://svn.open-mpi.org/trac/ompi/ticket/325
2006-08-31 21:07:52 +00:00
Jeff Squyres
aadc7e24ef Also check for zero-length strings.
This commit was SVN r11499.
2006-08-30 11:59:02 +00:00
George Bosilca
3312aa4b0a The pack/unpack will return 1 only if all data has been packed/unpacked. We have to make
sure we provide exactly the amount of data these functions expect, otherwise they will
return 0.

This commit was SVN r11484.
2006-08-29 17:17:35 +00:00
Gleb Natapov
338134b535 run dos2unix on wtime.c and make MPI_Wtime work as it did before.
This commit was SVN r11482.
2006-08-29 10:11:48 +00:00
George Bosilca
e479951b3b And now the correct version of the timers. In fact, MPI_Wtime is supposed
to return the value on seconds not some other unit based on the resolution
of MPI_Wtick. Which I think it's the wrong solution, as instead of forcing
the user to do additional computations in order to convert when he needs
the result in seconds, force us to convert every time. Unfortunately,
converting requires a division with a double which is a costly
operation. But, MPI is a standard and we have to follow it ...

This commit was SVN r11481.
2006-08-29 04:30:33 +00:00
George Bosilca
e33c35112b Correct the conversion between int and bool. Apply it on all files except
the one that will be modified by Ralph for the ORTE 2.0. The missing ones
are in the rsh PLS.

This commit was SVN r11476.
2006-08-28 18:59:16 +00:00
Gleb Natapov
40ca1dd2d4 ran dos2unix on it
This commit was SVN r11463.
2006-08-28 10:27:27 +00:00
Jeff Squyres
129f8a9eb8 Add a newline at the end of the file (squelch a compiler warning).
This commit was SVN r11445.
2006-08-27 12:45:54 +00:00
George Bosilca
ee75c45ec5 Use the OPAL timers toi report timers as accurately as possible.
This commit was SVN r11442.
2006-08-27 04:58:02 +00:00
George Bosilca
d6b6f465b6 Cast everything to make the microsoft C++ compiler happy.
This commit was SVN r11373.
2006-08-23 16:35:16 +00:00
George Bosilca
f8f2dd8e03 As class is a reserved keyword we are not supposed to have any variables
with this name.

This commit was SVN r11372.
2006-08-23 16:34:00 +00:00
George Bosilca
9b4bab7d34 One step toward the create array completion.
This commit was SVN r11269.
2006-08-20 15:51:54 +00:00
Brian Barrett
65fedbe3be * followup to r10972... Even if MPI_PROC_NULL is given, we should do the
full argument checking (allowing that MPI_PROC_NULL is legal, of course).
  Only after the argument checking do we shortcut.  Fixes trac:237, which
  was caused by moving the MPI_PROC_NULL test in MPI_Bsend_init, 
  but not allowing for MPI_PROC_NULL when checking rank.

This commit was SVN r11108.

The following SVN revision numbers were found above:
  r10972 --> open-mpi/ompi@31c66d92aa

The following Trac tickets were found above:
  Ticket 237 --> https://svn.open-mpi.org/trac/ompi/ticket/237
2006-08-03 04:44:03 +00:00
Jeff Squyres
7784f1a818 Fix a problem noted by Chris Hennes that MPI_INFO_SET would mistakenly
disallow setting long info values.

This commit was SVN r11074.
2006-08-01 16:07:56 +00:00
Rainer Keller
ee27f7e2c7 - As according to MPI-1.2, sec 3.2.5, p22, single request
functions MPI_Test, MPI_Testany, MPI_Wait, MPI_Waitany
   should not reset the status.MPI_ERROR as passed by user.
 - This needed implementing the MPI_Waitsome and MPI_Testsome.

This commit was SVN r10980.
2006-07-25 15:29:37 +00:00
Rainer Keller
31c66d92aa Minor fixes to match standard -- and run strict test of mpi_test_suite:
- bsend_init: use *request after error-checking
 - Always reset the status->cancelled
 - cancel, wait: need to check *request for MPI_REQUEST_NULL, not
   NULL...
   (actually ompi_request_wait handles MPI_PROC_NULL, so no need
   to check&set of status_empty in wait.c)

This commit was SVN r10972.
2006-07-24 16:59:01 +00:00
Jeff Squyres
7899057d4e Add a check for now that invokes an MPI exception if you try to
SPAWN[_MULTIPLE] from a singleton (and displays a pretty help message
explaining that you need to use mpirun).  This can be removed when
fixes for ORTE come over that allow SPAWN[_MULTIPLE] from singletons. 

This commit was SVN r10898.
2006-07-20 14:27:13 +00:00
Brian Barrett
2759212e16 * use LN_S instead of ln -s, in case ln -s doesn't work...
This commit was SVN r10839.
2006-07-15 22:02:19 +00:00
George Bosilca
5cfa775ef9 Pedantic ...
This commit was SVN r10365.
2006-06-15 03:22:28 +00:00
George Bosilca
7d2ce68c2a Correctly compute the boundaries for the Fortran matrix style.
This commit was SVN r10364.
2006-06-15 03:21:54 +00:00
Jeff Squyres
4d337baccf Fix for ticket ticket #119. Do not check the type of the errhandler
-- always return a value c2f translation if it's a valid errhandler.

This commit was SVN r10357.
2006-06-14 19:42:39 +00:00
George Bosilca
e8e30dcc8c And now the final correct version of the subarray function. The problem
with the last one was that the resized function only set the soft lb and ub
markers without actually moving the usefull data up to the correct
displacement. Using a struct instead solve the problem. Anyway, as defined
in the MPI standard we have to set the lower bound and the upper bound
of the new type to the correct values too.

This commit was SVN r10328.
2006-06-13 07:42:23 +00:00
George Bosilca
a3c93df20c As I'm unable to correctly compute the size in multiple of the datatype, let me do
it in the simplest way: multiple of the original datatype + the h version of the
vector function.

This commit was SVN r10313.
2006-06-12 22:08:33 +00:00
Brian Barrett
480ffd3045 Fix issue that came up with testing some LANL romio applications.
MPI_FILE_GET_INFO should return the info currently in use, not the one
used to create the file handle.  ROMIO adds a bunch of keys, so you can
create a file handle with MPI_INFO_NULL and have MPI_FILE_GET_INFO return
something totatlly different.

This commit was SVN r10312.
2006-06-12 21:45:48 +00:00
George Bosilca
57bdb323b0 Initialize the extent before using it.
This commit was SVN r10309.
2006-06-12 19:38:52 +00:00
George Bosilca
20c34a53f7 Set the lb and extent for the case when the dimension is 1 and make
sure the last_type is defined when we go outside the loop.

This commit was SVN r10297.
2006-06-11 21:27:28 +00:00
George Bosilca
386a02d2ae Rewrite the subarray strictly following the MPI standard. Set the lb and ub
as it should be. I hope I get it right this time ...

This commit was SVN r10293.
2006-06-11 19:57:49 +00:00
Sven Stork
0084c9469a use correct free methode for additional allocated memory
This commit was SVN r10241.
2006-06-07 10:24:28 +00:00
George Bosilca
a64a80dff4 If the user type has a size of zero let's return zero. We will have a consistent behavior
with MPICH.

This commit was SVN r10230.
2006-06-06 19:51:42 +00:00
George Bosilca
7d7e801f15 External pack/unpack fixes.
This commit was SVN r10223.
2006-06-06 03:26:32 +00:00
George Bosilca
07fb4b8012 Allow a block indexed type with a count of zero. Be user friendly and set the ub, lb,
true_lb as well as the true_ub to zero in this case.

This commit was SVN r10208.
2006-06-05 21:16:57 +00:00
George Bosilca
5c2d2fc02a Match size is supposed to return Fortran types.
This commit was SVN r10206.
2006-06-05 21:07:48 +00:00
George Bosilca
e50cdeb927 Allow the creation of strcutres with count zero. And try to have a more friendly behavior
(even if I don't agree with it) by setting the lb, ub, true_lb and true_ub to zero.

This commit was SVN r10205.
2006-06-05 21:07:16 +00:00
Jeff Squyres
299f4fdb2c Oops -- fix the comment. A victim of cut-n-paste.
This commit was SVN r9971.
2006-05-18 18:10:12 +00:00
Jeff Squyres
942f9e8f8d Fixes for ticket:14. Lengthy discussion is on that ticket and in a
comment in ompi_comm_invalid() in
source:/trunk/ompi/communicator/communicator.h.

Short version:
- ompi_comm_invalid() returns TRUE for MPI_COMM_NULL
- therefore MPI_COMM_C2F needs to explicitly check for MPI_COMM_NULL
  (because it uses ompi_comm_invalid())
- make ~20 MPI functions only call ompi_comm_invalid() instead of
  calling ompi_comm_invalid() *and* checking for MPI_COMM_NULL (~40 MPI
  functions already only called ompi_comm_invalid() -- we should be
  consistent)
- similar issue for ompi_win_invalid(), so I added a cross-referencing
  comment in win.h and fixed MPI_WIN_SET_NAME to only call
  ompi_win_invalid() (and not check for MPI_WIN_NULL)

This commit was SVN r9970.
2006-05-18 18:05:46 +00:00
Edgar Gabriel
7e99dc4301 - fix in comm_spawn_multiple: we cannot check for the errorcodes array
being null, if the constant MPI_ERRCODES_IGNORE is defined as (void *)
NULL;
- the communicator in file open has to be an intra-communicator.

This commit was SVN r9893.
2006-05-11 13:23:53 +00:00
George Bosilca
29fe545451 Remove all references to the ompi_mpi_long_long variable. The MPI_LONG_LONG is now
a synonym to MPI_LONG_LONG_INT.

This commit was SVN r9703.
2006-04-24 22:15:42 +00:00
Jeff Squyres
f710ef5b2b Commit 1.5 of 2: just like r9560, we need to make the MPI_*_C2F
functions return an invalid fortran handle (-1) if an invalid C handle
is passed in.

Just so it's logged somewhere -- it looks like commit 2 of 2 as noted
in the r9560 commit message (ok, 3 of 3 if you're really counting),
where we have to edit the C interface functions to check for NULL, is
going to be far easier than I thought -- many (but not all) of the C
interface functions already check for NULL MPI handles (either
directly or through helper functions).  

Woo hoo for foresight...

This commit was SVN r9561.

The following SVN revision numbers were found above:
  r9560 --> open-mpi/ompi@e00c6053dc
2006-04-07 04:01:22 +00:00
Jeff Squyres
e00c6053dc Commit 1 of 2: be consistent in the MPI_*_F2C functions for the
handling of invalid Fortran handles.  Per MPI-2:4.12.4, if we get an
invalid Fortran handle, we should return an invalid C handle.  Before
this commit, we checked if the fortran handle index was out of range
(i.e., <0 or >sizeof(array)).  If so, we used to return MPI_*_NULL
(i.e., a valid C handle).  But to be faithful to MPI-2:4.12.4, we
now return NULL (an invalid C handle).

If the fortran index is in bounds but is an index for an MPI object
that has already been freed, the code already returns NULL because the
entry in the array will be NULL (i.e., we already did what
MPI-2:4.12.4 said for this case).

Hence, this commit makes the handling of invalid fortran handles in
the MPI_*_F2C functions be uniform: we always return NULL.

Commit 2 of this will be to edit just about every C interface function
(!) to ensure that MPI handles are not NULL.  Otherwise, if the user
calls a fortran interface function with an invalid handle, the fortran
interface function will call MPI_*_F2C and blindly pass the result to
the back-end C function.  The C function will eventually end up trying
to dereference it -- segv.  Having a run-time check for NULL and
invoking an MPI exception is far more social (e.g., the user can get a
stack trace out of MPI_ABORT) and consistent (i.e., we're already
checking for MPI_*_NULL in the C interface functions).

Since all the C interface functions have all the machinery for
run-time parameter checking, and they all already check for
MPI_*_NULL, it's easy enough to add another check for NULL.

This commit was SVN r9560.
2006-04-07 03:49:58 +00:00
Sven Stork
e6b0828a4f - add missing lb check
This commit was SVN r9516.
2006-04-03 13:22:04 +00:00
George Bosilca
285b1af2a7 Follow the standard when the count is set to zero. Or let me say it differently,
follow the statement from the standard that make the most sense to me. In this
particular case this statement is:
If there is no active handle in the list it returns outcount = MPI_UNDEFINED.

This commit was SVN r9512.
2006-04-01 07:39:55 +00:00
George Bosilca
ae47cbfe02 Accept an array of request set to NULL if the count is set to ZERO.
This commit was SVN r9504.
2006-03-31 20:32:56 +00:00
Sven Stork
711b30fbac - introduction of user buffer checking for pt2pt operations
This commit was SVN r9449.
2006-03-29 09:26:27 +00:00
George Bosilca
85bb1a9c90 Add one more argument to the copy functions for the MPI objects. As this argument
is the last one on the list and as on C the caller "make it right" this addition
will not affect the way we handle the user defined copy functions. Only the C
version of the function has this additional parameter. As it represent the pointer
to the newly created MPI object It hold the key to allow us to modify the new
object (communicator, window or type) depending on some key stored on the initial
communicator.

This commit was SVN r9371.
2006-03-23 04:47:14 +00:00
Tim Woodall
bd870519fd - modified convertor copy_and_prepare routines to accept an addition
flag, new flags to be included when convertor is initialized
- modified pml/btl module defs and added stub functions for diagnostic
  output routines to dump state of queues / endpoints
- updates to data reliability pml

This commit was SVN r9329.
2006-03-17 18:46:48 +00:00
Mohamad Chaarawi
b8c9adc833 checking of multiply included/excluded processes in
group_range_incl/excl has now been separated from the implementation.

This commit was SVN r9311.
2006-03-16 17:51:16 +00:00
Rainer Keller
a8144cca8d - Fix the return codes -- not OMPI, but MPI..
- Use the datatype-checks of bindings.h within recv.
   However, for the time being disable the check for overlapped,
   as it is not correctly set.

This commit was SVN r9298.
2006-03-16 09:42:46 +00:00
George Bosilca
d19e924ca8 gcc print out: warning: ISO C90 forbids mixed declarations and code.
This commit was SVN r9283.
2006-03-14 22:27:19 +00:00
Mohamad Chaarawi
c5a8870f6b move the implementation of the group creation functions into according back-end
functions. 

This commit was SVN r9281.
2006-03-14 21:01:46 +00:00
George Bosilca
679ccbcac7 Correctly handle the MPI_STATUSES_IGNORE, and trigger the MPI error handler and return the
same error code.

This commit was SVN r9206.
2006-03-06 16:59:46 +00:00
George Bosilca
ca116e3cf3 Where we create a duplicate data-type for the get_content MPI function we have to attach the
args from the old data-type. As this args are only read-only, I don't want to have several
copies around, so I add a reference count to them and simply attach them to the new
datatype. The args array now get freed only when the last reference dissapear.

This commit was SVN r9191.
2006-03-03 20:51:36 +00:00
Rainer Keller
8568bb9892 - Allow MPI_ERRCODES_IGNORE when checking is on.
This commit was SVN r9180.
2006-02-28 10:16:42 +00:00
Brian Barrett
d5e0ea3590 * Post and Start should only check their epoch types for conflicts, otherwise
you can't be in a post and a start at the same time, and that is clearly
  legal to do
* Fix interptretation of when the epochs start for MPI_Fence.  Only start
  an epoch if communication actually occurs, otherwise it isn't actually
  an epoch.  I don't know who thought that wording in the MPI standard
  was a good idea, but can't change it now...

This commit was SVN r9139.
2006-02-24 13:04:15 +00:00
Brian Barrett
27b8430e8f * update MPI_ACCUMULATE to perform it's parameter checking based on what
MPI-2:6.3.4 says about reduction operations
* Have the point-to-point one-sided component spew a warning and return
  an error if a non-predefined datatype is used with an MPI_OP other
  than MPI_REPLACE.  Yes, this violates the MPI standard, but it's the
  best we can do until George and I implement support for figuring out
  where all the locations to update are..

This commit was SVN r9134.
2006-02-23 21:07:49 +00:00
Jeff Squyres
8f7311becd Fix a few copy-n-paste errors: when an op is invalid, invoke the MPI
exception on the passed communicator, not MPI_COMM_WORLD.

This commit was SVN r9105.
2006-02-21 19:11:40 +00:00
Brian Barrett
889aeeddb2 * clean up the error checking a bit - user defined datatypes are allowed for
MPI_OP_REPLACE.  All other rules are basically the same as MPI_Reduce, so
  use that helper function.

This commit was SVN r9104.
2006-02-21 19:00:49 +00:00
Galen Shipman
0bc3cbf0db Corrections to pml_dr, now passes intel test suite (p2p_c).
Note, the checksums are not enabled currently, setting to zero as the
convertor is not ready for checksums yet. 

Also, we can't call unpack/pack on convertor with 0 bytes, otherwise it
crashes. 

This commit was SVN r9062.
2006-02-16 16:15:16 +00:00
Jeff Squyres
c674c165fd - Fix final check in TYPE_CREATE_F90_INTEGER
- Add more checks on the params to ensure that the user conformed to
  MPI-2 (i.e., can have MPI_UNDEFINED for p *or* r in the real/complex
  functions, but not both)
- Always return MPI_ERR_ARG, not MPI_ERR_OTHER -- seems to make a
  little more sense here, since any errors that are returned are
  solely because of the arguments that were passed into the function

This commit was SVN r9037.
2006-02-14 18:01:44 +00:00
Brian Barrett
566a050c23 Next step in the project split, mainly source code re-arranging
- move files out of toplevel include/ and etc/, moving it into the
    sub-projects
  - rather than including config headers with <project>/include, 
    have them as <project>
  - require all headers to be included with a project prefix, with
    the exception of the config headers ({opal,orte,ompi}_config.h
    mpi.h, and mpif.h)

This commit was SVN r8985.
2006-02-12 01:33:29 +00:00
George Bosilca
9c1547373d Match the latest changes in the datatype engine.
This commit was SVN r8967.
2006-02-10 21:06:15 +00:00
Brian Barrett
ec7b60d501 * Fix some error checking code for Lock / Unlock at the MPI layer
* Implement win_lock and win_unlock in the pt2pt component.  Not well
  tested, but appears to move bits if properly motivated...

This commit was SVN r8922.
2006-02-07 18:45:18 +00:00
George Bosilca
e20265bd2b Dont let any external to the data-type code check directly for the predefined
data-types. Instead, use the newly provided data-type function ompi_ddt_is_predefined..

This commit was SVN r8903.
2006-02-06 18:01:45 +00:00
Brian Barrett
514e58c49a * pass an ompi_win_t, not an ompi_win_t*
This commit was SVN r8866.
2006-01-31 23:08:26 +00:00
Brian Barrett
44a516d966 * Clean up error checking in the MPI interface for MPI-2 onesided
* Implement fortran handle -> c handle tracking
* Remove some unneeded locking around free lists (the free list
  macros do their own locking)
* Try to be a bit more memory friendly with the w_mode setting /
  checking

This commit was SVN r8865.
2006-01-31 21:40:12 +00:00
Brian Barrett
0d507ad970 * Fix a bunch of checks for proper access / exposure epochs
* Add implementation of Post/Wait/Start/Complete synchronization

This commit was SVN r8848.
2006-01-31 02:44:08 +00:00
Brian Barrett
b1d2424013 Merge in present work on the MPI-2 onesided chapter. The current code is not
complete, but stable enough that it will have no impact on general development,
so into the trunk it goes.  Changes in this commit include:

 - Remove the --with option for disabling MPI-2 onesided support.  It
   complicated code, and has no real reason for existing
 - add a framework osc (OneSided Communication) for encapsulating
   all the MPI-2 onesided functionality
 - Modify the MPI interface functions for the MPI-2 onesided chapter
   to properly call the underlying framework and do the required
   error checking
 - Created an osc component pt2pt, which is layered over the BML/BTL
   for communication (although it also uses the PML for long message
   transfers).  Currently, all support functions, all communication
   functions (Put, Get, Accumulate), and the Fence synchronization
   function are implemented.  The PWSC active synchronization
   functions and Lock/Unlock passive synchronization functions are
   still not implemented

This commit was SVN r8836.
2006-01-28 15:38:37 +00:00
Rainer Keller
9b2c23bead - Do additional checks in case of MPI_PARAM_CHECK for NULL pointers.
This commit was SVN r8487.
2005-12-13 08:13:13 +00:00
Brian Barrett
a46d0d3801 Add support to Open MPI for MPI_Register_datarep, as ROMIO now has support for the
functionality.  This is a global registration, so all components have to be made
aware of the registration -- therefore, do things at the component level, not the
module level.

This commit was SVN r8314.
2005-11-29 18:25:35 +00:00
George Bosilca
55051b81c4 Activate the protection against unavailable datatypes. They get a flag DT_FLAG_UNAVAILABLE. We check now this flag in all the send/recv operations via the macros on mpi/c/bindings.h.
This flag is inherited by all datatypes create with unavailable datatypes. Basically, we let the user create the wrong datatype but we dont let him using it for any pt2pt communications or any pack/unpack.

This commit was SVN r8069.
2005-11-09 23:43:41 +00:00
Brian Barrett
28891d6de3 * Move MPI_Wtime and MPI_Wtick back out of mpi.h and into the C bindings library,
restoring the PMPI version.  A variety of reasons for this:

  - mpi.h was blinding using inline in a C header without the configrue mojo
    properly set it, as mpi.h doesn't include ompi_config.h.  This eventually
    would have caused a borked build.
  - mpi.h and mpif.h were never updated to not include PMPI_W{tick,time} as
    a proper prototype
  - The C++ and F90 bindings didn't do the right things when there was no
    PMPI version of the C call, but profiling was enabled
  - Since we only use gettimeofday, the function call overhead really doesn't
    matter

This should probably go to the 1.0 branch

This commit was SVN r8014.
2005-11-07 17:22:48 +00:00
Jeff Squyres
42ec26e640 Update the copyright notices for IU and UTK.
This commit was SVN r7999.
2005-11-05 19:57:48 +00:00
Jeff Squyres
7bdfe6557b - Update the checks in REDUCE, ALLREDUCE, SCAN, EXSCAN, and
REDUCE_SCATTER to more thoroughly check the datatype/op combination
  to see if it's valid or not.  If it's not, print a meaningful error
  message rather than "Invalid MPI_Op" indicating what specifically
  was wrong (therefore hopefully helping users track down where in the
  code the problem is, and/or telling us that there's a reduction
  operation combo that we don't support that we should)
- The check for whether a datatype is intrinsic needed to be updated
  -- it's not sufficient to check that dtype->id < DT_MAX_PREDEFINED;
  you really need to check the PREDEFINED flag on the datatype.
  Thanks to George for this fix (only intrinsics have a meaningful
  value in dtype->id).

This commit was SVN r7923.
2005-10-28 16:47:32 +00:00
Jeff Squyres
23ab9e0277 A better solution to the previous commit -- RETAIN/RELEASE the MPI_Op
at the top-level MPI API function.  This allows two kinds of
scenarios:

1. MPI_Ireduce(..., op, ...);
   MPI_Op_free(op);
   MPI_Wait(...);

For the non-blocking collectives that we're someday planning -- to
make them analogous to non-blocking point-to-point stuff.

2. Thread 1:
   MPI_Reduce(..., op, ...);
   Thread 2:
   MPI_Op_free(op);

Granted, for #2 to occur would tread a fine line between a correct and
erroneous MPI program, but it is possible (as long as the Op_free was
*after* MPI_reduce() had started to execute).  It's more realistic
with case #1, where the Op_free() could be executed in the same thread
or a different thread.

This commit was SVN r7870.
2005-10-25 19:20:42 +00:00
Jeff Squyres
e097ee635a Silence compiler warnings.
This commit was SVN r7768.
2005-10-14 22:06:25 +00:00
Edgar Gabriel
2c909383bb abstracting the group_free operation into an internal routine (required
by some other components on ompi).

This commit was SVN r7763.
2005-10-14 18:51:20 +00:00
Jeff Squyres
94bab558dd Put in a check to ensure the root is valid (all other rooted
operations have this; we somehow missed this for intracomms on reduce,
and it bit me this morning ;-) )

This commit was SVN r7612.
2005-10-04 14:38:17 +00:00
Tim Woodall
aceab46c5f use MPI_Alloc_mem/MPI_Free_mem for internally allocated buffers
This commit was SVN r7487.
2005-09-22 16:43:17 +00:00
Brian Barrett
c87babb565 * if start_rank == end_rank, there doesn't seem to be a requirement that
stride == 1, and the Intel tests explicitly test the case with
  strides != 1, expecting them to work

This commit was SVN r7411.
2005-09-16 18:44:21 +00:00
George Bosilca
789d49d613 Activate thread support ... at least at the MPI level.
This commit was SVN r7386.
2005-09-15 15:44:12 +00:00
Jeff Squyres
b8f4f88ccc Ignore sendtype/sendcount if MPI_IN_PLACE
This commit was SVN r7361.
2005-09-14 01:44:55 +00:00
Jeff Squyres
15f5294da4 Ignore another param in the IN_PLACE case
This commit was SVN r7348.
2005-09-13 19:15:01 +00:00
Jeff Squyres
c89e8c3712 Fixes for error checking -- properly ignore arguments as they should
be

This commit was SVN r7347.
2005-09-13 19:07:13 +00:00
Jeff Squyres
ad647b105d Error checking for MPI_IN_PLACE
This commit was SVN r7343.
2005-09-13 17:07:03 +00:00
George Bosilca
71b1cdb5f5 Cleanup the dependencies between the MPI layer and the rest of the ompi files.
Modify the includes to start with the root directory (i.e orte/datatype/datatype.h).

This commit was SVN r7306.
2005-09-12 09:17:44 +00:00
Brian Barrett
ed56e743b7 * update configure.ac to use the modern version of AC_INIT and
AM_INIT_AUTOMAKE, instead of the deprecated version.
* Work around dumbness in modern AC_INIT that requires the version
  number to be set at autoconf time (instead of at configure time, as
  it was before).  Set the version number, minus the subversion r number,
  at autoconf time.  Override the internal variables to include the r
  number (if needed) at configure time.  Basically, the right thing
  should always happen.  The only place it might not is the version
  reported as part of configure --help will not have an r number.
* Since AM_INIT_AUTOMAKE taks a list of options, no need to specify
  them in all the Makefile.am files.
* Addes support for subdir-objects, meaning that object files are put
  in the directory containing source files, even if the Makefile.am is
  in another directory.  This should start making it feasible to
  reduce the number of Makefile.am files we have in the tree, which
  will greatly reduce the time to run autogen and configure.

This commit was SVN r7211.
2005-09-07 05:54:53 +00:00
Rainer Keller
605e13baf4 - Just a comment to circumvent warning in check.
This commit was SVN r6933.
2005-08-19 10:38:08 +00:00
Jeff Squyres
9b7c1ca97a Forgot to include the check for 0 in the Allreduce case (already got
Reduce and Reduce_scatter)

This commit was SVN r6929.
2005-08-18 19:39:45 +00:00
Jeff Squyres
e8c103ac1f Make MPI_REDUCE and MPI_REDUCE_SCATTER return MPI_SUCCESS immediately
if the count/sum of counts is 0.  This is technically in violation of
the MPI-1 standard, but...  :-(

This commit was SVN r6914.
2005-08-17 15:34:33 +00:00
Jeff Squyres
c465eb8567 Rename opal/threads/thread.h -> opal/threads/threads.h to avoid a
naming conflict with Solaris' <thread.h>

This commit was SVN r6879.
2005-08-15 11:02:01 +00:00
Brian Barrett
f273d84b1b * update ob1 to direct call
* don't know what I was thinking, but can't use the MCA_PML_CALL macro on
  the two data values, as they don't have things that the macro can
  expand into

This commit was SVN r6868.
2005-08-14 03:14:20 +00:00
Jeff Squyres
cf16a521c8 Ensure to get ompi/include/constants.h
This commit was SVN r6845.
2005-08-12 21:42:07 +00:00
Brian Barrett
95fd068ffa remove hard coded constants for value of MPI_TAG_UB and the max CID and add
the values to the PML structure.  This will allow PMLs that want to do
hardware matching at the cost of a smaller range of valid tags and cids.
Updated all the places that used the MPI_TAG_UB_VALUE constant to instead
look at the pml struct.

This commit was SVN r6778.
2005-08-09 14:56:04 +00:00
Rainer Keller
f5f96f424d - Use for-loop
- Minor heck for stride != 1
- indenting

This commit was SVN r6715.
2005-08-02 19:56:18 +00:00
Rainer Keller
15c4ae3391 Fix for buglet #1423.
Any non-blocking P2P function should set the request to something else
then MPI_REQUEST_NULL, when passed a source/dest of MPI_PROC_NULL.

Introduce a new ompi_request_empty, which returns the
MPI_SOURCE=MPI_PROC_NULL, MPI_TAG=MPI_ANY_TAG, count=0 as specified by
the MPI-standard.

This commit was SVN r6611.
2005-07-27 01:00:02 +00:00
Edgar Gabriel
213be28613 minor fixes to make the trunk compile, if ompi has been configured with the --enable-mpi2-one-sided option
This commit was SVN r6518.
2005-07-15 13:53:10 +00:00
George Bosilca
a7aa1a76bc Correctly use the new convertor. Now we have 2 generic predefined convertors. One is for
the external32 conversions (as specified in the MPI standard) the other one is the local
convertor that can be used for MPI_Pack and MPI_Unpack functions.

This commit was SVN r6375.
2005-07-07 23:00:55 +00:00
Brian Barrett
170ef8af1f * rename ompi_show_help to opal_show_help
* rename ompi_stacktrace to opal_stacktrace
* rename ompi_strncpy to opal_strncpy

This commit was SVN r6336.
2005-07-04 02:38:44 +00:00
Brian Barrett
39dbeeedfb * rename locking code from ompi to opal
This commit was SVN r6327.
2005-07-03 22:45:48 +00:00
Brian Barrett
ccd2624e3f * rename ompi_progress to opal_progress
This commit was SVN r6326.
2005-07-03 21:57:43 +00:00
Brian Barrett
9da0b4fe1d * rename all the atomic functions from ompi to opal
This commit was SVN r6325.
2005-07-03 21:38:51 +00:00
Brian Barrett
761402f95f * rename ompi_list to opal_list
This commit was SVN r6322.
2005-07-03 16:22:16 +00:00
Brian Barrett
499e4de1e7 * rename ompi_object and ompi_class to opal_object and opal_class
This commit was SVN r6321.
2005-07-03 16:06:07 +00:00
Jeff Squyres
35c141aef6 While we're moving directories around, move ompi/mpi/runtime ->
ompi/runtime, for consistency and parallel-ness will orte/runtime.
Also remove a few useless #includes along the way.

This commit was SVN r6317.
2005-07-03 12:07:29 +00:00
Brian Barrett
e984f48ad9 * add missing Makefile to configure output
* Fix MPI profiling layer symlink code from src -> ompi
* Change some modex includes

This commit was SVN r6309.
2005-07-02 17:32:01 +00:00
Jeff Squyres
aa056f7bfd First cut of OMPI Makefile.am's, plus a few more catchup updates in orte
This commit was SVN r6286.
2005-07-02 15:06:47 +00:00
Jeff Squyres
4ab17f019b Rename src -> ompi
This commit was SVN r6269.
2005-07-02 13:43:57 +00:00