Skip to content

Conversation

@atmyers
Copy link
Member

@atmyers atmyers commented Apr 16, 2025

To see how this is used, see tests/test_particleTile.py

@atmyers atmyers requested review from EZoni and RemiLehe April 16, 2025 19:17
Copy link
Member

@EZoni EZoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @atmyers! I left a few minor comments, please consider if the suggestions are worth being applied. After this round of review the PR is ready to merge, as far as I'm concerned. I think it would be nice to have this feature before we release 25.05.

CACHE STRING
"Repository URI to pull and build AMReX from if(pyAMReX_amrex_internal)")
set(pyAMReX_amrex_branch "25.04"
set(pyAMReX_amrex_branch "development"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we usually set a commit hash here, rather than the name of the branch. But this works too, of course. It will be soon overwritten with 25.05 anways, when we publish the new release.


auto buf = idcpus.request();
auto buf2 = cpus.request();
if (buf.size != buf2.size) throw std::runtime_error("sizes do not match!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we enclose this in parenthesis just for consistency with the other one-line if conditions?

Suggested change
if (buf.size != buf2.size) throw std::runtime_error("sizes do not match!");
if (buf.size != buf2.size) {
throw std::runtime_error("sizes do not match!");
}


auto buf = idcpus.request();
auto buf2 = ids.request();
if (buf.size != buf2.size) throw std::runtime_error("sizes do not match!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we enclose this in parenthesis just for consistency with the other one-line if conditions?

Suggested change
if (buf.size != buf2.size) throw std::runtime_error("sizes do not match!");
if (buf.size != buf2.size) {
throw std::runtime_error("sizes do not match!");
}

Comment on lines +159 to +168
idcpu = np.array(
[
9223372036871553124,
9223372036871553124,
9223372036871553124,
9223372036871553124,
9223372036871553124,
],
dtype=np.uint64,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add an inline comment clarifying where this number comes from, just to make the test as clear as possible.

@EZoni EZoni mentioned this pull request May 6, 2025
5 tasks
Copy link
Member

@EZoni EZoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@EZoni EZoni enabled auto-merge (squash) May 6, 2025 01:38
@EZoni EZoni merged commit 76eaae4 into AMReX-Codes:development May 6, 2025
17 checks passed
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

Successfully merging this pull request may close these issues.

2 participants