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

Develop update #642

Merged
merged 221 commits into from
Oct 16, 2024
Merged

Develop update #642

merged 221 commits into from
Oct 16, 2024

Conversation

Puerling
Copy link

@Puerling Puerling commented Sep 6, 2024

Overview

  • Rework of the backend to follow the STL algorithms more closely.
  • Elimination of most code doubling that was necessary for the CUDA version. This now gets handled directly by the backend with a module that is inspired by the thrust implementation.
  • More extensible Hamiltonian by structuring the code in terms of interactions.
  • Unified interface for calculating local interactions based on the STL backend (closes Core: enable parallelisation over atoms instead of basis cells #420).
  • General TableParser to parse more tables than just the pair interaction one: cac53c6
  • General Biaxial Anisotropy interaction extending the uniaxial and cubic anisotropy terms: c171861
  • Updated packaged libraries for ImGUI build.
  • Reduced coupling of the IO to the Spin_System and Spin_System_Chain implementation.

Puerling and others added 30 commits September 11, 2023 16:49
… parameters were already reported as Warnings
cast vector size immediately to `unsigned int` which is the type needed
for the launch configuration. There is still an additional conversion to
CUDAs `dim3` vector-type, but its initializer uses `unsigned int`.
This improves readability of the function signature of the constructor.
The long term goal is modularizing the Hamiltonian in terms of all of
the energy contributions in order to reuse parts for the spin-lattice
Hamiltonian.
this structure is commonly used in the Hamiltonian classes to describe
the different energy contributions. I gave it a name to make these
occurrences more readable.
combine the implementations in `engine/Hamiltonian_Heisenberg.cpp` and
`engine/Hamiltonian_Heisenberg.cu` into one, avoiding the code
duplication that was present before. This commit should not change any
existing behaviour.
The `Hamiltonian_Heisenberg.cpp` file needs to know about the CUDA kernels
through a CUDA header.

I overlooked that the doubling of pairs also applies to the CUDA build,
not just to the OpenMP build.
…test_solvers to the end, because it takes the longest
The step is needed to prepare for modularity. The new interaction files
should all be created inside the `engine/interaction` subdirectory.
Lift the splitting of the Hamiltonian class into a `Hamiltonian_Heisenberg`
and a `Hamiltonian_Gaussian` in favor of a unified `Hamiltonian` class.
The `Gaussian` part will be reintroduced as an Interaction class that is
stored inside the new `Hamiltonian` class if needed. The code for this
implementation is already present, but the `Gaussian` functionality is
neutered in this commit.
Introduces the data structure for storing interactions. It is of type:
`std::vector<std::unique_ptr<Engine::Interaction::ABC>>`
This vector marks the `Hamiltonian` as the owner of the interactions and
necessitates the creation of constructors according to the rule of five.

For setting and getting the interactions a set of templated member
functions is used which can also be used at run time given the name of
the interaction.

The Gaussian interaction is not usable with this commit.
Reintroduces the effects of `Interaction::Gaussian` on the Hamiltonian.
The current mechanism isn't yet optimal, but designed to interoperate
with the old one. Later on the lookups should be replaced by loops and
the shape of `energy_contributions_per_spin` is fully determined by the
`interactions` vector.
note: There is currently no test for the Anisotropy with a Hamiltonian
that is initialized from a config file.
…olated_Energy_Contributions()

This simplification is enabled by the modularization of the Hamiltonian.
It makes the public accessors for the component indices obsolete.
The default `gcc-11` produces a failing test (`test_physics`) for the
single precision build which newer versions of `gcc` don't.
The `test_physics` test case has either a precision issue or a race
condition for the dephasing test when compiling with `gcc-12`.
This issue isn't present with `gcc-13` and `gcc-14`.
@Puerling Puerling marked this pull request as ready for review October 16, 2024 08:57
@Puerling Puerling merged commit e5af29d into spirit-code:develop Oct 16, 2024
25 checks passed
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