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

82 Коммитов

Автор SHA1 Сообщение Дата
Jeff Squyres
54ca3310ea ompi: cleanup various string operations
Several fixes to string handling:

1. strncpy() -> opal_string_copy() (because opal_string_copy()
   guarantees to NULL-terminate, and strncpy() does not)
2. Simplify a few places, such as:
   * Since opal_string_copy() guarantees to NULL terminate, eliminate
     some memsets(), etc.
   * Use opal_asprintf() to eliminate multi-step string creation

There's more work that could be done; e.g., this commit doesn't
attempt to clean up any strcpy() usage.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
2018-10-14 16:10:20 -07:00
KAWASHIMA Takahiro
5f1c940c8b
Merge pull request #5840 from kawashima-fj/pr/pcollreq-f08-signatures
mpiext/pcollreq: Correct f08 routine signatures
2018-10-05 08:59:03 +09:00
KAWASHIMA Takahiro
43d85dbc81 mpiext/pcollreq: Add Fortran bindings in man
Fortran bindings were added to persistent collectives in 9e0115c980
but man was not updated.

Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
2018-10-04 21:05:38 +09:00
KAWASHIMA Takahiro
be91a26fd8 mpiext/pcollreq: Add missing f08 asynchronous
Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
2018-10-04 20:36:30 +09:00
KAWASHIMA Takahiro
357531847e mpiext/pcollreq: Correct f08 routine signatures
Changes of nonblocking collectives in e98d794e8b and f750c6932c
are applied to persistent collectives.

Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
2018-10-04 19:51:40 +09:00
KAWASHIMA Takahiro
4a0a2598f6 mpiext/pcollreq: fix more typos
Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
2018-09-18 14:45:33 +09:00
Gilles Gouaillardet
8dc6985a5a mpiext/pcollreq: fix misc typos
Thanks Jeff for the report

Fixes open-mpi/ompi#5712

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-09-18 10:02:04 +09:00
KAWASHIMA Takahiro
69901a5156 mpiext/pcollreq: Fix zero-count reduction
We need to return a persistent request.
`ompi_request_empty` is not a persistent request.

Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
2018-09-10 11:19:07 +09:00
Gilles Gouaillardet
47351b7fac mpiext/pcollreq: Add Fortran use-mpi-f08 bindings
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-07-17 16:29:41 +09:00
Kurita, Takehiro
73e038ec18 mpiext/pcollreq: Add Fortran use-mpi bindings
Signed-off-by: Kurita, Takehiro <fj6370fp@aa.jp.fujitsu.com>
2018-07-17 16:29:41 +09:00
Gilles Gouaillardet
9e0115c980 mpiext/pcollreq: Add Fortran mpif-h bindings
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-07-17 16:29:33 +09:00
Gilles Gouaillardet
44110a575d mpiext/pcollreq: do include PMPIX_* subroutines to C bindings
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-07-17 16:29:33 +09:00
Gilles Gouaillardet
61b3308871 mpiext/pcollreq: check subroutine parameters and add profiling symbols
- check subroutine parameters
 - implement PMPIX_* subroutines

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-07-14 14:14:37 +09:00
KAWASHIMA Takahiro
545e9af896 mpiext/pcollreq: Add MPIX_Bcast_init etc.
Until the MPI Forum decides to add the persistent collective
communication request feature to the MPI Standard, these functions
are supported through MPI extensions with the `MPIX_` prefix.

Only C bindings are supported currently.

Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
2018-06-11 17:22:16 +09:00
Gilles Gouaillardet
794cc09d3e mpiext: fix path to Fortran 2008 modules
OMPI_FORTRAN_USEMPIF08_MOD macro was removed in open-mpi/ompi@791bcee6c0
so this macro is now manually expanded to mpi/fortran/use-mpi-f08/mod

Thanks to Nathan T. Weeks for reporting

Refs open-mpi/ompi#3605

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2017-12-11 11:02:43 +09:00
Ralph Castain
7ad6886a30 Add a new OMPI rte component to support direct-launch using PMIx.
Cleanup several places where abstraction violations crept into OMPI layer (direct reference of ORTE). Add some missing includes that were exposed by this change.

Note that this compiles, but I haven't tested it for execution yet. Handing it over to Noah Evans for completion

Signed-off-by: Ralph Castain <rhc@open-mpi.org>
2017-11-28 12:05:01 -08:00
Gilles Gouaillardet
2c71c27882 fortran2008: fix mpiext example
in order to solve an egg and the chicken problem,  in which mpiext need mpi-f08-types.mod
and/but use-mpi-f08[-desc] needs mpiext, add an extra step
- build fortran 2008 modules only
- build fortran 2008 mpi extensions
- and then build fortran 2008 bindings

Fixes open-mpi/ompi#3605

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2017-08-09 13:19:22 +09:00
Gilles Gouaillardet
9f29f3bff4 hwloc: since WHOLE_SYSTEM is no more used, remove useless
checks related to offline and disallowed elements

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2017-07-20 17:39:21 +09:00
Mark Allen
482d84b6e5 fixes for Dave's get/set info code
The expected sequence of events for processing info during object creation
is that if there's an incoming info arg, it is opal_info_dup()ed into the obj
at obj->s_info first. Then interested components register callbacks for
keys they want to know about using opal_infosubscribe_infosubscribe().

Inside info_subscribe_subscribe() the specified callback() is called with
whatever matching k/v is in the object's info, or with the default. The
return string from the callback goes into the new k/v stored in info, and
the input k/v is saved as __IN_<key>/<val>. It's saved the same way
whether the input came from info or whether it was a default. A null return
from the callback indicates an ignored key/val, and no k/v is stored for
it, but an __IN_<key>/<val> is still kept so we still have access to the
original.

At MPI_*_set_info() time, opal_infosubscribe_change_info() is used. That
function calls the registered callbacks for each item in the provided info.
If the callback returns non-null, the info is updated with that k/v, or if
the callback returns null, that key is deleted from info. An __IN_<key>/<val>
is saved either way, and overwrites any previously saved value.

When MPI_*_get_info() is called, opal_info_dup_mpistandard() is used, which
allows relatively easy changes in interpretation of the standard, by looking
at both the <key>/<val> and __IN_<key>/<val> in info. Right now it does
  1. includes system extras, eg k/v defaults not expliclty set by the user
  2. omits ignored keys
  3. shows input values, not callback modifications, eg not the internal values

Currently the callbacks are doing things like
    return some_condition ? "true" : "false"
that is, returning static strings that are not to be freed. If the return
strings start becoming more dynamic in the future I don't see how unallocated
strings could support that, so I'd propose a change for the future that
the callback()s registered with info_subscribe_subscribe() do a strdup on
their return, and we change the callers of callback() to free the strings
it returns (there are only two callers).

Rough outline of the smaller changes spread over the less central files:
  comm.c
    initialize comm->super.s_info to NULL
    copy into comm->super.s_info in comm creation calls that provide info
    OBJ_RELEASE comm->super.s_info at free time
  comm_init.c
    initialize comm->super.s_info to NULL
  file.c
    copy into file->super.s_info if file creation provides info
    OBJ_RELEASE file->super.s_info at free time
  win.c
    copy into win->super.s_info if win creation provides info
    OBJ_RELEASE win->super.s_info at free time

  comm_get_info.c
  file_get_info.c
  win_get_info.c
    change_info() if there's no info attached (shouldn't happen if callbacks
      are registered)
    copy the info for the user

The other category of change is generally addressing compiler warnings where
ompi_info_t and opal_info_t were being used a little too interchangably. An
ompi_info_t* contains an opal_info_t*, at &(ompi_info->super)

Also this commit updates the copyrights.

Signed-off-by: Mark Allen <markalle@us.ibm.com>
2017-05-17 01:12:49 -04:00
David Solt
50aa143ab6 Major structural changes to data types: .super infosubscriber
ompi_communicator_t, ompi_win_t, ompi_file_t all have a super class of type opal_infosubscriber_t instead of a base/super type of opal_object_t (in previous code comm used c_base, but file used super).  It may be a bit bold to say that being a subscriber of MPI_Info is the foundational piece that ties these three things together, but if you object, then I would prefer to turn infosubscriber into a more general name that encompasses other common features rather than create a different super class.  The key here is that we want to be able to pass comm, win and file objects as if they were opal_infosubscriber_t, so that one routine can heandle all 3 types of objects being passed to it.

MPI_INFO_NULL is still an ompi_predefined_info_t type since an MPI_Info is part of ompi but the internal details of the underlying information concept is part of opal.

An ompi_info_t type still exists for exposure to the user, but it is simply a wrapper for the opal object.

Routines such as ompi_info_dup, etc have all been moved to opal_info_dup and related to the opal directory.

Fortran to C translation tables are only used for MPI_Info that is exposed to the application and are therefore part of the ompi_info_t and not the opal_info_t

The data structure changes are primarily in the following files:

    communicator/communicator.h
    ompi/info/info.h
    ompi/win/win.h
    ompi/file/file.h

The following new files were created:

    opal/util/info.h
    opal/util/info.c
    opal/util/info_subscriber.h
    opal/util/info_subscriber.c

This infosubscriber concept is that communicators, files and windows can have subscribers that subscribe to any changes in the info associated with the comm/file/window.  When xxx_set_info is called, the new info is presented to each subscriber who can modify the info in any way they want.  The new value is presented to the next subscriber and so on until all subscribers have had a chance to modify the value.  Therefore, the order of subscribers can make a difference but we hope that there is generally only one subscriber that cares or modifies any given key/value pair.  The final info is then stored and returned by a call to xxx_get_info.

The new model can be seen in the following files:

    ompi/mpi/c/comm_get_info.c
    ompi/mpi/c/comm_set_info.c
    ompi/mpi/c/file_get_info.c
    ompi/mpi/c/file_set_info.c
    ompi/mpi/c/win_get_info.c
    ompi/mpi/c/win_set_info.c

The current subscribers where changed as follows:

    mca/io/ompio/io_ompio_file_open.c
    mca/io/ompio/io_ompio_module.c
    mca/osc/rmda/osc_rdma_component.c (This one actually subscribes to "no_locks")
    mca/osc/sm/osc_sm_component.c (This one actually subscribes to "blocking_fence" and "alloc_shared_contig")

Signed-off-by: Mark Allen <markalle@us.ibm.com>

Conflicts:
	AUTHORS
	ompi/communicator/comm.c
	ompi/debuggers/ompi_mpihandles_dll.c
	ompi/file/file.c
	ompi/file/file.h
	ompi/info/info.c
	ompi/mca/io/ompio/io_ompio.h
	ompi/mca/io/ompio/io_ompio_file_open.c
	ompi/mca/io/ompio/io_ompio_file_set_view.c
	ompi/mca/osc/pt2pt/osc_pt2pt.h
	ompi/mca/sharedfp/addproc/sharedfp_addproc.h
	ompi/mca/sharedfp/addproc/sharedfp_addproc_file_open.c
	ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c
	ompi/mpi/c/lookup_name.c
	ompi/mpi/c/publish_name.c
	ompi/mpi/c/unpublish_name.c
	opal/mca/mpool/base/mpool_base_alloc.c
	opal/util/Makefile.am
2017-05-12 14:41:05 -04:00
Gilles Gouaillardet
d5aa310884 mpiext/affinity: initialize all output variables of OMPI_Affinity_str()
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2017-01-24 09:13:29 +09: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
Joshua Hursey
f6f24a4f67 build: Custom libmpi(_FOO) name option in configure
* Add a configure time option to rename libmpi(_FOO).*
   - `--with-libmpi-name=STRING`
 * This commit only impacts the installed libraries.
   Internal, temporary libraries have not been renamed to limit the
   scope of the patch to only what is needed.

For example:
```shell
shell$ ./configure --with-libmpi-name=wookie
...
shell$ find . -name "libmpi*"
shell$ find . -name "libwookie*"
./lib/libwookie.so.0.0.0
./lib/libwookie.so.0
./lib/libwookie.so
./lib/libwookie.la
./lib/libwookie_mpifh.so.0.0.0
./lib/libwookie_mpifh.so.0
./lib/libwookie_mpifh.so
./lib/libwookie_mpifh.la
./lib/libwookie_usempi.so.0.0.0
./lib/libwookie_usempi.so.0
./lib/libwookie_usempi.so
./lib/libwookie_usempi.la
shell$
```
2016-09-29 21:47:24 -05:00
Rainer Keller
0fb0913cd4 In case, we do not build Fortran, Fortran 2008 or CXX, the regexp in make_manpage.pl will delete all
lines up to the next ".fi" -- which for functions that do not implement the corresponding interface
as code will have all eliminated.
Change to delete the man page's content up to the next section header ".SH"

Also in case of make V=1, we'd like to see the command line, too.

Amend OMPI_Affinity_str according to the other man-pages definitions.
2016-05-17 14:21:35 +02:00
Gilles Gouaillardet
291a464efb configury: remove the --enable-mpi-profiling option
and directly call the PMPI_* symbols from C and Fortran bindings
2015-10-13 08:52:35 +09:00
Ralph Castain
d97bc29102 Remove OPAL_HAVE_HWLOC qualifier and error out if --without-hwloc is given 2015-09-04 16:54:40 -07:00
Nathan Hjelm
156ce6af21 periodic whitespace purge
Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2015-08-24 09:32:33 -06:00
Rolf vandeVaart
0e87478e40 Fix macro return value when not CUDA-aware 2015-08-14 13:56:25 -04:00
Rolf vandeVaart
cb84a85d17 Build always and fix return value 2015-08-05 17:23:55 -04:00
Rolf vandeVaart
5ee2505174 Minor rewrite of text and comments 2015-07-10 13:50:06 -04:00
Rolf vandeVaart
1229dd3ed6 Fix errors from previous commit 2015-07-08 11:46:52 -04:00
Rolf vandeVaart
6372baa7b9 Some minor cleanup and renaming of query function. 2015-07-08 10:17:35 -04:00
Gilles Gouaillardet
a4cc83f4f7 mpiext/affinity: fix missing function type 2015-06-30 09:37:27 +09:00
Rolf vandeVaart
dfa4b5e474 Merge pull request #680 from rolfv/pr/add-cuda-macro
Add a macro to indicate CUDA-aware support
2015-06-29 14:24:19 -04:00
Jeff Squyres
f6882a85bb mpiext_affinity_str.c: minor stylistic updates
No real functional changes:

* Reduce #if's a little -- have a single "no hwloc" and "hwloc"
  section.
* Make a common subroutine (no_hwloc_support()) for when we don't have
  any hwloc support
2015-06-29 09:36:10 -07:00
Rolf vandeVaart
e1983ff46a Add a macro to indicate CUDA-aware support 2015-06-29 12:08:27 -04:00
Gilles Gouaillardet
6994d742fd mpiext/affinity: #if OPAL_HAVE_HWLOC most parts of the code
that allow this extension to compile if configure'd with --without-hwloc
2015-06-29 09:54:03 +09:00
Ralph Castain
2fa8167383 Remove manpages when doing distclean in the OMPI extensions area 2015-06-25 21:01:17 -07:00
Rolf vandeVaart
5aa11a2c9f Fix library name 2015-06-25 18:07:01 -04:00
Rolf vandeVaart
2750a6e237 Fix filename name 2015-06-25 17:41:44 -04:00
Rolf vandeVaart
995723ca6f Fix compilation of cuda extensions
Fix compilation
2015-06-25 17:19:14 -04:00
Ralph Castain
a390a8f5ef Add a CUDA MPI extension to provide the MPIx_CUDA_SUPPORT macro 2015-06-25 13:07:35 -07:00
Jeff Squyres
fca193d316 MPI extensions: build extensions by default
* affinity: will build unless disabled.
* cr: will build if FT is enabled, unless it is disabled.  It will
  also complain/abort if you --with-mpi-ext=cr, but FT is disabled.
* example: will only build if --with-mpi-ext=example (and .ompi_ignore
  is removed)
2015-06-25 11:28:58 -07:00
Ralph Castain
869041f770 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
Jeff Squyres
e855b19ba2 MPI extensions: rules of thumb about symbol names
This document is the result of a George Bosilca/Jeff Squyres
discussion at the developer meeting in Dallas in January of 2015.  It
attempts to provide some rules of thumb / guidance for naming
conventions of symbols in MPI extensions.
2015-01-29 06:39:44 -06:00
Ralph Castain
a8e2d6c3a6 The bulk of the remaining renaming changes, in one final glorious "blob". Thanks to Jeff for some help chasing down a few spots. Per chat with Jeff, we decided to cleanup a few things that were historical in nature:
top_ompi_srcdir  ->  OMPI_TOP_SRCDIR
top_ompi_builddir -> OMPI_TOP_BUILDDIR

We also split the srcdir/builddir flags according to their local tree (e.g., OPAL_TOP_SRCDIR), and tied them all together in configure.ac. Renamed ompi_ignore and ompi_unignore to be opal_<foo> as these are agnostic markers.

Only thing left is ompilibdir being treated similar to what we dif for srcdir/builddir. Coming soon.

This commit was SVN r31678.
2014-05-07 21:48:53 +00:00
Jeff Squyres
173c046617 build: add Automake-like silent/verbose macros for "ln -s ..." operations
Also, since I put some of the macros for these silent/verbose rules up
in the top-level Makefile.man-page-rules file, I renamed it to
Makefile.ompi-rules.

I've had this sitting around for a while; now seems like as good a
time as any to commit it.

This commit was SVN r31271.
2014-03-28 18:24:32 +00:00
Ralph Castain
081669b440 When pretty-printing binding info, we need to pass the topology down to the routine as the mapper isn't always working with the local topology - otherwise, we get an erroneous help message. Thanks to Tetsuya Mishima for reporting it
cmr=v1.7.5:reviewer=rhc:subject=fix pretty-print of bindings

This commit was SVN r30968.
2014-03-10 15:53:07 +00:00
Jeff Squyres
b0b17c62aa Protect against orte_proc_applied_binding being NULL.
It is now possible for orte_proc_applied_binding to be NULL (e.g., if
you mpirun --bind-to none), so we need to ensure we don't pass it down
to opal_hwloc_base_cset2*str().

Also, take the opprotunity to de-duplicate some strings that are used
in multiple places.

Refs trac:4073

This commit was SVN r30204.

The following Trac tickets were found above:
  Ticket 4073 --> https://svn.open-mpi.org/trac/ompi/ticket/4073
2014-01-09 23:38:34 +00:00