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

Improve code portability #5020

Merged
merged 7 commits into from
Jan 17, 2025
Merged

Conversation

jngrad
Copy link
Member

@jngrad jngrad commented Dec 17, 2024

Description of changes:

  • upgrade to latest waLBerla version and most recent pystencils/lbmpy/sympy releases
    • rewrite codegen pipeline to support multiple pystencils versions
  • bugfixes:
    • remove sources of NaN, float overflow, and most float underflow
    • copy all waLBerla shared objects to the installation directory
    • add prefix to waLBerla and Caliper shared objects to avoid name clashes
  • new feature: floating point exceptions instrumentation for x86 and Armv8
  • run CI on Apple M1 (virtual machine, ARM 64bit architecture)
  • give fine control over Clang-Tidy diagnostics for each CMake target

Avoid generating NaN values. Avoid calling virtual functions during
construction or destruction. Address various Clang-Tidy diagnostics.
Remove standard library features deprecated in C++26. Adjust test
tolerances for ARM 64bit architectures. Reduce sources of underflow.
Bump waLBerla, codegen, Caliper dependencies to the latest releases.
Add partial support for pystencils 2.0. Regenerate waLBerla kernels.
Migrate GitHub Actions to fast, ARM-compatible macOS runners.
@jngrad jngrad marked this pull request as ready for review December 18, 2024 01:05
@jngrad jngrad added this to the ESPResSo 4.3.0 milestone Dec 18, 2024
@jngrad jngrad requested a review from reinaual December 18, 2024 01:07

_data_j[_stride_j_0 + 12 * _stride_j_3] = D * (f_ext_0 * z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * -2.0 + f_ext_1 * z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * 2.0 + f_ext_2 * z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * 2.0 + kT * (_data_rho[_stride_rho_0] - _data_rho[_stride_rho_1 + _stride_rho_2]) * 4.0 - z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * (-_data_phi[0] + _data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2] - _data_phi[_stride_phi_0 + _stride_phi_2] + _data_phi[_stride_phi_1]) + z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * (_data_phi[0] - _data_phi[_stride_phi_0 + _stride_phi_1 + _stride_phi_2] + _data_phi[_stride_phi_0 + _stride_phi_1] - _data_phi[_stride_phi_2]) + z * (_data_rho[_stride_rho_0] + _data_rho[_stride_rho_1 + _stride_rho_2]) * (_data_phi[_stride_phi_0 + _stride_phi_1] + _data_phi[_stride_phi_0 + _stride_phi_2] - _data_phi[_stride_phi_1] - _data_phi[_stride_phi_2])) * 0.02351606505734748 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082;
_data_j[_stride_j_0 + 12 * _stride_j_3] = D * (-f_ext_0 * z * _data_rho[_stride_rho_0] - f_ext_0 * z * _data_rho[_stride_rho_1 + _stride_rho_2] + f_ext_1 * z * _data_rho[_stride_rho_0] + f_ext_1 * z * _data_rho[_stride_rho_1 + _stride_rho_2] + f_ext_2 * z * _data_rho[_stride_rho_0] + f_ext_2 * z * _data_rho[_stride_rho_1 + _stride_rho_2] + kT * -2.0 * _data_rho[_stride_rho_1 + _stride_rho_2] + kT * 2.0 * _data_rho[_stride_rho_0] + z * _data_phi[_stride_phi_0] * _data_rho[_stride_rho_0] + z * _data_phi[_stride_phi_0] * _data_rho[_stride_rho_1 + _stride_rho_2] - z * _data_phi[_stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_0] - z * _data_phi[_stride_phi_1 + _stride_phi_2] * _data_rho[_stride_rho_1 + _stride_rho_2]) * 0.04703213011469496 * ((1.0) / (kT)) + pow(D * (0.5 * _data_rho[_stride_rho_0] + 0.5 * _data_rho[_stride_rho_1 + _stride_rho_2]), 0.5) * (random_13_0 - 0.5) * 1.5025119784898082;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about theses changes, if this new version or the previous version is actually correct. Apparently we lack test-coverage here, so this needs a proper investigation. I opened a ticket #5029 for it.

Copy link
Contributor

@reinaual reinaual left a comment

Choose a reason for hiding this comment

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

Besides the EK-Stuff it LGTM

@jngrad jngrad added the automerge Merge with kodiak label Jan 17, 2025
@kodiakhq kodiakhq bot merged commit 74490c0 into espressomd:python Jan 17, 2025
10 checks passed
@jngrad jngrad deleted the bump_requirements branch January 17, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants