From 3910952a224f57895fe1a9bb95abb4f7d9c82931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Aradi?= Date: Tue, 30 Jan 2024 20:27:19 +0100 Subject: [PATCH 1/5] Fix missing imports --- lib/mpifx_get_processor_name.fpp | 1 + lib/mpifx_recv.fpp | 2 +- lib/mpifx_send.fpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/mpifx_get_processor_name.fpp b/lib/mpifx_get_processor_name.fpp index 4b0fb8f..577dc91 100644 --- a/lib/mpifx_get_processor_name.fpp +++ b/lib/mpifx_get_processor_name.fpp @@ -1,6 +1,7 @@ !> Contains the extended MPI communicator. module mpifx_get_processor_name_module use mpi + use mpifx_helper_module, only : handle_errorflag implicit none private diff --git a/lib/mpifx_recv.fpp b/lib/mpifx_recv.fpp index 6f5f681..3ce0523 100644 --- a/lib/mpifx_recv.fpp +++ b/lib/mpifx_recv.fpp @@ -6,7 +6,7 @@ module mpifx_recv_module use mpi use mpifx_comm_module, only : mpifx_comm - use mpifx_helper_module, only : dp, sp + use mpifx_helper_module, only : dp, sp, getoptarg, handle_errorflag, setoptarg implicit none private diff --git a/lib/mpifx_send.fpp b/lib/mpifx_send.fpp index 4459795..aae2569 100644 --- a/lib/mpifx_send.fpp +++ b/lib/mpifx_send.fpp @@ -6,7 +6,7 @@ module mpifx_send_module use mpi use mpifx_comm_module, only : mpifx_comm - use mpifx_helper_module, only : default_tag, dp, sp + use mpifx_helper_module, only : default_tag, dp, sp, getoptarg, handle_errorflag implicit none private From 8af4e5859e3159b05a0bb3747d7ae0b378b1421d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Aradi?= Date: Wed, 31 Jan 2024 16:26:33 +0100 Subject: [PATCH 2/5] Update changelog --- CHANGELOG.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a773e3f..f371905 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,22 @@ Change Log Notable project changes in various releases. + +1.5 +=== + +Added +----- + +* mpifx_win allows allocations with 64 bit allocation size parameter + + +Changed +------- + +* mpifx_win is fully standard conforming now (using the F08 MPI-interface) + + 1.4 === From 04e9f00060d7a5fdd5d301773bc108b65bc39f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Aradi?= Date: Wed, 7 Feb 2024 08:55:26 +0100 Subject: [PATCH 3/5] Add documentation to lib/mpifx_constants.fpp Co-authored-by: Ben Hourahine --- lib/mpifx_constants.fpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mpifx_constants.fpp b/lib/mpifx_constants.fpp index 48ff532..35391d5 100644 --- a/lib/mpifx_constants.fpp +++ b/lib/mpifx_constants.fpp @@ -19,6 +19,7 @@ module mpifx_constants_module !> Exit code for failed assertions integer, parameter :: MPIFX_ASSERT_FAILED = 2 + !> Native integer for MPI addresses integer, parameter :: MPIFX_SIZE_T = MPI_ADDRESS_KIND end module mpifx_constants_module From 3d39c42f8b384c097caae050e4904e98663afda2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Aradi?= Date: Wed, 7 Feb 2024 09:28:00 +0100 Subject: [PATCH 4/5] Make mpi_f08 imports explicit --- lib/mpifx_win.fpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mpifx_win.fpp b/lib/mpifx_win.fpp index e85e711..1e4b301 100644 --- a/lib/mpifx_win.fpp +++ b/lib/mpifx_win.fpp @@ -4,7 +4,9 @@ !> Contains routined for MPI shared memory windows. module mpifx_win_module - use mpi_f08 + use mpi_f08, only : MPI_ADDRESS_KIND, mpi_barrier, mpi_comm, MPI_INFO_NULL, MPI_MODE_NOCHECK,& + & mpi_win, mpi_win_allocate_shared, mpi_win_fence, mpi_win_free, mpi_win_lock_all,& + & mpi_win_shared_query, mpi_win_sync, mpi_win_unlock use mpifx_helper_module, only : handle_errorflag, sp, dp use mpifx_comm_module, only : mpifx_comm use mpifx_constants_module, only : MPIFX_SIZE_T From b66aedb74acd5f122e4f4cf5f086a1ce2f5cdeac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Aradi?= Date: Thu, 8 Feb 2024 15:42:51 +0100 Subject: [PATCH 5/5] Update Readme --- README.rst | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index c6119e1..43540f4 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ MpiFx - Modern Fortran Interface for MPI **************************************** The open source library `MpiFx `_ provides -modern Fortran (Fortran 2003) wrappers around routines of the MPI library to +modern Fortran (Fortran 2008) wrappers around routines of the MPI library to make their use as simple as possible. Currently several data distribution routines are covered. @@ -14,14 +14,36 @@ The documentation is included inside the repository, but is also available at Installation ============ +The preferred way of obtaining MpiFx is to install it via the Conda package +management framework using `Miniconda +`_ or `Anaconda +`_. Make sure to add/enable the +``conda-forge`` channel in order to be able to access MpiFx, and ensure that the +``conda-forge`` channel is the first repository to be searched for packages. + +We provide both, OpenMPI and MPICH based build variants, choose the one suiting +your needs. For example, issue :: + + conda install 'mpifx=*=mpi_mpich_*' + +or :: + + conda install 'mpifx=*=mpi_openmpi_*' + +to get the last stable release of MpiFx for the respective MPI framework. + + +Building from source +==================== + Prerequisites ------------- * CMake (version >= 3.16) -* Fortran 2003 compatible Fortran compiler +* Fortran 2008 compatible Fortran compiler -* MPI-library and wrappers for your compiler +* MPI-library and wrappers for your compiler supporting the `mpi_f08` interface * `Fypp preprocessor `_ @@ -40,7 +62,7 @@ You can influence the configuration via CMake-variables, which are listed in or pass them as command line options at the configuration phase, e.g.:: FC=ifort cmake -B _build -DBUILD_TESTING=NO . - + Testing ------- @@ -61,15 +83,15 @@ CMake build * Make sure to add the root folder of the installed library to the ``CMAKE_PREFIX_PATH`` environment variable. -* Use ``find_package()`` in `CMakeLists.txt` to locate the library and link +* Use ``find_package()`` in `CMakeLists.txt` to locate the library and link ``MpiFx::MpiFx`` to every target which relies directly on the library :: cmake_minimum_required(VERSION 3.16) - + project(TestMpiFx LANGUAGES Fortran) - + find_package(MpiFx REQUIRED) - + add_executable(test_mpifx test_mpifx.f90) target_link_libraries(test_mpifx MpiFx::MpiFx)