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

dmpar WRF crashes with large model wrfinput when using a serial I/O format #1333

Open
JTOFH opened this issue Dec 9, 2020 · 1 comment
Open

Comments

@JTOFH
Copy link
Contributor

JTOFH commented Dec 9, 2020

In dmpar configuration and when using a serial I/O format, WRF reads in the initial conditions on rank 0 and then distributes the values to the other ranks using an MPI_scatterV call. MPI has an array limit of 2**31-1 (2GB). For any model using REAL*4, the array will overflow above 500M cells.

The overflow beings in frame/module_io.F in the subroutine call_pkg_and_dist_real. This allocates the buffer (globbuf) and then passes it to wrf_scatterv_real (via call_pkg_and_dist_generic). A similar problem would also occur with REAL*8 at half the number of cells through call_pkg_and_dist_double -> call_pkg_and_dist_generic -> wrf_scatterv_double.

This problem was identified in WRF 3.8.1, but appears to be the same limitation in all versions.

@benkirk
Copy link

benkirk commented Jan 17, 2025

I believe this is similar to an issue encountered in #2156, with a proposed fix in #2157.

I'm not sure if this exact change will fix your issue, the approach should work. In #2156 the offending call was the MPI_Scatterv in frame/collect_on_comm.c

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

No branches or pull requests

2 participants