-
Notifications
You must be signed in to change notification settings - Fork 75
Fftw.cpp malloc size fix #469
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
Conversation
…_local_size_3d_transposed() to estimate malloc size.
…amr->NPatchComma[0][1]/MPI_NRank
…). Add variable check to List_PID, List_k, TempBuf_SIdx, TempBuf_Var.
…. And move fftw_mpi_local_size_3d_transposed() into these functions for mpi usage.
koarakawaii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @xuanweishan: some minor comments are added. Please have a look 😺 ~
|
@hyschive : this PR looks fine to me now and @xuanweishan has tested it with |
hyschive
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xuanweishan @koarakawaii Looks good. Thanks for the quick fix!
Summary:
This PR reduce the virtual memory requirement of gamer with FFTW3.
Changes:
Init/Init_FFTW.cpp
fftw_mpi_local_size_3d_transposed()toComputePaddedTotalSize()andComputeTotalSize()for mpi supported situation to enhance the estimation of memory requirement.MemUnitestimation is not proper, it can't decrease the memory usage per rank with mpi. So we replace the valueMemUnitfromamr->NPatchComma[0][1]*PS1toamr->NPatchComma[0][1]/MPI_NRankMemUnitrelatedmallocandreallocto prevent error in after usage.Tests:
SERIALsupportOPT__FFTW_STARTUP = 1support