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

Debug print statement causing large e3sm log files in elm-betr #6734

Open
ndkeen opened this issue Nov 6, 2024 · 4 comments
Open

Debug print statement causing large e3sm log files in elm-betr #6734

ndkeen opened this issue Nov 6, 2024 · 4 comments
Assignees
Labels
elm land model

Comments

@ndkeen
Copy link
Contributor

ndkeen commented Nov 6, 2024

Test ERS.f19_g16.I1850ELM.gcp12_gnu.elm-betr now writes 2G e3sm log file.
Over 37M lines that look like:

27:  crop          25          17           1           0
27:  crop          25          17           1           0
27:  crop          25          17           1           0
27:  crop          25          17           1           0

Looks to be here src/external_models/sbetr/src/driver/shared/BeTRSimulation.F90

    if(present(pft))then
      this%betr_pft(c)%column(:)=1
      this%betr_pft(c)%npfts = 0
      pp = 0
      do pi = 1, betr_maxpatch_pft
        if (pi <= col%npfts(c)) then
          p = col%pfti(c) + pi - 1
          if (pft%active(p) .and. (pft%itype(p) /= noveg)) then
            pp = pp + 1
            this%betr_pft(c)%wtcol(pp) = pft%wtcol(p)
            this%betr_pft(c)%itype(pp) = pft%itype(p)
            this%betr_pft(c)%crop(pp) = crop(pi)         !the crop looks weird here, jyt                                                                                                                                                               
          endif
        endif
      enddo
      this%betr_pft(c)%npfts = pp
      this%betr_pft(c)%crop(0:betr_maxpft)=crop(0:betr_maxpft)
      print*,'crop',size(crop),betr_maxpatch_pft,col%npfts(c), this%betr_pft(c)%npfts ! <----
    endif
@ndkeen ndkeen added the elm land model label Nov 6, 2024
@ndkeen
Copy link
Contributor Author

ndkeen commented Nov 6, 2024

I can't find the PR that introduced this, perhaps because it's in external repo. I've been seeing issues with e3sm_integration for at least 2 days, but perhaps a few more. The disk fills up 100% and strange things happen, with not all tests reporting.

perlmutter-login35% pwd
/global/cfs/cdirs/e3sm/ndk/repos/me56-nov6/components/elm/src/external_models/sbetr
perlmutter-login35% git blame src/driver/shared/BeTRSimulation.F90 | grep print | grep crop
96e3d3186 src/driver/shared/BeTRSimulation.F90 (Jinyun Tang     2023-08-18 15:39:29 -0700 2271)       print*,'crop',size(crop),betr_maxpatch_pft,col%npfts(c), this%betr_pft(c)%npfts

@jinyuntang

@ndkeen
Copy link
Contributor Author

ndkeen commented Nov 6, 2024

OK grepping thru older checkouts I have, the print in question was there as early as April. So while we still may want to remove this (or put under DEBUG?), it can't be responsible for the sudden increase in disk space by integration tests on gcp12. I did verify that commenting out that line does allow the e3sm_integration suite to complete (though I think I also removed the netcdf files from the extra_coverage tests -- which isn't much).

Unless... something changed that caused a new code path to be executed.
With a July2 checkout, I tried the test and see the massive number of crop output lines, so it's been there a while.

@mahf708
Copy link
Contributor

mahf708 commented Nov 6, 2024

#6214

@jinyuntang
Copy link
Contributor

@ndkeen @rljacob I will look into this today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elm land model
Projects
None yet
Development

No branches or pull requests

4 participants