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

fix temporary array warning in mpp_init #1628

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions mpp/include/mpp_util_mpi.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading