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 test_mpp_nesting unit test #1336

Merged
merged 1 commit into from
Aug 16, 2023
Merged
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
14 changes: 8 additions & 6 deletions test_fms/mpp/test_mpp_nesting.F90
Original file line number Diff line number Diff line change
Expand Up @@ -950,15 +950,15 @@ subroutine test_update_nest_domain_r8( type )
!--- loop over nest level
do l = 1, num_nest_level
npes_my_level = mpp_get_nest_npes(nest_domain, l)
npes_my_fine = mpp_get_nest_fine_npes(nest_domain,l)
allocate(my_pelist(npes_my_level))
allocate(my_pelist_fine(npes_my_fine))
call mpp_get_nest_pelist(nest_domain, l, my_pelist)

call mpp_declare_pelist(my_pelist(:))
write(type2, '(a,I2)')trim(type)//" nest_level = ",l
if(ANY(my_pelist(:)==mpp_pe())) then

npes_my_fine = mpp_get_nest_fine_npes(nest_domain,l)
allocate(my_pelist_fine(npes_my_fine))
call mpp_get_nest_fine_pelist(nest_domain, l, my_pelist_fine)

call mpp_set_current_pelist(my_pelist)
Expand Down Expand Up @@ -2625,7 +2625,8 @@ subroutine test_update_nest_domain_r8( type )
deallocate(wbuffery2, ebuffery2, sbuffery2, nbuffery2)
endif
endif
deallocate(my_pelist, my_pelist_fine)
if(ANY(my_pelist(:)==mpp_pe())) deallocate(my_pelist_fine)
deallocate(my_pelist)
call mpp_set_current_pelist()

enddo
Expand Down Expand Up @@ -2984,15 +2985,15 @@ subroutine test_update_nest_domain_r4( type )
!--- loop over nest level
do l = 1, num_nest_level
npes_my_level = mpp_get_nest_npes(nest_domain, l)
npes_my_fine = mpp_get_nest_fine_npes(nest_domain,l)
allocate(my_pelist(npes_my_level))
allocate(my_pelist_fine(npes_my_fine))
call mpp_get_nest_pelist(nest_domain, l, my_pelist)

call mpp_declare_pelist(my_pelist(:))
write(type2, '(a,I2)')trim(type)//" nest_level = ",l
if(ANY(my_pelist(:) == mpp_pe())) then

npes_my_fine = mpp_get_nest_fine_npes(nest_domain,l)
allocate(my_pelist_fine(npes_my_fine))
call mpp_get_nest_fine_pelist(nest_domain, l, my_pelist_fine)

call mpp_set_current_pelist(my_pelist)
Expand Down Expand Up @@ -4655,7 +4656,8 @@ subroutine test_update_nest_domain_r4( type )
endif
endif

deallocate(my_pelist, my_pelist_fine)
if(ANY(my_pelist(:)==mpp_pe())) deallocate(my_pelist_fine)
deallocate(my_pelist)
call mpp_set_current_pelist()

enddo
Expand Down
Loading