-
Notifications
You must be signed in to change notification settings - Fork 139
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
Noncollinear and spin-orbit implementation for k-point Hamiltonian in AFQMC #2734
Conversation
…outines and get_psiK to handle noncollinear, still not done with KP ham ops
…pass non-collinear KP input
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.
LGTM
@@ -49,7 +49,8 @@ class allocator{ | |||
bool operator!=(allocator const& o) const{return mp_ != o.mp_;} | |||
using void_pointer = typename std::pointer_traits<decltype(std::declval<memory_type*>()->allocate(0, 0))>::template rebind<void>; | |||
pointer allocate(size_type n){ | |||
return static_cast<pointer>(static_cast<void_pointer>(mp_->allocate(n*sizeof(value_type), alignof(T)))); | |||
return static_cast<pointer>(static_cast<void_pointer>(mp_->allocate(n*sizeof(value_type), 16))); |
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.
why 16?
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.
This is a temporary fix until we update multi.
Cuda is incompatible with alignof() for std::complex, so using alignof(T) in general
causes alignment issues when compiled in double precision for gpus.
With 16 all the regular types work fine. (Notice that cudamalloc aligns to 256).
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.
Should we update multi?
This only allows for spin dependent one-body Hamiltonian for k-point calculations right? What format is expected in the input wavefunction / hamiltonian. |
The one body hamiltonian as to be 2M*2M in non-collinear calculations. |
For the kpoint code this is 2m x 2m right? The HDF5 format doesn't change? |
@@ -49,7 +49,8 @@ class allocator{ | |||
bool operator!=(allocator const& o) const{return mp_ != o.mp_;} | |||
using void_pointer = typename std::pointer_traits<decltype(std::declval<memory_type*>()->allocate(0, 0))>::template rebind<void>; | |||
pointer allocate(size_type n){ | |||
return static_cast<pointer>(static_cast<void_pointer>(mp_->allocate(n*sizeof(value_type), alignof(T)))); | |||
return static_cast<pointer>(static_cast<void_pointer>(mp_->allocate(n*sizeof(value_type), 16))); |
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.
Should we update multi?
Updating multi is possibly a lot of work. |
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.
Preferably, we should update multi and then update our code. I tried updating multi but found an internal conflict in multi. So let us use the workaround from @mmorale3 at the moment.
Please review the developer documentation
on the wiki of this project that contains help and requirements.
The non-collinear implementation of AFQMC is completed in this PR.
In non-collinear calculations, a spin-orbit hamiltonian is now allowed.
Propagation and energy evaluation are implemented.
Only the k-point hamiltonian (both CPU and GPU) works with non-collinear.
Observables (other than the energy) are not yet enabled with non-collinear.
Future PRs will complete the missing features.
Describe what this PR changes and why. If it closes an issue, link to it here
with a supported keyword.
New feature: Noncollinear and spin-orbit interactions in AFQMC.
Does this introduce a breaking change?
No
What systems has this change been tested on?
Quartz, Lassen. GCC and Clang compilers.
Checklist