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

502 Коммитов

Автор SHA1 Сообщение Дата
Gilles Gouaillardet
4184c01be5 Merge pull request #2393 from bosilca/topic/no_predefined_ddt_refcount
Don't refcount the predefined datatypes.
2017-02-21 09:38:11 +09:00
George Bosilca
c2cd717f82 Don't refcount the predefined datatypes.
Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
2017-01-11 16:48:59 -05:00
Nathan Hjelm
eb439228b1 ompi/datatype: fix bug in darray that causes MPI/IO failures
This commit fixes errors in the lb and extent of darray datatypes. For
these datatypes the lb should be the start offset of the rank's data
in the array and the extent should be the size of the entire
datatype. In master the lb was always 0 and the extent was always to
small. This commit updates the call to opal_datatype_resize to set the
correct lb and fixes the extent calculation.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-12-13 09:25:16 -07:00
Ralph Castain
1e2019ce2a Revert "Update to sync with OMPI master and cleanup to build"
This reverts commit cb55c88a8b.
2016-11-22 15:03:20 -08:00
Ralph Castain
cb55c88a8b Update to sync with OMPI master and cleanup to build
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
2016-11-22 14:24:54 -08:00
KAWASHIMA Takahiro
722e898e8e fortran: Correct the name of MPI_INTEGER16.
The name of `MPI_INTEGER16` obtained using `MPI_TYPE_GET_NAME`
from Fortran program was incorrect (`MPI_INTEGER8` was obtained)
when `INTEGER*16` is not supported by a compiler.

This bug affects only the Fortran binding because `MPI_INTEGER16`
is not defined in `mpi.h` if a compiler does not support it.
2016-08-02 22:37:58 +09:00
KAWASHIMA Takahiro
5383003eab fortran: Add missing predefined datatype named constants.
This commit add the following Fortran named constants which are
defined in the MPI standard but are missing in Open MPI.

- `MPI_LONG_LONG` (defined as a synonym of `MPI_LONG_LONG_INT`)
- `MPI_CXX_FLOAT_COMPLEX`
- `MPI_C_BOOL`

And this commit also changes the value of the following Fortran
named constant for consistency.

- `MPI_C_COMPLEX`
  `(MPI_C_FLOAT_COMPLEX` is defined as a synonym of this)

Each needs a different solution described below.

For `MPI_LONG_LONG`:

The value of `MPI_LONG_LONG` is defined to have a same value
as `MPI_LONG_LONG_INT` because of the following reasons.

1. It is defined as a synonym of `MPI_LONG_LONG_INT` in
   the MPI standard.
2. `MPI_LONG_LONG_INT` and `MPI_LONG_LONG` has a same value
   for C in `mpi.h`.
3. `ompi_mpi_long_long` is not defined in
   `ompi/datatype/ompi_datatype_module.c`.

For `MPI_CXX_FLOAT_COMPLEX`:

Existing `MPI_CXX_COMPLEX` is replaced with `MPI_CXX_FLOAT_COMPLEX`
bacause `MPI_CXX_FLOAT_COMPLEX` is the right name defined in MPI-3.1
and `MPI_CXX_COMPLEX` is not defined in MPI-3.1 (nor older).
But for compatibility, `MPI_CXX_COMPLEX` is treated as a synonym
of `MPI_CXX_FLOAT_COMPLEX` on Open MPI.

For `MPI_C_BOOL`:

`MPI_C_BOOL` is newly added. The value which `MPI_C_COMPLEX` had
used (68) is assinged for it because the value becomes no longer
in use (described later) and it is a suited position as a datatype
added on MPI-2.2.

For `MPI_C_COMPLEX`:

Existing `MPI_C_FLOAT_COMPLEX` is replaced with `MPI_C_COMPLEX`
and `MPI_C_FLOAT_COMPLEX` is changed to have the same value.
In other words, make `MPI_C_COMPLEX` the canonical name and
make `MPI_C_FLOAT_COMPLEX` an alias of it.
This is bacause the relation of these datatypes is same as
the relation of `MPI_LONG_LONG_INT` and `MPI_LONG_LONG`, and
`MPI_LONG_LONG_INT` and `MPI_LONG_LONG` are implemented like that.
But in the datatype engine, we use `ompi_mpi_c_float_complex`
instead of `ompi_mpi_c_complex` as a variable name to keep
the consistency with the other similar types such as
`ompi_mpi_c_double_complex` (see George's comment in open-mpi/ompi#1927).
We don't delete `ompi_mpi_c_complex` now because it is used in
some other places in Open MPI code. It may be cleand up in the future.

In addition, `MPI_CXX_COMPLEX`, which was defined only in the Open MPI
Fortran binding, is added to `mpi.h` for the C binding.

This commit breaks binary compatibility of Fortran `MPI_C_COMPLEX`.
When this commit is merged into v2.x branch, the change of
`MPI_C_COMPLEX` should be excluded.
2016-08-02 22:36:41 +09:00
KAWASHIMA Takahiro
dff6accec6 ompi/datatype: Fix args of DARRAY
According to MPI-3.1 P.122, `ni` for `MPI_COMBINER_DARRAY`
should be `4*ndims+4`, not `4*size+4`.

This bug may cause SEGV if `size` is smaller than `ndims`
when the darray is used for one-sided communication (pt2pt OSC).

This bug was introduced in open-mpi/ompi@79b13f36 (when darray
became a first class citizen and the `a_i` index of darray was
shifted by 2). The corresponding `MPI_Type_create_darray()`
function sets a right value so we don't need to update the function.
2016-06-15 11:24:22 +09:00
KAWASHIMA Takahiro
84b110a1f2 ompi/datatype: Fix args of HINDEXED_BLOCK
According to MPI-3.1 P.121, `ni` for `MPI_COMBINER_HINDEXED_BLOCK`
should be `2`, not `2 + count`.

This bug was introduced in 113b45b4 (when `MPI_Type_create_hindexed_block`
support is added in Open MPI) and fixed partially in 7f5314ee and 8de93982.
This commit fixes the remaining part.

Probably this bug has no user impact. It only consumes a bit more memory.
2016-06-10 17:32:33 +09:00
George Bosilca
2b868c4952 Fix MPI datatype args.
Compensate for the datatype ID that we add to the array.
2016-05-24 23:36:54 -04:00
George Bosilca
16d9f71d01 Correctly compute the space needed for the args.
Add checks to bail out if our precomputed value is less
than needed (we are already at fault).

bot:milestone:v1.10.3
bot:milestone:v2.0
bot🏷️bug
bot:assign: @ggouaillardet
2016-05-21 16:01:16 -04:00
George Bosilca
6aac0d9c22 Remove useless output stream. 2016-05-21 15:54:04 -04:00
George Bosilca
f8facb177d atomically update the refcount on the datatype args. 2016-05-11 12:40:18 -04:00
George Bosilca
6e6ed62a3c Allow NULL arrays for emoty datatypes.
When building an empty datatype (aka. size = 0) because the count of
included datatypes is 0, be less strict on what the arguments are
(allow NULL pointers).
2016-05-01 12:37:02 -04:00
Gilles Gouaillardet
490b538ad6 ompi/datatype: fix MPI_LONG_LONG_INT type name
MPI_LONG_LONG_INT is a named predefined datatype, so its name is now MPI_LONG_LONG_INT
MPI_LONG_LONG is a synonym of MPI_LONG_LONG_INT, and its name is also MPI_LONG_LONG_INT
2016-04-20 09:34:20 +09:00
KAWASHIMA Takahiro
4944ba7edc datatype: Fix incorrect predefined datatype names and other datatype bugs (#1537)
* datatype: Fix a incorrect datatype name of `MPI_UNSIGNED`

Name of predefined datatype for C `unsigned int` gotten by
`MPI_TYPE_GET_NAME` should be `MPI_UNSIGNED`, not `MPI_UNSIGNED_INT`.

* datatype: Fix incorrect datatype names of `MPI_C_BOOL` and `MPI_CXX_*`

Names of predefined datatypes gotten by `MPI_TYPE_GET_NAME` are:

after this commit (correct) | before this commit (incorrect)
-----------------------------------------------------------
MPI_C_BOOL                    MPI_BOOL
MPI_CXX_BOOL                  MPI_BOOL
MPI_CXX_FLOAT_COMPLEX         MPI_C_FLOAT_COMPLEX
MPI_CXX_DOUBLE_COMPLEX        MPI_C_DOUBLE_COMPLEX
MPI_CXX_LONG_DOUBLE_COMPLEX   MPI_C_LONG_DOUBLE_COMPLEX

* datatype: Fix a incorrect datatype name of `MPI_2DOUBLE_PRECISION`

Name of the predefined datatype for Fortran two `double precision`
gotten by `MPI_TYPE_GET_NAME` should be `MPI_2DOUBLE_PRECISION`,
not `MPI_2DBLPREC`.

This bug was caused by setting the name to `opal_datatype_t::name`
instead of `ompi_datatype_t::name`.

* datatype: Fix `MPI_UNSIGNED_CHAR` internal flag

`MPI_UNSIGNED_CHAR` is an integer type.

* ompi/cxx: Fix C++ `MPI::LONG_DOUBLE_INT` definition

Just a typo fix. Without this fix, `MPI::MAX_LOC` and `MPI::MIN_LOC`
cannot be used with `MPI::LONG_DOUBLE_INT` in C++ programs.

I know the C++ binding is obsolete, but fixing this is harmless.

* Add FUJITSU copyright
2016-04-12 20:17:46 +02:00
Gilles Gouaillardet
5932287cef datatype/[un]pack_external[_size]: move subroutines down to ompi/datatype
so it can be directly used by test/datatype/external32
2016-03-30 13:01:33 +09:00
Gilles Gouaillardet
69ba2a9b6b ddt: fix support of MPI_COMBINER_RESIZED in __ompi_datatype_create_from_args
Thanks James Ramsey for the report
2016-01-28 11:32:29 +09:00
Nathan Hjelm
b921831f2b ompi/datatype: make datatype pack thread safe
This commit makes ompi_datatype_get_pack_description thread safe. The
call is used by osc/pt2pt to send the packed description to remote
peers. Before this commit if MPI_THREAD_MULTIPLE is enabled and the
user uses MPI_Put, MPI_Get, etc we could hit a race where multiple
threads attempt to store the packed description on the datatype. Since
the code in question is not performance-critical the threading fix
uses opal_atomic_* calls instead of bothering with OPAL_THREAD_*.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-01-21 17:53:28 -07:00
George Bosilca
12dad8b37f Fix the missing resize of the returned type for
the subarray and darray types.

Thanks Keith Bennett and Dan Garmann for reporting this issue

Fixes open-mpi/ompi#1191
2015-12-21 09:41:30 +09:00
Gilles Gouaillardet
d43ad3fada ddt: duplicate MPI_DATATYPE_NULL when ompi_datatype_create_indexed of ompi_datatype_create_indexed_block is invoked with a zero count 2015-12-08 16:25:36 +09:00
George Bosilca
b14212f142 Fix Coverity issue 1338059. 2015-11-02 22:51:52 -05:00
George Bosilca
679dc9b437 Fix the subarray and darray type creation. Include a
small patch provided by Gilles.
2015-10-26 23:44:26 -04:00
yosefe
502dc8aaa4 add pml-specific field in OMPI datatype.
PML UCX will use it to cache a handle for UCX datatype.
2015-10-20 19:46:06 +03:00
Gilles Gouaillardet
e01bac962f coll: do not cast way the const modifier when this is not necessary
update the coll framework and mpi c bindings
2015-09-09 09:18:57 +09:00
Nathan Hjelm
4d92c9989e more c99 updates
This commit does two things. It removes checks for C99 required
headers (stdlib.h, string.h, signal.h, etc). Additionally it removes
definitions for required C99 types (intptr_t, int64_t, int32_t, etc).

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
2015-06-25 10:14:13 -06:00
Ralph Castain
869041f770 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
Gilles Gouaillardet
0a2f60994c ompi/ddt: fix #ifdef vs #if HAVE_xxx 2015-05-26 16:59:36 +09:00
Gilles Gouaillardet
9d56b85b55 initialize common symbols from ompi 2015-05-08 10:11:58 +09:00
Gilles Gouaillardet
ef4b6203a4 Correctly unpack datatype.
Alignment requirements were relaxed in open-mpi/ompi@33a3ace874
so correctly handle this when unpacking a datatype.
2015-05-01 17:08:15 +09:00
Gilles Gouaillardet
96e3cbe8fc Remove an incorrect assert.
Alignment requirements were relaxed in open-mpi/ompi@33a3ace874
and made a previous alignment check incorrect.
2015-05-01 12:53:12 +09:00
George Bosilca
33a3ace874 Minimize the alignments. We only do it when we need to pack
data that must be aligned (aka the displacement). All other
cases do not require special alignments, and are treated
normally.
Fix the comment regarding the alignment requirements.
2015-04-30 22:06:50 -04:00
George Bosilca
015d3f56cf Fix the INDEXED_BLOCK issue identified by IBM. 2015-04-30 14:43:19 -04:00
Gilles Gouaillardet
697a866b6e ddt: correctly align next datatype description
This bug can be evidenced by the test/datatype/ddt_pack
test case on sparc architecture.
2015-04-30 15:04:54 +09:00
Nathan Hjelm
88072f9b8b ompi/datatype: fix subarray datatype
The subarray datatype was not packing/unpacking correctly. This was
leading to wrong results whenever the lb of the subarray datatype was
non-zero.

I tracked the issue to the use of ompi_datatype_create_resized. This
function simply duplicates the old datatype and sets the lb and
extent. This is unfortunately insufficent for the pack/unpack
functions which use the loop end first element offset NOT the lb. This
offset is 0 in the resized datatype. Once ompi_datatype_create_resized
has been fixed this commit should be reverted.

Fixes #380.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2015-03-24 14:33:10 -06:00
Jeff Squyres
4f1139590f datatypes: trivial spelling fix
s/commited/committed/gi
2015-02-27 18:16:01 -08:00
George Bosilca
438b6e136b Edgar noticed that the commit 3960817 broke the MPI_Type_create_resized.
So, I revert it until I figure out a better way.
2015-01-23 18:12:26 -05:00
George Bosilca
ded4cbf20f Correctly set the upper and lower bound for the subarray and darray. 2015-01-19 02:26:14 -05:00
George Bosilca
39608176db If we want the resized data to have the correct LB and UB (both
soft and hard markers) we should force an add instead of
relying on the OPAL datatype resize operation.
2015-01-19 02:24:36 -05:00
George Bosilca
19c96465f3 Fix the use of hard markers MPI_LB and MPI_UB in the creation of
subarray and darray. Thanks to Gus Correa for pointing to the
MPICH bug report.
2015-01-17 23:11:07 -05:00
Ralph Castain
552c9ca5a0 George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT:    Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL

All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies.  This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP.  Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose.  UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs.  A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.

This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
Gilles Gouaillardet
8bafe06c57 Fixes *alltoall* collectives at top level
This commit :
 - Correctly retrieve the communicator size when
   checking memory and parameters
 - Ensure (sendtype,sendcount) and (recvtype,recvcount)
   matches and return with MPI_ERR_TRUNCATE otherwise
 - Return with MPI_SUCCESS without invoking the low level
   if no data is going to be transferred
 - Fixes trac:4506

cmr=v1.8.2:reviewer=bosilca

This commit was SVN r31815.

The following Trac tickets were found above:
  Ticket 4506 --> https://svn.open-mpi.org/trac/ompi/ticket/4506
2014-05-19 07:46:07 +00:00
Jeff Squyres
64c1228b55 Roll back r31519 and r31521: George convinced us that these approaches
weren't right.

This commit was SVN r31528.

The following SVN revision numbers were found above:
  r31519 --> open-mpi/ompi@b449c750b7
  r31521 --> open-mpi/ompi@e243805ed8
2014-04-24 20:27:03 +00:00
Jeff Squyres
b449c750b7 coll basic: correctly handle alltoall[vw] 0-sized messages
Patch from Gilles Gouaillardet on #4506 to correctly handle 0-sized
messages in coll/basic MPI_Alltoallv and MPI_Alltoallw.

Reviewed by Jeff Squyres.

Fixes trac:4506.

cmr=v1.8.2:reviewer=ompi-rm1.8

This commit was SVN r31519.

The following Trac tickets were found above:
  Ticket 4506 --> https://svn.open-mpi.org/trac/ompi/ticket/4506
2014-04-24 16:25:43 +00:00
George Bosilca
7f5314eed9 Fix the handling of the displacement array for HINDEXED_BLOCK
datatype creation.

This commit was SVN r31466.
2014-04-21 16:43:58 +00:00
George Bosilca
7e1593ef80 Prevent integer overflow in datatype creation. Patch based on
Gilles Gouaillardet solution attached to ticket #4145.

Closes trac:4145.
cmr=v1.7.4:reviewer=ompi-rm1.7
cmr=v1.6.6:reviewer=ompi-rm1.6

This commit was SVN r30342.

The following Trac tickets were found above:
  Ticket 4145 --> https://svn.open-mpi.org/trac/ompi/ticket/4145
2014-01-21 14:44:00 +00:00
Brian Barrett
8b778903d8 Fix longstanding issue with our multi-project support. Rather than using
pkg{data,lib,includedir}, use our own ompi{data,lib,includedir}, which is
always set to {datadir,libdir,includedir}/openmpi.  This will keep us from
having help files in prefix/share/open-rte when building without Open MPI,
but in prefix/share/openmpi when building with Open MPI.

This commit was SVN r30140.
2014-01-07 22:11:15 +00:00
George Bosilca
7178492dd5 Correctly initialize and finalize all the datatype classes. No memory leaks on the
datatype engine subsists.

This commit was SVN r30019.
2013-12-20 15:57:10 +00:00
George Bosilca
90c42bf762 Rearrange the #include to minimize clutter.
This commit was SVN r29286.
2013-09-28 17:15:33 +00:00
Nathan Hjelm
0b8fc13299 MPI-3.0: update C bindings with const and consistent use of [] for
arrays.

The MPI 3.0 standard added const to all in buffers in the C bindings. This
commit adds the const keyword and in most cases casts const away. We will
eventually should go through and update the various interfaces (coll, pml,
io, etc) to take the const keyword. The group, comm, win, and datatype
interfaces have been updated with const.

cmr=v1.7.4:ticket=trac:3785:reviewer=jsquyres

This commit was SVN r29266.

The following Trac tickets were found above:
  Ticket 3785 --> https://svn.open-mpi.org/trac/ompi/ticket/3785
2013-09-26 21:56:20 +00:00