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

UniqueString tweak #3520

Merged
merged 1 commit into from
Aug 28, 2023
Merged

UniqueString tweak #3520

merged 1 commit into from
Aug 28, 2023

Conversation

WeiqunZhang
Copy link
Member

Summary

Previously UniqueString used MPI_Wtime, which could have a very low resolution (1e-5s) on some machines. In this PR, we switch to use amrex::second(), which uses the highest resolution steady clock (usually 1.e-9s). We have also changed a hardwired number according to resolution of the clock so that the digits are not wasted on trailing zeros.

Additional background

ECP-WarpX/impactx#424

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

Previously UniqueString used MPI_Wtime, which could have a very low
resolution (1e-5s) on some machines. In this PR, we switch to use
amrex::second(), which uses the highest resolution steady clock (usually
1.e-9s). We have also changed a hardwired number according to resolution of
the clock so that the digits are not wasted on trailing zeros.
Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

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

Thanks! That improves the precision we saw on macOS w/ MPI :)

@ax3l ax3l enabled auto-merge (squash) August 28, 2023 22:04
@WeiqunZhang
Copy link
Member Author

Somehow wget has stopped working. Maybe we should switch to using the checkout action. Will do it later.

@ax3l ax3l merged commit 22908d8 into AMReX-Codes:development Aug 28, 2023
61 of 66 checks passed
@ax3l
Copy link
Member

ax3l commented Aug 29, 2023

I saw some generally connection splits on CI runners today, maybe that was a temporary fluke. I see still some issues on https://www.githubstatus.com/

But yes, checkout might have higher limits due to token usage.

@WeiqunZhang WeiqunZhang deleted the unique_string branch October 13, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants