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

MPP Update Domains Function Issue #168

Open
mcthreems opened this issue May 19, 2020 · 0 comments
Open

MPP Update Domains Function Issue #168

mcthreems opened this issue May 19, 2020 · 0 comments
Labels
bug phys:sfc Physics: topography, surface fluxes, bucket hydrology, vegetation

Comments

@mcthreems
Copy link

mcthreems commented May 19, 2020

Description

Hello, I am continuing to work on incorporating the TAM hydrology module into Isca, but am currently having an issue with the mpp_update_domains() function in the TAM code. In a different thread it was suggested to look at a couple files in the source code that use it, and one has basically the same setup (fv_advection.F90). The relevant code in that file is as follows:

type(domain2D), save, public :: advection_domain
npes = mpp_npes()
layout = (/1,npes/)
call mpp_define_domains( (/1,nx,1,ny/), layout, advection_domain, yhalo=2 )
call mpp_get_compute_domain( advection_domain, is, ie, js, je )
real, dimension(nx,js-2:je+2,size(q,3)) :: vx
call mpp_update_domains(vx, advection_domain)

The code lines are in the order they appear in that file, but they aren't right next to each other as above. The TAM code lines are similar, with one main difference:

type(domain2D), save, public :: topo_domain
npes = mpp_npes()
layout = (/1,npes/)
call mpp_define_domains( (/1,nx,1,ny/), layout, topo_domain, yhalo=1)
call mpp_get_data_domain( topo_domain, isd, ied, jsd, jed)
call mpp_get_compute_domain( topo_domain, is, ie, js, je )
call mpp_update_domains( dtd, topo_domain)
call mpp_update_domains( lat_halo, topo_domain)

(end of init subroutine)

real, dimension(is:ie,jsd:jed)      :: dld
call mpp_update_domains(dld, topo_domain)

The mpp_get_data_domain is used in the TAM code but not in the Isca file. I tried commenting out that function in the TAM data (and defining the jsd/jse values separately), but it didn't change the crash point or error function. The error message itself is either "not enough virtual memory" or just a segfault (or both), and occurs at the line call mpp_update_domains(dld, topo_domain) in the TAM file. Strangely, the same function is fine earlier in the module (specifically, in the init subroutine), but fails in the other subroutine.


Isca version
This work is on my own fork, but the Isca file being referenced has not been edited and should be equivalent to the current main Isca version.


System Information:

uname_result(system='Linux', node='n2008', release='2.6.32-754.14.2.el6.x86_64', version='#1 SMP Tue May 14 19:35:42 UTC 2019', machine='x86_64', processor='x86_64')
@mcthreems mcthreems added the bug label May 19, 2020
@dennissergeev dennissergeev added the phys:sfc Physics: topography, surface fluxes, bucket hydrology, vegetation label May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug phys:sfc Physics: topography, surface fluxes, bucket hydrology, vegetation
Projects
None yet
Development

No branches or pull requests

2 participants