From a1918b71f91da3a2aa0ecda0efcca6289e67e1a8 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Fri, 16 Aug 2024 08:34:51 -0400 Subject: [PATCH 1/4] Fix support for external MPI --- CHANGELOG.md | 6 ++++++ gridcomps/Cap/MAPL_Cap.F90 | 16 +++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c923819f1ab9..bdf307c6987c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated +## [2.46.3] - 2024-08-19 + +### Fixed + +- Fix bug in supporting externally initialized MPI + ## [2.46.2] - 2024-05-31 ### Removed diff --git a/gridcomps/Cap/MAPL_Cap.F90 b/gridcomps/Cap/MAPL_Cap.F90 index 007d857d6da0..3905711b796a 100644 --- a/gridcomps/Cap/MAPL_Cap.F90 +++ b/gridcomps/Cap/MAPL_Cap.F90 @@ -447,17 +447,19 @@ subroutine initialize_mpi(this, unusable, rc) _UNUSED_DUMMY(unusable) - !call MPI_Initialized(this%mpi_already_initialized, ierror) - !_VERIFY(ierror) - call ESMF_InitializePreMPI(_RC) + call MPI_Initialized(this%mpi_already_initialized, ierror) + _VERIFY(ierror) if (.not. this%mpi_already_initialized) then + call ESMF_InitializePreMPI(_RC) call MPI_Init_thread(MPI_THREAD_MULTIPLE, provided, ierror) - _ASSERT(provided == MPI_THREAD_MULTIPLE, 'MPI_THREAD_MULTIPLE not supported by this MPI.') -! call MPI_Init_thread(MPI_THREAD_SINGLE, provided, ierror) -! _VERIFY(ierror) -! _ASSERT(provided == MPI_THREAD_SINGLE, "MPI_THREAD_SINGLE not supported by this MPI.") + else + ! If we are here, then MPI has already been initialized by the user + ! and we are just using it. But we need to make sure that the user + ! has initialized MPI with the correct threading level. + call MPI_Query_thread(provided, ierror) end if + _ASSERT(provided == MPI_THREAD_MULTIPLE, 'MPI_THREAD_MULTIPLE not supported by this MPI.') call MPI_Comm_rank(this%comm_world, this%rank, ierror); _VERIFY(ierror) call MPI_Comm_size(this%comm_world, npes_world, ierror); _VERIFY(ierror) From 58ff01c08ffb504af2971af830572c7bc28e7dcc Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Fri, 16 Aug 2024 08:44:29 -0400 Subject: [PATCH 2/4] Fix github actions --- .github/workflows/workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index f4b1e5f07cbc..76ed2d251565 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -35,7 +35,7 @@ jobs: name: Build and Test MAPL GNU runs-on: ubuntu-latest container: - image: gmao/ubuntu20-geos-env-mkl:v7.24.0-openmpi_5.0.2-gcc_13.2.0 + image: gmao/ubuntu20-geos-env-mkl:v7.25.0-openmpi_5.0.2-gcc_13.2.0 # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 # It seems like we might not need secrets on GitHub Actions which is good for forked # pull requests @@ -86,7 +86,7 @@ jobs: name: Build and Test MAPL Intel runs-on: ubuntu-latest container: - image: gmao/ubuntu20-geos-env:v7.24.0-intelmpi_2021.6.0-intel_2022.1.0 + image: gmao/ubuntu20-geos-env:v7.25.0-intelmpi_2021.13-intel_2024.2 # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 # It seems like we might not need secrets on GitHub Actions which is good for forked # pull requests From 425140a75530b349433de13253da8e9eec16dcdc Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Fri, 16 Aug 2024 08:54:47 -0400 Subject: [PATCH 3/4] Try to fix CircleCI --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1449faf89f25..98b455ca9020 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,8 +16,8 @@ parameters: # Anchors to prevent forgetting to update a version os_version: &os_version ubuntu20 -baselibs_version: &baselibs_version v7.24.0 -bcs_version: &bcs_version v11.3.0 +baselibs_version: &baselibs_version v7.25.0 +bcs_version: &bcs_version v11.5.0 tag_build_arg_name: &tag_build_arg_name maplversion orbs: @@ -178,9 +178,9 @@ workflows: baselibs_version: *baselibs_version container_name: mapl mpi_name: intelmpi - mpi_version: 2021.6.0 + mpi_version: "2021.13" compiler_name: intel - compiler_version: 2022.1.0 + compiler_version: "2024.2" image_name: geos-env tag_build_arg_name: *tag_build_arg_name - ci/publish_docker: From 6c4186b72202e7c4442139319d300dd200c6c7ba Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Fri, 16 Aug 2024 10:51:36 -0400 Subject: [PATCH 4/4] Update changelog and cmakelists for 2.46.3 release --- CHANGELOG.md | 2 +- CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdf307c6987c..cfea0235e181 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated -## [2.46.3] - 2024-08-19 +## [2.46.3] - 2024-08-16 ### Fixed diff --git a/CMakeLists.txt b/CMakeLists.txt index b2bd7cd2619a..2a0ecb3b109a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ endif () project ( MAPL - VERSION 2.46.2 + VERSION 2.46.3 LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF # Set the possible values of build type for cmake-gui