Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic/f08 cdesc 3 #33

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/ompi_config_files.m4
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ AC_DEFUN([OMPI_CONFIG_FILES],[
ompi/mpi/fortran/use-mpi-f08/base/Makefile
ompi/mpi/fortran/use-mpi-f08/profile/Makefile
ompi/mpi/fortran/use-mpi-f08/bindings/Makefile
ompi/mpi/fortran/use-mpi-f08/ts/Makefile
ompi/mpi/fortran/use-mpi-f08/mod/Makefile
ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-subarrays-config.h
ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-interfaces.h
ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-rename.h
ompi/mpi/fortran/mpiext-use-mpi/Makefile
ompi/mpi/fortran/mpiext-use-mpi-f08/Makefile
ompi/mpi/tool/Makefile
Expand Down
69 changes: 69 additions & 0 deletions config/ompi_fortran_check_ts.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2019 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl

# Check whether or not the C compiler supports ISO_Fortran_binding.h
# Also check whether C and Fortran compiler interoperate.
#
# OMPI_FORTRAN_CHECK_TS([action if found], [action if not found])
# ----------------------------------------------------
AC_DEFUN([OMPI_FORTRAN_CHECK_TS],[
AS_VAR_PUSHDEF([fortran_ts], [ompi_cv_fortran_have_ts])

AC_CHECK_HEADERS([ISO_Fortran_binding.h],
[AC_CACHE_CHECK([if Fortran and C compilers support ISO_Fortran_binding.h], fortran_ts,
[mkdir conftest.$$
cd conftest.$$

# Try to compile the C bindings
cat > conftest_c.c << EOF
#include <ISO_Fortran_binding.h>

int is_contiguous_c(CFI_cdesc_t* x) {
return CFI_is_contiguous(x);
}
EOF
OPAL_LOG_COMMAND([$CC $CCFLAGS -c conftest_c.c],
[cat > conftest.f90 << EOF
module MOD_IS_CONTIGUOUS

interface

function is_contiguous(buf) BIND(C, name="is_contiguous_c")
implicit none
type(*), dimension(..) :: buf
integer :: is_contiguous
end function is_contiguous

end interface

end module

program test_is_contiguous
use MOD_IS_CONTIGUOUS
implicit none
integer :: a0, a1(2), a2(2,2), a3(2,2,2)
write (*,*) is_contiguous(a0)
write (*,*) is_contiguous(a1)
write (*,*) is_contiguous(a2)
write (*,*) is_contiguous(a3)
end program
EOF
OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 -o conftest conftest.f90 conftest_c.o $LDFLAGS $LIBS],
[AS_VAR_SET(fortran_ts, yes)],
[AS_VAR_SET(fortran_ts, no)])],
[AS_VAR_SET(fortran_ts, no)])
cd ..
rm -rf conftest.$$])],
[AS_VAR_SET(fortran_ts, no)])

AS_VAR_IF(fortran_ts, [yes], [$1], [$2])
AS_VAR_POPDEF([fortran_ts])dnl
])
62 changes: 47 additions & 15 deletions config/ompi_setup_mpi_fortran.m4
Original file line number Diff line number Diff line change
Expand Up @@ -417,14 +417,27 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
# If we got all the stuff from above, then also look for the new
# F08 syntax that we can use for the use_mpif08 module.

# We need to have ignore TKR functionality to build the mpi_f08
OMPI_FORTRAN_HAVE_TS=0
OMPI_MPI_SUBARRAYS_SUPPORTED=.false.
OMPI_MPI_ASYNC_PROTECTS_NONBLOCKING=.false.
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
[OMPI_FORTRAN_CHECK_TS([OMPI_FORTRAN_HAVE_TS=1])])

AC_SUBST(OMPI_MPI_SUBARRAYS_SUPPORTED)
AC_SUBST(OMPI_MPI_ASYNC_PROTECTS_NONBLOCKING)

# We need to have ignore TKR or the ISO Fortran bindings functionality to build the mpi_f08
# module
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1],
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
OMPI_FORTRAN_F08_PREDECL=$OMPI_FORTRAN_IGNORE_TKR_PREDECL
OMPI_FORTRAN_F08_TYPE=$OMPI_FORTRAN_IGNORE_TKR_TYPE
])
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
[AS_IF([test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1],
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
OMPI_FORTRAN_F08_PREDECL=$OMPI_FORTRAN_IGNORE_TKR_PREDECL
OMPI_FORTRAN_F08_TYPE=$OMPI_FORTRAN_IGNORE_TKR_TYPE
])
AS_IF([test $OMPI_FORTRAN_HAVE_TS -eq 1],
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
OMPI_MPI_SUBARRAYS_SUPPORTED=.true.
OMPI_MPI_ASYNC_PROTECTS_NONBLOCKING=.true.])])

# The overall "_BIND_C" variable will be set to 1 if we have all
# the necessary forms of BIND(C)
Expand Down Expand Up @@ -558,17 +571,13 @@ end type test_mpi_handle],
])

OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=1
OMPI_FORTRAN_F08_PREDECL='!'
OMPI_FORTRAN_F08_TYPE=real
OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK=0
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
[ # Look for Fortran 2008 assumed rank syntax
OMPI_FORTRAN_CHECK_F08_ASSUMED_RANK(
[ # If we have assumed rank, we can build the use
# mpi_f08 module "better"
OMPI_FORTRAN_F08_PREDECL='!'
OMPI_FORTRAN_F08_TYPE='type(*), dimension(..)'
OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK=1])

# Which mpi_f08 implementation are we using?
Expand Down Expand Up @@ -598,6 +607,12 @@ end type test_mpi_handle],
[OMPI_FORTRAN_ELEMENTAL_TYPE=])])
AC_SUBST(OMPI_FORTRAN_ELEMENTAL_TYPE)

OMPI_FORTRAN_HAVE_C_ISO_FORTRAN=0
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
[OMPI_FORTRAN_CHECK_TS([OMPI_FORTRAN_HAVE_TS=1],
[OMPI_FORTRAN_HAVE_TS=0])])

# Note: the current implementation *only* has wrappers;
# there is no optimized implementation for a "good"
# compiler. I'm leaving the above logic in place for
Expand All @@ -620,6 +635,8 @@ end type test_mpi_handle],
AS_IF([test $OMPI_MIN_REQUIRED_FORTRAN_BINDINGS -gt $OMPI_BUILD_FORTRAN_BINDINGS],
[AC_MSG_ERROR([Cannot build requested Fortran bindings, aborting])])

AC_CONFIG_FILES([ompi/mpi/fortran/use-mpi-f08/bindings/mpi-f-interfaces-bind.h])

# -------------------
# mpif.h final setup
# -------------------
Expand Down Expand Up @@ -760,10 +777,9 @@ end type test_mpi_handle],
# This goes into mpifort-wrapper-data.txt
AC_SUBST(OMPI_FORTRAN_USEMPIF08_LIB)

# These go into interfaces/mpi-f08-interfaces-[no]bind.h (and
# mpi-f*-interfaces*.h files)
AC_SUBST(OMPI_FORTRAN_F08_PREDECL)
AC_SUBST(OMPI_FORTRAN_F08_TYPE)
# These go into mod/mpi-f08-interfaces.h
AC_SUBST(OMPI_F08_IGNORE_TKR_PREDECL)
AC_SUBST(OMPI_F08_IGNORE_TKR_TYPE)

AC_SUBST(OMPI_MPI_PREFIX)
AC_SUBST(OMPI_MPI_BIND_PREFIX)
Expand Down Expand Up @@ -845,6 +861,22 @@ end type test_mpi_handle],
# For configure-fortran-output.h
AC_SUBST(OMPI_FORTRAN_HAVE_BIND_C)

AM_CONDITIONAL(OMPI_FORTRAN_HAVE_TS,
[test $OMPI_FORTRAN_HAVE_TS -eq 1])
AC_SUBST(OMPI_FORTRAN_HAVE_TS)

AS_IF([test $OMPI_FORTRAN_HAVE_TS -eq 1],
[OMPI_F08_IGNORE_TKR_TYPE="type(*), dimension(..)"
OMPI_F08_IGNORE_TKR_PREDECL="! no attribute required for"
OMPI_F08_BINDINGS_EXTENSION="ts"
OMPI_F08_BINDINGS_TS_SUFFIX="ts"],
[OMPI_F08_IGNORE_TKR_TYPE=$OMPI_FORTRAN_IGNORE_TKR_TYPE
OMPI_F08_IGNORE_TKR_PREDECL=$OMPI_FORTRAN_IGNORE_TKR_PREDECL
OMPI_F08_BINDINGS_EXTENSION="f"
OMPI_F08_BINDINGS_TS_SUFFIX=""])
AC_SUBST(OMPI_F08_BINDINGS_EXTENSION)
AC_SUBST(OMPI_F08_BINDINGS_TS_SUFFIX)

# Somewhat redundant because ompi/Makefile.am won't traverse into
# ompi/mpi/fortran/use-mpi-f08 if it's not to be built, but we
# might as well have ompi/mpi/fortran/use-mpi-f08/Makefile.am be
Expand Down
70 changes: 45 additions & 25 deletions docs/news/news-v5.0.x.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Open MPI v5.0.x series
This file contains all the NEWS updates for the Open MPI v5.0.x
series, in reverse chronological order.

Open MPI version 5.0.0rc5
Open MPI version 5.0.0rc6
-------------------------
:Date: 07 April 2022
:Date: 15 April 2022

.. admonition:: MPIR API has been removed
:class: warning
Expand Down Expand Up @@ -40,24 +40,36 @@ Open MPI version 5.0.0rc5
libraries, rather than linked into the Open MPI core libraries.


Changes since rc4:
Changes since rc5:

- Various changes and cleanup to fix, and better support the static building of Open MPI.
- The PRRTE submodule pointer has been updated to bring in the following fixes:

- Added silent single-dash to double-dash conversion to the mpirun/mpiexec command
line. This promotes backwards compatibility with the v4.x series.
- Fixed a bug where launch-failure messages from PRRTE would be printed twice.
- Changes to the BTL ``OFI`` component to better support the HPE SS11 network.
- Fixed a compile failure when building with ``UCC`` (``configure --with-ucc=...``).
- Fixed several memory leaks in the ``UCX`` component.
- Fixed a bug where ``autogen.pl --force`` would fail.
- Fixed a large number of warnings when compiling on macOS.
- Fixed two dead links in ``HACKING.md``. Thanks to Lachlan Bell for finding and fixing.
- Updated various documentation to rename ``master`` to ``main`` where relevant.
- Fixed a bug where the deprecated option ``--oversubscribe`` for ``mpirun``
was not translated correctly to its new equivalent (``--map-by :oversubscribe``).
- Fixed a case where ``--map-by ppr:x:oversubscribe`` would not work correctly.
In this case, ``:oversubscribe`` was effectively ignored.

- Fixed incorrect behavior with ``MPI_Allreduce()`` when using ``MPI_MAX`` with
the ``MPI_UNSIGNED_LONG`` type. Thanks to Kendra Long for the report and their
contrubution to the fix.

- Various fixes to the ``openmpi.spec`` file to fix issues with rpm generation.

- Fixed a bug in one-sided ``UCX`` calls where not all in-flight messages
would be flushed before cleanup.

- Build fixes - the following builds options with Open MPI were fixed:

- ``usNIC`` - (``configure --with-usnic=..``)
- ``HCOLL`` - (``configure --with-hcoll=..``)
- ``XPMEM`` - (``configure --with-xpmem=..``).

- Thanks to Alex Margol for the fix.

- Various documentation improvements and updates.

- Updated PMIx to ``v4.2`` branch - current hash: ``d3445c8``.
- Updated PRRTE to ``v2.1`` branch - current hash: ``f3828e8``.
- Updated PMIx to the ``v4.2`` branch - current hash: ``7ddb00e``.
- Updated PRRTE to the ``v2.1`` branch - current hash: ``407e8d5``.

- New Features:

Expand Down Expand Up @@ -116,16 +128,19 @@ Changes since rc4:
interface matching between peers in order to improve ``MPI_Init()`` wireup
performance.

- Changes to the BTL ``OFI`` component to better support the HPE SS11 network.

- Shared Memory:

- The legacy ``sm`` (shared memory) BTL has been removed.
The next-generation shared memory BTL ``vader`` replaces it,
and has been renamed to be ``sm`` (``vader`` will still work as an alias).
- Update the new ``sm`` BTL to not use Linux Cross Memory Attach (CMA) in user namespaces.
- Fixed a crash when using the new ``sm`` BTL when compiled with Linux Cross Memory Attach (``XPMEM``).
Thanks to George Katevenis for reporting this issue.
- The legacy ``sm`` (shared memory) BTL has been removed.
The next-generation shared memory BTL ``vader`` replaces it,
and has been renamed to be ``sm`` (``vader`` will still work as an alias).
- Update the new ``sm`` BTL to not use Linux Cross Memory Attach (CMA) in user namespaces.
- Fixed a crash when using the new ``sm`` BTL when compiled with Linux Cross Memory Attach (``XPMEM``).
Thanks to George Katevenis for reporting this issue.

- Updated the ``-mca pml`` option to only accept one pml, not a list.

- Deprecations and removals:

- ORTE, the underlying OMPI launcher has been removed, and replaced
Expand All @@ -145,23 +160,27 @@ Changes since rc4:
- ompi/contrib: Removed ``libompitrace``.
This library was incomplete and unmaintained. If needed, it
is available in the v4/v4.1 series.

- HWLOC updates:

- Open MPI now requires HWLOC v1.11.0 or later.
- The internal HWLOC shipped with OMPI has been updated to v2.7.1.
- Enable --enable-plugins when appropriate.

- Documentation updates and improvements:

- Open MPI now uses readthedocs.io for all documentation.
- Converted man pages to markdown. Thanks to Fangcong Yin for their contribution
to this effort.
- Various ``README.md`` fixes - thanks to: Yixin Zhang, Samuel Cho,
Robert Langfield, Alex Ross, Sophia Fang, mitchelltopaloglu, Evstrife,
and Hao Tong for their contributions.
- Various ``README.md`` and ``HACKING.md`` fixes - thanks to: Yixin Zhang, Samuel Cho,
Robert Langfield, Alex Ross, Sophia Fang, mitchelltopaloglu, Evstrife, Hao Tong
and Lachlan Bell for their contributions.
- Various CUDA documentation fixes. Thanks to Simon Byrne for finding
and fixing these typos.

- Build updates and fixes:

- Various changes and cleanup to fix, and better support the static building of Open MPI.
- Change the default component build behavior to prefer building
components as part of the core Open MPI library instead of individual DSOs.
Currently, this means the Open SHMEM layer will only build if
Expand All @@ -187,6 +206,7 @@ Changes since rc4:
due to a missing header inclusion. Thanks to Sylvain Didelot for finding
and fixing this issue.
- Add support for GNU Autoconf v2.7.x.

- Other updates and bug fixes:

- Updated Open MPI to use ``ROMIO`` v3.4.1.
Expand Down
2 changes: 2 additions & 0 deletions ompi/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ SUBDIRS = \
mpi/fortran/use-mpi-f08/base \
mpi/fortran/use-mpi-f08/mod \
mpi/fortran/use-mpi-f08/bindings \
mpi/fortran/use-mpi-f08/ts \
$(OMPI_MPIEXT_USEMPIF08_DIRS) \
mpi/fortran/use-mpi-f08 \
mpi/fortran/mpiext-use-mpi-f08 \
Expand Down Expand Up @@ -120,6 +121,7 @@ DIST_SUBDIRS = \
mpi/fortran/use-mpi-f08/base \
mpi/fortran/use-mpi-f08/mod \
mpi/fortran/use-mpi-f08/bindings \
mpi/fortran/use-mpi-f08/ts \
mpi/fortran/mpiext-use-mpi-f08 \
mpi/java \
$(OMPI_MPIEXT_ALL_SUBDIRS) \
Expand Down
3 changes: 2 additions & 1 deletion ompi/include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ include_HEADERS += \
mpif-handles.h \
mpif-io-constants.h \
mpif-io-handles.h \
mpif-sentinels.h
mpif-sentinels.h \
mpif-subarrays-config.h

endif

Expand Down
13 changes: 2 additions & 11 deletions ompi/include/mpif-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
! reserved.
! Copyright (c) 2019 Triad National Security, LLC. All rights
! reserved.
! Copyright (c) 2019 Research Organization for Information Science
! and Technology (RIST). All rights reserved.
! $COPYRIGHT$
!
! Additional copyrights may follow
Expand Down Expand Up @@ -74,14 +76,3 @@
parameter (MPI_MAX_DATAREP_STRING=@OPAL_MAX_DATAREP_STRING@-1)
parameter (MPI_MAX_PSET_NAME_LEN=@OPAL_MAX_PSET_NAME_LEN@-1)
parameter (MPI_MAX_STRINGTAG_LEN=@OPAL_MAX_STRINGTAG_LEN@-1)

!
! MPI F08 conformance
!
logical MPI_SUBARRAYS_SUPPORTED
logical MPI_ASYNC_PROTECTS_NONBLOCKING
! Hard-coded for .false. for now
parameter (MPI_SUBARRAYS_SUPPORTED= .false.)
! Hard-coded for .false. for now
parameter (MPI_ASYNC_PROTECTS_NONBLOCKING = .false.)

19 changes: 19 additions & 0 deletions ompi/include/mpif-subarrays-config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
! -*- fortran -*-
!
! Copyright (c) 2019 Research Organization for Information Science
! and Technology (RIST). All rights reserved.
! $COPYRIGHT$
!
! Additional copyrights may follow
!
! $HEADER$
!

!
! MPI F08 conformance
!
logical MPI_SUBARRAYS_SUPPORTED
logical MPI_ASYNC_PROTECTS_NONBLOCKING
parameter (MPI_SUBARRAYS_SUPPORTED= .FALSE.)
parameter (MPI_ASYNC_PROTECTS_NONBLOCKING = .FALSE.)

Loading