From 4e1c4408f1aec7ffed31a3ae0d86de22381ab5ce Mon Sep 17 00:00:00 2001 From: Ryan Mulhall Date: Thu, 19 Dec 2024 11:47:38 -0500 Subject: [PATCH] fix temporary array warning in mpp_init --- mpp/include/mpp_util_mpi.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mpp/include/mpp_util_mpi.inc b/mpp/include/mpp_util_mpi.inc index 688a9c931..c849947be 100644 --- a/mpp/include/mpp_util_mpi.inc +++ b/mpp/include/mpp_util_mpi.inc @@ -101,6 +101,7 @@ function get_peset(pelist) integer, intent(in), optional :: pelist(:) integer :: errunit integer :: i, n + integer, allocatable :: pelist_tmp(:) if( .NOT.PRESENT(pelist) )then !set it to current_peset_num get_peset = current_peset_num; return @@ -134,11 +135,13 @@ function get_peset(pelist) peset(i)%list(:) = pelist(:) peset(i)%count = size(pelist(:)) - call MPI_GROUP_INCL( peset(current_peset_num)%group, size(pelist(:)), pelist-mpp_root_pe(), peset(i)%group, error ) + allocate(pelist_tmp(size(pelist(:)))) + pelist_tmp = pelist - mpp_root_pe() + call MPI_GROUP_INCL( peset(current_peset_num)%group, size(pelist(:)), pelist_tmp, peset(i)%group, error ) call MPI_COMM_CREATE_GROUP(peset(current_peset_num)%id, peset(i)%group, & DEFAULT_TAG, peset(i)%id, error ) get_peset = i - + deallocate(pelist_tmp) return end function get_peset