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

375 Коммитов

Автор SHA1 Сообщение Дата
George Bosilca
5ff74babc6 Correctly use remote size where necessary. Completements the
patches for ticket #3105.

This commit was SVN r26490.
2012-05-24 13:41:51 +00:00
Jeff Squyres
4bda5da63a Similar to r26488, also update the param error checking for
REDUCE_SCATTER, SCATTERV, and GATHERV.  Thanks to the mpi4py community
for reporting the issue.

This commit was SVN r26489.

The following SVN revision numbers were found above:
  r26488 --> open-mpi/ompi@42793aa10f
2012-05-24 13:26:44 +00:00
Jeff Squyres
42793aa10f As reported by the mpi4py community (Bennet Fauber, Lisandro Dalcin,
Jonathan Dursi), fix a bug in the parameter verification of
MPI_ALLGATHERV: ensure to use the ''remote'' group size when checking
the recvcounts array.

This commit was SVN r26488.
2012-05-24 10:25:21 +00:00
Jeff Squyres
4b047c4257 Fix typos in the memchecker sections of MPI_IMRECV and MPI_MRECV, and
define the missing function memchecker_message().

Thanks to MTT for catching these errors.

This commit was SVN r26314.
2012-04-23 21:10:19 +00:00
Jeff Squyres
253444c6d0 == Highlights ==
1. New mpifort wrapper compiler: you can utilize mpif.h, use mpi, and use mpi_f08 through this one wrapper compiler
 1. mpif77 and mpif90 still exist, but are sym links to mpifort and may be removed in a future release
 1. The mpi module has been re-implemented and is significantly "mo' bettah"
 1. The mpi_f08 module offers many, many improvements over mpif.h and the mpi module

This stuff is coming from a VERY long-lived mercurial branch (3 years!); it'll almost certainly take a few SVN commits and a bunch of testing before I get it correctly committed to the SVN trunk.

== More details ==

Craig Rasmussen and I have been working with the MPI-3 Fortran WG and Fortran J3 committees for a long, long time to make a prototype MPI-3 Fortran bindings implementation.  We think we're at a stable enough state to bring this stuff back to the trunk, with the goal of including it in OMPI v1.7.  

Special thanks go out to everyone who has been incredibly patient and helpful to us in this journey:

 * Rolf Rabenseifner/HLRS (mastermind/genius behind the entire MPI-3 Fortran effort)
 * The Fortran J3 committee
 * Tobias Burnus/gfortran
 * Tony !Goetz/Absoft
 * Terry !Donte/Oracle
 * ...and probably others whom I'm forgetting :-(

There's still opportunities for optimization in the mpi_f08 implementation, but by and large, it is as far along as it can be until Fortran compilers start implementing the new F08 dimension(..) syntax.

Note that gfortran is currently unsupported for the mpi_f08 module and the new mpi module.  gfortran users will a) fall back to the same mpi module implementation that is in OMPI v1.5.x, and b) not get the new mpi_f08 module.  The gfortran maintainers are actively working hard to add the necessary features to support both the new mpi_f08 module and the new mpi module implementations.  This will take some time.

As mentioned above, ompi/mpi/f77 and ompi/mpi/f90 no longer exist.  All the fortran bindings implementations have been collated under ompi/mpi/fortran; each implementation has its own subdirectory:

{{{
ompi/mpi/fortran/
  base/               - glue code
  mpif-h/             - what used to be ompi/mpi/f77
  use-mpi-tkr/        - what used to be ompi/mpi/f90
  use-mpi-ignore-tkr/ - new mpi module implementation
  use-mpi-f08/        - new mpi_f08 module implementation
}}}

There's also a prototype 6-function-MPI implementation under use-mpi-f08-desc that emulates the new F08 dimension(..) syntax that isn't fully available in Fortran compilers yet.  We did that to prove it to ourselves that it could be done once the compilers fully support it.  This directory/implementation will likely eventually replace the use-mpi-f08 version.

Other things that were done:

 * ompi_info grew a few new output fields to describe what level of Fortran support is included
 * Existing Fortran examples in examples/ were renamed; new mpi_f08 examples were added
 * The old Fortran MPI libraries were renamed:
   * libmpi_f77 -> libmpi_mpifh
   * libmpi_f90 -> libmpi_usempi
 * The configury for Fortran was consolidated and significantly slimmed down.  Note that the F77 env variable is now IGNORED for configure; you should only use FC. Example:
{{{
shell$ ./configure CC=icc CXX=icpc FC=ifort ...
}}}

All of this work was done in a Mercurial branch off the SVN trunk, and hosted at Bitbucket.  This branch has got to be one of OMPI's longest-running branches.  Its first commit was Tue Apr 07 23:01:46 2009 -0400 -- it's over 3 years old!  :-)  We think we've pulled in all relevant changes from the OMPI trunk (e.g., Fortran implementations of the new MPI-3 MPROBE stuff for mpif.h, use mpi, and use mpi_f08, and the recent Fujitsu Fortran patches).

I anticipate some instability when we bring this stuff into the trunk, simply because it touches a LOT of code in the MPI layer in the OMPI code base.  We'll try our best to make it as pain-free as possible, but please bear with us when it is committed.

This commit was SVN r26283.
2012-04-18 15:57:29 +00:00
Ralph Castain
5f5c23e3e5 Fix comm_join by ensuring the two processes figure out which will send_first and which will recv first.
This commit was SVN r26257.
2012-04-09 22:14:14 +00:00
Ralph Castain
bd8b4f7f1e Sorry for mid-day commit, but I had promised on the call to do this upon my return.
Roll in the ORTE state machine. Remove last traces of opal_sos. Remove UTK epoch code.

Please see the various emails about the state machine change for details. I'll send something out later with more info on the new arch.

This commit was SVN r26242.
2012-04-06 14:23:13 +00:00
Eugene Loh
dffc1c5d43 The copyright notices that should have been in r26156.
This commit was SVN r26157.

The following SVN revision numbers were found above:
  r26156 --> open-mpi/ompi@e1f5c0125f
2012-03-16 04:59:58 +00:00
Eugene Loh
e1f5c0125f r26138 provided quick returns for count==0 for
[test|wait][all|any|some].  Here, set output values as well.
http://www.open-mpi.org/community/lists/users/2012/03/18790.php

This commit was SVN r26156.

The following SVN revision numbers were found above:
  r26138 --> open-mpi/ompi@1e92bc0fd1
2012-03-15 22:02:46 +00:00
Jeff Squyres
1e92bc0fd1 Per request from Jeremiah Willcock, support the array-based MPI_TEST
and MPI_WAIT functions with a count of 0 (i.e., just return SUCCESS
and don't do anything).

This commit was SVN r26138.
2012-03-14 14:36:04 +00:00
Josh Hursey
4630c4060c Abstract MPI_Group_compare to an OMPI function for internal use (point the MPI interface to the internal function).
Fix a typo in group_init.c

This commit was SVN r26118.
2012-03-08 21:57:45 +00:00
Jeff Squyres
359c575345 Fix a few missed cases with MPROBE and friends.
This commit was SVN r26116.
2012-03-08 19:43:08 +00:00
Jeff Squyres
91b80630aa Update MPROBE, IMPROBE, MRECV, IMRECV with the behavior described in
MPI-3 ticket 328:
https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/328.  Add
MPI_MESSAGE_NO_PROC constant.

This commit was SVN r26115.
2012-03-08 13:27:01 +00:00
George Bosilca
af9b6f6161 Minor beautification.
This commit was SVN r26095.
2012-03-05 13:23:54 +00:00
Ralph Castain
30ab3b2332 Ensure we don't segfault if comm_spawn_multiple fails as it returns a NULL pointer to the new communicator when that happens. Thanks to Yuki MATSUMOTO of Fujitsu for the patch.
cmr:v1.6

This commit was SVN r25886.
2012-02-09 15:59:49 +00:00
Jeff Squyres
092448f19e Doh! Waiting for the test compile to finish ''before'' committing
reduces the potential for silly typos like this.  :-(

This commit was SVN r25870.
2012-02-07 15:27:50 +00:00
Jeff Squyres
3c3994ede9 Ensure PMPI_Message_c2f and PMPI_Message_f2c are compiled.
This commit was SVN r25869.
2012-02-07 15:22:19 +00:00
Brian Barrett
25d48e22fa Implementation of the MPI-3 Matched Probe functionality. Currently only
implemented in the OB1 PML, will return NOT_SUPPORTED in other PMLs.

This commit was SVN r25865.
2012-02-06 17:35:21 +00:00
Jeff Squyres
feb8eb8a90 Add the new MPI-3 function MPI_GET_LIBRARY_VERSION.
This commit was SVN r25860.
2012-02-02 23:57:09 +00:00
George Bosilca
a9511779a6 Combined patch from Fujitsu. Fixes a collections of typos over the
code and man pages.
cmr:v1.4:reviewer=jsquyres and cmr:v1.5:reviewer=jsquyres

This commit was SVN r25781.
2012-01-26 04:22:00 +00:00
Jeff Squyres
5164d89815 Rename "index" parameters to "idx" so that picky compilers shut up
about "index" shadowing a global symbol name (i.e., the function
index()).  And remove an unused #define.

This commit was SVN r25750.
2012-01-20 02:06:21 +00:00
Brian Barrett
b2411fe131 Add support for MPI-3's MPI_COMM_SPLIT_TYPE function
This commit was SVN r25738.
2012-01-18 23:35:21 +00:00
Jeff Squyres
6fbbfd0f7a Gah! r25545 acidentally included ''waaaay'' more stuff than it was
supposed to.  I.e., half-baked/not complete stuff.

This commit backs out all of r25545.  Sorry folks!

This commit was SVN r25546.

The following SVN revision numbers were found above:
  r25545 --> open-mpi/ompi@7f9ae11faf
2011-11-29 23:24:52 +00:00
Jeff Squyres
7f9ae11faf Per http://www.open-mpi.org/community/lists/users/2011/11/17862.php,
to make MPI_IN_PLACE (and other sentinel Fortran constants) work on OS
X, we need to use the following compiler (linker) flag:

    -Wl,-commons,use_dylibs 

So if we're compiling on OS X, test to see if that flag works with the
compiler.  If so, add it to the wrapper FFLAGS and FCFLAGS (note that
per a future update, we'll only have one Fortran compiler anyway).

Fixes trac:1982.  

This commit was SVN r25545.

The following Trac tickets were found above:
  Ticket 1982 --> https://svn.open-mpi.org/trac/ompi/ticket/1982
2011-11-29 23:05:54 +00:00
Christopher Yeoh
bab59bda76 Fixes trac:2767: Recursive locking when ROMIO used with THREAD_MULITPLE
This commit was SVN r24681.

The following Trac tickets were found above:
  Ticket 2767 --> https://svn.open-mpi.org/trac/ompi/ticket/2767
2011-05-04 06:31:42 +00:00
George Bosilca
79b13f36ba darray and subarray are now first class citizens in Open MPI. They can be stored
in packed form and reloaded, as any other type (this is mainly for one sided).

This commit was SVN r24480.
2011-03-02 19:22:24 +00:00
George Bosilca
27fecda12c Allow the one sided components to correctly retrieve the op to
be applied. Correct the MPI validation process of the
MPI_Accumulate arguments.

Fix another potential problem not yet reported. If we convert the
MPI datatypes direclty into OPAL datatypes, we will restrict their
number to the locally different types. Which might not be identical
on the remote node, if we are in a heterogeneous environment. So,
for MPI One sided only deal with MPI level types, never simplify
them on OPAL types (at least on the args). The unfortunate
outcome is that we need to create the args for all datatypes.

This commit was SVN r24466.
2011-02-25 20:43:17 +00:00
Josh Hursey
2bdff63e6f move the INIT to after the error handler, so it matches MPI_INIT. Thanks to Jeff for catching this
This commit was SVN r24200.
2011-01-03 18:16:53 +00:00
Josh Hursey
0b514e234b MPI_Init_thread is used in place of MPI_Init, so for the checkpoint/restart functionality it must correctly init the C/R functionality instead of simply making a critical section. This allows the C/R thread to be started properly.
Thanks to Takayuki Seki for finding this bug.

This commit was SVN r24194.
2010-12-29 15:37:30 +00:00
Brian Barrett
621344cce4 Remove duplicate DT tests
This commit was SVN r24189.
2010-12-20 23:38:36 +00:00
Shiqing Fan
ba2dbff82d Check for addressability in MPI_*_init, since buffer passed by the application should have been already allocated, but might be not initialized.
Check in MPI_Start / MPI_Startall for defined-ness of the buffer passed into the send request(s).

This commit was SVN r24054.
2010-11-16 01:01:12 +00:00
Shiqing Fan
066d5fb9d7 The standard does not imply that the contents of the buffer should be defined/addressable at this point. Remove the buffer checks in these functions.
This commit was SVN r23988.
2010-11-03 09:36:24 +00:00
Ralph Castain
fceabb2498 Update libevent to the 2.0 series, currently at 2.0.7rc. We will update to their final release when it becomes available. Currently known errors exist in unused portions of the libevent code. This revision passes the IBM test suite on a Linux machine and on a standalone Mac.
This is a fairly intrusive change, but outside of the moving of opal/event to opal/mca/event, the only changes involved (a) changing all calls to opal_event functions to reflect the new framework instead, and (b) ensuring that all opal_event_t objects are properly constructed since they are now true opal_objects.

Note: Shiqing has just returned from vacation and has not yet had a chance to complete the Windows integration. Thus, this commit almost certainly breaks Windows support on the trunk. However, I want this to have a chance to soak for as long as possible before I become less available a week from today (going to be at a class for 5 days, and thus will only be sparingly available) so we can find and fix any problems.

Biggest change is moving the libevent code from opal/event to a new opal/mca/event framework. This was done to make it much easier to update libevent in the future. New versions can be inserted as a new component and tested in parallel with the current version until validated, then we can remove the earlier version if we so choose. This is a statically built framework ala installdirs, so only one component will build at a time. There is no selection logic - the sole compiled component simply loads its function pointers into the opal_event struct.

I have gone thru the code base and converted all the libevent calls I could find. However, I cannot compile nor test every environment. It is therefore quite likely that errors remain in the system. Please keep an eye open for two things:

1. compile-time errors: these will be obvious as calls to the old functions (e.g., opal_evtimer_new) must be replaced by the new framework APIs (e.g., opal_event.evtimer_new)

2. run-time errors: these will likely show up as segfaults due to missing constructors on opal_event_t objects. It appears that it became a typical practice for people to "init" an opal_event_t by simply using memset to zero it out. This will no longer work - you must either OBJ_NEW or OBJ_CONSTRUCT an opal_event_t. I tried to catch these cases, but may have missed some. Believe me, you'll know when you hit it.

There is also the issue of the new libevent "no recursion" behavior. As I described on a recent email, we will have to discuss this and figure out what, if anything, we need to do.

This commit was SVN r23925.
2010-10-24 18:35:54 +00:00
Jeff Squyres
73bcc4a36b Fix mistake that came in via the ompi-agen tree in r23764. The mistake wasn't part of the core autogen upgrade; it was an additional 'bonus' cleanup. Oops. The mistake will always create a set of directories under installdir, even if you do not --with-devel-headers. The set of directories will be empty, but still -- they should not be there at all. This commit fixes that -- the directories are not created at all if you do not --with-devel-headers
This commit was SVN r23801.

The following SVN revision numbers were found above:
  r23764 --> open-mpi/ompi@40a2bfa238
2010-09-24 22:53:28 +00:00
Ralph Castain
40a2bfa238 WARNING: Work on the temp branch being merged here encountered problems with bugs in subversion. Considerable effort has gone into validating the branch. However, not all conditions can be checked, so users are cautioned that it may be advisable to not update from the trunk for a few days to allow MTT to identify platform-specific issues.
This merges the branch containing the revamped build system based around converting autogen from a bash script to a Perl program. Jeff has provided emails explaining the features contained in the change.

Please note that configure requirements on components HAVE CHANGED. For example. a configure.params file is no longer required in each component directory. See Jeff's emails for an explanation.

This commit was SVN r23764.
2010-09-17 23:04:06 +00:00
Rolf vandeVaart
0324fdb407 Created two new macros that are used when filling in either the
status structure or the _ucount field in the status structure.
On 64-bit sparc, the macros resolve into integer array assignments.
For all others, they are just simple assignments.  This fixes 
possible BUS errors seen when running on the SPARC processor.
This bug was introduced when the _count field changed from an int
into a size_t.  See the changes to request.h for additional details.

This commit fixes trac:2514.

This commit was SVN r23554.

The following Trac tickets were found above:
  Ticket 2514 --> https://svn.open-mpi.org/trac/ompi/ticket/2514
2010-08-04 19:36:40 +00:00
Jeff Squyres
51a051b072 This commit, along with r23467, r23468, r23470, r23471 should fix #2241.
This commit:

 * Adds the configury to figure out how many Fortran INTEGERs are 
   necessary to represent the C MPI_Status (which now includes a size_t
   member).
 * Sets MPI_STATUS_SIZE to this value in mpif-config.h.in.
 * Adds a big comment in status_c2f.c explaining why the no changes 
   were necessary to how we copy statuses between Fortran and C.

This commit was SVN r23472.

The following SVN revision numbers were found above:
  r23467 --> open-mpi/ompi@733d25a8a3
  r23468 --> open-mpi/ompi@963fcb13a5
  r23470 --> open-mpi/ompi@418b989781
  r23471 --> open-mpi/ompi@bc74a446ac
2010-07-22 02:23:47 +00:00
Jeff Squyres
418b989781 Divide by size, not status->_count. Gives a much better answer. :-)
This commit was SVN r23470.
2010-07-22 01:53:01 +00:00
Jeff Squyres
963fcb13a5 If the value to be returned is larger than what can be represented in
the count parameter, then invoke MPI_ERR_TRUNCATE.

This commit was SVN r23468.
2010-07-22 01:15:46 +00:00
George Bosilca
733d25a8a3 First step toward fixing the MPI_Get_count issues from the ticket #2241. Next
step is the configure and Fortran mojo that Jeff will put in. Until then I
guess the Fortran interface is broken (at least all functions using the hidden
count firld in the MPI_Status).

This commit was SVN r23467.
2010-07-21 20:07:00 +00:00
Jeff Squyres
0061f2170d ompi/mpi/c/request_get_status.c (MPI_Request_get_status): If
opal_progress is called then check the status of the request before
returning. opal_progress is called only once.  This logic parallels
MPI_Test (ompi_request_default_test).

Thanks to Shaun Jackman for submitting the patch.

This commit was SVN r23215.
2010-05-27 21:37:11 +00:00
Edgar Gabriel
5881719d84 checks for sendcount and recvcount(s) being zero have slightly different
consequences depending on whether the communicator is an intra or an inter
communicator. 

fixes trac:2415

This commit was SVN r23187.

The following Trac tickets were found above:
  Ticket 2415 --> https://svn.open-mpi.org/trac/ompi/ticket/2415
2010-05-20 22:21:26 +00:00
Abhishek Kulkarni
afbe3e99c6 * Wrap all the direct error-code checks of the form (OMPI_ERR_* == ret) with
(OMPI_ERR_* = OPAL_SOS_GET_ERR_CODE(ret)), since the return value could be a
 SOS-encoded error. The OPAL_SOS_GET_ERR_CODE() takes in a SOS error and returns
 back the native error code.

* Since OPAL_SUCCESS is preserved by SOS, also change all calls of the form
  (OPAL_ERROR == ret) to (OPAL_SUCCESS != ret). We thus avoid having to
  decode 'ret' to get the native error code.

This commit was SVN r23162.
2010-05-17 23:08:56 +00:00
Ralph Castain
b400b84162 Merge in the modified thread configure option branch per today's telecon.
Remove the --enable-progress-threads option as this is no longer functional, and hardcode OPAL_ENABLE_PROGRESS_THREADS to 0.

Replace the --enable-mpi-threads option with --enable-mpi-thread-multiple as this is clearer as to meaning. This option automatically turns "on" opal thread support if it wasn't already so specified. If the user specifies --disable-opal-multi-threads --enable-mpi-thread-multiple, we will error out with a message

Add a new --enable-opal-multi-threads option that turns "on" opal thread support without doing anything wrt mpi-thread-multiple

This commit was SVN r22841.
2010-03-16 23:10:50 +00:00
Jeff Squyres
7b3ac4fb73 Refs trac:2273
After talking to both Brian and George, the conensus was to just
remove the flag and the test function.  Begone, evil spirits, BEGONE!

This commit was SVN r22831.

The following Trac tickets were found above:
  Ticket 2273 --> https://svn.open-mpi.org/trac/ompi/ticket/2273
2010-03-16 00:47:10 +00:00
Christopher Yeoh
27cc40e412 Fixes MPI errhandler set races
See #2103 for details

This commit was SVN r22300.
2009-12-14 03:38:01 +00:00
Jeff Squyres
12520ca711 Just like we relaxed the error checking for MPI_CART_CREATE (r21816),
we should have also relaxed the error checking for MPI_GRAPH_CREATE.
Thanks to David Singleton for pointing this out.

This commit was SVN r22251.

The following SVN revision numbers were found above:
  r21816 --> open-mpi/ompi@b8332ea2b2
2009-12-01 21:50:39 +00:00
Brian Barrett
b57b8c5b3f Clean up request handling in the I/O framework to be more consistent with
other request-using frameworks.

 - Rather than having mpi/c/* functions allocate requests explicitly,
   pass the MPI_Request* down to the I/O component and have it 
   perform the allocation.
 - While the I/O base provides a base request which can be used,
   it is not required and all request management occurs within
   the component.
 - Push progress management into the component, rather than having it
   happen in the base.  Progress functions are now easily registered,
   and not all (ie, the one existing) components use progress functions
   in any rational way.

ROMIO switched to generalized requests instead of MPIO_Requests many
moons ago, and Open MPI now uses ROMIO's generalized requests, so there
is no reason to wrap those requests (which are OMPI requests) in another
level of request.

Now the file function passes the MPI_Request* to the ROMIO component,
which passes it to the underlying ROMIO function, which calls 
MPI_Grequest_start to create an OMPI request, which is what gets set
as the request to the user.  Much cleaner.

This patch has two motivations.  One, a whole heck of a lot of code
just got removed, and request handling is now much cleaner for I/O
components.  Two, by adding support for Argonne's proposed generalized
request extensions, we can allow ROMIO to provide async I/O through
generalized requests, which we couldn't rationally do in the old
setup due to the crazy request completion rules.

This commit was SVN r22235.
2009-11-26 05:13:43 +00:00
Jeff Squyres
ac21b4f571 Make MPI_GROUP_INCL|EXCL and MPI_GROUP_TRANSLATE_RANKS a bit more
social when array_size==0 is passed in.  Thanks to Lisandro Dalcin for
pointing this out.

This commit was SVN r22144.
2009-10-26 21:32:15 +00:00
Jeff Squyres
bf6e3d4355 Fixes trac:2061: add MPI_OP_COMMUTATIVE.
This commit was SVN r22128.

The following Trac tickets were found above:
  Ticket 2061 --> https://svn.open-mpi.org/trac/ompi/ticket/2061
2009-10-22 21:46:05 +00:00
Jeff Squyres
c78df0d1b4 Fixes trac:2060: MPI-2.2 ticket 7, convert some function pointer typedefs
from "MPI_*_errhandler_fn" to "MPI_*_errhandler_function" (and their
corresponding C++ types, too).  Also updated the corresponding man
pages, and marked the typedefs to the now-deprecated types as
deprecated.

This commit was SVN r22122.

The following Trac tickets were found above:
  Ticket 2060 --> https://svn.open-mpi.org/trac/ompi/ticket/2060
2009-10-22 16:50:45 +00:00
Jeff Squyres
c4f2db926f Add missing semicolons. Wow.
This commit was SVN r22079.
2009-10-08 19:50:19 +00:00
Terry Dontje
0828945eea Fix an issue with #2048 fix that did not goto the error case.
This commit was SVN r22076.
2009-10-08 13:27:32 +00:00
Terry Dontje
58c864699c This commit fixes trac:2048
This commit was SVN r22075.

The following Trac tickets were found above:
  Ticket 2048 --> https://svn.open-mpi.org/trac/ompi/ticket/2048
2009-10-08 12:54:53 +00:00
Jeff Squyres
bc3060d668 Fixes trac:2028. George and I found this via some collaborative debugging
(yay cisco webex!).  Make sure we only go up to OPAL max datatype, not
OMPI max datatype.

This commit was SVN r22016.

The following Trac tickets were found above:
  Ticket 2028 --> https://svn.open-mpi.org/trac/ompi/ticket/2028
2009-09-25 21:52:42 +00:00
George Bosilca
56c653ebcd Add some comments.
This commit was SVN r22008.
2009-09-24 00:08:28 +00:00
Edgar Gabriel
9abeaad6e2 so here is what happens:
in the v1.2 series the cid's could never go above the max. allowed for a
particular pml. Because of that, pml_add_comm never checked for the cid, and
in fact pml_add_comm was called in comm_set, which is *before* we knew the
cid.

in the v1.3 series (and trunk) we check now the cid to detect overflow, and
because of that pml_add_comm has been moved *after* the cid allocation
routine, namely into the comm_activate routine.

in the v1.2 series, the comm_activate contained a synchronization step of the
old communicator in order to prevent incoming fragments on the new
communicator, with the main problem being that the allreduce in the
communicator allocation finished at different times on different processes,
and thus, this scenario could and did really occur.

in the v1.3 series, the comm_activate does not contain the synchronization
step anymore, since we introduced the new queue for fragments with unknown
cid. The problem is however, that whether a fragment is known or not is
decided by using ompi_comm_lookup(), which will return something useful as
soon as the cid allocation finished, even before pml_add_comm has been
called. So there is a small time gap where we will not post a message into
queue for unknown cid's, but we can also not look up the process structure
belonging to the rank in that comm ( that is in pml_ob1_match_recv_frag or
something like that). 


The current fix reintroduces the synchronization step in comm_activate, and
ensures that no fragment can be received for a new communicator before the
synchronization occurs , and thus comm_nextcid() and pml_add_comm has been
called. It seems to be the safest and easiest way for now. Welcome back, v1.2.

This commit was SVN r21970.
2009-09-17 14:37:02 +00:00
Jeff Squyres
c879170c9e Actually, invoke the error on MPI_COMM_WORLD if you have an invalid
communicator.  :-)

This commit was SVN r21942.
2009-09-04 07:40:28 +00:00
Jeff Squyres
a211c55cce Fix some attribute error detection problems reported by Lisandro
Dalcin. 

This commit was SVN r21941.
2009-09-04 05:18:49 +00:00
Jeff Squyres
11d44cec1b Fix MPI_COMM_SPAWN[_MULTIPLE] to only check the info handles for
errors on the root.  Thanks to Federico Golfre Andreasi for reporting
the problem.

This commit was SVN r21838.
2009-08-19 13:24:12 +00:00
Jeff Squyres
c3afac1d50 Fix comment typo
This commit was SVN r21824.
2009-08-14 12:09:19 +00:00
Jeff Squyres
b8332ea2b2 Patch from Kiril to make the parameter checking on MPI_CART_CREATE a
bit more relaxed.

This commit was SVN r21816.
2009-08-13 22:06:38 +00:00
Rainer Keller
6c5532072a - Split the datatype engine into two parts: an MPI specific part in
OMPI
   and a language agnostic part in OPAL. The convertor is completely
   moved into OPAL.  This offers several benefits as described in RFC
   http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
   namely:
    - Fewer basic types (int* and float* types, boolean and wchar
    - Fixing naming scheme to ompi-nomenclature.
    - Usability outside of the ompi-layer.
 - Due to the fixed nature of simple opal types, their information is
   completely
   known at compile time and therefore constified
 - With fewer datatypes (22), the actual sizes of bit-field types may be
   reduced
   from 64 to 32 bits, allowing reorganizing the opal_datatype
   structure, eliminating holes and keeping data required in convertor
   (upon send/recv) in one cacheline...
   This has implications to the convertor-datastructure and other parts
   of the code.
 - Several performance tests have been run, the netpipe latency does not
   change with
   this patch on Linux/x86-64 on the smoky cluster.
 - Extensive tests have been done to verify correctness (no new
   regressions) using:
   1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
    ompi-ddt:
    a. running both trunk and ompi-ddt resulted in no differences
       (except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
       correctly).
    b. with --enable-memchecker and running under valgrind (one buglet
       when run with static found in test-suite, commited)
   2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
      all passed (except for the dynamic/ tests failed!! as trunk/MTT)
   3. compilation and usage of HDF5 tests on Jaguar using PGI and
      PathScale compilers.
   4. compilation and usage on Scicortex.
 - Please note, that for the heterogeneous case, (-m32 compiled
   binaries/ompi), neither
   ompi-trunk, nor ompi-ddt branch would successfully launch.

This commit was SVN r21641.
2009-07-13 04:56:31 +00:00
Rainer Keller
b572dc3591 - As discussed revert r21330, Fortran-configure info should
not end up in OPAL
 - Will post an updated patch for the OMPI_ALIGNMENT_ parts (within C).

This commit was SVN r21342.

The following SVN revision numbers were found above:
  r21330 --> open-mpi/ompi@95596d1814
2009-06-01 19:02:34 +00:00
Rainer Keller
95596d1814 - Move alignment and size output generated by configure-tests
into the OPAL namespace, eliminating cases like opal/util/arch.c
   testing for ompi_fortran_logical_t.
   As this is processor- and compiler-related information
   (e.g. does the compiler/architecture support REAL*16)
   this should have been on the OPAL layer.
 - Unifies f77 code using MPI_Flogical instead of opal_fortran_logical_t

 - Tested locally (Linux/x86-64) with mpich and intel testsuite
   but would like to get this week-ends MTT output


 - PLEASE NOTE: configure-internal macro-names and
   ompi_cv_ variables have not been changed, so that
   external platform (not in contrib/) files still work.

This commit was SVN r21330.
2009-05-30 15:54:29 +00:00
Edgar Gabriel
d93def71ea second part of the 'running out of cids problem', this time focusing on what
happens when hierarch is used. . Two major items:
 - modify the comm_activate step to take an additional argument, indicating
 whether the new communicatio has to go through the collective selection
 step. This is not required sometimes (e.g. when a process calls
 MPI_COMM_SPLIT with color=MPI_UNDEFINED), and contributed significantly to
 the exhaustion of cids.
 - when freeing a communicator, check whether we can reuse the block of cids
 assigned to that comm. This only works if the current front of the cid
 assignment (cid_block_start) is right ater the block of cids assigned to this
 comm.

Fixes trac:1904
Fixes trac:1926

This commit was SVN r21296.

The following Trac tickets were found above:
  Ticket 1904 --> https://svn.open-mpi.org/trac/ompi/ticket/1904
  Ticket 1926 --> https://svn.open-mpi.org/trac/ompi/ticket/1926
2009-05-27 15:21:07 +00:00
Edgar Gabriel
0bc8164a11 fix the group_compare operation which failed to recognize unequal groups in
case the first process of the group was not represented at all in the second
group. Also added some cleanup of the code w.r.t. booleans vs. ints.
 
Thanks for Geoffrey Irving for reporting the bug and providing the initial
solution. 

This commit was SVN r21192.
2009-05-08 13:51:28 +00:00
Rainer Keller
2941cb1494 - Fix Coverity CID 525 and 526 --- and some more;
- due to the <= with we could overrun the array
   - we didn't correctly test at _all_, since we never marked the
     ranks already excluded / included...
   - when returning in error, we should free (elements_int_list)...

This commit was SVN r21186.
2009-05-07 16:45:18 +00:00
Greg Koenig
60485ff95f This is a very large change to rename several #define values from
OMPI_* to OPAL_*.  This allows opal layer to be used more independent
from the whole of ompi.

NOTE: 9 "svn mv" operations immediately follow this commit.

This commit was SVN r21180.
2009-05-06 20:11:28 +00:00
Rainer Keller
221fb9dbca ... Delayed due to notifier commits earlier this day ...
- Delete unnecessary header files using
   contrib/check_unnecessary_headers.sh after applying
   patches, that include headers, being "lost" due to
   inclusion in one of the now deleted headers...

   In total 817 files are touched.
   In ompi/mpi/c/ header files are moved up into the actual c-file,
   where necessary (these are the only additional #include),
   otherwise it is only deletions of #include (apart from the above
   additions required due to notifier...)

 - To get different MCAs (OpenIB, TM, ALPS), an earlier version was
   successfully compiled (yesterday) on:
   Linux locally using intel-11, gcc-4.3.2 and gcc-SVN + warnings enabled
   Smoky cluster (x86-64 running Linux) using PGI-8.0.2 + warnings enabled
   Lens cluster (x86-64 running Linux) using Pathscale-3.2 + warnings enabled

This commit was SVN r21096.
2009-04-29 01:32:14 +00:00
George Bosilca
05ee4c280e Mismatch between the reported subversion and the one in the mpi.h.
Thanks to Rob Egan for the report.

This commit was SVN r20985.
2009-04-14 05:29:07 +00:00
Jeff Squyres
bf8defc475 Shaun Jackson noted that MPI_STATUS_IGNORE is actually (effectively)
NULL, so testing for NULL as a bad status parameter here is a bad
idea.

This commit was SVN r20891.
2009-03-28 01:24:41 +00:00
Rainer Keller
d8cf4c0fec - Get pgcc on XT to complain less:
In case we use memcmp, strlen, strup and friends include <string.h>
   Also several constants.h are not included directly
 - Let's have mca_topo_base_cart_create  return ompi-errors in
   ompi/mca/topo/base/topo_base_cart_create.c

This commit was SVN r20773.
2009-03-13 02:10:32 +00:00
Rainer Keller
9dea63d63a - Last of intrusive commits (promised)... err for now.
Anyway, this is blocking the move: do not include pml.h
   if not really needed, aka none of the following used:
     mca_pml
     MCA_PML_CALL
     OMPI_ANY_TAG
     OMPI_ANY_SOURCE
     OMPI_PROC_NULL

 - Notable exceptions (deleting in one header->adding):
   - ompi/mca/mtl/psm/
   - ompi/mca/osc/rdma/
   - ompi/mca/btl/openib/btl_openib_endpoint.c depended on
     pml_base_sendreq.h

 - Tested on Linux/x86-64, this time including make check
   (thanks Jeff and Ralph)

This commit was SVN r20725.
2009-03-04 17:06:51 +00:00
Terry Dontje
0178b6c45f Added padding to predefined handle structures to maintain library version to
version compatibility.

This commit was SVN r20627.
2009-02-24 17:17:33 +00:00
Jeff Squyres
f1a6d170dc Revert part of r20537: per lengtyh discussion on the phone and the
devel list, it ''is'' within in the spirit of MPI to allow
MPI_REQUEST_NULL to be passed to MPI_REQUEST_GET_STATUS.  I filed a
ticket proposal with MPI-2.2 to make this officially accepted:

  https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/137

Plus, r20537 didn't revert out all of the machinery for allowing
MPI_REQUEST_NULL or inactive requests, anyway.  So this commit simply
removes the parameter check that was added in r20537, and we're back
to where we were before this whole conversation.  :-)

This commit was SVN r20616.

The following SVN revision numbers were found above:
  r20537 --> open-mpi/ompi@38aab37bb3
2009-02-20 19:57:46 +00:00
Jeff Squyres
7e210fdaf8 Return MPI_ERR_COMM and MPI_ERR_WIN, respectively, for
MPI_COMM|WIN_SET|GET_ERRHANDLER if a bad MPI handle is passed.  Thanks
to Lisandro Dalcín for reporting the issue.

This commit was SVN r20615.
2009-02-20 19:53:48 +00:00
Rainer Keller
d81443cc5a - On the way to get the BTLs split out and lessen dependency on orte:
Often, orte/util/show_help.h is included, although no functionality
   is required -- instead, most often opal_output.h, or               
   orte/mca/rml/rml_types.h                                           
   Please see orte_show_help_replacement.sh commited next.            

 - Local compilation (Linux/x86_64) w/ -Wimplicit-function-declaration
   actually showed two *missing* #include "orte/util/show_help.h"     
   in orte/mca/odls/base/odls_base_default_fns.c and                  
   in orte/tools/orte-top/orte-top.c                                  
   Manually added these.                                              

   Let's have MTT the last word.

This commit was SVN r20557.
2009-02-14 02:26:12 +00:00
Jeff Squyres
44092c6a21 Don't allow freeing of predefined datatypes. Thanks to Lisandro
Dalcín for reporting the issue.

This commit was SVN r20538.
2009-02-13 00:00:55 +00:00
Jeff Squyres
38aab37bb3 Be a little tougher looking for MPI_*_NULL cases in some functions.
Thanks to Lisandro Dalcín for reporting the issue.

This commit was SVN r20537.
2009-02-12 23:57:41 +00:00
Jeff Squyres
c596a1bcb3 Fix MPI_File_c2f -- ensure that if you invoke
MPI_File_c2f(MPI_FILE_NULL), you actually get 0, not -1.  Thanks for
Lisandro Dalcin for the bug report.

This commit was SVN r20511.
2009-02-11 00:48:12 +00:00
Jeff Squyres
90c28810f4 Fix CID 1122: comm->c_name is a char array (not a pointer), so
comparing it to NULL is not useful.

This commit was SVN r20444.
2009-02-05 15:31:10 +00:00
Jeff Squyres
73ea7a9aa5 Fix CIDs 1211, 1212, 1214: fix error checking in MPI_REDUCE_LOCAL.
This commit was SVN r20435.
2009-02-05 02:18:03 +00:00
Jeff Squyres
4d8a187450 Two major things in this commit:
* New "op" MPI layer framework
 * Addition of the MPI_REDUCE_LOCAL proposed function (for MPI-2.2)

= Op framework =

Add new "op" framework in the ompi layer.  This framework replaces the
hard-coded MPI_Op back-end functions for (MPI_Op, MPI_Datatype) tuples
for pre-defined MPI_Ops, allowing components and modules to provide
the back-end functions.  The intent is that components can be written
to take advantage of hardware acceleration (GPU, FPGA, specialized CPU
instructions, etc.).  Similar to other frameworks, components are
intended to be able to discover at run-time if they can be used, and
if so, elect themselves to be selected (or disqualify themselves from
selection if they cannot run).  If specialized hardware is not
available, there is a default set of functions that will automatically
be used.

This framework is ''not'' used for user-defined MPI_Ops.

The new op framework is similar to the existing coll framework, in
that the final set of function pointers that are used on any given
intrinsic MPI_Op can be a mixed bag of function pointers, potentially
coming from multiple different op modules.  This allows for hardware
that only supports some of the operations, not all of them (e.g., a
GPU that only supports single-precision operations).

All the hard-coded back-end MPI_Op functions for (MPI_Op,
MPI_Datatype) tuples still exist, but unlike coll, they're in the
framework base (vs. being in a separate "basic" component) and are
automatically used if no component is found at runtime that provides a
module with the necessary function pointers.

There is an "example" op component that will hopefully be useful to
those writing meaningful op components.  It is currently
.ompi_ignore'd so that it doesn't impinge on other developers (it's
somewhat chatty in terms of opal_output() so that you can tell when
its functions have been invoked).  See the README file in the example
op component directory.  Developers of new op components are
encouraged to look at the following wiki pages:

  https://svn.open-mpi.org/trac/ompi/wiki/devel/Autogen
  https://svn.open-mpi.org/trac/ompi/wiki/devel/CreateComponent
  https://svn.open-mpi.org/trac/ompi/wiki/devel/CreateFramework

= MPI_REDUCE_LOCAL =

Part of the MPI-2.2 proposal listed here:

    https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/24

is to add a new function named MPI_REDUCE_LOCAL.  It is very easy to
implement, so I added it (also because it makes testing the op
framework pretty easy -- you can do it in serial rather than via
parallel reductions).  There's even a man page!

This commit was SVN r20280.
2009-01-14 23:44:31 +00:00
Jeff Squyres
895edd04f8 Fix CID 468: remove some dead code. r_proc_list was set to NULL but
never used.

This commit was SVN r20272.
2009-01-14 18:15:17 +00:00
Jeff Squyres
d1c6f3f89a * Fix a truckload of Cisco copyrights to be the same as the rest of
the code base.
 * Fix a few misspellings in other copyrights.

This commit was SVN r20241.
2009-01-11 02:30:00 +00:00
Jeff Squyres
a9850c96c5 Cosmetic change.
This commit was SVN r20203.
2009-01-05 19:07:06 +00:00
Jeff Squyres
611ebeab33 Cosmetic: expunge some more old 2-space-indent code (re-indent with
"indent(1)").

This commit was SVN r20179.
2009-01-02 12:55:17 +00:00
Nysal Jan
ee8ec6f6b5 Remove dead/redundant code. Minimize number of calloc invocations
This commit was SVN r20121.
2008-12-12 10:55:50 +00:00
Shiqing Fan
d06604c258 Get rid of the compiler warning message when --enable-picky is used.
Do the checks according to inter/intracommunicator flags.

This commit was SVN r20063.
2008-12-03 17:44:21 +00:00
Shiqing Fan
abd21b6d17 - An update for memchecker :
1. fix a bug in pml_ob1_recvreq/sendreq.c, buffer was made defined where the request has already been released.
2. complete memchecker support for collective functions.
3. change the wrongly spelled function name of memchecker, i.e. '*_isaddressible' should be '*_isaddressable'

This commit was SVN r20043.
2008-11-27 16:34:02 +00:00
George Bosilca
82d1d5d785 The patch for "Unexpected message queue for unknown CID's required" ticket #1460.
I'm unable to split it in two parts, my patch and Edgar's one. So I just update
copyright information for both of us.
What this patch do:
- it use the unexpected queue create by commit r19562 to dispatch the
  unexpected message to the right communicator (once this communicator
  is created and initialized).
- delay the PML comm_add until we have the context_id for the new communicator.
- only do the PML comm_add on processes that really belong to the new
  communicator. Please read the lengthy comment in the source code for the
  reason behind this.

This commit was SVN r19929.

The following SVN revision numbers were found above:
  r19562 --> open-mpi/ompi@acd3406aa7
2008-11-04 21:58:06 +00:00
Jeff Squyres
57a3dce9ba LANL noticed that calling MPI_ABORT invokes opal_output(0, ...)
unconditionally, which can result in a flood of messages to the user
if all MPI processes invoke abort.  Additionally, some users were
confused because they saw the MPI_ABORT opal_output() messages from
''some'' MPI processes, but not ''all'' of them (despite the fact that
every MPI process supposedly invoked MPI_ABORT).  The reason is that
calling MPI_ABORT triggers ORTE to kill all MPI processes, so it's a
race condition as to whether a) all MPI processes actually invoke
MPI_ABORT, and/or b) whether every process is able to opal_output()
before they are killed.

This commit does two simple things:
 * Now use orte_show_help() for the MPI_ABORT message, so they are
   aggregated. 
 * Add a note in the message that calling MPI_ABORT kills all
   processes, so you might not see all output, yadda yadda yadda.

This commit was SVN r19735.
2008-10-14 19:23:03 +00:00
Jeff Squyres
d0a8be6d2f Fix CID 1117: ensure to check return values.
This commit was SVN r19583.
2008-09-19 13:27:30 +00:00
Nysal Jan
4b68803260 Should be coords(i) >= dims(i)
Refs trac:1463

This commit was SVN r19500.

The following Trac tickets were found above:
  Ticket 1463 --> https://svn.open-mpi.org/trac/ompi/ticket/1463
2008-09-05 04:20:48 +00:00
Jeff Squyres
9a98423bbc [Re-]Fix #1463 with a little thing that I like to call "the right
way".

Don't modify coords in the top-level API function because coords is an
IN variable.  Instead, as Nysal noted, the real cause of the problem
was a missing ! down in topo_base_cart_rank.c.  Put a comment down in
topo_base_cart_rank.c explaining what's going on so that the code is
not so cryptic.

Refs trac:1363.

This commit was SVN r19487.

The following Trac tickets were found above:
  Ticket 1363 --> https://svn.open-mpi.org/trac/ompi/ticket/1363
2008-09-03 08:24:27 +00:00
Jeff Squyres
008fa8c5cc Fixes trac:1236, #1237.
* Various changes to enable 0-dimensional cartesian communicators:
   * Set various mtc_* members to NULL when there are 0 dimensions (and
     don't bother trying to memcpy these arrays when duplicating the
     communicator -- because they're NULL)
   * adjust topo_base_cart_sub to correctly handle 0 dimensions
     (simplified it a bit)
   * adjust a few error codes to return ERR_OUT_OF_RESOURCE
   * adjust error checking of CART_CREATE, CART_RANK
 * Allow MPI_GRAPH_CREATE to accept 0 == nnodes.
 * Bump reported MPI version in mpi.h to 2.1

This commit was SVN r19461.

The following Trac tickets were found above:
  Ticket 1236 --> https://svn.open-mpi.org/trac/ompi/ticket/1236
2008-08-31 19:31:10 +00:00
Jeff Squyres
59cb626b7c Fixes trac:1463: ensure periodic dimensions are handled proprly for
MPI_CART_RANK. 

This commit was SVN r19459.

The following Trac tickets were found above:
  Ticket 1463 --> https://svn.open-mpi.org/trac/ompi/ticket/1463
2008-08-31 18:39:05 +00:00
George Bosilca
697dc524c1 Deal with the ticket #1239 and #712. This will upgrade the Open MPI support
for the F90 type create functions to the requirements of MPI 2.1 standard.

Advice to implementors. An application may often repeat a call to
MPI_TYPE_CREATE_F90_xxxx with the same combination of (xxxx,p,r).
The application is not allowed to free the returned predefined, unnamed
datatype handles. To prevent the creation of a potentially huge amount of
handles, the MPI implementation should return the same datatype handle for
the same (REAL/COMPLEX/INTEGER,p,r) combination. Checking for the
combination (p,r) in the preceding call to MPI_TYPE_CREATE_F90_xxxx and
using a hash-table to find formerly generated handles should limit the
overhead of finding a previously generated datatype with same combination
of (xxxx,p,r). (End of advice to implementors.)

This commit fixes trac:1239, and #712.

This commit was SVN r19458.

The following Trac tickets were found above:
  Ticket 1239 --> https://svn.open-mpi.org/trac/ompi/ticket/1239
2008-08-31 18:36:32 +00:00
Jeff Squyres
93746cd594 Fixed CID 807: Remove unused variable
This commit was SVN r19239.
2008-08-11 20:50:09 +00:00